Ruby 1.8.4

Last updated Sat Jan 07 08:13:34 東京 (標準時) 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              668 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               33 main.c         main(argc, argv, 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. bignum.c
  3. class.c
  4. compar.c
  5. defines.h
  6. dir.c
  7. dln.c
  8. dln.h
  9. dmydln.c
  10. dmyext.c
  11. enum.c
  12. env.h
  13. error.c
  14. eval.c
  15. ext/
  16. file.c
  17. gc.c
  18. hash.c
  19. inits.c
  20. intern.h
  21. io.c
  22. lex.c
  23. main.c
  24. marshal.c
  25. math.c
  26. missing.h
  27. missing/
  28. node.h
  29. numeric.c
  30. object.c
  31. pack.c
  32. parse.c
  33. parse.y
  34. prec.c
  35. process.c
  36. random.c
  37. range.c
  38. re.c
  39. re.h
  40. regex.c
  41. regex.h
  42. ruby.c
  43. ruby.h
  44. rubyio.h
  45. rubysig.h
  46. signal.c
  47. sprintf.c
  48. st.c
  49. st.h
  50. string.c
  51. struct.c
  52. time.c
  53. util.c
  54. util.h
  55. variable.c
  56. version.c
  57. version.h
  58. vms/
  59. win32/
  60. wince/
  61. x68/


DEFINITIONS

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


FILES

  1. array.c
  2. bignum.c
  3. class.c
  4. compar.c
  5. defines.h
  6. dir.c
  7. dln.c
  8. dln.h
  9. dmydln.c
  10. dmyext.c
  11. enum.c
  12. env.h
  13. error.c
  14. eval.c
  15. ext/
  16. file.c
  17. gc.c
  18. hash.c
  19. inits.c
  20. intern.h
  21. io.c
  22. lex.c
  23. main.c
  24. marshal.c
  25. math.c
  26. missing.h
  27. missing/
  28. node.h
  29. numeric.c
  30. object.c
  31. pack.c
  32. parse.c
  33. parse.y
  34. prec.c
  35. process.c
  36. random.c
  37. range.c
  38. re.c
  39. re.h
  40. regex.c
  41. regex.h
  42. ruby.c
  43. ruby.h
  44. rubyio.h
  45. rubysig.h
  46. signal.c
  47. sprintf.c
  48. st.c
  49. st.h
  50. string.c
  51. struct.c
  52. time.c
  53. util.c
  54. util.h
  55. variable.c
  56. version.c
  57. version.h
  58. vms/
  59. win32/
  60. wince/
  61. 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.


ADD2HEAP

ADD2HEAP         10240 parse.c        #define ADD2HEAP(n, c, p) ((parser_heap = (n))->u1.node = (p), \
ADD2HEAP         6242 parse.y        #define ADD2HEAP(n, c, p) ((parser_heap = (n))->u1.node = (p), \


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         2164 eval.c         # define TMP_ALLOC(n) ALLOCA_N(VALUE,n)
ALLOCA_N          466 ruby.h         #define ALLOCA_N(type,n) (type*)alloca(sizeof(type)*(n))


ANY

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


ANY2C

ANY2C             112 ext/dl/dl.h    # define ANY2C(x)  (x.c)
ANY2C             116 ext/dl/dl.h    # define ANY2C(x)  ANY2I(x)


ANY2F

ANY2F              80 ext/dl/dl.h    #   define ANY2F(x)  (x.d)
ANY2F              84 ext/dl/dl.h    #   define ANY2F(x)  (x.f)
ANY2F              89 ext/dl/dl.h    # define ANY2F(x)  (x.d)


ANY2H

ANY2H             122 ext/dl/dl.h    # define ANY2H(x)  (x.h)
ANY2H             126 ext/dl/dl.h    # define ANY2H(x)  ANY2I(x)


ANY2I

ANY2I              66 ext/dl/dl.h    # define ANY2I(x)  x.l
ANY2I              70 ext/dl/dl.h    # define ANY2I(x)  x.i


ANY2P

ANY2P              98 ext/dl/dl.h    # define ANY2P(x)  (x.i)
ANY2P             102 ext/dl/dl.h    # define ANY2P(x)  (x.l)
ANY2P             106 ext/dl/dl.h    # define ANY2P(x)  (x.p)


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


BASE

BASE             1003 dir.c          #define BASE (*base && !((isdirsep(*base) && !base[1]) || (base[1] == ':' && isdirsep(base[2]) && !base[3])))
BASE             1005 dir.c          #define BASE (*base && !(isdirsep(*base) && !base[1]))


BDIGIT

BDIGIT             64 defines.h      # define BDIGIT unsigned int
BDIGIT             69 defines.h      # define BDIGIT unsigned int
BDIGIT             74 defines.h      # define BDIGIT unsigned short
BDIGIT             79 defines.h      # define BDIGIT unsigned short


BDIGIT_DBL

BDIGIT_DBL         66 defines.h      # define BDIGIT_DBL unsigned LONG_LONG
BDIGIT_DBL         71 defines.h      # define BDIGIT_DBL unsigned long
BDIGIT_DBL         76 defines.h      # define BDIGIT_DBL unsigned long
BDIGIT_DBL         81 defines.h      # define BDIGIT_DBL unsigned long


BDIGIT_DBL_SIGNED

BDIGIT_DBL_SIGNED   67 defines.h      # define BDIGIT_DBL_SIGNED LONG_LONG
BDIGIT_DBL_SIGNED   72 defines.h      # define BDIGIT_DBL_SIGNED long
BDIGIT_DBL_SIGNED   77 defines.h      # define BDIGIT_DBL_SIGNED long
BDIGIT_DBL_SIGNED   82 defines.h      # define BDIGIT_DBL_SIGNED long


BEG

BEG                18 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         384 random.c       # define BIG_GET32(big,i) (((BDIGIT *)(big)->digits)[(i)*2] | \
BIG_GET32         392 random.c       # define BIG_GET32(big,i) (((BDIGIT *)(big)->digits)[i])


BIG_SET32

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


BITSTACK_LEXPOP

BITSTACK_LEXPOP   202 parse.c        #define BITSTACK_LEXPOP(stack)	(stack = (stack >> 1) | (stack & 1))
BITSTACK_LEXPOP   105 parse.y        #define BITSTACK_LEXPOP(stack)	(stack = (stack >> 1) | (stack & 1))


BITSTACK_POP

BITSTACK_POP      201 parse.c        #define BITSTACK_POP(stack)	(stack >>= 1)
BITSTACK_POP      104 parse.y        #define BITSTACK_POP(stack)	(stack >>= 1)


BITSTACK_PUSH

BITSTACK_PUSH     200 parse.c        #define BITSTACK_PUSH(stack, n)	(stack = (stack<<1)|((n)&1))
BITSTACK_PUSH     103 parse.y        #define BITSTACK_PUSH(stack, n)	(stack = (stack<<1)|((n)&1))


BITSTACK_SET_P

BITSTACK_SET_P    203 parse.c        #define BITSTACK_SET_P(stack)	(stack&1)
BITSTACK_SET_P    106 parse.y        #define BITSTACK_SET_P(stack)	(stack&1)


BUF

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


BYTEWIDTH

BYTEWIDTH        1990 pack.c         #define BYTEWIDTH 8
BYTEWIDTH          52 regex.h        #define BYTEWIDTH 8


CBPUSH_P

CBPUSH_P          142 ext/dl/dl.h    # define CBPUSH_P(x) PUSH_ARG(x,VOIDP_DLTYPE)
CBPUSH_P          144 ext/dl/dl.h    # define CBPUSH_P(x) PUSH_P(x)


CHECK

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


CHECK_INTS

CHECK_INTS         72 regex.c        # define CHECK_INTS do {\
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   341 ext/openssl/ossl_cipher.c #define CIPHER_0ARG_INT(func)					\
CIPHER_0ARG_INT   349 ext/openssl/ossl_cipher.c CIPHER_0ARG_INT(key_length)


CMDARG_LEXPOP

CMDARG_LEXPOP     214 parse.c        #define CMDARG_LEXPOP()	BITSTACK_LEXPOP(cmdarg_stack)
CMDARG_LEXPOP     117 parse.y        #define CMDARG_LEXPOP()	BITSTACK_LEXPOP(cmdarg_stack)


CMDARG_P

CMDARG_P          215 parse.c        #define CMDARG_P()	BITSTACK_SET_P(cmdarg_stack)
CMDARG_P          118 parse.y        #define CMDARG_P()	BITSTACK_SET_P(cmdarg_stack)


CMDARG_POP

CMDARG_POP        213 parse.c        #define CMDARG_POP()	BITSTACK_POP(cmdarg_stack)
CMDARG_POP        116 parse.y        #define CMDARG_POP()	BITSTACK_POP(cmdarg_stack)


CMDARG_PUSH

CMDARG_PUSH       212 parse.c        #define CMDARG_PUSH(n)	BITSTACK_PUSH(cmdarg_stack, n)
CMDARG_PUSH       115 parse.y        #define CMDARG_PUSH(n)	BITSTACK_PUSH(cmdarg_stack, n)


COLLISION

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


COMMAND

COMMAND           949 process.c      #define COMMAND "command.x"
COMMAND           952 process.c      #define COMMAND "cmd.exe"
COMMAND           955 process.c      #define COMMAND "command.com"


COND_LEXPOP

COND_LEXPOP       208 parse.c        #define COND_LEXPOP()	BITSTACK_LEXPOP(cond_stack)
COND_LEXPOP       111 parse.y        #define COND_LEXPOP()	BITSTACK_LEXPOP(cond_stack)


COND_P

COND_P            209 parse.c        #define COND_P()	BITSTACK_SET_P(cond_stack)
COND_P            112 parse.y        #define COND_P()	BITSTACK_SET_P(cond_stack)


COND_POP

COND_POP          207 parse.c        #define COND_POP()	BITSTACK_POP(cond_stack)
COND_POP          110 parse.y        #define COND_POP()	BITSTACK_POP(cond_stack)


COND_PUSH

COND_PUSH         206 parse.c        #define COND_PUSH(n)	BITSTACK_PUSH(cond_stack, n)
COND_PUSH         109 parse.y        #define COND_PUSH(n)	BITSTACK_PUSH(cond_stack, n)


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           82 dir.c          #   define CharNext(p) ((p) + mblen(p, MB_CUR_MAX))
CharNext           84 dir.c          #   define CharNext(p) ((p) + 1)
CharNext         2292 file.c         #   define CharNext(p) ((p) + mblen(p, MB_CUR_MAX))
CharNext         2294 file.c         #   define CharNext(p) ((p) + 1)
CharNext           38 win32/win32.h  #undef CharNext
CharNext           39 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


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       66 win32/win32.c  # define CreateSignal() (HANDLE)WSACreateEvent()
CreateSignal       71 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


DEBUG_CODE

DEBUG_CODE         44 ext/dl/dl.h    #define DEBUG_CODE(b) {printf("DEBUG:%d\n",__LINE__);b;}
DEBUG_CODE         47 ext/dl/dl.h    #define DEBUG_CODE(b)


DEBUG_CODE2

DEBUG_CODE2        45 ext/dl/dl.h    #define DEBUG_CODE2(b1,b2) {printf("DEBUG:%d\n",__LINE__);b1;}
DEBUG_CODE2        48 ext/dl/dl.h    #define DEBUG_CODE2(b1,b2) b2


DEFAULT_CONV

DEFAULT_CONV      505 ext/nkf/nkf-utf8/nkf.c #   define  DEFAULT_CONV j_oconv
DEFAULT_CONV      508 ext/nkf/nkf-utf8/nkf.c #   define  DEFAULT_CONV s_oconv
DEFAULT_CONV      511 ext/nkf/nkf-utf8/nkf.c #   define  DEFAULT_CONV e_oconv
DEFAULT_CONV      514 ext/nkf/nkf-utf8/nkf.c #   define  DEFAULT_CONV w_oconv


DEFAULT_KCODE

DEFAULT_KCODE      99 defines.h      #define DEFAULT_KCODE KCODE_SJIS
DEFAULT_KCODE     101 defines.h      #define DEFAULT_KCODE KCODE_EUC
DEFAULT_KCODE      53 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)


DLCHAR

DLCHAR            113 ext/dl/dl.h    # define DLCHAR(x) ((char)x)
DLCHAR            117 ext/dl/dl.h    # define DLCHAR(x) DLINT(x)


DLEXT

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


DLFLOAT

DLFLOAT            81 ext/dl/dl.h    #   define DLFLOAT(x) ((double)x)
DLFLOAT            85 ext/dl/dl.h    #   define DLFLOAT(x) ((float)x)
DLFLOAT            90 ext/dl/dl.h    # define DLFLOAT(x) ((double)x)


DLINT

DLINT              67 ext/dl/dl.h    # define DLINT(x)  (long)x
DLINT              71 ext/dl/dl.h    # define DLINT(x)  (int)x


DLLONG2NUM

DLLONG2NUM        206 ext/dl/dl.h    # define DLLONG2NUM(x) LONG2NUM((long)x)
DLLONG2NUM        209 ext/dl/dl.h    # define DLLONG2NUM(x) INT2NUM((long)x)


DLNUM2LONG

DLNUM2LONG        207 ext/dl/dl.h    # define DLNUM2LONG(x) (long)(NUM2LONG(x))
DLNUM2LONG        210 ext/dl/dl.h    # define DLNUM2LONG(x) (long)(NUM2INT(x))


DLN_DEFINED

DLN_DEFINED      1335 dln.c          #define DLN_DEFINED
DLN_DEFINED      1370 dln.c          #define DLN_DEFINED
DLN_DEFINED      1396 dln.c          #define DLN_DEFINED
DLN_DEFINED      1413 dln.c          #define DLN_DEFINED
DLN_DEFINED      1490 dln.c          # define DLN_DEFINED
DLN_DEFINED      1537 dln.c          # define DLN_DEFINED
DLN_DEFINED      1584 dln.c          #define DLN_DEFINED


DLSHORT

DLSHORT           123 ext/dl/dl.h    # define DLSHORT(x) ((short)x)
DLSHORT           127 ext/dl/dl.h    # define DLSHORT(x) DLINT(x)


DLSTACK

DLSTACK           150 ext/dl/dl.h    #   define DLSTACK
DLSTACK           172 ext/dl/dl.h    # define DLSTACK


DLSTACK_ARGS

DLSTACK_ARGS      154 ext/dl/dl.h    #   define DLSTACK_ARGS
DLSTACK_ARGS      178 ext/dl/dl.h    # define DLSTACK_ARGS  stack[0],stack[1],stack[2],stack[3],stack[4],\


DLSTACK_END

DLSTACK_END       156 ext/dl/dl.h    #   define DLSTACK_END(sym)
DLSTACK_END       183 ext/dl/dl.h    # define DLSTACK_END(sym)


DLSTACK_METHOD

DLSTACK_METHOD    151 ext/dl/dl.h    #   define DLSTACK_METHOD "asm"
DLSTACK_METHOD    174 ext/dl/dl.h    # define DLSTACK_METHOD "dl"
DLSTACK_METHOD    192 ext/dl/dl.h    # define DLSTACK_METHOD "none"


DLSTACK_PROTO

DLSTACK_PROTO     153 ext/dl/dl.h    #   define DLSTACK_PROTO
DLSTACK_PROTO     175 ext/dl/dl.h    # define DLSTACK_PROTO long,long,long,long,long,\


DLSTACK_PUSH_C

DLSTACK_PUSH_C    157 ext/dl/dl.h    #   define DLSTACK_PUSH_C(x) asm volatile ("pushl %0" :: "g" (x));
DLSTACK_PUSH_C    184 ext/dl/dl.h    # define DLSTACK_PUSH_C(x)  {long v=(long)x; memcpy(sp,&v,sizeof(long)); sp++;}


DLSTACK_PUSH_D

DLSTACK_PUSH_D    165 ext/dl/dl.h    #   define DLSTACK_PUSH_D(x) asm volatile ("fldl %0"::"g"(x));\
DLSTACK_PUSH_D    190 ext/dl/dl.h    # define DLSTACK_PUSH_D(x)  memcpy(sp,&x,sizeof(double)); sp+=sizeof(double)/sizeof(long);


DLSTACK_PUSH_F

DLSTACK_PUSH_F    162 ext/dl/dl.h    #   define DLSTACK_PUSH_F(x) asm volatile ("flds %0"::"g"(x));\
DLSTACK_PUSH_F    189 ext/dl/dl.h    # define DLSTACK_PUSH_F(x)  memcpy(sp,&x,sizeof(float)); sp+=sizeof(float)/sizeof(long);


DLSTACK_PUSH_H

DLSTACK_PUSH_H    158 ext/dl/dl.h    #   define DLSTACK_PUSH_H(x) asm volatile ("pushl %0" :: "g" (x));
DLSTACK_PUSH_H    185 ext/dl/dl.h    # define DLSTACK_PUSH_H(x)  {long v=(long)x; memcpy(sp,&v,sizeof(long)); sp++;}


DLSTACK_PUSH_I

DLSTACK_PUSH_I    159 ext/dl/dl.h    #   define DLSTACK_PUSH_I(x) asm volatile ("pushl %0" :: "g" (x));
DLSTACK_PUSH_I    186 ext/dl/dl.h    # define DLSTACK_PUSH_I(x)  {long v=(long)x; memcpy(sp,&v,sizeof(long)); sp++;}


DLSTACK_PUSH_L

DLSTACK_PUSH_L    160 ext/dl/dl.h    #   define DLSTACK_PUSH_L(x) asm volatile ("pushl %0" :: "g" (x));
DLSTACK_PUSH_L    187 ext/dl/dl.h    # define DLSTACK_PUSH_L(x)  memcpy(sp,&x,sizeof(long)); sp++;


DLSTACK_PUSH_P

DLSTACK_PUSH_P    161 ext/dl/dl.h    #   define DLSTACK_PUSH_P(x) asm volatile ("pushl %0" :: "g" (x));
DLSTACK_PUSH_P    188 ext/dl/dl.h    # define DLSTACK_PUSH_P(x)  memcpy(sp,&x,sizeof(void*)); sp++;


DLSTACK_START

DLSTACK_START     155 ext/dl/dl.h    #   define DLSTACK_START(sym)
DLSTACK_START     182 ext/dl/dl.h    # define DLSTACK_START(sym)


DLVOIDP

DLVOIDP            99 ext/dl/dl.h    # define DLVOIDP(x) ((int)x)
DLVOIDP           103 ext/dl/dl.h    # define DLVOIDP(x) ((long)x)
DLVOIDP           107 ext/dl/dl.h    # define DLVOIDP(x) ((void*)p)


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             90 defines.h      #define DOSISH 1
DOSISH           2299 file.c         #undef DOSISH


DOSISH_DRIVE_LETTER

DOSISH_DRIVE_LETTER   92 defines.h      # define DOSISH_DRIVE_LETTER
DOSISH_DRIVE_LETTER 2301 file.c         #define DOSISH_DRIVE_LETTER


DOSISH_UNC

DOSISH_UNC       2285 file.c         #define DOSISH_UNC
DOSISH_UNC       2300 file.c         #define DOSISH_UNC


DOUBLE_CONVWITH

DOUBLE_CONVWITH   309 pack.c         #define DOUBLE_CONVWITH(y)	DOUBLE_SWAPPER y;
DOUBLE_CONVWITH   327 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              77 win32/win32.c  #define Debug(something) something
Debug              79 win32/win32.c  #define Debug(something) /* nothing */


DeleteFile

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


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                19 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        67 ext/socket/socket.c #define EWOULDBLOCK EAGAIN
EWOULDBLOCK       331 win32/win32.h  #define EWOULDBLOCK	WSAEWOULDBLOCK


EXIT_FAILURE

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


EXIT_SUCCESS

EXIT_SUCCESS       29 error.c        #define EXIT_SUCCESS 0
EXIT_SUCCESS       25 eval.c         #define EXIT_SUCCESS 0
EXIT_SUCCESS       34 process.c      #define EXIT_SUCCESS 0


EXTEND16

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


EXTEND32

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


EXTERN

EXTERN            203 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             683 util.c         #define FALSE 0


FD_CLR

FD_CLR           1809 win32/win32.c  #undef FD_CLR
FD_CLR            390 win32/win32.h  #undef FD_CLR
FD_CLR            391 win32/win32.h  #define FD_CLR(f, s)		rb_w32_fdclr(f, s)


FD_ISSET

FD_ISSET         1829 win32/win32.c  #undef FD_ISSET
FD_ISSET          393 win32/win32.h  #undef FD_ISSET
FD_ISSET          394 win32/win32.h  #define FD_ISSET(f, s)		rb_w32_fdisset(f, s)


FD_PASSING_BY_MSG_ACCRIGHTS

FD_PASSING_BY_MSG_ACCRIGHTS 1660 ext/socket/socket.c #define FD_PASSING_BY_MSG_ACCRIGHTS 1
FD_PASSING_BY_MSG_ACCRIGHTS 1662 ext/socket/socket.c #define FD_PASSING_BY_MSG_ACCRIGHTS 0


FD_PASSING_BY_MSG_CONTROL

FD_PASSING_BY_MSG_CONTROL 1654 ext/socket/socket.c #define FD_PASSING_BY_MSG_CONTROL 1
FD_PASSING_BY_MSG_CONTROL 1656 ext/socket/socket.c #define FD_PASSING_BY_MSG_CONTROL 0


FD_SET

FD_SET           1788 win32/win32.c  #undef FD_SET
FD_SET            387 win32/win32.h  #undef FD_SET
FD_SET            388 win32/win32.h  #define FD_SET(f, s)		rb_w32_fdset(f, s)


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           253 ruby.h         #define FIX2INT(x) rb_fix2int((VALUE)x)
FIX2INT           261 ruby.h         #define FIX2INT(x) ((int)FIX2LONG(x))


FIX2UINT

FIX2UINT          257 ruby.h         #define FIX2UINT(x) rb_fix2uint(x)
FIX2UINT          262 ruby.h         #define FIX2UINT(x) ((unsigned int)FIX2ULONG(x))


FLOAT_CONVWITH

FLOAT_CONVWITH    283 pack.c         #define FLOAT_CONVWITH(y)	FLOAT_SWAPPER y;
FLOAT_CONVWITH    301 pack.c         #define FLOAT_CONVWITH(y)


FLOAT_DIG

FLOAT_DIG         291 marshal.c      #define FLOAT_DIG (DBL_DIG+2)
FLOAT_DIG         293 marshal.c      #define FLOAT_DIG 17


FLUSH_REGISTER_WINDOWS

FLUSH_REGISTER_WINDOWS  223 defines.h      #  define FLUSH_REGISTER_WINDOWS flush_register_windows()
FLUSH_REGISTER_WINDOWS  230 defines.h      #  define FLUSH_REGISTER_WINDOWS flush_register_windows()
FLUSH_REGISTER_WINDOWS  232 defines.h      #  define FLUSH_REGISTER_WINDOWS ((void)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_ARGS

FREE_ARGS         469 ext/dl/sym.c   #define FREE_ARGS {xfree(args); xfree(dargs); xfree(dtypes);}
FREE_ARGS         945 ext/dl/sym.c   #undef FREE_ARGS


FREE_ENVIRON

FREE_ENVIRON     1613 hash.c         #define FREE_ENVIRON(e) rb_w32_free_environ(e)
FREE_ENVIRON     1621 hash.c         #define FREE_ENVIRON(e)
FREE_ENVIRON     1625 hash.c         #define FREE_ENVIRON(e)


FREE_VARIABLES

FREE_VARIABLES    105 regex.c        #define FREE_VARIABLES() alloca(0)
FREE_VARIABLES    107 regex.c        #define FREE_VARIABLES()


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  141 eval.c         #define FUNCTION_CALL_MAY_RETURN_TWICE \
FUNCTION_CALL_MAY_RETURN_TWICE  149 eval.c         #define FUNCTION_CALL_MAY_RETURN_TWICE \


F_SETFL

F_SETFL           369 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    1160 dln.c          #undef FormatMessage
FormatMessage    1161 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    81 gc.c           #define GC_MALLOC_LIMIT 200000
GC_MALLOC_LIMIT    83 gc.c           #define GC_MALLOC_LIMIT 8000000


GET_ENVIRON

GET_ENVIRON      1612 hash.c         #define GET_ENVIRON(e) (e = rb_w32_get_environ())
GET_ENVIRON      1620 hash.c         #define GET_ENVIRON(e) (e)
GET_ENVIRON      1624 hash.c         #define GET_ENVIRON(e) (e)


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])


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   1164 dln.c          #undef GetProcAddress
GetProcAddress   1165 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_NATIVETHREAD

HAVE_NATIVETHREAD  692 ruby.h         # define HAVE_NATIVETHREAD
HAVE_NATIVETHREAD  697 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    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   22 util.h         #  define HAVE_STDARG_PROTOTYPES 1
HAVE_STDARG_PROTOTYPES    8 vms/config.h   #define HAVE_STDARG_PROTOTYPES 1


HEAPCNT

HEAPCNT          10238 parse.c        #define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE))
HEAPCNT          6240 parse.y        #define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE))


HTOND

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


HTONF

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


HTOVD

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


HTOVF

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


HZ

HZ               3329 process.c      #   define HZ CLK_TCK
HZ               3331 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        11431 eval.c         # define IA64_INIT(x) x
IA64_INIT        11433 eval.c         # define IA64_INIT(x)


ICONV_INPTR_CAST

ICONV_INPTR_CAST  248 ext/iconv/iconv.c #define ICONV_INPTR_CAST
ICONV_INPTR_CAST  250 ext/iconv/iconv.c #define ICONV_INPTR_CAST (char **)


ID_ATTRSET

ID_ATTRSET        152 parse.c        #define ID_ATTRSET  0x04
ID_ATTRSET         55 parse.y        #define ID_ATTRSET  0x04


ID_CLASS

ID_CLASS          154 parse.c        #define ID_CLASS    0x06
ID_CLASS           57 parse.y        #define ID_CLASS    0x06


ID_CONST

ID_CONST          153 parse.c        #define ID_CONST    0x05
ID_CONST           56 parse.y        #define ID_CONST    0x05


ID_GLOBAL

ID_GLOBAL         151 parse.c        #define ID_GLOBAL   0x03
ID_GLOBAL          54 parse.y        #define ID_GLOBAL   0x03


ID_INSTANCE

ID_INSTANCE       150 parse.c        #define ID_INSTANCE 0x02
ID_INSTANCE        53 parse.y        #define ID_INSTANCE 0x02


ID_INTERNAL

ID_INTERNAL       156 parse.c        #define ID_INTERNAL ID_JUNK
ID_INTERNAL        59 parse.y        #define ID_INTERNAL ID_JUNK


ID_JUNK

ID_JUNK           155 parse.c        #define ID_JUNK     0x07
ID_JUNK            58 parse.y        #define ID_JUNK     0x07


ID_LOCAL

ID_LOCAL          149 parse.c        #define ID_LOCAL    0x01
ID_LOCAL           52 parse.y        #define ID_LOCAL    0x01


ID_SCOPE_MASK

ID_SCOPE_MASK     148 parse.c        #define ID_SCOPE_MASK 0x07
ID_SCOPE_MASK      51 parse.y        #define ID_SCOPE_MASK 0x07


ID_SCOPE_SHIFT

ID_SCOPE_SHIFT    147 parse.c        #define ID_SCOPE_SHIFT 3
ID_SCOPE_SHIFT     50 parse.y        #define ID_SCOPE_SHIFT 3


IN_MAIN_CONTEXT

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


ISALNUM

ISALNUM           258 regex.c        #define ISALNUM(c) (ISASCII(c) && isalnum(c))
ISALNUM            52 ruby.h         #define ISALNUM(c) (ISASCII(c) && isalnum((int)(unsigned char)(c)))


ISALPHA

ISALPHA           259 regex.c        #define ISALPHA(c) (ISASCII(c) && isalpha(c))
ISALPHA            53 ruby.h         #define ISALPHA(c) (ISASCII(c) && isalpha((int)(unsigned char)(c)))


ISASCII

ISASCII           237 regex.c        #undef ISASCII
ISASCII           239 regex.c        # define ISASCII(c) 1
ISASCII           241 regex.c        # define ISASCII(c) isascii(c)
ISASCII            46 ruby.h         #define ISASCII(c) isascii((int)(unsigned char)(c))


ISBLANK

ISBLANK           245 regex.c        # define ISBLANK(c) (ISASCII(c) && isblank(c))
ISBLANK           247 regex.c        # define ISBLANK(c) ((c) == ' ' || (c) == '\t')


ISDIGIT

ISDIGIT           257 regex.c        #define ISDIGIT(c) (ISASCII(c) && isdigit(c))
ISDIGIT            54 ruby.h         #define ISDIGIT(c) (ISASCII(c) && isdigit((int)(unsigned char)(c)))


ISGRAPH

ISGRAPH           250 regex.c        # define ISGRAPH(c) (ISASCII(c) && isgraph(c))
ISGRAPH           252 regex.c        # define ISGRAPH(c) (ISASCII(c) && isprint(c) && !isspace(c))


ISLOWER

ISLOWER           261 regex.c        #define ISLOWER(c) (ISASCII(c) && islower(c))
ISLOWER            51 ruby.h         #define ISLOWER(c) (ISASCII(c) && islower((int)(unsigned char)(c)))


ISPRINT

ISPRINT           255 regex.c        #undef ISPRINT
ISPRINT           256 regex.c        #define ISPRINT(c) (ISASCII(c) && isprint(c))
ISPRINT            47 ruby.h         #undef ISPRINT
ISPRINT            48 ruby.h         #define ISPRINT(c) (ISASCII(c) && isprint((int)(unsigned char)(c)))


ISSPACE

ISSPACE           263 regex.c        #define ISSPACE(c) (ISASCII(c) && isspace(c))
ISSPACE            49 ruby.h         #define ISSPACE(c) (ISASCII(c) && isspace((int)(unsigned char)(c)))


ISUPPER

ISUPPER           264 regex.c        #define ISUPPER(c) (ISASCII(c) && isupper(c))
ISUPPER            50 ruby.h         #define ISUPPER(c) (ISASCII(c) && isupper((int)(unsigned char)(c)))


ISXDIGIT

ISXDIGIT          265 regex.c        #define ISXDIGIT(c) (ISASCII(c) && isxdigit(c))
ISXDIGIT           55 ruby.h         #define ISXDIGIT(c) (ISASCII(c) && isxdigit((int)(unsigned char)(c)))


IS_ARG

IS_ARG           7344 parse.c        #define IS_ARG() (lex_state == EXPR_ARG || lex_state == EXPR_CMDARG)
IS_ARG           3346 parse.y        #define IS_ARG() (lex_state == EXPR_ARG || lex_state == EXPR_CMDARG)


IS_DLEXT

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


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()


Init_sym

Init_sym         9875 parse.c        Init_sym()
Init_sym         5877 parse.y        Init_sym()


LEAVE_BS

LEAVE_BS         6498 parse.c        #define LEAVE_BS 1
LEAVE_BS         2500 parse.y        #define LEAVE_BS 1


LGCHUNKBITS

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


LK_ERR

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


LLONG_MAX

LLONG_MAX         105 ruby.h         #   define LLONG_MAX  LONG_LONG_MAX
LLONG_MAX         108 ruby.h         #    define LLONG_MAX _I64_MAX
LLONG_MAX         111 ruby.h         #    define LLONG_MAX 9223372036854775807LL


LLONG_MIN

LLONG_MIN         117 ruby.h         #   define LLONG_MIN  LONG_LONG_MIN
LLONG_MIN         120 ruby.h         #    define LLONG_MIN _I64_MIN
LLONG_MIN         122 ruby.h         #    define LLONG_MIN (-LLONG_MAX-1)


LOCK_EX

LOCK_EX          3096 file.c         #  define LOCK_EX 2
LOCK_EX            12 missing/flock.c #  define LOCK_EX 2
LOCK_EX            83 missing/flock.c #  define LOCK_EX 2
LOCK_EX           314 win32/win32.h  #define LOCK_EX 2


LOCK_NB

LOCK_NB          3099 file.c         #  define LOCK_NB 4
LOCK_NB            15 missing/flock.c #  define LOCK_NB 4
LOCK_NB            86 missing/flock.c #  define LOCK_NB 4
LOCK_NB           315 win32/win32.h  #define LOCK_NB 4


LOCK_SH

LOCK_SH          3093 file.c         #  define LOCK_SH 1
LOCK_SH             9 missing/flock.c #  define LOCK_SH 1
LOCK_SH            80 missing/flock.c #  define LOCK_SH 1
LOCK_SH           313 win32/win32.h  #define LOCK_SH 1


LOCK_UN

LOCK_UN          3102 file.c         #  define LOCK_UN 8
LOCK_UN            18 missing/flock.c #  define LOCK_UN 8
LOCK_UN            89 missing/flock.c #  define LOCK_UN 8
LOCK_UN           316 win32/win32.h  #define LOCK_UN 8


LONG2NUM

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


LONG_LONG

LONG_LONG          55 defines.h      # define LONG_LONG long long
LONG_LONG          58 defines.h      # define LONG_LONG __int64


LONG_MAX

LONG_MAX           93 missing/vsnprintf.c #   define LONG_MAX 2147483647
LONG_MAX           91 ruby.h         #   define LONG_MAX 2147483647


LoadLibrary

LoadLibrary      1162 dln.c          #undef LoadLibrary
LoadLibrary      1163 dln.c          #define LoadLibrary LoadLibraryA


M

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


MANT_BITS

MANT_BITS         212 marshal.c      #define MANT_BITS 32
MANT_BITS         214 marshal.c      #define MANT_BITS 24
MANT_BITS         216 marshal.c      #define MANT_BITS 16
MANT_BITS         218 marshal.c      #define MANT_BITS 8


MARK_FRAME_ADJ

MARK_FRAME_ADJ   9892 eval.c         # define MARK_FRAME_ADJ(f) rb_gc_mark_frame(f)
MARK_FRAME_ADJ   9894 eval.c         # define MARK_FRAME_ADJ(f) mark_frame_adj(f, th)


MAXPATHLEN

MAXPATHLEN         65 dln.c          # define MAXPATHLEN 1024
MAXPATHLEN         39 file.c         # define MAXPATHLEN 1024
MAXPATHLEN       1035 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))


MODE_BINARY

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


MODE_BINMODE

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


MTHREAD_ONLY

MTHREAD_ONLY     1542 win32/win32.c  # define MTHREAD_ONLY(x) x
MTHREAD_ONLY     1545 win32/win32.c  # define MTHREAD_ONLY(x)
MTHREAD_ONLY     1548 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                 175 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  690 ruby.h         # define NATIVETHREAD_CURRENT() pthread_self()
NATIVETHREAD_CURRENT  695 ruby.h         # define NATIVETHREAD_CURRENT() GetCurrentThreadId()


NATIVETHREAD_EQUAL

NATIVETHREAD_EQUAL  691 ruby.h         # define NATIVETHREAD_EQUAL(t1,t2) pthread_equal((t1),(t2))
NATIVETHREAD_EQUAL  696 ruby.h         # define NATIVETHREAD_EQUAL(t1,t2) ((t1) == (t2))


NEWHEAP

NEWHEAP          10239 parse.c        #define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser_heap, 0)
NEWHEAP          6241 parse.y        #define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser_heap, 0)


NEW_STRTERM

NEW_STRTERM      7107 parse.c        #define NEW_STRTERM(func, term, paren) \
NEW_STRTERM      3109 parse.y        #define NEW_STRTERM(func, term, paren) \


NGROUPS

NGROUPS           829 file.c         #    define NGROUPS NGROUPS_MAX
NGROUPS           831 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                 94 ext/socket/getaddrinfo.c #define NO  0
NO                 79 ext/socket/getnameinfo.c #define NO  0


NODE_HEREDOC

NODE_HEREDOC      283 parse.c        #define NODE_HEREDOC NODE_ARRAY 	/* 1, 3 to gc */
NODE_HEREDOC      186 parse.y        #define NODE_HEREDOC NODE_ARRAY 	/* 1, 3 to gc */


NODE_STRTERM

NODE_STRTERM      282 parse.c        #define NODE_STRTERM NODE_ZARRAY	/* nothing to gc */
NODE_STRTERM      185 parse.y        #define NODE_STRTERM NODE_ZARRAY	/* nothing to gc */


NOFILE

NOFILE             71 io.c           # define NOFILE 64
NOFILE             88 io.c           #  define NOFILE (OPEN_MAX)


NONBLOCKING

NONBLOCKING       951 ext/socket/socket.c # define NONBLOCKING O_NDELAY
NONBLOCKING       954 ext/socket/socket.c # define NONBLOCKING O_NBIO
NONBLOCKING       956 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             318 pack.c         #define NTOHD(x,y)	(memcpy(&y,&x,sizeof(double)),	\
NTOHD             330 pack.c         #define NTOHD(x,y)	ntohd(x)


NTOHF

NTOHF             292 pack.c         #define NTOHF(x,y)	(memcpy(&y,&x,sizeof(float)),	\
NTOHF             304 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              110 missing/vsnprintf.c #define	NULL	0
NULL              268 regex.c        # define NULL (void *)0


NUM2INT

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


NUM2OFFT

NUM2OFFT          272 ruby.h         # define NUM2OFFT(x) ((off_t)NUM2LL(x))
NUM2OFFT          274 ruby.h         # define NUM2OFFT(x) NUM2LONG(x)


NUM2UINT

NUM2UINT          255 ruby.h         #define NUM2UINT(x) rb_num2uint(x)
NUM2UINT          260 ruby.h         #define NUM2UINT(x) ((unsigned int)NUM2ULONG(x))


N_INET

N_INET            130 ext/socket/getaddrinfo.c #define N_INET  1
N_INET            132 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           125 ext/socket/getaddrinfo.c #define N_INET6 0
N_INET6            94 ext/socket/getnameinfo.c #define N_INET6 0


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          152 ruby.h         # define OFFT2NUM(v) LL2NUM(v)
OFFT2NUM          154 ruby.h         # define OFFT2NUM(v) INT2NUM(v)


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        163 ext/openssl/ossl.h #define OSSL_Debug(fmt, ...) do { \
OSSL_Debug        182 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   99 ext/openssl/ossl_ssl.c #define OSSL_SSL_METHOD_ENTRY(name) { #name, name##_method }
OSSL_SSL_METHOD_ENTRY  112 ext/openssl/ossl_ssl.c #undef OSSL_SSL_METHOD_ENTRY


OSSL_Warn

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


OSSL_Warning

OSSL_Warning      171 ext/openssl/ossl.h #define OSSL_Warning(fmt, ...) do { \
OSSL_Warning      183 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          96 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        370 win32/win32.h  #define O_NONBLOCK 1
O_NONBLOCK         31 wince/fcntl.h  #define O_NONBLOCK      _O_NONBLOCK


OpenFile

OpenFile           32 ext/openssl/ossl.h #  define OpenFile WINAPI_OpenFile
OpenFile           57 ext/openssl/ossl.h #  undef OpenFile
OpenFile           31 rubyio.h       } OpenFile;
OpenFile           24 win32/win32.h  #define OpenFile  WINAPI_OpenFile
OpenFile           32 win32/win32.h  #undef OpenFile


PACK_LENGTH_ADJUST

PACK_LENGTH_ADJUST 1140 pack.c         #define PACK_LENGTH_ADJUST(type,sz) do {	\
PACK_LENGTH_ADJUST 1145 pack.c         #define PACK_LENGTH_ADJUST(type,sz) 		\


PARAMS

PARAMS             41 regex.c        #  define PARAMS(args) args
PARAMS             43 regex.c        #  define PARAMS(args) ()


PATH_ENV

PATH_ENV          245 defines.h      #define PATH_ENV "path"
PATH_ENV          247 defines.h      #define PATH_ENV "PATH"


PATH_SEP

PATH_SEP          236 defines.h      #define PATH_SEP ";"
PATH_SEP          238 defines.h      #define PATH_SEP ","
PATH_SEP          240 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          105 io.c           #  define PIPE_BUF _POSIX_PIPE_BUF
PIPE_BUF          107 io.c           #  define PIPE_BUF 512 /* is this ok? */
PIPE_BUF          311 win32/win32.h  #define PIPE_BUF 1024


POP

POP               132 ext/racc/cparse/cparse.c #define POP(s) rb_ary_pop(s)
POP               467 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


PROTO

PROTO             269 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          142 ext/socket/getaddrinfo.c #define PTON_MAX	16
PTON_MAX          144 ext/socket/getaddrinfo.c #define PTON_MAX	4


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               93 sprintf.c      #define PUSH(s, l) do { \
PUSH              466 util.c         #define PUSH(ll,rr) do { top->LL = (ll); top->RR = (rr); ++top; } while (0)  /* Push L,l,R,r */


PUSH_C

PUSH_C            111 ext/dl/dl.h    # define PUSH_C(x) PUSH_ARG(x,CHAR_DLTYPE)
PUSH_C            115 ext/dl/dl.h    # define PUSH_C(x) PUSH_I(x)


PUSH_F

PUSH_F             79 ext/dl/dl.h    #   define PUSH_F(x) PUSH_ARG(x,DOUBLE_DLTYPE)
PUSH_F             83 ext/dl/dl.h    #   define PUSH_F(x) PUSH_ARG(x,FLOAT_DLTYPE)
PUSH_F             88 ext/dl/dl.h    # define PUSH_F(x) PUSH_ARG(x,DOUBLE_DLTYPE)


PUSH_H

PUSH_H            121 ext/dl/dl.h    # define PUSH_H(x) PUSH_ARG(x,SHORT_DLTYPE)
PUSH_H            125 ext/dl/dl.h    # define PUSH_H(x) PUSH_I(x)


PUSH_I

PUSH_I             65 ext/dl/dl.h    # define PUSH_I(x) PUSH_ARG(x,LONG_DLTYPE)
PUSH_I             69 ext/dl/dl.h    # define PUSH_I(x) PUSH_ARG(x,INT_DLTYPE)


PUSH_P

PUSH_P             97 ext/dl/dl.h    # define PUSH_P(x) PUSH_ARG(x,INT_DLTYPE)
PUSH_P            101 ext/dl/dl.h    # define PUSH_P(x) PUSH_ARG(x,LONG_DLTYPE)
PUSH_P            105 ext/dl/dl.h    # define PUSH_P(x) PUSH_ARG(x,VOIDP_DLTYPE)


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))


QUAD_SIZE

QUAD_SIZE         261 bignum.c       #define QUAD_SIZE 8
QUAD_SIZE         363 pack.c         # define QUAD_SIZE sizeof(LONG_LONG)
QUAD_SIZE         365 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


READ_DATA_BUFFERED

READ_DATA_BUFFERED  158 io.c           #  define READ_DATA_BUFFERED(fp) 0
READ_DATA_BUFFERED  163 io.c           #  define READ_DATA_BUFFERED(fp) 0
READ_DATA_BUFFERED  166 io.c           #  define READ_DATA_BUFFERED(fp) READ_DATA_PENDING(fp)


READ_DATA_PENDING

READ_DATA_PENDING  139 io.c           #    define READ_DATA_PENDING(fp) ((fp)->_IO_read_ptr != (fp)->_IO_read_end)
READ_DATA_PENDING  143 io.c           #    define READ_DATA_PENDING(fp) ((fp)->_gptr < (fp)->_egptr)
READ_DATA_PENDING  148 io.c           #  define READ_DATA_PENDING(fp) ((fp)->FILE_COUNT > 0)
READ_DATA_PENDING  151 io.c           #  define READ_DATA_PENDING(fp) ((fp)->FILE_READPTR < (fp)->FILE_READEND)
READ_DATA_PENDING  154 io.c           #  define READ_DATA_PENDING(fp) (fp->_state._eof == 0)
READ_DATA_PENDING  157 io.c           #  define READ_DATA_PENDING(fp)       (((unsigned int)(*(fp))->_cnt) > 0)
READ_DATA_PENDING  162 io.c           #  define READ_DATA_PENDING(fp) (!feof(fp))


READ_DATA_PENDING_COUNT

READ_DATA_PENDING_COUNT  140 io.c           #    define READ_DATA_PENDING_COUNT(fp) ((fp)->_IO_read_end - (fp)->_IO_read_ptr)
READ_DATA_PENDING_COUNT  144 io.c           #    define READ_DATA_PENDING_COUNT(fp) ((fp)->_egptr - (fp)->_gptr)
READ_DATA_PENDING_COUNT  149 io.c           #  define READ_DATA_PENDING_COUNT(fp) ((fp)->FILE_COUNT)
READ_DATA_PENDING_COUNT  152 io.c           #  define READ_DATA_PENDING_COUNT(fp) ((fp)->FILE_READEND - (fp)->FILE_READPTR)
READ_DATA_PENDING_COUNT  156 io.c           #  define READ_DATA_PENDING_COUNT(fp) ((unsigned int)(*(fp))->_cnt)
READ_DATA_PENDING_COUNT  176 io.c           # undef READ_DATA_PENDING_COUNT


READ_DATA_PENDING_PTR

READ_DATA_PENDING_PTR  141 io.c           #    define READ_DATA_PENDING_PTR(fp) ((fp)->_IO_read_ptr)
READ_DATA_PENDING_PTR  145 io.c           #    define READ_DATA_PENDING_PTR(fp) ((fp)->_gptr)
READ_DATA_PENDING_PTR  171 io.c           #  define READ_DATA_PENDING_PTR(fp) ((char *)(fp)->FILE_READPTR)
READ_DATA_PENDING_PTR  177 io.c           # undef READ_DATA_PENDING_PTR


RELOC_MEMORY_SUB_P

RELOC_MEMORY_SUB_P  215 dln.c          #define RELOC_MEMORY_SUB_P(r)		((r)->r_bsr)
RELOC_MEMORY_SUB_P  225 dln.c          #define RELOC_MEMORY_SUB_P(r)		0


RELOC_PCREL_P

RELOC_PCREL_P     216 dln.c          #define RELOC_PCREL_P(r)		((r)->r_pcrel || (r)->r_bsr)
RELOC_PCREL_P     226 dln.c          #define RELOC_PCREL_P(r)		((r)->r_pcrel)


RELOC_SYMBOL

RELOC_SYMBOL      214 dln.c          #define RELOC_SYMBOL(r)			((r)->r_symbolnum)
RELOC_SYMBOL      224 dln.c          #define RELOC_SYMBOL(r)			((r)->r_symbolnum)


RELOC_TARGET_SIZE

RELOC_TARGET_SIZE  217 dln.c          #define RELOC_TARGET_SIZE(r)		((r)->r_length)
RELOC_TARGET_SIZE  227 dln.c          #define RELOC_TARGET_SIZE(r)		((r)->r_length)


RE_OPTION_ONCE

RE_OPTION_ONCE    280 parse.c        #define RE_OPTION_ONCE 0x80
RE_OPTION_ONCE    183 parse.y        #define RE_OPTION_ONCE 0x80


RFILE

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


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      1344 dln.c          # undef RTLD_GLOBAL
RTLD_GLOBAL      1347 dln.c          # define RTLD_GLOBAL 0
RTLD_GLOBAL        18 ext/dl/dl.h    #define RTLD_GLOBAL 0
RTLD_GLOBAL        32 ext/dl/dl.h    #   define RTLD_GLOBAL -1


RTLD_LAZY

RTLD_LAZY        1341 dln.c          # define RTLD_LAZY 1
RTLD_LAZY          15 ext/dl/dl.h    #define RTLD_LAZY 0
RTLD_LAZY          30 ext/dl/dl.h    #   define RTLD_LAZY -1


RTLD_NOW

RTLD_NOW           21 ext/dl/dl.h    #define RTLD_NOW 0
RTLD_NOW           31 ext/dl/dl.h    #   define RTLD_NOW  -1


RUBY

RUBY               13 defines.h      #define RUBY
RUBY               67 regex.c        # define RUBY


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       195 defines.h      #undef RUBY_EXTERN
RUBY_EXTERN       199 defines.h      #define RUBY_EXTERN extern


RUBY_PLATFORM

RUBY_PLATFORM     255 defines.h      #define RUBY_PLATFORM "unknown-unknown"
RUBY_PLATFORM      60 vms/config.h   #define RUBY_PLATFORM     "vax-vms"	/* OpenVMS VAX */
RUBY_PLATFORM      62 vms/config.h   #define RUBY_PLATFORM     "alpha-vms"	/* OpenVMS Alpha */
RUBY_PLATFORM      64 vms/config.h   #define RUBY_PLATFORM     "ia64-vms"	/* OpenVMS Industry Standard 64 */
RUBY_PLATFORM      66 vms/config.h   #define RUBY_PLATFORM     "unknown-vms"	/* unknown processor */


RUBY_RELATIVE

RUBY_RELATIVE     281 ruby.c         #define RUBY_RELATIVE(path) (strncpy(p, (path), rest), libpath)
RUBY_RELATIVE     283 ruby.c         #define RUBY_RELATIVE(path) (path)


RVALUE

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


R_LENGTH

R_LENGTH          236 dln.c          #  define R_LENGTH(r)		(reloc_r_length[(r)->r_type])
R_LENGTH          255 dln.c          #define R_LENGTH(r)		((r)->r_length)
R_LENGTH          262 dln.c          #  define R_LENGTH(r) 		((r)->r_length)


R_MEMORY_SUB

R_MEMORY_SUB      253 dln.c          #define R_MEMORY_SUB(r)		((r)->r_bsr)
R_MEMORY_SUB      260 dln.c          #  define R_MEMORY_SUB(r)	0


R_PCREL

R_PCREL           246 dln.c          #  define R_PCREL(r) \
R_PCREL           254 dln.c          #define R_PCREL(r)		((r)->r_pcrel || (r)->r_bsr)
R_PCREL           261 dln.c          #  define R_PCREL(r)  		((r)->r_pcrel)


R_SYMBOL

R_SYMBOL          248 dln.c          #  define R_SYMBOL(r) ((r)->r_index)
R_SYMBOL          252 dln.c          #define R_SYMBOL(r)		((r)->r_symbolnum)
R_SYMBOL          259 dln.c          #  define R_SYMBOL(r) 		((r)->r_symbolnum)


ResetSignal

ResetSignal        68 win32/win32.c  # define ResetSignal(ev) WSAResetEvent(ev)
ResetSignal        73 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 9567 eval.c         #undef SAVE_WIN32_EXCEPTION_LIST
SAVE_WIN32_EXCEPTION_LIST 9579 eval.c         #   define SAVE_WIN32_EXCEPTION_LIST
SAVE_WIN32_EXCEPTION_LIST 9589 eval.c         #   define SAVE_WIN32_EXCEPTION_LIST
SAVE_WIN32_EXCEPTION_LIST 9593 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   1395 ext/nkf/nkf-utf8/nkf.c #define SCORE_NO_EXIST (SCORE_CP932 << 1)    /* $BB8:_$7$J$$J8;z(B */
SCORE_NO_EXIST   1397 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          238 io.c           # define SEEK_SET 0


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 1097 eval.c         #define SET_CURRENT_SOURCE() (ruby_sourcefile = ruby_current_node->nd_file, \
SET_CURRENT_SOURCE 1100 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)


SET_STACK_END

SET_STACK_END     431 gc.c           # define SET_STACK_END VALUE stack_end; alloca(0);
SET_STACK_END     443 gc.c           #  define  SET_STACK_END    VALUE *stack_end = stack_end_address()
SET_STACK_END     445 gc.c           #  define  SET_STACK_END    VALUE *stack_end = alloca(1)


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           48 marshal.c      #define SHORTLEN(x) shortlen((x),d)


SIGINT

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


SIGN_EXTEND

SIGN_EXTEND       284 parse.c        #define SIGN_EXTEND(x,n) (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1))
SIGN_EXTEND       187 parse.y        #define SIGN_EXTEND(x,n) (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1))


SIGN_EXTEND_CHAR

SIGN_EXTEND_CHAR  823 marshal.c      #undef SIGN_EXTEND_CHAR
SIGN_EXTEND_CHAR  825 marshal.c      # define SIGN_EXTEND_CHAR(c) ((signed char)(c))
SIGN_EXTEND_CHAR  828 marshal.c      # define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128)
SIGN_EXTEND_CHAR 6486 parse.c        #undef SIGN_EXTEND_CHAR
SIGN_EXTEND_CHAR 6488 parse.c        # define SIGN_EXTEND_CHAR(c) ((signed char)(c))
SIGN_EXTEND_CHAR 6491 parse.c        # define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128)
SIGN_EXTEND_CHAR 2488 parse.y        #undef SIGN_EXTEND_CHAR
SIGN_EXTEND_CHAR 2490 parse.y        # define SIGN_EXTEND_CHAR(c) ((signed char)(c))
SIGN_EXTEND_CHAR 2493 parse.y        # define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128)
SIGN_EXTEND_CHAR  275 regex.c        #undef SIGN_EXTEND_CHAR
SIGN_EXTEND_CHAR  277 regex.c        # define SIGN_EXTEND_CHAR(c) ((signed char)(c))
SIGN_EXTEND_CHAR  280 regex.c        # 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     65 defines.h      # define SIZEOF_BDIGITS SIZEOF_INT
SIZEOF_BDIGITS     70 defines.h      # define SIZEOF_BDIGITS SIZEOF_INT
SIZEOF_BDIGITS     75 defines.h      # define SIZEOF_BDIGITS SIZEOF_SHORT
SIZEOF_BDIGITS     80 defines.h      # define SIZEOF_BDIGITS (SIZEOF_LONG/2)


SIZEOF_LONG_LONG

SIZEOF_LONG_LONG   59 defines.h      # undef SIZEOF_LONG_LONG
SIZEOF_LONG_LONG   60 defines.h      # define SIZEOF_LONG_LONG SIZEOF___INT64


SMALLBUF

SMALLBUF         1105 io.c           #define SMALLBUF 100
SMALLBUF         1743 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)))


SO_SYNCHRONOUS_NONALERT

SO_SYNCHRONOUS_NONALERT 1961 win32/win32.c  #define SO_SYNCHRONOUS_NONALERT 0x20
SO_SYNCHRONOUS_NONALERT   38 wince/wince.h  #define SO_SYNCHRONOUS_NONALERT 0x20


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_END

STACK_END         432 gc.c           # define STACK_END (&stack_end)
STACK_END         447 gc.c           # define STACK_END (stack_end)


STACK_LENGTH

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


STACK_LEVEL_MAX

STACK_LEVEL_MAX   422 gc.c           # define STACK_LEVEL_MAX (_stacksize - 4096)
STACK_LEVEL_MAX   427 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       460 gc.c           # define STACK_UPPER(x, a, b) a
STACK_UPPER       462 gc.c           # define STACK_UPPER(x, a, b) b
STACK_UPPER       475 gc.c           # define STACK_UPPER(x, a, b) (stack_growup_p(x) ? a : b)


STATIC

STATIC            270 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


STDMETHODIMP_

STDMETHODIMP_    5358 ext/win32ole/win32ole.c STDMETHODIMP_(ULONG)
STDMETHODIMP_    5366 ext/win32ole/win32ole.c STDMETHODIMP_(ULONG) EVENTSINK_Release(


STHREAD_ONLY

STHREAD_ONLY     1543 win32/win32.c  # define STHREAD_ONLY(x)
STHREAD_ONLY     1546 win32/win32.c  # define STHREAD_ONLY(x)
STHREAD_ONLY     1549 win32/win32.c  # define STHREAD_ONLY(x) x


STR_ASSOC

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


STR_FUNC_ESCAPE

STR_FUNC_ESCAPE  7002 parse.c        #define STR_FUNC_ESCAPE 0x01
STR_FUNC_ESCAPE  3004 parse.y        #define STR_FUNC_ESCAPE 0x01


STR_FUNC_EXPAND

STR_FUNC_EXPAND  7003 parse.c        #define STR_FUNC_EXPAND 0x02
STR_FUNC_EXPAND  3005 parse.y        #define STR_FUNC_EXPAND 0x02


STR_FUNC_INDENT

STR_FUNC_INDENT  7007 parse.c        #define STR_FUNC_INDENT 0x20
STR_FUNC_INDENT  3009 parse.y        #define STR_FUNC_INDENT 0x20


STR_FUNC_QWORDS

STR_FUNC_QWORDS  7005 parse.c        #define STR_FUNC_QWORDS 0x08
STR_FUNC_QWORDS  3007 parse.y        #define STR_FUNC_QWORDS 0x08


STR_FUNC_REGEXP

STR_FUNC_REGEXP  7004 parse.c        #define STR_FUNC_REGEXP 0x04
STR_FUNC_REGEXP  3006 parse.y        #define STR_FUNC_REGEXP 0x04


STR_FUNC_SYMBOL

STR_FUNC_SYMBOL  7006 parse.c        #define STR_FUNC_SYMBOL 0x10
STR_FUNC_SYMBOL  3008 parse.y        #define STR_FUNC_SYMBOL 0x10


SUCCESS

SUCCESS            91 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          168 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           111 defines.h      #define S_IRGRP 0000040        /* read permission, group */
S_IRGRP           262 win32/win32.h  #define S_IRGRP 0040


S_IROTH

S_IROTH           114 defines.h      #define S_IROTH 0000004        /* read permission, other */
S_IROTH           265 win32/win32.h  #define S_IROTH 0004


S_IRUSR

S_IRUSR           108 defines.h      #define S_IRUSR 0000400        /* read permission, owner */
S_IRUSR           259 win32/win32.h  #define S_IRUSR 0400


S_ISBLK

S_ISBLK           144 defines.h      #define S_ISBLK(mode)  (((mode) & (0170000)) == (0060000))
S_ISBLK          1053 file.c         #	define S_ISBLK(m) ((m & S_IFMT) == S_IFBLK)
S_ISBLK          1055 file.c         #	define S_ISBLK(m) (0)  /* anytime false */
S_ISBLK           248 win32/win32.h  #undef S_ISBLK
S_ISBLK           253 win32/win32.h  #define S_ISBLK(m)  (((unsigned short)(m) & S_IFMT) == S_IFBLK)


S_ISCHR

S_ISCHR           147 defines.h      #define S_ISCHR(mode)  (((mode) & (0170000)) == (0020000))
S_ISCHR          1080 file.c         #   define S_ISCHR(m) ((m & S_IFMT) == S_IFCHR)
S_ISCHR           249 win32/win32.h  #undef S_ISCHR
S_ISCHR           254 win32/win32.h  #define S_ISCHR(m)  (((unsigned short)(m) & S_IFMT) == S_IFCHR)


S_ISDIR

S_ISDIR           150 defines.h      #define S_ISDIR(mode)  (((mode) & (0170000)) == (0040000))
S_ISDIR           881 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           918 file.c         #   define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
S_ISDIR            75 util.c         #   define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
S_ISDIR           246 win32/win32.h  #undef S_ISDIR
S_ISDIR           251 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          153 defines.h      #define S_ISFIFO(mode) (((mode) & (0170000)) == (0010000))
S_ISFIFO          941 file.c         #    define S_ISFIFO(m) ((m & S_IFMT) == S_IFIFO)
S_ISFIFO          247 win32/win32.h  #undef S_ISFIFO
S_ISFIFO          252 win32/win32.h  #define S_ISFIFO(m) (((unsigned short)(m) & S_IFMT) == S_IFIFO)


S_ISLNK

S_ISLNK           966 file.c         #    define S_ISLNK(m) _S_ISLNK(m)
S_ISLNK           969 file.c         #      define S_ISLNK(m) (((unsigned short)(m) & S_IFMT) == _S_IFLNK)
S_ISLNK           972 file.c         #        define S_ISLNK(m) (((unsigned short)(m) & S_IFMT) == S_IFLNK)
S_ISLNK           977 file.c         #      define S_ISLNK(m) ((m & S_IFMT) == _S_IFLNK)
S_ISLNK           980 file.c         #	 define S_ISLNK(m) ((m & S_IFMT) == S_IFLNK)


S_ISREG

S_ISREG           156 defines.h      #define S_ISREG(mode)  (((mode) & (0170000)) == (0100000))
S_ISREG          1214 file.c         #   define S_ISREG(m) ((m & S_IFMT) == S_IFREG)
S_ISREG           406 io.c           #   define S_ISREG(m) ((m & S_IFMT) == S_IFREG)
S_ISREG           250 win32/win32.h  #undef S_ISREG
S_ISREG           255 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         1010 file.c         #    define S_ISSOCK(m) _S_ISSOCK(m)
S_ISSOCK         1013 file.c         #      define S_ISSOCK(m) (((unsigned short)(m) & S_IFMT) == _S_IFSOCK)
S_ISSOCK         1016 file.c         #        define S_ISSOCK(m) (((unsigned short)(m) & S_IFMT) == S_IFSOCK)
S_ISSOCK         1021 file.c         #      define S_ISSOCK(m) ((m & S_IFMT) == _S_IFSOCK)
S_ISSOCK         1024 file.c         #	 define S_ISSOCK(m) ((m & S_IFMT) == S_IFSOCK)


S_IWGRP

S_IWGRP           120 defines.h      #define S_IWGRP 0000020        /* write permission, group */
S_IWGRP           272 win32/win32.h  #define S_IWGRP 0020


S_IWOTH

S_IWOTH           123 defines.h      #define S_IWOTH 0000002        /* write permission, other */
S_IWOTH          4069 file.c         # define S_IWOTH 002
S_IWOTH           275 win32/win32.h  #define S_IWOTH 0002


S_IWUSR

S_IWUSR           117 defines.h      #define S_IWUSR 0000200        /* write permission, owner */
S_IWUSR           269 win32/win32.h  #define S_IWUSR 0200


S_IXGRP

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


S_IXOTH

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


S_IXUSR

S_IXUSR           126 defines.h      #define S_IXUSR 0000100        /* execute/search permission, owner */
S_IXUSR           279 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          67 win32/win32.c  # define SetSignal(ev) WSASetEvent(ev)
SetSignal          72 win32/win32.c  # define SetSignal(ev) SetEvent(ev)


Sleep

Sleep            2989 win32/win32.c  #undef Sleep
Sleep             538 win32/win32.h  #define Sleep(msec) (void)rb_w32_sleep(msec)


StringValue

StringValue        37 ext/dl/dl.h    # define StringValue(v) if(TYPE(v) != T_STRING) v = rb_str_to_str(v)
StringValue       226 ruby.h         #define StringValue(v) rb_string_value(&(v))


StringValuePtr

StringValuePtr     40 ext/dl/dl.h    # define StringValuePtr(v) RSTRING((TYPE(v) == T_STRING) ? (v) : rb_str_to_str(v))->ptr
StringValuePtr    227 ruby.h         #define StringValuePtr(v) rb_string_value_ptr(&(v))


TAG_BREAK

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


TAG_FATAL

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


TAG_NEXT

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


TAG_RAISE

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


TAG_REDO

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


TAG_RETRY

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


TAG_RETURN

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


TAG_THROW

TAG_THROW        1003 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"


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      2157 eval.c         # define TMP_PROTECT NODE * volatile tmp__protect_tmp=0
TMP_PROTECT      2163 eval.c         # define TMP_PROTECT typedef int foobazzz


TOLOWER

TOLOWER            28 ext/readline/readline.c #define TOLOWER(c) (isupper(c) ? tolower(c) : c)
TOLOWER          2450 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          82 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              682 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            212 ruby.h         #define T_MASK   0x3f


T_SYMBOL

T_SYMBOL           15 ext/dl/ptr.c   # define T_SYMBOL T_FIXNUM
T_SYMBOL          204 ruby.h         #define T_SYMBOL 0x24


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             228 ext/win32ole/win32ole.c static ULONG ( STDMETHODCALLTYPE AddRef )(
ULONG             235 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


VISI_CHECK

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


VTOHD

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


VTOHF

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


V_BOOL

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


V_UNION

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


V_UNION1

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


V_VT

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


WAIT_IN_PROGRESS

WAIT_IN_PROGRESS  915 ext/socket/socket.c #define WAIT_IN_PROGRESS 10
WAIT_IN_PROGRESS  918 ext/socket/socket.c #define WAIT_IN_PROGRESS 10
WAIT_IN_PROGRESS  922 ext/socket/socket.c #define WAIT_IN_PROGRESS 0
WAIT_IN_PROGRESS  926 ext/socket/socket.c #define WAIT_IN_PROGRESS 1


WIFSTOPPED

WIFSTOPPED         21 ext/pty/pty.c  #define WIFSTOPPED(status)    (((status) & 0xff) == 0x7f)
WIFSTOPPED         73 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              78 win32/win32.h  # define WIN95 1
WIN95              80 win32/win32.h  # undef  WIN95


WNOHANG

WNOHANG           171 defines.h      #define WNOHANG 01
WNOHANG          2446 win32/win32.c  #define WNOHANG -1
WNOHANG            92 win32/win32.h  #define WNOHANG -1


WORDS_BIGENDIAN

WORDS_BIGENDIAN   161 defines.h      #undef WORDS_BIGENDIAN
WORDS_BIGENDIAN   163 defines.h      #define WORDS_BIGENDIAN


WaitForMultipleEvents

WaitForMultipleEvents   65 win32/win32.c  # define WaitForMultipleEvents WSAWaitForMultipleEvents
WaitForMultipleEvents   70 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              177 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                93 ext/socket/getaddrinfo.c #define YES 1
YES                78 ext/socket/getnameinfo.c #define YES 1


YYABORT

YYABORT           610 ext/syck/gram.c #define YYABORT		goto yyabortlab
YYABORT          3119 parse.c        #define YYABORT 	goto yyabortlab


YYACCEPT

YYACCEPT          609 ext/syck/gram.c #define YYACCEPT	goto yyacceptlab
YYACCEPT         3118 parse.c        #define YYACCEPT	goto yyacceptlab


YYBACKUP

YYBACKUP          622 ext/syck/gram.c #define YYBACKUP(Token, Value)					\
YYBACKUP         3126 parse.c        #define YYBACKUP(Token, Value)					\


YYBISON

YYBISON            37 ext/syck/gram.c #define YYBISON 1
YYBISON             4 parse.c        #define YYBISON 1  /* Identify Bison output.  */


YYCALLOC

YYCALLOC          129 parse.c        #define YYCALLOC	rb_parser_calloc
YYCALLOC           32 parse.y        #define YYCALLOC	rb_parser_calloc


YYCOPY

YYCOPY            216 ext/syck/gram.c #   define YYCOPY(To, From, Count) \
YYCOPY            219 ext/syck/gram.c #   define YYCOPY(To, From, Count)		\
YYCOPY           3065 parse.c        #   define YYCOPY(To, From, Count) \
YYCOPY           3068 parse.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           112 parse.c        #define YYDEBUG 1
YYDEBUG           316 parse.c        # define YYDEBUG 0
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)
YYDPRINTF        3190 parse.c        # define YYDPRINTF(Args)			\
YYDPRINTF        3199 parse.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)


YYEMPTY

YYEMPTY           606 ext/syck/gram.c #define YYEMPTY		(-2)
YYEMPTY          3116 parse.c        #define YYEMPTY		-2


YYEOF

YYEOF             607 ext/syck/gram.c #define YYEOF		0
YYEOF            3117 parse.c        #define YYEOF		0


YYERRCODE

YYERRCODE         640 ext/syck/gram.c #define YYERRCODE	256
YYERRCODE        3144 parse.c        #define YYERRCODE	256


YYERROR

YYERROR           611 ext/syck/gram.c #define YYERROR		goto yyerrorlab
YYERROR          3120 parse.c        #define YYERROR		goto yyerrlab1


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   113 parse.c        #define YYERROR_VERBOSE 1
YYERROR_VERBOSE    16 parse.y        #define YYERROR_VERBOSE 1


YYFAIL

YYFAIL            618 ext/syck/gram.c #define YYFAIL		goto yyerrlab
YYFAIL           3124 parse.c        #define YYFAIL		goto yyerrlab


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)


YYFINAL

YYFINAL           255 ext/syck/gram.c #define YYFINAL  52
YYFINAL           321 parse.c        #define	YYFINAL		895


YYFPRINTF

YYFPRINTF         666 ext/syck/gram.c #  define YYFPRINTF fprintf
YYFPRINTF        3187 parse.c        #  define YYFPRINTF fprintf


YYFREE

YYFREE            156 ext/syck/gram.c #  define YYFREE free
YYFREE            130 parse.c        #define YYFREE 	rb_parser_free
YYFREE             33 parse.y        #define YYFREE 	rb_parser_free


YYINITDEPTH

YYINITDEPTH       763 ext/syck/gram.c # define YYINITDEPTH 200
YYINITDEPTH      3204 parse.c        # define YYINITDEPTH 200


YYLAST

YYLAST            257 ext/syck/gram.c #define YYLAST   396
YYLAST           1032 parse.c        #define	YYLAST		9585


YYLEX

YYLEX             656 ext/syck/gram.c # define YYLEX yylex (&yylval, YYLEX_PARAM)
YYLEX             658 ext/syck/gram.c # define YYLEX yylex (&yylval)
YYLEX            3166 parse.c        #   define YYLEX		yylex (&yylval, &yylloc, YYLEX_PARAM)
YYLEX            3168 parse.c        #   define YYLEX		yylex (&yylval, &yylloc)
YYLEX            3172 parse.c        #   define YYLEX		yylex (&yylval, YYLEX_PARAM)
YYLEX            3174 parse.c        #   define YYLEX		yylex (&yylval)
YYLEX            3178 parse.c        # define YYLEX			yylex ()


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


YYLLOC_DEFAULT

YYLLOC_DEFAULT    646 ext/syck/gram.c # define YYLLOC_DEFAULT(Current, Rhs, N)		\
YYLLOC_DEFAULT   3155 parse.c        # define YYLLOC_DEFAULT(Current, Rhs, N)       	\


YYMALLOC

YYMALLOC          159 ext/syck/gram.c #  define YYMALLOC malloc
YYMALLOC          127 parse.c        #define YYMALLOC	rb_parser_malloc
YYMALLOC         6476 parse.c        #undef YYMALLOC
YYMALLOC           30 parse.y        #define YYMALLOC	rb_parser_malloc
YYMALLOC         2478 parse.y        #undef YYMALLOC


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        299 parse.c        #define YYMAXDEPTH 10000
YYMAXDEPTH       3215 parse.c        # undef YYMAXDEPTH
YYMAXDEPTH       3219 parse.c        # define YYMAXDEPTH 10000
YYMAXDEPTH        202 parse.y        #define YYMAXDEPTH 10000


YYPARSE_PARAM_ARG

YYPARSE_PARAM_ARG 3286 parse.c        #  define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
YYPARSE_PARAM_ARG 3289 parse.c        #  define YYPARSE_PARAM_ARG YYPARSE_PARAM
YYPARSE_PARAM_ARG 3293 parse.c        # define YYPARSE_PARAM_ARG


YYPARSE_PARAM_DECL

YYPARSE_PARAM_DECL 3287 parse.c        #  define YYPARSE_PARAM_DECL
YYPARSE_PARAM_DECL 3290 parse.c        #  define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
YYPARSE_PARAM_DECL 3294 parse.c        # define YYPARSE_PARAM_DECL


YYPOPSTACK

YYPOPSTACK        982 ext/syck/gram.c #define YYPOPSTACK   (yyvsp--, yyssp--)
YYPOPSTACK       3380 parse.c        # define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
YYPOPSTACK       3382 parse.c        # define YYPOPSTACK   (yyvsp--, yyssp--)


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


YYREALLOC

YYREALLOC         128 parse.c        #define YYREALLOC	rb_parser_realloc
YYREALLOC          31 parse.y        #define YYREALLOC	rb_parser_realloc


YYRECOVERING

YYRECOVERING      620 ext/syck/gram.c #define YYRECOVERING()  (!!yyerrstatus)
YYRECOVERING     3125 parse.c        #define YYRECOVERING()  (!!yyerrstatus)


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
YYSIZE_T         3024 parse.c        #   define YYSIZE_T size_t
YYSIZE_T         3099 parse.c        # define YYSIZE_T __SIZE_TYPE__
YYSIZE_T         3102 parse.c        # define YYSIZE_T size_t
YYSIZE_T         3107 parse.c        #  define YYSIZE_T size_t
YYSIZE_T         3111 parse.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_ALLOC    3005 parse.c        #  define YYSTACK_ALLOC alloca
YYSTACK_ALLOC    3009 parse.c        #    define YYSTACK_ALLOC alloca
YYSTACK_ALLOC    3012 parse.c        #     define YYSTACK_ALLOC __builtin_alloca
YYSTACK_ALLOC    3026 parse.c        #  define YYSTACK_ALLOC malloc


YYSTACK_BYTES

YYSTACK_BYTES     208 ext/syck/gram.c # define YYSTACK_BYTES(N) \
YYSTACK_BYTES    3052 parse.c        #  define YYSTACK_BYTES(N) \
YYSTACK_BYTES    3056 parse.c        #  define YYSTACK_BYTES(N) \


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_FREE     3020 parse.c        #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
YYSTACK_FREE     3027 parse.c        #  define YYSTACK_FREE free


YYSTACK_RELOCATE

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


YYSTACK_USE_ALLOCA

YYSTACK_USE_ALLOCA  115 parse.c        #define YYSTACK_USE_ALLOCA 0
YYSTACK_USE_ALLOCA   18 parse.y        #define YYSTACK_USE_ALLOCA 0


YYSTYPE

YYSTYPE           137 ext/syck/gram.c } YYSTYPE;
YYSTYPE            68 ext/syck/gram.h } YYSTYPE;
YYSTYPE           312 parse.c        # define YYSTYPE yystype
YYSTYPE           208 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
YYSTYPE_IS_TRIVIAL  313 parse.c        # define YYSTYPE_IS_TRIVIAL 1


YYTERROR

YYTERROR          639 ext/syck/gram.c #define YYTERROR	1
YYTERROR         3143 parse.c        #define YYTERROR	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


YYTRANSLATE

YYTRANSLATE       272 ext/syck/gram.c #define YYTRANSLATE(YYX) 						\
YYTRANSLATE       326 parse.c        #define YYTRANSLATE(x) ((unsigned)(x) <= 358 ? yytranslate[x] : 274)


YY_DECL_VARIABLES

YY_DECL_VARIABLES 3320 parse.c        # define YY_DECL_VARIABLES			\
YY_DECL_VARIABLES 3326 parse.c        # define YY_DECL_VARIABLES			\


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) ()
_                  18 ext/digest/digest.h typedef void (*hash_init_func_t) _((void *));
_                  19 ext/digest/digest.h typedef void (*hash_update_func_t) _((void *, unsigned char *, size_t));
_                  20 ext/digest/digest.h typedef void (*hash_end_func_t) _((void *, unsigned char *));
_                  21 ext/digest/digest.h typedef void (*hash_final_func_t) _((unsigned char *, void *));
_                  22 ext/digest/digest.h typedef int (*hash_equal_func_t) _((void *, void *));
_                 122 ext/iconv/iconv.c static VALUE charset_map_get _((void))
_                 874 ext/iconv/iconv.c Init_iconv _((void))
_                2821 io.c           pipe_atexit _((void))
_                 373 node.h         typedef void (*rb_event_hook_func_t) _((rb_event_t,NODE*,VALUE,ID,VALUE));
_                  59 regex.c        # define _(args) args
_                  61 regex.c        # define _(args) ()
_                 478 regex.c        typedef unsigned int (*mbc_startpos_func_t) _((const char *string, unsigned int pos));
_                 381 ruby.h         typedef void (*RUBY_DATA_FUNC) _((void*));
_                 328 signal.c       typedef RETSIGTYPE (*sighandler_t)_((int));
_                  31 st.h           # define _(args) args
_                  26 util.h         # define _(args) args
_                  28 util.h         # define _(args) ()


_CRTIMP

_CRTIMP          1563 win32/win32.c  #undef _CRTIMP
_CRTIMP          1564 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) ()


__declspec

__declspec       10147 eval.c         __declspec(noinline) static void stack_extend(rb_thread_t, int);
__declspec        361 ext/dl/sym.c   __declspec(noinline)
__declspec         93 regex.h        __declspec(dllimport)


__libc_ia64_register_backing_store_base

__libc_ia64_register_backing_store_base 9559 eval.c         #define __libc_ia64_register_backing_store_base (4ULL<<61)
__libc_ia64_register_backing_store_base   40 gc.c           #define __libc_ia64_register_backing_store_base (4ULL<<61)


_open

_open             129 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      1577 win32/win32.c  #define _set_osfhnd(fh, osfh) (void)(_osfhnd(fh) = osfh)
_set_osfhnd      1628 win32/win32.c  #define _set_osfhnd(fh, osfh) (void)((fh), (osfh))


_set_osflags

_set_osflags     1578 win32/win32.c  #define _set_osflags(fh, flags) (_osfile(fh) = (flags))
_set_osflags     1629 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           1984 win32/win32.c  #undef accept
accept            373 win32/win32.h  #undef accept
accept            375 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        915 process.c      #define after_exec() rb_thread_start_timer()
after_exec        918 process.c      #define after_exec()


alloca

alloca             49 eval.c         #   define alloca __builtin_alloca
alloca             62 gc.c           #   define alloca __builtin_alloca
alloca            143 missing/alloca.c alloca (size)			/* returns pointer to storage */
alloca             83 regex.c        #   define alloca __builtin_alloca
alloca             73 ruby.h         # define alloca __alloca


arg_add

arg_add          8975 parse.c        arg_add(node1, node2)
arg_add          4977 parse.y        arg_add(node1, node2)


arg_ambiguous

arg_ambiguous    7339 parse.c        arg_ambiguous()
arg_ambiguous    3341 parse.y        arg_ambiguous()


arg_blk_pass

arg_blk_pass     9505 parse.c        arg_blk_pass(node1, node2)
arg_blk_pass     5507 parse.y        arg_blk_pass(node1, node2)


arg_concat

arg_concat       8966 parse.c        arg_concat(node1, node2)
arg_concat       4968 parse.y        arg_concat(node1, node2)


arg_prepend

arg_prepend      9517 parse.c        arg_prepend(node1, node2)
arg_prepend      5519 parse.y        arg_prepend(node1, node2)


aryset

aryset           8920 parse.c        aryset(recv, idx)
aryset           4922 parse.y        aryset(recv, idx)


assert

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


assign_in_cond

assign_in_cond   9208 parse.c        assign_in_cond(node)
assign_in_cond   5210 parse.y        assign_in_cond(node)


assignable

assignable       8860 parse.c        assignable(id, val)
assignable       4862 parse.y        assignable(id, val)


attrset

attrset          8940 parse.c        attrset(recv, id)
attrset          4942 parse.y        attrset(recv, id)


before_exec

before_exec       914 process.c      #define before_exec() rb_thread_stop_timer()
before_exec       917 process.c      #define before_exec()


bind

bind             2007 win32/win32.c  #undef bind
bind              378 win32/win32.h  #undef bind
bind              380 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]


block_append

block_append     8569 parse.c        block_append(head, tail)
block_append     4571 parse.y        block_append(head, tail)


bm_init_skip

bm_init_skip      792 ext/stringio/stringio.c bm_init_skip(skip, pat, m)
bm_init_skip     2698 regex.c        bm_init_skip(skip, pat, m, translate)


bm_search

bm_search         808 ext/stringio/stringio.c bm_search(little, llen, big, blen, skip)
bm_search        2722 regex.c        bm_search(little, llen, big, blen, skip, translate)


bytestring_t

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


call_op

call_op          8755 parse.c        call_op(recv, id, narg, arg1)
call_op          4757 parse.y        call_op(recv, id, narg, arg1)


calloc

calloc            133 parse.c        #define calloc	YYCALLOC
calloc             36 parse.y        #define calloc	YYCALLOC


catch_timer

catch_timer      11500 eval.c         catch_timer(sig)
catch_timer      11548 eval.c         catch_timer(sig)


chown

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


close

close             201 ext/socket/socket.c #undef close
close             202 ext/socket/socket.c #define close closesocket
close              43 win32/win32.c  #undef close
close             116 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()


cond

cond             9388 parse.c        cond(node)
cond             5390 parse.y        cond(node)


cond0

cond0            9325 parse.c        cond0(node)
cond0            5327 parse.y        cond0(node)


cond_negative

cond_negative    9418 parse.c        cond_negative(nodep)
cond_negative    5420 parse.y        cond_negative(nodep)


connect

connect          2025 win32/win32.c  #undef connect
connect           383 win32/win32.h  #undef connect
connect           385 win32/win32.h  #define connect(s, a, l)	rb_w32_connect(s, a, l)


debug

debug            3691 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      172 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)


dispose_string

dispose_string   7021 parse.c        dispose_string(str)
dispose_string   3023 parse.y        dispose_string(str)


do_spawn

do_spawn           29 missing/os2.c  do_spawn(cmd)
do_spawn          719 win32/win32.c  do_spawn(int mode, char *cmd)


dyna_in_block

dyna_in_block    9749 parse.c        dyna_in_block()
dyna_in_block    5751 parse.y        dyna_in_block()


dyna_init

dyna_init        9755 parse.c        dyna_init(node, pre)
dyna_init        5757 parse.y        dyna_init(node, pre)


dyna_pop

dyna_pop         9741 parse.c        dyna_pop(vars)
dyna_pop         5743 parse.y        dyna_pop(vars)


dyna_push

dyna_push        9731 parse.c        dyna_push()
dyna_push        5733 parse.y        dyna_push()


e_option_supplied

e_option_supplied 9254 parse.c        e_option_supplied()
e_option_supplied 5256 parse.y        e_option_supplied()


each_i

each_i           1105 hash.c         each_i(key, value)
each_i            367 range.c        each_i(v, arg)


each_pair

each_pair         464 ext/dbm/dbm.c  each_pair(obj)
each_pair         567 ext/gdbm/gdbm.c each_pair(obj)
each_pair         443 ext/sdbm/init.c each_pair(obj)


enough_to_get

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


enough_to_put

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


environ

environ          1276 eval.c         #define environ (*_NSGetEnviron())
environ          1615 hash.c         #undef environ
environ          1616 hash.c         #define environ my_environ
environ          1618 hash.c         #undef environ
environ          1619 hash.c         #define environ (*_NSGetEnviron())


evstr2dstr

evstr2dstr       8726 parse.c        evstr2dstr(node)
evstr2dstr       4728 parse.y        evstr2dstr(node)


execv

execv             141 win32/win32.h  #undef execv
execv             142 win32/win32.h  #define execv(path,argv)	do_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             42 win32/win32.c  #undef fclose
fclose            117 win32/win32.h  #define fclose(f)		rb_w32_fclose(f)


fdbm_modify

fdbm_modify       315 ext/dbm/dbm.c  fdbm_modify(obj)
fdbm_modify       292 ext/sdbm/init.c fdbm_modify(obj)


fdopen

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


fgetc

fgetc            3195 win32/win32.c  #undef fgetc
fgetc              96 win32/win32.h  #undef fgetc
fgetc             105 win32/win32.h  #define fgetc(_stream)		getc(_stream)


fgetchar

fgetchar          100 win32/win32.h  #undef fgetchar
fgetchar          109 win32/win32.h  #define fgetchar()		getchar()


finite

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


fixpos

fixpos           8536 parse.c        fixpos(node, orig)
fixpos           4538 parse.y        fixpos(node, orig)


flock

flock            3135 file.c         #define flock(fd, op) rb_thread_flock(fd, op, fptr)
flock            3203 file.c         #undef flock
flock              26 missing/flock.c flock(fd, operation)
flock              93 missing/flock.c flock(fd, operation)
flock             127 missing/flock.c flock(fd, operation)
flock             324 win32/win32.c  flock(int fd, int oper)


flush_register_windows

flush_register_windows  208 defines.h      flush_register_windows(void)
flush_register_windows 12909 eval.c         void flush_register_windows(void)


fopen

fopen            3596 win32/win32.c  #undef fopen
fopen             131 win32/win32.h  #undef fopen
fopen             132 win32/win32.h  #define fopen(p, m)		rb_w32_fopen(p, m)


fputc

fputc            3220 win32/win32.c  #undef fputc
fputc              97 win32/win32.h  #undef fputc
fputc             106 win32/win32.h  #define fputc(_c, _stream)	putc(_c, _stream)


fputchar

fputchar          101 win32/win32.h  #undef fputchar
fputchar          110 win32/win32.h  #define fputchar(_c)		putchar(_c)


free

free              134 parse.c        #define free	YYFREE
free               37 parse.y        #define free	YYFREE


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      215 ext/socket/getaddrinfo.c freeaddrinfo(ai)


fseeko

fseeko             71 file.c         # define fseeko  fseek
fseeko             57 io.c           # define fseeko  fseek


fsopen

fsopen            135 win32/win32.h  #undef fsopen
fsopen            136 win32/win32.h  #define fsopen(p, m, sh)	rb_w32_fsopen(p, m, sh)


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_name

get_name           22 ext/dl/sample/c++sample.C Person::get_name()
get_name          546 ext/socket/getaddrinfo.c get_name(addr, afd, res, numaddr, pai, port0)


get_osfhandle

get_osfhandle     495 win32/win32.h  #undef get_osfhandle
get_osfhandle     497 win32/win32.h  #define get_osfhandle(h)	rb_w32_get_osfhandle(h)


getaddrinfo

getaddrinfo        65 ext/socket/addrinfo.h #define getaddrinfo getaddrinfo__compat
getaddrinfo       276 ext/socket/getaddrinfo.c getaddrinfo(hostname, servname, hints, res)
getaddrinfo       173 ext/socket/socket.c #define getaddrinfo(node,serv,hints,res) ruby_getaddrinfo((node),(serv),(hints),(res))
getaddrinfo       196 ext/socket/socket.c #undef getaddrinfo
getaddrinfo       197 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               94 win32/win32.h  #undef getc
getc              103 win32/win32.h  #define getc(_stream)		rb_w32_getc(_stream)


getchar

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


getcwd

getcwd           2566 win32/win32.c  #undef getcwd
getcwd            500 win32/win32.h  #undef getcwd
getcwd            502 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            505 win32/win32.h  #undef getenv
getenv            507 win32/win32.h  #define getenv(n)		rb_w32_getenv(n)
getenv             11 wince/stdlib.c char *getenv(const char *env)


gethostbyaddr

gethostbyaddr    2262 win32/win32.c  #undef gethostbyaddr
gethostbyaddr     460 win32/win32.h  #undef gethostbyaddr
gethostbyaddr     462 win32/win32.h  #define gethostbyaddr(a, l, t)	rb_w32_gethostbyaddr(a, l, t)


gethostbyname

gethostbyname    2279 win32/win32.c  #undef gethostbyname
gethostbyname     465 win32/win32.h  #undef gethostbyname
gethostbyname     467 win32/win32.h  #define gethostbyname(n)	rb_w32_gethostbyname(n)


gethostname

gethostname      2296 win32/win32.c  #undef gethostname
gethostname       470 win32/win32.h  #undef gethostname
gethostname       472 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      2051 win32/win32.c  #undef getpeername
getpeername       400 win32/win32.h  #undef getpeername
getpeername       402 win32/win32.h  #define getpeername(s, a, l)	rb_w32_getpeername(s, a, l)


getpid

getpid           3372 win32/win32.c  #undef getpid
getpid            118 win32/win32.h  #define getpid()		rb_w32_getpid()


getprotobyname

getprotobyname   2313 win32/win32.c  #undef getprotobyname
getprotobyname    475 win32/win32.h  #undef getprotobyname
getprotobyname    477 win32/win32.h  #define getprotobyname(n)	rb_w32_getprotobyname(n)
getprotobyname    197 wince/winsock2.c struct protoent* getprotobyname(const char* name)


getprotobynumber

getprotobynumber 2330 win32/win32.c  #undef getprotobynumber
getprotobynumber  480 win32/win32.h  #undef getprotobynumber
getprotobynumber  482 win32/win32.h  #define getprotobynumber(n)	rb_w32_getprotobynumber(n)
getprotobynumber  218 wince/winsock2.c struct protoent* getprotobynumber(int proto)


getservbyname

getservbyname    2347 win32/win32.c  #undef getservbyname
getservbyname     485 win32/win32.h  #undef getservbyname
getservbyname     487 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    2364 win32/win32.c  #undef getservbyport
getservbyport     490 win32/win32.h  #undef getservbyport
getservbyport     492 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      2068 win32/win32.c  #undef getsockname
getsockname       405 win32/win32.h  #undef getsockname
getsockname       407 win32/win32.h  #define getsockname(s, a, l)	rb_w32_getsockname(s, a, l)


getsockopt

getsockopt       1646 win32/win32.c  #undef getsockopt
getsockopt        410 win32/win32.h  #undef getsockopt
getsockopt        412 win32/win32.h  #define getsockopt(s, v, n, o, l) rb_w32_getsockopt(s, v, n, o, l)


gettable

gettable         8811 parse.c        gettable(id)
gettable         4813 parse.y        gettable(id)


gettimeofday

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


here_document

here_document    7254 parse.c        here_document(here)
here_document    3256 parse.y        here_document(here)


heredoc_identifier

heredoc_identifier 7163 parse.c        heredoc_identifier()
heredoc_identifier 3165 parse.y        heredoc_identifier()


heredoc_restore

heredoc_restore  7222 parse.c        heredoc_restore(here)
heredoc_restore  3224 parse.y        heredoc_restore(here)


hton16

hton16            221 pack.c         #define hton16(x) (endian()?(x):swap16(x))
hton16            247 pack.c         #define hton16(x) (x)
hton16            276 pack.c         #define hton16(x) swap16(x)


hton32

hton32            222 pack.c         #define hton32(x) (endian()?(x):swap32(x))
hton32            248 pack.c         #define hton32(x) (x)
hton32            277 pack.c         #define hton32(x) swap32(x)


htond

htond             209 pack.c         #define htond(x) (endian()?(x):swapd(x))
htond             235 pack.c         #define htond(x) (x)
htond             264 pack.c         #define htond(x) swapd(x)


htonf

htonf             208 pack.c         #define htonf(x) (endian()?(x):swapf(x))
htonf             234 pack.c         #define htonf(x) (x)
htonf             263 pack.c         #define htonf(x) swapf(x)


htonl

htonl             207 pack.c         #define htonl(x) (endian()?(x):swapl(x))
htonl             230 pack.c         #define htonl(x) (x)
htonl             255 pack.c         #undef htonl
htonl             260 pack.c         #define htonl(x) swapl(x)


htons

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


htov16

htov16            219 pack.c         #define htov16(x) (endian()?swap16(x):(x))
htov16            245 pack.c         #define htov16(x) swap16(x)
htov16            274 pack.c         #define htov16(x) (x)


htov32

htov32            220 pack.c         #define htov32(x) (endian()?swap32(x):(x))
htov32            246 pack.c         #define htov32(x) swap32(x)
htov32            275 pack.c         #define htov32(x) (x)


htovd

htovd             213 pack.c         #define htovd(x) (endian()?swapd(x):(x))
htovd             239 pack.c         #define htovd(x) swapd(x)
htovd             268 pack.c         #define htovd(x) (x)


htovf

htovf             212 pack.c         #define htovf(x) (endian()?swapf(x):(x))
htovf             238 pack.c         #define htovf(x) swapf(x)
htovf             267 pack.c         #define htovf(x) (x)


htovl

htovl             211 pack.c         #define htovl(x) (endian()?swapl(x):(x))
htovl             237 pack.c         #define htovl(x) swapl(x)
htovl             266 pack.c         #define htovl(x) (x)


htovs

htovs             210 pack.c         #define htovs(x) (endian()?swaps(x):(x))
htovs             236 pack.c         #define htovs(x) swaps(x)
htovs             265 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)


inspect_i

inspect_i        1199 hash.c         inspect_i(key, value, str)
inspect_i         378 object.c       inspect_i(id, value, str)


internal_id

internal_id      9884 parse.c        internal_id()
internal_id      5886 parse.y        internal_id()


ioctl

ioctl              23 ext/io/wait/wait.c #define ioctl ioctlsocket
ioctl            1779 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      2100 win32/win32.c  #undef ioctlsocket
ioctlsocket       415 win32/win32.h  #undef ioctlsocket
ioctlsocket       417 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_asgn_or_id

is_asgn_or_id     167 parse.c        #define is_asgn_or_id(id) ((is_notop_id(id)) && \
is_asgn_or_id      70 parse.y        #define is_asgn_or_id(id) ((is_notop_id(id)) && \


is_attrset_id

is_attrset_id     162 parse.c        #define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET)
is_attrset_id      65 parse.y        #define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET)


is_class_id

is_class_id       164 parse.c        #define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS)
is_class_id        67 parse.y        #define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS)


is_const_id

is_const_id       163 parse.c        #define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST)
is_const_id        66 parse.y        #define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST)


is_global_id

is_global_id      160 parse.c        #define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL)
is_global_id       63 parse.y        #define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL)


is_identchar

is_identchar     6493 parse.c        #define is_identchar(c) (SIGN_EXTEND_CHAR(c)!=-1&&(ISALNUM(c) || (c) == '_' || ismbchar(c)))
is_identchar     2495 parse.y        #define is_identchar(c) (SIGN_EXTEND_CHAR(c)!=-1&&(ISALNUM(c) || (c) == '_' || ismbchar(c)))


is_instance_id

is_instance_id    161 parse.c        #define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE)
is_instance_id     64 parse.y        #define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE)


is_junk_id

is_junk_id        165 parse.c        #define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK)
is_junk_id         68 parse.y        #define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK)


is_local_id

is_local_id       159 parse.c        #define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL)
is_local_id        62 parse.y        #define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL)


is_notop_id

is_notop_id       158 parse.c        #define is_notop_id(id) ((id)>tLAST_TOKEN)
is_notop_id        61 parse.y        #define is_notop_id(id) ((id)>tLAST_TOKEN)


is_ruby_native_thread

is_ruby_native_thread 1290 eval.c         is_ruby_native_thread() {
is_ruby_native_thread  702 ruby.h         #define is_ruby_native_thread() (1)


is_special_global_name

is_special_global_name 9890 parse.c        is_special_global_name(m)
is_special_global_name 5892 parse.y        is_special_global_name(m)


isatty

isatty            144 win32/win32.h  #undef isatty
isatty            145 win32/win32.h  #define isatty(h)		rb_w32_isatty(h)
isatty             67 wince/io.h     #define isatty	   _isatty


isdirsep

isdirsep           89 dir.c          #define isdirsep(c) ((c) == '/' || (c) == '\\')
isdirsep           91 dir.c          #define isdirsep(c) ((c) == '/')
isdirsep         2286 file.c         #define isdirsep(x) ((x) == '/' || (x) == '\\')
isdirsep         2288 file.c         #define isdirsep(x) ((x) == '/')
isdirsep           39 win32/win32.c  #define isdirsep(x) ((x) == '/' || (x) == '\\')


isinf

isinf              67 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(n)
isinf              32 missing/isinf.c isinf(n)
isinf              51 missing/isinf.c isinf(n)


isnan

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


lex_get_str

lex_get_str      6627 parse.c        lex_get_str(s)
lex_get_str      2629 parse.y        lex_get_str(s)


lex_getline

lex_getline      6647 parse.c        lex_getline()
lex_getline      2649 parse.y        lex_getline()


link

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


list_append

list_append      8629 parse.c        list_append(list, item)
list_append      4631 parse.y        list_append(list, item)


list_concat

list_concat      8650 parse.c        list_concat(head, tail)
list_concat      4652 parse.y        list_concat(head, tail)


listen

listen           2117 win32/win32.c  #undef listen
listen            420 win32/win32.h  #undef listen
listen            422 win32/win32.h  #define listen(s, b)		rb_w32_listen(s, b)


literal_concat

literal_concat   8676 parse.c        literal_concat(head, tail)
literal_concat   4678 parse.y        literal_concat(head, tail)


literal_node

literal_node     9303 parse.c        literal_node(node)
literal_node     5305 parse.y        literal_node(node)


load

load             1082 dln.c          load(file)
load             1360 marshal.c      load(arg)


load_mantissa

load_mantissa     253 marshal.c      load_mantissa(d, buf, len)
load_mantissa     286 marshal.c      #define load_mantissa(d, buf, len) (d)


local_append

local_append     9625 parse.c        local_append(id)
local_append     5627 parse.y        local_append(id)


local_cnt

local_cnt        9646 parse.c        local_cnt(id)
local_cnt        5648 parse.y        local_cnt(id)


local_id

local_id         9660 parse.c        local_id(id)
local_id         5662 parse.y        local_id(id)


local_pop

local_pop        9604 parse.c        local_pop()
local_pop        5606 parse.y        local_pop()


local_push

local_push       9583 parse.c        local_push(top)
local_push       5585 parse.y        local_push(top)


local_tbl

local_tbl        9618 parse.c        local_tbl()
local_tbl        5620 parse.y        local_tbl()


logop

logop            9401 parse.c        logop(type, left, right)
logop            5403 parse.y        logop(type, left, right)


lstat

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


main

main               57 ext/digest/md5/md5.c main()
main               97 ext/digest/md5/md5.c main()
main              668 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               33 main.c         main(argc, argv, envp)
main              879 missing/strftime.c main(argc, argv)
main              258 wince/time_wce.c int main()
main              309 wince/winsock2.c int main()


malloc

malloc            131 parse.c        #define malloc	YYMALLOC
malloc             34 parse.y        #define malloc	YYMALLOC


match_gen

match_gen        8773 parse.c        match_gen(node1, node2)
match_gen        4775 parse.y        match_gen(node1, node2)


max

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


mblen

mblen             289 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              4 missing/memcmp.c memcmp(s1,s2,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             147 win32/win32.h  #undef mkdir
mkdir             148 win32/win32.h  #define mkdir(p, m)		rb_w32_mkdir(p, m)
mkdir              20 wince/direct.h #define mkdir      _mkdir


nd_func

nd_func           285 parse.c        #define nd_func u1.id
nd_func           188 parse.y        #define nd_func u1.id


nd_nest

nd_nest           292 parse.c        #define nd_nest u3.id
nd_nest           195 parse.y        #define nd_nest u3.id


nd_paren

nd_paren          291 parse.c        #define nd_paren(node) (char)((node)->u2.id >> CHAR_BIT*2)
nd_paren          194 parse.y        #define nd_paren(node) (char)((node)->u2.id >> CHAR_BIT*2)


nd_term

nd_term           287 parse.c        #define nd_term(node) ((signed short)(node)->u2.id)
nd_term           289 parse.c        #define nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2)
nd_term           190 parse.y        #define nd_term(node) ((signed short)(node)->u2.id)
nd_term           192 parse.y        #define nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2)


negate_lit

negate_lit       9485 parse.c        negate_lit(node)
negate_lit       5487 parse.y        negate_lit(node)


new_call

new_call         9538 parse.c        new_call(r,m,a)
new_call         5540 parse.y        new_call(r,m,a)


new_evstr

new_evstr        8736 parse.c        new_evstr(node)
new_evstr        4738 parse.y        new_evstr(node)


new_fcall

new_fcall        9551 parse.c        new_fcall(m,a)
new_fcall        5553 parse.y        new_fcall(m,a)


new_super

new_super        9563 parse.c        new_super(a)
new_super        5565 parse.y        new_super(a)


new_yield

new_yield        9463 parse.c        new_yield(node)
new_yield        5465 parse.y        new_yield(node)


newline_node

newline_node     8522 parse.c        newline_node(node)
newline_node     4524 parse.y        newline_node(node)


newtok

newtok           6744 parse.c        newtok()
newtok           2746 parse.y        newtok()


nextc

nextc            6695 parse.c        nextc()
nextc            2697 parse.y        nextc()


no_blockarg

no_blockarg      9438 parse.c        no_blockarg(node)
no_blockarg      5440 parse.y        no_blockarg(node)


node_assign

node_assign      8989 parse.c        node_assign(lhs, rhs)
node_assign      4991 parse.y        node_assign(lhs, rhs)


nodeline

nodeline         8515 parse.c        nodeline(node)
nodeline         4517 parse.y        nodeline(node)


nodetype

nodetype         8508 parse.c        nodetype(node)			/* for debug */
nodetype         4510 parse.y        nodetype(node)			/* for debug */


ntohd

ntohd             205 pack.c         #define ntohd(x) (endian()?(x):swapd(x))
ntohd             233 pack.c         #define ntohd(x) (x)
ntohd             262 pack.c         #define ntohd(x) swapd(x)


ntohf

ntohf             204 pack.c         #define ntohf(x) (endian()?(x):swapf(x))
ntohf             232 pack.c         #define ntohf(x) (x)
ntohf             261 pack.c         #define ntohf(x) swapf(x)


ntohl

ntohl             203 pack.c         #define ntohl(x) (endian()?(x):swapl(x))
ntohl             228 pack.c         #define ntohl(x) (x)
ntohl             253 pack.c         #undef ntohl
ntohl             258 pack.c         #define ntohl(x) swapl(x)


ntohs

ntohs             202 pack.c         #define ntohs(x) (endian()?(x):swaps(x))
ntohs             227 pack.c         #define ntohs(x) (x)
ntohs             252 pack.c         #undef ntohs
ntohs             257 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              54 io.c           # define off_t  long
off_t              29 wince/sys/types.h typedef long off_t;


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  3223 process.c      p_gid_sw_ensure(id)
p_gid_sw_ensure  3277 process.c      p_gid_sw_ensure(obj)


p_gid_switch

p_gid_switch     3245 process.c      p_gid_switch(obj)
p_gid_switch     3285 process.c      p_gid_switch(obj)


p_uid_sw_ensure

p_uid_sw_ensure  3112 process.c      p_uid_sw_ensure(id)
p_uid_sw_ensure  3167 process.c      p_uid_sw_ensure(obj)


p_uid_switch

p_uid_switch     3134 process.c      p_uid_switch(obj)
p_uid_switch     3175 process.c      p_uid_switch(obj)


parse_string

parse_string     7111 parse.c        parse_string(quote)
parse_string     3113 parse.y        parse_string(quote)


parser_warn

parser_warn      8558 parse.c        parser_warn(node, mesg)
parser_warn      4560 parse.y        parser_warn(node, mesg)


parser_warning

parser_warning   8547 parse.c        parser_warning(node, mesg)
parser_warning   4549 parse.y        parser_warning(node, mesg)


pause

pause            9648 eval.c         #  define pause() Sleep(INFINITE)
pause            9650 eval.c         #  define pause() sleep(0x7fffffff)


peek

peek             6736 parse.c        #define peek(c) (lex_p != lex_pend && (c) == *lex_p)
peek             2738 parse.y        #define peek(c) (lex_p != lex_pend && (c) == *lex_p)


pointer

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


posix_signal

posix_signal      387 intern.h       #define posix_signal ruby_posix_signal
posix_signal      358 signal.c       posix_signal(signum, handler)


proto

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


pushback

pushback         6728 parse.c        pushback(c)
pushback         2730 parse.y        pushback(c)


putc

putc               95 win32/win32.h  #undef putc
putc              104 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            99 win32/win32.h  #undef putchar
putchar           108 win32/win32.h  #define putchar(_c)		rb_w32_putc(_c, stdout)


range_op

range_op         9280 parse.c        range_op(node)
range_op         5282 parse.y        range_op(node)


rb_Array

rb_Array         2738 eval.c         rb_Array(val)
rb_Array         2459 object.c       rb_Array(val)


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_backref_error

rb_backref_error 8952 parse.c        rb_backref_error(node)
rb_backref_error 4954 parse.y        rb_backref_error(node)


rb_backref_get

rb_backref_get   10192 parse.c        rb_backref_get()
rb_backref_get   6194 parse.y        rb_backref_get()


rb_backref_set

rb_backref_set   10202 parse.c        rb_backref_set(val)
rb_backref_set   6204 parse.y        rb_backref_set(val)


rb_compile_cstr

rb_compile_cstr  6673 parse.c        rb_compile_cstr(f, s, len, line)
rb_compile_cstr  2675 parse.y        rb_compile_cstr(f, s, len, line)


rb_compile_file

rb_compile_file  6681 parse.c        rb_compile_file(f, file, start)
rb_compile_file  2683 parse.y        rb_compile_file(f, file, start)


rb_compile_string

rb_compile_string 6657 parse.c        rb_compile_string(f, s, line)
rb_compile_string 2659 parse.y        rb_compile_string(f, s, line)


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  575 eval.c         #undef rb_disable_super
rb_disable_super  579 eval.c         rb_disable_super(klass, name)
rb_disable_super  150 intern.h       #define rb_disable_super(klass, name) ((void)0)


rb_enable_super

rb_enable_super   576 eval.c         #undef rb_enable_super
rb_enable_super   587 eval.c         rb_enable_super(klass, name)
rb_enable_super   151 intern.h       #define rb_enable_super(klass, name) ((void)0)


rb_file_s_lchmod

rb_file_s_lchmod 1788 file.c         rb_file_s_lchmod(argc, argv)
rb_file_s_lchmod 1805 file.c         rb_file_s_lchmod(argc, argv)


rb_file_s_lchown

rb_file_s_lchown 1935 file.c         rb_file_s_lchown(argc, argv)
rb_file_s_lchown 1963 file.c         rb_file_s_lchown(argc, argv)


rb_file_s_utime

rb_file_s_utime  1997 file.c         rb_file_s_utime(argc, argv)
rb_file_s_utime  2034 file.c         rb_file_s_utime(argc, argv)


rb_fix2int

rb_fix2int       1587 numeric.c      rb_fix2int(val)
rb_fix2int       1632 numeric.c      rb_fix2int(val)


rb_gc_mark_parser

rb_gc_mark_parser 9780 parse.c        rb_gc_mark_parser()
rb_gc_mark_parser 5782 parse.y        rb_gc_mark_parser()


rb_hash_delete

rb_hash_delete     20 ext/dl/ptr.c   rb_hash_delete(VALUE hash, VALUE key)
rb_hash_delete    656 hash.c         rb_hash_delete(hash, key)


rb_id2name

rb_id2name       10065 parse.c        rb_id2name(id)
rb_id2name       6067 parse.y        rb_id2name(id)


rb_id_attrset

rb_id_attrset    8931 parse.c        rb_id_attrset(id)
rb_id_attrset    4933 parse.y        rb_id_attrset(id)


rb_intern

rb_intern        9987 parse.c        rb_intern(name)
rb_intern        5989 parse.y        rb_intern(name)


rb_is_class_id

rb_is_class_id   10147 parse.c        rb_is_class_id(id)
rb_is_class_id   6149 parse.y        rb_is_class_id(id)


rb_is_const_id

rb_is_const_id   10139 parse.c        rb_is_const_id(id)
rb_is_const_id   6141 parse.y        rb_is_const_id(id)


rb_is_instance_id

rb_is_instance_id 10155 parse.c        rb_is_instance_id(id)
rb_is_instance_id 6157 parse.y        rb_is_instance_id(id)


rb_is_junk_id

rb_is_junk_id    10171 parse.c        rb_is_junk_id(id)
rb_is_junk_id    6173 parse.y        rb_is_junk_id(id)


rb_is_local_id

rb_is_local_id   10163 parse.c        rb_is_local_id(id)
rb_is_local_id   6165 parse.y        rb_is_local_id(id)


rb_jmp_buf

rb_jmp_buf       1273 gc.c           typedef unsigned long rb_jmp_buf[8];
rb_jmp_buf       1285 gc.c           typedef unsigned long rb_jmp_buf[6];


rb_jmpbuf_t

rb_jmpbuf_t        98 eval.c         } rb_jmpbuf_t[1];
rb_jmpbuf_t       160 eval.c         typedef jmp_buf rb_jmpbuf_t;


rb_lastline_get

rb_lastline_get  10215 parse.c        rb_lastline_get()
rb_lastline_get  6217 parse.y        rb_lastline_get()


rb_lastline_set

rb_lastline_set  10225 parse.c        rb_lastline_set(val)
rb_lastline_set  6227 parse.y        rb_lastline_set(val)


rb_nativethread_t

rb_nativethread_t  689 ruby.h         typedef pthread_t rb_nativethread_t;
rb_nativethread_t  694 ruby.h         typedef DWORD rb_nativethread_t;


rb_node_newnode

rb_node_newnode  8489 parse.c        rb_node_newnode(type, a0, a1, a2)
rb_node_newnode  4491 parse.y        rb_node_newnode(type, a0, a1, a2)


rb_num2int

rb_num2int       1577 numeric.c      rb_num2int(val)
rb_num2int       1625 numeric.c      rb_num2int(val)


rb_obj_freeze

rb_obj_freeze      22 ext/strscan/strscan.c #  define rb_obj_freeze(obj) rb_str_freeze(obj)
rb_obj_freeze     738 object.c       rb_obj_freeze(obj)


rb_parser_append_print

rb_parser_append_print 9798 parse.c        rb_parser_append_print()
rb_parser_append_print 5800 parse.y        rb_parser_append_print()


rb_parser_calloc

rb_parser_calloc 10255 parse.c        rb_parser_calloc(nelem, size)
rb_parser_calloc 6257 parse.y        rb_parser_calloc(nelem, size)


rb_parser_free

rb_parser_free   10288 parse.c        rb_parser_free(ptr)
rb_parser_free   6290 parse.y        rb_parser_free(ptr)


rb_parser_malloc

rb_parser_malloc 10244 parse.c        rb_parser_malloc(size)
rb_parser_malloc 6246 parse.y        rb_parser_malloc(size)


rb_parser_realloc

rb_parser_realloc 10266 parse.c        rb_parser_realloc(ptr, size)
rb_parser_realloc 6268 parse.y        rb_parser_realloc(ptr, size)


rb_parser_while_loop

rb_parser_while_loop 9807 parse.c        rb_parser_while_loop(chop, split)
rb_parser_while_loop 5809 parse.y        rb_parser_while_loop(chop, split)


rb_quad_pack

rb_quad_pack      191 bignum.c       rb_quad_pack(buf, val)
rb_quad_pack      264 bignum.c       rb_quad_pack(buf, val)


rb_quad_unpack

rb_quad_unpack    219 bignum.c       rb_quad_unpack(buf, sign)
rb_quad_unpack    292 bignum.c       rb_quad_unpack(buf, sign)


rb_sym_all_symbols

rb_sym_all_symbols 10130 parse.c        rb_sym_all_symbols()
rb_sym_all_symbols 6132 parse.y        rb_sym_all_symbols()


rb_symname_p

rb_symname_p     9913 parse.c        rb_symname_p(name)
rb_symname_p     5915 parse.y        rb_symname_p(name)


rb_thread_start_timer

rb_thread_start_timer 11538 eval.c         rb_thread_start_timer()
rb_thread_start_timer 11561 eval.c         rb_thread_start_timer()


rb_thread_stop_timer

rb_thread_stop_timer 11543 eval.c         rb_thread_stop_timer()
rb_thread_stop_timer 11573 eval.c         rb_thread_stop_timer()


rb_w32_iswin95

rb_w32_iswin95     86 win32/win32.h  #define rb_w32_iswin95()  (rb_w32_osid() == VER_PLATFORM_WIN32_WINDOWS)
rb_w32_iswin95     89 win32/win32.h  #define rb_w32_iswin95()  FALSE


rb_w32_iswinnt

rb_w32_iswinnt     85 win32/win32.h  #define rb_w32_iswinnt()  (rb_w32_osid() == VER_PLATFORM_WIN32_NT)
rb_w32_iswinnt     88 win32/win32.h  #define rb_w32_iswinnt()  TRUE


rb_w32_open_osfhandle

rb_w32_open_osfhandle   93 win32/win32.c  #define rb_w32_open_osfhandle(osfhandle, flags) _open_osfhandle(osfhandle, flags)
rb_w32_open_osfhandle 1587 win32/win32.c  rb_w32_open_osfhandle(long osfhandle, int flags)
rb_w32_open_osfhandle 1635 win32/win32.c  rb_w32_open_osfhandle(long osfhandle, int flags)


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) \


re_adjust_startpos

re_adjust_startpos 3109 regex.c        re_adjust_startpos(bufp, string, size, startpos, range)
re_adjust_startpos   31 regex.h        # define re_adjust_startpos ruby_re_adjust_startpos


re_compile_fastmap

re_compile_fastmap 2770 regex.c        re_compile_fastmap(bufp)
re_compile_fastmap   32 regex.h        # define re_compile_fastmap ruby_re_compile_fastmap


re_compile_pattern

re_compile_pattern 1209 regex.c        re_compile_pattern(pattern, size, bufp)
re_compile_pattern   33 regex.h        # define re_compile_pattern ruby_re_compile_pattern


re_copy_registers

re_copy_registers 4409 regex.c        re_copy_registers(regs1, regs2)
re_copy_registers   34 regex.h        # define re_copy_registers ruby_re_copy_registers


re_free_pattern

re_free_pattern  2486 regex.c        re_free_pattern(bufp)
re_free_pattern    35 regex.h        # define re_free_pattern ruby_re_free_pattern


re_free_registers

re_free_registers 4433 regex.c        re_free_registers(regs)
re_free_registers   36 regex.h        # define re_free_registers ruby_re_free_registers


re_match

re_match         3521 regex.c        re_match(bufp, string_arg, size, pos, regs)
re_match           37 regex.h        # define re_match ruby_re_match


re_mbcinit

re_mbcinit       4542 regex.c        re_mbcinit(mbctype)
re_mbcinit         38 regex.h        # define re_mbcinit ruby_re_mbcinit


re_search

re_search        3156 regex.c        re_search(bufp, string, size, startpos, range, regs)
re_search          39 regex.h        # define re_search ruby_re_search


re_set_casetable

re_set_casetable  219 regex.c        re_set_casetable(table)
re_set_casetable   40 regex.h        # define re_set_casetable ruby_re_set_casetable


re_warning

re_warning        189 regex.c        # define re_warning(x) rb_warn(x)
re_warning        193 regex.c        # define re_warning(x)


read

read              125 win32/win32.h  #define read(h, b, l)		_read(h, b, l)
read               63 wince/io.h     #define read	   _read


read_escape

read_escape      6770 parse.c        read_escape()
read_escape      2772 parse.y        read_escape()


realloc

realloc           132 parse.c        #define realloc	YYREALLOC
realloc            35 parse.y        #define realloc	YYREALLOC


recv

recv             2134 win32/win32.c  #undef recv
recv              425 win32/win32.h  #undef recv
recv              427 win32/win32.h  #define recv(s, b, l, f)	rb_w32_recv(s, b, l, f)


recvfrom

recvfrom         2151 win32/win32.c  #undef recvfrom
recvfrom          430 win32/win32.h  #undef recvfrom
recvfrom          432 win32/win32.h  #define recvfrom(s, b, l, f, fr, frl) rb_w32_recvfrom(s, b, l, f, fr, frl)


regx_options

regx_options     6955 parse.c        regx_options()
regx_options     2957 parse.y        regx_options()


relocation_info

relocation_info   232 dln.c          #  undef relocation_info
relocation_info   233 dln.c          #  define relocation_info reloc_info_sparc


remove_begin

remove_begin     9189 parse.c        remove_begin(node)
remove_begin     5191 parse.y        remove_begin(node)


rename

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


ret_args

ret_args         9447 parse.c        ret_args(node)
ret_args         5449 parse.y        ret_args(node)


rmdir

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


rscheck

rscheck          3068 ext/zlib/zlib.c rscheck(rsptr, rslen, rs)
rscheck          1535 io.c           rscheck(rsptr, rslen, rs)


ruby_longjmp

ruby_longjmp      154 eval.c         #define ruby_longjmp(env, val) rb_jump_context(env, val)
ruby_longjmp      163 eval.c         #define ruby_longjmp(env,val) _longjmp(env,val)
ruby_longjmp      166 eval.c         #define ruby_longjmp(env,val) longjmp(env,val)


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_parser_stack_on_heap

ruby_parser_stack_on_heap 9770 parse.c        ruby_parser_stack_on_heap()
ruby_parser_stack_on_heap 5772 parse.y        ruby_parser_stack_on_heap()


ruby_setjmp

ruby_setjmp       155 eval.c         #define ruby_setjmp(j) ((j)->status = 0, \
ruby_setjmp       162 eval.c         #define ruby_setjmp(env) _setjmp(env)
ruby_setjmp       165 eval.c         #define ruby_setjmp(env) setjmp(env)


ruby_signal

ruby_signal       332 signal.c       ruby_signal(signum, handler)
ruby_signal       365 signal.c       #define ruby_signal(sig,handler) 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  167 ruby.c         #define rubylib_mangled_path(s, l) rb_str_new2(rubylib_mangle((s), (l)))
rubylib_mangled_path  170 ruby.c         #define rubylib_mangled_path(s, l) rb_str_new((s), (l))


rubylib_mangled_path2

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


save_mantissa

save_mantissa     222 marshal.c      save_mantissa(d, buf)
save_mantissa     287 marshal.c      #define save_mantissa(d, buf) 0


scan_hex

scan_hex           46 util.c         scan_hex(start, len, retlen)
scan_hex           39 util.h         #define scan_hex ruby_scan_hex


scan_oct

scan_oct           29 util.c         scan_oct(start, len, retlen)
scan_oct           37 util.h         #define scan_oct ruby_scan_oct


select

select           1848 win32/win32.c  #undef select
select            396 win32/win32.h  #undef select
select            397 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             2169 win32/win32.c  #undef send
send              435 win32/win32.h  #undef send
send              437 win32/win32.h  #define send(s, b, l, f)	rb_w32_send(s, b, l, f)


sendto

sendto           2186 win32/win32.c  #undef sendto
sendto            440 win32/win32.h  #undef sendto
sendto            442 win32/win32.h  #define sendto(s, b, l, f, t, tl) rb_w32_sendto(s, b, l, f, t, tl)


set_arg0space

set_arg0space     981 ruby.c         set_arg0space()
set_arg0space     998 ruby.c         #define set_arg0space() ((void)0)


setbinmode

setbinmode        122 ext/nkf/nkf-utf8/nkf.c #define setbinmode(fp) fsetbin(fp)
setbinmode        124 ext/nkf/nkf-utf8/nkf.c #define setbinmode(fp) setmode(fileno(fp), O_BINARY)
setbinmode        127 ext/nkf/nkf-utf8/nkf.c #define setbinmode(fp)


setenv

setenv           1816 hash.c         #undef setenv
setenv             51 util.h         #undef setenv
setenv             53 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             55 gc.c           #define setjmp(env) _setjmp(env)
setjmp           1281 gc.c           #undef setjmp
setjmp           1304 gc.c           #define setjmp rb_setjmp


setsockopt

setsockopt         44 win32/win32.c  #undef setsockopt
setsockopt       2204 win32/win32.c  #undef setsockopt
setsockopt        445 win32/win32.h  #undef setsockopt
setsockopt        447 win32/win32.h  #define setsockopt(s, v, n, o, l) rb_w32_setsockopt(s, v, n, o, l)


setvbuffer

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


shutdown

shutdown         2221 win32/win32.c  #undef shutdown
shutdown          450 win32/win32.h  #undef shutdown
shutdown          452 win32/win32.h  #define shutdown(s, h)		rb_w32_shutdown(s, h)


signal

signal           1348 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       2369 file.c         #define skipprefix rb_path_skip_prefix
skipprefix       2371 file.c         #define skipprefix(path) (path)


snprintf

snprintf           63 ext/socket/getnameinfo.c #define snprintf _snprintf
snprintf         1108 missing/vsnprintf.c snprintf(char *str, size_t n, char const *fmt, ...)
snprintf          198 win32/win32.h  #define snprintf   rb_w32_snprintf


sock_gethostname

sock_gethostname 2646 ext/socket/socket.c sock_gethostname(obj)
sock_gethostname 2664 ext/socket/socket.c sock_gethostname(obj)
sock_gethostname 2675 ext/socket/socket.c sock_gethostname(obj)


socket

socket           2238 win32/win32.c  #undef socket
socket            455 win32/win32.h  #undef socket
socket            457 win32/win32.h  #define socket(s, t, p)		rb_w32_socket(s, t, p)


special_local_set

special_local_set 10179 parse.c        special_local_set(c, val)
special_local_set 6181 parse.y        special_local_set(c, val)


ssl_get_error

ssl_get_error     570 ext/openssl/ossl_ssl.c #define ssl_get_error(ssl, ret) \
ssl_get_error     573 ext/openssl/ossl_ssl.c #define ssl_get_error(ssl, ret) SSL_get_error(ssl, ret)


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;


stack_type

stack_type        195 parse.c        typedef unsigned LONG_LONG stack_type;
stack_type        197 parse.c        typedef unsigned long stack_type;
stack_type         98 parse.y        typedef unsigned LONG_LONG stack_type;
stack_type        100 parse.y        typedef unsigned long stack_type;


stat

stat               41 win32/win32.c  #undef stat
stat              139 win32/win32.h  #undef stat
stat              140 win32/win32.h  #define stat(path,st)		rb_w32_stat(path,st)


str_isnumber

str_isnumber      230 ext/socket/getaddrinfo.c str_isnumber(p)
str_isnumber      670 ext/socket/socket.c str_isnumber(p)


strcasecmp

strcasecmp          6 missing/strcasecmp.c strcasecmp(p1, p2)
strcasecmp        113 win32/win32.h  #define strcasecmp(s1, s2)	stricmp(s1, s2)


strchr

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


strdup

strdup             57 util.h         #undef strdup
strdup             58 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(error)
strerror         1680 win32/win32.c  #undef strerror
strerror          309 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         6 missing/strncasecmp.c strncasecmp(p1, p2, len)
strncasecmp       114 win32/win32.h  #define strncasecmp(s1, s2, n)	strnicmp(s1, s2, n)


strrchr

strrchr            18 missing/strchr.c strrchr(s, c)
strrchr            44 wince/string_wce.c char *strrchr( const char *p, int c )


strtod

strtod             83 missing/strtod.c strtod(string, endPtr)
strtod             64 util.h         #undef strtod
strtod             65 util.h         #define strtod(s,e) ruby_strtod(s,e)


swaps

swaps              80 pack.c         #define swaps(x)	swap16(x)
swaps              83 pack.c         #define swaps(x)	((((x)&0xFF)<<24)	\


symbols_i

symbols_i        10104 parse.c        symbols_i(key, value, ary)
symbols_i        6106 parse.y        symbols_i(key, value, ary)


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             522 win32/win32.h  #undef times
times             524 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()


tok

tok              6739 parse.c        #define tok() tokenbuf
tok              2741 parse.y        #define tok() tokenbuf


tokadd

tokadd           6759 parse.c        tokadd(c)
tokadd           2761 parse.y        tokadd(c)


tokadd_escape

tokadd_escape    6869 parse.c        tokadd_escape(term)
tokadd_escape    2871 parse.y        tokadd_escape(term)


tokadd_string

tokadd_string    7029 parse.c        tokadd_string(func, term, paren, nest)
tokadd_string    3031 parse.y        tokadd_string(func, term, paren, nest)


tokfix

tokfix           6738 parse.c        #define tokfix() (tokenbuf[tokidx]='\0')
tokfix           2740 parse.y        #define tokfix() (tokenbuf[tokidx]='\0')


toklast

toklast          6741 parse.c        #define toklast() (tokidx>0?tokenbuf[tokidx-1]:0)
toklast          2743 parse.y        #define toklast() (tokidx>0?tokenbuf[tokidx-1]:0)


toklen

toklen           6740 parse.c        #define toklen() tokidx
toklen           2742 parse.y        #define toklen() tokidx


top_local_init

top_local_init   9673 parse.c        top_local_init()
top_local_init   5675 parse.y        top_local_init()


top_local_setup

top_local_setup  9691 parse.c        top_local_setup()
top_local_setup  5693 parse.y        top_local_setup()


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;
uint64_t           29 ext/digest/defs.h   typedef unsigned _int64 uint64_t;
uint64_t           31 ext/digest/defs.h   typedef unsigned __int64 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            127 win32/win32.h  #define unlink(p)		_unlink(p)
unlink            151 win32/win32.h  #undef unlink
unlink            152 win32/win32.h  #define unlink(p)		rb_w32_unlink(p)
unlink             60 wince/io.h     #define unlink	   _unlink


unsetenv

unsetenv         1817 hash.c         #undef unsetenv
unsetenv           52 util.h         #undef unsetenv
unsetenv           54 util.h         #define unsetenv(name,val) ruby_unsetenv(name);


unsigned_time_t

unsigned_time_t  1259 time.c         typedef unsigned long unsigned_time_t;
unsigned_time_t  1261 time.c         typedef unsigned int unsigned_time_t;
unsigned_time_t  1263 time.c         typedef unsigned LONG_LONG unsigned_time_t;


update_i

update_i          473 ext/dbm/dbm.c  update_i(pair, dbm)
update_i          576 ext/gdbm/gdbm.c update_i(pair, dbm)
update_i          452 ext/sdbm/init.c update_i(pair, dbm)


usage

usage            4708 ext/nkf/nkf-utf8/nkf.c usage()
usage              71 ruby.c         usage(name)


utime

utime             102 win32/win32.h  #undef utime
utime             111 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   1978 file.c         utime_internal(path, arg)
utime_internal   2024 file.c         utime_internal(path, 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      149 array.c        #define va_init_list(a,b) va_start(a,b)
va_init_list      152 array.c        #define va_init_list(a,b) va_start(a)
va_init_list      941 class.c        #define va_init_list(a,b) va_start(a,b)
va_init_list      944 class.c        #define va_init_list(a,b) va_start(a)
va_init_list       20 error.c        #define va_init_list(a,b) va_start(a,b)
va_init_list       23 error.c        #define va_init_list(a,b) va_start(a)
va_init_list       68 eval.c         #define va_init_list(a,b) va_start(a,b)
va_init_list       71 eval.c         #define va_init_list(a,b) va_start(a)
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       27 ext/win32ole/win32ole.c #define va_init_list(a,b) va_start(a,b)
va_init_list       30 ext/win32ole/win32ole.c #define va_init_list(a,b) va_start(a)
va_init_list      231 struct.c       #define va_init_list(a,b) va_start(a,b)
va_init_list      234 struct.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


value_expr

value_expr        234 parse.c        #define value_expr(node) value_expr0((node) = remove_begin(node))
value_expr        137 parse.y        #define value_expr(node) value_expr0((node) = remove_begin(node))


value_expr0

value_expr0      9022 parse.c        value_expr0(node)
value_expr0      5024 parse.y        value_expr0(node)


void_expr

void_expr         235 parse.c        #define void_expr(node) void_expr0((node) = remove_begin(node))
void_expr         138 parse.y        #define void_expr(node) void_expr0((node) = remove_begin(node))


void_expr0

void_expr0       9078 parse.c        void_expr0(node)
void_expr0       5080 parse.y        void_expr0(node)


void_stmts

void_stmts       9174 parse.c        void_stmts(node)
void_stmts       5176 parse.y        void_stmts(node)


vsnprintf

vsnprintf        1077 missing/vsnprintf.c vsnprintf(str, n, fmt, ap)
vsnprintf         197 win32/win32.h  #define vsnprintf(s,n,f,l) rb_w32_vsnprintf(s,n,f,l)


vtohd

vtohd             217 pack.c         #define vtohd(x) (endian()?swapd(x):(x))
vtohd             243 pack.c         #define vtohd(x) swapd(x)
vtohd             272 pack.c         #define vtohd(x) (x)


vtohf

vtohf             216 pack.c         #define vtohf(x) (endian()?swapf(x):(x))
vtohf             242 pack.c         #define vtohf(x) swapf(x)
vtohf             271 pack.c         #define vtohf(x) (x)


vtohl

vtohl             215 pack.c         #define vtohl(x) (endian()?swapl(x):(x))
vtohl             241 pack.c         #define vtohl(x) swapl(x)
vtohl             270 pack.c         #define vtohl(x) (x)


vtohs

vtohs             214 pack.c         #define vtohs(x) (endian()?swaps(x):(x))
vtohs             240 pack.c         #define vtohs(x) swaps(x)
vtohs             269 pack.c         #define vtohs(x) (x)


warn_print

warn_print        116 error.c        warn_print(fmt, args)
warn_print       1130 eval.c         #define warn_print(x) rb_write_error(x)


warn_unless_e_option

warn_unless_e_option 9262 parse.c        warn_unless_e_option(node, str)
warn_unless_e_option 5264 parse.y        warn_unless_e_option(node, str)


warning_unless_e_option

warning_unless_e_option 9270 parse.c        warning_unless_e_option(node, str)
warning_unless_e_option 5272 parse.y        warning_unless_e_option(node, str)


was_bol

was_bol          6735 parse.c        #define was_bol() (lex_p == lex_pbeg + 1)
was_bol          2737 parse.y        #define was_bol() (lex_p == lex_pbeg + 1)


whole_match_p

whole_match_p    7237 parse.c        whole_match_p(eos, len, indent)
whole_match_p    3239 parse.y        whole_match_p(eos, len, indent)


write

write             128 win32/win32.h  #define write(h, b, l)		_write(h, b, l)
write              64 wince/io.h     #define write	   _write


xfree

xfree              47 defines.h      #define xfree ruby_xfree
xfree              57 missing/alloca.c #define xfree ruby_xfree


xmalloc

xmalloc            44 defines.h      #define xmalloc ruby_xmalloc
xmalloc            56 missing/alloca.c #define xmalloc ruby_xmalloc


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;


yychar

yychar             54 ext/syck/gram.c #define yychar  syckchar
yychar            144 parse.c        #define yychar ruby_yychar
yychar             47 parse.y        #define yychar ruby_yychar


yyclearin

yyclearin         605 ext/syck/gram.c #define yyclearin	(yychar = YYEMPTY)
yyclearin        3115 parse.c        #define yyclearin	(yychar = YYEMPTY)


yycompile

yycompile        6562 parse.c        yycompile(f, line)
yycompile        2564 parse.y        yycompile(f, line)


yydebug

yydebug            55 ext/syck/gram.c #define yydebug syckdebug
yydebug           145 parse.c        #define yydebug ruby_yydebug
yydebug            48 parse.y        #define yydebug ruby_yydebug


yyerrok

yyerrok           604 ext/syck/gram.c #define yyerrok		(yyerrstatus = 0)
yyerrok          3114 parse.c        #define yyerrok		(yyerrstatus = 0)


yyerror

yyerror            52 ext/syck/gram.c #define yyerror syckerror
yyerror           142 parse.c        #define yyerror ruby_yyerror
yyerror          6508 parse.c        yyerror(msg)
yyerror            45 parse.y        #define yyerror ruby_yyerror
yyerror          2510 parse.y        yyerror(msg)


yylex

yylex              51 ext/syck/gram.c #define yylex   sycklex
yylex             141 parse.c        #define yylex ruby_yylex
yylex            7347 parse.c        yylex()
yylex              44 parse.y        #define yylex ruby_yylex
yylex            3349 parse.y        yylex()


yylval

yylval             53 ext/syck/gram.c #define yylval  sycklval
yylval            143 parse.c        #define yylval ruby_yylval
yylval             46 parse.y        #define yylval ruby_yylval


yyparse

yyparse            50 ext/syck/gram.c #define yyparse syckparse
yyparse           929 ext/syck/gram.c int yyparse (void *YYPARSE_PARAM)
yyparse           140 parse.c        #define yyparse ruby_yyparse
yyparse          3338 parse.c        yyparse (YYPARSE_PARAM_ARG)
yyparse            43 parse.y        #define yyparse ruby_yyparse
yyparse           344 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)
yystpcpy         3250 parse.c        #   define yystpcpy stpcpy
yystpcpy         3256 parse.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)
yystrlen         3226 parse.c        #   define yystrlen strlen
yystrlen         3231 parse.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 */
yystype           311 parse.c        } yystype;


ext/

root/ext/

[..]
  1. Win32API/
  2. bigdecimal/
  3. curses/
  4. dbm/
  5. digest/
  6. dl/
  7. enumerator/
  8. etc/
  9. fcntl/
  10. gdbm/
  11. iconv/
  12. io/
  13. nkf/
  14. openssl/
  15. pty/
  16. racc/
  17. readline/
  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. dl.c
  2. dl.h
  3. handle.c
  4. ptr.c
  5. sample/
  6. sym.c
  7. test/
[..]


ext/dl/sample/

root/ext/dl/sample/

[..]
  1. c++sample.C
[..]


ext/dl/test/

root/ext/dl/test/

[..]
  1. test.c
[..]


ext/enumerator/

root/ext/enumerator/

[..]
  1. enumerator.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/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


defines.h

defines.h   65 regex.c        #include "defines.h"
defines.h   25 ruby.h         #include "defines.h"
defines.h    6 st.c           #include "defines.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   23 io.c           #include "env.h"
env.h   14 numeric.c      #include "env.h"
env.h  119 parse.c        #include "env.h"
env.h   22 parse.y        #include "env.h"
env.h   14 struct.c       #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 1131 dln.c          #include "dl.h"
dl.h    8 ext/dl/dl.c    #include "dl.h"
dl.h    6 ext/dl/handle.c #include "dl.h"
dl.h    8 ext/dl/ptr.c   #include "dl.h"
dl.h    7 ext/dl/sym.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   22 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   24 regex.c        #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   84 ext/socket/getaddrinfo.c #include "addrinfo.h"
addrinfo.h   73 ext/socket/getnameinfo.c #include "addrinfo.h"
addrinfo.h   70 ext/socket/socket.c # include "addrinfo.h"


sockport.h

sockport.h   85 ext/socket/getaddrinfo.c #include "sockport.h"
sockport.h   74 ext/socket/getnameinfo.c #include "sockport.h"
sockport.h   72 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  120 parse.c        #include "intern.h"
intern.h   23 parse.y        #include "intern.h"
intern.h  678 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   15 class.c        #include "node.h"
node.h   14 enum.c         #include "node.h"
node.h   16 eval.c         #include "node.h"
node.h   16 ext/enumerator/enumerator.c #include "node.h"
node.h   18 gc.c           #include "node.h"
node.h  121 parse.c        #include "node.h"
node.h   24 parse.y        #include "node.h"
node.h   24 ruby.c         #include "node.h"
node.h   17 variable.c     #include "node.h"


re.h

re.h   17 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"


regex.h

regex.h 6479 parse.c        #include "regex.h"
regex.h 2481 parse.y        #include "regex.h"
regex.h   19 re.h           #include "regex.h"
regex.h  157 regex.c        #include "regex.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   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/dl.c    #include <ruby.h>
ruby.h    8 ext/dl/dl.h    #include <ruby.h>
ruby.h    5 ext/dl/handle.c #include <ruby.h>
ruby.h    5 ext/dl/ptr.c   #include <ruby.h>
ruby.h    5 ext/dl/sym.c   #include <ruby.h>
ruby.h   15 ext/enumerator/enumerator.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   66 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   16 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   20 io.c           #include "ruby.h"
ruby.h   13 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  118 parse.c        #include "ruby.h"
ruby.h   21 parse.y        #include "ruby.h"
ruby.h   13 prec.c         #include "ruby.h"
ruby.h   15 process.c      #include "ruby.h"
ruby.h  180 random.c       #include "ruby.h"
ruby.h   13 range.c        #include "ruby.h"
ruby.h   12 re.c           #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/dl.c    #include <rubyio.h>
rubyio.h   15 ext/io/wait/wait.c #include "rubyio.h"
rubyio.h   67 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   21 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   22 io.c           #include "rubysig.h"
rubysig.h   16 process.c      #include "rubysig.h"
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  185 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  122 parse.c        #include "st.h"
st.h   25 parse.y        #include "st.h"
st.h   48 process.c      #include "st.h"
st.h   12 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  184 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   93 io.c           #include "util.h"
util.h   16 marshal.c      #include "util.h"
util.h   17 object.c       #include "util.h"
util.h 6480 parse.c        #include "util.h"
util.h 2482 parse.y        #include "util.h"
util.h  187 regex.c        #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    7 ext/dl/ptr.c   #include <version.h> /* for ruby version code */
version.h   18 ext/strscan/strscan.c #include "version.h"
version.h   11 ext/tk/tcltklib.c #include "version.h"
version.h  304 math.c         # include <cygwin/version.h>
version.h   14 version.c      #include "version.h"


vmsruby_private.h

vmsruby_private.h   91 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   32 win32/win32.c  #include "win32/dir.h"


win32.h

win32.h  183 defines.h      #include "win32/win32.h"
win32.h   31 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   58 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  159 dln.c          #include <errno.h>
errno.h 1130 dln.c          #include <errno.h>
errno.h 1136 dln.c          #include <errno.h>	/* for global errno	*/
errno.h  288 error.c        #include <errno.h>
errno.h  172 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/sym.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   35 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   47 ext/socket/socket.c #include <errno.h>
errno.h   25 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   55 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  124 parse.c        #include <errno.h>
errno.h   27 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  116 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   63 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   48 io.c           #include <fcntl.h>
fcntl.h   50 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  189 random.c       #include <fcntl.h>
fcntl.h   71 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  117 ext/nkf/nkf-utf8/nkf.c #include <io.h>
io.h   75 ext/sdbm/_sdbm.c #include <io.h>
io.h   72 ext/socket/getaddrinfo.c #include <io.h>
io.h   70 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   27 process.c      #include <process.h>
process.h   17 win32/win32.c  #include <process.h>
process.h   59 win32/win32.h  #include <process.h>
process.h    6 wince/process_wce.c #include "process.h"


signal.h

signal.h  171 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   62 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   77 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  107 missing/vsnprintf.c #include <stddef.h>
stddef.h 3106 parse.c        #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
stddef.h   48 regex.c        # include <stddef.h>
stddef.h   44 regex.h        #include <stddef.h>
stddef.h   41 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  182 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   61 file.c         #include <sys/stat.h>
stat.h   63 io.c           #include <sys/stat.h>
stat.h  187 random.c       #include <sys/stat.h>
stat.h   66 util.c         #include <sys/stat.h>
stat.h   18 win32/win32.c  #include <sys/stat.h>
stat.h   63 win32/win32.h  #include <sys/stat.h>
stat.h   12 wince/sys/stat.c #include <sys/stat.h>


timeb.h

timeb.h 2536 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  170 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   57 ext/socket/socket.c #include <sys/types.h>
types.h   13 ext/syck/rubyext.c #include <sys/types.h>
types.h   60 file.c         #include <sys/types.h>
types.h   23 gc.c           #include <sys/types.h>
types.h   43 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  186 random.c       #include <sys/types.h>
types.h   16 re.h           #include <sys/types.h>
types.h   37 regex.c        #include <sys/types.h>
types.h   51 regex.c        # include <sys/types.h>
types.h   26 ruby.c         #include <sys/types.h>
types.h   14 time.c         #include <sys/types.h>
types.h   65 util.c         #include <sys/types.h>
types.h    4 win32/dir.h    #    include <sys/types.h>
types.h   64 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   66 win32/win32.h  # include <sys/utime.h>
utime.h   68 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   60 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   30 process.c      #include <time.h>
time.h  185 random.c       #include <time.h>
time.h   15 time.c         #include <time.h>
time.h   60 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  151 array.c        #include <varargs.h>
varargs.h  943 class.c        #include <varargs.h>
varargs.h   22 error.c        #include <varargs.h>
varargs.h   70 eval.c         #include <varargs.h>
varargs.h   27 ext/curses/curses.c #  include <varargs.h>
varargs.h   18 ext/tk/tcltklib.c #include <varargs.h>
varargs.h   29 ext/win32ole/win32ole.c #include <varargs.h>
varargs.h  132 missing.h      #  include <varargs.h>
varargs.h   79 missing/vsnprintf.c # include <varargs.h>
varargs.h 1103 missing/vsnprintf.c # include <varargs.h>
varargs.h  233 struct.c       #include <varargs.h>


wince.h

wince.h   20 ruby.c         #include "wince.h"
wince.h   34 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                 413 util.c                s = A[0]; A[0] = B[0]; B[0] = s;
A                 414 util.c                s = A[1]; A[1] = B[1]; B[1] = s;
A                 415 util.c                s = A[2]; A[2] = B[2]; B[2] = s;
A                 416 util.c                s = A[3]; A[3] = B[3]; B[3] = s;  a += 16; b += 16;
A                 419 util.c            if (low != 0) { s = A[0]; A[0] = B[0]; B[0] = s;
A                 420 util.c              if (low >= 8) { s = A[1]; A[1] = B[1]; B[1] = s;
A                 421 util.c                if (low == 12) {s = A[2]; A[2] = B[2]; B[2] = s;}}}
A                 439 util.c                s = A[0]; A[0] = B[0]; B[0] = C[0]; C[0] = s;
A                 440 util.c                s = A[1]; A[1] = B[1]; B[1] = C[1]; C[1] = s;
A                 441 util.c                s = A[2]; A[2] = B[2]; B[2] = C[2]; C[2] = s;
A                 442 util.c                s = A[3]; A[3] = B[3]; B[3] = C[3]; C[3] = s; a += 16; b += 16; c += 16;
A                 445 util.c            if (low != 0) { s = A[0]; A[0] = B[0]; B[0] = C[0]; C[0] = s;
A                 446 util.c              if (low >= 8) { s = A[1]; A[1] = B[1]; B[1] = C[1]; C[1] = s;
A                 447 util.c                if (low == 12) {s = A[2]; A[2] = B[2]; B[2] = C[2]; C[2] = s;}}}


ADD2HEAP

ADD2HEAP         10251 parse.c            return ADD2HEAP(n, cnt, ptr);
ADD2HEAP         10262 parse.c            return ADD2HEAP(n, cnt, ptr);
ADD2HEAP         10284 parse.c            return ADD2HEAP(n, cnt, ptr);
ADD2HEAP         6253 parse.y            return ADD2HEAP(n, cnt, ptr);
ADD2HEAP         6264 parse.y            return ADD2HEAP(n, cnt, ptr);
ADD2HEAP         6286 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_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        288 st.c           	ADD_DIRECT(table, key, value, hash_val, bin_pos);
ADD_DIRECT        307 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              9904 eval.c         	VALUE *start = ADJ(frame->argv);
ADJ              9952 eval.c         	frame = ADJ(frame);
ADJ              9958 eval.c         		tmp = ADJ(tmp);
ADJ              9967 eval.c         	block = ADJ(block);


AF_UNSPEC

AF_UNSPEC         611 ext/socket/getaddrinfo.c 	if (af == AF_UNSPEC) {
AF_UNSPEC         773 ext/socket/socket.c     hints.ai_family = AF_UNSPEC;
AF_UNSPEC         814 ext/socket/socket.c     case AF_UNSPEC:
AF_UNSPEC        3278 ext/socket/socket.c #ifdef AF_UNSPEC
AF_UNSPEC        3279 ext/socket/socket.c     sock_define_const("AF_UNSPEC", AF_UNSPEC);
AF_UNSPEC          60 ext/socket/sockport.h #ifndef AF_UNSPEC
AF_UNSPEC          65 ext/socket/sockport.h # define PF_UNSPEC AF_UNSPEC


AI_ADDRCONFIG

AI_ADDRCONFIG     113 ext/socket/addrinfo.h #define	AI_DEFAULT	(AI_V4MAPPED_CFG | AI_ADDRCONFIG)
AI_ADDRCONFIG     613 ext/socket/getaddrinfo.c 				AI_ADDRCONFIG|AI_ALL|AI_V4MAPPED, &h_error);
AI_ADDRCONFIG     615 ext/socket/getaddrinfo.c 		hp = getipnodebyname(hostname, af, AI_ADDRCONFIG, &h_error);
AI_ADDRCONFIG    3894 ext/socket/socket.c #ifdef AI_ADDRCONFIG
AI_ADDRCONFIG    3895 ext/socket/socket.c     sock_define_const("AI_ADDRCONFIG", AI_ADDRCONFIG);


AI_ALL

AI_ALL            613 ext/socket/getaddrinfo.c 				AI_ADDRCONFIG|AI_ALL|AI_V4MAPPED, &h_error);
AI_ALL           3888 ext/socket/socket.c #ifdef AI_ALL
AI_ALL           3889 ext/socket/socket.c     sock_define_const("AI_ALL", AI_ALL);


AI_CANONNAME

AI_CANONNAME      106 ext/socket/addrinfo.h #define	AI_MASK		(AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST)
AI_CANONNAME      173 ext/socket/getaddrinfo.c if (pai->ai_flags & AI_CANONNAME) {\
AI_CANONNAME      484 ext/socket/getaddrinfo.c 					pai->ai_flags &= ~AI_CANONNAME;
AI_CANONNAME      487 ext/socket/getaddrinfo.c 					pai->ai_flags &= ~AI_CANONNAME;
AI_CANONNAME      497 ext/socket/getaddrinfo.c 					pai->ai_flags &= ~AI_CANONNAME;
AI_CANONNAME      504 ext/socket/getaddrinfo.c 				if (! (pai->ai_flags & AI_CANONNAME)) {
AI_CANONNAME     1287 ext/socket/socket.c     return make_hostent(host, sock_addrinfo(host, Qnil, SOCK_STREAM, AI_CANONNAME), tcp_sockaddr);
AI_CANONNAME     2734 ext/socket/socket.c     return make_hostent(host, sock_addrinfo(host, Qnil, SOCK_STREAM, AI_CANONNAME), sock_sockaddr);
AI_CANONNAME     3879 ext/socket/socket.c #ifdef AI_CANONNAME
AI_CANONNAME     3880 ext/socket/socket.c     sock_define_const("AI_CANONNAME", AI_CANONNAME);


AI_DEFAULT

AI_DEFAULT       3900 ext/socket/socket.c #ifdef AI_DEFAULT
AI_DEFAULT       3901 ext/socket/socket.c     sock_define_const("AI_DEFAULT", AI_DEFAULT);


AI_MASK

AI_MASK           325 ext/socket/getaddrinfo.c 		if (hints->ai_flags & ~AI_MASK)
AI_MASK          3885 ext/socket/socket.c #ifdef AI_MASK
AI_MASK          3886 ext/socket/socket.c     sock_define_const("AI_MASK", AI_MASK);


AI_NUMERICHOST

AI_NUMERICHOST    106 ext/socket/addrinfo.h #define	AI_MASK		(AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST)
AI_NUMERICHOST    524 ext/socket/getaddrinfo.c 	if (pai->ai_flags & AI_NUMERICHOST)
AI_NUMERICHOST   2946 ext/socket/socket.c #ifdef AI_NUMERICHOST /* AIX 4.3.3 doesn't have AI_NUMERICHOST. */
AI_NUMERICHOST   2947 ext/socket/socket.c 		hints.ai_flags |= AI_NUMERICHOST;
AI_NUMERICHOST   3882 ext/socket/socket.c #ifdef AI_NUMERICHOST
AI_NUMERICHOST   3883 ext/socket/socket.c     sock_define_const("AI_NUMERICHOST", AI_NUMERICHOST);


AI_PASSIVE

AI_PASSIVE        106 ext/socket/addrinfo.h #define	AI_MASK		(AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST)
AI_PASSIVE        451 ext/socket/getaddrinfo.c 			if (pai->ai_flags & AI_PASSIVE) {
AI_PASSIVE       1081 ext/socket/socket.c 				    (type == INET_SERVER) ? AI_PASSIVE : 0);
AI_PASSIVE       3876 ext/socket/socket.c #ifdef AI_PASSIVE
AI_PASSIVE       3877 ext/socket/socket.c     sock_define_const("AI_PASSIVE", AI_PASSIVE);


AI_V4MAPPED

AI_V4MAPPED       613 ext/socket/getaddrinfo.c 				AI_ADDRCONFIG|AI_ALL|AI_V4MAPPED, &h_error);
AI_V4MAPPED      3897 ext/socket/socket.c #ifdef AI_V4MAPPED
AI_V4MAPPED      3898 ext/socket/socket.c     sock_define_const("AI_V4MAPPED", AI_V4MAPPED);


AI_V4MAPPED_CFG

AI_V4MAPPED_CFG   113 ext/socket/addrinfo.h #define	AI_DEFAULT	(AI_V4MAPPED_CFG | AI_ADDRCONFIG)
AI_V4MAPPED_CFG  3891 ext/socket/socket.c #ifdef AI_V4MAPPED_CFG
AI_V4MAPPED_CFG  3892 ext/socket/socket.c     sock_define_const("AI_V4MAPPED_CFG", AI_V4MAPPED_CFG);


ALIGN_DOUBLE

ALIGN_DOUBLE      705 ext/dl/dl.c      rb_define_const(rb_mDL, "ALIGN_DOUBLE",INT2NUM(ALIGN_DOUBLE));
ALIGN_DOUBLE      233 ext/dl/dl.h    #define DOUBLE_ALIGN ALIGN_DOUBLE


ALIGN_FLOAT

ALIGN_FLOAT       703 ext/dl/dl.c      rb_define_const(rb_mDL, "ALIGN_FLOAT", INT2NUM(ALIGN_FLOAT));
ALIGN_FLOAT       232 ext/dl/dl.h    #define FLOAT_ALIGN  ALIGN_FLOAT


ALIGN_INT

ALIGN_INT         701 ext/dl/dl.c      rb_define_const(rb_mDL, "ALIGN_INT",   INT2NUM(ALIGN_INT));
ALIGN_INT         230 ext/dl/dl.h    #define INT_ALIGN    ALIGN_INT


ALIGN_LONG

ALIGN_LONG        702 ext/dl/dl.c      rb_define_const(rb_mDL, "ALIGN_LONG",  INT2NUM(ALIGN_LONG));
ALIGN_LONG        231 ext/dl/dl.h    #define LONG_ALIGN   ALIGN_LONG


ALIGN_SHORT

ALIGN_SHORT       704 ext/dl/dl.c      rb_define_const(rb_mDL, "ALIGN_SHORT", INT2NUM(ALIGN_SHORT));
ALIGN_SHORT       229 ext/dl/dl.h    #define SHORT_ALIGN  ALIGN_SHORT


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) */


ALIGN_VOIDP

ALIGN_VOIDP       706 ext/dl/dl.c      rb_define_const(rb_mDL, "ALIGN_VOIDP", INT2NUM(ALIGN_VOIDP));
ALIGN_VOIDP       228 ext/dl/dl.h    #define VOIDP_ALIGN  ALIGN_VOIDP


ALLOC

ALLOC            1039 dir.c          		    tmp = ALLOC(struct d_link);
ALLOC            2466 eval.c             hook = ALLOC(rb_event_hook_t);
ALLOC            7606 eval.c             struct end_proc_data *link = ALLOC(struct end_proc_data);
ALLOC            8045 eval.c         	tmp = ALLOC(struct FRAME);
ALLOC            11437 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              48 ext/stringio/stringio.c     struct StringIO *ptr = ALLOC(struct StringIO);
ALLOC             188 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             324 ext/win32ole/win32ole.c         pdisp = ALLOC(Win32OLEIDispatch);
ALLOC             157 file.c         	nst = ALLOC(struct stat);
ALLOC            3471 file.c             nst = ALLOC(struct stat);
ALLOC            3496 file.c         	nst = ALLOC(struct stat);
ALLOC             241 gc.c               tmp = ALLOC(struct gc_list);
ALLOC            2790 io.c               list = ALLOC(struct pipe_list);
ALLOC            3486 io.c           	fptr = RFILE(file)->fptr = ALLOC(OpenFile);
ALLOC            9588 parse.c            local = ALLOC(struct local_vars);
ALLOC            5590 parse.y            local = ALLOC(struct local_vars);
ALLOC             488 re.c           	    rp = ALLOC(Regexp);
ALLOC             633 re.c               rp = ALLOC(Regexp);
ALLOC             677 re.c               match->regs = ALLOC(struct re_registers);
ALLOC             324 ruby.c             list = ALLOC(struct req_list);
ALLOC             389 ruby.h             sval = ALLOC(type),\
ALLOC              54 rubyio.h           fp = RFILE(obj)->fptr = ALLOC(OpenFile);\
ALLOC             323 util.c             p = ALLOC(struct PathList);
ALLOC             348 variable.c     	entry = ALLOC(struct global_entry);
ALLOC             349 variable.c     	var = ALLOC(struct global_variable);
ALLOC             587 variable.c         trace = ALLOC(struct trace_var);
ALLOC             806 variable.c     	entry1 = ALLOC(struct global_entry);
ALLOC            1020 win32/win32.c      tmpcurr = ALLOC(NtCmdLineElement);
ALLOC            1285 win32/win32.c  	curr = ALLOC(NtCmdLineElement);


ALLOCA_N

ALLOCA_N          529 bignum.c       	    char *p = ALLOCA_N(char, len+1);
ALLOCA_N          139 dln.c              char *tmp = ALLOCA_N(char, len+1);\
ALLOCA_N         1292 dln.c          #define DLN_ERROR() (error = dln_strerror(), strcpy(ALLOCA_N(char, strlen(error) + 1), error))
ALLOCA_N          684 eval.c             buf = ALLOCA_N(char,len);
ALLOCA_N         2194 eval.c         	argv = ALLOCA_N(VALUE, argc);\
ALLOCA_N         3453 eval.c         		VALUE *vars = ALLOCA_N(VALUE, node->nd_tbl[0]+1);
ALLOCA_N         5529 eval.c             nargv = ALLOCA_N(VALUE, argc+1);
ALLOCA_N         5933 eval.c             argv = ALLOCA_N(VALUE, argc);
ALLOCA_N         5986 eval.c         	argv = ALLOCA_N(VALUE, n);
ALLOCA_N         6853 eval.c             buf = ALLOCA_N(char, strlen(feature)+8);
ALLOCA_N         8375 eval.c             _block.frame.argv = ALLOCA_N(VALUE, RARRAY(tmp)->len);
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          171 ext/dl/dl.c          d = ALLOCA_N(char, dlen + 1);
ALLOCA_N          473 ext/dl/dl.c        size = ALLOCA_N(long,1);
ALLOCA_N          575 ext/dl/ptr.c         d = ALLOCA_N(char, p - ctype + 1);
ALLOCA_N          603 ext/dl/ptr.c     pass_argv = ALLOCA_N(VALUE, pass_argc);
ALLOCA_N          618 ext/dl/ptr.c     pass_argv = ALLOCA_N(VALUE, pass_argc);
ALLOCA_N          366 ext/dl/sym.c     char *volatile guard = ALLOCA_N(char, 1); /* guard stack pointer */
ALLOCA_N          438 ext/socket/socket.c     buf = ALLOCA_N(char,len);
ALLOCA_N          295 ext/win32ole/win32ole.c     VALUE* parg = ALLOCA_N(VALUE, args);
ALLOCA_N         2026 ext/win32ole/win32ole.c         op.pNamedArgs = ALLOCA_N(OLECHAR*, cNamedArgs + 1);
ALLOCA_N         2027 ext/win32ole/win32ole.c         op.dp.rgvarg = ALLOCA_N(VARIANTARG, op.dp.cArgs);
ALLOCA_N         2030 ext/win32ole/win32ole.c         pDispID = ALLOCA_N(DISPID, cNamedArgs + 1);
ALLOCA_N         2055 ext/win32ole/win32ole.c         op.pNamedArgs = ALLOCA_N(OLECHAR*, cNamedArgs + 1);
ALLOCA_N         2057 ext/win32ole/win32ole.c             op.dp.rgvarg  = ALLOCA_N(VARIANTARG, op.dp.cArgs);
ALLOCA_N         2064 ext/win32ole/win32ole.c         realargs = ALLOCA_N(VARIANTARG, op.dp.cArgs-cNamedArgs+1);
ALLOCA_N         2083 ext/win32ole/win32ole.c         op.dp.rgdispidNamedArgs = ALLOCA_N( DISPID, 1 );
ALLOCA_N         2216 ext/win32ole/win32ole.c     dispParams.rgvarg = ALLOCA_N(VARIANTARG, dispParams.cArgs);
ALLOCA_N         2217 ext/win32ole/win32ole.c     realargs = ALLOCA_N(VARIANTARG, dispParams.cArgs);
ALLOCA_N         2354 ext/win32ole/win32ole.c         dispParams.rgdispidNamedArgs = ALLOCA_N( DISPID, 1 );
ALLOCA_N         5012 ext/win32ole/win32ole.c     bstrs = ALLOCA_N(BSTR, pFuncDesc->cParams + 1);
ALLOCA_N         2065 file.c             buf = ALLOCA_N(char, len);
ALLOCA_N          995 io.c               buf = ALLOCA_N(char, len);
ALLOCA_N         3203 io.c               path = ALLOCA_N(char, strlen(RSTRING(fname)->ptr)+1);
ALLOCA_N         2278 object.c       	char *buf = ALLOCA_N(char, strlen(p)+1);
ALLOCA_N         2330 object.c       	    char *p = ALLOCA_N(char, len+1);
ALLOCA_N         1017 pack.c             char *buff = ALLOCA_N(char, len * 4 / 3 + 6);
ALLOCA_N         6530 parse.c        	buf = ALLOCA_N(char, len+2);
ALLOCA_N         10030 parse.c        	    char *buf = ALLOCA_N(char,last+1);
ALLOCA_N         10088 parse.c        	    char *buf = ALLOCA_N(char, strlen(name)+2);
ALLOCA_N         2532 parse.y        	buf = ALLOCA_N(char, len+2);
ALLOCA_N         6032 parse.y        	    char *buf = ALLOCA_N(char,last+1);
ALLOCA_N         6090 parse.y        	    char *buf = ALLOCA_N(char, strlen(name)+2);
ALLOCA_N          966 process.c      	    new_argv = ALLOCA_N(char*, n + 2);
ALLOCA_N          969 process.c      	    new_argv[1] = strcpy(ALLOCA_N(char, strlen(argv[0]) + 1), argv[0]);
ALLOCA_N         1002 process.c          args = ALLOCA_N(char*, argc+1);
ALLOCA_N         1060 process.c          a = argv = ALLOCA_N(char*, (s-str)/2+2);
ALLOCA_N         1061 process.c          ss = ALLOCA_N(char, s-str+1);
ALLOCA_N         1101 process.c      	new_argv = ALLOCA_N(char*, n + 2);
ALLOCA_N         1104 process.c      	new_argv[1] = strcpy(ALLOCA_N(char, strlen(argv[0]) + 1), argv[0]);
ALLOCA_N         1136 process.c          args = ALLOCA_N(char*, argc + 1);
ALLOCA_N         1170 process.c          a = argv = ALLOCA_N(char*, (s - str) / 2 + 2);
ALLOCA_N         1171 process.c          s = ALLOCA_N(char, s - str + 1);
ALLOCA_N         2426 process.c          groups = ALLOCA_N(rb_gid_t, maxgroups);
ALLOCA_N         2472 process.c          groups = ALLOCA_N(rb_gid_t, ngroups);
ALLOCA_N          443 ruby.c             argv[1] = ALLOCA_N(char, s-p+2);
ALLOCA_N          909 ruby.c         			argv = ALLOCA_N(char*, origargc+3);
ALLOCA_N          459 string.c       	argv = ALLOCA_N(VALUE, RARRAY(arg)->len + 1);
ALLOCA_N          465 string.c           argv = ALLOCA_N(VALUE, 2);
ALLOCA_N          397 struct.c           mem = ALLOCA_N(VALUE, size);
ALLOCA_N          485 variable.c     	char *buf = ALLOCA_N(char, strlen(name)+2);
ALLOCA_N          794 win32/win32.c      cmd = ALLOCA_N(char, len);
ALLOCA_N          925 win32/win32.c  	    char *tmp = ALLOCA_N(char, strlen(shell) + len + sizeof(" -c ") + 2);
ALLOCA_N          932 win32/win32.c  	    char *tmp = ALLOCA_N(char, strlen(shell) + len + sizeof(" /c "));
ALLOCA_N          946 win32/win32.c  			char *tmp = ALLOCA_N(char, len + 1);
ALLOCA_N          955 win32/win32.c  		    p = ALLOCA_N(char, len + 1);
ALLOCA_N         2929 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            66 array.c        	ptr = ALLOC_N(VALUE, RARRAY(ary)->len);
ALLOC_N           127 array.c            RARRAY(ary)->ptr = ALLOC_N(VALUE, len);
ALLOC_N           338 array.c        	RARRAY(ary)->ptr = ALLOC_N(VALUE, argc);
ALLOC_N            51 bignum.c           big->digits = ALLOC_N(BDIGIT, len);
ALLOC_N           836 dir.c              alloc = ALLOC_N(char, len+1);
ALLOC_N           712 error.c            VALUE *ptr = ALLOC_N(VALUE, 3);
ALLOC_N          2147 eval.c         	copy->nd_tbl = ALLOC_N(ID, node->nd_tbl[0]+1);
ALLOC_N          2160 eval.c         				 ALLOC_N(VALUE,n),tmp__protect_tmp,n),	\
ALLOC_N          7971 eval.c         	vars = ALLOC_N(VALUE, tbl[0]+1);
ALLOC_N          8038 eval.c         	    argv = ALLOC_N(VALUE, frame->argc);
ALLOC_N          8061 eval.c         	tmp = ALLOC_N(struct BLOCK, 1);
ALLOC_N           466 ext/dl/sym.c     args = ALLOC_N(ANY_TYPE, sym->len - 1);
ALLOC_N           467 ext/dl/sym.c     dargs = ALLOC_N(ANY_TYPE, sym->len - 1);
ALLOC_N           468 ext/dl/sym.c     dtypes = ALLOC_N(int, sym->len - 1);
ALLOC_N           164 ext/readline/readline.c     result = ALLOC_N(char *, matches + 2);
ALLOC_N           167 ext/readline/readline.c 	result[i + 1] = ALLOC_N(char, RSTRING(temp)->len + 1);
ALLOC_N           199 ext/readline/readline.c 	result[0] = ALLOC_N(char, low + 1);
ALLOC_N           290 ext/readline/readline.c 	    ALLOC_N(char, RSTRING(str)->len + 1);
ALLOC_N           332 ext/readline/readline.c 	    ALLOC_N(char, RSTRING(str)->len + 1);
ALLOC_N           374 ext/readline/readline.c 	    ALLOC_N(char, RSTRING(str)->len + 1);
ALLOC_N           417 ext/readline/readline.c 	    ALLOC_N(char, RSTRING(str)->len + 1);
ALLOC_N           460 ext/readline/readline.c 	    ALLOC_N(char, RSTRING(str)->len + 1);
ALLOC_N           658 ext/strscan/strscan.c         p->regs.beg = ALLOC_N(int, RE_NREGS);
ALLOC_N           659 ext/strscan/strscan.c         p->regs.end = ALLOC_N(int, RE_NREGS);
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           479 ext/win32ole/win32ole.c         pm = ALLOC_N(char, size);
ALLOC_N           483 ext/win32ole/win32ole.c         pm = ALLOC_N(char, 1);
ALLOC_N           771 ext/win32ole/win32ole.c         psab = ALLOC_N(SAFEARRAYBOUND, dim);
ALLOC_N           772 ext/win32ole/win32ole.c         pub  = ALLOC_N(long, dim);
ALLOC_N           773 ext/win32ole/win32ole.c         pid  = ALLOC_N(long, dim);
ALLOC_N           923 ext/win32ole/win32ole.c         pID = ALLOC_N(long, dim);
ALLOC_N           924 ext/win32ole/win32ole.c         pLB = ALLOC_N(long, dim);
ALLOC_N           925 ext/win32ole/win32ole.c         pUB = ALLOC_N(long, dim);
ALLOC_N          5634 ext/win32ole/win32ole.c     pEv = ALLOC_N(IEVENTSINKOBJ, 1);
ALLOC_N           527 gc.c           	char *ptr = name = ALLOC_N(char, len + 1);
ALLOC_N          1832 hash.c         	tmpenv = ALLOC_N(char*, max+2);
ALLOC_N          1857 hash.c             environ[i] = ALLOC_N(char, len);
ALLOC_N          1122 marshal.c      	    big->digits = digits = ALLOC_N(BDIGIT, big->len);
ALLOC_N            90 missing/os2.c      argv = ALLOC_N(CHARP,(strlen(cmd) / 2 + 2));
ALLOC_N            91 missing/os2.c      cmd2 = ALLOC_N(char, (strlen(cmd) + 1));
ALLOC_N          6749 parse.c        	tokenbuf = ALLOC_N(char, 60);
ALLOC_N          9629 parse.c        	lvtbl->tbl = ALLOC_N(ID, 4);
ALLOC_N          9678 parse.c        	lvtbl->tbl = ALLOC_N(ID, lvtbl->cnt+3);
ALLOC_N          9701 parse.c        		VALUE *vars = ALLOC_N(VALUE, len+1);
ALLOC_N          2751 parse.y        	tokenbuf = ALLOC_N(char, 60);
ALLOC_N          5631 parse.y        	lvtbl->tbl = ALLOC_N(ID, 4);
ALLOC_N          5680 parse.y        	lvtbl->tbl = ALLOC_N(ID, lvtbl->cnt+3);
ALLOC_N          5703 parse.y        		VALUE *vars = ALLOC_N(VALUE, len+1);
ALLOC_N           219 random.c           buf = ALLOC_N(unsigned long, len); /* allocate longs for init_by_array */
ALLOC_N           272 random.c           digits = big->digits = ALLOC_N(BDIGIT, big->len);
ALLOC_N           635 re.c               rp->buffer = ALLOC_N(char, 16);
ALLOC_N           637 re.c               rp->fastmap = ALLOC_N(char, 256);
ALLOC_N          1367 re.c               re->str = ALLOC_N(char, len+1);
ALLOC_N           325 ruby.c             list->name = ALLOC_N(char, strlen(mod)+1);
ALLOC_N            92 string.c           RSTRING(str)->ptr = ALLOC_N(char,len+1);
ALLOC_N           232 string.c           RSTRING(str)->ptr = ALLOC_N(char, capa+1);
ALLOC_N           491 string.c           ptr = ALLOC_N(char, RSTRING(str)->len+1);
ALLOC_N           368 struct.c           st->ptr = ALLOC_N(VALUE, n);
ALLOC_N           560 struct.c           RSTRUCT(copy)->ptr = ALLOC_N(VALUE, RSTRUCT(s)->len);
ALLOC_N           383 win32/win32.c  	    NTLoginName = ALLOC_N(char, len+1);
ALLOC_N          1023 win32/win32.c      tmpcurr->str = ALLOC_N(char, tmpcurr->len + 1);
ALLOC_N          1311 win32/win32.c      buffer = ALLOC_N(char, len);
ALLOC_N          1417 win32/win32.c      p->start = ALLOC_N(char, idx);
ALLOC_N          2722 win32/win32.c  	curitem = ALLOC_N(char, curlen);
ALLOC_N          3349 win32/win32.c      myenvtop = ALLOC_N(char*, num + 1);
ALLOC_N          3352 win32/win32.c  	    *myenv = ALLOC_N(char, strlen(env) + 1);


ALLOW_INTS

ALLOW_INTS        887 class.c            ALLOW_INTS;
ALLOW_INTS       1342 eval.c         	ALLOW_INTS;
ALLOW_INTS       6713 eval.c         	ALLOW_INTS;


ALT

ALT               594 missing/vsnprintf.c 			flags |= ALT;
ALT               697 missing/vsnprintf.c 				flags |= ALT;
ALT               729 missing/vsnprintf.c 				if (ndig > 1 || flags & ALT)
ALT               734 missing/vsnprintf.c 					if (prec || flags & ALT)
ALT               740 missing/vsnprintf.c 				if (flags & ALT)
ALT               846 missing/vsnprintf.c 			if (flags & ALT &&
ALT               874 missing/vsnprintf.c 					    flags & ALT, xdigs);
ALT               881 missing/vsnprintf.c 					    flags & ALT, xdigs);
ALT               946 missing/vsnprintf.c 					    (flags & ALT) == 0) {
ALT               959 missing/vsnprintf.c 					if (flags & ALT)
ALT               968 missing/vsnprintf.c 				if (ndig > 1 || flags & ALT) {
ALT               972 missing/vsnprintf.c 					if (_double || flags & ALT == 0) {
ALT              1028 missing/vsnprintf.c 	if (flags & ALT) {	/* Print trailing zeros */


ANSI_C_PROTOTYPE

ANSI_C_PROTOTYPE  268 ext/nkf/nkf-utf8/nkf.c #ifdef ANSI_C_PROTOTYPE
ANSI_C_PROTOTYPE 1333 ext/nkf/nkf-utf8/nkf.c #ifdef ANSI_C_PROTOTYPE
ANSI_C_PROTOTYPE 1356 ext/nkf/nkf-utf8/nkf.c #ifdef ANSI_C_PROTOTYPE
ANSI_C_PROTOTYPE 3743 ext/nkf/nkf-utf8/nkf.c #ifdef ANSI_C_PROTOTYPE


ANY

ANY               310 ext/socket/getaddrinfo.c 	pai->ai_socktype = ANY;
ANY               311 ext/socket/getaddrinfo.c 	pai->ai_protocol = ANY;
ANY               316 ext/socket/getaddrinfo.c 	port = ANY;
ANY               339 ext/socket/getaddrinfo.c 		case ANY:
ANY               341 ext/socket/getaddrinfo.c 			case ANY:
ANY               362 ext/socket/getaddrinfo.c 			    pai->ai_protocol != ANY)
ANY               368 ext/socket/getaddrinfo.c 			    pai->ai_protocol != ANY)
ANY               383 ext/socket/getaddrinfo.c 			if (pai->ai_socktype == ANY) {
ANY               395 ext/socket/getaddrinfo.c 			case ANY:
ANY               411 ext/socket/getaddrinfo.c 			if (pai->ai_socktype == ANY)


ANY2C

ANY2C             513 ext/dl/sym.c         ANY2C(args[i]) = DLCHAR(NUM2CHR(argv[i]));
ANY2C             517 ext/dl/sym.c         ANY2C(dargs[i]) = DLCHAR(NUM2CHR(argv[i]));
ANY2C             518 ext/dl/sym.c         ANY2P(args[i]) = DLVOIDP(&(ANY2C(dargs[i])));
ANY2C             687 ext/dl/sym.c         DLSTACK_PUSH_C(ANY2C(args[i]));
ANY2C             844 ext/dl/sym.c       val = CHR2FIX((char)(ANY2C(ret)));


ANY2D

ANY2D             566 ext/dl/sym.c         ANY2D(args[i]) = RFLOAT(argv[i])->value;
ANY2D             571 ext/dl/sym.c         ANY2D(dargs[i]) = RFLOAT(argv[i])->value;
ANY2D             572 ext/dl/sym.c         ANY2P(args[i]) = DLVOIDP(&(ANY2D(dargs[i])));
ANY2D             717 ext/dl/sym.c         DLSTACK_PUSH_D(ANY2D(args[i]));
ANY2D             864 ext/dl/sym.c       val = rb_float_new((double)(ANY2D(ret)));


ANY2F

ANY2F             554 ext/dl/sym.c         ANY2F(args[i]) = DLFLOAT(RFLOAT(argv[i])->value);
ANY2F             559 ext/dl/sym.c         ANY2F(dargs[i]) = DLFLOAT(RFLOAT(argv[i])->value);
ANY2F             560 ext/dl/sym.c         ANY2P(args[i]) = DLVOIDP(&(ANY2F(dargs[i])));
ANY2F             711 ext/dl/sym.c         DLSTACK_PUSH_F(ANY2F(args[i]));
ANY2F             860 ext/dl/sym.c       val = rb_float_new((double)(ANY2F(ret)));


ANY2H

ANY2H             523 ext/dl/sym.c         ANY2H(args[i]) = DLSHORT(NUM2INT(argv[i]));
ANY2H             527 ext/dl/sym.c         ANY2H(dargs[i]) = DLSHORT(NUM2INT(argv[i]));
ANY2H             528 ext/dl/sym.c         ANY2P(args[i]) = DLVOIDP(&(ANY2H(dargs[i])));
ANY2H             693 ext/dl/sym.c         DLSTACK_PUSH_H(ANY2H(args[i]));
ANY2H             848 ext/dl/sym.c       val = INT2NUM((short)(ANY2H(ret)));


ANY2I

ANY2I             116 ext/dl/dl.h    # define ANY2C(x)  ANY2I(x)
ANY2I             126 ext/dl/dl.h    # define ANY2H(x)  ANY2I(x)
ANY2I             533 ext/dl/sym.c         ANY2I(args[i]) = DLINT(NUM2INT(argv[i]));
ANY2I             537 ext/dl/sym.c         ANY2I(dargs[i]) = DLINT(NUM2INT(argv[i]));
ANY2I             538 ext/dl/sym.c         ANY2P(args[i]) = DLVOIDP(&(ANY2I(dargs[i])));
ANY2I             699 ext/dl/sym.c         DLSTACK_PUSH_I(ANY2I(args[i]));
ANY2I             852 ext/dl/sym.c       val = INT2NUM((int)(ANY2I(ret)));


ANY2L

ANY2L             543 ext/dl/sym.c         ANY2L(args[i]) = DLNUM2LONG(argv[i]);
ANY2L             547 ext/dl/sym.c         ANY2L(dargs[i]) = DLNUM2LONG(argv[i]);
ANY2L             548 ext/dl/sym.c         ANY2P(args[i]) = DLVOIDP(&(ANY2L(dargs[i])));
ANY2L             705 ext/dl/sym.c         DLSTACK_PUSH_L(ANY2L(args[i]));
ANY2L             856 ext/dl/sym.c       val = DLLONG2NUM((long)(ANY2L(ret)));


ANY2P

ANY2P             131 ext/dl/dl.h    #define ANY2S(x) ANY2P(x)
ANY2P             483 ext/dl/sym.c   	  ANY2P(args[i]) = DLVOIDP(0);
ANY2P             496 ext/dl/sym.c   	  ANY2P(args[i]) = DLVOIDP(data->ptr);
ANY2P             505 ext/dl/sym.c   	ANY2P(args[i]) = DLVOIDP(0);
ANY2P             508 ext/dl/sym.c   	ANY2P(args[i]) = DLVOIDP(rb_ary2cary(0, argv[i], NULL));
ANY2P             518 ext/dl/sym.c         ANY2P(args[i]) = DLVOIDP(&(ANY2C(dargs[i])));
ANY2P             528 ext/dl/sym.c         ANY2P(args[i]) = DLVOIDP(&(ANY2H(dargs[i])));
ANY2P             538 ext/dl/sym.c         ANY2P(args[i]) = DLVOIDP(&(ANY2I(dargs[i])));
ANY2P             548 ext/dl/sym.c         ANY2P(args[i]) = DLVOIDP(&(ANY2L(dargs[i])));
ANY2P             560 ext/dl/sym.c         ANY2P(args[i]) = DLVOIDP(&(ANY2F(dargs[i])));
ANY2P             572 ext/dl/sym.c         ANY2P(args[i]) = DLVOIDP(&(ANY2D(dargs[i])));
ANY2P             680 ext/dl/sym.c         DLSTACK_PUSH_P(ANY2P(args[i]));
ANY2P             684 ext/dl/sym.c         DLSTACK_PUSH_P(ANY2P(args[i]));
ANY2P             690 ext/dl/sym.c         DLSTACK_PUSH_P(ANY2P(args[i]));
ANY2P             696 ext/dl/sym.c         DLSTACK_PUSH_P(ANY2P(args[i]));
ANY2P             702 ext/dl/sym.c         DLSTACK_PUSH_P(ANY2P(args[i]));
ANY2P             708 ext/dl/sym.c         DLSTACK_PUSH_P(ANY2P(args[i]));
ANY2P             714 ext/dl/sym.c         DLSTACK_PUSH_P(ANY2P(args[i]));
ANY2P             720 ext/dl/sym.c         DLSTACK_PUSH_P(ANY2P(args[i]));
ANY2P             837 ext/dl/sym.c       val = rb_dlptr_new((void*)(ANY2P(ret)), 0, 0);
ANY2P             840 ext/dl/sym.c       val = rb_dlptr_new((void*)(ANY2P(ret)), 0, dlfree);
ANY2P             896 ext/dl/sym.c   	rb_ary_push(dvals, CHR2FIX(*((char*)(ANY2P(args[i])))));
ANY2P             899 ext/dl/sym.c   	rb_ary_push(dvals, INT2NUM(*((short*)(ANY2P(args[i])))));
ANY2P             902 ext/dl/sym.c   	rb_ary_push(dvals, INT2NUM(*((int*)(ANY2P(args[i])))));
ANY2P             905 ext/dl/sym.c           rb_ary_push(dvals, DLLONG2NUM(*((long*)(ANY2P(args[i])))));
ANY2P             908 ext/dl/sym.c   	rb_ary_push(dvals, rb_float_new(*((float*)(ANY2P(args[i])))));
ANY2P             911 ext/dl/sym.c   	rb_ary_push(dvals, rb_float_new(*((double*)(ANY2P(args[i])))));
ANY2P             914 ext/dl/sym.c   	rb_ary_push(dvals, rb_dlptr_new((void*)(ANY2P(args[i])), 0, 0));
ANY2P             917 ext/dl/sym.c   	rb_ary_push(dvals, rb_dlptr_new((void*)ANY2P(args[i]), 0, 0));
ANY2P             937 ext/dl/sym.c   	dlfree((void*)ANY2P(args[i]));


ANY2S

ANY2S             578 ext/dl/sym.c   	ANY2S(args[i]) = DLSTR(0);
ANY2S             583 ext/dl/sym.c   	ANY2S(args[i]) = DLSTR(RSTRING(str)->ptr);
ANY2S             591 ext/dl/sym.c   	ANY2S(args[i]) = DLSTR(dlmalloc(RSTRING(str)->len + 1));
ANY2S             592 ext/dl/sym.c   	memcpy((char*)(ANY2S(args[i])), RSTRING(str)->ptr, RSTRING(str)->len + 1);
ANY2S             724 ext/dl/sym.c         DLSTACK_PUSH_P(ANY2S(args[i]));
ANY2S             867 ext/dl/sym.c       if( ANY2S(ret) ){
ANY2S             868 ext/dl/sym.c         val = rb_tainted_str_new2((char*)(ANY2S(ret)));
ANY2S             875 ext/dl/sym.c       if( ANY2S(ret) ){
ANY2S             876 ext/dl/sym.c         val = rb_tainted_str_new2((char*)(ANY2S(ret)));
ANY2S             878 ext/dl/sym.c   	printf("dlfree(%s)\n",(char*)(ANY2S(ret)));
ANY2S             880 ext/dl/sym.c         dlfree((void*)(ANY2S(ret)));
ANY2S             920 ext/dl/sym.c   	rb_ary_push(dvals, rb_tainted_str_new2((char*)ANY2S(args[i])));
ANY2S             922 ext/dl/sym.c   	  printf("dlfree(%s)\n",(char*)ANY2S(args[i]));
ANY2S             924 ext/dl/sym.c   	dlfree((void*)ANY2S(args[i]));


ANYARGS

ANYARGS          1391 array.c            VALUE (*func)(ANYARGS);
ANYARGS          5194 eval.c             VALUE (*it_proc) _((VALUE)), (*bl_proc)(ANYARGS);
ANYARGS          5259 eval.c         rb_rescue2(VALUE (*b_proc)(ANYARGS), VALUE data1, VALUE (*r_proc)(ANYARGS), VALUE data2, ...)
ANYARGS          5262 eval.c             VALUE (*b_proc)(ANYARGS), (*r_proc)(ANYARGS);
ANYARGS          9291 eval.c             VALUE (*func)(ANYARGS);	/* VALUE yieldarg[, VALUE procarg] */
ANYARGS            56 intern.h       VALUE rb_protect_inspect _((VALUE(*)(ANYARGS),VALUE,VALUE));
ANYARGS           118 intern.h       void rb_define_method_id _((VALUE, ID, VALUE (*)(ANYARGS), int));
ANYARGS           121 intern.h       void rb_define_protected_method _((VALUE, const char*, VALUE (*)(ANYARGS), int));
ANYARGS           122 intern.h       void rb_define_private_method _((VALUE, const char*, VALUE (*)(ANYARGS), int));
ANYARGS           123 intern.h       void rb_define_singleton_method _((VALUE, const char*, VALUE(*)(ANYARGS), int));
ANYARGS           186 intern.h       VALUE rb_proc_new _((VALUE (*)(ANYARGS/* VALUE yieldarg[, VALUE procarg] */), VALUE));
ANYARGS           210 intern.h       VALUE rb_thread_create _((VALUE (*)(ANYARGS), void*));
ANYARGS           253 intern.h       void st_foreach_safe _((struct st_table *, int (*)(ANYARGS), unsigned long));
ANYARGS           254 intern.h       void rb_hash_foreach _((VALUE, int (*)(ANYARGS), VALUE));
ANYARGS           135 node.h         	VALUE (*cfunc)(ANYARGS);
ANYARGS           487 ruby.h         void rb_define_virtual_variable _((const char*,VALUE(*)(ANYARGS),void(*)(ANYARGS)));
ANYARGS           488 ruby.h         void rb_define_hooked_variable _((const char*,VALUE*,VALUE(*)(ANYARGS),void(*)(ANYARGS)));
ANYARGS           495 ruby.h         #define RUBY_METHOD_FUNC(func) ((VALUE (*)(ANYARGS))func)
ANYARGS           496 ruby.h         void rb_define_method _((VALUE,const char*,VALUE(*)(ANYARGS),int));
ANYARGS           497 ruby.h         void rb_define_module_function _((VALUE,const char*,VALUE(*)(ANYARGS),int));
ANYARGS           498 ruby.h         void rb_define_global_function _((const char*,VALUE(*)(ANYARGS),int));
ANYARGS           553 ruby.h         VALUE rb_iterate _((VALUE(*)(VALUE),VALUE,VALUE(*)(ANYARGS),VALUE));
ANYARGS           554 ruby.h         VALUE rb_rescue _((VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE));
ANYARGS           555 ruby.h         VALUE rb_rescue2 __((VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE,...));
ANYARGS           556 ruby.h         VALUE rb_ensure _((VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE));
ANYARGS           557 ruby.h         VALUE rb_catch _((const char*,VALUE(*)(ANYARGS),VALUE));
ANYARGS            75 rubysig.h      VALUE rb_with_disable_interrupt _((VALUE(*)(ANYARGS),VALUE));
ANYARGS            33 st.h           #ifndef ANYARGS
ANYARGS            51 st.h           int st_foreach _((st_table *, int (*)(ANYARGS), st_data_t));


ANY_TYPE

ANY_TYPE          364 ext/dl/sym.c   rb_dlsym_guardcall(char type, ANY_TYPE *ret, long *stack, void *func)
ANY_TYPE          444 ext/dl/sym.c     ANY_TYPE *args;
ANY_TYPE          445 ext/dl/sym.c     ANY_TYPE *dargs;
ANY_TYPE          446 ext/dl/sym.c     ANY_TYPE ret;
ANY_TYPE          466 ext/dl/sym.c     args = ALLOC_N(ANY_TYPE, sym->len - 1);
ANY_TYPE          467 ext/dl/sym.c     dargs = ALLOC_N(ANY_TYPE, sym->len - 1);


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     4193 io.c                 ARGF_FORWARD();\
ARGF_FORWARD     4451 io.c               ARGF_FORWARD();
ARGF_FORWARD     5194 io.c               ARGF_FORWARD();
ARGF_FORWARD     5207 io.c               ARGF_FORWARD();
ARGF_FORWARD     5218 io.c               ARGF_FORWARD();
ARGF_FORWARD     5228 io.c               ARGF_FORWARD();
ARGF_FORWARD     5238 io.c               ARGF_FORWARD();
ARGF_FORWARD     5246 io.c               ARGF_FORWARD();
ARGF_FORWARD     5255 io.c           	ARGF_FORWARD();
ARGF_FORWARD     5396 io.c               ARGF_FORWARD();
ARGF_FORWARD     5427 io.c               ARGF_FORWARD();


ARG_LEVEL

ARG_LEVEL        1149 ext/zlib/zlib.c     err = deflateInit2(&z->stream, ARG_LEVEL(level), Z_DEFLATED,
ARG_LEVEL        1223 ext/zlib/zlib.c     lev = ARG_LEVEL(level);
ARG_LEVEL        1351 ext/zlib/zlib.c     level = ARG_LEVEL(v_level);
ARG_LEVEL        2718 ext/zlib/zlib.c     gz->level = ARG_LEVEL(level);


ARG_STRATEGY

ARG_STRATEGY     1151 ext/zlib/zlib.c 		       ARG_STRATEGY(strategy));
ARG_STRATEGY     1352 ext/zlib/zlib.c     strategy = ARG_STRATEGY(v_strategy);
ARG_STRATEGY     2720 ext/zlib/zlib.c 		       -MAX_WBITS, DEF_MEM_LEVEL, ARG_STRATEGY(strategy));


ARG_WBITS

ARG_WBITS        1150 ext/zlib/zlib.c 		       ARG_WBITS(wbits), ARG_MEMLEVEL(memlevel),
ARG_WBITS        1438 ext/zlib/zlib.c     err = inflateInit2(&z->stream, ARG_WBITS(wbits));


ARY_DEFAULT_SIZE

ARY_DEFAULT_SIZE  144 array.c            return rb_ary_new2(ARY_DEFAULT_SIZE);
ARY_DEFAULT_SIZE  364 array.c        	if (new_capa < ARY_DEFAULT_SIZE) {
ARY_DEFAULT_SIZE  365 array.c        	    new_capa = ARY_DEFAULT_SIZE;
ARY_DEFAULT_SIZE  452 array.c        	    RARRAY(ary)->aux.capa > ARY_DEFAULT_SIZE) {
ARY_DEFAULT_SIZE  516 array.c        	if (capa_inc < ARY_DEFAULT_SIZE) {
ARY_DEFAULT_SIZE  517 array.c        	    capa_inc = ARY_DEFAULT_SIZE;
ARY_DEFAULT_SIZE 1864 array.c        	    RARRAY(ary)->aux.capa > ARY_DEFAULT_SIZE) {
ARY_DEFAULT_SIZE 2188 array.c            if (ARY_DEFAULT_SIZE * 2 < RARRAY(ary)->aux.capa) {
ARY_DEFAULT_SIZE 2189 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, ARY_DEFAULT_SIZE * 2);
ARY_DEFAULT_SIZE 2190 array.c        	RARRAY(ary)->aux.capa = ARY_DEFAULT_SIZE * 2;


ARY_TMPLOCK

ARY_TMPLOCK        52 array.c            if (FL_TEST(ary, ARY_TMPLOCK))
ARY_TMPLOCK        94 array.c            if (FL_TEST(ary, ARY_TMPLOCK)) return Qtrue;
ARY_TMPLOCK      1618 array.c            FL_UNSET(ary, ARY_TMPLOCK);
ARY_TMPLOCK      1644 array.c        	FL_SET(ary, ARY_TMPLOCK);	/* prohibit modification during sort */


ASCII

ASCII             552 ext/nkf/nkf-utf8/nkf.c static int output_mode = ASCII,    /* output kanji mode */
ASCII             553 ext/nkf/nkf-utf8/nkf.c            input_mode =  ASCII,    /* input kanji mode */
ASCII            1904 ext/nkf/nkf-utf8/nkf.c     input_mode = ASCII;
ASCII            1905 ext/nkf/nkf-utf8/nkf.c     output_mode = ASCII;
ASCII            2127 ext/nkf/nkf-utf8/nkf.c                             input_mode = ASCII; shift_mode = FALSE;
ASCII            2130 ext/nkf/nkf-utf8/nkf.c                             input_mode = ASCII; shift_mode = FALSE;
ASCII            2158 ext/nkf/nkf-utf8/nkf.c                 input_mode = ASCII; set_iconv(FALSE, 0);
ASCII            2700 ext/nkf/nkf-utf8/nkf.c 	output_mode = ASCII;
ASCII            2782 ext/nkf/nkf-utf8/nkf.c 	output_mode = ASCII;
ASCII            2905 ext/nkf/nkf-utf8/nkf.c 	output_mode = ASCII;
ASCII            2961 ext/nkf/nkf-utf8/nkf.c         if (output_mode !=ASCII && output_mode!=ISO8859_1) {
ASCII            2965 ext/nkf/nkf-utf8/nkf.c 	    output_mode = ASCII;
ASCII            2995 ext/nkf/nkf-utf8/nkf.c         if (output_mode !=ASCII && output_mode!=ISO8859_1) {
ASCII            2999 ext/nkf/nkf-utf8/nkf.c             output_mode = ASCII;
ASCII            3042 ext/nkf/nkf-utf8/nkf.c             && (input_mode==ASCII || input_mode==X0201)) {
ASCII            3504 ext/nkf/nkf-utf8/nkf.c     ASCII,
ASCII            4019 ext/nkf/nkf-utf8/nkf.c         if (mimebuf_f!=FIXED_MIME) input_mode = ASCII;
ASCII            4023 ext/nkf/nkf-utf8/nkf.c         input_mode = ASCII;
ASCII            4097 ext/nkf/nkf-utf8/nkf.c         if (mimebuf_f!=FIXED_MIME) input_mode = ASCII;
ASCII            4105 ext/nkf/nkf-utf8/nkf.c         if (mimebuf_f!=FIXED_MIME) input_mode = ASCII;
ASCII            4432 ext/nkf/nkf-utf8/nkf.c         if (c <= DEL && (output_mode==ASCII ||output_mode == ISO8859_1 ) ) {
ASCII            4451 ext/nkf/nkf-utf8/nkf.c         if (c <= DEL && (output_mode==ASCII ||output_mode == ISO8859_1)) {
ASCII            4502 ext/nkf/nkf-utf8/nkf.c         if ( c<=DEL && (output_mode==ASCII ||output_mode == ISO8859_1 ) ) {
ASCII            4667 ext/nkf/nkf-utf8/nkf.c     output_mode = ASCII;
ASCII            4668 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        426 signal.c       	ATOMIC_INC(rb_trap_pending);
ATOMIC_INC        427 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        423 signal.c       	ATOMIC_SET(rb_trap_immediate, 1);


AT_STRINGS_BEG

AT_STRINGS_BEG   3474 regex.c        			     IS_A_LETTER((d)-(!AT_STRINGS_BEG((d)-1)&&	\
AT_STRINGS_BEG   3898 regex.c        	if (size == 0 || AT_STRINGS_BEG(d))
AT_STRINGS_BEG   3914 regex.c        	if (AT_STRINGS_BEG(d))
AT_STRINGS_BEG   4188 regex.c        	if (AT_STRINGS_BEG(d)) {
AT_STRINGS_BEG   4202 regex.c        	if (AT_STRINGS_BEG(d)) {
AT_STRINGS_BEG   4215 regex.c        	if (IS_A_LETTER(d) && (AT_STRINGS_BEG(d) || !PREV_IS_A_LETTER(d)))
AT_STRINGS_BEG   4220 regex.c        	if (!AT_STRINGS_BEG(d) && PREV_IS_A_LETTER(d)


AT_STRINGS_END

AT_STRINGS_END   3900 regex.c        	if (d[-1] == '\n' && !AT_STRINGS_END(d))
AT_STRINGS_END   3905 regex.c        	if (AT_STRINGS_END(d)) {
AT_STRINGS_END   3920 regex.c        	if (AT_STRINGS_END(d))
AT_STRINGS_END   3926 regex.c        	if (AT_STRINGS_END(d)) {
AT_STRINGS_END   3930 regex.c        	if (*d == '\n' && AT_STRINGS_END(d+1))
AT_STRINGS_END   4189 regex.c        	  if (AT_STRINGS_END(d)) goto fail;
AT_STRINGS_END   4193 regex.c        	if (AT_STRINGS_END(d)) {
AT_STRINGS_END   4206 regex.c        	if (AT_STRINGS_END(d)) {
AT_STRINGS_END   4221 regex.c        	    && (!IS_A_LETTER(d) || AT_STRINGS_END(d)))
AT_STRINGS_END   4259 regex.c        		  || AT_STRINGS_END(d)
AT_STRINGS_END   4273 regex.c        		    || AT_STRINGS_END(d)


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;


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                 413 util.c                s = A[0]; A[0] = B[0]; B[0] = s;
B                 414 util.c                s = A[1]; A[1] = B[1]; B[1] = s;
B                 415 util.c                s = A[2]; A[2] = B[2]; B[2] = s;
B                 416 util.c                s = A[3]; A[3] = B[3]; B[3] = s;  a += 16; b += 16;
B                 419 util.c            if (low != 0) { s = A[0]; A[0] = B[0]; B[0] = s;
B                 420 util.c              if (low >= 8) { s = A[1]; A[1] = B[1]; B[1] = s;
B                 421 util.c                if (low == 12) {s = A[2]; A[2] = B[2]; B[2] = s;}}}
B                 439 util.c                s = A[0]; A[0] = B[0]; B[0] = C[0]; C[0] = s;
B                 440 util.c                s = A[1]; A[1] = B[1]; B[1] = C[1]; C[1] = s;
B                 441 util.c                s = A[2]; A[2] = B[2]; B[2] = C[2]; C[2] = s;
B                 442 util.c                s = A[3]; A[3] = B[3]; B[3] = C[3]; C[3] = s; a += 16; b += 16; c += 16;
B                 445 util.c            if (low != 0) { s = A[0]; A[0] = B[0]; B[0] = C[0]; C[0] = s;
B                 446 util.c              if (low >= 8) { s = A[1]; A[1] = B[1]; B[1] = C[1]; C[1] = s;
B                 447 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;


BADEXIT

BADEXIT            34 missing/dup2.c 			return BADEXIT;
BADEXIT            41 missing/dup2.c 			return BADEXIT;
BADEXIT            59 missing/dup2.c 	return BADEXIT;


BASE

BASE             1015 dir.c          		    sprintf(buf, "%s%s%s", base, (BASE) ? "/" : "", dp->d_name);
BASE             1033 dir.c          		    sprintf(buf, "%s%s%s", base, (BASE) ? "/" : "", dp->d_name);
BASE             1369 ext/bigdecimal/bigdecimal.c static U_LONG BASE = 10000L;    /* Base value(value must be 10**BASE_FIG) */
BASE             1524 ext/bigdecimal/bigdecimal.c     return BASE;
BASE             1779 ext/bigdecimal/bigdecimal.c         BASE = 1;
BASE             1781 ext/bigdecimal/bigdecimal.c                (BASE > 0) &&
BASE             1782 ext/bigdecimal/bigdecimal.c                ((w = BASE *(BASE + 1)) > BASE) &&((w / BASE) ==(BASE + 1))
BASE             1784 ext/bigdecimal/bigdecimal.c             BaseVal = BASE;
BASE             1785 ext/bigdecimal/bigdecimal.c             BASE = BaseVal * 10L;
BASE             1789 ext/bigdecimal/bigdecimal.c     BASE = BaseVal;
BASE             1790 ext/bigdecimal/bigdecimal.c     HALF_BASE = BASE / 2;
BASE             1791 ext/bigdecimal/bigdecimal.c     BASE1 = BASE / 10;
BASE             1814 ext/bigdecimal/bigdecimal.c         printf("  BASE   = %lu\n", BASE);
BASE             2235 ext/bigdecimal/bigdecimal.c         if(c->frac[c_pos] >= BASE) {
BASE             2236 ext/bigdecimal/bigdecimal.c             c->frac[c_pos] -= BASE;
BASE             2247 ext/bigdecimal/bigdecimal.c         if(c->frac[c_pos] >= BASE) {
BASE             2248 ext/bigdecimal/bigdecimal.c             c->frac[c_pos] -= BASE;
BASE             2317 ext/bigdecimal/bigdecimal.c                 c->frac[c_pos] = BASE - b->frac[--b_pos] - borrow;
BASE             2320 ext/bigdecimal/bigdecimal.c                 c->frac[c_pos] = BASE - borrow;
BASE             2338 ext/bigdecimal/bigdecimal.c             c->frac[c_pos] = BASE + a->frac[a_pos] - b->frac[b_pos] - borrow;
BASE             2351 ext/bigdecimal/bigdecimal.c             c->frac[c_pos] = BASE + a->frac[a_pos] - borrow;
BASE             2562 ext/bigdecimal/bigdecimal.c             Carry = s / BASE;
BASE             2563 ext/bigdecimal/bigdecimal.c             s = s -(Carry * BASE);
BASE             2565 ext/bigdecimal/bigdecimal.c             if(c->frac[ind_c] >= BASE) {
BASE             2566 ext/bigdecimal/bigdecimal.c                 s = c->frac[ind_c] / BASE;
BASE             2568 ext/bigdecimal/bigdecimal.c                 c->frac[ind_c] -= (s * BASE);
BASE             2574 ext/bigdecimal/bigdecimal.c                     if(c->frac[ii] >= BASE) {
BASE             2575 ext/bigdecimal/bigdecimal.c                         Carry = c->frac[ii] / BASE;
BASE             2576 ext/bigdecimal/bigdecimal.c                         c->frac[ii] -=(Carry * BASE);
BASE             2668 ext/bigdecimal/bigdecimal.c         b1b2p1 = b1b2 = b1p1 * BASE;
BASE             2671 ext/bigdecimal/bigdecimal.c         b1b2p1 = b1b2 = b1 * BASE + b->frac[1];
BASE             2685 ext/bigdecimal/bigdecimal.c         r1r2 = r->frac[ind_c] * BASE + r->frac[ind_c + 1];
BASE             2706 ext/bigdecimal/bigdecimal.c                     r->frac[ind_r] +=(BASE -(b->frac[ind_b] + borrow));
BASE             2741 ext/bigdecimal/bigdecimal.c             if(qb < BASE) borrow1 = 0;
BASE             2743 ext/bigdecimal/bigdecimal.c                 borrow1 = qb / BASE;
BASE             2744 ext/bigdecimal/bigdecimal.c                 qb = qb - borrow1 * BASE;
BASE             2747 ext/bigdecimal/bigdecimal.c                 r->frac[ind_r] +=(BASE - qb);
BASE             2755 ext/bigdecimal/bigdecimal.c                     r->frac[ind_r - 1] +=(BASE - borrow2);
BASE             2769 ext/bigdecimal/bigdecimal.c         while(c->frac[ind_r] >= BASE) {
BASE             2770 ext/bigdecimal/bigdecimal.c             c->frac[ind_r] -= BASE;
BASE             3258 ext/bigdecimal/bigdecimal.c        m = BASE;
BASE             3457 ext/bigdecimal/bigdecimal.c         div /=(double)((S_INT)BASE);
BASE             3502 ext/bigdecimal/bigdecimal.c             val /=(double)((S_INT)BASE);
BASE             3506 ext/bigdecimal/bigdecimal.c         val2 = 1.0 /(double)((S_INT)BASE);
BASE             3508 ext/bigdecimal/bigdecimal.c             val *=(double)((S_INT)BASE);
BASE             3517 ext/bigdecimal/bigdecimal.c         val *=(double)((S_INT)BASE);
BASE             3532 ext/bigdecimal/bigdecimal.c                       (U_LONG)(val*((double)((S_INT)BASE))));
BASE             3577 ext/bigdecimal/bigdecimal.c             while(v1 >= BASE) {
BASE             3578 ext/bigdecimal/bigdecimal.c                 v1 /= BASE;
BASE             3579 ext/bigdecimal/bigdecimal.c                 v2 *= BASE;
BASE             3661 ext/bigdecimal/bigdecimal.c         val /=(double)((S_INT)BASE);
BASE             3753 ext/bigdecimal/bigdecimal.c             if (y->frac[i]%BASE) {
BASE             3790 ext/bigdecimal/bigdecimal.c     if(div>=BASE) {
BASE             3810 ext/bigdecimal/bigdecimal.c             if (y->frac[0] >= BASE) {
BASE             3811 ext/bigdecimal/bigdecimal.c                 y->frac[0] /= BASE;
BASE             3904 ext/bigdecimal/bigdecimal.c         if(m->frac[ind_m] >= BASE) m->frac[ind_m] -= BASE;
BASE             4076 ext/bigdecimal/bigdecimal.c         if((v->frac[i] >= BASE)) {
BASE             4081 ext/bigdecimal/bigdecimal.c             printf("       BASE =%lu\n", BASE);


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             51 bignum.c           big->digits = ALLOC_N(BDIGIT, len);
BDIGIT             64 bignum.c           MEMCPY(BDIGITS(z), BDIGITS(x), BDIGIT, RBIGNUM(x)->len);
BDIGIT             74 bignum.c           BDIGIT *ds = BDIGITS(x);
BDIGIT             85 bignum.c       	REALLOC_N(RBIGNUM(x)->digits, BDIGIT, ++RBIGNUM(x)->len);
BDIGIT            104 bignum.c       	BDIGIT *ds = BDIGITS(x);
BDIGIT            138 bignum.c           BDIGIT *digits;
BDIGIT            203 bignum.c       	BDIGIT *ds;
BDIGIT            226 bignum.c           BDIGIT *digits;
BDIGIT            289 bignum.c       #define BNEG(b) (RSHIFT(((BDIGIT*)b)[QUAD_SIZE/SIZEOF_BDIGITS-1],BITSPERDIG-1) != 0)
BDIGIT            329 bignum.c           BDIGIT *zds;
BDIGIT            547 bignum.c           BDIGIT *digits;
BDIGIT            622 bignum.c           BDIGIT *ds;
BDIGIT            680 bignum.c       	    ds[k] = (BDIGIT)(num / hbase);
BDIGIT            736 bignum.c           BDIGIT *ds;
BDIGIT            797 bignum.c           BDIGIT *ds;
BDIGIT            841 bignum.c           BDIGIT c;
BDIGIT            842 bignum.c           BDIGIT *digits;
BDIGIT            861 bignum.c       	c = (BDIGIT)u;
BDIGIT            882 bignum.c           BDIGIT *ds = BDIGITS(x);
BDIGIT            991 bignum.c           if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,RBIGNUM(y)->len) != 0) return Qfalse;
BDIGIT           1013 bignum.c           if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,RBIGNUM(y)->len) != 0) return Qfalse;
BDIGIT           1053 bignum.c           BDIGIT *ds;
BDIGIT           1070 bignum.c           BDIGIT *zds;
BDIGIT           1152 bignum.c           BDIGITS(z)[i] = (BDIGIT)num;
BDIGIT           1223 bignum.c           BDIGIT *zds;
BDIGIT           1271 bignum.c           BDIGIT *xds, *yds, *zds, *tds;
BDIGIT           1274 bignum.c           BDIGIT dd, q;
BDIGIT           1291 bignum.c       	    zds[i] = (BDIGIT)(t2 / dd);
BDIGIT           1331 bignum.c       	zds[j] = (BDIGIT)t2;
BDIGIT           1342 bignum.c       	else q = (BDIGIT)((BIGUP(zds[j]) + zds[j-1])/yds[ny-1]);
BDIGIT           1641 bignum.c           BDIGIT *ds1, *ds2, *zds;
BDIGIT           1697 bignum.c           BDIGIT *ds1, *ds2, *zds;
BDIGIT           1755 bignum.c           BDIGIT *ds1, *ds2, *zds;
BDIGIT           1815 bignum.c           BDIGIT *xds, *zds;
BDIGIT           1851 bignum.c           BDIGIT *xds, *zds;
BDIGIT           1913 bignum.c           BDIGIT *xds;
BDIGIT           1953 bignum.c           BDIGIT *digits;
BDIGIT           2019 bignum.c       	BDIGITS(v)[len] = ((BDIGIT)~0) * rand_buf[len];
BDIGIT             36 marshal.c          BDIGIT *ds;
BDIGIT             38 marshal.c          BDIGIT num;
BDIGIT             46 marshal.c          return (len - 1)*sizeof(BDIGIT)/2 + offset;
BDIGIT            561 marshal.c      		BDIGIT *d = RBIGNUM(obj)->digits;
BDIGIT            567 marshal.c      		    BDIGIT num = *d;
BDIGIT           1109 marshal.c      	    BDIGIT *digits;
BDIGIT           1120 marshal.c      	    big->len = (len + 1) * 2 / sizeof(BDIGIT);
BDIGIT           1122 marshal.c      	    big->digits = digits = ALLOC_N(BDIGIT, big->len);
BDIGIT           1126 marshal.c      		    big->len * sizeof(BDIGIT) - len * 2);
BDIGIT           1131 marshal.c      		BDIGIT num = 0;
BDIGIT            234 random.c                   buf[j] |= ((BDIGIT *)RBIGNUM(seed)->digits)[i];
BDIGIT            264 random.c           BDIGIT *digits;
BDIGIT            272 random.c           digits = big->digits = ALLOC_N(BDIGIT, big->len);
BDIGIT            384 random.c       # define BIG_GET32(big,i) (((BDIGIT *)(big)->digits)[(i)*2] | \
BDIGIT            385 random.c                                  ((i)*2+1 < (big)->len ? (((BDIGIT *)(big)->digits)[(i)*2+1] << 16) \
BDIGIT            387 random.c       # define BIG_SET32(big,i,d) ((((BDIGIT *)(big)->digits)[(i)*2] = (d) & 0xffff), \
BDIGIT            388 random.c                                    ((i)*2+1 < (big)->len ? (((BDIGIT *)(big)->digits)[(i)*2+1] = (d) >> 16) \
BDIGIT            392 random.c       # define BIG_GET32(big,i) (((BDIGIT *)(big)->digits)[i])
BDIGIT            393 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            64 bignum.c           MEMCPY(BDIGITS(z), BDIGITS(x), BDIGIT, RBIGNUM(x)->len);
BDIGITS            74 bignum.c           BDIGIT *ds = BDIGITS(x);
BDIGITS            86 bignum.c       	ds = BDIGITS(x);
BDIGITS           104 bignum.c       	BDIGIT *ds = BDIGITS(x);
BDIGITS           142 bignum.c           digits = BDIGITS(big);
BDIGITS           207 bignum.c       	ds = BDIGITS(val);
BDIGITS           243 bignum.c           digits = BDIGITS(big);
BDIGITS           279 bignum.c           memcpy(buf, (char*)BDIGITS(val), len);
BDIGITS           298 bignum.c           memcpy((char*)BDIGITS(big), buf, QUAD_SIZE);
BDIGITS           301 bignum.c       	char *tmp = (char*)BDIGITS(big);
BDIGITS           455 bignum.c           zds = BDIGITS(z);
BDIGITS           551 bignum.c           digits = BDIGITS(big);
BDIGITS           669 bignum.c           ds = BDIGITS(t);
BDIGITS           740 bignum.c           ds = BDIGITS(x);
BDIGITS           801 bignum.c           ds = BDIGITS(x);
BDIGITS           858 bignum.c           digits = BDIGITS(z);
BDIGITS           882 bignum.c           BDIGIT *ds = BDIGITS(x);
BDIGITS           949 bignum.c           while(xlen-- && (BDIGITS(x)[xlen]==BDIGITS(y)[xlen]));
BDIGITS           951 bignum.c           return (BDIGITS(x)[xlen] > BDIGITS(y)[xlen]) ?
BDIGITS           991 bignum.c           if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,RBIGNUM(y)->len) != 0) return Qfalse;
BDIGITS          1013 bignum.c           if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,RBIGNUM(y)->len) != 0) return Qfalse;
BDIGITS          1056 bignum.c           ds = BDIGITS(z);
BDIGITS          1081 bignum.c       	    if (BDIGITS(x)[i] > BDIGITS(y)[i]) {
BDIGITS          1084 bignum.c       	    if (BDIGITS(x)[i] < BDIGITS(y)[i]) {
BDIGITS          1092 bignum.c           zds = BDIGITS(z);
BDIGITS          1095 bignum.c       	num += (BDIGIT_DBL_SIGNED)BDIGITS(x)[i] - BDIGITS(y)[i];
BDIGITS          1100 bignum.c       	num += BDIGITS(x)[i];
BDIGITS          1105 bignum.c       	zds[i] = BDIGITS(x)[i];
BDIGITS          1138 bignum.c       	num += (BDIGIT_DBL)BDIGITS(x)[i] + BDIGITS(y)[i];
BDIGITS          1139 bignum.c       	BDIGITS(z)[i] = BIGLO(num);
BDIGITS          1144 bignum.c       	num += BDIGITS(y)[i];
BDIGITS          1145 bignum.c       	BDIGITS(z)[i++] = BIGLO(num);
BDIGITS          1149 bignum.c       	BDIGITS(z)[i] = BDIGITS(y)[i];
BDIGITS          1152 bignum.c           BDIGITS(z)[i] = (BDIGIT)num;
BDIGITS          1243 bignum.c           zds = BDIGITS(z);
BDIGITS          1246 bignum.c       	BDIGIT_DBL dd = BDIGITS(x)[i];
BDIGITS          1250 bignum.c       	    BDIGIT_DBL ee = n + (BDIGIT_DBL)dd * BDIGITS(y)[j];
BDIGITS          1277 bignum.c           yds = BDIGITS(y);
BDIGITS          1278 bignum.c           if (nx < ny || (nx == ny && BDIGITS(x)[nx - 1] < BDIGITS(y)[ny - 1])) {
BDIGITS          1283 bignum.c           xds = BDIGITS(x);
BDIGITS          1287 bignum.c       	zds = BDIGITS(z);
BDIGITS          1303 bignum.c           zds = BDIGITS(z);
BDIGITS          1315 bignum.c       	tds = BDIGITS(yy);
BDIGITS          1370 bignum.c       	zds = BDIGITS(*divp);
BDIGITS          1377 bignum.c       	zds = BDIGITS(*modp);
BDIGITS          1661 bignum.c       	ds1 = BDIGITS(y);
BDIGITS          1662 bignum.c       	ds2 = BDIGITS(x);
BDIGITS          1668 bignum.c       	ds1 = BDIGITS(x);
BDIGITS          1669 bignum.c       	ds2 = BDIGITS(y);
BDIGITS          1673 bignum.c           zds = BDIGITS(z);
BDIGITS          1717 bignum.c       	ds1 = BDIGITS(y);
BDIGITS          1718 bignum.c       	ds2 = BDIGITS(x);
BDIGITS          1724 bignum.c       	ds1 = BDIGITS(x);
BDIGITS          1725 bignum.c       	ds2 = BDIGITS(y);
BDIGITS          1729 bignum.c           zds = BDIGITS(z);
BDIGITS          1775 bignum.c       	ds1 = BDIGITS(y);
BDIGITS          1776 bignum.c       	ds2 = BDIGITS(x);
BDIGITS          1782 bignum.c       	ds1 = BDIGITS(x);
BDIGITS          1783 bignum.c       	ds2 = BDIGITS(y);
BDIGITS          1789 bignum.c           zds = BDIGITS(z);
BDIGITS          1826 bignum.c           zds = BDIGITS(z);
BDIGITS          1830 bignum.c           xds = BDIGITS(x);
BDIGITS          1872 bignum.c           xds = BDIGITS(x);
BDIGITS          1878 bignum.c           zds = BDIGITS(z);
BDIGITS          1935 bignum.c           xds = BDIGITS(x);
BDIGITS          1955 bignum.c           key = 0; digits = BDIGITS(x); len = RBIGNUM(x)->len;
BDIGITS          2017 bignum.c           BDIGITS(v)[len] = BDIGITS(max)[len] * rand_buf[len];
BDIGITS          2019 bignum.c       	BDIGITS(v)[len] = ((BDIGIT)~0) * rand_buf[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         75 bignum.c           BDIGIT_DBL num;
BDIGIT_DBL        136 bignum.c           BDIGIT_DBL num = n;
BDIGIT_DBL        325 bignum.c           BDIGIT_DBL num;
BDIGIT_DBL        486 bignum.c       		num += (BDIGIT_DBL)zds[i]*base;
BDIGIT_DBL        545 bignum.c           BDIGIT_DBL num = n;
BDIGIT_DBL        676 bignum.c       	BDIGIT_DBL num = 0;
BDIGIT_DBL        735 bignum.c           BDIGIT_DBL num;
BDIGIT_DBL        796 bignum.c           BDIGIT_DBL num;
BDIGIT_DBL       1118 bignum.c           BDIGIT_DBL num;
BDIGIT_DBL       1138 bignum.c       	num += (BDIGIT_DBL)BDIGITS(x)[i] + BDIGITS(y)[i];
BDIGIT_DBL       1221 bignum.c           BDIGIT_DBL n = 0;
BDIGIT_DBL       1246 bignum.c       	BDIGIT_DBL dd = BDIGITS(x)[i];
BDIGIT_DBL       1250 bignum.c       	    BDIGIT_DBL ee = n + (BDIGIT_DBL)dd * BDIGITS(y)[j];
BDIGIT_DBL       1272 bignum.c           BDIGIT_DBL t2;
BDIGIT_DBL       1319 bignum.c       	    t2 += (BDIGIT_DBL)yds[j]<<dd;
BDIGIT_DBL       1327 bignum.c       	    t2 += (BDIGIT_DBL)xds[j]<<dd;
BDIGIT_DBL       1346 bignum.c       		BDIGIT_DBL ee;
BDIGIT_DBL       1347 bignum.c       		t2 += (BDIGIT_DBL)yds[i] * q;
BDIGIT_DBL       1349 bignum.c       		num = (BDIGIT_DBL)zds[j - ny + i] + ee;
BDIGIT_DBL       1358 bignum.c       		    BDIGIT_DBL ee = num + yds[i];
BDIGIT_DBL       1359 bignum.c       		    num = (BDIGIT_DBL)zds[j - ny + i] + ee;
BDIGIT_DBL       1820 bignum.c           BDIGIT_DBL num = 0;
BDIGIT_DBL       1832 bignum.c       	num = num | (BDIGIT_DBL)*xds++<<s2;
BDIGIT_DBL       1856 bignum.c           BDIGIT_DBL num = 0;
BDIGIT_DBL       1876 bignum.c       	num = ((BDIGIT_DBL)~0) << BITSPERDIG;


BDIGIT_DBL_SIGNED

BDIGIT_DBL_SIGNED 1071 bignum.c           BDIGIT_DBL_SIGNED num;
BDIGIT_DBL_SIGNED 1095 bignum.c       	num += (BDIGIT_DBL_SIGNED)BDIGITS(x)[i] - BDIGITS(y)[i];
BDIGIT_DBL_SIGNED 1273 bignum.c           BDIGIT_DBL_SIGNED num;


BEG

BEG               964 re.c               if (RMATCH(match)->BEG(nth) == -1) return Qfalse;
BEG               984 re.c               start = RMATCH(match)->BEG(nth);
BEG              1019 re.c               if (RMATCH(match)->BEG(0) == -1) return Qnil;
BEG              1020 re.c               str = rb_str_substr(RMATCH(match)->str, 0, RMATCH(match)->BEG(0));
BEG              1045 re.c               if (RMATCH(match)->BEG(0) == -1) return Qnil;
BEG              1060 re.c               if (RMATCH(match)->BEG(0) == -1) return Qnil;
BEG              1062 re.c               for (i=RMATCH(match)->regs->num_regs-1; RMATCH(match)->BEG(i) == -1 && i > 0; i--)
BEG              2038 re.c           	    rb_str_buf_cat(val, RSTRING(src)->ptr, BEG(0));
BEG              2047 re.c           	    while (BEG(no) == -1 && no > 0) no--;
BEG              2062 re.c           	    if (BEG(no) == -1) continue;
BEG              2063 re.c           	    rb_str_buf_cat(val, RSTRING(src)->ptr+BEG(no), END(no)-BEG(no));
BEG              1709 string.c           start = RMATCH(match)->BEG(nth);
BEG              1985 string.c       	plen = END(0) - BEG(0);
BEG              1990 string.c       	    memmove(RSTRING(str)->ptr + BEG(0) + RSTRING(repl)->len,
BEG              1991 string.c       		    RSTRING(str)->ptr + BEG(0) + plen,
BEG              1992 string.c       		    RSTRING(str)->len - BEG(0) - plen);
BEG              1994 string.c       	memcpy(RSTRING(str)->ptr + BEG(0),
BEG              2123 string.c       	if (BEG(0) == END(0)) {
BEG              3552 string.c       	    if (start == end && BEG(0) == END(0)) {
BEG              3574 string.c       		if (BEG(idx) == -1) continue;
BEG              3575 string.c       		if (BEG(idx) == END(idx))
BEG              3578 string.c       		    tmp = rb_str_substr(str, BEG(idx), END(idx)-BEG(idx));
BEG              4188 string.c       	if (BEG(0) == END(0)) {


BEGIN_CALLARGS

BEGIN_CALLARGS   3115 eval.c         		    BEGIN_CALLARGS;
BEGIN_CALLARGS   3349 eval.c         	    BEGIN_CALLARGS;
BEGIN_CALLARGS   3374 eval.c         	    BEGIN_CALLARGS;
BEGIN_CALLARGS   3390 eval.c         	    BEGIN_CALLARGS;
BEGIN_CALLARGS   3426 eval.c         		BEGIN_CALLARGS;
BEGIN_CALLARGS   5243 eval.c             BEGIN_CALLARGS;


BIGDN

BIGDN              82 bignum.c       	num = BIGDN(num);
BIGDN             145 bignum.c       	num = BIGDN(num);
BIGDN             246 bignum.c       	q = BIGDN(q);
BIGDN             488 bignum.c       		num = BIGDN(num);
BIGDN             554 bignum.c       	num = BIGDN(num);
BIGDN            1097 bignum.c       	num = BIGDN(num);
BIGDN            1102 bignum.c       	num = BIGDN(num);
BIGDN            1140 bignum.c       	num = BIGDN(num);
BIGDN            1146 bignum.c       	num = BIGDN(num);
BIGDN            1253 bignum.c       	    n = BIGDN(n);
BIGDN            1321 bignum.c       	    t2 = BIGDN(t2);
BIGDN            1329 bignum.c       	    t2 = BIGDN(t2);
BIGDN            1351 bignum.c       		num = BIGDN(num);
BIGDN            1352 bignum.c       		t2 = BIGDN(t2);
BIGDN            1361 bignum.c       		    num = BIGDN(num);
BIGDN            1834 bignum.c       	num = BIGDN(num);


BIGLO

BIGLO              81 bignum.c       	ds[i++] = BIGLO(num);
BIGLO             144 bignum.c       	digits[i++] = BIGLO(num);
BIGLO             245 bignum.c       	digits[i++] = BIGLO(q);
BIGLO             487 bignum.c       		zds[i++] = BIGLO(num);
BIGLO             553 bignum.c       	digits[i++] = BIGLO(num);
BIGLO            1096 bignum.c       	zds[i] = BIGLO(num);
BIGLO            1101 bignum.c       	zds[i++] = BIGLO(num);
BIGLO            1139 bignum.c       	BDIGITS(z)[i] = BIGLO(num);
BIGLO            1145 bignum.c       	BDIGITS(z)[i++] = BIGLO(num);
BIGLO            1252 bignum.c       	    if (ee) zds[i + j] = BIGLO(n);
BIGLO            1320 bignum.c       	    tds[j++] = BIGLO(t2);
BIGLO            1328 bignum.c       	    zds[j++] = BIGLO(t2);
BIGLO            1348 bignum.c       		ee = num - BIGLO(t2);
BIGLO            1350 bignum.c       		if (ee) zds[j - ny + i] = BIGLO(num);
BIGLO            1360 bignum.c       		    if (ee) zds[j - ny + i] = BIGLO(num);
BIGLO            1384 bignum.c       		zds[i] = BIGLO(t2);
BIGLO            1833 bignum.c       	*zds++ = BIGLO(num);
BIGLO            1836 bignum.c           *zds = BIGLO(num);
BIGLO            1881 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            854 bignum.c       	u /= (double)(BIGRAD);
BIGRAD            860 bignum.c       	u *= BIGRAD;
BIGRAD            885 bignum.c       	d = ds[i] + BIGRAD*d;
BIGRAD           1341 bignum.c       	if (zds[j] ==  yds[ny-1]) q = BIGRAD-1;
BIGRAD           1735 bignum.c       	zds[i] = sign?ds2[i]:(BIGRAD-1);


BIGUP

BIGUP             112 bignum.c       		num = BIGUP(num) + ds[len];
BIGUP             210 bignum.c       	    q = BIGUP(q);
BIGUP             679 bignum.c       	    num = BIGUP(num) + ds[k];
BIGUP             743 bignum.c       	num = BIGUP(num);
BIGUP             804 bignum.c       	num = BIGUP(num);
BIGUP            1290 bignum.c       	    t2 = BIGUP(t2) + zds[i];
BIGUP            1342 bignum.c       	else q = (BDIGIT)((BIGUP(zds[j]) + zds[j-1])/yds[ny-1]);
BIGUP            1385 bignum.c       		t2 = BIGUP(q);
BIGUP            1882 bignum.c       	num = BIGUP(xds[i]);


BIGZEROP

BIGZEROP          631 bignum.c           if (BIGZEROP(x)) {
BIGZEROP         1276 bignum.c           if (BIGZEROP(y)) rb_num_zerodiv();
BIGZEROP         1401 bignum.c           if (RBIGNUM(x)->sign != RBIGNUM(y)->sign && !BIGZEROP(mod)) {
BIGZEROP         2012 bignum.c           if (BIGZEROP(max)) {


BIG_CRITERIA

BIG_CRITERIA       43 missing/acosh.c     else if (x > BIG_CRITERIA)
BIG_CRITERIA       64 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)


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        289 bignum.c       #define BNEG(b) (RSHIFT(((BDIGIT*)b)[QUAD_SIZE/SIZEOF_BDIGITS-1],BITSPERDIG-1) != 0)
BITSPERDIG        451 bignum.c           len = (len/BITSPERDIG)+1;
BITSPERDIG       1309 bignum.c           while ((q & (1<<(BITSPERDIG-1))) == 0) {
BITSPERDIG       1817 bignum.c           int s1 = shift/BITSPERDIG;
BITSPERDIG       1818 bignum.c           int s2 = shift%BITSPERDIG;
BITSPERDIG       1853 bignum.c           long s1 = shift/BITSPERDIG;
BITSPERDIG       1854 bignum.c           long s2 = shift%BITSPERDIG;
BITSPERDIG       1876 bignum.c       	num = ((BDIGIT_DBL)~0) << BITSPERDIG;
BITSPERDIG       1924 bignum.c           s1 = shift/BITSPERDIG;
BITSPERDIG       1925 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   208 parse.c        #define COND_LEXPOP()	BITSTACK_LEXPOP(cond_stack)
BITSTACK_LEXPOP   214 parse.c        #define CMDARG_LEXPOP()	BITSTACK_LEXPOP(cmdarg_stack)
BITSTACK_LEXPOP   111 parse.y        #define COND_LEXPOP()	BITSTACK_LEXPOP(cond_stack)
BITSTACK_LEXPOP   117 parse.y        #define CMDARG_LEXPOP()	BITSTACK_LEXPOP(cmdarg_stack)


BITSTACK_POP

BITSTACK_POP      207 parse.c        #define COND_POP()	BITSTACK_POP(cond_stack)
BITSTACK_POP      213 parse.c        #define CMDARG_POP()	BITSTACK_POP(cmdarg_stack)
BITSTACK_POP      110 parse.y        #define COND_POP()	BITSTACK_POP(cond_stack)
BITSTACK_POP      116 parse.y        #define CMDARG_POP()	BITSTACK_POP(cmdarg_stack)


BITSTACK_PUSH

BITSTACK_PUSH     206 parse.c        #define COND_PUSH(n)	BITSTACK_PUSH(cond_stack, n)
BITSTACK_PUSH     212 parse.c        #define CMDARG_PUSH(n)	BITSTACK_PUSH(cmdarg_stack, n)
BITSTACK_PUSH     109 parse.y        #define COND_PUSH(n)	BITSTACK_PUSH(cond_stack, n)
BITSTACK_PUSH     115 parse.y        #define CMDARG_PUSH(n)	BITSTACK_PUSH(cmdarg_stack, n)


BITSTACK_SET_P

BITSTACK_SET_P    209 parse.c        #define COND_P()	BITSTACK_SET_P(cond_stack)
BITSTACK_SET_P    215 parse.c        #define CMDARG_P()	BITSTACK_SET_P(cmdarg_stack)
BITSTACK_SET_P    112 parse.y        #define COND_P()	BITSTACK_SET_P(cond_stack)
BITSTACK_SET_P    118 parse.y        #define CMDARG_P()	BITSTACK_SET_P(cmdarg_stack)


BLOCK_D_SCOPE

BLOCK_D_SCOPE     771 eval.c             _block.flags = BLOCK_D_SCOPE;	\
BLOCK_D_SCOPE    3114 eval.c         		    _block.flags &= ~BLOCK_D_SCOPE;
BLOCK_D_SCOPE    4805 eval.c             if (block->flags & BLOCK_D_SCOPE) {
BLOCK_D_SCOPE    4926 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_LAMBDA

BLOCK_LAMBDA     8257 eval.c         	data->flags |= BLOCK_LAMBDA;
BLOCK_LAMBDA     8360 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__sprint

BSD__sprint       517 missing/vsnprintf.c 		if (BSD__sprint(fp, &uio)) \
BSD__sprint       532 missing/vsnprintf.c 	if (uio.uio_resid && BSD__sprint(fp, &uio)) \


BSD_vfprintf

BSD_vfprintf     1091 missing/vsnprintf.c 	ret = BSD_vfprintf(&f, fmt, ap);
BSD_vfprintf     1131 missing/vsnprintf.c 	ret = BSD_vfprintf(&f, fmt, ap);


BUF

BUF               494 missing/vsnprintf.c 	char buf[BUF];		/* space for %c, %[diouxX], %[eEfgG] */
BUF               869 missing/vsnprintf.c 			cp = buf + BUF;
BUF               883 missing/vsnprintf.c 			size = buf + BUF - cp;


BUFCHECK

BUFCHECK         2475 file.c         	    BUFCHECK(dirlen > buflen);
BUFCHECK         2495 file.c         	    BUFCHECK(bdiff + (s-b) >= buflen);
BUFCHECK         2506 file.c         	    BUFCHECK(dirlen > buflen);
BUFCHECK         2519 file.c         	    BUFCHECK(bdiff + 2 >= buflen);
BUFCHECK         2540 file.c         		BUFCHECK(dirlen > buflen);
BUFCHECK         2559 file.c         	    BUFCHECK(dirlen > buflen);
BUFCHECK         2577 file.c         	BUFCHECK(bdiff >= buflen);
BUFCHECK         2628 file.c         		BUFCHECK(bdiff + (s-b+1) >= buflen);
BUFCHECK         2643 file.c         	BUFCHECK(bdiff + (s-b) >= buflen);


BUFINIT

BUFINIT          2464 file.c             BUFINIT();
BUFINIT          2529 file.c         		BUFINIT();
BUFINIT          2552 file.c         	    BUFINIT();


BUFPUSH

BUFPUSH          1315 regex.c        	BUFPUSH(endbuf);
BUFPUSH          1329 regex.c        	BUFPUSH(endline);
BUFPUSH          1335 regex.c        	BUFPUSH(begbuf);
BUFPUSH          1337 regex.c        	BUFPUSH(begline);
BUFPUSH          1382 regex.c        	  BUFPUSH(anychar_repeat);
BUFPUSH          1425 regex.c              BUFPUSH(anychar);
BUFPUSH          1437 regex.c        	BUFPUSH(charset_not);
BUFPUSH          1441 regex.c        	BUFPUSH(charset);
BUFPUSH          1444 regex.c              BUFPUSH((1 << BYTEWIDTH) / BYTEWIDTH);
BUFPUSH          1821 regex.c        	    BUFPUSH(option_set);
BUFPUSH          1822 regex.c        	    BUFPUSH(options);
BUFPUSH          1826 regex.c        	      BUFPUSH(casefold_on);
BUFPUSH          1828 regex.c        	      BUFPUSH(casefold_off);
BUFPUSH          1844 regex.c        	  BUFPUSH(start_memory);
BUFPUSH          1845 regex.c        	  BUFPUSH(regnum);
BUFPUSH          1848 regex.c        	  BUFPUSH(0);
BUFPUSH          1856 regex.c        	  BUFPUSH(start_nowidth);
BUFPUSH          1858 regex.c        	  BUFPUSH(0);	/* temporary value */
BUFPUSH          1859 regex.c        	  BUFPUSH(0);
BUFPUSH          1862 regex.c        	  BUFPUSH(on_failure_jump);
BUFPUSH          1864 regex.c        	  BUFPUSH(0);	/* temporary value */
BUFPUSH          1865 regex.c        	  BUFPUSH(0);
BUFPUSH          1869 regex.c        	  BUFPUSH(start_paren);
BUFPUSH          1875 regex.c        	  BUFPUSH(option_set);
BUFPUSH          1876 regex.c        	  BUFPUSH(options);
BUFPUSH          1880 regex.c        	    BUFPUSH(casefold_on);
BUFPUSH          1882 regex.c        	    BUFPUSH(casefold_off);
BUFPUSH          1902 regex.c        	BUFPUSH(push_dummy_failure);
BUFPUSH          1910 regex.c        	  BUFPUSH((options&RE_OPTION_IGNORECASE)?casefold_off:casefold_on);
BUFPUSH          1913 regex.c        	  BUFPUSH(option_set);
BUFPUSH          1914 regex.c        	  BUFPUSH(stackp[-1]);
BUFPUSH          1924 regex.c        	  BUFPUSH(stop_memory);
BUFPUSH          1925 regex.c        	  BUFPUSH(stackp[-1]);
BUFPUSH          1926 regex.c        	  BUFPUSH(regnum - stackp[-1]);
BUFPUSH          1932 regex.c        	BUFPUSH(pop_and_fail);
BUFPUSH          1938 regex.c        	BUFPUSH(stop_nowidth);
BUFPUSH          1941 regex.c        	BUFPUSH(0);	/* space to hold stack pos */
BUFPUSH          1942 regex.c        	BUFPUSH(0);
BUFPUSH          1947 regex.c        	BUFPUSH(stop_backtrack);
BUFPUSH          1950 regex.c        	BUFPUSH(0);	/* space to hold stack pos */
BUFPUSH          1951 regex.c        	BUFPUSH(0);
BUFPUSH          1956 regex.c        	BUFPUSH(stop_paren);
BUFPUSH          2101 regex.c        	  if (skip_stop_paren) BUFPUSH(stop_paren);
BUFPUSH          2114 regex.c        	  if (skip_stop_paren) BUFPUSH(stop_paren);
BUFPUSH          2212 regex.c        	  BUFPUSH(charset);
BUFPUSH          2215 regex.c        	  BUFPUSH(charset_not);
BUFPUSH          2218 regex.c        	BUFPUSH((1 << BYTEWIDTH) / BYTEWIDTH);
BUFPUSH          2245 regex.c        	BUFPUSH(wordchar);
BUFPUSH          2250 regex.c        	BUFPUSH(notwordchar);
BUFPUSH          2255 regex.c        	BUFPUSH(wordbeg);
BUFPUSH          2259 regex.c        	BUFPUSH(wordend);
BUFPUSH          2264 regex.c        	BUFPUSH(wordbound);
BUFPUSH          2268 regex.c        	BUFPUSH(notwordbound);
BUFPUSH          2272 regex.c        	BUFPUSH(begbuf);
BUFPUSH          2277 regex.c        	  BUFPUSH(endbuf2);
BUFPUSH          2282 regex.c        	BUFPUSH(endbuf);
BUFPUSH          2286 regex.c        	BUFPUSH(begpos);
BUFPUSH          2328 regex.c        	BUFPUSH(duplicate);
BUFPUSH          2329 regex.c        	BUFPUSH(c1);
BUFPUSH          2386 regex.c        	BUFPUSH(exactn);
BUFPUSH          2388 regex.c        	BUFPUSH(0);
BUFPUSH          2391 regex.c        	BUFPUSH(0xff);
BUFPUSH          2395 regex.c              BUFPUSH(c);
BUFPUSH          2401 regex.c        	  BUFPUSH(c);


BUFSIZE

BUFSIZE          1104 ext/strscan/strscan.c     char buf[BUFSIZE];
BUFSIZE          1110 ext/strscan/strscan.c         len = snprintf(buf, BUFSIZE, "#<%s (uninitialized)>",
BUFSIZE          1115 ext/strscan/strscan.c         len = snprintf(buf, BUFSIZE, "#<%s fin>",
BUFSIZE          1121 ext/strscan/strscan.c         len = snprintf(buf, BUFSIZE, "#<%s %ld/%ld @ %s>",
BUFSIZE          1129 ext/strscan/strscan.c     len = snprintf(buf, BUFSIZE, "#<%s %ld/%ld %s @ %s>",
BUFSIZE          1141 ext/strscan/strscan.c     char buf[BUFSIZE];
BUFSIZE          1161 ext/strscan/strscan.c     char buf[BUFSIZE];


BUILTIN_TYPE

BUILTIN_TYPE      116 class.c        	if (BUILTIN_TYPE(obj) == T_CLASS) {
BUILTIN_TYPE      158 class.c            if (BUILTIN_TYPE(obj) == T_CLASS && FL_TEST(obj, FL_SINGLETON)) {
BUILTIN_TYPE      349 class.c            if (BUILTIN_TYPE(module) == T_ICLASS) {
BUILTIN_TYPE      398 class.c        	    switch (BUILTIN_TYPE(p)) {
BUILTIN_TYPE      445 class.c        	if (BUILTIN_TYPE(p) == T_ICLASS) {
BUILTIN_TYPE      480 class.c        	if (BUILTIN_TYPE(p) == T_ICLASS) {
BUILTIN_TYPE      512 class.c        	if (BUILTIN_TYPE(p) == T_ICLASS) {
BUILTIN_TYPE      625 class.c        	if (BUILTIN_TYPE(mod) == T_ICLASS) continue;
BUILTIN_TYPE     2821 eval.c             else if (BUILTIN_TYPE(node) != T_NODE) {
BUILTIN_TYPE     2822 eval.c                 rb_bug("not a node 0x%02lx (0x%lx)", BUILTIN_TYPE(node), node);
BUILTIN_TYPE     1048 gc.c           		if (!(p->as.basic.flags&FL_MARK) && BUILTIN_TYPE(p) == T_NODE)
BUILTIN_TYPE     1848 gc.c           	    if (BUILTIN_TYPE(p) == T_DATA &&
BUILTIN_TYPE     1858 gc.c           	    else if (BUILTIN_TYPE(p) == T_FILE) {
BUILTIN_TYPE     1897 gc.c               if (!is_pointer_to_heap((void *)ptr)|| BUILTIN_TYPE(ptr) >= T_BLKTAG) {
BUILTIN_TYPE     1900 gc.c               if (BUILTIN_TYPE(ptr) == 0 || RBASIC(ptr)->klass == 0) {
BUILTIN_TYPE      383 marshal.c          while (BUILTIN_TYPE(klass) == T_ICLASS) {
BUILTIN_TYPE      531 marshal.c      	switch (BUILTIN_TYPE(obj)) {
BUILTIN_TYPE      662 ruby.h             return BUILTIN_TYPE(obj);
BUILTIN_TYPE     1423 variable.c         if (!exclude && !mod_retry && BUILTIN_TYPE(klass) == T_MODULE) {
BUILTIN_TYPE     1599 variable.c         if (!exclude && !mod_retry && BUILTIN_TYPE(klass) == T_MODULE) {
BUILTIN_TYPE     1643 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));


BYTEWIDTH

BYTEWIDTH         458 regex.c              c &= (1<<(BYTEWIDTH-2-n)) - 1;					\
BYTEWIDTH         535 regex.c            printf("%c%c", (int)(c >> BYTEWIDTH), (int)(c &0xff));
BYTEWIDTH         581 regex.c          (b[(unsigned char)(c) / BYTEWIDTH]					\
BYTEWIDTH         582 regex.c           |= 1 << ((unsigned char)(c) % BYTEWIDTH))
BYTEWIDTH         714 regex.c          return ((int)c / BYTEWIDTH < (int)size && b[c / BYTEWIDTH] & 1 << c % BYTEWIDTH);
BYTEWIDTH         860 regex.c        	  for (bit = 0; bit < BYTEWIDTH; bit++)
BYTEWIDTH         862 regex.c        	      printf("%c", c * BYTEWIDTH + bit);
BYTEWIDTH        1431 regex.c              while ((b - bufp->buffer + 9 + (1 << BYTEWIDTH) / BYTEWIDTH)
BYTEWIDTH        1444 regex.c              BUFPUSH((1 << BYTEWIDTH) / BYTEWIDTH);
BYTEWIDTH        1446 regex.c              memset(b, 0, (1 << BYTEWIDTH) / BYTEWIDTH + 2);
BYTEWIDTH        1457 regex.c        	if ((size = EXTRACT_UNSIGNED(&b[(1 << BYTEWIDTH) / BYTEWIDTH])) || current_mbctype) {
BYTEWIDTH        1460 regex.c        	  size = (1 << BYTEWIDTH) / BYTEWIDTH + 2 + size*8 + 8;
BYTEWIDTH        1504 regex.c        	    for (c = 0; c < (1 << BYTEWIDTH); c++) {
BYTEWIDTH        1517 regex.c        	    for (c = 0; c < (1 << BYTEWIDTH); c++) {
BYTEWIDTH        1650 regex.c        	    for (ch = 0; ch < 1 << BYTEWIDTH; ch++) {
BYTEWIDTH        1724 regex.c              if (b[-1] != (1 << BYTEWIDTH) / BYTEWIDTH)
BYTEWIDTH        1725 regex.c        	memmove(&b[(unsigned char)b[-1]], &b[(1 << BYTEWIDTH) / BYTEWIDTH],
BYTEWIDTH        1726 regex.c        		2 + EXTRACT_UNSIGNED(&b[(1 << BYTEWIDTH) / BYTEWIDTH])*8);
BYTEWIDTH        2206 regex.c        	while (b - bufp->buffer + 9 + (1 << BYTEWIDTH) / BYTEWIDTH
BYTEWIDTH        2218 regex.c        	BUFPUSH((1 << BYTEWIDTH) / BYTEWIDTH);
BYTEWIDTH        2219 regex.c        	memset(b, 0, (1 << BYTEWIDTH) / BYTEWIDTH + 2);
BYTEWIDTH        2237 regex.c        	if (b[-1] != (1 << BYTEWIDTH) / BYTEWIDTH)
BYTEWIDTH        2238 regex.c        	  memmove(&b[(unsigned char)b[-1]], &b[(1 << BYTEWIDTH) / BYTEWIDTH],
BYTEWIDTH        2239 regex.c        		  2 + EXTRACT_UNSIGNED(&b[(1 << BYTEWIDTH) / BYTEWIDTH])*8);
BYTEWIDTH        2450 regex.c              bufp->must_skip = (int *) xmalloc((1 << BYTEWIDTH)*sizeof(int));
BYTEWIDTH        2788 regex.c          memset(fastmap, 0, (1 << BYTEWIDTH));
BYTEWIDTH        2933 regex.c        	for (j = 0; j < (1 << BYTEWIDTH); j++) {
BYTEWIDTH        2954 regex.c        	  for (j = 0x80; j < (1 << BYTEWIDTH); j++) {
BYTEWIDTH        2962 regex.c        	  for (j = 0x80; j < (1 << BYTEWIDTH); j++) {
BYTEWIDTH        2976 regex.c        	  for (j = 0x80; j < (1 << BYTEWIDTH); j++) {
BYTEWIDTH        2984 regex.c        	  for (j = 0x80; j < (1 << BYTEWIDTH); j++) {
BYTEWIDTH        2995 regex.c        	for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--)
BYTEWIDTH        2996 regex.c        	  if (p[j / BYTEWIDTH] & (1 << (j % BYTEWIDTH))) {
BYTEWIDTH        3039 regex.c        	for (j = *p * BYTEWIDTH; j < (1 << BYTEWIDTH); j++)
BYTEWIDTH        3043 regex.c        	for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--)
BYTEWIDTH        3044 regex.c        	  if (!(p[j / BYTEWIDTH] & (1 << (j % BYTEWIDTH)))) {
BYTEWIDTH        3056 regex.c        	    for (j = 0x80; j < (1 << BYTEWIDTH); j++)
BYTEWIDTH        3082 regex.c        	  for (j = c; j < (1 << BYTEWIDTH); j++) {
BYTEWIDTH          54 regex.h        #define RE_REG_MAX ((1<<BYTEWIDTH)-1)


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);


C

C                  25 ext/digest/md5/md5ossl.c       && pctx1->C == pctx2->C
C                  39 ext/digest/rmd160/rmd160ossl.c 	  && pctx1->C == pctx2->C
C                 439 util.c                s = A[0]; A[0] = B[0]; B[0] = C[0]; C[0] = s;
C                 440 util.c                s = A[1]; A[1] = B[1]; B[1] = C[1]; C[1] = s;
C                 441 util.c                s = A[2]; A[2] = B[2]; B[2] = C[2]; C[2] = s;
C                 442 util.c                s = A[3]; A[3] = B[3]; B[3] = C[3]; C[3] = s; a += 16; b += 16; c += 16;
C                 445 util.c            if (low != 0) { s = A[0]; A[0] = B[0]; B[0] = C[0]; C[0] = s;
C                 446 util.c              if (low >= 8) { s = A[1]; A[1] = B[1]; B[1] = C[1]; C[1] = s;
C                 447 util.c                if (low == 12) {s = A[2]; A[2] = B[2]; B[2] = C[2]; C[2] = s;}}}


CACHE_SIZE

CACHE_SIZE        297 eval.c         static struct cache_entry cache[CACHE_SIZE];
CACHE_SIZE        306 eval.c             ent = cache; end = ent + CACHE_SIZE;
CACHE_SIZE        321 eval.c             ent = cache; end = ent + CACHE_SIZE;
CACHE_SIZE        337 eval.c             ent = cache; end = ent + CACHE_SIZE;
CACHE_SIZE        353 eval.c             ent = cache; end = ent + CACHE_SIZE;


CALLBACK_MSG

CALLBACK_MSG      192 ext/dl/test/test.c   if( strcmp(msg, CALLBACK_MSG) == 0 ){
CALLBACK_MSG      204 ext/dl/test/test.c     return (*func)(0, CALLBACK_MSG);


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]);


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          427 bignum.c           if (len <= (sizeof(VALUE)*CHAR_BIT)) {
CHAR_BIT          634 bignum.c           j = SIZEOF_BDIGITS*CHAR_BIT*i;
CHAR_BIT          789 dir.c          #define GLOB_VERBOSE	(1 << (sizeof(int) * CHAR_BIT - 1))
CHAR_BIT         8561 eval.c             const int w = (sizeof(VALUE) * CHAR_BIT) / 4;
CHAR_BIT         8567 eval.c         	len += strlen(node->nd_file) + 2 + (SIZEOF_LONG*CHAR_BIT-NODE_LSHIFT)/3;
CHAR_BIT          799 ext/stringio/stringio.c     for (c = 0; c < (1 << CHAR_BIT); c++) {
CHAR_BIT          893 ext/stringio/stringio.c 		long skip[1 << CHAR_BIT], pos;
CHAR_BIT           26 marshal.c      #define BITSPERSHORT (2*CHAR_BIT)
CHAR_BIT          161 node.h         #define NODE_LMASK  (((long)1<<(sizeof(NODE*)*CHAR_BIT-NODE_LSHIFT))-1)
CHAR_BIT         1901 numeric.c          char buf[SIZEOF_LONG*CHAR_BIT + 2], *b = buf + sizeof buf;
CHAR_BIT         2448 numeric.c          if (width > (sizeof(VALUE)*CHAR_BIT-1)
CHAR_BIT         2449 numeric.c      	|| ((unsigned long)val)>>(sizeof(VALUE)*CHAR_BIT-1-width) > 0) {
CHAR_BIT         2474 numeric.c          if (i >= sizeof(long)*CHAR_BIT-1) {
CHAR_BIT         2516 numeric.c          if (sizeof(VALUE)*CHAR_BIT-1 < i) {
CHAR_BIT          289 parse.c        #define nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2)
CHAR_BIT          291 parse.c        #define nd_paren(node) (char)((node)->u2.id >> CHAR_BIT*2)
CHAR_BIT         7108 parse.c        	rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0)
CHAR_BIT          192 parse.y        #define nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2)
CHAR_BIT          194 parse.y        #define nd_paren(node) (char)((node)->u2.id >> CHAR_BIT*2)
CHAR_BIT         3110 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           97 ruby.h         # ifndef CHAR_BIT
CHAR_BIT         4434 string.c           if (bits >= sizeof(long)*CHAR_BIT) {


CHAR_CLASS_MAX_LENGTH

CHAR_CLASS_MAX_LENGTH 1602 regex.c        	  char str[CHAR_CLASS_MAX_LENGTH + 1];
CHAR_CLASS_MAX_LENGTH 1614 regex.c        		|| c1 == CHAR_CLASS_MAX_LENGTH)


CHECK

CHECK            3303 file.c         	CHECK(1);
CHECK            3377 file.c         	CHECK(1);
CHECK            3393 file.c         	CHECK(2);
CHECK            3400 file.c         	CHECK(2);
CHECK              94 sprintf.c          CHECK(l);\
CHECK             418 sprintf.c      			CHECK(width);
CHECK             655 sprintf.c      		    CHECK(width);
CHECK             665 sprintf.c      		CHECK(prec - len);
CHECK             684 sprintf.c      		CHECK(width);
CHECK             719 sprintf.c      		    CHECK(need);
CHECK             773 sprintf.c      		CHECK(need);


CHECK_INTS

CHECK_INTS       3148 eval.c         	CHECK_INTS;
CHECK_INTS       3154 eval.c         	CHECK_INTS;
CHECK_INTS       3159 eval.c         	CHECK_INTS;
CHECK_INTS       4039 eval.c             CHECK_INTS;
CHECK_INTS       4904 eval.c         	    CHECK_INTS;
CHECK_INTS       5042 eval.c         	CHECK_INTS;
CHECK_INTS       5653 eval.c         	CHECK_INTS;		/* better than nothing */
CHECK_INTS       6887 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       4296 regex.c            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       3183 win32/win32.c      CHECK_INTS;
CHECK_INTS       3192 win32/win32.c      CHECK_INTS;
CHECK_INTS       3323 win32/win32.c  	CHECK_INTS;


CHECK_OPTION

CHECK_OPTION      425 ext/nkf/nkf-utf8/nkf.c #ifdef CHECK_OPTION
CHECK_OPTION      948 ext/nkf/nkf-utf8/nkf.c #ifdef CHECK_OPTION
CHECK_OPTION     1022 ext/nkf/nkf-utf8/nkf.c #ifdef CHECK_OPTION
CHECK_OPTION     1352 ext/nkf/nkf-utf8/nkf.c #ifdef CHECK_OPTION
CHECK_OPTION     1378 ext/nkf/nkf-utf8/nkf.c #ifdef CHECK_OPTION
CHECK_OPTION     1803 ext/nkf/nkf-utf8/nkf.c #ifdef CHECK_OPTION
CHECK_OPTION     3683 ext/nkf/nkf-utf8/nkf.c #ifdef CHECK_OPTION
CHECK_OPTION     4614 ext/nkf/nkf-utf8/nkf.c #ifdef CHECK_OPTION
CHECK_OPTION     4677 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           844 ext/dl/sym.c       val = CHR2FIX((char)(ANY2C(ret)));
CHR2FIX           896 ext/dl/sym.c   	rb_ary_push(dvals, CHR2FIX(*((char*)(ANY2P(args[i])))));
CHR2FIX           700 ext/stringio/stringio.c 	rb_yield(CHR2FIX(c));
CHR2FIX           722 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   350 ext/openssl/ossl_cipher.c CIPHER_0ARG_INT(iv_length)
CIPHER_0ARG_INT   351 ext/openssl/ossl_cipher.c CIPHER_0ARG_INT(block_size)


CLASS_MASK

CLASS_MASK       1516 ext/nkf/nkf-utf8/nkf.c           }else if ((c & CLASS_MASK) == CLASS_UTF16){
CLASS_MASK       1582 ext/nkf/nkf-utf8/nkf.c           }else if ((c & CLASS_MASK) == CLASS_UTF16){
CLASS_MASK       1679 ext/nkf/nkf-utf8/nkf.c           }else if ((c & CLASS_MASK) == CLASS_UTF16){
CLASS_MASK       1956 ext/nkf/nkf-utf8/nkf.c             } else if ((c1 & CLASS_MASK) == CLASS_UTF16){
CLASS_MASK       2288 ext/nkf/nkf-utf8/nkf.c             || (c2 & CLASS_MASK) == CLASS_UTF16
CLASS_MASK       2688 ext/nkf/nkf-utf8/nkf.c     if (c2 == 0 && (c1 & CLASS_MASK) == CLASS_UTF16){
CLASS_MASK       2745 ext/nkf/nkf-utf8/nkf.c     } else if (c2 == 0 && (c1 & CLASS_MASK) == CLASS_UTF16) {
CLASS_MASK       2771 ext/nkf/nkf-utf8/nkf.c     if (c2 == 0 && (c1 & CLASS_MASK) == CLASS_UTF16){
CLASS_MASK       2773 ext/nkf/nkf-utf8/nkf.c         if (c2 == 0 && (c1 & CLASS_MASK) == CLASS_UTF16){
CLASS_MASK       2897 ext/nkf/nkf-utf8/nkf.c     if (c2 == 0 && (c1 & CLASS_MASK) == CLASS_UTF16){
CLASS_MASK       2956 ext/nkf/nkf-utf8/nkf.c     if ((c1 & CLASS_MASK) == CLASS_UTF16){


CLASS_OF

CLASS_OF           62 bignum.c           VALUE z = bignew_1(CLASS_OF(x), RBIGNUM(x)->len, RBIGNUM(x)->sign);
CLASS_OF           67 class.c            if (!FL_TEST(CLASS_OF(clone), FL_SINGLETON)) {
CLASS_OF          779 class.c            klass = CLASS_OF(obj);
CLASS_OF          406 error.c            if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc));
CLASS_OF          442 error.c            klass = CLASS_OF(exc);
CLASS_OF          668 error.c            if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc));
CLASS_OF          961 error.c        	VALUE klass = CLASS_OF(exc);
CLASS_OF          415 eval.c             rb_add_method(CLASS_OF(klass), ID_ALLOCATOR, NEW_CFUNC(func, 0), NOEX_PRIVATE);
CLASS_OF          423 eval.c             rb_add_method(CLASS_OF(klass), ID_ALLOCATOR, 0, NOEX_UNDEF);
CLASS_OF         1205 eval.c             eclass = CLASS_OF(ruby_errinfo);
CLASS_OF         1813 eval.c         	if (NIL_P(klass)) return rb_const_defined(CLASS_OF(self), id);
CLASS_OF         1837 eval.c         	if (NIL_P(klass)) return rb_const_get(CLASS_OF(self), id);
CLASS_OF         2295 eval.c         	    val = CLASS_OF(val);
CLASS_OF         2399 eval.c         		if (rb_method_boundp(CLASS_OF(val), node->nd_mid, 1)) {
CLASS_OF         2748 eval.c         	if (search_method(CLASS_OF(val), id, &origin) &&
CLASS_OF         3120 eval.c         		    result = rb_call(CLASS_OF(recv),recv,each,0,0,0);
CLASS_OF         3363 eval.c         	    rb_call(CLASS_OF(recv),recv,node->nd_mid,argc,argv,scope);
CLASS_OF         3381 eval.c         	    result = rb_call(CLASS_OF(recv),recv,node->nd_mid,argc,argv,0);
CLASS_OF         3396 eval.c         	    result = rb_call(CLASS_OF(self),self,node->nd_mid,argc,argv,1);
CLASS_OF         3402 eval.c         	result = rb_call(CLASS_OF(self),self,node->nd_mid,0,0,2);
CLASS_OF         4108 eval.c             VALUE klass = CLASS_OF(obj);
CLASS_OF         4150 eval.c             if (rb_method_boundp(CLASS_OF(obj), id, !RTEST(priv))) {
CLASS_OF         5170 eval.c         		rb_call(CLASS_OF(recv), recv, lhs->nd_mid, 1, &val, scope);
CLASS_OF         5180 eval.c         		rb_call(CLASS_OF(recv), recv, lhs->nd_mid,
CLASS_OF         5935 eval.c             return rb_call(CLASS_OF(recv), recv, mid, argc, argv, 1);
CLASS_OF         5968 eval.c             vid = rb_call(CLASS_OF(recv), recv, rb_to_id(vid), argc, argv, 1);
CLASS_OF         5997 eval.c             return rb_call(CLASS_OF(recv), recv, mid, n, argv, 1);
CLASS_OF         6056 eval.c             return rb_call(CLASS_OF(recv), recv, mid, argc, argv, 1);
CLASS_OF         6066 eval.c             return rb_call(CLASS_OF(recv), recv, mid, argc, argv, 0);
CLASS_OF         7206 eval.c             set_method_visibility(CLASS_OF(obj), argc, argv, NOEX_PUBLIC);
CLASS_OF         7232 eval.c             set_method_visibility(CLASS_OF(obj), argc, argv, NOEX_PRIVATE);
CLASS_OF         8230 eval.c             if (!proc && ruby_block->block_obj && CLASS_OF(ruby_block->block_obj) == klass) {
CLASS_OF         8386 eval.c         	result = rb_yield_0(args, self, (self!=Qundef)?CLASS_OF(self):0, pcall, avalue);
CLASS_OF         8534 eval.c             if (CLASS_OF(self) != CLASS_OF(other)) return Qfalse;
CLASS_OF         8830 eval.c             if (CLASS_OF(method) != CLASS_OF(other))
CLASS_OF         8905 eval.c             return mnew(CLASS_OF(obj), obj, rb_to_id(vid), rb_cMethod);
CLASS_OF         8960 eval.c             clone = Data_Make_Struct(CLASS_OF(self),struct METHOD, bm_mark, free, data);
CLASS_OF         9102 eval.c             VALUE rklass = CLASS_OF(recv), klass = rklass;
CLASS_OF         9484 eval.c             rb_undef_method(CLASS_OF(rb_cMethod), "new");
CLASS_OF         9498 eval.c             rb_undef_method(CLASS_OF(rb_cUnboundMethod), "new");
CLASS_OF         9548 eval.c             rb_undef_method(CLASS_OF(rb_cBinding), "new");
CLASS_OF         12758 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          470 ext/dl/ptr.c   	   rb_class2name(CLASS_OF(self)), data, data->ptr, data->size, data->free);
CLASS_OF          822 ext/dl/ptr.c   	   rb_id2name(id), rb_class2name(CLASS_OF(self)));
CLASS_OF          991 ext/dl/ptr.c   	   rb_id2name(id), rb_class2name(CLASS_OF(self)));
CLASS_OF          229 ext/iconv/iconv.c 	rb_raise(rb_eArgError, "Iconv expected (%s)", rb_class2name(CLASS_OF(obj)));
CLASS_OF          828 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           82 ext/stringio/stringio.c 		 rb_class2name(CLASS_OF(self)));
CLASS_OF         1111 ext/strscan/strscan.c                        rb_class2name(CLASS_OF(self)));
CLASS_OF         1116 ext/strscan/strscan.c                        rb_class2name(CLASS_OF(self)));
CLASS_OF         1122 ext/strscan/strscan.c                        rb_class2name(CLASS_OF(self)),
CLASS_OF         1130 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          400 marshal.c          VALUE klass = CLASS_OF(obj);
CLASS_OF          412 marshal.c          VALUE klass = CLASS_OF(obj);
CLASS_OF          103 numeric.c          if (CLASS_OF(x) == CLASS_OF(y))
CLASS_OF         2820 numeric.c          rb_undef_method(CLASS_OF(rb_cInteger), "new");
CLASS_OF         2884 numeric.c          rb_undef_method(CLASS_OF(rb_cFloat), "new");
CLASS_OF          178 object.c           return rb_class_real(CLASS_OF(obj));
CLASS_OF          200 object.c           return rb_class_real(CLASS_OF(obj));
CLASS_OF          387 object.c           if (CLASS_OF(value) == 0) return ST_CONTINUE;
CLASS_OF          516 object.c           VALUE cl = CLASS_OF(obj);
CLASS_OF         1898 object.c       	return rb_class_instance_methods(1, args, CLASS_OF(obj));
CLASS_OF         1931 object.c       	return rb_class_protected_instance_methods(1, args, CLASS_OF(obj));
CLASS_OF         1933 object.c           return rb_class_protected_instance_methods(argc, argv, CLASS_OF(obj));
CLASS_OF         1955 object.c       	return rb_class_private_instance_methods(1, args, CLASS_OF(obj));
CLASS_OF         1957 object.c           return rb_class_private_instance_methods(argc, argv, CLASS_OF(obj));
CLASS_OF         1979 object.c       	return rb_class_public_instance_methods(1, args, CLASS_OF(obj));
CLASS_OF         1981 object.c           return rb_class_public_instance_methods(argc, argv, CLASS_OF(obj));
CLASS_OF         2680 object.c           rb_undef_method(CLASS_OF(rb_cNilClass), "new");
CLASS_OF         2687 object.c           rb_undef_method(CLASS_OF(rb_cSymbol), "new");
CLASS_OF         2766 object.c           rb_undef_method(CLASS_OF(rb_cTrueClass), "new");
CLASS_OF         2775 object.c           rb_undef_method(CLASS_OF(rb_cFalseClass), "new");
CLASS_OF          277 process.c          snprintf(buf, sizeof(buf), "#<%s: pid=%ld", rb_class2name(CLASS_OF(st)), NUM2LONG(pid));
CLASS_OF         3399 process.c          rb_undef_method(CLASS_OF(rb_cProcStatus), "new");
CLASS_OF         2284 re.c               rb_undef_method(CLASS_OF(rb_cMatch), "new");
CLASS_OF          303 variable.c         return rb_class2name(CLASS_OF(obj));


CLASS_UTF16

CLASS_UTF16      1516 ext/nkf/nkf-utf8/nkf.c           }else if ((c & CLASS_MASK) == CLASS_UTF16){
CLASS_UTF16      1582 ext/nkf/nkf-utf8/nkf.c           }else if ((c & CLASS_MASK) == CLASS_UTF16){
CLASS_UTF16      1679 ext/nkf/nkf-utf8/nkf.c           }else if ((c & CLASS_MASK) == CLASS_UTF16){
CLASS_UTF16      1956 ext/nkf/nkf-utf8/nkf.c             } else if ((c1 & CLASS_MASK) == CLASS_UTF16){
CLASS_UTF16      2288 ext/nkf/nkf-utf8/nkf.c             || (c2 & CLASS_MASK) == CLASS_UTF16
CLASS_UTF16      2469 ext/nkf/nkf-utf8/nkf.c             if (p1) *p1 = CLASS_UTF16 | ww16_conv(c2, c1, c0);
CLASS_UTF16      2558 ext/nkf/nkf-utf8/nkf.c             *p1 = CLASS_UTF16 | val;
CLASS_UTF16      2688 ext/nkf/nkf-utf8/nkf.c     if (c2 == 0 && (c1 & CLASS_MASK) == CLASS_UTF16){
CLASS_UTF16      2745 ext/nkf/nkf-utf8/nkf.c     } else if (c2 == 0 && (c1 & CLASS_MASK) == CLASS_UTF16) {
CLASS_UTF16      2771 ext/nkf/nkf-utf8/nkf.c     if (c2 == 0 && (c1 & CLASS_MASK) == CLASS_UTF16){
CLASS_UTF16      2773 ext/nkf/nkf-utf8/nkf.c         if (c2 == 0 && (c1 & CLASS_MASK) == CLASS_UTF16){
CLASS_UTF16      2897 ext/nkf/nkf-utf8/nkf.c     if (c2 == 0 && (c1 & CLASS_MASK) == CLASS_UTF16){
CLASS_UTF16      2956 ext/nkf/nkf-utf8/nkf.c     if ((c1 & CLASS_MASK) == CLASS_UTF16){
CLASS_UTF16      3851 ext/nkf/nkf-utf8/nkf.c         return CLASS_UTF16 | c;


CLEAR_MATCH_STATUS

CLEAR_MATCH_STATUS  190 ext/strscan/strscan.c     CLEAR_MATCH_STATUS(p);
CLEAR_MATCH_STATUS  247 ext/strscan/strscan.c     CLEAR_MATCH_STATUS(p);
CLEAR_MATCH_STATUS  266 ext/strscan/strscan.c     CLEAR_MATCH_STATUS(p);
CLEAR_MATCH_STATUS  312 ext/strscan/strscan.c     CLEAR_MATCH_STATUS(p);
CLEAR_MATCH_STATUS  406 ext/strscan/strscan.c     CLEAR_MATCH_STATUS(p);
CLEAR_MATCH_STATUS  683 ext/strscan/strscan.c     CLEAR_MATCH_STATUS(p);
CLEAR_MATCH_STATUS  713 ext/strscan/strscan.c     CLEAR_MATCH_STATUS(p);
CLEAR_MATCH_STATUS  800 ext/strscan/strscan.c     CLEAR_MATCH_STATUS(p);


CLONESETUP

CLONESETUP       8105 eval.c             CLONESETUP(bind, self);
CLONESETUP       8961 eval.c             CLONESETUP(clone, self);


CLOSED

CLOSED            385 ext/stringio/stringio.c     if (CLOSED(ptr)) {
CLOSED            441 ext/stringio/stringio.c     if (!CLOSED(ptr)) return Qfalse;


CMDARG_LEXPOP

CMDARG_LEXPOP    5867 parse.c        			CMDARG_LEXPOP();
CMDARG_LEXPOP    7995 parse.c        	CMDARG_LEXPOP();
CMDARG_LEXPOP    2111 parse.y        			CMDARG_LEXPOP();
CMDARG_LEXPOP    3997 parse.y        	CMDARG_LEXPOP();


CMDARG_P

CMDARG_P         8446 parse.c        			if (CMDARG_P() && state != EXPR_CMDARG)
CMDARG_P         4448 parse.y        			if (CMDARG_P() && state != EXPR_CMDARG)


CMDARG_PUSH

CMDARG_PUSH      5033 parse.c        			CMDARG_PUSH(1);
CMDARG_PUSH      5859 parse.c        			CMDARG_PUSH(0);
CMDARG_PUSH      8105 parse.c        	CMDARG_PUSH(0);
CMDARG_PUSH      8130 parse.c        	CMDARG_PUSH(0);
CMDARG_PUSH      8141 parse.c        	CMDARG_PUSH(0);
CMDARG_PUSH      1392 parse.y        			CMDARG_PUSH(1);
CMDARG_PUSH      2105 parse.y        			CMDARG_PUSH(0);
CMDARG_PUSH      4107 parse.y        	CMDARG_PUSH(0);
CMDARG_PUSH      4132 parse.y        	CMDARG_PUSH(0);
CMDARG_PUSH      4143 parse.y        	CMDARG_PUSH(0);


COMMAND

COMMAND           973 process.c      	    new_argv[0] = COMMAND;
COMMAND          1108 process.c      	new_argv[0] = COMMAND;


COND_LEXPOP

COND_LEXPOP      5866 parse.c        			COND_LEXPOP();
COND_LEXPOP      7994 parse.c        	COND_LEXPOP();
COND_LEXPOP      2110 parse.y        			COND_LEXPOP();
COND_LEXPOP      3996 parse.y        	COND_LEXPOP();


COND_P

COND_P           8445 parse.c        			if (COND_P()) return kDO_COND;
COND_P           4447 parse.y        			if (COND_P()) return kDO_COND;


COND_POP

COND_POP         5270 parse.c        {COND_POP();}
COND_POP         5288 parse.c        {COND_POP();}
COND_POP         5325 parse.c        {COND_POP();}
COND_POP         1578 parse.y        		| kWHILE {COND_PUSH(1);} expr_value do {COND_POP();}
COND_POP         1588 parse.y        		| kUNTIL {COND_PUSH(1);} expr_value do {COND_POP();}
COND_POP         1613 parse.y        		| kFOR block_var kIN {COND_PUSH(1);} expr_value do {COND_POP();}


COND_PUSH

COND_PUSH        5266 parse.c        {COND_PUSH(1);}
COND_PUSH        5284 parse.c        {COND_PUSH(1);}
COND_PUSH        5321 parse.c        {COND_PUSH(1);}
COND_PUSH        5858 parse.c        			COND_PUSH(0);
COND_PUSH        8104 parse.c        	COND_PUSH(0);
COND_PUSH        8129 parse.c        	COND_PUSH(0);
COND_PUSH        8140 parse.c        	COND_PUSH(0);
COND_PUSH        1578 parse.y        		| kWHILE {COND_PUSH(1);} expr_value do {COND_POP();}
COND_PUSH        1588 parse.y        		| kUNTIL {COND_PUSH(1);} expr_value do {COND_POP();}
COND_PUSH        1613 parse.y        		| kFOR block_var kIN {COND_PUSH(1);} expr_value do {COND_POP();}
COND_PUSH        2104 parse.y        			COND_PUSH(0);
COND_PUSH        4106 parse.y        	COND_PUSH(0);
COND_PUSH        4131 parse.y        	COND_PUSH(0);
COND_PUSH        4142 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 3135 win32/win32.c  	ctx.ContextFlags = CONTEXT_FULL | CONTEXT_FLOATING_POINT;
CONTEXT_FLOATING_POINT 3165 win32/win32.c  	    ctx_orig.ContextFlags = CONTEXT_FULL | CONTEXT_FLOATING_POINT;


CP932INV_TABLE_BEGIN

CP932INV_TABLE_BEGIN 2932 ext/nkf/nkf-utf8/nkf.c             && CP932INV_TABLE_BEGIN <= c2 && c2 <= CP932INV_TABLE_END){
CP932INV_TABLE_BEGIN 2934 ext/nkf/nkf-utf8/nkf.c             int c = cp932inv[c2 - CP932INV_TABLE_BEGIN][c1 - 0x40];


CP932_TABLE_BEGIN

CP932_TABLE_BEGIN 1529 ext/nkf/nkf-utf8/nkf.c                     && CP932_TABLE_BEGIN <= c && c <= CP932_TABLE_END){
CP932_TABLE_BEGIN 2344 ext/nkf/nkf-utf8/nkf.c     if (cp932_f && CP932_TABLE_BEGIN <= c2 && c2 <= CP932_TABLE_END){
CP932_TABLE_BEGIN 2346 ext/nkf/nkf-utf8/nkf.c         val = shiftjis_cp932[c2 - CP932_TABLE_BEGIN][c1 - 0x40];


CP932_TABLE_END

CP932_TABLE_END  1529 ext/nkf/nkf-utf8/nkf.c                     && CP932_TABLE_BEGIN <= c && c <= CP932_TABLE_END){
CP932_TABLE_END  2344 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               1309 ext/nkf/nkf-utf8/nkf.c                 crmode_f = CR; cp++;
CR               2157 ext/nkf/nkf-utf8/nkf.c             } else if ((c1 == NL || c1 == CR) && broken_f&4) {
CR               2169 ext/nkf/nkf-utf8/nkf.c 	    } else if (c1 == CR && mime_decode_f && !mime_decode_mode ) {
CR               2184 ext/nkf/nkf-utf8/nkf.c 		c1 = CR;
CR               3100 ext/nkf/nkf-utf8/nkf.c 	} else if (crmode_f==CR) {
CR               3525 ext/nkf/nkf-utf8/nkf.c #define nkf_isspace(c) (nkf_isblank(c) || c == CR || c == NL)
CR               3917 ext/nkf/nkf-utf8/nkf.c 		case CR:
CR               3938 ext/nkf/nkf-utf8/nkf.c 			c1 = CR;
CR               4033 ext/nkf/nkf-utf8/nkf.c 	    case CR:
CR               4057 ext/nkf/nkf-utf8/nkf.c 		    c1 = CR;
CR               4240 ext/nkf/nkf-utf8/nkf.c 	    	|| mimeout_buf[i]==CR || mimeout_buf[i]==NL )) {
CR               4247 ext/nkf/nkf-utf8/nkf.c 		|| mimeout_buf[i]==CR || mimeout_buf[i]==NL ) {
CR               4313 ext/nkf/nkf-utf8/nkf.c 	} else if (c==CR||c==NL) {
CR               4389 ext/nkf/nkf-utf8/nkf.c                 if (c!=CR && c!=NL) {
CR               4453 ext/nkf/nkf-utf8/nkf.c                 if (c==CR || c==NL) {
CR               4458 ext/nkf/nkf-utf8/nkf.c                     if (mimeout_buf[i] == CR || mimeout_buf[i] == NL){
CR               4483 ext/nkf/nkf-utf8/nkf.c             if (lastchar==CR || lastchar == NL){
CR               4503 ext/nkf/nkf-utf8/nkf.c             if (lastchar == CR || lastchar == NL){
CR               4518 ext/nkf/nkf-utf8/nkf.c             if (c==SPACE || c==TAB || c==CR || c==NL) {
CR               4557 ext/nkf/nkf-utf8/nkf.c 	    if (mimeout_buf[i]==CR || mimeout_buf[i]==NL)


CRLF

CRLF             1297 ext/nkf/nkf-utf8/nkf.c             crmode_f = CRLF;
CRLF             1311 ext/nkf/nkf-utf8/nkf.c                 crmode_f = CRLF; cp++;
CRLF             3098 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);


CSTAT_PRIV

CSTAT_PRIV       5472 eval.c             if (last_call_status & CSTAT_PRIV) {
CSTAT_PRIV       5906 eval.c         	    return method_missing(recv, mid, argc, argv, CSTAT_PRIV);


CSTAT_PROT

CSTAT_PROT       5475 eval.c             else if (last_call_status & CSTAT_PROT) {
CSTAT_PROT       5916 eval.c         		return method_missing(recv, mid, argc, argv, CSTAT_PROT);


CSTAT_SUPER

CSTAT_SUPER      5482 eval.c             else if (last_call_status & CSTAT_SUPER) {
CSTAT_SUPER      5898 eval.c         	    return method_missing(recv, mid, argc, argv, CSTAT_SUPER);
CSTAT_SUPER      6084 eval.c         	return method_missing(self, ruby_frame->orig_func, argc, argv, CSTAT_SUPER);


CSTAT_VCALL

CSTAT_VCALL      5478 eval.c             else if (last_call_status & CSTAT_VCALL) {
CSTAT_VCALL      5890 eval.c         	    return method_missing(recv, mid, argc, argv, scope==2?CSTAT_VCALL:0);
CSTAT_VCALL      5900 eval.c         	return method_missing(recv, mid, argc, argv, scope==2?CSTAT_VCALL:0);


CURPTR

CURPTR            413 ext/strscan/strscan.c                        CURPTR(p), S_RESTLEN(p),
CURPTR            419 ext/strscan/strscan.c                         CURPTR(p), S_RESTLEN(p),
CURPTR            687 ext/strscan/strscan.c     len = mbclen(*CURPTR(p));
CURPTR            823 ext/strscan/strscan.c     if (CURPTR(p) > S_PEND(p)) return Qnil;
CURPTR            825 ext/strscan/strscan.c     return (*(CURPTR(p) - 1) == '\n') ? Qtrue : Qfalse;
CURPTR           1153 ext/strscan/strscan.c     memcpy(bp, CURPTR(p) - len, len); bp += len;
CURPTR           1169 ext/strscan/strscan.c         memcpy(bp, CURPTR(p), len); bp += len;
CURPTR           1173 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;


Calloc

Calloc            158 st.c               tbl->bins = (st_table_entry **)Calloc(size, sizeof(st_table_entry*));
Calloc            319 st.c               new_bins = (st_table_entry**)Calloc(new_num_bins, sizeof(st_table_entry*));
Calloc            351 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           80 dir.c          #ifndef CharNext		/* defined as CharNext[AW] on Windows. */
CharNext         2290 file.c         #ifndef CharNext		/* defined as CharNext[AW] on Windows. */
CharNext         2363 file.c         	s = CharNext(s);
CharNext         2409 file.c         	    path = CharNext(path);
CharNext         2427 file.c         	    path = CharNext(path);
CharNext         2478 file.c         	    for (p = buf; *p; p = CharNext(p)) {
CharNext         2637 file.c         	    s = CharNext(s);
CharNext          226 ruby.c         #ifdef CharNext		/* defined as CharNext[AW] on Windows. */
CharNext          227 ruby.c         	p = CharNext(p);
CharNext          787 win32/win32.c  		p = CharNext(p) - 1;
CharNext          813 win32/win32.c  		p = CharNext(p) - 1;
CharNext          913 win32/win32.c  	for (prog = cmd; *prog; prog = CharNext(prog)) {
CharNext          970 win32/win32.c  	    p = CharNext(p);
CharNext         1051 win32/win32.c      for (p = buf; *p; p = CharNext(p))
CharNext         1103 win32/win32.c  	    ptr = CharNext(ptr);
CharNext         1215 win32/win32.c  		ptr = CharNext(ptr);
CharNext         1278 win32/win32.c  		    p = CharNext(p);
CharNext         2575 win32/win32.c      for (bp = buffer; *bp != '\0'; bp = CharNext(bp)) {
CharNext         2796 win32/win32.c  	for (p = path + 2; *p; p = CharNext(p)) {
CharNext         2801 win32/win32.c  	    for (p++; *p; p = CharNext(p)) {


CharNextA

CharNextA          39 win32/win32.h  #define CharNext CharNextA
CharNextA          87 wince/wince.h  #define CharNext CharNextA


CharPrev

CharPrev         1396 win32/win32.c      if (index("/\\:", *CharPrev(scanname, scanname + strlen(scanname))) == NULL)
CharPrev         2859 win32/win32.c  	    end = CharPrev(path, end);
CharPrev         2942 win32/win32.c      end = CharPrev(buf1, buf1 + len);


Check_SafeStr

Check_SafeStr    7870 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    3235 ext/win32ole/win32ole.c     Check_SafeStr(cmdname);
Check_SafeStr    3461 ext/win32ole/win32ole.c     Check_SafeStr(oleclass);
Check_SafeStr    3462 ext/win32ole/win32ole.c     Check_SafeStr(typelib);
Check_SafeStr    4362 ext/win32ole/win32ole.c         Check_SafeStr(method);
Check_SafeStr    5939 ext/win32ole/win32ole.c         Check_SafeStr(itf);
Check_SafeStr    6035 ext/win32ole/win32ole.c         Check_SafeStr(event);


Check_Type

Check_Type         41 class.c            Check_Type(super, T_CLASS);
Check_Type        386 class.c        	Check_Type(module, T_MODULE);
Check_Type        478 class.c            Check_Type(mod2, T_MODULE);
Check_Type        414 eval.c             Check_Type(klass, T_CLASS);
Check_Type        422 eval.c             Check_Type(klass, T_CLASS);
Check_Type       7363 eval.c         	Check_Type(include, T_CLASS);
Check_Type       7386 eval.c             for (i=0; i<argc; i++) Check_Type(argv[i], T_MODULE);
Check_Type       7483 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        476 ext/dbm/dbm.c      Check_Type(pair, T_ARRAY);
Check_Type        550 ext/dl/ptr.c     Check_Type(rest, T_ARRAY);
Check_Type        553 ext/dl/sym.c         Check_Type(argv[i], T_FLOAT);
Check_Type        558 ext/dl/sym.c         Check_Type(argv[i], T_FLOAT);
Check_Type        565 ext/dl/sym.c         Check_Type(argv[i], T_FLOAT);
Check_Type        570 ext/dl/sym.c         Check_Type(argv[i], T_FLOAT);
Check_Type        579 ext/gdbm/gdbm.c     Check_Type(pair, T_ARRAY);
Check_Type        227 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        191 ext/openssl/ossl_ssl.c     Check_Type(ary, T_ARRAY);
Check_Type        523 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         72 ext/readline/readline.c     Check_Type(rb_stdout, T_FILE);
Check_Type         75 ext/readline/readline.c     Check_Type(rb_stdin, T_FILE);
Check_Type        455 ext/sdbm/init.c     Check_Type(pair, T_ARRAY);
Check_Type         79 ext/stringio/stringio.c     Check_Type(self, T_DATA);
Check_Type        403 ext/strscan/strscan.c     Check_Type(regex, T_REGEXP);
Check_Type        787 ext/syck/rubyext.c         Check_Type(options, T_HASH);
Check_Type       1996 ext/syck/rubyext.c         Check_Type(options, T_HASH);
Check_Type       2060 ext/tk/tcltklib.c         Check_Type(vflags, T_FIXNUM);
Check_Type       1932 ext/win32ole/win32ole.c         Check_Type(key, T_STRING);
Check_Type       1953 ext/win32ole/win32ole.c     Check_Type(argv, T_ARRAY);
Check_Type       2207 ext/win32ole/win32ole.c     Check_Type(args, T_ARRAY);
Check_Type       2208 ext/win32ole/win32ole.c     Check_Type(types, T_ARRAY);
Check_Type       2244 ext/win32ole/win32ole.c                 Check_Type(param, T_ARRAY);
Check_Type       1018 ext/zlib/zlib.c     Check_Type(size, T_FIXNUM);
Check_Type       1111 ext/zlib/zlib.c     : ((void)Check_Type((val), T_FIXNUM), FIX2INT((val))))
Check_Type       1835 ext/zlib/zlib.c 	Check_Type(str, T_STRING);
Check_Type       3096 ext/zlib/zlib.c 	    Check_Type(rs, T_STRING);
Check_Type       4188 file.c             Check_Type(rb_load_path, T_ARRAY);
Check_Type       4249 file.c         	Check_Type(rb_load_path, T_ARRAY);
Check_Type        401 gc.c               if (klass) Check_Type(klass, T_CLASS);
Check_Type       4572 io.c           	Check_Type(read, T_ARRAY);
Check_Type       4593 io.c           	Check_Type(write, T_ARRAY);
Check_Type       4610 io.c           	Check_Type(except, T_ARRAY);
Check_Type        115 prec.c                Check_Type(include, T_CLASS);
Check_Type       2466 process.c          Check_Type(ary, T_ARRAY);
Check_Type       2175 re.c           	Check_Type(val, T_MATCH);
Check_Type        395 ruby.h             Check_Type(obj, T_DATA); \
Check_Type        294 signal.c       	    Check_Type(argv[i], T_FIXNUM);
Check_Type       1919 string.c       	    Check_Type(pat, T_REGEXP);
Check_Type       1264 variable.c         Check_Type(av, T_DATA);
Check_Type       1362 variable.c         Check_Type(file, T_STRING);


CloseChildHandle

CloseChildHandle  682 win32/win32.c  		CloseChildHandle(child);
CloseChildHandle  701 win32/win32.c  		CloseChildHandle(child);
CloseChildHandle  748 win32/win32.c  	CloseChildHandle(child);
CloseChildHandle  839 win32/win32.c  	CloseChildHandle(child);
CloseChildHandle 2462 win32/win32.c  	CloseChildHandle(child);
CloseChildHandle 2468 win32/win32.c  	CloseChildHandle(child);


CreateChild

CreateChild        86 win32/win32.c  static struct ChildRecord *CreateChild(const char *, const char *, SECURITY_ATTRIBUTES *, HANDLE, HANDLE, HANDLE);
CreateChild       657 win32/win32.c  	child = CreateChild(cmd, NULL, &sa, hWriteIn, hReadOut, NULL);
CreateChild       734 win32/win32.c      child = CreateChild(cmd, NULL, NULL, NULL, NULL, NULL);
CreateChild       825 win32/win32.c      child = CreateChild(cmd, prog, NULL, NULL, NULL, NULL);


CreateFile

CreateFile        684 file.c         	f = CreateFile(StringValueCStr(*file), 0,
CreateFile       1606 win32/win32.c      hF = CreateFile("NUL", 0, 0, NULL, OPEN_ALWAYS, 0, NULL);
CreateFile       3469 win32/win32.c  	hFile = CreateFile(path, GENERIC_WRITE, 0, 0, OPEN_EXISTING,


CreatePipe

CreatePipe        618 win32/win32.c  	    fRet = CreatePipe(&hReadIn, &hReadOut, &sa, 2048L);
CreatePipe        634 win32/win32.c  	    fRet = CreatePipe(&hWriteIn, &hWriteOut, &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_PTR

DATA_PTR          146 ext/dbm/dbm.c      DATA_PTR(obj) = dbmp;
DATA_PTR          284 ext/dl/dl.h    #define RDLPTR(obj)  ((struct ptr_data *)(DATA_PTR(obj)))
DATA_PTR          285 ext/dl/dl.h    #define RDLSYM(obj)  ((struct sym_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          231 ext/iconv/iconv.c     return (VALUE)DATA_PTR(obj);
DATA_PTR          548 ext/iconv/iconv.c     DATA_PTR(self) = NULL;
DATA_PTR          549 ext/iconv/iconv.c     DATA_PTR(self) = (void *)ICONV2VALUE(iconv_create(to, from));
DATA_PTR          712 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          550 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           84 ext/stringio/stringio.c     return DATA_PTR(self);
DATA_PTR          224 ext/stringio/stringio.c 	DATA_PTR(self) = ptr = strio_alloc();
DATA_PTR          503 ext/stringio/stringio.c 	strio_free(DATA_PTR(copy));
DATA_PTR          505 ext/stringio/stringio.c     DATA_PTR(copy) = ptr;
DATA_PTR         1793 ext/syck/rubyext.c                 DATA_PTR(t) = n = syck_alloc_map();
DATA_PTR         1805 ext/syck/rubyext.c                 DATA_PTR(t) = n = syck_alloc_seq();
DATA_PTR         1814 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          242 ext/win32ole/win32ole.c         st_delete(DATA_PTR(com_hash), &key, 0);
DATA_PTR          315 ext/win32ole/win32ole.c     struct st_table *tbl = DATA_PTR(com_hash);
DATA_PTR         3467 file.c             if (DATA_PTR(obj)) {
DATA_PTR         3468 file.c         	free(DATA_PTR(obj));
DATA_PTR         3469 file.c         	DATA_PTR(obj) = NULL;
DATA_PTR         3473 file.c             DATA_PTR(obj) = nst;
DATA_PTR         3491 file.c             if (DATA_PTR(copy)) {
DATA_PTR         3492 file.c         	free(DATA_PTR(copy));
DATA_PTR         3493 file.c         	DATA_PTR(copy) = 0;
DATA_PTR         3495 file.c             if (DATA_PTR(orig)) {
DATA_PTR         3497 file.c         	*nst = *(struct stat*)DATA_PTR(orig);
DATA_PTR         3498 file.c         	DATA_PTR(copy) = nst;
DATA_PTR          942 gc.c           	if (obj->as.data.dmark) (*obj->as.data.dmark)(DATA_PTR(obj));
DATA_PTR         1191 gc.c           	if (DATA_PTR(obj)) {
DATA_PTR         1193 gc.c           		RUBY_CRITICAL(free(DATA_PTR(obj)));
DATA_PTR         1196 gc.c           		(*RANY(obj)->as.data.dfree)(DATA_PTR(obj));
DATA_PTR         1849 gc.c           		DATA_PTR(p) && RANY(p)->as.data.dfree) {
DATA_PTR         1852 gc.c           		    RUBY_CRITICAL(free(DATA_PTR(p)));
DATA_PTR         1855 gc.c           		    (*RANY(p)->as.data.dfree)(DATA_PTR(p));
DATA_PTR          396 ruby.h             sval = (type*)DATA_PTR(obj);\
DATA_PTR         1269 variable.c         return (struct st_table *)DATA_PTR(av);
DATA_PTR         1299 variable.c     	DATA_PTR(av) = tbl = st_init_numtable();
DATA_PTR         1322 variable.c     	    DATA_PTR(val) = 0;
DATA_PTR         1373 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           290 marshal.c      #ifdef DBL_DIG
DBL_DIG           291 marshal.c      #define FLOAT_DIG (DBL_DIG+2)
DBL_DIG            56 numeric.c      #ifndef DBL_DIG
DBL_DIG          2892 numeric.c          rb_define_const(rb_cFloat, "DIG", INT2FIX(DBL_DIG));


DBL_EPSILON

DBL_EPSILON        62 numeric.c      #ifndef DBL_EPSILON
DBL_EPSILON      1471 numeric.c      	const double epsilon = DBL_EPSILON;
DBL_EPSILON      2899 numeric.c          rb_define_const(rb_cFloat, "EPSILON", rb_float_new(DBL_EPSILON));


DBL_MANT_DIG

DBL_MANT_DIG      208 marshal.c      #ifdef DBL_MANT_DIG
DBL_MANT_DIG      211 marshal.c      #if DBL_MANT_DIG > 32
DBL_MANT_DIG      213 marshal.c      #elif DBL_MANT_DIG > 24
DBL_MANT_DIG      215 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       60 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     2891 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          2898 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   2896 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      2894 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          2897 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   2895 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      2893 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               268 ext/dbm/dbm.c          DBM *dbm;
DBM               328 ext/dbm/dbm.c      DBM *dbm;
DBM               362 ext/dbm/dbm.c      DBM *dbm;
DBM               385 ext/dbm/dbm.c      DBM *dbm;
DBM               426 ext/dbm/dbm.c      DBM *dbm;
DBM               447 ext/dbm/dbm.c      DBM *dbm;
DBM               507 ext/dbm/dbm.c      DBM *dbm;
DBM               538 ext/dbm/dbm.c      DBM *dbm;
DBM               558 ext/dbm/dbm.c      DBM *dbm;
DBM               582 ext/dbm/dbm.c      DBM *dbm;
DBM               599 ext/dbm/dbm.c      DBM *dbm;
DBM               614 ext/dbm/dbm.c      DBM *dbm;
DBM               637 ext/dbm/dbm.c      DBM *dbm;
DBM               656 ext/dbm/dbm.c      DBM *dbm;
DBM               675 ext/dbm/dbm.c      DBM *dbm;
DBM               693 ext/dbm/dbm.c      DBM *dbm;
DBM               715 ext/dbm/dbm.c      DBM *dbm;
DBM               735 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               245 ext/sdbm/init.c         DBM *dbm;
DBM               305 ext/sdbm/init.c     DBM *dbm;
DBM               341 ext/sdbm/init.c     DBM *dbm;
DBM               365 ext/sdbm/init.c     DBM *dbm;
DBM               405 ext/sdbm/init.c     DBM *dbm;
DBM               426 ext/sdbm/init.c     DBM *dbm;
DBM               486 ext/sdbm/init.c     DBM *dbm;
DBM               522 ext/sdbm/init.c     DBM *dbm;
DBM               542 ext/sdbm/init.c     DBM *dbm;
DBM               566 ext/sdbm/init.c     DBM *dbm;
DBM               583 ext/sdbm/init.c     DBM *dbm;
DBM               598 ext/sdbm/init.c     DBM *dbm;
DBM               620 ext/sdbm/init.c     DBM *dbm;
DBM               638 ext/sdbm/init.c     DBM *dbm;
DBM               657 ext/sdbm/init.c     DBM *dbm;
DBM               675 ext/sdbm/init.c     DBM *dbm;
DBM               697 ext/sdbm/init.c     DBM *dbm;
DBM               717 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       521 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       505 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);


DEBUG_CODE

DEBUG_CODE        130 ext/dl/dl.c      DEBUG_CODE({
DEBUG_CODE        139 ext/dl/dl.c      DEBUG_CODE({
DEBUG_CODE         57 ext/dl/ptr.c       DEBUG_CODE({
DEBUG_CODE         63 ext/dl/ptr.c         DEBUG_CODE({
DEBUG_CODE         80 ext/dl/ptr.c     DEBUG_CODE({
DEBUG_CODE         61 ext/dl/sym.c       DEBUG_CODE({
DEBUG_CODE         67 ext/dl/sym.c       DEBUG_CODE({
DEBUG_CODE        456 ext/dl/sym.c     DEBUG_CODE({
DEBUG_CODE        877 ext/dl/sym.c         DEBUG_CODE({
DEBUG_CODE        921 ext/dl/sym.c   	DEBUG_CODE({


DECIMAL_MANT

DECIMAL_MANT      230 marshal.c          d = modf(ldexp(frexp(fabs(d), &e), DECIMAL_MANT), &d);
DECIMAL_MANT      262 marshal.c      	modf(ldexp(frexp(fabs(d), &e), DECIMAL_MANT), &d);
DECIMAL_MANT      280 marshal.c      	d = ldexp(d, e - DECIMAL_MANT);


DEFAULT_CODE_JIS

DEFAULT_CODE_JIS  504 ext/nkf/nkf-utf8/nkf.c #ifdef DEFAULT_CODE_JIS
DEFAULT_CODE_JIS 4716 ext/nkf/nkf-utf8/nkf.c #ifdef DEFAULT_CODE_JIS


DEFAULT_CONV

DEFAULT_CONV      518 ext/nkf/nkf-utf8/nkf.c static void (*output_conv)PROTO((int c2,int c1)) = DEFAULT_CONV;
DEFAULT_CONV     4648 ext/nkf/nkf-utf8/nkf.c     output_conv = DEFAULT_CONV;
DEFAULT_CONV     4649 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         492 ext/nkf/nkf-utf8/nkf.c static unsigned char   kanji_intro = DEFAULT_J;
DEFAULT_J        4645 ext/nkf/nkf-utf8/nkf.c     kanji_intro = DEFAULT_J;


DEFAULT_KCODE

DEFAULT_KCODE      97 defines.h      #ifndef DEFAULT_KCODE
DEFAULT_KCODE     162 re.c           static int reg_kcode = DEFAULT_KCODE;
DEFAULT_KCODE    2227 re.c           #if DEFAULT_KCODE == KCODE_EUC
DEFAULT_KCODE    2230 re.c           #if DEFAULT_KCODE == KCODE_SJIS
DEFAULT_KCODE    2233 re.c           #if DEFAULT_KCODE == KCODE_UTF8


DEFAULT_R

DEFAULT_R         493 ext/nkf/nkf-utf8/nkf.c static unsigned char   ascii_intro = DEFAULT_R;
DEFAULT_R        4646 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;


DEFER_INTS

DEFER_INTS        872 class.c            DEFER_INTS;
DEFER_INTS       5380 eval.c             DEFER_INTS;
DEFER_INTS       6705 eval.c         	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           692 missing/vsnprintf.c 				DEFPREC + 1 : prec + 1;
DEFPREC           701 missing/vsnprintf.c 				prec = DEFPREC;


DEF_MEM_LEVEL

DEF_MEM_LEVEL      23 ext/zlib/zlib.c #ifndef DEF_MEM_LEVEL
DEF_MEM_LEVEL    1115 ext/zlib/zlib.c #define ARG_MEMLEVEL(val)  FIXNUMARG((val), DEF_MEM_LEVEL)
DEF_MEM_LEVEL    2720 ext/zlib/zlib.c 		       -MAX_WBITS, DEF_MEM_LEVEL, ARG_STRATEGY(strategy));
DEF_MEM_LEVEL    3389 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              1499 ext/nkf/nkf-utf8/nkf.c     if (c <= DEL && estab_f){
DEL              1513 ext/nkf/nkf-utf8/nkf.c           if (c <= DEL){
DEL              1579 ext/nkf/nkf-utf8/nkf.c           if (c <= DEL){
DEL              1676 ext/nkf/nkf-utf8/nkf.c           if (c <= DEL){
DEL              1738 ext/nkf/nkf-utf8/nkf.c         }else if (c <= DEL){
DEL              1916 ext/nkf/nkf-utf8/nkf.c             if (c2 > DEL) {
DEL              1937 ext/nkf/nkf-utf8/nkf.c                 if ((c1 == DEL) || (c1 <= SPACE)) {
DEL              1959 ext/nkf/nkf-utf8/nkf.c 	    } else if (c1 > DEL) {
DEL              2003 ext/nkf/nkf-utf8/nkf.c             } else if ((c1 > SPACE) && (c1 != DEL)) {
DEL              2286 ext/nkf/nkf-utf8/nkf.c         if (c2 <= DEL
DEL              2373 ext/nkf/nkf-utf8/nkf.c         c1 = c1 - ((c1 > DEL) ? SPACE : 0x1f);
DEL              4316 ext/nkf/nkf-utf8/nkf.c 	} else if(c<SPACE||c=='='||c=='?'||c=='_'||DEL<=c) {
DEL              4432 ext/nkf/nkf-utf8/nkf.c         if (c <= DEL && (output_mode==ASCII ||output_mode == ISO8859_1 ) ) {
DEL              4451 ext/nkf/nkf-utf8/nkf.c         if (c <= DEL && (output_mode==ASCII ||output_mode == ISO8859_1)) {
DEL              4502 ext/nkf/nkf-utf8/nkf.c         if ( c<=DEL && (output_mode==ASCII ||output_mode == ISO8859_1 ) ) {
DEL              4509 ext/nkf/nkf-utf8/nkf.c                 } else if (SPACE<c && c<DEL) {
DEL              4520 ext/nkf/nkf-utf8/nkf.c                     if (SPACE<mimeout_buf[i] && mimeout_buf[i]<DEL) {


DELAY_INFTY

DELAY_INFTY      10419 eval.c             delay = DELAY_INFTY;
DELAY_INFTY      10462 eval.c         	    else if (th->delay == DELAY_INFTY) {
DELAY_INFTY      10478 eval.c         	else if (delay == DELAY_INFTY) {
DELAY_INFTY      10558 eval.c         	if (!found && delay != DELAY_INFTY)
DELAY_INFTY      10838 eval.c         	if (limit < DELAY_INFTY) curr_thread->wait_for |= WAIT_TIME;
DELAY_INFTY      10907 eval.c             double delay = DELAY_INFTY;
DELAY_INFTY      11228 eval.c             curr_thread->delay = DELAY_INFTY;
DELAY_INFTY      11849 eval.c             while (!rb_thread_join(th, DELAY_INFTY));


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)


DIGSPERLL

DIGSPERLL         242 bignum.c           big = bignew(DIGSPERLL, 1);
DIGSPERLL         244 bignum.c           while (i < DIGSPERLL) {
DIGSPERLL         249 bignum.c           i = DIGSPERLL;
DIGSPERLL         550 bignum.c           big = bignew(DIGSPERLL, 1);
DIGSPERLL         552 bignum.c           while (i < DIGSPERLL) {
DIGSPERLL         557 bignum.c           i = DIGSPERLL;


DIGSPERLONG

DIGSPERLONG       141 bignum.c           big = bignew(DIGSPERLONG, 1);
DIGSPERLONG       143 bignum.c           while (i < DIGSPERLONG) {
DIGSPERLONG       148 bignum.c           i = DIGSPERLONG;


DIR

DIR               231 dir.c              DIR *dir;
DIR               958 dir.c          	    DIR *dirp;
DIR                23 win32/dir.h    DIR*           rb_w32_opendir(const char*);
DIR                24 win32/dir.h    struct direct* rb_w32_readdir(DIR *);
DIR                25 win32/dir.h    long           rb_w32_telldir(DIR *);
DIR                26 win32/dir.h    void           rb_w32_seekdir(DIR *, long);
DIR                27 win32/dir.h    void           rb_w32_rewinddir(DIR *);
DIR                28 win32/dir.h    void           rb_w32_closedir(DIR *);
DIR              1357 win32/win32.c  DIR *
DIR              1360 win32/win32.c      DIR               *p;
DIR              1386 win32/win32.c      p = xcalloc(sizeof(DIR), 1);
DIR              1458 win32/win32.c  rb_w32_readdir(DIR *dirp)
DIR              1498 win32/win32.c  rb_w32_telldir(DIR *dirp)
DIR              1508 win32/win32.c  rb_w32_seekdir(DIR *dirp, long loc)
DIR              1518 win32/win32.c  rb_w32_rewinddir(DIR *dirp)
DIR              1528 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               463 time.c                             DIV(tm_year-69,4) -
DIV               464 time.c                             DIV(tm_year-1,100) +
DIV               465 time.c                             DIV(tm_year+299,400))*86400;


DLALIGN

DLALIGN           182 ext/dl/dl.c          DLALIGN(0,size,INT_ALIGN);
DLALIGN           187 ext/dl/dl.c          DLALIGN(0,size,LONG_ALIGN);
DLALIGN           192 ext/dl/dl.c          DLALIGN(0,size,FLOAT_ALIGN);
DLALIGN           197 ext/dl/dl.c          DLALIGN(0,size,DOUBLE_ALIGN);
DLALIGN           206 ext/dl/dl.c          DLALIGN(0,size,SHORT_ALIGN);
DLALIGN           212 ext/dl/dl.c          DLALIGN(0,size,VOIDP_ALIGN);
DLALIGN           759 ext/dl/ptr.c   	  DLALIGN(data->ptr,offset,INT_ALIGN);
DLALIGN           762 ext/dl/ptr.c   	  DLALIGN(data->ptr,offset,LONG_ALIGN);
DLALIGN           766 ext/dl/ptr.c   	  DLALIGN(data->ptr,offset,VOIDP_ALIGN);
DLALIGN           769 ext/dl/ptr.c   	  DLALIGN(data->ptr,offset,FLOAT_ALIGN);
DLALIGN           772 ext/dl/ptr.c   	  DLALIGN(data->ptr,offset,DOUBLE_ALIGN);
DLALIGN           777 ext/dl/ptr.c   	  DLALIGN(data->ptr,offset,SHORT_ALIGN);
DLALIGN           889 ext/dl/ptr.c   	  DLALIGN(data->ptr,offset,INT_ALIGN);
DLALIGN           892 ext/dl/ptr.c   	  DLALIGN(data->ptr,offset,LONG_ALIGN);
DLALIGN           896 ext/dl/ptr.c   	  DLALIGN(data->ptr,offset,VOIDP_ALIGN);
DLALIGN           899 ext/dl/ptr.c   	  DLALIGN(data->ptr,offset,DOUBLE_ALIGN);
DLALIGN           902 ext/dl/ptr.c   	  DLALIGN(data->ptr,offset,FLOAT_ALIGN);
DLALIGN           907 ext/dl/ptr.c   	  DLALIGN(data->ptr,offset,SHORT_ALIGN);


DLCHAR

DLCHAR            513 ext/dl/sym.c         ANY2C(args[i]) = DLCHAR(NUM2CHR(argv[i]));
DLCHAR            517 ext/dl/sym.c         ANY2C(dargs[i]) = DLCHAR(NUM2CHR(argv[i]));


DLEXT

DLEXT            6793 eval.c         #define IS_DLEXT(e) (strcmp(e, DLEXT) == 0 || strcmp(e, DLEXT2) == 0)
DLEXT            6795 eval.c         #define IS_DLEXT(e) (strcmp(e, DLEXT) == 0)
DLEXT            6835 eval.c             ".rb", DLEXT,
DLEXT            6950 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);


DLFLOAT

DLFLOAT           554 ext/dl/sym.c         ANY2F(args[i]) = DLFLOAT(RFLOAT(argv[i])->value);
DLFLOAT           559 ext/dl/sym.c         ANY2F(dargs[i]) = DLFLOAT(RFLOAT(argv[i])->value);


DLINT

DLINT             117 ext/dl/dl.h    # define DLCHAR(x) DLINT(x)
DLINT             127 ext/dl/dl.h    # define DLSHORT(x) DLINT(x)
DLINT             533 ext/dl/sym.c         ANY2I(args[i]) = DLINT(NUM2INT(argv[i]));
DLINT             537 ext/dl/sym.c         ANY2I(dargs[i]) = DLINT(NUM2INT(argv[i]));


DLLONG2NUM

DLLONG2NUM        118 ext/dl/handle.c   return DLLONG2NUM(dlhandle);
DLLONG2NUM         30 ext/dl/ptr.c     rb_hash_delete(DLMemoryTable, DLLONG2NUM(ptr));
DLLONG2NUM         40 ext/dl/ptr.c       rb_hash_aset(DLMemoryTable, DLLONG2NUM(ptr), DLLONG2NUM(obj));
DLLONG2NUM         49 ext/dl/ptr.c     val = rb_hash_aref(DLMemoryTable, DLLONG2NUM(ptr));
DLLONG2NUM        253 ext/dl/ptr.c     return DLLONG2NUM(data->ptr);
DLLONG2NUM        371 ext/dl/ptr.c         rb_ary_push(ary, DLLONG2NUM(((long*)(data->ptr))[i]));
DLLONG2NUM        490 ext/dl/ptr.c     return DLLONG2NUM((long)ptr1 - (long)ptr2);
DLLONG2NUM        656 ext/dl/ptr.c         elem = DLLONG2NUM(*((long*)ptr));
DLLONG2NUM        694 ext/dl/ptr.c         elem = DLLONG2NUM(*((long*)ptr));
DLLONG2NUM       1002 ext/dl/ptr.c       return DLLONG2NUM(RDLPTR(self)->size);
DLLONG2NUM        856 ext/dl/sym.c       val = DLLONG2NUM((long)(ANY2L(ret)));
DLLONG2NUM        905 ext/dl/sym.c           rb_ary_push(dvals, DLLONG2NUM(*((long*)(ANY2P(args[i])))));
DLLONG2NUM        955 ext/dl/sym.c     return DLLONG2NUM(sym);


DLNUM2LONG

DLNUM2LONG        574 ext/dl/dl.c      return rb_dlptr_malloc(DLNUM2LONG(size), dlfree);
DLNUM2LONG         50 ext/dl/ptr.c     return val == Qnil ? Qnil : (VALUE)DLNUM2LONG(val);
DLNUM2LONG        194 ext/dl/ptr.c       p = (void*)(DLNUM2LONG(rb_Integer(ptr)));
DLNUM2LONG        197 ext/dl/ptr.c       p = (void*)(DLNUM2LONG(rb_Integer(ptr)));
DLNUM2LONG        198 ext/dl/ptr.c       s = DLNUM2LONG(size);
DLNUM2LONG        201 ext/dl/ptr.c       p = (void*)(DLNUM2LONG(rb_Integer(ptr)));
DLNUM2LONG        202 ext/dl/ptr.c       s = DLNUM2LONG(size);
DLNUM2LONG        501 ext/dl/ptr.c     num = DLNUM2LONG(other);
DLNUM2LONG        513 ext/dl/ptr.c     num = DLNUM2LONG(other);
DLNUM2LONG        866 ext/dl/ptr.c       dst = (void*)((long)(data->ptr) + DLNUM2LONG(key));
DLNUM2LONG       1005 ext/dl/ptr.c       RDLPTR(self)->size = DLNUM2LONG(size);
DLNUM2LONG       1016 ext/dl/ptr.c     rb_yield(rb_assoc_new(key,(VALUE)DLNUM2LONG(val)));
DLNUM2LONG        156 ext/dl/sym.c     saddr = (void*)(DLNUM2LONG(rb_Integer(addr)));
DLNUM2LONG        543 ext/dl/sym.c         ANY2L(args[i]) = DLNUM2LONG(argv[i]);
DLNUM2LONG        547 ext/dl/sym.c         ANY2L(dargs[i]) = DLNUM2LONG(argv[i]);


DLN_DEFAULT_LIB_PATH

DLN_DEFAULT_LIB_PATH  155 dln.c          #ifndef DLN_DEFAULT_LIB_PATH
DLN_DEFAULT_LIB_PATH  941 dln.c          char *dln_librrb_ary_path = DLN_DEFAULT_LIB_PATH;


DLN_EBADLIB

DLN_EBADLIB       962 dln.c              dln_errno = DLN_EBADLIB;
DLN_EBADLIB      1183 dln.c                case DLN_EBADLIB:


DLN_ECONFL

DLN_ECONFL        756 dln.c          		dln_errno = DLN_ECONFL;
DLN_ECONFL       1175 dln.c                case DLN_ECONFL:


DLN_ENOEXEC

DLN_ENOEXEC       207 dln.c          	dln_errno = DLN_ENOEXEC;
DLN_ENOEXEC       331 dln.c              dln_errno = DLN_ENOEXEC;
DLN_ENOEXEC       428 dln.c              dln_errno = DLN_ENOEXEC;
DLN_ENOEXEC       657 dln.c          	dln_errno = DLN_ENOEXEC;


DLN_ENOINIT

DLN_ENOINIT       902 dln.c          	    dln_errno = DLN_ENOINIT;
DLN_ENOINIT       957 dln.c          	dln_errno = DLN_ENOINIT;
DLN_ENOINIT      1177 dln.c                case DLN_ENOINIT:


DLN_ENOTLIB

DLN_ENOTLIB       985 dln.c          	dln_errno = DLN_ENOTLIB;
DLN_ENOTLIB      1181 dln.c                case DLN_ENOTLIB:


DLN_ERROR

DLN_ERROR        1358 dln.c          	    error = DLN_ERROR();
DLN_ERROR        1624 dln.c          	    error = DLN_ERROR();


DLN_EUNDEF

DLN_EUNDEF        908 dln.c          		dln_errno = DLN_EUNDEF;
DLN_EUNDEF       1179 dln.c                case DLN_EUNDEF:


DLSHORT

DLSHORT           523 ext/dl/sym.c         ANY2H(args[i]) = DLSHORT(NUM2INT(argv[i]));
DLSHORT           527 ext/dl/sym.c         ANY2H(dargs[i]) = DLSHORT(NUM2INT(argv[i]));


DLSTACK

DLSTACK            98 ext/dl/sym.c   #if !(defined(DLSTACK))
DLSTACK           650 ext/dl/sym.c   #if defined(DLSTACK)


DLSTACK_ARGS

DLSTACK_ARGS      371 ext/dl/sym.c         f(DLSTACK_ARGS);
DLSTACK_ARGS      378 ext/dl/sym.c         ret->p = f(DLSTACK_ARGS);
DLSTACK_ARGS      385 ext/dl/sym.c         ret->c = f(DLSTACK_ARGS);
DLSTACK_ARGS      392 ext/dl/sym.c         ret->h = f(DLSTACK_ARGS);
DLSTACK_ARGS      399 ext/dl/sym.c         ret->i = f(DLSTACK_ARGS);
DLSTACK_ARGS      406 ext/dl/sym.c         ret->l = f(DLSTACK_ARGS);
DLSTACK_ARGS      413 ext/dl/sym.c         ret->f = f(DLSTACK_ARGS);
DLSTACK_ARGS      420 ext/dl/sym.c         ret->d = f(DLSTACK_ARGS);
DLSTACK_ARGS      427 ext/dl/sym.c         ret->s = f(DLSTACK_ARGS);
DLSTACK_ARGS      741 ext/dl/sym.c   	f(DLSTACK_ARGS);
DLSTACK_ARGS      748 ext/dl/sym.c   	ret.p = f(DLSTACK_ARGS);
DLSTACK_ARGS      755 ext/dl/sym.c   	ret.c = f(DLSTACK_ARGS);
DLSTACK_ARGS      762 ext/dl/sym.c   	ret.h = f(DLSTACK_ARGS);
DLSTACK_ARGS      769 ext/dl/sym.c   	ret.i = f(DLSTACK_ARGS);
DLSTACK_ARGS      776 ext/dl/sym.c   	ret.l = f(DLSTACK_ARGS);
DLSTACK_ARGS      783 ext/dl/sym.c   	ret.f = f(DLSTACK_ARGS);
DLSTACK_ARGS      790 ext/dl/sym.c   	ret.d = f(DLSTACK_ARGS);
DLSTACK_ARGS      797 ext/dl/sym.c   	ret.s = f(DLSTACK_ARGS);


DLSTACK_GUARD

DLSTACK_GUARD     356 ext/dl/sym.c   #ifdef DLSTACK_GUARD
DLSTACK_GUARD     730 ext/dl/sym.c   #ifdef DLSTACK_GUARD


DLSTACK_PROTO

DLSTACK_PROTO     370 ext/dl/sym.c         void (*f)(DLSTACK_PROTO) = func;
DLSTACK_PROTO     377 ext/dl/sym.c         void * (*f)(DLSTACK_PROTO) = func;
DLSTACK_PROTO     384 ext/dl/sym.c         char (*f)(DLSTACK_PROTO) = func;
DLSTACK_PROTO     391 ext/dl/sym.c         short (*f)(DLSTACK_PROTO) = func;
DLSTACK_PROTO     398 ext/dl/sym.c         int (*f)(DLSTACK_PROTO) = func;
DLSTACK_PROTO     405 ext/dl/sym.c         long (*f)(DLSTACK_PROTO) = func;
DLSTACK_PROTO     412 ext/dl/sym.c         float (*f)(DLSTACK_PROTO) = func;
DLSTACK_PROTO     419 ext/dl/sym.c         double (*f)(DLSTACK_PROTO) = func;
DLSTACK_PROTO     426 ext/dl/sym.c         char * (*f)(DLSTACK_PROTO) = func;
DLSTACK_PROTO     740 ext/dl/sym.c   	void (*f)(DLSTACK_PROTO) = func;
DLSTACK_PROTO     747 ext/dl/sym.c   	void * (*f)(DLSTACK_PROTO) = func;
DLSTACK_PROTO     754 ext/dl/sym.c   	char (*f)(DLSTACK_PROTO) = func;
DLSTACK_PROTO     761 ext/dl/sym.c   	short (*f)(DLSTACK_PROTO) = func;
DLSTACK_PROTO     768 ext/dl/sym.c   	int (*f)(DLSTACK_PROTO) = func;
DLSTACK_PROTO     775 ext/dl/sym.c   	long (*f)(DLSTACK_PROTO) = func;
DLSTACK_PROTO     782 ext/dl/sym.c   	float (*f)(DLSTACK_PROTO) = func;
DLSTACK_PROTO     789 ext/dl/sym.c   	double (*f)(DLSTACK_PROTO) = func;
DLSTACK_PROTO     796 ext/dl/sym.c   	char * (*f)(DLSTACK_PROTO) = func;


DLSTACK_PUSH_P

DLSTACK_PUSH_P    680 ext/dl/sym.c         DLSTACK_PUSH_P(ANY2P(args[i]));
DLSTACK_PUSH_P    684 ext/dl/sym.c         DLSTACK_PUSH_P(ANY2P(args[i]));
DLSTACK_PUSH_P    690 ext/dl/sym.c         DLSTACK_PUSH_P(ANY2P(args[i]));
DLSTACK_PUSH_P    696 ext/dl/sym.c         DLSTACK_PUSH_P(ANY2P(args[i]));
DLSTACK_PUSH_P    702 ext/dl/sym.c         DLSTACK_PUSH_P(ANY2P(args[i]));
DLSTACK_PUSH_P    708 ext/dl/sym.c         DLSTACK_PUSH_P(ANY2P(args[i]));
DLSTACK_PUSH_P    714 ext/dl/sym.c         DLSTACK_PUSH_P(ANY2P(args[i]));
DLSTACK_PUSH_P    720 ext/dl/sym.c         DLSTACK_PUSH_P(ANY2P(args[i]));
DLSTACK_PUSH_P    724 ext/dl/sym.c         DLSTACK_PUSH_P(ANY2S(args[i]));


DLSTACK_SIZE

DLSTACK_SIZE      652 ext/dl/sym.c   #if defined(DLSTACK_SIZE)
DLSTACK_SIZE      654 ext/dl/sym.c     long stack[DLSTACK_SIZE];
DLSTACK_SIZE      663 ext/dl/sym.c     else if( stk_size > (int)(DLSTACK_SIZE) ){


DLSTR

DLSTR             578 ext/dl/sym.c   	ANY2S(args[i]) = DLSTR(0);
DLSTR             583 ext/dl/sym.c   	ANY2S(args[i]) = DLSTR(RSTRING(str)->ptr);
DLSTR             591 ext/dl/sym.c   	ANY2S(args[i]) = DLSTR(dlmalloc(RSTRING(str)->len + 1));


DLVOIDP

DLVOIDP           132 ext/dl/dl.h    #define DLSTR(x) DLVOIDP(x)
DLVOIDP           483 ext/dl/sym.c   	  ANY2P(args[i]) = DLVOIDP(0);
DLVOIDP           496 ext/dl/sym.c   	  ANY2P(args[i]) = DLVOIDP(data->ptr);
DLVOIDP           505 ext/dl/sym.c   	ANY2P(args[i]) = DLVOIDP(0);
DLVOIDP           508 ext/dl/sym.c   	ANY2P(args[i]) = DLVOIDP(rb_ary2cary(0, argv[i], NULL));
DLVOIDP           518 ext/dl/sym.c         ANY2P(args[i]) = DLVOIDP(&(ANY2C(dargs[i])));
DLVOIDP           528 ext/dl/sym.c         ANY2P(args[i]) = DLVOIDP(&(ANY2H(dargs[i])));
DLVOIDP           538 ext/dl/sym.c         ANY2P(args[i]) = DLVOIDP(&(ANY2I(dargs[i])));
DLVOIDP           548 ext/dl/sym.c         ANY2P(args[i]) = DLVOIDP(&(ANY2L(dargs[i])));
DLVOIDP           560 ext/dl/sym.c         ANY2P(args[i]) = DLVOIDP(&(ANY2F(dargs[i])));
DLVOIDP           572 ext/dl/sym.c         ANY2P(args[i]) = DLVOIDP(&(ANY2D(dargs[i])));


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             98 defines.h      #if defined(DOSISH) || defined(__CYGWIN__) || defined(__MACOS__) || defined(OS2)
DOSISH            235 defines.h      #if defined(DOSISH)
DOSISH            250 defines.h      #if defined(DOSISH) && !defined(__human68k__) && !defined(__EMX__)
DOSISH             88 dir.c          #if defined DOSISH
DOSISH            201 dir.c          #if defined DOSISH
DOSISH            214 dir.c          #if defined DOSISH
DOSISH            923 dir.c          #if defined DOSISH
DOSISH           1735 dln.c          #ifdef DOSISH
DOSISH           1769 dln.c          #if defined(DOSISH)
DOSISH           1827 dln.c          #if defined(DOSISH)
DOSISH           1417 file.c         #ifndef DOSISH
DOSISH           2230 file.c         #elif defined DOSISH && !defined _WIN32
DOSISH           2284 file.c         #if defined DOSISH
DOSISH           2477 file.c         #if defined DOSISH || defined __CYGWIN__
DOSISH           2563 file.c         #if defined DOSISH || defined __CYGWIN__
DOSISH           2611 file.c         #if defined DOSISH || defined __CYGWIN__
DOSISH           2623 file.c         #if defined DOSISH || defined __CYGWIN__
DOSISH           4040 file.c         #ifndef DOSISH
DOSISH           4046 file.c         #ifndef DOSISH
DOSISH           4093 file.c         #ifndef DOSISH
DOSISH           4104 file.c         #ifndef DOSISH
DOSISH           4400 file.c         #ifdef DOSISH
DOSISH            211 ruby.c         #if defined DOSISH || defined __CYGWIN__
DOSISH            215 ruby.c         #if defined DOSISH || defined __CYGWIN__
DOSISH            263 ruby.c         #if defined DOSISH || defined __CYGWIN__
DOSISH            798 ruby.c         #if defined DOSISH || defined __CYGWIN__
DOSISH            855 ruby.c         #if defined DOSISH || defined __CYGWIN__
DOSISH            974 ruby.c         #if !defined(PSTAT_SETCMD) && !defined(HAVE_SETPROCTITLE) && !defined(DOSISH)
DOSISH           1050 ruby.c         #ifndef DOSISH


DOSISH_DRIVE_LETTER

DOSISH_DRIVE_LETTER  839 dir.c          #if defined DOSISH_DRIVE_LETTER
DOSISH_DRIVE_LETTER 1002 dir.c          #if defined DOSISH_DRIVE_LETTER
DOSISH_DRIVE_LETTER 1737 dln.c          # ifdef DOSISH_DRIVE_LETTER
DOSISH_DRIVE_LETTER 2304 file.c         #ifdef DOSISH_DRIVE_LETTER
DOSISH_DRIVE_LETTER 2350 file.c         #ifdef DOSISH_DRIVE_LETTER
DOSISH_DRIVE_LETTER 2368 file.c         #if defined(DOSISH_UNC) || defined(DOSISH_DRIVE_LETTER)
DOSISH_DRIVE_LETTER 2377 file.c         #if defined(DOSISH_UNC) || defined(DOSISH_DRIVE_LETTER)
DOSISH_DRIVE_LETTER 2387 file.c         #ifdef DOSISH_DRIVE_LETTER
DOSISH_DRIVE_LETTER 2513 file.c         #ifdef DOSISH_DRIVE_LETTER
DOSISH_DRIVE_LETTER 2738 file.c         #if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC
DOSISH_DRIVE_LETTER 2750 file.c         #if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC
DOSISH_DRIVE_LETTER 2758 file.c         #if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC
DOSISH_DRIVE_LETTER 2762 file.c         #ifdef DOSISH_DRIVE_LETTER
DOSISH_DRIVE_LETTER 2827 file.c         #ifdef DOSISH_DRIVE_LETTER
DOSISH_DRIVE_LETTER 2835 file.c         #ifdef DOSISH_DRIVE_LETTER
DOSISH_DRIVE_LETTER 4034 file.c         #ifdef DOSISH_DRIVE_LETTER


DOSISH_UNC

DOSISH_UNC       2368 file.c         #if defined(DOSISH_UNC) || defined(DOSISH_DRIVE_LETTER)
DOSISH_UNC       2377 file.c         #if defined(DOSISH_UNC) || defined(DOSISH_DRIVE_LETTER)
DOSISH_UNC       2378 file.c         #ifdef DOSISH_UNC
DOSISH_UNC       2738 file.c         #if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC
DOSISH_UNC       2750 file.c         #if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC
DOSISH_UNC       2758 file.c         #if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC
DOSISH_UNC       2768 file.c         #ifdef DOSISH_UNC
DOSISH_UNC       2814 file.c         #ifdef DOSISH_UNC
DOSISH_UNC       4037 file.c         #ifdef DOSISH_UNC


DOUBLE_ALIGN

DOUBLE_ALIGN      197 ext/dl/dl.c          DLALIGN(0,size,DOUBLE_ALIGN);
DOUBLE_ALIGN      772 ext/dl/ptr.c   	  DLALIGN(data->ptr,offset,DOUBLE_ALIGN);
DOUBLE_ALIGN      899 ext/dl/ptr.c   	  DLALIGN(data->ptr,offset,DOUBLE_ALIGN);


DOUBLE_CONVWITH

DOUBLE_CONVWITH   795 pack.c         		DOUBLE_CONVWITH(dtmp);
DOUBLE_CONVWITH   830 pack.c         		DOUBLE_CONVWITH(dtmp);
DOUBLE_CONVWITH  1666 pack.c         		DOUBLE_CONVWITH(dtmp);
DOUBLE_CONVWITH  1706 pack.c         		DOUBLE_CONVWITH(dtmp);


DOUBLE_DLTYPE

DOUBLE_DLTYPE      79 ext/dl/dl.h    #   define PUSH_F(x) PUSH_ARG(x,DOUBLE_DLTYPE)
DOUBLE_DLTYPE      88 ext/dl/dl.h    # define PUSH_F(x) PUSH_ARG(x,DOUBLE_DLTYPE)
DOUBLE_DLTYPE      92 ext/dl/dl.h    #define PUSH_D(x) PUSH_ARG(x,DOUBLE_DLTYPE)


DOUBLE_STACK

DOUBLE_STACK      142 regex.c        #define EXPAND_FAIL_STACK() DOUBLE_STACK(unsigned char*)
DOUBLE_STACK     1833 regex.c        	  DOUBLE_STACK(int);


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  794 eval.c         	    FL_SET(_old, DVAR_DONT_RECYCLE); \
DVAR_DONT_RECYCLE 4927 eval.c         	!FL_TEST(ruby_dyna_vars, DVAR_DONT_RECYCLE)) {
DVAR_DONT_RECYCLE 6340 eval.c         		FL_SET(vars, DVAR_DONT_RECYCLE);
DVAR_DONT_RECYCLE 8067 eval.c         	    if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
DVAR_DONT_RECYCLE 8068 eval.c         	    FL_SET(vars, DVAR_DONT_RECYCLE);
DVAR_DONT_RECYCLE 8175 eval.c         	    if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
DVAR_DONT_RECYCLE 8176 eval.c         	    FL_SET(vars, DVAR_DONT_RECYCLE);
DVAR_DONT_RECYCLE 8250 eval.c         	    if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
DVAR_DONT_RECYCLE 8251 eval.c         	    FL_SET(vars, DVAR_DONT_RECYCLE);
DVAR_DONT_RECYCLE 11490 eval.c         	if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
DVAR_DONT_RECYCLE 11491 eval.c         	FL_SET(vars, DVAR_DONT_RECYCLE);
DVAR_DONT_RECYCLE 12453 eval.c         	if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
DVAR_DONT_RECYCLE 12454 eval.c         	FL_SET(vars, DVAR_DONT_RECYCLE);


DWORD

DWORD            9573 eval.c         static inline DWORD
DWORD            9576 eval.c             DWORD p;
DWORD            9602 eval.c             DWORD p;
DWORD            9660 eval.c             DWORD win32_exception_list;
DWORD             813 ext/dl/sym.c       DWORD win32_last_err = GetLastError();
DWORD             131 ext/win32ole/win32ole.c     DWORD m_cRef;
DWORD             134 ext/win32ole/win32ole.c     DWORD m_dwCookie;
DWORD             200 ext/win32ole/win32ole.c static HRESULT ole_docinfo_from_type _((ITypeInfo *, BSTR *, BSTR *, DWORD *, BSTR *));
DWORD             496 ext/win32ole/win32ole.c     DWORD dwCount;
DWORD            1128 ext/win32ole/win32ole.c     DWORD i;
DWORD            1131 ext/win32ole/win32ole.c     DWORD size_buf = sizeof(buf);
DWORD            1197 ext/win32ole/win32ole.c     DWORD i, j, k;
DWORD            1339 ext/win32ole/win32ole.c     DWORD len;
DWORD            1340 ext/win32ole/win32ole.c     DWORD dwtype;
DWORD            1381 ext/win32ole/win32ole.c     DWORD clsctx = CLSCTX_REMOTE_SERVER;
DWORD            3020 ext/win32ole/win32ole.c     DWORD *helpcontext;
DWORD            3298 ext/win32ole/win32ole.c     DWORD i, j;
DWORD            3345 ext/win32ole/win32ole.c     DWORD i;
DWORD            3869 ext/win32ole/win32ole.c     DWORD helpcontext;
DWORD            4743 ext/win32ole/win32ole.c     DWORD *helpcontext;
DWORD            4832 ext/win32ole/win32ole.c     DWORD helpcontext = 0;
DWORD            5924 ext/win32ole/win32ole.c     DWORD dwCookie = 0;
DWORD             694 ruby.h         typedef DWORD rb_nativethread_t;
DWORD              89 win32/win32.c  static DWORD wait_events(HANDLE event, DWORD timeout);
DWORD              98 win32/win32.c      DWORD winerr;
DWORD             183 win32/win32.c  map_errno(DWORD winerr)
DWORD             206 win32/win32.c  static DWORD Win32System = (DWORD)-1;
DWORD             208 win32/win32.c  DWORD
DWORD             229 win32/win32.c      DWORD id;
DWORD             341 win32/win32.c  			      (DWORD)-1);
DWORD             378 win32/win32.c      DWORD len = 200;
DWORD             722 win32/win32.c      DWORD exitcode;
DWORD             761 win32/win32.c      DWORD exitcode;
DWORD             851 win32/win32.c      DWORD  dwCreationFlags;
DWORD            1689 win32/win32.c      DWORD source = 0;
DWORD            2452 win32/win32.c      DWORD exitcode;
DWORD            2453 win32/win32.c      DWORD err;
DWORD            2478 win32/win32.c      DWORD timeout;
DWORD            2488 win32/win32.c  	DWORD ret;
DWORD            2593 win32/win32.c      DWORD err;
DWORD            2614 win32/win32.c  		OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, (DWORD)pid);
DWORD            2632 win32/win32.c  	    if (!GenerateConsoleCtrlEvent(CTRL_C_EVENT, (DWORD)pid)) {
DWORD            2644 win32/win32.c  	    HANDLE hProc = OpenProcess(PROCESS_TERMINATE, FALSE, (DWORD)pid);
DWORD            2717 win32/win32.c      static DWORD curlen = 0;
DWORD            2718 win32/win32.c      DWORD needlen;
DWORD            2838 win32/win32.c  fileattr_to_unixmode(DWORD attr, const char *path)
DWORD            2903 win32/win32.c  	DWORD attr = GetFileAttributes(path);
DWORD            2993 win32/win32.c  static DWORD
DWORD            2994 win32/win32.c  wait_events(HANDLE event, DWORD timeout)
DWORD            2998 win32/win32.c      DWORD ret;
DWORD            3029 win32/win32.c  static volatile DWORD tlsi_interrupt = TLS_OUT_OF_INDEXES;
DWORD            3044 win32/win32.c  	DWORD ti = (DWORD)TlsGetValue(tlsi_interrupt);
DWORD            3062 win32/win32.c      TlsSetValue(tlsi_interrupt, (PVOID)((DWORD)TlsGetValue(tlsi_interrupt) - 1));
DWORD            3103 win32/win32.c      DWORD *esp = (DWORD *)ctx->Esp;
DWORD            3104 win32/win32.c      *--esp = (DWORD)harg;
DWORD            3106 win32/win32.c      ctx->Esp = (DWORD)esp;
DWORD            3107 win32/win32.c      ctx->Eip = (DWORD)rb_w32_call_handler;
DWORD            3180 win32/win32.c      DWORD ret;
DWORD            3252 win32/win32.c  static DWORD WINAPI
DWORD            3255 win32/win32.c      DWORD ret;
DWORD            3258 win32/win32.c      ret = (DWORD)arg->func(arg->self, arg->argc, arg->argv);
DWORD            3267 win32/win32.c      DWORD val;
DWORD            3530 win32/win32.c  	const DWORD attr = GetFileAttributes(path);
DWORD            3531 win32/win32.c  	if (attr != (DWORD)-1 && (attr & FILE_ATTRIBUTE_READONLY)) {
DWORD            3537 win32/win32.c  	    if (attr != (DWORD)-1 && (attr & FILE_ATTRIBUTE_READONLY)) {
DWORD            3550 win32/win32.c  	const DWORD attr = GetFileAttributes(path);
DWORD            3551 win32/win32.c  	if (attr != (DWORD)-1 && (attr & FILE_ATTRIBUTE_READONLY)) {
DWORD            3557 win32/win32.c  	    if (attr != (DWORD)-1 && (attr & FILE_ATTRIBUTE_READONLY)) {
DWORD              84 win32/win32.h  extern DWORD rb_w32_osid(void);
DWORD             547 win32/win32.h  typedef DWORD (*asynchronous_func_t)(DWORD self, int argc, DWORD* argv);
DWORD             548 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   275 dir.c              Data_Get_Struct(dir, struct dir_data, dp);
Data_Get_Struct   329 dir.c              Data_Get_Struct(obj, struct dir_data, dirp);\
Data_Get_Struct   726 error.c            Data_Get_Struct(obj, VALUE, ptr);
Data_Get_Struct  6260 eval.c         	Data_Get_Struct(scope, struct BLOCK, data);
Data_Get_Struct  8103 eval.c             Data_Get_Struct(self, struct BLOCK, orig);
Data_Get_Struct  8122 eval.c             Data_Get_Struct(self, struct BLOCK, orig);
Data_Get_Struct  8359 eval.c             Data_Get_Struct(proc, struct BLOCK, data);
Data_Get_Struct  8492 eval.c             Data_Get_Struct(proc, struct BLOCK, data);
Data_Get_Struct  8535 eval.c             Data_Get_Struct(self, struct BLOCK, data);
Data_Get_Struct  8536 eval.c             Data_Get_Struct(other, struct BLOCK, data2);
Data_Get_Struct  8565 eval.c             Data_Get_Struct(self, struct BLOCK, data);
Data_Get_Struct  8624 eval.c             Data_Get_Struct(proc, struct BLOCK, orig);
Data_Get_Struct  8681 eval.c             Data_Get_Struct(proc, struct BLOCK, data);
Data_Get_Struct  8833 eval.c             Data_Get_Struct(method, struct METHOD, m1);
Data_Get_Struct  8834 eval.c             Data_Get_Struct(other, struct METHOD, m2);
Data_Get_Struct  8859 eval.c             Data_Get_Struct(obj, struct METHOD, orig);
Data_Get_Struct  8959 eval.c             Data_Get_Struct(self, struct METHOD, orig);
Data_Get_Struct  8990 eval.c             Data_Get_Struct(method, struct METHOD, data);
Data_Get_Struct  9104 eval.c             Data_Get_Struct(method, struct METHOD, data);
Data_Get_Struct  9173 eval.c             Data_Get_Struct(method, struct METHOD, data);
Data_Get_Struct  9221 eval.c             Data_Get_Struct(method, struct METHOD, data);
Data_Get_Struct  9297 eval.c             Data_Get_Struct(proc, struct BLOCK, data);
Data_Get_Struct  9318 eval.c             Data_Get_Struct(method, struct METHOD, mdata);
Data_Get_Struct  9319 eval.c             Data_Get_Struct(proc, struct BLOCK, bdata);
Data_Get_Struct  9407 eval.c         	Data_Get_Struct(body, struct BLOCK, block);
Data_Get_Struct  12563 eval.c             Data_Get_Struct(group, struct thgroup, data);
Data_Get_Struct  12601 eval.c             Data_Get_Struct(group, struct thgroup, data);
Data_Get_Struct  12622 eval.c             Data_Get_Struct(group, struct thgroup, data);
Data_Get_Struct  12671 eval.c             Data_Get_Struct(group, struct thgroup, data);
Data_Get_Struct  12682 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    56 ext/digest/digest.c     Data_Get_Struct(obj, algo_t, algo);
Data_Get_Struct    97 ext/digest/digest.c     Data_Get_Struct(obj, void, pctx);
Data_Get_Struct   126 ext/digest/digest.c     Data_Get_Struct(obj, void, pctx);
Data_Get_Struct   156 ext/digest/digest.c     Data_Get_Struct(obj, void, pctx1);
Data_Get_Struct   157 ext/digest/digest.c     Data_Get_Struct(copy, void, pctx2);
Data_Get_Struct   172 ext/digest/digest.c     Data_Get_Struct(self, void, pctx);
Data_Get_Struct   205 ext/digest/digest.c     Data_Get_Struct(self, void, pctx1);
Data_Get_Struct   236 ext/digest/digest.c     Data_Get_Struct(self, void, pctx1);
Data_Get_Struct   270 ext/digest/digest.c 	Data_Get_Struct(self, void, pctx1);
Data_Get_Struct   271 ext/digest/digest.c 	Data_Get_Struct(other, void, pctx2);
Data_Get_Struct   434 ext/dl/dl.c    	Data_Get_Struct(e, struct ptr_data, pdata);
Data_Get_Struct   441 ext/dl/dl.c    	  Data_Get_Struct(e, struct ptr_data, pdata);
Data_Get_Struct    23 ext/dl/handle.c   Data_Get_Struct(self, struct dl_handle, dlhandle);
Data_Get_Struct    77 ext/dl/handle.c   Data_Get_Struct(self, struct dl_handle, dlhandle);
Data_Get_Struct    97 ext/dl/handle.c   Data_Get_Struct(self, struct dl_handle, dlhandle);
Data_Get_Struct   107 ext/dl/handle.c   Data_Get_Struct(self, struct dl_handle, dlhandle);
Data_Get_Struct   117 ext/dl/handle.c   Data_Get_Struct(self, struct dl_handle, dlhandle);
Data_Get_Struct   126 ext/dl/handle.c   Data_Get_Struct(self, struct dl_handle, dlhandle);
Data_Get_Struct   162 ext/dl/handle.c   Data_Get_Struct(self, struct dl_handle, dlhandle);
Data_Get_Struct    79 ext/dl/ptr.c     Data_Get_Struct(val, struct ptr_data, data);
Data_Get_Struct   113 ext/dl/ptr.c   	Data_Get_Struct(val, struct ptr_data, data);
Data_Get_Struct   149 ext/dl/ptr.c       Data_Get_Struct(val, struct ptr_data, data);
Data_Get_Struct   210 ext/dl/ptr.c       Data_Get_Struct(self, struct ptr_data, data);
Data_Get_Struct   252 ext/dl/ptr.c     Data_Get_Struct(self, struct ptr_data, data);
Data_Get_Struct   261 ext/dl/ptr.c     Data_Get_Struct(self, struct ptr_data, data);
Data_Get_Struct   270 ext/dl/ptr.c     Data_Get_Struct(self, struct ptr_data, data);
Data_Get_Struct   279 ext/dl/ptr.c     Data_Get_Struct(self, struct ptr_data, data);
Data_Get_Struct   288 ext/dl/ptr.c     Data_Get_Struct(self, struct ptr_data, data);
Data_Get_Struct   300 ext/dl/ptr.c     Data_Get_Struct(self, struct ptr_data, pdata);
Data_Get_Struct   315 ext/dl/ptr.c     Data_Get_Struct(self, struct ptr_data, data);
Data_Get_Struct   423 ext/dl/ptr.c     Data_Get_Struct(self, struct ptr_data, data);
Data_Get_Struct   446 ext/dl/ptr.c     Data_Get_Struct(self, struct ptr_data, data);
Data_Get_Struct   468 ext/dl/ptr.c     Data_Get_Struct(self, struct ptr_data, data);
Data_Get_Struct   526 ext/dl/ptr.c     Data_Get_Struct(self, struct ptr_data, data);
Data_Get_Struct   631 ext/dl/ptr.c     Data_Get_Struct(self, struct ptr_data, data);
Data_Get_Struct   751 ext/dl/ptr.c     Data_Get_Struct(self, struct ptr_data, data);
Data_Get_Struct   865 ext/dl/ptr.c       Data_Get_Struct(self, struct ptr_data, data);
Data_Get_Struct   881 ext/dl/ptr.c     Data_Get_Struct(self, struct ptr_data, data);
Data_Get_Struct   118 ext/dl/sym.c       Data_Get_Struct(val, struct sym_data, data);
Data_Get_Struct   162 ext/dl/sym.c       Data_Get_Struct(self, struct sym_data, data);
Data_Get_Struct   192 ext/dl/sym.c     Data_Get_Struct(self, struct sym_data, sym);
Data_Get_Struct   201 ext/dl/sym.c     Data_Get_Struct(self, struct sym_data, sym);
Data_Get_Struct   213 ext/dl/sym.c     Data_Get_Struct(self, struct sym_data, sym);
Data_Get_Struct   265 ext/dl/sym.c     Data_Get_Struct(self, struct sym_data, sym);
Data_Get_Struct   455 ext/dl/sym.c     Data_Get_Struct(self, struct sym_data, sym);
Data_Get_Struct   495 ext/dl/sym.c   	  Data_Get_Struct(pval, struct ptr_data, data);
Data_Get_Struct   954 ext/dl/sym.c     Data_Get_Struct(self, struct sym_data, sym);
Data_Get_Struct   963 ext/dl/sym.c     Data_Get_Struct(self, struct sym_data, sym);
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   173 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL_CTX, ctx);
Data_Get_Struct   187 ext/openssl/ossl_ssl.c     Data_Get_Struct(obj, SSL, ssl);
Data_Get_Struct   224 ext/openssl/ossl_ssl.c     Data_Get_Struct(args[0], SSL, ssl);
Data_Get_Struct   282 ext/openssl/ossl_ssl.c     Data_Get_Struct(arg, SSL_CTX, ctx);
Data_Get_Struct   303 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL_CTX, ctx);
Data_Get_Struct   434 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL_CTX, ctx);
Data_Get_Struct   477 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL_CTX, ctx);
Data_Get_Struct   541 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL, ssl);
Data_Get_Struct   544 ext/openssl/ossl_ssl.c         Data_Get_Struct(v_ctx, SSL_CTX, ctx);
Data_Get_Struct   583 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL, ssl);
Data_Get_Struct   636 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL, ssl);
Data_Get_Struct   684 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL, ssl);
Data_Get_Struct   721 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL, ssl);
Data_Get_Struct   735 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL, ssl);
Data_Get_Struct   760 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL, ssl);
Data_Get_Struct   787 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL, ssl);
Data_Get_Struct   810 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL, ssl);
Data_Get_Struct   826 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL, ssl);
Data_Get_Struct   844 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    64 ext/strscan/strscan.c     Data_Get_Struct(obj, struct strscanner, var);\
Data_Get_Struct   211 ext/strscan/strscan.c     Data_Get_Struct(self, struct strscanner, p);
Data_Get_Struct   307 ext/strscan/strscan.c     Data_Get_Struct(self, struct strscanner, p);
Data_Get_Struct  1108 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  1241 ext/syck/rubyext.c     Data_Get_Struct( node, SyckNode, n );
Data_Get_Struct  1259 ext/syck/rubyext.c     Data_Get_Struct(node, SyckNode, n);
Data_Get_Struct  1454 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
Data_Get_Struct  1493 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
Data_Get_Struct  1527 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
Data_Get_Struct  1544 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
Data_Get_Struct  1569 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
Data_Get_Struct  1588 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
Data_Get_Struct  1626 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
Data_Get_Struct  1661 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
Data_Get_Struct  1695 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
Data_Get_Struct  1715 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
Data_Get_Struct  1748 ext/syck/rubyext.c     Data_Get_Struct( orig, SyckNode, orig_n );
Data_Get_Struct  1749 ext/syck/rubyext.c     Data_Get_Struct( copy, SyckNode, copy_n );
Data_Get_Struct  1762 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
Data_Get_Struct  1785 ext/syck/rubyext.c     Data_Get_Struct(self, SyckNode, orig_n);
Data_Get_Struct  1841 ext/syck/rubyext.c     Data_Get_Struct((VALUE)data, SyckNode, n);
Data_Get_Struct  1906 ext/syck/rubyext.c     Data_Get_Struct(emitter, SyckEmitter, emitterPtr);
Data_Get_Struct  1974 ext/syck/rubyext.c     Data_Get_Struct(self, SyckEmitter, emitter);
Data_Get_Struct  2024 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    73 ext/win32ole/win32ole.c     Data_Get_Struct(obj, struct oledata, pole);\
Data_Get_Struct   743 ext/win32ole/win32ole.c         Data_Get_Struct(val, struct oledata, pole);
Data_Get_Struct   868 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oledata, pole);
Data_Get_Struct  3391 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  3556 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  3593 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  3628 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  3665 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  3697 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  3729 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  3762 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  3792 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  3829 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  3860 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  3890 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  3964 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  3987 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  4064 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olevariabledata, pvar);
Data_Get_Struct  4100 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olevariabledata, pvar);
Data_Get_Struct  4146 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olevariabledata, pvar);
Data_Get_Struct  4194 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olevariabledata, pvar);
Data_Get_Struct  4253 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olevariabledata, pvar);
Data_Get_Struct  4296 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olevariabledata, pvar);
Data_Get_Struct  4315 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  4363 ext/win32ole/win32ole.c         Data_Get_Struct(oletype, struct oletypedata, ptype);
Data_Get_Struct  4427 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  4464 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  4501 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  4558 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  4578 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  4618 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  4703 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  4727 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  4788 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  4821 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  4854 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  4888 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  4922 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  4957 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  4991 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  5054 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  5115 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oleparamdata, pparam);
Data_Get_Struct  5153 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oleparamdata, pparam);
Data_Get_Struct  5191 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oleparamdata, pparam);
Data_Get_Struct  5219 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oleparamdata, pparam);
Data_Get_Struct  5238 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oleparamdata, pparam);
Data_Get_Struct  5258 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oleparamdata, pparam);
Data_Get_Struct  5322 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oleparamdata, pparam);
Data_Get_Struct  5978 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oleeventdata, poleev);
Data_Get_Struct   848 ext/zlib/zlib.c     Data_Get_Struct(obj, struct zstream, z);
Data_Get_Struct   971 ext/zlib/zlib.c     Data_Get_Struct(obj, struct zstream, z);
Data_Get_Struct   987 ext/zlib/zlib.c     Data_Get_Struct(obj, struct zstream, z);
Data_Get_Struct  1002 ext/zlib/zlib.c     Data_Get_Struct(obj, struct zstream, z);
Data_Get_Struct  1031 ext/zlib/zlib.c     Data_Get_Struct(obj, struct zstream, z);
Data_Get_Struct  1095 ext/zlib/zlib.c     Data_Get_Struct(obj, struct zstream, z);
Data_Get_Struct  1147 ext/zlib/zlib.c     Data_Get_Struct(obj, struct zstream, z);
Data_Get_Struct  1436 ext/zlib/zlib.c     Data_Get_Struct(obj, struct zstream, z);
Data_Get_Struct  2284 ext/zlib/zlib.c     Data_Get_Struct(obj, struct gzfile, gz);
Data_Get_Struct  2311 ext/zlib/zlib.c     Data_Get_Struct(obj, struct gzfile, gz);
Data_Get_Struct  2575 ext/zlib/zlib.c     Data_Get_Struct(obj, struct gzfile, gz);
Data_Get_Struct  2715 ext/zlib/zlib.c     Data_Get_Struct(obj, struct gzfile, gz);
Data_Get_Struct  2912 ext/zlib/zlib.c     Data_Get_Struct(obj, struct gzfile, gz);
Data_Get_Struct  2948 ext/zlib/zlib.c     Data_Get_Struct(obj, struct gzfile, gz);
Data_Get_Struct   175 file.c             Data_Get_Struct(self, struct stat, st);
Data_Get_Struct    33 time.c             Data_Get_Struct(obj, struct time_object, tobj)


Data_Make_Struct

Data_Make_Struct  254 dir.c              VALUE obj = Data_Make_Struct(klass, struct dir_data, 0, free_dir, dirp);
Data_Make_Struct  312 dir.c              VALUE dir = Data_Make_Struct(klass, struct dir_data, 0, free_dir, dp);
Data_Make_Struct 8104 eval.c             bind = Data_Make_Struct(rb_obj_class(self),struct BLOCK,blk_mark,blk_free,data);
Data_Make_Struct 8123 eval.c             bind = Data_Make_Struct(rb_obj_class(self),struct BLOCK,blk_mark,blk_free,data);
Data_Make_Struct 8154 eval.c             bind = Data_Make_Struct(rb_cBinding,struct BLOCK,blk_mark,blk_free,data);
Data_Make_Struct 8233 eval.c             block = Data_Make_Struct(klass, struct BLOCK, blk_mark, blk_free, data);
Data_Make_Struct 8625 eval.c             bind = Data_Make_Struct(rb_cBinding,struct BLOCK,blk_mark,blk_free,data);
Data_Make_Struct 8775 eval.c             method = Data_Make_Struct(mklass, struct METHOD, bm_mark, free, data);
Data_Make_Struct 8860 eval.c             method = Data_Make_Struct(rb_cUnboundMethod, struct METHOD, bm_mark, free, data);
Data_Make_Struct 8960 eval.c             clone = Data_Make_Struct(CLASS_OF(self),struct METHOD, bm_mark, free, data);
Data_Make_Struct 9123 eval.c             method = Data_Make_Struct(rb_cMethod,struct METHOD,bm_mark,free,bound);
Data_Make_Struct 12537 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   34 ext/dl/handle.c   obj = Data_Make_Struct(rb_cDLHandle, struct dl_handle, 0,
Data_Make_Struct   98 ext/dl/ptr.c         val = Data_Make_Struct(klass, struct ptr_data,
Data_Make_Struct  169 ext/dl/ptr.c     obj = Data_Make_Struct(klass, struct ptr_data, 0, dlptr_free, data);
Data_Make_Struct   93 ext/dl/sym.c       val = Data_Make_Struct(rb_cDLSymbol, struct sym_data, 0, dlsym_free, data);
Data_Make_Struct  137 ext/dl/sym.c     obj = Data_Make_Struct(klass, struct sym_data, 0, dlsym_free, data);
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  885 ext/win32ole/win32ole.c     obj = Data_Make_Struct(klass,struct oledata,0,ole_free,pole);
Data_Make_Struct 3379 ext/win32ole/win32ole.c     obj = Data_Make_Struct(klass,struct oletypedata,0,oletype_free,poletype);
Data_Make_Struct 3924 ext/win32ole/win32ole.c         var = Data_Make_Struct(cWIN32OLE_VARIABLE, struct olevariabledata,
Data_Make_Struct 4331 ext/win32ole/win32ole.c     obj = Data_Make_Struct(klass,
Data_Make_Struct 5023 ext/win32ole/win32ole.c             param = Data_Make_Struct(cWIN32OLE_PARAM, struct oleparamdata, 0,
Data_Make_Struct 5893 ext/win32ole/win32ole.c     obj = Data_Make_Struct(klass,struct oleeventdata,0,ole_event_free,poleev);
Data_Make_Struct  833 ext/zlib/zlib.c     obj = Data_Make_Struct(klass, struct zstream,
Data_Make_Struct 1766 ext/zlib/zlib.c     obj = Data_Make_Struct(klass, struct gzfile, gzfile_mark, gzfile_free, gz);
Data_Make_Struct   52 time.c             obj = Data_Make_Struct(klass, struct time_object, 0, time_free, tobj);


Data_Wrap_Struct

Data_Wrap_Struct  717 error.c            return Data_Wrap_Struct(rb_cNameErrorMesg, name_err_mesg_mark, -1, ptr);
Data_Wrap_Struct 11487 eval.c             th->thread = Data_Wrap_Struct(klass, thread_mark, thread_free, th);
Data_Wrap_Struct 12443 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   80 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   37 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  515 ext/iconv/iconv.c     return Data_Wrap_Struct(klass, 0, ICONV_FREE, 0);
Data_Wrap_Struct  574 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  140 ext/openssl/ossl_ssl.c     return Data_Wrap_Struct(klass, 0, ossl_sslctx_free, ctx);
Data_Wrap_Struct  511 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  187 ext/stringio/stringio.c     return Data_Wrap_Struct(klass, strio_mark, strio_free, 0);
Data_Wrap_Struct  193 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 1427 ext/syck/rubyext.c     VALUE obj = Data_Wrap_Struct( class, syck_node_mark, syck_free_node, node );
Data_Wrap_Struct 1514 ext/syck/rubyext.c     obj = Data_Wrap_Struct( class, syck_node_mark, syck_free_node, node );
Data_Wrap_Struct 1613 ext/syck/rubyext.c     obj = Data_Wrap_Struct( class, syck_node_mark, syck_free_node, node );
Data_Wrap_Struct 1786 ext/syck/rubyext.c     t = Data_Wrap_Struct( cNode, syck_node_mark, syck_free_node, 0 );
Data_Wrap_Struct 1953 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 6094 ext/win32ole/win32ole.c     com_hash = Data_Wrap_Struct(rb_cData, rb_mark_hash, st_free_table, st_init_numtable());
Data_Wrap_Struct  160 file.c             return Data_Wrap_Struct(klass, NULL, free, nst);
Data_Wrap_Struct  391 ruby.h             Data_Wrap_Struct(klass,mark,free,sval)\
Data_Wrap_Struct 1297 variable.c     	av = Data_Wrap_Struct(0 , rb_mark_tbl, st_free_table, 0);


Debug

Debug            3303 win32/win32.c  		    Debug(fprintf(stderr, "couldn't get stack base:%p:%d\n",
Debug            3307 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       2771 win32/win32.c  			if (!DeleteFile(newpath) && GetLastError() != ERROR_FILE_NOT_FOUND)
DeleteFile       3554 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        211 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    210 ext/openssl/ossl_ssl.c     *x509 = DupX509CertPtr(ossl_ssl_get_x509(obj));
DupX509CertPtr    283 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   243 win32/win32.c      if (!DuplicateHandle(current_process_handle, GetCurrentThread(),
DuplicateHandle   623 win32/win32.c  	    if (!DuplicateHandle(hCurProc, hReadIn, hCurProc, &hDupInFile, 0,
DuplicateHandle   644 win32/win32.c  	    if (!DuplicateHandle(hCurProc, hWriteOut, hCurProc, &hDupOutFile, 0,
DuplicateHandle   123 wince/wince.h  BOOL DuplicateHandle(


E2BIG

E2BIG            1194 error.c        #ifdef E2BIG
E2BIG            1195 error.c            set_syserr(E2BIG, "E2BIG");
E2BIG             260 ext/iconv/iconv.c 	  case E2BIG:
E2BIG             110 win32/win32.c      {	ERROR_BAD_ENVIRONMENT,		E2BIG		},


EACCES

EACCES           1212 error.c        #ifdef EACCES
EACCES           1213 error.c            set_syserr(EACCES, "EACCES");
EACCES             91 ext/sdbm/_sdbm.c #define EPERM	EACCES
EACCES            241 ext/stringio/stringio.c 	    errno = EACCES;
EACCES           2233 file.c         	    || errno == EACCES
EACCES           3122 file.c         	  case EACCES:
EACCES           3187 file.c         	  case EACCES:
EACCES            105 win32/win32.c      {	ERROR_ACCESS_DENIED,		EACCES		},
EACCES            115 win32/win32.c      {	ERROR_CURRENT_DIRECTORY,	EACCES		},
EACCES            121 win32/win32.c      {	ERROR_BAD_COMMAND,		EACCES		},
EACCES            122 win32/win32.c      {	ERROR_CRC,			EACCES		},
EACCES            123 win32/win32.c      {	ERROR_BAD_LENGTH,		EACCES		},
EACCES            125 win32/win32.c      {	ERROR_NOT_DOS_DISK,		EACCES		},
EACCES            126 win32/win32.c      {	ERROR_SECTOR_NOT_FOUND,		EACCES		},
EACCES            127 win32/win32.c      {	ERROR_OUT_OF_PAPER,		EACCES		},
EACCES            130 win32/win32.c      {	ERROR_GEN_FAILURE,		EACCES		},
EACCES            131 win32/win32.c      {	ERROR_LOCK_VIOLATION,		EACCES		},
EACCES            132 win32/win32.c      {	ERROR_SHARING_VIOLATION,	EACCES		},
EACCES            133 win32/win32.c      {	ERROR_WRONG_DISK,		EACCES		},
EACCES            134 win32/win32.c      {	ERROR_SHARING_BUFFER_EXCEEDED,	EACCES		},
EACCES            136 win32/win32.c      {	ERROR_NETWORK_ACCESS_DENIED,	EACCES		},
EACCES            139 win32/win32.c      {	ERROR_CANNOT_MAKE,		EACCES		},
EACCES            140 win32/win32.c      {	ERROR_FAIL_I24,			EACCES		},
EACCES            143 win32/win32.c      {	ERROR_DRIVE_LOCKED,		EACCES		},
EACCES            152 win32/win32.c      {	ERROR_SEEK_ON_DEVICE,		EACCES		},
EACCES            155 win32/win32.c      {	ERROR_NOT_LOCKED,		EACCES		},
EACCES            158 win32/win32.c      {	ERROR_LOCK_FAILED,		EACCES		},
EACCES            253 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       1467 error.c        #ifdef EADDRINUSE
EADDRINUSE       1468 error.c            set_syserr(EADDRINUSE, "EADDRINUSE");


EADDRNOTAVAIL

EADDRNOTAVAIL    1470 error.c        #ifdef EADDRNOTAVAIL
EADDRNOTAVAIL    1471 error.c            set_syserr(EADDRNOTAVAIL, "EADDRNOTAVAIL");


EAFNOSUPPORT

EAFNOSUPPORT     1464 error.c        #ifdef EAFNOSUPPORT
EAFNOSUPPORT     1465 error.c            set_syserr(EAFNOSUPPORT, "EAFNOSUPPORT");


EAGAIN

EAGAIN           1206 error.c        #ifdef EAGAIN
EAGAIN           1207 error.c            set_syserr(EAGAIN, "EAGAIN");
EAGAIN             67 ext/socket/socket.c #define EWOULDBLOCK EAGAIN
EAGAIN            977 ext/socket/socket.c 	      case EAGAIN:
EAGAIN           3121 file.c         	  case EAGAIN:
EAGAIN           3123 file.c         #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
EAGAIN           3186 file.c         	  case EAGAIN:
EAGAIN           3188 file.c         #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
EAGAIN            363 io.c                 case EAGAIN:
EAGAIN            364 io.c           #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
EAGAIN            391 io.c                 case EAGAIN:
EAGAIN            392 io.c           #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
EAGAIN            461 io.c                       errno = EAGAIN;
EAGAIN            485 io.c           	    if (!errno) errno = EAGAIN;
EAGAIN           1071 io.c           		  case EAGAIN:
EAGAIN           1072 io.c           #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
EAGAIN           2918 io.c           	if (errno == EAGAIN) {
EAGAIN           2993 io.c           	if (errno == EAGAIN) {
EAGAIN           1530 process.c      	if (errno == EAGAIN) {
EAGAIN            142 win32/win32.c      {	ERROR_NO_PROC_SLOTS,		EAGAIN		},
EAGAIN            157 win32/win32.c      {	ERROR_MAX_THRDS_REACHED,	EAGAIN		},
EAGAIN            176 win32/win32.c      {	ERROR_NESTING_NOT_ALLOWED,	EAGAIN		},
EAGAIN            866 win32/win32.c  	errno = EAGAIN;


EAI_ADDRFAMILY

EAI_ADDRFAMILY   3834 ext/socket/socket.c #ifdef EAI_ADDRFAMILY
EAI_ADDRFAMILY   3835 ext/socket/socket.c     sock_define_const("EAI_ADDRFAMILY", EAI_ADDRFAMILY);


EAI_AGAIN

EAI_AGAIN         627 ext/socket/getaddrinfo.c 			error = EAI_AGAIN;
EAI_AGAIN        3837 ext/socket/socket.c #ifdef EAI_AGAIN
EAI_AGAIN        3838 ext/socket/socket.c     sock_define_const("EAI_AGAIN", EAI_AGAIN);


EAI_BADFLAGS

EAI_BADFLAGS      326 ext/socket/getaddrinfo.c 			ERR(EAI_BADFLAGS);
EAI_BADFLAGS     3840 ext/socket/socket.c #ifdef EAI_BADFLAGS
EAI_BADFLAGS     3841 ext/socket/socket.c     sock_define_const("EAI_BADFLAGS", EAI_BADFLAGS);


EAI_BADHINTS

EAI_BADHINTS      324 ext/socket/getaddrinfo.c 			ERR(EAI_BADHINTS); /* xxx */
EAI_BADHINTS      363 ext/socket/getaddrinfo.c 				ERR(EAI_BADHINTS);	/*xxx*/
EAI_BADHINTS      369 ext/socket/getaddrinfo.c 				ERR(EAI_BADHINTS);	/*xxx*/
EAI_BADHINTS     3867 ext/socket/socket.c #ifdef EAI_BADHINTS
EAI_BADHINTS     3868 ext/socket/socket.c     sock_define_const("EAI_BADHINTS", EAI_BADHINTS);


EAI_FAIL

EAI_FAIL          535 ext/socket/getaddrinfo.c 			error = EAI_FAIL;
EAI_FAIL          631 ext/socket/getaddrinfo.c 			error = EAI_FAIL;
EAI_FAIL          639 ext/socket/getaddrinfo.c 		ERR(EAI_FAIL);
EAI_FAIL         3843 ext/socket/socket.c #ifdef EAI_FAIL
EAI_FAIL         3844 ext/socket/socket.c     sock_define_const("EAI_FAIL", EAI_FAIL);


EAI_FAMILY

EAI_FAMILY        335 ext/socket/getaddrinfo.c 			ERR(EAI_FAMILY);
EAI_FAMILY        469 ext/socket/getaddrinfo.c 			ERR(EAI_FAMILY);
EAI_FAMILY        520 ext/socket/getaddrinfo.c 				ERR(EAI_FAMILY);	/*xxx*/
EAI_FAMILY       3846 ext/socket/socket.c #ifdef EAI_FAMILY
EAI_FAMILY       3847 ext/socket/socket.c     sock_define_const("EAI_FAMILY", EAI_FAMILY);


EAI_MAX

EAI_MAX           209 ext/socket/getaddrinfo.c 	if (ecode < 0 || ecode > EAI_MAX)
EAI_MAX           210 ext/socket/getaddrinfo.c 		ecode = EAI_MAX;
EAI_MAX          3873 ext/socket/socket.c #ifdef EAI_MAX
EAI_MAX          3874 ext/socket/socket.c     sock_define_const("EAI_MAX", EAI_MAX);


EAI_MEMORY

EAI_MEMORY        177 ext/socket/getaddrinfo.c 		error = EAI_MEMORY;\
EAI_MEMORY        187 ext/socket/getaddrinfo.c 		error = EAI_MEMORY;\
EAI_MEMORY       3849 ext/socket/socket.c #ifdef EAI_MEMORY
EAI_MEMORY       3850 ext/socket/socket.c     sock_define_const("EAI_MEMORY", EAI_MEMORY);


EAI_NODATA

EAI_NODATA        624 ext/socket/getaddrinfo.c 			error = EAI_NODATA;
EAI_NODATA       3852 ext/socket/socket.c #ifdef EAI_NODATA
EAI_NODATA       3853 ext/socket/socket.c     sock_define_const("EAI_NODATA", EAI_NODATA);


EAI_NONAME

EAI_NONAME        319 ext/socket/getaddrinfo.c 		return EAI_NONAME;
EAI_NONAME        525 ext/socket/getaddrinfo.c 		ERR(EAI_NONAME);
EAI_NONAME       3855 ext/socket/socket.c #ifdef EAI_NONAME
EAI_NONAME       3856 ext/socket/socket.c     sock_define_const("EAI_NONAME", EAI_NONAME);


EAI_PROTOCOL

EAI_PROTOCOL      419 ext/socket/getaddrinfo.c 					ERR(EAI_PROTOCOL);	/*xxx*/
EAI_PROTOCOL     3870 ext/socket/socket.c #ifdef EAI_PROTOCOL
EAI_PROTOCOL     3871 ext/socket/socket.c     sock_define_const("EAI_PROTOCOL", EAI_PROTOCOL);


EAI_SERVICE

EAI_SERVICE       409 ext/socket/getaddrinfo.c 				ERR(EAI_SERVICE);
EAI_SERVICE      3858 ext/socket/socket.c #ifdef EAI_SERVICE
EAI_SERVICE      3859 ext/socket/socket.c     sock_define_const("EAI_SERVICE", EAI_SERVICE);


EAI_SOCKTYPE

EAI_SOCKTYPE      373 ext/socket/getaddrinfo.c 			ERR(EAI_SOCKTYPE);
EAI_SOCKTYPE     3861 ext/socket/socket.c #ifdef EAI_SOCKTYPE
EAI_SOCKTYPE     3862 ext/socket/socket.c     sock_define_const("EAI_SOCKTYPE", EAI_SOCKTYPE);


EAI_SYSTEM

EAI_SYSTEM       3864 ext/socket/socket.c #ifdef EAI_SYSTEM
EAI_SYSTEM       3865 ext/socket/socket.c     sock_define_const("EAI_SYSTEM", EAI_SYSTEM);


EALREADY

EALREADY         1515 error.c        #ifdef EALREADY
EALREADY         1516 error.c            set_syserr(EALREADY, "EALREADY");
EALREADY          991 ext/socket/socket.c #ifdef EALREADY
EALREADY          992 ext/socket/socket.c 	      case EALREADY:


EASYWIN

EASYWIN           262 ext/nkf/nkf-utf8/nkf.c #ifdef EASYWIN /*Easy Win */
EASYWIN           655 ext/nkf/nkf-utf8/nkf.c #ifdef EASYWIN /*Easy Win */
EASYWIN           678 ext/nkf/nkf-utf8/nkf.c #ifdef EASYWIN /*Easy Win */
EASYWIN           886 ext/nkf/nkf-utf8/nkf.c #ifdef EASYWIN /*Easy Win */


EBADF

EBADF            1200 error.c        #ifdef EBADF
EBADF            1201 error.c            set_syserr(EBADF, "EBADF");
EBADF              70 ext/readline/readline.c     if (!isatty(0) && errno == EBADF) rb_raise(rb_eIOError, "stdin closed");
EBADF             492 io.c           		    errno = EBADF;
EBADF            2059 io.c           	if (n1 == EBADF && f1 == f2) {
EBADF             106 win32/win32.c      {	ERROR_INVALID_HANDLE,		EBADF		},
EBADF             146 win32/win32.c      {	ERROR_INVALID_TARGET_HANDLE,	EBADF		},
EBADF             150 win32/win32.c      {	ERROR_DIRECT_ACCESS_HANDLE,	EBADF		},
EBADF            2418 win32/win32.c  	errno = EBADF;
EBADF            3570 win32/win32.c  	errno = EBADF;
EBADF            3614 win32/win32.c  	    errno = EBADF;
EBADF             190 wince/io_wce.c 	errno = EBADF;


EBUSY

EBUSY            1221 error.c        #ifdef EBUSY
EBUSY            1222 error.c            set_syserr(EBUSY, "EBUSY");


ECHILD

ECHILD           1203 error.c        #ifdef ECHILD
ECHILD           1204 error.c            set_syserr(ECHILD, "ECHILD");
ECHILD            814 process.c      	    if (errno == ECHILD)
ECHILD            830 process.c      	    if (errno == ECHILD)
ECHILD            148 win32/win32.c      {	ERROR_WAIT_NO_CHILDREN,		ECHILD		},
ECHILD            149 win32/win32.c      {	ERROR_CHILD_NOT_COMPLETE,	ECHILD		},
ECHILD           2459 win32/win32.c  	    errno = ECHILD;
ECHILD           2497 win32/win32.c  	    errno = ECHILD;
ECHILD           2519 win32/win32.c  	    errno = ECHILD;


ECONNABORTED

ECONNABORTED     1482 error.c        #ifdef ECONNABORTED
ECONNABORTED     1483 error.c            set_syserr(ECONNABORTED, "ECONNABORTED");


ECONNREFUSED

ECONNREFUSED     1506 error.c        #ifdef ECONNREFUSED
ECONNREFUSED     1507 error.c            set_syserr(ECONNREFUSED, "ECONNREFUSED");


ECONNRESET

ECONNRESET       1485 error.c        #ifdef ECONNRESET
ECONNRESET       1486 error.c            set_syserr(ECONNRESET, "ECONNRESET");


EDEADLK

EDEADLK          1278 error.c        #ifdef EDEADLK
EDEADLK          1279 error.c            set_syserr(EDEADLK, "EDEADLK");


EDESTADDRREQ

EDESTADDRREQ     1440 error.c        #ifdef EDESTADDRREQ
EDESTADDRREQ     1441 error.c            set_syserr(EDESTADDRREQ, "EDESTADDRREQ");


EDOM

EDOM             1272 error.c        #ifdef EDOM
EDOM             1273 error.c            set_syserr(EDOM, "EDOM");


EDQUOT

EDQUOT           1539 error.c        #ifdef EDQUOT
EDQUOT           1540 error.c            set_syserr(EDQUOT, "EDQUOT");


EEXIST

EEXIST           1224 error.c        #ifdef EEXIST
EEXIST           1225 error.c            set_syserr(EEXIST, "EEXIST");
EEXIST           2231 file.c         	if (errno == EEXIST
EEXIST            138 win32/win32.c      {	ERROR_FILE_EXISTS,		EEXIST		},
EEXIST            159 win32/win32.c      {	ERROR_ALREADY_EXISTS,		EEXIST		},


EFAULT

EFAULT           1215 error.c        #ifdef EFAULT
EFAULT           1216 error.c            set_syserr(EFAULT, "EFAULT");
EFAULT            860 win32/win32.c  	errno = EFAULT;
EFAULT           2926 win32/win32.c  	errno = EFAULT;


EFBIG

EFBIG            1254 error.c        #ifdef EFBIG
EFBIG            1255 error.c            set_syserr(EFBIG, "EFBIG");


EHOSTDOWN

EHOSTDOWN        1509 error.c        #ifdef EHOSTDOWN
EHOSTDOWN        1510 error.c            set_syserr(EHOSTDOWN, "EHOSTDOWN");


EHOSTUNREACH

EHOSTUNREACH     1512 error.c        #ifdef EHOSTUNREACH
EHOSTUNREACH     1513 error.c            set_syserr(EHOSTUNREACH, "EHOSTUNREACH");


EINPROGRESS

EINPROGRESS      1518 error.c        #ifdef EINPROGRESS
EINPROGRESS      1519 error.c            set_syserr(EINPROGRESS, "EINPROGRESS");
EINPROGRESS       978 ext/socket/socket.c #ifdef EINPROGRESS
EINPROGRESS       979 ext/socket/socket.c 	      case EINPROGRESS:
EINPROGRESS      2042 win32/win32.c  		errno = EINPROGRESS;


EINTR

EINTR            1185 error.c        #ifdef EINTR
EINTR            1186 error.c            set_syserr(EINTR, "EINTR");
EINTR            9824 eval.c             errno = EINTR;
EINTR            10492 eval.c         	    if (e == EINTR) goto again;
EINTR            10686 eval.c         		  case EINTR:
EINTR            10770 eval.c         		  case EINTR:
EINTR            3192 file.c         	  case EINTR:
EINTR             356 io.c                 case EINTR:
EINTR             384 io.c                 case EINTR:
EINTR            1065 io.c           		  case EINTR:
EINTR             584 process.c      	if (errno == EINTR) {
EINTR             612 process.c      	    if (errno == EINTR) {
EINTR             816 process.c      	    if (errno == EINTR) {
EINTR            1380 process.c          } while (i == -1 && errno == EINTR);
EINTR            2506 win32/win32.c  	    errno = EINTR;
EINTR            3009 win32/win32.c  	errno = EINTR;
EINTR            3310 win32/win32.c  		errno = EINTR;


EINVAL

EINVAL           1239 error.c        #ifdef EINVAL
EINVAL           1240 error.c            set_syserr(EINVAL, "EINVAL");
EINVAL            172 ext/iconv/iconv.c 	    int inval = errno == EINVAL;
EINVAL            265 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           1005 ext/socket/socket.c 	      case EINVAL:
EINVAL             43 ext/stringio/stringio.c #define error_inval(msg) (errno = EINVAL, rb_sys_fail(msg))
EINVAL           2710 io.c           	    if (errno == 0) errno = EINVAL;
EINVAL             43 missing/flock.c 	errno = EINVAL;
EINVAL            121 missing/flock.c 	errno = EINVAL;
EINVAL            101 win32/win32.c      {	ERROR_INVALID_FUNCTION,		EINVAL		},
EINVAL            112 win32/win32.c      {	ERROR_INVALID_ACCESS,		EINVAL		},
EINVAL            113 win32/win32.c      {	ERROR_INVALID_DATA,		EINVAL		},
EINVAL            141 win32/win32.c      {	ERROR_INVALID_PARAMETER,	EINVAL		},
EINVAL            147 win32/win32.c      {	ERROR_INVALID_HANDLE,		EINVAL		},
EINVAL            151 win32/win32.c      {	ERROR_NEGATIVE_SEEK,		EINVAL		},
EINVAL            200 win32/win32.c      return EINVAL;
EINVAL            286 win32/win32.c  	errno = EINVAL;
EINVAL            314 win32/win32.c  	errno = EINVAL;
EINVAL            730 win32/win32.c  	errno = EINVAL;
EINVAL            769 win32/win32.c  	errno = EINVAL;
EINVAL           1784 win32/win32.c      errno = EINVAL;
EINVAL           2422 win32/win32.c  	errno = EINVAL;
EINVAL           2596 win32/win32.c  	errno = EINVAL;
EINVAL           2605 win32/win32.c  	    errno = EINVAL;
EINVAL           2665 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              1188 error.c        #ifdef EIO
EIO              1189 error.c            set_syserr(EIO, "EIO");
EIO               124 win32/win32.c      {	ERROR_SEEK,			EIO		},
EIO               128 win32/win32.c      {	ERROR_WRITE_FAULT,		EIO		},
EIO               129 win32/win32.c      {	ERROR_READ_FAULT,		EIO		},


EISCONN

EISCONN          1491 error.c        #ifdef EISCONN
EISCONN          1492 error.c            set_syserr(EISCONN, "EISCONN");
EISCONN          1025 ext/socket/socket.c #ifdef EISCONN
EISCONN          1026 ext/socket/socket.c 	      case EISCONN:


EISDIR

EISDIR           1236 error.c        #ifdef EISDIR
EISDIR           1237 error.c            set_syserr(EISDIR, "EISDIR");


ELOOP

ELOOP            1293 error.c        #ifdef ELOOP
ELOOP            1294 error.c            set_syserr(ELOOP, "ELOOP");


ELTS_SHARED

ELTS_SHARED        65 array.c            if (FL_TEST(ary, ELTS_SHARED)) {
ELTS_SHARED        67 array.c        	FL_UNSET(ary, ELTS_SHARED);
ELTS_SHARED       450 array.c            if (!FL_TEST(ary, ELTS_SHARED) &&
ELTS_SHARED       463 array.c            if (!FL_TEST(ary, ELTS_SHARED)) {
ELTS_SHARED       471 array.c        	FL_SET(ary, ELTS_SHARED);
ELTS_SHARED       613 array.c            FL_SET(ary2, ELTS_SHARED);
ELTS_SHARED      2162 array.c            if (RARRAY(copy)->ptr && !FL_TEST(copy, ELTS_SHARED))
ELTS_SHARED      2167 array.c            FL_SET(copy, ELTS_SHARED);
ELTS_SHARED       914 gc.c           	if (FL_TEST(obj, ELTS_SHARED)) {
ELTS_SHARED       935 gc.c           	if (FL_TEST(obj, ELTS_SHARED|STR_ASSOC)) {
ELTS_SHARED      1168 gc.c           	if (RANY(obj)->as.string.ptr && !FL_TEST(obj, ELTS_SHARED)) {
ELTS_SHARED      1173 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       148 string.c           FL_SET(str2, ELTS_SHARED);
ELTS_SHARED       169 string.c           if (FL_TEST(str, ELTS_SHARED)) {
ELTS_SHARED       170 string.c       	FL_SET(str2, ELTS_SHARED);
ELTS_SHARED       174 string.c       	FL_SET(str, ELTS_SHARED);
ELTS_SHARED       189 string.c           if (FL_TEST(orig, ELTS_SHARED) && (str = RSTRING(orig)->aux.shared) && klass == RBASIC(str)->klass) {
ELTS_SHARED       264 string.c           if (!FL_TEST(str, ELTS_SHARED)) free(RSTRING(str)->ptr);
ELTS_SHARED       481 string.c           if (!FL_TEST(str, ELTS_SHARED)) return 1;
ELTS_SHARED       518 string.c       	if (FL_TEST(str, ELTS_SHARED)) {
ELTS_SHARED       551 string.c       	FL_SET(s, ELTS_SHARED);
ELTS_SHARED       583 string.c       	FL_SET(str, ELTS_SHARED);
ELTS_SHARED       636 string.c           if (FL_TEST(str, ELTS_SHARED) && RSTRING(str)->aux.shared) {
ELTS_SHARED      2252 string.c           if (FL_TEST(str2, ELTS_SHARED)) {
ELTS_SHARED      2258 string.c       	FL_SET(str, ELTS_SHARED);


EMFILE

EMFILE            282 dir.c          	if (errno == EMFILE || errno == ENFILE) {
EMFILE           1245 error.c        #ifdef EMFILE
EMFILE           1246 error.c            set_syserr(EMFILE, "EMFILE");
EMFILE            165 ext/iconv/iconv.c 	  case EMFILE:
EMFILE            870 ext/socket/socket.c 	if (errno == EMFILE || errno == ENFILE) {
EMFILE           1326 ext/socket/socket.c 	  case EMFILE:
EMFILE           2038 ext/socket/socket.c 	if (errno == EMFILE || errno == ENFILE) {
EMFILE            304 io.c           	if (errno == EMFILE || errno == ENFILE) {
EMFILE           2647 io.c           	if (errno == EMFILE || errno == ENFILE) {
EMFILE           2667 io.c           	if (errno == EMFILE || errno == ENFILE) {
EMFILE           2698 io.c           	if (errno == 0 || errno == EMFILE || errno == ENFILE) {
EMFILE           2700 io.c           	if (errno == EMFILE || errno == ENFILE) {
EMFILE           2713 io.c           	    if (errno == 0) errno = EMFILE;
EMFILE             58 missing/dup2.c 	errno = EMFILE;
EMFILE            104 win32/win32.c      {	ERROR_TOO_MANY_OPEN_FILES,	EMFILE		},
EMFILE           1610 win32/win32.c  	errno = EMFILE;		/* too many open files */
EMFILE           1639 win32/win32.c  	errno = EMFILE;		/* too many open files */
EMFILE           3603 win32/win32.c  	    errno = EMFILE;
EMFILE           3616 win32/win32.c  	    errno = EMFILE;
EMFILE           3627 win32/win32.c  	    errno = EMFILE;


EMLINK

EMLINK           1266 error.c        #ifdef EMLINK
EMLINK           1267 error.c            set_syserr(EMLINK, "EMLINK");


EMSGSIZE

EMSGSIZE         1443 error.c        #ifdef EMSGSIZE
EMSGSIZE         1444 error.c            set_syserr(EMSGSIZE, "EMSGSIZE");


END

END               986 re.c               end = RMATCH(match)->END(nth);
END              1047 re.c               pos = RMATCH(match)->END(0);
END              2042 re.c           	    rb_str_buf_cat(val, RSTRING(src)->ptr+END(0), RSTRING(src)->len-END(0));
END              2063 re.c           	    rb_str_buf_cat(val, RSTRING(src)->ptr+BEG(no), END(no)-BEG(no));
END              1713 string.c           end = RMATCH(match)->END(nth);
END              1985 string.c       	plen = END(0) - BEG(0);
END              2122 string.c       	offset = END(0);
END              2123 string.c       	if (BEG(0) == END(0)) {
END              2128 string.c       	    if (RSTRING(str)->len <= END(0)) break;
END              2129 string.c       	    len = mbclen2(RSTRING(str)->ptr[END(0)], pat);
END              2130 string.c       	    memcpy(bp, RSTRING(str)->ptr+END(0), len);
END              2132 string.c       	    offset = END(0) + len;
END              3552 string.c       	    if (start == end && BEG(0) == END(0)) {
END              3569 string.c       		beg = start = END(0);
END              3575 string.c       		if (BEG(idx) == END(idx))
END              3578 string.c       		    tmp = rb_str_substr(str, BEG(idx), END(idx)-BEG(idx));
END              4188 string.c       	if (BEG(0) == END(0)) {
END              4192 string.c       	    if (RSTRING(str)->len > END(0))
END              4193 string.c       		*start = END(0)+mbclen2(RSTRING(str)->ptr[END(0)],pat);
END              4195 string.c       		*start = END(0)+1;
END              4198 string.c       	    *start = END(0);


END_CALLARGS

END_CALLARGS     3117 eval.c         		    END_CALLARGS;
END_CALLARGS     3359 eval.c         	    END_CALLARGS;
END_CALLARGS     3377 eval.c         	    END_CALLARGS;
END_CALLARGS     3392 eval.c         	    END_CALLARGS;
END_CALLARGS     3428 eval.c         		END_CALLARGS;
END_CALLARGS     5245 eval.c             END_CALLARGS;


END_FOREACH

END_FOREACH      10281 eval.c             END_FOREACH(th);
END_FOREACH      10986 eval.c             END_FOREACH(th);
END_FOREACH      11955 eval.c         	END_FOREACH(th);
END_FOREACH      12362 eval.c             END_FOREACH(th);
END_FOREACH      12571 eval.c             END_FOREACH(th);


END_FOREACH_CHILD

END_FOREACH_CHILD  411 win32/win32.c      } END_FOREACH_CHILD;
END_FOREACH_CHILD  423 win32/win32.c      } END_FOREACH_CHILD;
END_FOREACH_CHILD  445 win32/win32.c      } END_FOREACH_CHILD;
END_FOREACH_CHILD 2495 win32/win32.c  	} END_FOREACH_CHILD;


END_FOREACH_FROM

END_FOREACH_FROM 9723 eval.c         #define END_FOREACH(x)    END_FOREACH_FROM(curr_thread,x)
END_FOREACH_FROM 9984 eval.c             } END_FOREACH_FROM(main_thread, th);
END_FOREACH_FROM 10467 eval.c             END_FOREACH_FROM(curr, th);
END_FOREACH_FROM 10509 eval.c         	    END_FOREACH_FROM(curr, th);
END_FOREACH_FROM 10525 eval.c         	    END_FOREACH_FROM(curr, th);
END_FOREACH_FROM 10554 eval.c         	    END_FOREACH_FROM(curr, th);
END_FOREACH_FROM 10572 eval.c             END_FOREACH_FROM(curr, th);
END_FOREACH_FROM 10596 eval.c         	END_FOREACH_FROM(curr, th);
END_FOREACH_FROM 11982 eval.c             END_FOREACH_FROM(curr, th);


ENETDOWN

ENETDOWN         1473 error.c        #ifdef ENETDOWN
ENETDOWN         1474 error.c            set_syserr(ENETDOWN, "ENETDOWN");


ENETRESET

ENETRESET        1479 error.c        #ifdef ENETRESET
ENETRESET        1480 error.c            set_syserr(ENETRESET, "ENETRESET");


ENETUNREACH

ENETUNREACH      1476 error.c        #ifdef ENETUNREACH
ENETUNREACH      1477 error.c            set_syserr(ENETUNREACH, "ENETUNREACH");


ENFILE

ENFILE            282 dir.c          	if (errno == EMFILE || errno == ENFILE) {
ENFILE           1242 error.c        #ifdef ENFILE
ENFILE           1243 error.c            set_syserr(ENFILE, "ENFILE");
ENFILE            166 ext/iconv/iconv.c 	  case ENFILE:
ENFILE            870 ext/socket/socket.c 	if (errno == EMFILE || errno == ENFILE) {
ENFILE           1327 ext/socket/socket.c 	  case ENFILE:
ENFILE           2038 ext/socket/socket.c 	if (errno == EMFILE || errno == ENFILE) {
ENFILE            304 io.c           	if (errno == EMFILE || errno == ENFILE) {
ENFILE           2647 io.c           	if (errno == EMFILE || errno == ENFILE) {
ENFILE           2667 io.c           	if (errno == EMFILE || errno == ENFILE) {
ENFILE           2698 io.c           	if (errno == 0 || errno == EMFILE || errno == ENFILE) {
ENFILE           2700 io.c           	if (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          1488 error.c        #ifdef ENOBUFS
ENOBUFS          1489 error.c            set_syserr(ENOBUFS, "ENOBUFS");


ENODEV

ENODEV           1230 error.c        #ifdef ENODEV
ENODEV           1231 error.c            set_syserr(ENODEV, "ENODEV");
ENODEV            119 win32/win32.c      {	ERROR_BAD_UNIT,			ENODEV		},


ENOENT

ENOENT            944 dir.c          	else if (errno != ENOENT) {
ENOENT            973 dir.c          	        if (errno != ENOENT)
ENOENT           1017 dir.c          			if (errno != ENOENT)
ENOENT           1179 error.c        #ifdef ENOENT
ENOENT           1180 error.c            set_syserr(ENOENT, "ENOENT");
ENOENT            977 process.c      		errno = ENOENT;
ENOENT           1072 process.c          errno = ENOENT;
ENOENT           1112 process.c      	    errno = ENOENT;
ENOENT            102 win32/win32.c      {	ERROR_FILE_NOT_FOUND,		ENOENT		},
ENOENT            103 win32/win32.c      {	ERROR_PATH_NOT_FOUND,		ENOENT		},
ENOENT            114 win32/win32.c      {	ERROR_INVALID_DRIVE,		ENOENT		},
ENOENT            117 win32/win32.c      {	ERROR_NO_MORE_FILES,		ENOENT		},
ENOENT            135 win32/win32.c      {	ERROR_BAD_NETPATH,		ENOENT		},
ENOENT            137 win32/win32.c      {	ERROR_BAD_NET_NAME,		ENOENT		},
ENOENT            156 win32/win32.c      {	ERROR_BAD_PATHNAME,		ENOENT		},
ENOENT            175 win32/win32.c      {	ERROR_FILENAME_EXCED_RANGE,	ENOENT		},
ENOENT           2888 win32/win32.c  	errno = ENOENT;
ENOENT           2939 win32/win32.c  	errno = ENOENT;
ENOENT            148 wince/io_wce.c 		errno = ENOENT; return -1;


ENOEXEC

ENOEXEC           163 dln.c          #define DLN_ENOEXEC	ENOEXEC	/* Exec format error */
ENOEXEC          1197 error.c        #ifdef ENOEXEC
ENOEXEC          1198 error.c            set_syserr(ENOEXEC, "ENOEXEC");
ENOEXEC           111 win32/win32.c      {	ERROR_BAD_FORMAT,		ENOEXEC		},
ENOEXEC           160 win32/win32.c      {	ERROR_INVALID_STARTING_CODESEG,	ENOEXEC		},
ENOEXEC           161 win32/win32.c      {	ERROR_INVALID_STACKSEG,		ENOEXEC		},
ENOEXEC           162 win32/win32.c      {	ERROR_INVALID_MODULETYPE,	ENOEXEC		},
ENOEXEC           163 win32/win32.c      {	ERROR_INVALID_EXE_SIGNATURE,	ENOEXEC		},
ENOEXEC           164 win32/win32.c      {	ERROR_EXE_MARKED_INVALID,	ENOEXEC		},
ENOEXEC           165 win32/win32.c      {	ERROR_BAD_EXE_FORMAT,		ENOEXEC		},
ENOEXEC           166 win32/win32.c      {	ERROR_ITERATED_DATA_EXCEEDS_64k,ENOEXEC		},
ENOEXEC           167 win32/win32.c      {	ERROR_INVALID_MINALLOCSIZE,	ENOEXEC		},
ENOEXEC           168 win32/win32.c      {	ERROR_DYNLINK_FROM_INVALID_RING,ENOEXEC		},
ENOEXEC           169 win32/win32.c      {	ERROR_IOPL_NOT_ENABLED,		ENOEXEC		},
ENOEXEC           170 win32/win32.c      {	ERROR_INVALID_SEGDPL,		ENOEXEC		},
ENOEXEC           171 win32/win32.c      {	ERROR_AUTODATASEG_EXCEEDS_64k,	ENOEXEC		},
ENOEXEC           172 win32/win32.c      {	ERROR_RING2SEG_MUST_BE_MOVABLE,	ENOEXEC		},
ENOEXEC           173 win32/win32.c      {	ERROR_RELOC_CHAIN_XEEDS_SEGLIM,	ENOEXEC		},
ENOEXEC           174 win32/win32.c      {	ERROR_INFLOOP_IN_RELOC_CHAIN,	ENOEXEC		},


ENOMEM

ENOMEM           1209 error.c        #ifdef ENOMEM
ENOMEM           1210 error.c            set_syserr(ENOMEM, "ENOMEM");
ENOMEM            167 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            107 win32/win32.c      {	ERROR_ARENA_TRASHED,		ENOMEM		},
ENOMEM            108 win32/win32.c      {	ERROR_NOT_ENOUGH_MEMORY,	ENOMEM		},
ENOMEM            109 win32/win32.c      {	ERROR_INVALID_BLOCK,		ENOMEM		},
ENOMEM            177 win32/win32.c      {	ERROR_NOT_ENOUGH_QUOTA,		ENOMEM		},


ENOPROTOOPT

ENOPROTOOPT      1449 error.c        #ifdef ENOPROTOOPT
ENOPROTOOPT      1450 error.c            set_syserr(ENOPROTOOPT, "ENOPROTOOPT");


ENOSPC

ENOSPC           1257 error.c        #ifdef ENOSPC
ENOSPC           1258 error.c            set_syserr(ENOSPC, "ENOSPC");
ENOSPC            145 win32/win32.c      {	ERROR_DISK_FULL,		ENOSPC		},


ENOSYS

ENOSYS           1287 error.c        #ifdef ENOSYS
ENOSYS           1288 error.c            set_syserr(ENOSYS, "ENOSYS");


ENOTCONN

ENOTCONN         1494 error.c        #ifdef ENOTCONN
ENOTCONN         1495 error.c            set_syserr(ENOTCONN, "ENOTCONN");


ENOTDIR

ENOTDIR          1233 error.c        #ifdef ENOTDIR
ENOTDIR          1234 error.c            set_syserr(ENOTDIR, "ENOTDIR");
ENOTDIR           154 win32/win32.c      {	ERROR_DIRECTORY,		ENOTDIR		},
ENOTDIR          1378 win32/win32.c  	errno = ENOTDIR;


ENOTSOCK

ENOTSOCK         1437 error.c        #ifdef ENOTSOCK
ENOTSOCK         1438 error.c            set_syserr(ENOTSOCK, "ENOTSOCK");


ENOTTY

ENOTTY           1248 error.c        #ifdef ENOTTY
ENOTTY           1249 error.c            set_syserr(ENOTTY, "ENOTTY");
ENOTTY           3574 win32/win32.c  	errno = ENOTTY;


ENSURE_FAIL_STACK

ENSURE_FAIL_STACK 3382 regex.c            ENSURE_FAIL_STACK(NUM_COUNT_ITEMS);					\
ENSURE_FAIL_STACK 3401 regex.c            ENSURE_FAIL_STACK(NUM_FAILURE_ITEMS);				\


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   1664 hash.c         #ifdef ENV_IGNORECASE
ENV_IGNORECASE   1701 hash.c         #ifdef ENV_IGNORECASE
ENV_IGNORECASE   1744 hash.c         #ifdef ENV_IGNORECASE
ENV_IGNORECASE   1779 hash.c         #ifdef ENV_IGNORECASE
ENV_IGNORECASE   1905 hash.c         #ifdef ENV_IGNORECASE


ENXIO

ENXIO            1191 error.c        #ifdef ENXIO
ENXIO            1192 error.c            set_syserr(ENXIO, "ENXIO");
ENXIO             120 win32/win32.c      {	ERROR_NOT_READY,		ENXIO		},


EOF

EOF              1645 ext/nkf/nkf-utf8/nkf.c           if (c == EOF){
EOF              1766 ext/nkf/nkf-utf8/nkf.c         return EOF;
EOF              1777 ext/nkf/nkf-utf8/nkf.c     if(c!=EOF)
EOF              1788 ext/nkf/nkf-utf8/nkf.c     while ((c = (*i_getc)(f)) != EOF)
EOF              1912 ext/nkf/nkf-utf8/nkf.c     while ((c1 = (*i_getc)(f)) != EOF) {
EOF              1921 ext/nkf/nkf-utf8/nkf.c                     if (h_conv(f, c2, c1)==EOF)
EOF              2029 ext/nkf/nkf-utf8/nkf.c                     if ((c1 = (*i_getc)(f)) == EOF) {
EOF              2036 ext/nkf/nkf-utf8/nkf.c 			    if (mime_begin_strict(f) == EOF)
EOF              2040 ext/nkf/nkf-utf8/nkf.c 			} else if (mime_begin(f) == EOF)
EOF              2060 ext/nkf/nkf-utf8/nkf.c                 if ((c1 = (*i_getc)(f)) == EOF) {
EOF              2064 ext/nkf/nkf-utf8/nkf.c                     if ((c1 = (*i_getc)(f)) == EOF) {
EOF              2077 ext/nkf/nkf-utf8/nkf.c                         if ((c1 = (*i_getc)(f)) == EOF) {
EOF              2115 ext/nkf/nkf-utf8/nkf.c                     if ((c1 = (*i_getc)(f)) == EOF) {
EOF              2161 ext/nkf/nkf-utf8/nkf.c 		if ((c1=(*i_getc)(f))!=EOF && c1 == SPACE) {
EOF              2170 ext/nkf/nkf-utf8/nkf.c 		if ((c1=(*i_getc)(f))!=EOF) {
EOF              2174 ext/nkf/nkf-utf8/nkf.c 		    } else if (c1 == NL && (c1=(*i_getc)(f))!=EOF && c1 == SPACE) {
EOF              2200 ext/nkf/nkf-utf8/nkf.c             if (c0 != EOF){
EOF              2212 ext/nkf/nkf-utf8/nkf.c     (*iconv)(EOF, 0, 0);
EOF              2246 ext/nkf/nkf-utf8/nkf.c     while ((c1 = (*i_getc)(f)) != EOF) {
EOF              2252 ext/nkf/nkf-utf8/nkf.c         if (push_hold_buf(c1) == EOF || estab_f){
EOF              2260 ext/nkf/nkf-utf8/nkf.c         if (c1 == EOF){
EOF              2301 ext/nkf/nkf-utf8/nkf.c             if (c1 == EOF){
EOF              2302 ext/nkf/nkf-utf8/nkf.c                 c3 = EOF;
EOF              2313 ext/nkf/nkf-utf8/nkf.c                 if (c0 == EOF){
EOF              2314 ext/nkf/nkf-utf8/nkf.c                     c3 = EOF;
EOF              2333 ext/nkf/nkf-utf8/nkf.c         return (EOF);
EOF              2335 ext/nkf/nkf-utf8/nkf.c     return ((hold_count >= HOLD_SIZE*2) ? EOF : hold_count);
EOF              2396 ext/nkf/nkf-utf8/nkf.c     } else if ((c2 == EOF) || (c2 == 0) || c2 < SPACE) {
EOF              2436 ext/nkf/nkf-utf8/nkf.c     } else if ((c2 == EOF) || (c2 == 0) || c2 < SPACE) {
EOF              2582 ext/nkf/nkf-utf8/nkf.c     if (c2 != EOF && utf16_mode == UTF16LE_INPUT) {
EOF              2586 ext/nkf/nkf-utf8/nkf.c     if ((c2==0 && c1 < 0x80) || c2==EOF) {
EOF              2675 ext/nkf/nkf-utf8/nkf.c     if (c2 == EOF) {
EOF              2676 ext/nkf/nkf-utf8/nkf.c         (*o_putc)(EOF);
EOF              2725 ext/nkf/nkf-utf8/nkf.c     if (c2 == EOF) {
EOF              2726 ext/nkf/nkf-utf8/nkf.c         (*o_putc)(EOF);
EOF              2778 ext/nkf/nkf-utf8/nkf.c     if (c2 == EOF) {
EOF              2779 ext/nkf/nkf-utf8/nkf.c         (*o_putc)(EOF);
EOF              2901 ext/nkf/nkf-utf8/nkf.c     if (c2 == EOF) {
EOF              2902 ext/nkf/nkf-utf8/nkf.c         (*o_putc)(EOF);
EOF              2960 ext/nkf/nkf-utf8/nkf.c     if (c2 == EOF) {
EOF              2967 ext/nkf/nkf-utf8/nkf.c         (*o_putc)(EOF);
EOF              3147 ext/nkf/nkf-utf8/nkf.c     } else if (c2==EOF && f_line != 0) {    /* close open last line */
EOF              3328 ext/nkf/nkf-utf8/nkf.c     if (c2==EOF) {
EOF              3569 ext/nkf/nkf-utf8/nkf.c         if ( ((r[i] = c1 = (*i_getc)(f))==EOF) || nkf_toupper(c1) != p[i] ) {
EOF              3653 ext/nkf/nkf-utf8/nkf.c             if (!(++i<MAXRECOVER) || c1==EOF) break;
EOF              3662 ext/nkf/nkf-utf8/nkf.c             if (!(++i<MAXRECOVER) || c1==EOF) break;
EOF              3895 ext/nkf/nkf-utf8/nkf.c         if ((c1 = (*i_mgetc)(f)) == EOF) return (EOF);
EOF              3904 ext/nkf/nkf-utf8/nkf.c         if ((c2 = (*i_mgetc)(f)) == EOF) return (EOF);
EOF              3914 ext/nkf/nkf-utf8/nkf.c 	    while ((c1=(*i_getc)(f))!=EOF) {
EOF              3919 ext/nkf/nkf-utf8/nkf.c 			if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
EOF              3927 ext/nkf/nkf-utf8/nkf.c 			if ((c1=(*i_getc)(f))!=EOF && c1 == NL) {
EOF              3928 ext/nkf/nkf-utf8/nkf.c 			    if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
EOF              3975 ext/nkf/nkf-utf8/nkf.c 		if ((c1 = (*i_mgetc)(f)) == EOF) return (EOF);
EOF              3985 ext/nkf/nkf-utf8/nkf.c         if ((c3 = (*i_mgetc)(f)) == EOF) return (EOF);
EOF              4011 ext/nkf/nkf-utf8/nkf.c         if (c1==EOF)
EOF              4012 ext/nkf/nkf-utf8/nkf.c             return (EOF);
EOF              4016 ext/nkf/nkf-utf8/nkf.c         if (c2==EOF)
EOF              4017 ext/nkf/nkf-utf8/nkf.c             return (EOF);
EOF              4030 ext/nkf/nkf-utf8/nkf.c 	while ((c1=(*i_getc)(f))!=EOF) {
EOF              4035 ext/nkf/nkf-utf8/nkf.c 		    if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
EOF              4043 ext/nkf/nkf-utf8/nkf.c 		    if ((c1=(*i_getc)(f))!=EOF) {
EOF              4047 ext/nkf/nkf-utf8/nkf.c 			} else if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
EOF              4094 ext/nkf/nkf-utf8/nkf.c         if (c3==EOF)
EOF              4095 ext/nkf/nkf-utf8/nkf.c             return (EOF);
EOF              4102 ext/nkf/nkf-utf8/nkf.c         if (c4==EOF)
EOF              4103 ext/nkf/nkf-utf8/nkf.c             return (EOF);
EOF              4156 ext/nkf/nkf-utf8/nkf.c     while((c=(*i_getc)(f))!=EOF) {
EOF              4359 ext/nkf/nkf-utf8/nkf.c                 (*o_base64conv)(EOF,0);
EOF              4401 ext/nkf/nkf-utf8/nkf.c             if (c == EOF) { /* c==EOF */
EOF              4405 ext/nkf/nkf-utf8/nkf.c         if (c != EOF) { /* c==EOF */
EOF              4413 ext/nkf/nkf-utf8/nkf.c     if (c == EOF) { /* c==EOF */
EOF               762 ext/stringio/stringio.c     if (cc != EOF && pos > 0) {
EOF               342 io.c           	if (n != EOF) break;
EOF               472 io.c           	if (fputc(RSTRING(str)->ptr[offset++], f) == EOF) {
EOF               820 io.c               if (ch != EOF) {
EOF              1031 io.c               for (n = 0; n < len && READ_DATA_PENDING(f) && (c = getc(f)) != EOF; ++n) {
EOF              1061 io.c           	if (c == EOF) {
EOF              1379 io.c               int c = EOF;
EOF              1392 io.c           	    long last = 0, len = (c != EOF);
EOF              1404 io.c           	    if (c != EOF) {
EOF              1410 io.c           	else if (c != EOF) {
EOF              1429 io.c           	if (c == EOF) {
EOF              1441 io.c           	if (c == EOF || (*bp++ = c) == delim || bp == bpe) {
EOF              1450 io.c           	    if (c == EOF) {
EOF              1511 io.c               } while (c != EOF);
EOF              1523 io.c               while ((c = appendline(fptr, delim, &str)) != EOF && c != delim);
EOF              1584 io.c           	while ((c = appendline(fptr, newline, &str)) != EOF &&
EOF              1590 io.c           	    if (c != EOF) {
EOF              1872 io.c           	if (c == EOF) {
EOF              1918 io.c               if (c == EOF) {
EOF              1995 io.c               if (ungetc(cc, fptr->f) == EOF && cc != EOF) {
EOF               290 missing/vsnprintf.c 	return (EOF);
EOF               997 missing/vsnprintf.c 	return (__sferror(fp) ? EOF : ret);
EOF              1087 missing/vsnprintf.c 		return (EOF);
EOF              1121 missing/vsnprintf.c 		return (EOF);
EOF              1061 pack.c             long i = 0, n = 0, prev = EOF;
EOF              1073 pack.c                     prev = EOF;
EOF              3210 win32/win32.c          if ((c == EOF) && (errno == EPIPE)) {


EOPNOTSUPP

EOPNOTSUPP       1458 error.c        #ifdef EOPNOTSUPP
EOPNOTSUPP       1459 error.c            set_syserr(EOPNOTSUPP, "EOPNOTSUPP");


EOS_P

EOS_P             407 ext/strscan/strscan.c     if (EOS_P(p)) {
EOS_P             684 ext/strscan/strscan.c     if (EOS_P(p))
EOS_P             714 ext/strscan/strscan.c     if (EOS_P(p))
EOS_P             758 ext/strscan/strscan.c     if (EOS_P(p))
EOS_P             845 ext/strscan/strscan.c     if (EOS_P(p))
EOS_P             878 ext/strscan/strscan.c     if (EOS_P(p))
EOS_P            1048 ext/strscan/strscan.c     if (EOS_P(p)) {
EOS_P            1065 ext/strscan/strscan.c     if (EOS_P(p)) {
EOS_P            1114 ext/strscan/strscan.c     if (EOS_P(p)) {
EOS_P            1165 ext/strscan/strscan.c     if (EOS_P(p)) return rb_str_new2("");


EPERM

EPERM            1176 error.c        #ifdef EPERM
EPERM            1177 error.c            set_syserr(EPERM, "EPERM");
EPERM             525 ext/dbm/dbm.c  	if (errno == EPERM) rb_sys_fail(0);
EPERM             625 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             509 ext/sdbm/init.c 	if (errno == EPERM) rb_sys_fail(0);
EPERM            2163 process.c      	    errno = EPERM;
EPERM            2172 process.c      	    errno = EPERM;
EPERM            2179 process.c      	    errno = EPERM;
EPERM            2186 process.c      	    errno = EPERM;
EPERM            2714 process.c      	    errno = EPERM;
EPERM            2723 process.c      	    errno = EPERM;
EPERM            2730 process.c      	    errno = EPERM;
EPERM            2737 process.c      	    errno = EPERM;
EPERM            3161 process.c      	errno = EPERM;
EPERM            3186 process.c      	errno = EPERM;
EPERM            3272 process.c      	errno = EPERM;
EPERM            3296 process.c      	errno = EPERM;
EPERM            2620 win32/win32.c  		    errno = EPERM;
EPERM            2634 win32/win32.c  		    errno = EPERM;
EPERM            2650 win32/win32.c  		    errno = EPERM;
EPERM            2656 win32/win32.c  		    errno = EPERM;


EPFNOSUPPORT

EPFNOSUPPORT     1461 error.c        #ifdef EPFNOSUPPORT
EPFNOSUPPORT     1462 error.c            set_syserr(EPFNOSUPPORT, "EPFNOSUPPORT");


EPIPE

EPIPE            1269 error.c        #ifdef EPIPE
EPIPE            1270 error.c            set_syserr(EPIPE, "EPIPE");
EPIPE             490 io.c           		    errno = EPIPE;
EPIPE             144 win32/win32.c      {	ERROR_BROKEN_PIPE,		EPIPE		},
EPIPE            3210 win32/win32.c          if ((c == EOF) && (errno == EPIPE)) {


EPROTONOSUPPORT

EPROTONOSUPPORT  1452 error.c        #ifdef EPROTONOSUPPORT
EPROTONOSUPPORT  1453 error.c            set_syserr(EPROTONOSUPPORT, "EPROTONOSUPPORT");


EPROTOTYPE

EPROTOTYPE       1446 error.c        #ifdef EPROTOTYPE
EPROTOTYPE       1447 error.c            set_syserr(EPROTOTYPE, "EPROTOTYPE");


EQUAL

EQUAL             216 st.c           ((ptr) != 0 && (ptr->hash != (hash_val) || !EQUAL((table), (key), (ptr)->key)))
EQUAL             395 st.c               if (EQUAL(table, *key, ptr->key)) {
EQUAL             405 st.c           	if (EQUAL(table, ptr->next->key, *key)) {
EQUAL             438 st.c           	if ((ptr->key != never) && EQUAL(table, ptr->key, *key)) {


ERANGE

ERANGE           1275 error.c        #ifdef ERANGE
ERANGE           1276 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           2155 file.c         	    || (rv < 0 && errno == ERANGE) /* quirky behavior of GPFS */
ERANGE            248 missing/strtod.c 	errno = ERANGE;
ERANGE           2266 object.c           if (errno == ERANGE) {
ERANGE           2300 object.c       	if (errno == ERANGE) {
ERANGE           2310 object.c           if (errno == ERANGE) {
ERANGE           7980 parse.c        		if (errno == ERANGE) {
ERANGE           3982 parse.y        		if (errno == ERANGE) {
ERANGE            646 util.c         	if (errno != ERANGE) {
ERANGE            887 util.c         	    errno = ERANGE;
ERANGE            891 util.c         	    errno = ERANGE;


EREMOTE

EREMOTE          1371 error.c        #ifdef EREMOTE
EREMOTE          1372 error.c            set_syserr(EREMOTE, "EREMOTE");


EROFS

EROFS            1263 error.c        #ifdef EROFS
EROFS            1264 error.c            set_syserr(EROFS, "EROFS");
EROFS             118 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               324 ext/socket/getaddrinfo.c 			ERR(EAI_BADHINTS); /* xxx */
ERR               326 ext/socket/getaddrinfo.c 			ERR(EAI_BADFLAGS);
ERR               335 ext/socket/getaddrinfo.c 			ERR(EAI_FAMILY);
ERR               363 ext/socket/getaddrinfo.c 				ERR(EAI_BADHINTS);	/*xxx*/
ERR               369 ext/socket/getaddrinfo.c 				ERR(EAI_BADHINTS);	/*xxx*/
ERR               373 ext/socket/getaddrinfo.c 			ERR(EAI_SOCKTYPE);
ERR               409 ext/socket/getaddrinfo.c 				ERR(EAI_SERVICE);
ERR               419 ext/socket/getaddrinfo.c 					ERR(EAI_PROTOCOL);	/*xxx*/
ERR               469 ext/socket/getaddrinfo.c 			ERR(EAI_FAMILY);
ERR               520 ext/socket/getaddrinfo.c 				ERR(EAI_FAMILY);	/*xxx*/
ERR               525 ext/socket/getaddrinfo.c 		ERR(EAI_NONAME);
ERR               639 ext/socket/getaddrinfo.c 		ERR(EAI_FAIL);


ERRBUF_APPEND

ERRBUF_APPEND    1250 dln.c          	ERRBUF_APPEND(strerror(errno));
ERRBUF_APPEND    1255 dln.c          		ERRBUF_APPEND(load_errtab[i].errstr);
ERRBUF_APPEND    1258 dln.c          	ERRBUF_APPEND(message[i]);
ERRBUF_APPEND    1259 dln.c          	ERRBUF_APPEND("\n");


ERROR_MSG_MAX_SIZE

ERROR_MSG_MAX_SIZE 1222 regex.c          static char error_msg[ERROR_MSG_MAX_SIZE+1];
ERROR_MSG_MAX_SIZE 1345 regex.c        	snprintf(error_msg, ERROR_MSG_MAX_SIZE,
ERROR_MSG_MAX_SIZE 1639 regex.c        	      snprintf(error_msg, ERROR_MSG_MAX_SIZE,
ERROR_MSG_MAX_SIZE 2009 regex.c        	snprintf(error_msg, ERROR_MSG_MAX_SIZE,


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              2059 ext/nkf/nkf-utf8/nkf.c             } else if (c1 == ESC ) {
ESC              2097 ext/nkf/nkf-utf8/nkf.c                             (*oconv)(0, ESC);
ESC              2109 ext/nkf/nkf-utf8/nkf.c                         (*oconv)(0, ESC);
ESC              2133 ext/nkf/nkf-utf8/nkf.c                             (*oconv)(0, ESC);
ESC              2149 ext/nkf/nkf-utf8/nkf.c                        (*oconv)(0, ESC);
ESC              2154 ext/nkf/nkf-utf8/nkf.c                     (*oconv)(0, ESC);
ESC              2247 ext/nkf/nkf-utf8/nkf.c         if (c1 == ESC){
ESC              2962 ext/nkf/nkf-utf8/nkf.c             (*o_putc)(ESC);
ESC              2972 ext/nkf/nkf-utf8/nkf.c             (*o_putc)(ESC);
ESC              2983 ext/nkf/nkf-utf8/nkf.c             (*o_putc)(ESC);
ESC              2996 ext/nkf/nkf-utf8/nkf.c             (*o_putc)(ESC);
ESC              3005 ext/nkf/nkf-utf8/nkf.c             (*o_putc)(ESC);
ESC              3041 ext/nkf/nkf-utf8/nkf.c     if (c=='$' && broken_last != ESC
ESC              3048 ext/nkf/nkf-utf8/nkf.c 	    return ESC;
ESC              3053 ext/nkf/nkf-utf8/nkf.c     } else if (c=='(' && broken_last != ESC
ESC              3060 ext/nkf/nkf-utf8/nkf.c 	    return ESC;


ESHUTDOWN

ESHUTDOWN        1497 error.c        #ifdef ESHUTDOWN
ESHUTDOWN        1498 error.c            set_syserr(ESHUTDOWN, "ESHUTDOWN");


ESOCKTNOSUPPORT

ESOCKTNOSUPPORT  1455 error.c        #ifdef ESOCKTNOSUPPORT
ESOCKTNOSUPPORT  1456 error.c            set_syserr(ESOCKTNOSUPPORT, "ESOCKTNOSUPPORT");


ESPIPE

ESPIPE           1260 error.c        #ifdef ESPIPE
ESPIPE           1261 error.c            set_syserr(ESPIPE, "ESPIPE");


ESRCH

ESRCH            1182 error.c        #ifdef ESRCH
ESRCH            1183 error.c            set_syserr(ESRCH, "ESRCH");
ESRCH            2617 win32/win32.c  		    errno = ESRCH;
ESRCH            2647 win32/win32.c  		    errno = ESRCH;


ESTALE

ESTALE           1521 error.c        #ifdef ESTALE
ESTALE           1522 error.c            set_syserr(ESTALE, "ESTALE");


ETIMEDOUT

ETIMEDOUT        1503 error.c        #ifdef ETIMEDOUT
ETIMEDOUT        1504 error.c            set_syserr(ETIMEDOUT, "ETIMEDOUT");


ETOOMANYREFS

ETOOMANYREFS     1500 error.c        #ifdef ETOOMANYREFS
ETOOMANYREFS     1501 error.c            set_syserr(ETOOMANYREFS, "ETOOMANYREFS");


EUSERS

EUSERS           1434 error.c        #ifdef EUSERS
EUSERS           1435 error.c            set_syserr(EUSERS, "EUSERS");


EVENTSINK_Destructor

EVENTSINK_Destructor 5337 ext/win32ole/win32ole.c void EVENTSINK_Destructor(PIEVENTSINKOBJ);
EVENTSINK_Destructor 5373 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   275 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  289 ext/openssl/ossl_cipher.c     if (EVP_CipherInit_ex(ctx, NULL, NULL, RSTRING(key)->ptr, NULL, -1) != 1)
EVP_CipherInit_ex  306 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      1296 error.c        #ifdef EWOULDBLOCK
EWOULDBLOCK      1297 error.c            set_syserr(EWOULDBLOCK, "EWOULDBLOCK");
EWOULDBLOCK        66 ext/socket/socket.c #ifndef EWOULDBLOCK
EWOULDBLOCK      1332 ext/socket/socket.c 	  case EWOULDBLOCK:
EWOULDBLOCK      3123 file.c         #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
EWOULDBLOCK      3124 file.c         	  case EWOULDBLOCK:
EWOULDBLOCK      3188 file.c         #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
EWOULDBLOCK      3189 file.c         	  case EWOULDBLOCK:
EWOULDBLOCK       364 io.c           #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
EWOULDBLOCK       365 io.c                 case EWOULDBLOCK:
EWOULDBLOCK       392 io.c           #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
EWOULDBLOCK       393 io.c                 case EWOULDBLOCK:
EWOULDBLOCK      1072 io.c           #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
EWOULDBLOCK      1073 io.c           		  case EWOULDBLOCK:
EWOULDBLOCK       253 win32/win32.c  #define LK_ERR(f,i) ((f) ? (i = 0) : (errno = GetLastError() == ERROR_LOCK_VIOLATION ? EWOULDBLOCK : EACCES))
EWOULDBLOCK       304 win32/win32.c  	} while (i && errno == EWOULDBLOCK);


EXCL

EXCL              106 range.c            return EXCL(range) ? Qtrue : Qfalse;
EXCL              137 range.c            if (EXCL(range) != EXCL(obj)) return Qfalse;
EXCL              195 range.c            if (EXCL(range) != EXCL(obj)) return Qfalse;
EXCL              213 range.c            long hash = EXCL(range);
EXCL              220 range.c            hash ^= EXCL(range) << 24;
EXCL              229 range.c            return rb_str_upto(args[0], args[1], EXCL(args[2]));
EXCL              241 range.c            if (EXCL(range)) {
EXCL              321 range.c        	if (!EXCL(range)) end += 1;
EXCL              341 range.c        	    ID c = rb_intern(EXCL(range) ? "<" : "<=");
EXCL              409 range.c        	if (!EXCL(range)) lim += 1;
EXCL              487 range.c            if (!EXCL(range)) end++;	/* include end point */
EXCL              498 range.c        		 b, EXCL(range)? "." : "", e);
EXCL              519 range.c            rb_str_cat(str, "...", EXCL(range)?3:2);
EXCL              545 range.c            rb_str_cat(str, "...", EXCL(range)?3:2);
EXCL              583 range.c        	if (EXCL(range)) {


EXDEV

EXDEV            1227 error.c        #ifdef EXDEV
EXDEV            1228 error.c            set_syserr(EXDEV, "EXDEV");
EXDEV             116 win32/win32.c      {	ERROR_NOT_SAME_DEVICE,		EXDEV		},


EXEC_EVENT_HOOK

EXEC_EVENT_HOOK  2937 eval.c         	EXEC_EVENT_HOOK(RUBY_EVENT_LINE, node, self,
EXEC_EVENT_HOOK  2955 eval.c         		EXEC_EVENT_HOOK(RUBY_EVENT_LINE, tag, self,
EXEC_EVENT_HOOK  2996 eval.c         		    EXEC_EVENT_HOOK(RUBY_EVENT_LINE, tag, self,
EXEC_EVENT_HOOK  4029 eval.c         	EXEC_EVENT_HOOK(RUBY_EVENT_LINE, node, self,
EXEC_EVENT_HOOK  4082 eval.c         	EXEC_EVENT_HOOK(RUBY_EVENT_CLASS, n, ruby_cbase,
EXEC_EVENT_HOOK  4093 eval.c             EXEC_EVENT_HOOK(RUBY_EVENT_END, n, 0,
EXEC_EVENT_HOOK  4503 eval.c         	EXEC_EVENT_HOOK(RUBY_EVENT_RAISE, ruby_current_node,
EXEC_EVENT_HOOK  5679 eval.c         		EXEC_EVENT_HOOK(RUBY_EVENT_C_CALL, ruby_current_node,
EXEC_EVENT_HOOK  5687 eval.c         		EXEC_EVENT_HOOK(RUBY_EVENT_C_RETURN, ruby_current_node,
EXEC_EVENT_HOOK  5824 eval.c         		    EXEC_EVENT_HOOK(RUBY_EVENT_CALL, b2, recv, id, klass);
EXEC_EVENT_HOOK  5839 eval.c         		EXEC_EVENT_HOOK(RUBY_EVENT_RETURN, body, recv, id, klass);


EXEC_TAG

EXEC_TAG         1179 eval.c             if (EXEC_TAG() == 0) {
EXEC_TAG         1185 eval.c             if (EXEC_TAG()) goto error;
EXEC_TAG         1206 eval.c             if (EXEC_TAG() == 0) {
EXEC_TAG         1216 eval.c             if (EXEC_TAG()) goto error;
EXEC_TAG         1329 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         1459 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         1476 eval.c             if (EXEC_TAG() == 0) {
EXEC_TAG         1513 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         1542 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         1763 eval.c         	if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         1785 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         2283 eval.c         	if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         2383 eval.c         	if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         2432 eval.c         	if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         2636 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         2900 eval.c         	switch (state = EXEC_TAG()) {
EXEC_TAG         3027 eval.c         	switch (state = EXEC_TAG()) {
EXEC_TAG         3062 eval.c         	switch (state = EXEC_TAG()) {
EXEC_TAG         3104 eval.c         	    state = EXEC_TAG();
EXEC_TAG         3194 eval.c         	    if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         3244 eval.c         	if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         3463 eval.c         	    if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         4081 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         4484 eval.c         	if ((status = EXEC_TAG()) == 0) {
EXEC_TAG         4821 eval.c         	if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         4879 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         5205 eval.c             state = EXEC_TAG();
EXEC_TAG         5275 eval.c             switch (state = EXEC_TAG()) {
EXEC_TAG         5334 eval.c             if ((status = EXEC_TAG()) == 0) {
EXEC_TAG         5361 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         5386 eval.c         	if ((status = EXEC_TAG()) == 0) {
EXEC_TAG         5407 eval.c         	if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         5682 eval.c         		if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         5754 eval.c         	    if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         6035 eval.c             if ((status = EXEC_TAG()) == 0) {
EXEC_TAG         6302 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         6462 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         6694 eval.c             state = EXEC_TAG();
EXEC_TAG         6753 eval.c             if ((status = EXEC_TAG()) == 0) {
EXEC_TAG         7012 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         7713 eval.c         	    if ((status = EXEC_TAG()) == 0) {
EXEC_TAG         7731 eval.c         	    if ((status = EXEC_TAG()) == 0) {
EXEC_TAG         8383 eval.c             state = EXEC_TAG();
EXEC_TAG         8695 eval.c             state = EXEC_TAG();
EXEC_TAG         11645 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         12819 eval.c             if ((state = EXEC_TAG()) == 0) {


EXIT_FAILURE

EXIT_FAILURE       27 eval.c         #ifndef EXIT_FAILURE
EXIT_FAILURE     1347 eval.c         	exit(EXIT_FAILURE);
EXIT_FAILURE     1394 eval.c             int status = EXIT_FAILURE;
EXIT_FAILURE     1396 eval.c             if (thread_set_raised()) return EXIT_FAILURE;
EXIT_FAILURE     1572 eval.c             if (ruby_nerrs > 0) exit(EXIT_FAILURE);
EXIT_FAILURE     4389 eval.c         	    istatus = EXIT_FAILURE;
EXIT_FAILURE     4428 eval.c         	rb_exit(EXIT_FAILURE);
EXIT_FAILURE     4436 eval.c         	terminate_process(EXIT_FAILURE, mesg);
EXIT_FAILURE     10129 eval.c         	    terminate_process(EXIT_FAILURE, ruby_errinfo);
EXIT_FAILURE       36 process.c      #ifndef EXIT_FAILURE
EXIT_FAILURE     1332 process.c      	    istatus = EXIT_FAILURE;
EXIT_FAILURE     1340 process.c      	istatus = EXIT_FAILURE;


EXIT_SUCCESS

EXIT_SUCCESS       28 error.c        #ifndef EXIT_SUCCESS
EXIT_SUCCESS      551 error.c            VALUE status = INT2FIX(EXIT_SUCCESS);
EXIT_SUCCESS      590 error.c            if (status == INT2FIX(EXIT_SUCCESS)) return Qtrue;
EXIT_SUCCESS       24 eval.c         #ifndef EXIT_SUCCESS
EXIT_SUCCESS     1399 eval.c         	status = EXIT_SUCCESS;
EXIT_SUCCESS     4386 eval.c         	    istatus = EXIT_SUCCESS;
EXIT_SUCCESS     4393 eval.c         #if EXIT_SUCCESS != 0
EXIT_SUCCESS     4394 eval.c         	    if (istatus == 0) istatus = EXIT_SUCCESS;
EXIT_SUCCESS     4400 eval.c         	istatus = EXIT_SUCCESS;
EXIT_SUCCESS     11075 eval.c             if (th == th->next || th == main_thread) rb_exit(EXIT_SUCCESS);
EXIT_SUCCESS     12092 eval.c         	rb_exit(EXIT_SUCCESS);
EXIT_SUCCESS     12094 eval.c             args[0] = INT2NUM(EXIT_SUCCESS);
EXIT_SUCCESS       33 process.c      #ifndef EXIT_SUCCESS
EXIT_SUCCESS      529 process.c          return WEXITSTATUS(status) == EXIT_SUCCESS ? Qtrue : Qfalse;
EXIT_SUCCESS     1329 process.c      	    istatus = EXIT_SUCCESS;
EXIT_SUCCESS     1544 process.c          if (status == EXIT_SUCCESS) return Qtrue;


EXPAND_FAIL_STACK

EXPAND_FAIL_STACK  152 regex.c                EXPAND_FAIL_STACK();						\
EXPAND_FAIL_STACK 2907 regex.c        	  EXPAND_FAIL_STACK();


EXPR1

EXPR1             457 eval.c         	ent = cache + EXPR1(klass, id);
EXPR1             469 eval.c         	ent = cache + EXPR1(klass, id);
EXPR1             633 eval.c             ent = cache + EXPR1(klass, id);
EXPR1            5887 eval.c             ent = cache + EXPR1(klass, mid);


EXTEND_BUFFER

EXTEND_BUFFER     546 regex.c              EXTEND_BUFFER;							\
EXTEND_BUFFER    1433 regex.c        	EXTEND_BUFFER;
EXTEND_BUFFER    1462 regex.c        	    EXTEND_BUFFER;
EXTEND_BUFFER    2208 regex.c        	  EXTEND_BUFFER;


EXTERN

EXTERN            202 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));


EXTRACT_MBC

EXTRACT_MBC       676 regex.c            if ((int)c1 - 1 > (int)EXTRACT_MBC(&b[mid*8+4]))
EXTRACT_MBC       685 regex.c            if ((int)c2 >= (int)EXTRACT_MBC(&b[mid*8]) - 1)
EXTRACT_MBC       692 regex.c            if (c1 > EXTRACT_MBC(&b[beg*8]))
EXTRACT_MBC       693 regex.c              c1 = EXTRACT_MBC(&b[beg*8]);
EXTRACT_MBC       694 regex.c            if (c2 < EXTRACT_MBC(&b[(end - 1)*8+4]))
EXTRACT_MBC       695 regex.c              c2 = EXTRACT_MBC(&b[(end - 1)*8+4]);
EXTRACT_MBC       733 regex.c            if (c > EXTRACT_MBC(&b[k*8+4]))
EXTRACT_MBC       738 regex.c          if (i < size && EXTRACT_MBC(&b[i*8]) <= c)
EXTRACT_MBC      3007 regex.c        	    c = EXTRACT_MBC(&p[j*8]);
EXTRACT_MBC      3009 regex.c        	    c = EXTRACT_MBC(&p[j*8+4]);
EXTRACT_MBC      3062 regex.c        	    unsigned int cc = EXTRACT_MBC(&p[j*8]);
EXTRACT_MBC      3070 regex.c        	    cc = EXTRACT_MBC(&p[j*8+4]);


EXTRACT_MBC_AND_INCR

EXTRACT_MBC_AND_INCR  868 regex.c        	  print_mbc(EXTRACT_MBC_AND_INCR(p));
EXTRACT_MBC_AND_INCR  870 regex.c        	  print_mbc(EXTRACT_MBC_AND_INCR(p));


EXTRACT_NUMBER

EXTRACT_NUMBER    411 regex.c          do { EXTRACT_NUMBER(destination, source);				\
EXTRACT_NUMBER   2895 regex.c        	EXTRACT_NUMBER(k, p + 2);
EXTRACT_NUMBER   3381 regex.c            EXTRACT_NUMBER(c, ptr);						\
EXTRACT_NUMBER   3817 regex.c        	EXTRACT_NUMBER(mcnt, p+1);
EXTRACT_NUMBER   4094 regex.c        	EXTRACT_NUMBER(mcnt, p + 2);
EXTRACT_NUMBER   4109 regex.c        	EXTRACT_NUMBER(mcnt, p + 2);
EXTRACT_NUMBER   4149 regex.c        	EXTRACT_NUMBER(mcnt, p + 2);
EXTRACT_NUMBER   4156 regex.c        	  EXTRACT_NUMBER(pos, p);
EXTRACT_NUMBER   4157 regex.c        	  EXTRACT_NUMBER(i, p+pos+5);


EXTRACT_NUMBER_AND_INCR

EXTRACT_NUMBER_AND_INCR  814 regex.c              EXTRACT_NUMBER_AND_INCR(mcnt, p);
EXTRACT_NUMBER_AND_INCR  884 regex.c              EXTRACT_NUMBER_AND_INCR(mcnt, p);
EXTRACT_NUMBER_AND_INCR  889 regex.c              EXTRACT_NUMBER_AND_INCR(mcnt, p);
EXTRACT_NUMBER_AND_INCR  898 regex.c              EXTRACT_NUMBER_AND_INCR(mcnt, p);
EXTRACT_NUMBER_AND_INCR  903 regex.c              EXTRACT_NUMBER_AND_INCR(mcnt, p);
EXTRACT_NUMBER_AND_INCR  908 regex.c              EXTRACT_NUMBER_AND_INCR(mcnt, p);
EXTRACT_NUMBER_AND_INCR  913 regex.c              EXTRACT_NUMBER_AND_INCR(mcnt, p);
EXTRACT_NUMBER_AND_INCR  918 regex.c              EXTRACT_NUMBER_AND_INCR(mcnt, p);
EXTRACT_NUMBER_AND_INCR  919 regex.c              EXTRACT_NUMBER_AND_INCR(mcnt2, p);
EXTRACT_NUMBER_AND_INCR  924 regex.c              EXTRACT_NUMBER_AND_INCR(mcnt, p);
EXTRACT_NUMBER_AND_INCR  925 regex.c              EXTRACT_NUMBER_AND_INCR(mcnt2, p);
EXTRACT_NUMBER_AND_INCR  930 regex.c              EXTRACT_NUMBER_AND_INCR(mcnt, p);
EXTRACT_NUMBER_AND_INCR  931 regex.c              EXTRACT_NUMBER_AND_INCR(mcnt2, p);
EXTRACT_NUMBER_AND_INCR  936 regex.c              EXTRACT_NUMBER_AND_INCR(mcnt, p);
EXTRACT_NUMBER_AND_INCR  941 regex.c              EXTRACT_NUMBER_AND_INCR(mcnt, p);
EXTRACT_NUMBER_AND_INCR  946 regex.c              EXTRACT_NUMBER_AND_INCR(mcnt, p);
EXTRACT_NUMBER_AND_INCR  947 regex.c              EXTRACT_NUMBER_AND_INCR(mcnt2, p);
EXTRACT_NUMBER_AND_INCR 1080 regex.c              EXTRACT_NUMBER_AND_INCR(mcnt, p);
EXTRACT_NUMBER_AND_INCR 1084 regex.c        	EXTRACT_NUMBER_AND_INCR(mcnt, p);
EXTRACT_NUMBER_AND_INCR 1093 regex.c              EXTRACT_NUMBER_AND_INCR(mcnt, p);
EXTRACT_NUMBER_AND_INCR 2863 regex.c        	EXTRACT_NUMBER_AND_INCR(j, p);
EXTRACT_NUMBER_AND_INCR 2879 regex.c        	EXTRACT_NUMBER_AND_INCR(j, p);
EXTRACT_NUMBER_AND_INCR 2904 regex.c              EXTRACT_NUMBER_AND_INCR(j, p);
EXTRACT_NUMBER_AND_INCR 2915 regex.c        	EXTRACT_NUMBER_AND_INCR(k, p);	/* Skip the n.  */
EXTRACT_NUMBER_AND_INCR 3799 regex.c        	EXTRACT_NUMBER_AND_INCR(mcnt, p);
EXTRACT_NUMBER_AND_INCR 3804 regex.c        	EXTRACT_NUMBER_AND_INCR(mcnt, p);
EXTRACT_NUMBER_AND_INCR 3811 regex.c        	EXTRACT_NUMBER_AND_INCR(mcnt, p);
EXTRACT_NUMBER_AND_INCR 3958 regex.c              EXTRACT_NUMBER_AND_INCR(mcnt, p);
EXTRACT_NUMBER_AND_INCR 3965 regex.c        	EXTRACT_NUMBER_AND_INCR(mcnt, p);
EXTRACT_NUMBER_AND_INCR 4050 regex.c                EXTRACT_NUMBER_AND_INCR(mcnt, p);
EXTRACT_NUMBER_AND_INCR 4124 regex.c        	EXTRACT_NUMBER_AND_INCR(mcnt, p);
EXTRACT_NUMBER_AND_INCR 4126 regex.c        	EXTRACT_NUMBER_AND_INCR(mcnt, p);
EXTRACT_NUMBER_AND_INCR 4131 regex.c        	EXTRACT_NUMBER_AND_INCR(mcnt, p);
EXTRACT_NUMBER_AND_INCR 4141 regex.c        	EXTRACT_NUMBER_AND_INCR(mcnt, p);
EXTRACT_NUMBER_AND_INCR 4160 regex.c        	  EXTRACT_NUMBER_AND_INCR(mcnt, p);
EXTRACT_NUMBER_AND_INCR 4353 regex.c        	  EXTRACT_NUMBER_AND_INCR(mcnt, p1);
EXTRACT_NUMBER_AND_INCR 4362 regex.c        	      EXTRACT_NUMBER_AND_INCR(mcnt, p1);


EXTRACT_UNSIGNED

EXTRACT_UNSIGNED  666 regex.c          unsigned short mbc_size = EXTRACT_UNSIGNED(&b[sbc_size]);
EXTRACT_UNSIGNED  727 regex.c          size = EXTRACT_UNSIGNED(&b[-2]);
EXTRACT_UNSIGNED 1457 regex.c        	if ((size = EXTRACT_UNSIGNED(&b[(1 << BYTEWIDTH) / BYTEWIDTH])) || current_mbctype) {
EXTRACT_UNSIGNED 1726 regex.c        		2 + EXTRACT_UNSIGNED(&b[(1 << BYTEWIDTH) / BYTEWIDTH])*8);
EXTRACT_UNSIGNED 1727 regex.c              b += b[-1] + 2 + EXTRACT_UNSIGNED(&b[(unsigned char)b[-1]])*8;
EXTRACT_UNSIGNED 2239 regex.c        		  2 + EXTRACT_UNSIGNED(&b[(1 << BYTEWIDTH) / BYTEWIDTH])*8);
EXTRACT_UNSIGNED 2240 regex.c        	b += b[-1] + 2 + EXTRACT_UNSIGNED(&b[(unsigned char)b[-1]])*8;
EXTRACT_UNSIGNED 3005 regex.c        	  size = EXTRACT_UNSIGNED(&p[-2]);
EXTRACT_UNSIGNED 3054 regex.c        	  size = EXTRACT_UNSIGNED(&p[-2]);
EXTRACT_UNSIGNED 3890 regex.c        	  p += 1 + *p + 2 + EXTRACT_UNSIGNED(&p[1 + *p])*8;


EXTRACT_UNSIGNED_AND_INCR

EXTRACT_UNSIGNED_AND_INCR  865 regex.c        	mcnt = EXTRACT_UNSIGNED_AND_INCR(p);
EXTRACT_UNSIGNED_AND_INCR 1073 regex.c              mcnt = EXTRACT_UNSIGNED_AND_INCR(p);


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     315 ext/iconv/iconv.c     else if (TYPE(failed) != T_STRING || RSTRING(failed)->len < FAILED_MAXLEN) {
FAILED_MAXLEN     319 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              96 ext/socket/getaddrinfo.c #ifdef FAITH
FAITH             290 ext/socket/getaddrinfo.c #ifdef FAITH
FAITH             665 ext/socket/getaddrinfo.c #ifdef FAITH


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             372 ext/nkf/nkf-utf8/nkf.c static int             unbuf_f = FALSE;
FALSE             373 ext/nkf/nkf-utf8/nkf.c static int             estab_f = FALSE;
FALSE             374 ext/nkf/nkf-utf8/nkf.c static int             nop_f = FALSE;
FALSE             376 ext/nkf/nkf-utf8/nkf.c static int             rot_f = FALSE;          /* rot14/43 mode */
FALSE             377 ext/nkf/nkf-utf8/nkf.c static int             hira_f = FALSE;          /* hira/kata henkan */
FALSE             378 ext/nkf/nkf-utf8/nkf.c static int             input_f = FALSE;        /* non fixed input code  */
FALSE             379 ext/nkf/nkf-utf8/nkf.c static int             alpha_f = FALSE;        /* convert JIx0208 alphbet to ASCII */
FALSE             381 ext/nkf/nkf-utf8/nkf.c static int             mime_decode_f = FALSE;  /* mime decode is explicitly on */
FALSE             382 ext/nkf/nkf-utf8/nkf.c static int             mimebuf_f = FALSE;      /* MIME buffered input */
FALSE             383 ext/nkf/nkf-utf8/nkf.c static int             broken_f = FALSE;       /* convert ESC-less broken JIS */
FALSE             384 ext/nkf/nkf-utf8/nkf.c static int             iso8859_f = FALSE;      /* ISO8859 through */
FALSE             385 ext/nkf/nkf-utf8/nkf.c static int             mimeout_f = FALSE;       /* base64 mode */
FALSE             391 ext/nkf/nkf-utf8/nkf.c static int             iso2022jp_f = FALSE;    /* convert ISO-2022-JP */
FALSE             395 ext/nkf/nkf-utf8/nkf.c static int             ms_ucs_map_f = FALSE;   /* Microsoft UCS Mapping Compatible */
FALSE             406 ext/nkf/nkf-utf8/nkf.c static int cap_f = FALSE;
FALSE             412 ext/nkf/nkf-utf8/nkf.c static int url_f = FALSE;
FALSE             418 ext/nkf/nkf-utf8/nkf.c static int numchar_f = FALSE;
FALSE             426 ext/nkf/nkf-utf8/nkf.c static int noout_f = FALSE;
FALSE             428 ext/nkf/nkf-utf8/nkf.c static int debug_f = FALSE;
FALSE             432 ext/nkf/nkf-utf8/nkf.c static int guess_f = FALSE;
FALSE             435 ext/nkf/nkf-utf8/nkf.c static int is_inputcode_mixed = FALSE;
FALSE             436 ext/nkf/nkf-utf8/nkf.c static int is_inputcode_set   = FALSE;
FALSE             455 ext/nkf/nkf-utf8/nkf.c STATIC int x0212_f = FALSE;
FALSE             487 ext/nkf/nkf-utf8/nkf.c static int             fold_preserve_f = FALSE; /* preserve new lines */
FALSE             488 ext/nkf/nkf-utf8/nkf.c static int             fold_f  = FALSE;
FALSE             554 ext/nkf/nkf-utf8/nkf.c            shift_mode =  FALSE;    /* TRUE shift out, or X0201  */
FALSE             555 ext/nkf/nkf-utf8/nkf.c static int mime_decode_mode =   FALSE;    /* MIME mode B base64, Q hex */
FALSE             649 ext/nkf/nkf-utf8/nkf.c static int             file_out = FALSE;
FALSE             651 ext/nkf/nkf-utf8/nkf.c static int             overwrite = FALSE;
FALSE             746 ext/nkf/nkf-utf8/nkf.c 	    is_inputcode_mixed = FALSE;
FALSE             747 ext/nkf/nkf-utf8/nkf.c 	    is_inputcode_set   = FALSE;
FALSE             887 ext/nkf/nkf-utf8/nkf.c     if (file_out == FALSE)
FALSE            1044 ext/nkf/nkf-utf8/nkf.c                     cp932_f = FALSE;
FALSE            1045 ext/nkf/nkf-utf8/nkf.c                     cp932inv_f = FALSE;
FALSE            1048 ext/nkf/nkf-utf8/nkf.c                     ms_ucs_map_f = FALSE;
FALSE            1093 ext/nkf/nkf-utf8/nkf.c             unbuf_f = FALSE;
FALSE            1138 ext/nkf/nkf-utf8/nkf.c             binmode_f = FALSE;
FALSE            1220 ext/nkf/nkf-utf8/nkf.c             x0201_f = FALSE;    /* No X0201->X0208 conversion */
FALSE            1266 ext/nkf/nkf-utf8/nkf.c                 mime_decode_f = FALSE;
FALSE            1267 ext/nkf/nkf-utf8/nkf.c                 mime_f = FALSE; cp++;
FALSE            1464 ext/nkf/nkf-utf8/nkf.c     if (iconv == ptr->iconv_func) set_iconv(FALSE, 0);
FALSE            1877 ext/nkf/nkf-utf8/nkf.c         set_iconv(FALSE, e_iconv);
FALSE            1898 ext/nkf/nkf-utf8/nkf.c     int is_8bit = FALSE;
FALSE            1906 ext/nkf/nkf-utf8/nkf.c     shift_mode = FALSE;
FALSE            2054 ext/nkf/nkf-utf8/nkf.c                 shift_mode = FALSE;
FALSE            2072 ext/nkf/nkf-utf8/nkf.c                         shift_mode = FALSE;
FALSE            2087 ext/nkf/nkf-utf8/nkf.c                             shift_mode = FALSE;
FALSE            2092 ext/nkf/nkf-utf8/nkf.c                             shift_mode = FALSE;
FALSE            2106 ext/nkf/nkf-utf8/nkf.c                         shift_mode = FALSE;
FALSE            2127 ext/nkf/nkf-utf8/nkf.c                             input_mode = ASCII; shift_mode = FALSE;
FALSE            2130 ext/nkf/nkf-utf8/nkf.c                             input_mode = ASCII; shift_mode = FALSE;
FALSE            2158 ext/nkf/nkf-utf8/nkf.c                 input_mode = ASCII; set_iconv(FALSE, 0);
FALSE            2269 ext/nkf/nkf-utf8/nkf.c         set_iconv(FALSE, result->iconv_func);
FALSE            2815 ext/nkf/nkf-utf8/nkf.c             set_iconv(FALSE, 0);
FALSE            2924 ext/nkf/nkf-utf8/nkf.c             set_iconv(FALSE, 0);
FALSE            3562 ext/nkf/nkf-utf8/nkf.c     mime_decode_mode = FALSE;
FALSE            3588 ext/nkf/nkf-utf8/nkf.c     set_iconv(FALSE, mime_priority_func[j]);
FALSE            3664 ext/nkf/nkf-utf8/nkf.c                 mime_decode_mode = FALSE;
FALSE            3884 ext/nkf/nkf-utf8/nkf.c     if (mime_decode_mode==1 ||mime_decode_mode==FALSE) {
FALSE            3885 ext/nkf/nkf-utf8/nkf.c 	mime_decode_mode=FALSE;
FALSE            3893 ext/nkf/nkf-utf8/nkf.c         exit_mode = FALSE;
FALSE            3994 ext/nkf/nkf-utf8/nkf.c         mime_decode_mode = FALSE;
FALSE            4255 ext/nkf/nkf-utf8/nkf.c     mimeout_preserve_space = FALSE;
FALSE            4584 ext/nkf/nkf-utf8/nkf.c     unbuf_f = FALSE;
FALSE            4585 ext/nkf/nkf-utf8/nkf.c     estab_f = FALSE;
FALSE            4586 ext/nkf/nkf-utf8/nkf.c     nop_f = FALSE;
FALSE            4588 ext/nkf/nkf-utf8/nkf.c     rot_f = FALSE;
FALSE            4589 ext/nkf/nkf-utf8/nkf.c     hira_f = FALSE;
FALSE            4590 ext/nkf/nkf-utf8/nkf.c     input_f = FALSE;
FALSE            4591 ext/nkf/nkf-utf8/nkf.c     alpha_f = FALSE;
FALSE            4593 ext/nkf/nkf-utf8/nkf.c     mime_decode_f = FALSE;
FALSE            4594 ext/nkf/nkf-utf8/nkf.c     mimebuf_f = FALSE;
FALSE            4595 ext/nkf/nkf-utf8/nkf.c     broken_f = FALSE;
FALSE            4596 ext/nkf/nkf-utf8/nkf.c     iso8859_f = FALSE;
FALSE            4597 ext/nkf/nkf-utf8/nkf.c     mimeout_f = FALSE;
FALSE            4603 ext/nkf/nkf-utf8/nkf.c     iso2022jp_f = FALSE;
FALSE            4607 ext/nkf/nkf-utf8/nkf.c     ms_ucs_map_f = FALSE;
FALSE            4610 ext/nkf/nkf-utf8/nkf.c     cap_f = FALSE;
FALSE            4611 ext/nkf/nkf-utf8/nkf.c     url_f = FALSE;
FALSE            4612 ext/nkf/nkf-utf8/nkf.c     numchar_f = FALSE;
FALSE            4615 ext/nkf/nkf-utf8/nkf.c     noout_f = FALSE;
FALSE            4616 ext/nkf/nkf-utf8/nkf.c     debug_f = FALSE;
FALSE            4618 ext/nkf/nkf-utf8/nkf.c     guess_f = FALSE;
FALSE            4619 ext/nkf/nkf-utf8/nkf.c     is_inputcode_mixed = FALSE;
FALSE            4620 ext/nkf/nkf-utf8/nkf.c     is_inputcode_set   = FALSE;
FALSE            4642 ext/nkf/nkf-utf8/nkf.c     fold_preserve_f = FALSE;
FALSE            4643 ext/nkf/nkf-utf8/nkf.c     fold_f = FALSE;
FALSE            4669 ext/nkf/nkf-utf8/nkf.c     shift_mode =  FALSE;
FALSE            4670 ext/nkf/nkf-utf8/nkf.c     mime_decode_mode = FALSE;
FALSE            4671 ext/nkf/nkf-utf8/nkf.c     file_out = FALSE;
FALSE             240 ext/nkf/nkf.c    guess_f = FALSE;
FALSE            1199 ext/win32ole/win32ole.c     BOOL found = FALSE;
FALSE            3574 ext/win32ole/win32ole.c         guid = ole_wc2vstr(bstr, FALSE);
FALSE            5335 ext/win32ole/win32ole.c static BOOL g_IsEventSinkVtblInitialized = FALSE;
FALSE            5445 ext/win32ole/win32ole.c     *is_default = FALSE;
FALSE            5456 ext/win32ole/win32ole.c             *is_default = FALSE;
FALSE            5567 ext/win32ole/win32ole.c     BOOL is_default_handler = FALSE;
FALSE            5678 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             738 util.c             int sign, expSign = FALSE;
FALSE             753 util.c             int hasPoint = FALSE;	/* Decimal point exists. */
FALSE             754 util.c             int hasDigit = FALSE;	/* I or F exists. */
FALSE             777 util.c         	sign = FALSE;
FALSE             864 util.c         		expSign = FALSE;
FALSE             900 util.c         	    expSign = FALSE;
FALSE             920 util.c         	    expSign = FALSE;
FALSE              71 win32/win32.c  # define CreateSignal() CreateEvent(NULL, FALSE, FALSE, NULL);
FALSE             245 win32/win32.c  			 0, FALSE, DUPLICATE_SAME_ACCESS))
FALSE             596 win32/win32.c      writing = (mode & (O_WRONLY | O_RDWR)) ? TRUE : FALSE;
FALSE             597 win32/win32.c      reading = ((mode & O_RDWR) || !writing) ? TRUE : FALSE;
FALSE             624 win32/win32.c  				 FALSE, DUPLICATE_SAME_ACCESS)) {
FALSE             645 win32/win32.c  				 FALSE, DUPLICATE_SAME_ACCESS)) {
FALSE            1107 win32/win32.c      return FALSE;
FALSE            1663 win32/win32.c  		result = FALSE;
FALSE            2502 win32/win32.c  	ret = WaitForMultipleEvents(count + 1, events, FALSE, timeout, TRUE);
FALSE            2614 win32/win32.c  		OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, (DWORD)pid);
FALSE            2644 win32/win32.c  	    HANDLE hProc = OpenProcess(PROCESS_TERMINATE, FALSE, (DWORD)pid);
FALSE            3005 win32/win32.c      ret = WaitForMultipleEvents(count, events, FALSE, timeout, TRUE);
FALSE            3124 win32/win32.c      if (GetCurrentThreadId() == main_thread.id) return FALSE;
FALSE            3141 win32/win32.c  	    interrupt_done = CreateEvent(NULL, FALSE, FALSE, NULL);
FALSE            3268 win32/win32.c      BOOL interrupted = FALSE;
FALSE            3512 win32/win32.c  	if (CreateDirectory(path, NULL) == FALSE) {
FALSE            3534 win32/win32.c  	if (RemoveDirectory(path) == FALSE) {
FALSE            3554 win32/win32.c  	if (DeleteFile(path) == FALSE) {
FALSE              89 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             1594 win32/win32.c      fileflags = FDEV;
FDEV             3573 win32/win32.c      if (!(_osfile(fd) & FDEV)) {


FD_CLR

FD_CLR           10353 eval.c         		FD_CLR(i, src);
FD_CLR           10357 eval.c         		FD_CLR(i, dst);
FD_CLR           10373 eval.c         	    FD_CLR(i, src);
FD_CLR           10534 eval.c         		    FD_CLR(th->fd, &readfds);


FD_ISSET

FD_ISSET         10274 eval.c         	     (FD_ISSET(fd, &th->readfds) ||
FD_ISSET         10275 eval.c         	      FD_ISSET(fd, &th->writefds) ||
FD_ISSET         10276 eval.c         	      FD_ISSET(fd, &th->exceptfds)))) {
FD_ISSET         10320 eval.c         	if (FD_ISSET(i, src)) {
FD_ISSET         10335 eval.c         	if (FD_ISSET(i, src) && FD_ISSET(i, dst)) {
FD_ISSET         10350 eval.c         	if (FD_ISSET(i, dst)) {
FD_ISSET         10351 eval.c         	    if (FD_ISSET(i, src)) {
FD_ISSET         10372 eval.c         	if (FD_ISSET(i, src) && !FD_ISSET(i, dst)) {
FD_ISSET         10532 eval.c         		if ((th->wait_for&WAIT_FD) && FD_ISSET(th->fd, &readfds)) {
FD_ISSET          896 ext/socket/socket.c 	if (FD_ISSET(fd, &fds_w)) {
FD_ISSET          899 ext/socket/socket.c 	else if (FD_ISSET(fd, &fds_e)) {
FD_ISSET         4645 io.c           		if (FD_ISSET(fileno(fptr->f), rp)
FD_ISSET         4646 io.c           		    || FD_ISSET(fileno(fptr->f), &pset)) {
FD_ISSET         4656 io.c           		if (FD_ISSET(fileno(fptr->f), wp)) {
FD_ISSET         4659 io.c           		else if (fptr->f2 && FD_ISSET(fileno(fptr->f2), wp)) {
FD_ISSET         4669 io.c           		if (FD_ISSET(fileno(fptr->f), ep)) {
FD_ISSET         4672 io.c           		else if (fptr->f2 && FD_ISSET(fileno(fptr->f2), ep)) {
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 1669 ext/socket/socket.c #if defined(HAVE_SENDMSG) && (FD_PASSING_BY_MSG_CONTROL || FD_PASSING_BY_MSG_ACCRIGHTS)
FD_PASSING_BY_MSG_ACCRIGHTS 1730 ext/socket/socket.c #if defined(HAVE_RECVMSG) && (FD_PASSING_BY_MSG_CONTROL || FD_PASSING_BY_MSG_ACCRIGHTS)
FD_PASSING_BY_MSG_ACCRIGHTS 1749 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 1669 ext/socket/socket.c #if defined(HAVE_SENDMSG) && (FD_PASSING_BY_MSG_CONTROL || FD_PASSING_BY_MSG_ACCRIGHTS)
FD_PASSING_BY_MSG_CONTROL 1676 ext/socket/socket.c #if FD_PASSING_BY_MSG_CONTROL
FD_PASSING_BY_MSG_CONTROL 1707 ext/socket/socket.c #if FD_PASSING_BY_MSG_CONTROL
FD_PASSING_BY_MSG_CONTROL 1730 ext/socket/socket.c #if defined(HAVE_RECVMSG) && (FD_PASSING_BY_MSG_CONTROL || FD_PASSING_BY_MSG_ACCRIGHTS)
FD_PASSING_BY_MSG_CONTROL 1749 ext/socket/socket.c #if defined(HAVE_RECVMSG) && (FD_PASSING_BY_MSG_CONTROL || FD_PASSING_BY_MSG_ACCRIGHTS)
FD_PASSING_BY_MSG_CONTROL 1757 ext/socket/socket.c #if FD_PASSING_BY_MSG_CONTROL
FD_PASSING_BY_MSG_CONTROL 1782 ext/socket/socket.c #if FD_PASSING_BY_MSG_CONTROL
FD_PASSING_BY_MSG_CONTROL 1799 ext/socket/socket.c #if FD_PASSING_BY_MSG_CONTROL
FD_PASSING_BY_MSG_CONTROL 1828 ext/socket/socket.c #if FD_PASSING_BY_MSG_CONTROL


FD_SET

FD_SET           10322 eval.c         	    FD_SET(i, dst);
FD_SET           10434 eval.c         	    FD_SET(th->fd, &readfds);
FD_SET           10654 eval.c             FD_SET(fd, &curr_thread->writefds);
FD_SET            111 ext/io/wait/wait.c     FD_SET(fd, &rd);
FD_SET            891 ext/socket/socket.c 	FD_SET(fd, &fds_w);
FD_SET            892 ext/socket/socket.c 	FD_SET(fd, &fds_e);
FD_SET           1738 ext/socket/socket.c     FD_SET(fd, &fds);
FD_SET            368 io.c           	FD_SET(f, &rfds);
FD_SET            396 io.c           	FD_SET(f, &wfds);
FD_SET           4577 io.c           	    FD_SET(fileno(fptr->f), rp);
FD_SET           4580 io.c           		FD_SET(fileno(fptr->f), &pset);
FD_SET           4598 io.c           	    FD_SET(fileno(fptr->f), wp);
FD_SET           4601 io.c           		FD_SET(fileno(fptr->f2), wp);
FD_SET           4615 io.c           	    FD_SET(fileno(fptr->f), ep);
FD_SET           4618 io.c           		FD_SET(fileno(fptr->f2), ep);
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);


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              202 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              555 ext/dl/dl.c      FILE     *fp;
FILE              166 ext/dl/test/test.c FILE *
FILE              169 ext/dl/test/test.c   FILE *file;
FILE              175 ext/dl/test/test.c test_close(FILE *file)
FILE              181 ext/dl/test/test.c test_gets(char *s, int size, FILE *f)
FILE               60 ext/io/wait/wait.c     FILE *fp;
FILE               89 ext/io/wait/wait.c     FILE *fp;
FILE              289 ext/nkf/nkf-utf8/nkf.c STATIC  int     noconvert PROTO((FILE *f));
FILE              290 ext/nkf/nkf-utf8/nkf.c STATIC  int     kanji_convert PROTO((FILE *f));
FILE              291 ext/nkf/nkf-utf8/nkf.c STATIC  int     h_conv PROTO((FILE *f,int c2,int c1));
FILE              327 ext/nkf/nkf-utf8/nkf.c STATIC  int     std_getc PROTO((FILE *f));
FILE              328 ext/nkf/nkf-utf8/nkf.c STATIC  int     std_ungetc PROTO((int c,FILE *f));
FILE              330 ext/nkf/nkf-utf8/nkf.c STATIC  int     broken_getc PROTO((FILE *f));
FILE              331 ext/nkf/nkf-utf8/nkf.c STATIC  int     broken_ungetc PROTO((int c,FILE *f));
FILE              333 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_begin PROTO((FILE *f));
FILE              334 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_getc PROTO((FILE *f));
FILE              335 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_ungetc PROTO((int c,FILE *f));
FILE              337 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_begin_strict PROTO((FILE *f));
FILE              338 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_getc_buf PROTO((FILE *f));
FILE              339 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_ungetc_buf  PROTO((int c,FILE *f));
FILE              340 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_integrity PROTO((FILE *f,unsigned char *p));
FILE              407 ext/nkf/nkf-utf8/nkf.c static int (*i_cgetc)PROTO((FILE *)) = std_getc; /* input of cgetc */
FILE              408 ext/nkf/nkf-utf8/nkf.c static int (*i_cungetc)PROTO((int c ,FILE *f)) = std_ungetc;
FILE              409 ext/nkf/nkf-utf8/nkf.c STATIC int cap_getc PROTO((FILE *f));
FILE              410 ext/nkf/nkf-utf8/nkf.c STATIC int cap_ungetc PROTO((int c,FILE *f));
FILE              413 ext/nkf/nkf-utf8/nkf.c static int (*i_ugetc)PROTO((FILE *)) = std_getc; /* input of ugetc */
FILE              414 ext/nkf/nkf-utf8/nkf.c static int (*i_uungetc)PROTO((int c ,FILE *f)) = std_ungetc;
FILE              415 ext/nkf/nkf-utf8/nkf.c STATIC int url_getc PROTO((FILE *f));
FILE              416 ext/nkf/nkf-utf8/nkf.c STATIC int url_ungetc PROTO((int c,FILE *f));
FILE              419 ext/nkf/nkf-utf8/nkf.c static int (*i_ngetc)PROTO((FILE *)) = std_getc; /* input of ugetc */
FILE              420 ext/nkf/nkf-utf8/nkf.c static int (*i_nungetc)PROTO((int c ,FILE *f)) = std_ungetc;
FILE              421 ext/nkf/nkf-utf8/nkf.c STATIC int numchar_getc PROTO((FILE *f));
FILE              422 ext/nkf/nkf-utf8/nkf.c STATIC int numchar_ungetc PROTO((int c,FILE *f));
FILE              536 ext/nkf/nkf-utf8/nkf.c static  int    (*i_getc)PROTO((FILE *f)) = std_getc; /* general input */
FILE              537 ext/nkf/nkf-utf8/nkf.c static  int    (*i_ungetc)PROTO((int c,FILE *f)) =std_ungetc;
FILE              539 ext/nkf/nkf-utf8/nkf.c static  int    (*i_bgetc)PROTO((FILE *)) = std_getc; /* input of mgetc */
FILE              540 ext/nkf/nkf-utf8/nkf.c static  int    (*i_bungetc)PROTO((int c ,FILE *f)) = std_ungetc;
FILE              544 ext/nkf/nkf-utf8/nkf.c static  int    (*i_mgetc)PROTO((FILE *)) = std_getc; /* input of mgetc */
FILE              545 ext/nkf/nkf-utf8/nkf.c static  int    (*i_mungetc)PROTO((int c ,FILE *f)) = std_ungetc;
FILE              548 ext/nkf/nkf-utf8/nkf.c static  int    (*i_mgetc_buf)PROTO((FILE *)) = std_getc; /* input of mgetc_buf */
FILE              549 ext/nkf/nkf-utf8/nkf.c static  int    (*i_mungetc_buf)PROTO((int c,FILE *f)) = std_ungetc;
FILE              672 ext/nkf/nkf-utf8/nkf.c     FILE  *fin;
FILE             1751 ext/nkf/nkf-utf8/nkf.c FILE *f;
FILE             1763 ext/nkf/nkf-utf8/nkf.c FILE *f;
FILE             1784 ext/nkf/nkf-utf8/nkf.c     FILE  *f;
FILE             1894 ext/nkf/nkf-utf8/nkf.c     FILE  *f;
FILE             2230 ext/nkf/nkf-utf8/nkf.c     FILE  *f;
FILE             3033 ext/nkf/nkf-utf8/nkf.c FILE *f;
FILE             3074 ext/nkf/nkf-utf8/nkf.c FILE *f;
FILE             3555 ext/nkf/nkf-utf8/nkf.c FILE *f;
FILE             3605 ext/nkf/nkf-utf8/nkf.c FILE *f;
FILE             3615 ext/nkf/nkf-utf8/nkf.c FILE *f;
FILE             3627 ext/nkf/nkf-utf8/nkf.c FILE *f;
FILE             3744 ext/nkf/nkf-utf8/nkf.c int hex_getc(int ch, FILE *f, int (*g)(FILE *f), int (*u)(int c, FILE *f))
FILE             3749 ext/nkf/nkf-utf8/nkf.c      FILE *f;
FILE             3775 ext/nkf/nkf-utf8/nkf.c      FILE *f;
FILE             3783 ext/nkf/nkf-utf8/nkf.c      FILE *f;
FILE             3790 ext/nkf/nkf-utf8/nkf.c      FILE *f;
FILE             3798 ext/nkf/nkf-utf8/nkf.c      FILE *f;
FILE             3807 ext/nkf/nkf-utf8/nkf.c      FILE *f;
FILE             3863 ext/nkf/nkf-utf8/nkf.c      FILE *f;
FILE             3872 ext/nkf/nkf-utf8/nkf.c FILE *f;
FILE             4136 ext/nkf/nkf-utf8/nkf.c FILE  *f;
FILE             4144 ext/nkf/nkf-utf8/nkf.c FILE *f;
FILE               67 ext/openssl/ossl_pkey.c     FILE *fp;
FILE               62 ext/openssl/ossl_x509cert.c     FILE *fp;
FILE              488 ext/socket/socket.c     FILE *f;
FILE             1581 ext/socket/socket.c     FILE *f;
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             3066 file.c             FILE *f;
FILE             4142 file.c             FILE *f;
FILE              222 io.c           static void io_fflush _((FILE *, OpenFile *));
FILE              282 io.c               FILE *fp;
FILE              289 io.c               FILE *fp;
FILE              330 io.c               FILE *f;
FILE              412 io.c               FILE *f = GetWriteFile(fptr);
FILE              437 io.c               FILE *f = GetWriteFile(fptr);
FILE              512 io.c               FILE *f;
FILE              621 io.c               FILE *f;
FILE              901 io.c               FILE *f;
FILE             1019 io.c               FILE *f;
FILE             1096 io.c               FILE *f;
FILE             1377 io.c               FILE *f = fptr->f;
FILE             1481 io.c               FILE *f = fptr->f;
FILE             1859 io.c               FILE *f;
FILE             1904 io.c               FILE *f;
FILE             1932 io.c               FILE *f;
FILE             2337 io.c               FILE *f;
FILE             2658 io.c           FILE *
FILE             2663 io.c               FILE *file;
FILE             2685 io.c           FILE *
FILE             2690 io.c               FILE *file;
FILE             2886 io.c               FILE *f;
FILE             2911 io.c               FILE *fpr, *fpw;
FILE             3016 io.c           		FILE *f = rb_fdopen(pw[1], "w");
FILE             3400 io.c           	    FILE *f2 = fptr->f2;
FILE             3999 io.c               FILE *f;
FILE             4245 io.c           		FILE *fr = rb_fopen(fn, "r");
FILE             4250 io.c           		    FILE *fw;
FILE              221 missing/vsnprintf.c 	register FILE *fp;
FILE              309 missing/vsnprintf.c 	FILE *fp;
FILE              332 missing/vsnprintf.c 	register FILE *fp;
FILE              459 missing/vsnprintf.c 	FILE *fp;
FILE             1084 missing/vsnprintf.c 	FILE f;
FILE             1118 missing/vsnprintf.c 	FILE f;
FILE              847 ruby.c         	FILE *fp = fopen(fname, "r");
FILE               24 rubyio.h           FILE *f;			/* stdio ptr for read/write */
FILE               25 rubyio.h           FILE *f2;			/* additional ptr for rw pipes */
FILE               66 rubyio.h       FILE *rb_fopen _((const char*, const char*));
FILE               67 rubyio.h       FILE *rb_fdopen _((int, const char*));
FILE               68 rubyio.h       int rb_getc _((FILE*));
FILE               69 rubyio.h       long rb_io_fread _((char *, long, FILE *));
FILE               70 rubyio.h       long rb_io_fwrite _((const char *, long, FILE *));
FILE               85 rubyio.h       void rb_read_check _((FILE*));
FILE               86 rubyio.h       int rb_read_pending _((FILE*));
FILE              132 st.c               FILE *f = fopen("/tmp/col", "w");
FILE              580 win32/win32.c  pipe_exec(char *cmd, int mode, FILE **fpr, FILE **fpw)
FILE              686 win32/win32.c  	    if ((*fpr = (FILE *)fdopen(fd, modes)) == NULL) {
FILE              705 win32/win32.c  	    if ((*fpw = (FILE *)fdopen(fd, modes)) == NULL) {
FILE             3197 win32/win32.c  rb_w32_getc(FILE* stream)
FILE             3222 win32/win32.c  rb_w32_putc(int c, FILE* stream)
FILE             3386 win32/win32.c  rb_w32_fclose(FILE *fp)
FILE             3589 win32/win32.c      FILE *f;
FILE             3597 win32/win32.c  FILE *
FILE             3600 win32/win32.c      FILE *f = (errno = 0, fopen(path, mode));
FILE             3608 win32/win32.c  FILE *
FILE             3611 win32/win32.c      FILE *f = (errno = 0, _fdopen(handle, (char *)type));
FILE             3621 win32/win32.c  FILE *
FILE             3624 win32/win32.c      FILE *f = (errno = 0, _fsopen(path, mode, shflags));
FILE              162 win32/win32.h  extern rb_pid_t pipe_exec(char *, int, FILE **, FILE **);
FILE              220 win32/win32.h  extern FILE *rb_w32_fopen(const char *, const char *);
FILE              221 win32/win32.h  extern FILE *rb_w32_fdopen(int, const char *);
FILE              222 win32/win32.h  extern FILE *rb_w32_fsopen(const char *, const char *, int);
FILE              533 win32/win32.h  int  rb_w32_putc(int, FILE*);
FILE              534 win32/win32.h  int  rb_w32_getc(FILE*);
FILE              536 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        246 st.c               FIND_ENTRY(table, ptr, hash_val, bin_pos);
FIND_ENTRY        285 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(fileno(fptr->f))) return Qfalse;
FIONREAD_POSSIBLE_P  115 ext/io/wait/wait.c     if (!FIONREAD_POSSIBLE_P(fileno(fptr->f))) return Qfalse;


FIX2INT

FIX2INT            26 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           870 ext/gdbm/gdbm.c     optval = FIX2INT(val);
FIX2INT           401 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           361 ext/socket/socket.c 	i = FIX2INT(val);
FIX2INT          1689 ext/socket/socket.c         fd = FIX2INT(val);
FIX2INT          2858 ext/socket/socket.c 	hints.ai_family = FIX2INT(family);
FIX2INT          2984 ext/socket/socket.c 	    hints.ai_family = FIX2INT(af);
FIX2INT           230 ext/stringio/stringio.c 	    int flags = FIX2INT(mode);
FIX2INT          2020 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           445 ext/win32ole/win32ole.c     y = FIX2INT(rb_funcall(tmobj, rb_intern("year"), 0));
FIX2INT           446 ext/win32ole/win32ole.c     m = FIX2INT(rb_funcall(tmobj, rb_intern("month"), 0));
FIX2INT           447 ext/win32ole/win32ole.c     d = FIX2INT(rb_funcall(tmobj, rb_intern("mday"), 0));
FIX2INT           448 ext/win32ole/win32ole.c     hh = FIX2INT(rb_funcall(tmobj, rb_intern("hour"), 0));
FIX2INT           449 ext/win32ole/win32ole.c     mm = FIX2INT(rb_funcall(tmobj, rb_intern("min"), 0));
FIX2INT           450 ext/win32ole/win32ole.c     ss = FIX2INT(rb_funcall(tmobj, rb_intern("sec"), 0));
FIX2INT          1811 ext/win32ole/win32ole.c     UINT cp = FIX2INT(vcp);
FIX2INT          2223 ext/win32ole/win32ole.c         vt = (VARTYPE)FIX2INT(tp);
FIX2INT          4528 ext/win32ole/win32ole.c     if((FIX2INT(invkind) & INVOKE_PROPERTYGET) &&
FIX2INT          4529 ext/win32ole/win32ole.c        (FIX2INT(invkind) & INVOKE_PROPERTYPUT) ) {
FIX2INT          4531 ext/win32ole/win32ole.c     } else if(FIX2INT(invkind) & INVOKE_PROPERTYGET) {
FIX2INT          4533 ext/win32ole/win32ole.c     } else if(FIX2INT(invkind) & INVOKE_PROPERTYPUT) {
FIX2INT          4535 ext/win32ole/win32ole.c     } else if(FIX2INT(invkind) & INVOKE_PROPERTYPUTREF) {
FIX2INT          4537 ext/win32ole/win32ole.c     } else if(FIX2INT(invkind) & INVOKE_FUNC) {
FIX2INT          1019 ext/zlib/zlib.c     zstream_expand_buffer_into(z, FIX2INT(size));
FIX2INT          1111 ext/zlib/zlib.c     : ((void)Check_Type((val), T_FIXNUM), FIX2INT((val))))
FIX2INT          2479 ext/zlib/zlib.c 	gz->mtime = FIX2INT(mtime);
FIX2INT          2483 ext/zlib/zlib.c 	gz->mtime = FIXNUM_P(val) ? FIX2INT(val) : rb_big2ulong(val);
FIX2INT          1802 gc.c           	    args[2] = FIX2INT(RARRAY(final)->ptr[0]);
FIX2INT          3087 io.c           	mode = rb_io_modenum_mode(FIX2INT(pmode));
FIX2INT          3126 io.c           	    flags = FIX2INT(vmode);
FIX2INT          3195 io.c               else if (FIXNUM_P(vmode)) flags = FIX2INT(vmode);
FIX2INT           486 marshal.c      	w_long(FIX2INT(obj), arg);
FIX2INT           745 marshal.c      	if (FIXNUM_P(a1)) limit = FIX2INT(a1);
FIX2INT           810 marshal.c      	c = (unsigned char)FIX2INT(v);
FIX2INT          1635 numeric.c          return FIX2INT(val);
FIX2INT          1956 numeric.c      	return rb_big2str(rb_int2big(FIX2INT(x)), 2);
FIX2INT          2478 process.c      	    groups[i] = FIX2INT(g);
FIX2INT          2570 process.c          size_t  ngroups = FIX2INT(val);
FIX2INT          1200 re.c               if (!NIL_P(rest) || !FIXNUM_P(idx) || FIX2INT(idx) < 0) {
FIX2INT          1203 re.c               return rb_reg_nth_match(FIX2INT(idx), match);
FIX2INT          1689 re.c           	    if (FIXNUM_P(argv[1])) flags = FIX2INT(argv[1]);
FIX2INT           251 ruby.h         #define NUM2INT(x) (FIXNUM_P(x)?FIX2INT(x):rb_num2int((VALUE)x))
FIX2INT           241 signal.c       	sig = FIX2INT(argv[0]);
FIX2INT           295 signal.c       	    if (kill(FIX2INT(argv[i]), sig) < 0)
FIX2INT           562 signal.c       	sig = FIX2INT(arg->sig);
FIX2INT           840 string.c       	int i = FIX2INT(str2);
FIX2INT          1131 string.c       	  int c = FIX2INT(sub);
FIX2INT          1254 string.c       	  int c = FIX2INT(sub);
FIX2INT          1744 string.c       	    RSTRING(str)->ptr[idx] = FIX2INT(val) & 0xff;
FIX2INT          2454 string.c       	if (memchr(RSTRING(str)->ptr, FIX2INT(arg), RSTRING(str)->len))


FIX2LONG

FIX2LONG          676 array.c        	return rb_ary_entry(ary, FIX2LONG(arg));
FIX2LONG         1053 array.c        	offset = FIX2LONG(argv[0]);
FIX2LONG         1747 array.c        	    rb_ary_push(result, (*func)(obj, FIX2LONG(argv[i])));
FIX2LONG          199 bignum.c       	q = FIX2LONG(val);
FIX2LONG          273 bignum.c       	val = rb_int2big(FIX2LONG(val));
FIX2LONG          929 bignum.c       	y = rb_int2big(FIX2LONG(y));
FIX2LONG          973 bignum.c       	y = rb_int2big(FIX2LONG(y));
FIX2LONG         1170 bignum.c       	y = rb_int2big(FIX2LONG(y));
FIX2LONG         1196 bignum.c       	y = rb_int2big(FIX2LONG(y));
FIX2LONG         1225 bignum.c           if (FIXNUM_P(x)) x = rb_int2big(FIX2LONG(x));
FIX2LONG         1228 bignum.c       	y = rb_int2big(FIX2LONG(y));
FIX2LONG         1427 bignum.c       	y = rb_int2big(FIX2LONG(y));
FIX2LONG         1461 bignum.c       	y = rb_int2big(FIX2LONG(y));
FIX2LONG         1492 bignum.c       	y = rb_int2big(FIX2LONG(y));
FIX2LONG         1521 bignum.c       	y = rb_int2big(FIX2LONG(y));
FIX2LONG         1556 bignum.c       	dy = (double)FIX2LONG(y);
FIX2LONG         1605 bignum.c       	yy = FIX2LONG(y);
FIX2LONG         1648 bignum.c       	y = rb_int2big(FIX2LONG(y));
FIX2LONG         1704 bignum.c       	y = rb_int2big(FIX2LONG(y));
FIX2LONG         1762 bignum.c       	y = rb_int2big(FIX2LONG(y));
FIX2LONG         1971 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          731 ext/socket/socket.c 	snprintf(pbuf, len, "%ld", FIX2LONG(port));
FIX2LONG         2844 ext/socket/socket.c 	snprintf(pbuf, sizeof(pbuf), "%ld", FIX2LONG(port));
FIX2LONG          108 hash.c         	return (int)FIX2LONG(hval);
FIX2LONG         4064 io.c           	    flags = FIX2LONG(mode);
FIX2LONG         4728 io.c           	narg = FIX2LONG(arg);
FIX2LONG          490 marshal.c      	    w_long(FIX2LONG(obj), arg);
FIX2LONG          493 marshal.c      	    w_object(rb_int2big(FIX2LONG(obj)), arg, limit);
FIX2LONG          558 numeric.c      	return rb_float_new(RFLOAT(x)->value + (double)FIX2LONG(y));
FIX2LONG          582 numeric.c      	return rb_float_new(RFLOAT(x)->value - (double)FIX2LONG(y));
FIX2LONG          606 numeric.c      	return rb_float_new(RFLOAT(x)->value * (double)FIX2LONG(y));
FIX2LONG          633 numeric.c      	f_y = FIX2LONG(y);
FIX2LONG          692 numeric.c      	fy = (double)FIX2LONG(y);
FIX2LONG          723 numeric.c      	fy = (double)FIX2LONG(y);
FIX2LONG          754 numeric.c              return rb_float_new(pow(RFLOAT(x)->value, (double)FIX2LONG(y)));
FIX2LONG          829 numeric.c      	b = FIX2LONG(y);
FIX2LONG          900 numeric.c      	b = (double)FIX2LONG(y);
FIX2LONG          933 numeric.c      	b = (double)FIX2LONG(y);
FIX2LONG          969 numeric.c      	b = (double)FIX2LONG(y);
FIX2LONG         1004 numeric.c      	b = (double)FIX2LONG(y);
FIX2LONG         1040 numeric.c      	b = (double)FIX2LONG(y);
FIX2LONG         1453 numeric.c      	i = FIX2LONG(from);
FIX2LONG         1454 numeric.c      	end = FIX2LONG(to);
FIX2LONG         1455 numeric.c      	diff = FIX2LONG(step);
FIX2LONG         1512 numeric.c          if (FIXNUM_P(val)) return FIX2LONG(val);
FIX2LONG         1590 numeric.c          long num = FIXNUM_P(val)?FIX2LONG(val):rb_num2long(val);
FIX2LONG         1618 numeric.c          if (FIX2LONG(val) > 0) {
FIX2LONG         1663 numeric.c          if (FIXNUM_P(val)) return (LONG_LONG)FIX2LONG(val);
FIX2LONG         1770 numeric.c      	long i = FIX2LONG(num) + 1;
FIX2LONG         1892 numeric.c          return LONG2NUM(-FIX2LONG(num));
FIX2LONG         1902 numeric.c          long val = FIX2LONG(x);
FIX2LONG         1978 numeric.c      	a = FIX2LONG(x);
FIX2LONG         1979 numeric.c      	b = FIX2LONG(y);
FIX2LONG         1983 numeric.c      	if (FIX2LONG(r) != c) {
FIX2LONG         1989 numeric.c      	return rb_float_new((double)FIX2LONG(x) + RFLOAT(y)->value);
FIX2LONG         2011 numeric.c      	a = FIX2LONG(x);
FIX2LONG         2012 numeric.c      	b = FIX2LONG(y);
FIX2LONG         2016 numeric.c      	if (FIX2LONG(r) != c) {
FIX2LONG         2022 numeric.c      	return rb_float_new((double)FIX2LONG(x) - RFLOAT(y)->value);
FIX2LONG         2044 numeric.c      	a = FIX2LONG(x);
FIX2LONG         2047 numeric.c      	b = FIX2LONG(y);
FIX2LONG         2051 numeric.c      	if (FIX2LONG(r) != c || c/a != b) {
FIX2LONG         2057 numeric.c      	return rb_float_new((double)FIX2LONG(x) * RFLOAT(y)->value);
FIX2LONG         2108 numeric.c      	return rb_float_new((double)FIX2LONG(x) / (double)FIX2LONG(y));
FIX2LONG         2130 numeric.c      	fixdivmod(FIX2LONG(x), FIX2LONG(y), &div, 0);
FIX2LONG         2152 numeric.c      	fixdivmod(FIX2LONG(x), FIX2LONG(y), 0, &mod);
FIX2LONG         2171 numeric.c      	fixdivmod(FIX2LONG(x), FIX2LONG(y), &div, &mod);
FIX2LONG         2197 numeric.c      	b = FIX2LONG(y);
FIX2LONG         2200 numeric.c      	a = FIX2LONG(x);
FIX2LONG         2206 numeric.c              long a = FIX2LONG(x);
FIX2LONG         2228 numeric.c      	return (FIX2LONG(x) == FIX2LONG(y))?Qtrue:Qfalse;
FIX2LONG         2249 numeric.c      	long a = FIX2LONG(x), b = FIX2LONG(y);
FIX2LONG         2273 numeric.c      	long a = FIX2LONG(x), b = FIX2LONG(y);
FIX2LONG         2296 numeric.c      	long a = FIX2LONG(x), b = FIX2LONG(y);
FIX2LONG         2319 numeric.c      	long a = FIX2LONG(x), b = FIX2LONG(y);
FIX2LONG         2342 numeric.c      	long a = FIX2LONG(x), b = FIX2LONG(y);
FIX2LONG         2363 numeric.c          long val = FIX2LONG(num);
FIX2LONG         2385 numeric.c          val = FIX2LONG(x) & NUM2LONG(y);
FIX2LONG         2405 numeric.c          val = FIX2LONG(x) | NUM2LONG(y);
FIX2LONG         2425 numeric.c          val = FIX2LONG(x) ^ NUM2LONG(y);
FIX2LONG         2473 numeric.c          val = FIX2LONG(x);
FIX2LONG         2502 numeric.c          long val = FIX2LONG(fix);
FIX2LONG         2539 numeric.c          val = (double)FIX2LONG(num);
FIX2LONG         2559 numeric.c          long i = FIX2LONG(fix);
FIX2LONG         2656 numeric.c      	end = FIX2LONG(to);
FIX2LONG         2657 numeric.c      	for (i = FIX2LONG(from); i <= end; i++) {
FIX2LONG         2695 numeric.c      	end = FIX2LONG(to);
FIX2LONG         2696 numeric.c      	for (i=FIX2LONG(from); i >= end; i--) {
FIX2LONG         2735 numeric.c      	end = FIX2LONG(num);
FIX2LONG         2764 numeric.c          if (FIX2LONG(num) == 0) {
FIX2LONG         1670 object.c       	id = FIX2LONG(name);
FIX2LONG         2349 object.c       	return rb_float_new((double)FIX2LONG(val));
FIX2LONG          342 pack.c             if (FIXNUM_P(x)) return FIX2LONG(x);
FIX2LONG         9490 parse.c        	node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit));
FIX2LONG         5492 parse.y        	node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit));
FIX2LONG          472 random.c                       if (FIX2LONG((VALUE)limit) == -1)
FIX2LONG          474 random.c                       return LONG2NUM(limited_rand(FIX2LONG((VALUE)limit)));
FIX2LONG          485 random.c       	max = FIX2LONG(vmax);
FIX2LONG          317 range.c        	long end = FIX2LONG(e);
FIX2LONG          322 range.c        	for (i=FIX2LONG(b); i<end; i+=unit) {
FIX2LONG          406 range.c        	long lim = FIX2LONG(end);
FIX2LONG          410 range.c        	for (i=FIX2LONG(beg); i<lim; i++) {
FIX2LONG          247 ruby.h         #define NUM2LONG(x) (FIXNUM_P(x)?FIX2LONG(x):rb_num2long((VALUE)x))
FIX2LONG          261 ruby.h         #define FIX2INT(x) ((int)FIX2LONG(x))
FIX2LONG          268 ruby.h         # define NUM2LL(x) (FIXNUM_P(x)?FIX2LONG(x):rb_num2ll((VALUE)x))
FIX2LONG          505 sprintf.c      		    v = FIX2LONG(val);
FIX2LONG         1018 string.c       	    result = -FIX2LONG(tmp);
FIX2LONG         1520 string.c       	idx = FIX2LONG(indx);
FIX2LONG         1728 string.c       	idx = FIX2LONG(indx);
FIX2LONG          344 struct.c           n = FIX2LONG(size);
FIX2LONG          366 struct.c           n = FIX2LONG(size);
FIX2LONG          396 struct.c           size = FIX2LONG(sz);
FIX2LONG          179 time.c         	t.tv_sec = FIX2LONG(time);


FIX2UINT

FIX2UINT         2585 numeric.c          char *name = rb_id2name(FIX2UINT(fix));
FIX2UINT         2607 numeric.c          ID id = FIX2UINT(fix);


FIX2ULONG

FIX2ULONG        1617 numeric.c          num = FIX2ULONG(val);
FIX2ULONG         222 random.c               buf[0] = FIX2ULONG(seed) & 0xffffffff;
FIX2ULONG         224 random.c               buf[1] = FIX2ULONG(seed) >> 32;
FIX2ULONG         262 ruby.h         #define FIX2UINT(x) ((unsigned int)FIX2ULONG(x))


FIXABLE

FIXABLE           184 bignum.c           if (FIXABLE(n)) return LONG2FIX(n);
FIXABLE           231 bignum.c       	if (FIXABLE((LONG_LONG)q)) return LONG2FIX((LONG_LONG)q);
FIXABLE           593 bignum.c           if (FIXABLE(n)) return LONG2FIX(n);
FIXABLE          1228 numeric.c          if (!FIXABLE(f)) {
FIXABLE          1255 numeric.c          if (!FIXABLE(f)) {
FIXABLE          1289 numeric.c          if (!FIXABLE(f)) {
FIXABLE          1315 numeric.c          if (!FIXABLE(f)) {
FIXABLE          1648 numeric.c          if (!FIXABLE(v))


FIXED_MIME

FIXED_MIME       1260 ext/nkf/nkf-utf8/nkf.c                 mimebuf_f = FIXED_MIME;
FIXED_MIME       1273 ext/nkf/nkf-utf8/nkf.c                 mimeout_f = FIXED_MIME; cp++;
FIXED_MIME       1276 ext/nkf/nkf-utf8/nkf.c                 mimeout_f = FIXED_MIME; cp++;
FIXED_MIME       1856 ext/nkf/nkf-utf8/nkf.c     if (mime_f && mimebuf_f==FIXED_MIME) {
FIXED_MIME       3890 ext/nkf/nkf-utf8/nkf.c     if (mimebuf_f == FIXED_MIME)
FIXED_MIME       3905 ext/nkf/nkf-utf8/nkf.c         if (c1=='?'&&c2=='=' && mimebuf_f != FIXED_MIME) {
FIXED_MIME       4019 ext/nkf/nkf-utf8/nkf.c         if (mimebuf_f!=FIXED_MIME) input_mode = ASCII;
FIXED_MIME       4097 ext/nkf/nkf-utf8/nkf.c         if (mimebuf_f!=FIXED_MIME) input_mode = ASCII;
FIXED_MIME       4105 ext/nkf/nkf-utf8/nkf.c         if (mimebuf_f!=FIXED_MIME) input_mode = ASCII;
FIXED_MIME       4297 ext/nkf/nkf-utf8/nkf.c 	if (mimeout_f!=FIXED_MIME) {
FIXED_MIME       4386 ext/nkf/nkf-utf8/nkf.c     if (mimeout_f == FIXED_MIME){


FIXNUMARG

FIXNUMARG        1113 ext/zlib/zlib.c #define ARG_LEVEL(val)     FIXNUMARG((val), Z_DEFAULT_COMPRESSION)
FIXNUMARG        1114 ext/zlib/zlib.c #define ARG_WBITS(val)     FIXNUMARG((val), MAX_WBITS)
FIXNUMARG        1115 ext/zlib/zlib.c #define ARG_MEMLEVEL(val)  FIXNUMARG((val), DEF_MEM_LEVEL)
FIXNUMARG        1116 ext/zlib/zlib.c #define ARG_STRATEGY(val)  FIXNUMARG((val), Z_DEFAULT_STRATEGY)
FIXNUMARG        1117 ext/zlib/zlib.c #define ARG_FLUSH(val)     FIXNUMARG((val), Z_NO_FLUSH)
FIXNUMARG        1324 ext/zlib/zlib.c     flush = FIXNUMARG(v_flush, Z_SYNC_FLUSH);
FIXNUMARG        2749 ext/zlib/zlib.c     flush = FIXNUMARG(v_flush, Z_SYNC_FLUSH);


FIXNUM_FLAG

FIXNUM_FLAG       320 ext/win32ole/win32ole.c         pdisp = (Win32OLEIDispatch *)(data & ~FIXNUM_FLAG);
FIXNUM_FLAG       328 ext/win32ole/win32ole.c         st_insert(tbl, val, (VALUE)pdisp | FIXNUM_FLAG);
FIXNUM_FLAG      1896 gc.c               ptr = id ^ FIXNUM_FLAG;	/* unset FIXNUM_FLAG */
FIXNUM_FLAG       138 object.c           return (VALUE)((long)obj|FIXNUM_FLAG);
FIXNUM_FLAG       132 ruby.h         #define INT2FIX(i) ((VALUE)(((long)(i))<<1 | FIXNUM_FLAG))
FIXNUM_FLAG       159 ruby.h         #define FIXNUM_P(f) (((long)(f))&FIXNUM_FLAG)


FIXNUM_MAX

FIXNUM_MAX       2201 object.c       	if (RFLOAT(val)->value <= (double)FIXNUM_MAX
FIXNUM_MAX        160 ruby.h         #define POSFIXABLE(f) ((f) <= FIXNUM_MAX)


FIXNUM_MIN

FIXNUM_MIN       2202 object.c       	    && RFLOAT(val)->value >= (double)FIXNUM_MIN) {
FIXNUM_MIN        161 ruby.h         #define NEGFIXABLE(f) ((f) >= FIXNUM_MIN)


FIXNUM_P

FIXNUM_P          281 array.c            if (argc == 1 && !FIXNUM_P(size)) {
FIXNUM_P          675 array.c            if (FIXNUM_P(arg)) {
FIXNUM_P         1052 array.c            if (FIXNUM_P(argv[0])) {
FIXNUM_P         1585 array.c            if (FIXNUM_P(a) && FIXNUM_P(b)) {
FIXNUM_P         1746 array.c        	if (FIXNUM_P(argv[i])) {
FIXNUM_P         1964 array.c            if (!FIXNUM_P(arg1) && rb_range_beg_len(arg1, &pos, &len, RARRAY(ary)->len, 1)) {
FIXNUM_P          102 bignum.c           if (!FIXNUM_P(x)) {
FIXNUM_P          198 bignum.c           if (FIXNUM_P(val)) {
FIXNUM_P          272 bignum.c           if (FIXNUM_P(val)) {
FIXNUM_P          627 bignum.c           if (FIXNUM_P(x)) {
FIXNUM_P         1225 bignum.c           if (FIXNUM_P(x)) x = rb_int2big(FIX2LONG(x));
FIXNUM_P         1647 bignum.c           if (FIXNUM_P(y)) {
FIXNUM_P         1703 bignum.c           if (FIXNUM_P(y)) {
FIXNUM_P         1761 bignum.c           if (FIXNUM_P(y)) {
FIXNUM_P         1970 bignum.c           if (FIXNUM_P(y)) {
FIXNUM_P          862 class.c            if (FIXNUM_P(obj) || SYMBOL_P(obj)) {
FIXNUM_P           26 compar.c           if (FIXNUM_P(val)) return FIX2INT(val);
FIXNUM_P          266 error.c        		else if (FIXNUM_P(x)) {
FIXNUM_P          552 error.c            if (argc > 0 && FIXNUM_P(argv[0])) {
FIXNUM_P          891 error.c        	if (argc == 1 && FIXNUM_P(mesg)) {
FIXNUM_P          969 error.c            if (FIXNUM_P(num) ? num == e : rb_equal(num, e))
FIXNUM_P         3861 eval.c         	    if (FIXNUM_P(recv) || SYMBOL_P(recv)) {
FIXNUM_P         4001 eval.c         	    if (FIXNUM_P(result) || SYMBOL_P(result)) {
FIXNUM_P         6595 eval.c             if (FIXNUM_P(self) || SYMBOL_P(self)) {
FIXNUM_P          182 ext/Win32API/Win32API.c 	    } else if (FIXNUM_P(str)) {
FIXNUM_P          401 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          730 ext/socket/socket.c     else if (FIXNUM_P(port)) {
FIXNUM_P         1688 ext/socket/socket.c     else if (FIXNUM_P(val)) {
FIXNUM_P         2843 ext/socket/socket.c     else if (FIXNUM_P(port)) {
FIXNUM_P         2857 ext/socket/socket.c     else if (FIXNUM_P(family)) {
FIXNUM_P         2969 ext/socket/socket.c 	else if (FIXNUM_P(port)) {
FIXNUM_P         2983 ext/socket/socket.c 	else if (FIXNUM_P(af)) {
FIXNUM_P          229 ext/stringio/stringio.c 	if (FIXNUM_P(mode)) {
FIXNUM_P          155 ext/syslog/syslog.c     if (!FIXNUM_P(pri)) {
FIXNUM_P         2478 ext/zlib/zlib.c     if (FIXNUM_P(time)) {
FIXNUM_P         2483 ext/zlib/zlib.c 	gz->mtime = FIXNUM_P(val) ? FIX2INT(val) : rb_big2ulong(val);
FIXNUM_P         1891 gc.c               if (FIXNUM_P(ptr)) return (VALUE)ptr;
FIXNUM_P           63 hash.c             if (FIXNUM_P(a) && FIXNUM_P(b)) {
FIXNUM_P          105 hash.c         	if (!FIXNUM_P(hval)) {
FIXNUM_P         3086 io.c               else if (FIXNUM_P(pmode)) {
FIXNUM_P         3124 io.c               if (FIXNUM_P(vmode) || !NIL_P(perm)) {
FIXNUM_P         3125 io.c           	if (FIXNUM_P(vmode)) {
FIXNUM_P         3195 io.c               else if (FIXNUM_P(vmode)) flags = FIX2INT(vmode);
FIXNUM_P         4063 io.c           	if (FIXNUM_P(mode)) {
FIXNUM_P         4727 io.c               else if (FIXNUM_P(arg)) {
FIXNUM_P          483 marshal.c          else if (FIXNUM_P(obj)) {
FIXNUM_P          745 marshal.c      	if (FIXNUM_P(a1)) limit = FIX2INT(a1);
FIXNUM_P         1450 numeric.c          if (FIXNUM_P(from) && FIXNUM_P(to) && FIXNUM_P(step)) {
FIXNUM_P         1512 numeric.c          if (FIXNUM_P(val)) return FIX2LONG(val);
FIXNUM_P         1590 numeric.c          long num = FIXNUM_P(val)?FIX2LONG(val):rb_num2long(val);
FIXNUM_P         1614 numeric.c          if (!FIXNUM_P(val)) {
FIXNUM_P         1645 numeric.c          if (FIXNUM_P(val)) return val;
FIXNUM_P         1663 numeric.c          if (FIXNUM_P(val)) return (LONG_LONG)FIX2LONG(val);
FIXNUM_P         1769 numeric.c          if (FIXNUM_P(num)) {
FIXNUM_P         1974 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         2007 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         2040 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         2107 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         2127 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         2149 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         2168 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         2194 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         2227 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         2248 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         2272 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         2295 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         2318 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         2341 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         2507 numeric.c      	if (!FIXNUM_P(idx)) {
FIXNUM_P         2653 numeric.c          if (FIXNUM_P(from) && FIXNUM_P(to)) {
FIXNUM_P         2692 numeric.c          if (FIXNUM_P(from) && FIXNUM_P(to)) {
FIXNUM_P         2732 numeric.c          if (FIXNUM_P(num)) {
FIXNUM_P          342 pack.c             if (FIXNUM_P(x)) return FIX2LONG(x);
FIXNUM_P         4606 parse.c        			if (nd_type(yyvsp[-2].node) == NODE_LIT && FIXNUM_P(yyvsp[-2].node->nd_lit) &&
FIXNUM_P         4607 parse.c        			    nd_type(yyvsp[0].node) == NODE_LIT && FIXNUM_P(yyvsp[0].node->nd_lit)) {
FIXNUM_P         4621 parse.c        			if (nd_type(yyvsp[-2].node) == NODE_LIT && FIXNUM_P(yyvsp[-2].node->nd_lit) &&
FIXNUM_P         4622 parse.c        			    nd_type(yyvsp[0].node) == NODE_LIT && FIXNUM_P(yyvsp[0].node->nd_lit)) {
FIXNUM_P         9295 parse.c            if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) {
FIXNUM_P         1077 parse.y        			if (nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) &&
FIXNUM_P         1078 parse.y        			    nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) {
FIXNUM_P         1090 parse.y        			if (nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) &&
FIXNUM_P         1091 parse.y        			    nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) {
FIXNUM_P         5297 parse.y            if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) {
FIXNUM_P         2477 process.c      	if (FIXNUM_P(g)) {
FIXNUM_P          221 random.c           if (FIXNUM_P(seed)) {
FIXNUM_P          471 random.c                   if (FIXNUM_P((VALUE)limit)) {
FIXNUM_P           45 range.c            if (!FIXNUM_P(beg) || !FIXNUM_P(end)) {
FIXNUM_P          316 range.c            if (FIXNUM_P(b) && FIXNUM_P(e)) { /* fixnums are special */
FIXNUM_P          405 range.c            if (FIXNUM_P(beg) && FIXNUM_P(end)) { /* fixnums are special */
FIXNUM_P         1200 re.c               if (!NIL_P(rest) || !FIXNUM_P(idx) || FIX2INT(idx) < 0) {
FIXNUM_P         1689 re.c           	    if (FIXNUM_P(argv[1])) flags = FIX2INT(argv[1]);
FIXNUM_P          247 ruby.h         #define NUM2LONG(x) (FIXNUM_P(x)?FIX2LONG(x):rb_num2long((VALUE)x))
FIXNUM_P          251 ruby.h         #define NUM2INT(x) (FIXNUM_P(x)?FIX2INT(x):rb_num2int((VALUE)x))
FIXNUM_P          268 ruby.h         # define NUM2LL(x) (FIXNUM_P(x)?FIX2LONG(x):rb_num2ll((VALUE)x))
FIXNUM_P          639 ruby.h             if (FIXNUM_P(obj)) return rb_cFixnum;
FIXNUM_P          656 ruby.h             if (FIXNUM_P(obj)) return T_FIXNUM;
FIXNUM_P          495 sprintf.c      		    if (FIXNUM_P(val)) goto bin_retry;
FIXNUM_P          839 string.c           if (FIXNUM_P(str2)) {
FIXNUM_P         1015 string.c       	    if (!FIXNUM_P(tmp)) {
FIXNUM_P         1738 string.c       	if (FIXNUM_P(val)) {
FIXNUM_P         2453 string.c           if (FIXNUM_P(arg)) {


FLAG_MATCHED

FLAG_MATCHED       51 ext/strscan/strscan.c #define MATCHED_P(s)          ((s)->flags & FLAG_MATCHED)
FLAG_MATCHED       52 ext/strscan/strscan.c #define MATCHED(s)             (s)->flags |= FLAG_MATCHED
FLAG_MATCHED       53 ext/strscan/strscan.c #define CLEAR_MATCH_STATUS(s)  (s)->flags &= ~FLAG_MATCHED


FLOAT_ALIGN

FLOAT_ALIGN       192 ext/dl/dl.c          DLALIGN(0,size,FLOAT_ALIGN);
FLOAT_ALIGN       769 ext/dl/ptr.c   	  DLALIGN(data->ptr,offset,FLOAT_ALIGN);
FLOAT_ALIGN       902 ext/dl/ptr.c   	  DLALIGN(data->ptr,offset,FLOAT_ALIGN);


FLOAT_CONVWITH

FLOAT_CONVWITH    783 pack.c         		FLOAT_CONVWITH(ftmp);
FLOAT_CONVWITH    818 pack.c         		FLOAT_CONVWITH(ftmp);
FLOAT_CONVWITH   1652 pack.c         		FLOAT_CONVWITH(ftmp);
FLOAT_CONVWITH   1692 pack.c         		FLOAT_CONVWITH(ftmp;)


FLT_RADIX

FLT_RADIX          32 numeric.c      #ifndef FLT_RADIX
FLT_RADIX        2890 numeric.c          rb_define_const(rb_cFloat, "RADIX", INT2FIX(FLT_RADIX));


FLT_ROUNDS

FLT_ROUNDS         35 numeric.c      #ifndef FLT_ROUNDS
FLT_ROUNDS       2889 numeric.c          rb_define_const(rb_cFloat, "ROUNDS", INT2FIX(FLT_ROUNDS));


FLUSH

FLUSH             992 missing/vsnprintf.c 		FLUSH();	/* copy out the I/O vectors */
FLUSH             995 missing/vsnprintf.c 	FLUSH();


FLUSH_REGISTER_WINDOWS

FLUSH_REGISTER_WINDOWS  983 eval.c         #define EXEC_TAG()    (FLUSH_REGISTER_WINDOWS, ruby_setjmp(prot_tag->buf))
FLUSH_REGISTER_WINDOWS 10052 eval.c             FLUSH_REGISTER_WINDOWS;
FLUSH_REGISTER_WINDOWS 10142 eval.c              rb_thread_switch((FLUSH_REGISTER_WINDOWS, ruby_setjmp((th)->context))))
FLUSH_REGISTER_WINDOWS 10210 eval.c             FLUSH_REGISTER_WINDOWS;
FLUSH_REGISTER_WINDOWS 1349 gc.c               FLUSH_REGISTER_WINDOWS;


FL_ABLE

FL_ABLE           450 ruby.h         #define FL_TEST(x,f) (FL_ABLE(x)?(RBASIC(x)->flags&(f)):0)
FL_ABLE           451 ruby.h         #define FL_SET(x,f) do {if (FL_ABLE(x)) RBASIC(x)->flags |= (f);} while (0)
FL_ABLE           452 ruby.h         #define FL_UNSET(x,f) do {if (FL_ABLE(x)) RBASIC(x)->flags &= ~(f);} while (0)
FL_ABLE           453 ruby.h         #define FL_REVERSE(x,f) do {if (FL_ABLE(x)) RBASIC(x)->flags ^= (f);} while (0)
FL_ABLE           457 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         758 gc.c               if (FL_TEST(obj, FL_EXIVAR)) {
FL_EXIVAR        1149 gc.c               if (FL_TEST(obj, FL_EXIVAR)) {
FL_EXIVAR         210 object.c           RBASIC(dest)->flags &= ~(T_MASK|FL_EXIVAR);
FL_EXIVAR         211 object.c           RBASIC(dest)->flags |= RBASIC(obj)->flags & (T_MASK|FL_EXIVAR|FL_TAINT);
FL_EXIVAR         212 object.c           if (FL_TEST(obj, FL_EXIVAR)) {
FL_EXIVAR         299 ruby.h             if (FL_TEST(obj, FL_EXIVAR)) rb_copy_generic_ivar((VALUE)clone,(VALUE)obj);\
FL_EXIVAR         302 ruby.h             OBJSETUP(dup,rb_obj_class(obj),(RBASIC(obj)->flags)&(T_MASK|FL_EXIVAR|FL_TAINT));\
FL_EXIVAR         303 ruby.h             if (FL_TEST(obj, FL_EXIVAR)) rb_copy_generic_ivar((VALUE)dup,(VALUE)obj);\
FL_EXIVAR        1940 time.c             if (FL_TEST(time, FL_EXIVAR)) {
FL_EXIVAR        1942 time.c         	FL_SET(str, FL_EXIVAR);
FL_EXIVAR        2017 time.c             if (FL_TEST(str, FL_EXIVAR)) {
FL_EXIVAR        2019 time.c         	FL_SET(time, FL_EXIVAR);
FL_EXIVAR         842 variable.c         if (!FL_TEST(obj, FL_EXIVAR)) return 0;
FL_EXIVAR         886 variable.c     	FL_SET(obj, FL_EXIVAR);
FL_EXIVAR        1016 variable.c     	if (FL_TEST(obj, FL_EXIVAR) || rb_special_const_p(obj))
FL_EXIVAR        1078 variable.c     	if (FL_TEST(obj, FL_EXIVAR) || rb_special_const_p(obj))
FL_EXIVAR        1131 variable.c     	if (FL_TEST(obj, FL_EXIVAR) || rb_special_const_p(obj)) {
FL_EXIVAR        1188 variable.c     	if (FL_TEST(obj, FL_EXIVAR) || rb_special_const_p(obj)) {


FL_FINALIZE

FL_FINALIZE      1074 gc.c           		if (need_call_final && FL_TEST(p, FL_FINALIZE)) {
FL_FINALIZE      1694 gc.c               FL_SET(obj, FL_FINALIZE);
FL_FINALIZE      1742 gc.c               FL_SET(obj, FL_FINALIZE);
FL_FINALIZE      1765 gc.c               if (!FL_TEST(obj, FL_FINALIZE)) return;
FL_FINALIZE      1769 gc.c               RBASIC(dest)->flags |= FL_FINALIZE;
FL_FINALIZE      1835 gc.c           		if (FL_TEST(p, FL_FINALIZE)) {
FL_FINALIZE      1836 gc.c           		    FL_UNSET(p, FL_FINALIZE);
FL_FINALIZE       266 object.c           RBASIC(clone)->flags = (RBASIC(obj)->flags | FL_TEST(clone, FL_TAINT)) & ~(FL_FREEZE|FL_FINALIZE);


FL_FREEZE

FL_FREEZE         266 object.c           RBASIC(clone)->flags = (RBASIC(obj)->flags | FL_TEST(clone, FL_TAINT)) & ~(FL_FREEZE|FL_FINALIZE);
FL_FREEZE         268 object.c           RBASIC(clone)->flags |= RBASIC(obj)->flags & FL_FREEZE;
FL_FREEZE         459 ruby.h         #define OBJ_FROZEN(x) FL_TEST((x), FL_FREEZE)
FL_FREEZE         460 ruby.h         #define OBJ_FREEZE(x) FL_SET((x), FL_FREEZE)


FL_MARK

FL_MARK           572 gc.c           	    if ((p->as.basic.flags & FL_MARK) &&
FL_MARK           573 gc.c           		(p->as.basic.flags != FL_MARK)) {
FL_MARK           716 gc.c               if (obj->as.basic.flags & FL_MARK) return;  /* already marked */
FL_MARK           717 gc.c               obj->as.basic.flags |= FL_MARK;
FL_MARK           754 gc.c               if (obj->as.basic.flags & FL_MARK) return;  /* already marked */
FL_MARK           755 gc.c               obj->as.basic.flags |= FL_MARK;
FL_MARK          1048 gc.c           		if (!(p->as.basic.flags&FL_MARK) && BUILTIN_TYPE(p) == T_NODE)
FL_MARK          1070 gc.c           	    if (!(p->as.basic.flags & FL_MARK)) {
FL_MARK          1075 gc.c           		    p->as.free.flags = FL_MARK; /* remain marked */
FL_MARK          1086 gc.c           	    else if (RBASIC(p)->flags == FL_MARK) {
FL_MARK          1091 gc.c           		RBASIC(p)->flags &= ~FL_MARK;


FL_SET

FL_SET            471 array.c        	FL_SET(ary, ELTS_SHARED);
FL_SET            613 array.c            FL_SET(ary2, ELTS_SHARED);
FL_SET           1644 array.c        	FL_SET(ary, ARY_TMPLOCK);	/* prohibit modification during sort */
FL_SET           2167 array.c            FL_SET(copy, ELTS_SHARED);
FL_SET            133 class.c        	FL_SET(clone, FL_SINGLETON);
FL_SET            155 class.c            FL_SET(klass, FL_SINGLETON);
FL_SET            794 eval.c         	    FL_SET(_old, DVAR_DONT_RECYCLE); \
FL_SET           6340 eval.c         		FL_SET(vars, DVAR_DONT_RECYCLE);
FL_SET           8068 eval.c         	    FL_SET(vars, DVAR_DONT_RECYCLE);
FL_SET           8176 eval.c         	    FL_SET(vars, DVAR_DONT_RECYCLE);
FL_SET           8197 eval.c             FL_SET(data, (safe << PROC_TSHIFT) & PROC_TMASK);
FL_SET           8251 eval.c         	    FL_SET(vars, DVAR_DONT_RECYCLE);
FL_SET           11491 eval.c         	FL_SET(vars, DVAR_DONT_RECYCLE);
FL_SET           12454 eval.c         	FL_SET(vars, DVAR_DONT_RECYCLE);
FL_SET           1694 gc.c               FL_SET(obj, FL_FINALIZE);
FL_SET           1742 gc.c               FL_SET(obj, FL_FINALIZE);
FL_SET            177 hash.c         	FL_SET(arg->hash, HASH_DELETED);
FL_SET            295 hash.c         	FL_SET(hash, HASH_PROC_DEFAULT);
FL_SET            664 hash.c         	    FL_SET(hash, HASH_DELETED);
FL_SET            956 hash.c         	FL_SET(hash, HASH_PROC_DEFAULT);
FL_SET            169 re.c               FL_SET(re, KCODE_EUC);
FL_SET            170 re.c               FL_SET(re, KCODE_FIXED);
FL_SET            178 re.c               FL_SET(re, KCODE_SJIS);
FL_SET            179 re.c               FL_SET(re, KCODE_FIXED);
FL_SET            187 re.c               FL_SET(re, KCODE_UTF8);
FL_SET            188 re.c               FL_SET(re, KCODE_FIXED);
FL_SET            196 re.c               FL_SET(re, KCODE_FIXED);
FL_SET            812 re.c               FL_SET(match, MATCH_BUSY);
FL_SET            829 re.c           	FL_SET(re, REG_CASESTATE);
FL_SET           1343 re.c           	FL_SET(re, reg_kcode);
FL_SET           1364 re.c           	FL_SET(re, REG_CASESTATE);
FL_SET            294 ruby.h             if (rb_safe_level() >= 3) FL_SET(obj, FL_TAINT);\
FL_SET            456 ruby.h         #define OBJ_TAINT(x) FL_SET((x), FL_TAINT)
FL_SET            460 ruby.h         #define OBJ_FREEZE(x) FL_SET((x), FL_FREEZE)
FL_SET            148 string.c           FL_SET(str2, ELTS_SHARED);
FL_SET            170 string.c       	FL_SET(str2, ELTS_SHARED);
FL_SET            174 string.c       	FL_SET(str, ELTS_SHARED);
FL_SET            276 string.c       	FL_SET(str, RBASIC(str2)->flags & STR_NOCAPA);
FL_SET            525 string.c       	FL_SET(str, STR_ASSOC);
FL_SET            551 string.c       	FL_SET(s, ELTS_SHARED);
FL_SET            583 string.c       	FL_SET(str, ELTS_SHARED);
FL_SET            656 string.c           FL_SET(str, STR_TMPLOCK);
FL_SET           2258 string.c       	FL_SET(str, ELTS_SHARED);
FL_SET           2267 string.c       	    FL_SET(str, STR_ASSOC);
FL_SET           1942 time.c         	FL_SET(str, FL_EXIVAR);
FL_SET           2019 time.c         	FL_SET(time, FL_EXIVAR);
FL_SET            886 variable.c     	FL_SET(obj, FL_EXIVAR);


FL_SINGLETON

FL_SINGLETON       45 class.c            if (FL_TEST(super, FL_SINGLETON)) {
FL_SINGLETON       67 class.c            if (!FL_TEST(CLASS_OF(clone), FL_SINGLETON)) {
FL_SINGLETON       97 class.c            if (FL_TEST(orig, FL_SINGLETON)) {
FL_SINGLETON      109 class.c            if (!FL_TEST(klass, FL_SINGLETON))
FL_SINGLETON      133 class.c        	FL_SET(clone, FL_SINGLETON);
FL_SINGLETON      142 class.c            if (FL_TEST(klass, FL_SINGLETON)) {
FL_SINGLETON      155 class.c            FL_SET(klass, FL_SINGLETON);
FL_SINGLETON      158 class.c            if (BUILTIN_TYPE(obj) == T_CLASS && FL_TEST(obj, FL_SINGLETON)) {
FL_SINGLETON      196 class.c            if (RBASIC(super)->flags & FL_SINGLETON) {
FL_SINGLETON      510 class.c        	if (FL_TEST(p, FL_SINGLETON))
FL_SINGLETON      626 class.c        	if (FL_TEST(mod, FL_SINGLETON)) continue;
FL_SINGLETON      781 class.c            if (klass && FL_TEST(klass, FL_SINGLETON)) {
FL_SINGLETON      786 class.c        	while (klass && (FL_TEST(klass, FL_SINGLETON) || TYPE(klass) == T_ICLASS)) {
FL_SINGLETON      873 class.c            if (FL_TEST(RBASIC(obj)->klass, FL_SINGLETON) &&
FL_SINGLETON      963 error.c        	while (TYPE(klass) == T_ICLASS || FL_TEST(klass, FL_SINGLETON)) {
FL_SINGLETON      384 eval.c             if (!FL_TEST(klass, FL_SINGLETON) &&
FL_SINGLETON      389 eval.c             else if (FL_TEST(klass, FL_SINGLETON) && node && nd_type(node) == NODE_CFUNC &&
FL_SINGLETON      400 eval.c         	if (FL_TEST(klass, FL_SINGLETON)) {
FL_SINGLETON      537 eval.c             if (FL_TEST(klass, FL_SINGLETON)) {
FL_SINGLETON     1855 eval.c             while (cref && cref->nd_next && (NIL_P(cref->nd_clss) || FL_TEST(cref->nd_clss, FL_SINGLETON))) {
FL_SINGLETON     1938 eval.c         	if (FL_TEST(klass, FL_SINGLETON))
FL_SINGLETON     1976 eval.c         	if (FL_TEST(c, FL_SINGLETON)) {
FL_SINGLETON     1993 eval.c             if (FL_TEST(klass, FL_SINGLETON)) {
FL_SINGLETON     2082 eval.c             if (FL_TEST(klass, FL_SINGLETON)) {
FL_SINGLETON     2630 eval.c         	else if (FL_TEST(klass, FL_SINGLETON)) {
FL_SINGLETON     5139 eval.c         	if (RTEST(ruby_verbose) && FL_TEST(ruby_cbase, FL_SINGLETON)) {
FL_SINGLETON     8771 eval.c         	   (FL_TEST(rklass, FL_SINGLETON) || TYPE(rklass) == T_ICLASS)) {
FL_SINGLETON     9106 eval.c         	if (FL_TEST(data->rklass, FL_SINGLETON)) {
FL_SINGLETON     9227 eval.c             if (FL_TEST(data->klass, FL_SINGLETON)) {
FL_SINGLETON     1006 gc.c           	if (!FL_TEST(p, FL_SINGLETON)) { /* not freeing page */
FL_SINGLETON     1101 gc.c           		p->as.free.flags |= FL_SINGLETON; /* freeing page mark */
FL_SINGLETON     1547 gc.c           		    if (FL_TEST(p, FL_SINGLETON)) continue;
FL_SINGLETON     1580 gc.c           		    if (FL_TEST(p, FL_SINGLETON)) continue;
FL_SINGLETON      376 marshal.c          if (FL_TEST(klass, FL_SINGLETON)) {
FL_SINGLETON      533 marshal.c      	    if (FL_TEST(obj, FL_SINGLETON)) {
FL_SINGLETON     1045 marshal.c      	    if (FL_TEST(c, FL_SINGLETON)) {
FL_SINGLETON      160 object.c           while (FL_TEST(cl, FL_SINGLETON) || TYPE(cl) == T_ICLASS) {
FL_SINGLETON     1263 object.c           if (FL_TEST(klass, FL_SINGLETON)) {
FL_SINGLETON     1342 object.c           if (FL_TEST(mod, FL_SINGLETON)) {
FL_SINGLETON     1566 object.c           if (FL_TEST(klass, FL_SINGLETON)) {
FL_SINGLETON     1633 object.c           if (FL_TEST(klass, FL_SINGLETON)) {


FL_TAINT

FL_TAINT          884 class.c        	FL_UNSET(klass, FL_TAINT);
FL_TAINT         2043 hash.c         		FL_UNSET(RARRAY(keys)->ptr[i], FL_TAINT);
FL_TAINT          211 object.c           RBASIC(dest)->flags |= RBASIC(obj)->flags & (T_MASK|FL_EXIVAR|FL_TAINT);
FL_TAINT          266 object.c           RBASIC(clone)->flags = (RBASIC(obj)->flags | FL_TEST(clone, FL_TAINT)) & ~(FL_FREEZE|FL_FINALIZE);
FL_TAINT          705 object.c       	FL_UNSET(obj, FL_TAINT);
FL_TAINT          939 re.c           	    FL_UNSET(match, FL_TAINT);
FL_TAINT          826 ruby.c         	FL_UNSET(rb_argv, FL_TAINT);
FL_TAINT          827 ruby.c         	FL_UNSET(rb_load_path, FL_TAINT);
FL_TAINT          294 ruby.h             if (rb_safe_level() >= 3) FL_SET(obj, FL_TAINT);\
FL_TAINT          302 ruby.h             OBJSETUP(dup,rb_obj_class(obj),(RBASIC(obj)->flags)&(T_MASK|FL_EXIVAR|FL_TAINT));\
FL_TAINT          455 ruby.h         #define OBJ_TAINTED(x) FL_TEST((x), FL_TAINT)
FL_TAINT          456 ruby.h         #define OBJ_TAINT(x) FL_SET((x), FL_TAINT)
FL_TAINT          457 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         1302 variable.c         FL_UNSET(fn, FL_TAINT);


FL_TEST

FL_TEST            52 array.c            if (FL_TEST(ary, ARY_TMPLOCK))
FL_TEST            65 array.c            if (FL_TEST(ary, ELTS_SHARED)) {
FL_TEST            94 array.c            if (FL_TEST(ary, ARY_TMPLOCK)) return Qtrue;
FL_TEST           450 array.c            if (!FL_TEST(ary, ELTS_SHARED) &&
FL_TEST           463 array.c            if (!FL_TEST(ary, ELTS_SHARED)) {
FL_TEST          2162 array.c            if (RARRAY(copy)->ptr && !FL_TEST(copy, ELTS_SHARED))
FL_TEST            45 class.c            if (FL_TEST(super, FL_SINGLETON)) {
FL_TEST            67 class.c            if (!FL_TEST(CLASS_OF(clone), FL_SINGLETON)) {
FL_TEST            97 class.c            if (FL_TEST(orig, FL_SINGLETON)) {
FL_TEST           109 class.c            if (!FL_TEST(klass, FL_SINGLETON))
FL_TEST           142 class.c            if (FL_TEST(klass, FL_SINGLETON)) {
FL_TEST           158 class.c            if (BUILTIN_TYPE(obj) == T_CLASS && FL_TEST(obj, FL_SINGLETON)) {
FL_TEST           510 class.c        	if (FL_TEST(p, FL_SINGLETON))
FL_TEST           626 class.c        	if (FL_TEST(mod, FL_SINGLETON)) continue;
FL_TEST           781 class.c            if (klass && FL_TEST(klass, FL_SINGLETON)) {
FL_TEST           786 class.c        	while (klass && (FL_TEST(klass, FL_SINGLETON) || TYPE(klass) == T_ICLASS)) {
FL_TEST           873 class.c            if (FL_TEST(RBASIC(obj)->klass, FL_SINGLETON) &&
FL_TEST           963 error.c        	while (TYPE(klass) == T_ICLASS || FL_TEST(klass, FL_SINGLETON)) {
FL_TEST           384 eval.c             if (!FL_TEST(klass, FL_SINGLETON) &&
FL_TEST           389 eval.c             else if (FL_TEST(klass, FL_SINGLETON) && node && nd_type(node) == NODE_CFUNC &&
FL_TEST           400 eval.c         	if (FL_TEST(klass, FL_SINGLETON)) {
FL_TEST           537 eval.c             if (FL_TEST(klass, FL_SINGLETON)) {
FL_TEST          1855 eval.c             while (cref && cref->nd_next && (NIL_P(cref->nd_clss) || FL_TEST(cref->nd_clss, FL_SINGLETON))) {
FL_TEST          1938 eval.c         	if (FL_TEST(klass, FL_SINGLETON))
FL_TEST          1976 eval.c         	if (FL_TEST(c, FL_SINGLETON)) {
FL_TEST          1993 eval.c             if (FL_TEST(klass, FL_SINGLETON)) {
FL_TEST          2082 eval.c             if (FL_TEST(klass, FL_SINGLETON)) {
FL_TEST          2630 eval.c         	else if (FL_TEST(klass, FL_SINGLETON)) {
FL_TEST          4927 eval.c         	!FL_TEST(ruby_dyna_vars, DVAR_DONT_RECYCLE)) {
FL_TEST          5139 eval.c         	if (RTEST(ruby_verbose) && FL_TEST(ruby_cbase, FL_SINGLETON)) {
FL_TEST          8067 eval.c         	    if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
FL_TEST          8175 eval.c         	    if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
FL_TEST          8250 eval.c         	    if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
FL_TEST          8771 eval.c         	   (FL_TEST(rklass, FL_SINGLETON) || TYPE(rklass) == T_ICLASS)) {
FL_TEST          9106 eval.c         	if (FL_TEST(data->rklass, FL_SINGLETON)) {
FL_TEST          9227 eval.c             if (FL_TEST(data->klass, FL_SINGLETON)) {
FL_TEST          11490 eval.c         	if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
FL_TEST          12453 eval.c         	if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
FL_TEST           758 gc.c               if (FL_TEST(obj, FL_EXIVAR)) {
FL_TEST           914 gc.c           	if (FL_TEST(obj, ELTS_SHARED)) {
FL_TEST           935 gc.c           	if (FL_TEST(obj, ELTS_SHARED|STR_ASSOC)) {
FL_TEST          1006 gc.c           	if (!FL_TEST(p, FL_SINGLETON)) { /* not freeing page */
FL_TEST          1074 gc.c           		if (need_call_final && FL_TEST(p, FL_FINALIZE)) {
FL_TEST          1149 gc.c               if (FL_TEST(obj, FL_EXIVAR)) {
FL_TEST          1168 gc.c           	if (RANY(obj)->as.string.ptr && !FL_TEST(obj, ELTS_SHARED)) {
FL_TEST          1173 gc.c           	if (RANY(obj)->as.array.ptr && !FL_TEST(obj, ELTS_SHARED)) {
FL_TEST          1547 gc.c           		    if (FL_TEST(p, FL_SINGLETON)) continue;
FL_TEST          1580 gc.c           		    if (FL_TEST(p, FL_SINGLETON)) continue;
FL_TEST          1765 gc.c               if (!FL_TEST(obj, FL_FINALIZE)) return;
FL_TEST          1835 gc.c           		if (FL_TEST(p, FL_FINALIZE)) {
FL_TEST           193 hash.c         	if (FL_TEST(hash, HASH_DELETED)) {
FL_TEST           510 hash.c             if (FL_TEST(hash, HASH_PROC_DEFAULT)) {
FL_TEST           565 hash.c             if (FL_TEST(hash, HASH_PROC_DEFAULT)) {
FL_TEST           721 hash.c             else if (FL_TEST(hash, HASH_PROC_DEFAULT)) {
FL_TEST           955 hash.c             if (FL_TEST(hash2, HASH_PROC_DEFAULT)) {
FL_TEST          1464 hash.c         	      FL_TEST(hash1, HASH_PROC_DEFAULT) == FL_TEST(hash2, HASH_PROC_DEFAULT)))
FL_TEST           376 marshal.c          if (FL_TEST(klass, FL_SINGLETON)) {
FL_TEST           533 marshal.c      	    if (FL_TEST(obj, FL_SINGLETON)) {
FL_TEST           616 marshal.c      	    else if (FL_TEST(obj, FL_USER2)) {
FL_TEST          1045 marshal.c      	    if (FL_TEST(c, FL_SINGLETON)) {
FL_TEST           160 object.c           while (FL_TEST(cl, FL_SINGLETON) || TYPE(cl) == T_ICLASS) {
FL_TEST           212 object.c           if (FL_TEST(obj, FL_EXIVAR)) {
FL_TEST           266 object.c           RBASIC(clone)->flags = (RBASIC(obj)->flags | FL_TEST(clone, FL_TAINT)) & ~(FL_FREEZE|FL_FINALIZE);
FL_TEST          1263 object.c           if (FL_TEST(klass, FL_SINGLETON)) {
FL_TEST          1342 object.c           if (FL_TEST(mod, FL_SINGLETON)) {
FL_TEST          1566 object.c           if (FL_TEST(klass, FL_SINGLETON)) {
FL_TEST          1633 object.c           if (FL_TEST(klass, FL_SINGLETON)) {
FL_TEST           205 re.c               if (!FL_TEST(re, KCODE_FIXED)) return;
FL_TEST           252 re.c               if (!FL_TEST(re, KCODE_FIXED))
FL_TEST           346 re.c           	if (FL_TEST(re, KCODE_FIXED)) {
FL_TEST           598 re.c               if (FL_TEST(re, KCODE_FIXED)) {
FL_TEST           826 re.c               state = FL_TEST(re, REG_CASESTATE);
FL_TEST           839 re.c               if (!FL_TEST(re, KCODE_FIXED) &&
FL_TEST           849 re.c           	if (FL_TEST(re, KCODE_FIXED))
FL_TEST           870 re.c               if (FL_TEST(re, KCODE_FIXED))
FL_TEST           904 re.c               if (FL_TEST(re, KCODE_FIXED))
FL_TEST           918 re.c               if (FL_TEST(re, KCODE_FIXED))
FL_TEST           932 re.c               if (NIL_P(match) || FL_TEST(match, MATCH_BUSY)) {
FL_TEST          1428 re.c               if (FL_TEST(re, KCODE_FIXED)) {
FL_TEST          1666 re.c           	if (FL_TEST(argv[0], KCODE_FIXED)) {
FL_TEST          1882 re.c               if (FL_TEST(re, KCODE_FIXED)) {
FL_TEST          1935 re.c                           if (FL_TEST(v, KCODE_FIXED)) {
FL_TEST           299 ruby.h             if (FL_TEST(obj, FL_EXIVAR)) rb_copy_generic_ivar((VALUE)clone,(VALUE)obj);\
FL_TEST           303 ruby.h             if (FL_TEST(obj, FL_EXIVAR)) rb_copy_generic_ivar((VALUE)dup,(VALUE)obj);\
FL_TEST           455 ruby.h         #define OBJ_TAINTED(x) FL_TEST((x), FL_TAINT)
FL_TEST           459 ruby.h         #define OBJ_FROZEN(x) FL_TEST((x), FL_FREEZE)
FL_TEST            36 string.c           if (!FL_TEST(str, STR_NOCAPA))\
FL_TEST           169 string.c           if (FL_TEST(str, ELTS_SHARED)) {
FL_TEST           189 string.c           if (FL_TEST(orig, ELTS_SHARED) && (str = RSTRING(orig)->aux.shared) && klass == RBASIC(str)->klass) {
FL_TEST           198 string.c           else if (FL_TEST(orig, STR_ASSOC)) {
FL_TEST           264 string.c           if (!FL_TEST(str, ELTS_SHARED)) free(RSTRING(str)->ptr);
FL_TEST           275 string.c           if (FL_TEST(str2, STR_NOCAPA)) {
FL_TEST           475 string.c           if (FL_TEST(str, STR_TMPLOCK)) {
FL_TEST           481 string.c           if (!FL_TEST(str, ELTS_SHARED)) return 1;
FL_TEST           513 string.c           if (FL_TEST(str, STR_ASSOC)) {
FL_TEST           518 string.c       	if (FL_TEST(str, ELTS_SHARED)) {
FL_TEST           533 string.c           if (FL_TEST(str, STR_ASSOC)) {
FL_TEST           612 string.c       	beg + len == RSTRING(str)->len && !FL_TEST(str, STR_ASSOC)) {
FL_TEST           636 string.c           if (FL_TEST(str, ELTS_SHARED) && RSTRING(str)->aux.shared) {
FL_TEST           653 string.c           if (FL_TEST(str, STR_TMPLOCK)) {
FL_TEST           664 string.c           if (!FL_TEST(str, STR_TMPLOCK)) {
FL_TEST           684 string.c       	    if (!FL_TEST(str, STR_NOCAPA)) {
FL_TEST           707 string.c           if (FL_TEST(str, STR_ASSOC)) {
FL_TEST           745 string.c           if (FL_TEST(str, STR_ASSOC)) {
FL_TEST           772 string.c           if (FL_TEST(str, STR_ASSOC)) {
FL_TEST           802 string.c       	if (FL_TEST(str, STR_ASSOC)) {
FL_TEST          2252 string.c           if (FL_TEST(str2, ELTS_SHARED)) {
FL_TEST          2266 string.c       	if (FL_TEST(str2, STR_ASSOC)) {
FL_TEST          1940 time.c             if (FL_TEST(time, FL_EXIVAR)) {
FL_TEST          2017 time.c             if (FL_TEST(str, FL_EXIVAR)) {
FL_TEST           842 variable.c         if (!FL_TEST(obj, FL_EXIVAR)) return 0;
FL_TEST          1016 variable.c     	if (FL_TEST(obj, FL_EXIVAR) || rb_special_const_p(obj))
FL_TEST          1078 variable.c     	if (FL_TEST(obj, FL_EXIVAR) || rb_special_const_p(obj))
FL_TEST          1131 variable.c     	if (FL_TEST(obj, FL_EXIVAR) || rb_special_const_p(obj)) {
FL_TEST          1188 variable.c     	if (FL_TEST(obj, FL_EXIVAR) || rb_special_const_p(obj)) {


FL_UNSET

FL_UNSET           67 array.c        	FL_UNSET(ary, ELTS_SHARED);
FL_UNSET         1618 array.c            FL_UNSET(ary, ARY_TMPLOCK);
FL_UNSET          884 class.c        	FL_UNSET(klass, FL_TAINT);
FL_UNSET         1836 gc.c           		    FL_UNSET(p, FL_FINALIZE);
FL_UNSET          195 hash.c         	    FL_UNSET(hash, HASH_DELETED);
FL_UNSET          542 hash.c             FL_UNSET(hash, HASH_PROC_DEFAULT);
FL_UNSET          959 hash.c         	FL_UNSET(hash, HASH_PROC_DEFAULT);
FL_UNSET         2043 hash.c         		FL_UNSET(RARRAY(keys)->ptr[i], FL_TAINT);
FL_UNSET          705 object.c       	FL_UNSET(obj, FL_TAINT);
FL_UNSET          168 re.c               FL_UNSET(re, KCODE_MASK);
FL_UNSET          177 re.c               FL_UNSET(re, KCODE_MASK);
FL_UNSET          186 re.c               FL_UNSET(re, KCODE_MASK);
FL_UNSET          195 re.c               FL_UNSET(re, KCODE_MASK);
FL_UNSET          834 re.c           	FL_UNSET(re, REG_CASESTATE);
FL_UNSET          939 re.c           	    FL_UNSET(match, FL_TAINT);
FL_UNSET          826 ruby.c         	FL_UNSET(rb_argv, FL_TAINT);
FL_UNSET          827 ruby.c         	FL_UNSET(rb_load_path, FL_TAINT);
FL_UNSET          269 string.c       	FL_UNSET(str, STR_NOCAPA);
FL_UNSET          274 string.c           FL_UNSET(str, STR_NOCAPA);
FL_UNSET          285 string.c           FL_UNSET(str2, STR_NOCAPA);
FL_UNSET          498 string.c           FL_UNSET(str, STR_NOCAPA);
FL_UNSET          667 string.c           FL_UNSET(str, STR_TMPLOCK);
FL_UNSET          708 string.c       	FL_UNSET(str, STR_ASSOC);
FL_UNSET          773 string.c       	FL_UNSET(str, STR_ASSOC);
FL_UNSET         2156 string.c       	FL_UNSET(str, STR_NOCAPA);
FL_UNSET         2259 string.c       	FL_UNSET(str, STR_ASSOC);
FL_UNSET         1302 variable.c         FL_UNSET(fn, FL_TAINT);


FL_USER0

FL_USER0          154 re.c           #define REG_CASESTATE  FL_USER0
FL_USER0          427 ruby.h         #define FL_SINGLETON FL_USER0


FL_USER1

FL_USER1           45 array.c        #define ARY_TMPLOCK  FL_USER1
FL_USER1         8186 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          799 eval.c         #define DVAR_DONT_RECYCLE FL_USER2
FL_USER2         8186 eval.c         #define PROC_TMASK  (FL_USER1|FL_USER2|FL_USER3)
FL_USER2           25 hash.c         #define HASH_PROC_DEFAULT FL_USER2
FL_USER2          616 marshal.c      	    else if (FL_TEST(obj, FL_USER2)) {
FL_USER2          157 re.c           #define KCODE_SJIS  FL_USER2
FL_USER2          806 re.c           #define MATCH_BUSY FL_USER2
FL_USER2          328 ruby.h         #define ELTS_SHARED FL_USER2


FL_USER3

FL_USER3         8186 eval.c         #define PROC_TMASK  (FL_USER1|FL_USER2|FL_USER3)
FL_USER3          934 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_USHIFT

FL_USHIFT        8185 eval.c         #define PROC_TSHIFT (FL_USHIFT+1)
FL_USHIFT         156 node.h         #define nd_type(n) ((int)(((RNODE(n))->flags>>FL_USHIFT)&0xff))
FL_USHIFT         158 node.h             RNODE(n)->flags=((RNODE(n)->flags&~FL_UMASK)|(((t)<<FL_USHIFT)&FL_UMASK))
FL_USHIFT         160 node.h         #define NODE_LSHIFT (FL_USHIFT+8)
FL_USHIFT         436 ruby.h         #define FL_USER0     (1<<(FL_USHIFT+0))
FL_USHIFT         437 ruby.h         #define FL_USER1     (1<<(FL_USHIFT+1))
FL_USHIFT         438 ruby.h         #define FL_USER2     (1<<(FL_USHIFT+2))
FL_USHIFT         439 ruby.h         #define FL_USER3     (1<<(FL_USHIFT+3))
FL_USHIFT         440 ruby.h         #define FL_USER4     (1<<(FL_USHIFT+4))
FL_USHIFT         441 ruby.h         #define FL_USER5     (1<<(FL_USHIFT+5))
FL_USHIFT         442 ruby.h         #define FL_USER6     (1<<(FL_USHIFT+6))
FL_USHIFT         443 ruby.h         #define FL_USER7     (1<<(FL_USHIFT+7))
FL_USHIFT         445 ruby.h         #define FL_UMASK  (0xff<<FL_USHIFT)


FMINUS

FMINUS            303 sprintf.c      	    flags |= FMINUS;
FMINUS            345 sprintf.c      		flags |= FMINUS;
FMINUS            391 sprintf.c      		if (!(flags & FMINUS))
FMINUS            420 sprintf.c      			if (!(flags&FMINUS)) {
FMINUS            427 sprintf.c      			if (flags&FMINUS) {
FMINUS            654 sprintf.c      		if (!(flags&FMINUS)) {
FMINUS            721 sprintf.c      		    if (flags & FMINUS) {
FMINUS            805 sprintf.c          if (flags & FMINUS) *buf++ = '-';


FMODE_APPEND

FMODE_APPEND     1008 ext/stringio/stringio.c     if (ptr->flags & FMODE_APPEND) {
FMODE_APPEND     1064 ext/stringio/stringio.c     if (ptr->flags & FMODE_APPEND) {
FMODE_APPEND     2476 io.c               if (flags & FMODE_APPEND) {
FMODE_APPEND     2512 io.c           	flags |= FMODE_WRITABLE | FMODE_APPEND | FMODE_CREATE;
FMODE_APPEND     2554 io.c           	flags |= FMODE_APPEND;


FMODE_BINMODE

FMODE_BINMODE    2462 io.c               fptr->mode |= FMODE_BINMODE;
FMODE_BINMODE    2472 io.c           # define MODE_BINMODE(a,b) ((flags & FMODE_BINMODE) ? (b) : (a))
FMODE_BINMODE    2522 io.c                       flags |= FMODE_BINMODE;
FMODE_BINMODE    2561 io.c           	flags |= FMODE_BINMODE;
FMODE_BINMODE    3440 io.c               if (fptr->mode & FMODE_BINMODE) {
FMODE_BINMODE    3580 io.c               if (fptr->mode & FMODE_BINMODE) {
FMODE_BINMODE    4216 io.c                   if (fptr->mode & FMODE_BINMODE)


FMODE_CREATE

FMODE_CREATE     2488 io.c           	if (flags & FMODE_CREATE) {
FMODE_CREATE     2509 io.c           	flags |= FMODE_WRITABLE | FMODE_CREATE;
FMODE_CREATE     2512 io.c           	flags |= FMODE_WRITABLE | FMODE_APPEND | FMODE_CREATE;
FMODE_CREATE     2557 io.c           	flags |= FMODE_CREATE;


FMODE_RBUF

FMODE_RBUF        255 io.c           	 (fptr->mode & (FMODE_SYNCWRITE|FMODE_RBUF)) == FMODE_SYNCWRITE) &&
FMODE_RBUF        261 io.c               fptr->mode |= FMODE_RBUF;
FMODE_RBUF        272 io.c               if ((fptr->mode & FMODE_RBUF) && !feof(fptr->f) && !fptr->f2) {
FMODE_RBUF        276 io.c           	fptr->mode &= ~FMODE_RBUF;
FMODE_RBUF       1991 io.c               if (!(fptr->mode & FMODE_RBUF))


FMODE_READABLE

FMODE_READABLE    276 ext/socket/socket.c     fptr->mode &= ~FMODE_READABLE;
FMODE_READABLE    291 ext/socket/socket.c     if (!(fptr->mode & FMODE_READABLE)) {
FMODE_READABLE    102 ext/stringio/stringio.c #define READABLE(ptr) ((ptr)->flags & FMODE_READABLE)
FMODE_READABLE    250 ext/stringio/stringio.c 	ptr->flags = OBJ_FROZEN(string) ? FMODE_READABLE : FMODE_READWRITE;
FMODE_READABLE    367 ext/stringio/stringio.c     ptr->flags = OBJ_FROZEN(string) ? FMODE_READABLE : FMODE_READWRITE;
FMODE_READABLE    407 ext/stringio/stringio.c     ptr->flags &= ~FMODE_READABLE;
FMODE_READABLE    250 io.c               if (!(fptr->mode & FMODE_READABLE)) {
FMODE_READABLE   2225 io.c               fptr->mode &= ~FMODE_READABLE;
FMODE_READABLE   2263 io.c               if (fptr->f2 == 0 && (fptr->mode & FMODE_READABLE)) {
FMODE_READABLE   2306 io.c               if ((fptr->mode & FMODE_READABLE) && READ_DATA_BUFFERED(fptr->f)) {
FMODE_READABLE   2483 io.c                 case FMODE_READABLE:
FMODE_READABLE   2506 io.c           	flags |= FMODE_READABLE;
FMODE_READABLE   2543 io.c           	flags = FMODE_READABLE;
FMODE_READABLE   2900 io.c           	if (modef & FMODE_READABLE) fptr->f  = f;
FMODE_READABLE   2932 io.c           	if (modef & FMODE_READABLE) {
FMODE_READABLE   2949 io.c               if (((modef & FMODE_READABLE) && pipe(pr) == -1) ||
FMODE_READABLE   2963 io.c           	if (modef & FMODE_READABLE) {
FMODE_READABLE   3011 io.c           	    if (modef & FMODE_READABLE) {
FMODE_READABLE   3340 io.c                 case FMODE_READABLE:
FMODE_READABLE   3367 io.c               if (orig->mode & FMODE_READABLE) {
FMODE_READABLE   3405 io.c           	    fptr->mode &= (m & FMODE_READABLE) ? ~FMODE_READABLE : ~FMODE_WRITABLE;
FMODE_READABLE   3418 io.c           	if ((orig->mode & FMODE_READABLE) && pos >= 0) {
FMODE_READABLE   3560 io.c                 case FMODE_READABLE:
FMODE_READABLE   4305 io.c           		current_file = prep_stdio(fr, FMODE_READABLE, rb_cFile);
FMODE_READABLE   5673 io.c               rb_stdin = prep_stdio(stdin, FMODE_READABLE, rb_cIO);


FMODE_READWRITE

FMODE_READWRITE   215 ext/socket/socket.c     fp->mode = FMODE_READWRITE;
FMODE_READWRITE   101 ext/stringio/stringio.c #define CLOSED(ptr) (!((ptr)->flags & FMODE_READWRITE))
FMODE_READWRITE   250 ext/stringio/stringio.c 	ptr->flags = OBJ_FROZEN(string) ? FMODE_READABLE : FMODE_READWRITE;
FMODE_READWRITE   254 ext/stringio/stringio.c 	ptr->flags = FMODE_READWRITE;
FMODE_READWRITE   267 ext/stringio/stringio.c     ptr->flags &= ~FMODE_READWRITE;
FMODE_READWRITE   365 ext/stringio/stringio.c     ptr->flags &= ~FMODE_READWRITE;
FMODE_READWRITE   367 ext/stringio/stringio.c     ptr->flags = OBJ_FROZEN(string) ? FMODE_READABLE : FMODE_READWRITE;
FMODE_READWRITE   388 ext/stringio/stringio.c     ptr->flags &= ~FMODE_READWRITE;
FMODE_READWRITE  2477 io.c           	if ((flags & FMODE_READWRITE) == FMODE_READWRITE) {
FMODE_READWRITE  2482 io.c               switch (flags & FMODE_READWRITE) {
FMODE_READWRITE  2487 io.c                 case FMODE_READWRITE:
FMODE_READWRITE  2525 io.c                       flags |= FMODE_READWRITE;
FMODE_READWRITE  2549 io.c           	flags = FMODE_READWRITE;
FMODE_READWRITE  3339 io.c               switch (fptr->mode & FMODE_READWRITE) {
FMODE_READWRITE  3345 io.c                 case FMODE_READWRITE:
FMODE_READWRITE  3559 io.c               switch (fptr->mode & FMODE_READWRITE) {
FMODE_READWRITE  3565 io.c                 case FMODE_READWRITE:


FMODE_SYNC

FMODE_SYNC        431 ext/pty/pty.c      wfptr->mode = rb_io_mode_flags("w") | FMODE_SYNC;
FMODE_SYNC         23 ext/stringio/stringio.c #define STRIO_EOF FMODE_SYNC
FMODE_SYNC        243 io.c           #define FMODE_SYNCWRITE (FMODE_SYNC|FMODE_WRITABLE)
FMODE_SYNC        441 io.c               if (fptr->mode & FMODE_SYNC) {
FMODE_SYNC        563 io.c               if (!(fptr->mode & FMODE_SYNC)) {
FMODE_SYNC        849 io.c               return (fptr->mode & FMODE_SYNC) ? Qtrue : Qfalse;
FMODE_SYNC        875 io.c           	fptr->mode |= FMODE_SYNC;
FMODE_SYNC        878 io.c           	fptr->mode &= ~FMODE_SYNC;
FMODE_SYNC       2865 io.c               fptr->mode |= FMODE_SYNC;
FMODE_SYNC       2929 io.c           	fptr->mode |= FMODE_SYNC;
FMODE_SYNC       3008 io.c           	    fptr->mode |= FMODE_SYNC;


FMODE_WBUF

FMODE_WBUF        228 io.c               if (fptr->mode & FMODE_WBUF) {
FMODE_WBUF        254 io.c               if (((fptr->mode & FMODE_WBUF) ||
FMODE_WBUF        346 io.c               fptr->mode &= ~FMODE_WBUF;
FMODE_WBUF        564 io.c           	fptr->mode |= FMODE_WBUF;
FMODE_WBUF       2048 io.c           	if ((f2 == -1) && (fptr->mode & FMODE_WBUF)) {
FMODE_WBUF       2309 io.c               if ((fptr->mode & FMODE_WRITABLE) && (fptr->mode & FMODE_WBUF)) {
FMODE_WBUF       2348 io.c               if (fptr->mode & FMODE_WBUF) {


FMODE_WRITABLE

FMODE_WRITABLE    273 ext/socket/socket.c     if (!(fptr->mode & FMODE_WRITABLE)) {
FMODE_WRITABLE    295 ext/socket/socket.c     fptr->mode &= ~FMODE_WRITABLE;
FMODE_WRITABLE    103 ext/stringio/stringio.c #define WRITABLE(ptr) ((ptr)->flags & FMODE_WRITABLE)
FMODE_WRITABLE    240 ext/stringio/stringio.c 	if ((ptr->flags & FMODE_WRITABLE) && OBJ_FROZEN(string)) {
FMODE_WRITABLE    426 ext/stringio/stringio.c     ptr->flags &= ~FMODE_WRITABLE;
FMODE_WRITABLE   3072 file.c             if (!(fptr->mode & FMODE_WRITABLE)) {
FMODE_WRITABLE   3180 file.c             if (fptr->mode & FMODE_WRITABLE) {
FMODE_WRITABLE    243 io.c           #define FMODE_SYNCWRITE (FMODE_SYNC|FMODE_WRITABLE)
FMODE_WRITABLE    269 io.c               if (!(fptr->mode & FMODE_WRITABLE)) {
FMODE_WRITABLE    518 io.c               of.mode = FMODE_WRITABLE;
FMODE_WRITABLE   2218 io.c               if (fptr->f2 == 0 && (fptr->mode & FMODE_WRITABLE)) {
FMODE_WRITABLE   2271 io.c               fptr->mode &= ~FMODE_WRITABLE;
FMODE_WRITABLE   2309 io.c               if ((fptr->mode & FMODE_WRITABLE) && (fptr->mode & FMODE_WBUF)) {
FMODE_WRITABLE   2485 io.c                 case FMODE_WRITABLE:
FMODE_WRITABLE   2509 io.c           	flags |= FMODE_WRITABLE | FMODE_CREATE;
FMODE_WRITABLE   2512 io.c           	flags |= FMODE_WRITABLE | FMODE_APPEND | FMODE_CREATE;
FMODE_WRITABLE   2546 io.c           	flags = FMODE_WRITABLE;
FMODE_WRITABLE   2901 io.c           	if (modef & FMODE_WRITABLE) {
FMODE_WRITABLE   2935 io.c           	if (modef & FMODE_WRITABLE) {
FMODE_WRITABLE   2950 io.c           	((modef & FMODE_WRITABLE) && pipe(pw) == -1))
FMODE_WRITABLE   2970 io.c           	if (modef & FMODE_WRITABLE) {
FMODE_WRITABLE   3015 io.c           	    if (modef & FMODE_WRITABLE) {
FMODE_WRITABLE   3343 io.c                 case FMODE_WRITABLE:
FMODE_WRITABLE   3373 io.c               else if (orig->mode & FMODE_WRITABLE) {
FMODE_WRITABLE   3376 io.c               if (fptr->mode & FMODE_WRITABLE) {
FMODE_WRITABLE   3405 io.c           	    fptr->mode &= (m & FMODE_READABLE) ? ~FMODE_READABLE : ~FMODE_WRITABLE;
FMODE_WRITABLE   3545 io.c               else if (orig->mode & FMODE_WRITABLE) {
FMODE_WRITABLE   3563 io.c                 case FMODE_WRITABLE:
FMODE_WRITABLE   4301 io.c           		    rb_stdout = prep_stdio(fw, FMODE_WRITABLE, rb_cFile);
FMODE_WRITABLE   5675 io.c               rb_stdout = prep_stdio(stdout, FMODE_WRITABLE, rb_cIO);
FMODE_WRITABLE   5677 io.c               rb_stderr = prep_stdio(stderr, FMODE_WRITABLE, rb_cIO);


FMODE_WSPLIT

FMODE_WSPLIT      423 io.c                       fptr->mode |= FMODE_WSPLIT;
FMODE_WSPLIT      427 io.c               return fptr->mode & FMODE_WSPLIT;
FMODE_WSPLIT     4778 io.c                   fptr->mode &= ~FMODE_WSPLIT;
FMODE_WSPLIT     4781 io.c                   fptr->mode &= ~(FMODE_WSPLIT_INITIALIZED|FMODE_WSPLIT);


FMODE_WSPLIT_INITIALIZED

FMODE_WSPLIT_INITIALIZED  414 io.c               if (!(fptr->mode & FMODE_WSPLIT_INITIALIZED)) {
FMODE_WSPLIT_INITIALIZED  425 io.c                   fptr->mode |= FMODE_WSPLIT_INITIALIZED;
FMODE_WSPLIT_INITIALIZED 4777 io.c                   fptr->mode |= FMODE_WSPLIT_INITIALIZED;
FMODE_WSPLIT_INITIALIZED 4781 io.c                   fptr->mode &= ~(FMODE_WSPLIT_INITIALIZED|FMODE_WSPLIT);


FNM_CASEFOLD

FNM_CASEFOLD      101 dir.c              int nocase = flags & FNM_CASEFOLD;
FNM_CASEFOLD      146 dir.c              int nocase = flags & FNM_CASEFOLD;
FNM_CASEFOLD     1100 dir.c              return glob_helper(path, 0, flags | FNM_CASEFOLD, func, arg);
FNM_CASEFOLD     1149 dir.c              int status = rb_glob2(path, FNM_CASEFOLD, func, arg);
FNM_CASEFOLD     1568 dir.c              rb_file_const("FNM_CASEFOLD", INT2FIX(FNM_CASEFOLD));


FNM_DOTMATCH

FNM_DOTMATCH      145 dir.c              int period = !(flags & FNM_DOTMATCH);
FNM_DOTMATCH      182 dir.c          		    !fnmatch(pat, s, flags | FNM_DOTMATCH))
FNM_DOTMATCH     1567 dir.c              rb_file_const("FNM_DOTMATCH", INT2FIX(FNM_DOTMATCH));


FNM_NOESCAPE

FNM_NOESCAPE      102 dir.c              int escape = !(flags & FNM_NOESCAPE);
FNM_NOESCAPE      143 dir.c              int escape = !(flags & FNM_NOESCAPE);
FNM_NOESCAPE      802 dir.c              int escape = !(flags & FNM_NOESCAPE);
FNM_NOESCAPE      926 dir.c          	    !(flags & FNM_NOESCAPE)
FNM_NOESCAPE     1242 dir.c              int noescape = flags & FNM_NOESCAPE;
FNM_NOESCAPE     1565 dir.c              rb_file_const("FNM_NOESCAPE", INT2FIX(FNM_NOESCAPE));


FNM_NOMATCH

FNM_NOMATCH       152 dir.c          		return FNM_NOMATCH;
FNM_NOMATCH       160 dir.c          		return FNM_NOMATCH;
FNM_NOMATCH       164 dir.c          		    return FNM_NOMATCH;
FNM_NOMATCH       174 dir.c          		return FNM_NOMATCH;
FNM_NOMATCH       188 dir.c          	    return FNM_NOMATCH;
FNM_NOMATCH       192 dir.c          		return FNM_NOMATCH;
FNM_NOMATCH       195 dir.c          		return FNM_NOMATCH;
FNM_NOMATCH       220 dir.c          		return FNM_NOMATCH;
FNM_NOMATCH       225 dir.c              return !*s ? 0 : FNM_NOMATCH;


FNM_PATHNAME

FNM_PATHNAME      144 dir.c              int pathname = flags & FNM_PATHNAME;
FNM_PATHNAME     1566 dir.c              rb_file_const("FNM_PATHNAME", INT2FIX(FNM_PATHNAME));


FNONE

FNONE             245 sprintf.c          int width, prec, flags = FNONE;
FNONE             380 sprintf.c      	    if (flags != FNONE) {
FNONE             779 sprintf.c      	flags = FNONE;


FOLD_MARGIN

FOLD_MARGIN       500 ext/nkf/nkf-utf8/nkf.c static int             fold_margin  = FOLD_MARGIN;
FOLD_MARGIN      4647 ext/nkf/nkf-utf8/nkf.c     fold_margin  = FOLD_MARGIN;


FOPEN

FOPEN            1619 win32/win32.c  	fileflags |= FOPEN;		/* mark as open */
FOPEN            3569 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     409 win32/win32.c      FOREACH_CHILD(child) {
FOREACH_CHILD     419 win32/win32.c      FOREACH_CHILD(child) {
FOREACH_CHILD     439 win32/win32.c      FOREACH_CHILD(child) {
FOREACH_CHILD    2491 win32/win32.c  	FOREACH_CHILD(child) {


FOREACH_THREAD

FOREACH_THREAD   10271 eval.c             FOREACH_THREAD(th) {
FOREACH_THREAD   10976 eval.c             FOREACH_THREAD(th) {
FOREACH_THREAD   11949 eval.c         	FOREACH_THREAD(th) {
FOREACH_THREAD   12357 eval.c             FOREACH_THREAD(th) {
FOREACH_THREAD   12566 eval.c             FOREACH_THREAD(th) {


FOREACH_THREAD_FROM

FOREACH_THREAD_FROM 9722 eval.c         #define FOREACH_THREAD(x) FOREACH_THREAD_FROM(curr_thread,x)
FOREACH_THREAD_FROM 9982 eval.c             FOREACH_THREAD_FROM(main_thread, th) {
FOREACH_THREAD_FROM 10422 eval.c             FOREACH_THREAD_FROM(curr, th) {
FOREACH_THREAD_FROM 10496 eval.c         	    FOREACH_THREAD_FROM(curr, th) {
FOREACH_THREAD_FROM 10513 eval.c          	    FOREACH_THREAD_FROM(curr, th) {
FOREACH_THREAD_FROM 10531 eval.c         	    FOREACH_THREAD_FROM(curr, th) {
FOREACH_THREAD_FROM 10562 eval.c             FOREACH_THREAD_FROM(curr, th) {
FOREACH_THREAD_FROM 10582 eval.c         	FOREACH_THREAD_FROM(curr, th) {
FOREACH_THREAD_FROM 11971 eval.c             FOREACH_THREAD_FROM(curr, th) {


FPLUS

FPLUS             298 sprintf.c      	    flags |= FPLUS;
FPLUS             470 sprintf.c      		    if (flags&(FPLUS|FSPACE)) sign = 1;
FPLUS             540 sprintf.c      			else if (flags & FPLUS) {
FPLUS             592 sprintf.c      		    else if (flags & FPLUS) {
FPLUS             714 sprintf.c      		    if ((!isnan(fval) && fval < 0.0) || (flags & FPLUS))
FPLUS             724 sprintf.c      			else if (flags & FPLUS)
FPLUS             735 sprintf.c      			else if (flags & FPLUS) {
FPLUS             751 sprintf.c      			else if (flags & FPLUS)
FPLUS             804 sprintf.c          if (flags & FPLUS)  *buf++ = '+';


FPREC

FPREC             352 sprintf.c      	    if (flags & FPREC) {
FPREC             355 sprintf.c      	    flags |= FPREC;
FPREC             362 sprintf.c      		    flags &= ~FPREC;
FPREC             411 sprintf.c      		if (flags&FPREC) {
FPREC             558 sprintf.c      			if (!(flags&(FPREC|FZERO))) {
FPREC             617 sprintf.c      			if (!(flags&(FPREC|FZERO))) {
FPREC             646 sprintf.c      		if ((flags&(FZERO|FPREC)) == FZERO) {
FPREC             768 sprintf.c      		need += (flags&FPREC) ? prec : 6;
FPREC             814 sprintf.c          if (flags & FPREC) {


FPT

FPT               716 missing/vsnprintf.c 			flags |= FPT;
FPT               939 missing/vsnprintf.c 		if ((flags & FPT) == 0) {


FRAME_ALLOCA

FRAME_ALLOCA      722 eval.c             _frame.flags = FRAME_ALLOCA;	\
FRAME_ALLOCA     8377 eval.c             _block.frame.flags = FRAME_ALLOCA;


FRAME_MALLOC

FRAME_MALLOC     8003 eval.c             if (frame->argc > 0 && (frame->flags & FRAME_MALLOC))
FRAME_MALLOC     8007 eval.c         	if (frame->argc > 0 && (frame->flags & FRAME_MALLOC))
FRAME_MALLOC     8041 eval.c         	    frame->flags |= FRAME_MALLOC;
FRAME_MALLOC     9900 eval.c             if (frame->flags & FRAME_MALLOC) {


FREE_AND_RETURN

FREE_AND_RETURN  1348 regex.c        	FREE_AND_RETURN(stackb, error_msg);
FREE_AND_RETURN  1430 regex.c        	FREE_AND_RETURN(stackb, "invalid regular expression; '[' can't be the last character ie. can't start range at the end of pattern");
FREE_AND_RETURN  1466 regex.c        	  FREE_AND_RETURN(stackb, "invalid regular expression; can't use character class as an end value of range");
FREE_AND_RETURN  1473 regex.c        	      FREE_AND_RETURN(stackb, "invalid regular expression; empty character class");
FREE_AND_RETURN  1485 regex.c        	  FREE_AND_RETURN(stackb, "invalid regular expression; can't use character class as a start value of range");
FREE_AND_RETURN  1609 regex.c        	    FREE_AND_RETURN(stackb, "invalid regular expression; re can't end '[[:'");
FREE_AND_RETURN  1641 regex.c        	      FREE_AND_RETURN(stackb, error_msg);
FREE_AND_RETURN  1648 regex.c        	      FREE_AND_RETURN(stackb, "invalid regular expression; range doesn't have ending ']' after a character class");
FREE_AND_RETURN  1786 regex.c        		FREE_AND_RETURN(stackb, "undefined (?...) inline option");
FREE_AND_RETURN  1812 regex.c        	    FREE_AND_RETURN(stackb, "undefined (?...) sequence");
FREE_AND_RETURN  1894 regex.c        	FREE_AND_RETURN(stackb, "unmatched )");
FREE_AND_RETURN  2012 regex.c        	FREE_AND_RETURN(stackb, error_msg);
FREE_AND_RETURN  2015 regex.c        	FREE_AND_RETURN(stackb, "invalid regular expression; '{' can't be last character" );
FREE_AND_RETURN  2033 regex.c        	FREE_AND_RETURN(stackb, "too big quantifier in {,}");
FREE_AND_RETURN  2036 regex.c        	FREE_AND_RETURN(stackb, "can't do {n,m} with n > m");
FREE_AND_RETURN  2196 regex.c        	FREE_AND_RETURN(stackb, "invalid regular expression; '\\' can't be last character");
FREE_AND_RETURN  2412 regex.c            FREE_AND_RETURN(stackb, "unmatched (");
FREE_AND_RETURN  2464 regex.c          FREE_AND_RETURN(stackb, 0);
FREE_AND_RETURN  2467 regex.c          FREE_AND_RETURN(stackb, "invalid regular expression");
FREE_AND_RETURN  2470 regex.c          FREE_AND_RETURN(stackb, "premature end of regular expression");
FREE_AND_RETURN  2473 regex.c          FREE_AND_RETURN(stackb, "regular expression too big");
FREE_AND_RETURN  2476 regex.c          FREE_AND_RETURN(stackb, "memory exhausted");
FREE_AND_RETURN  2479 regex.c          FREE_AND_RETURN(stackb, "nested *?+ in regexp");
FREE_AND_RETURN  2482 regex.c          FREE_AND_RETURN(stackb, "Invalid escape character syntax");
FREE_AND_RETURN  3712 regex.c              FREE_AND_RETURN(stackb, (d - pos - string));
FREE_AND_RETURN  3797 regex.c        	   FREE_AND_RETURN(stackb,(-2));
FREE_AND_RETURN  4380 regex.c          FREE_AND_RETURN(stackb,(-1)); 	/* Failure to match.  */


FREE_AND_RETURN_VOID

FREE_AND_RETURN_VOID 2938 regex.c        	  FREE_AND_RETURN_VOID(stackb);
FREE_AND_RETURN_VOID 3104 regex.c          FREE_AND_RETURN_VOID(stackb);


FREE_ARGS

FREE_ARGS         598 ext/dl/sym.c         FREE_ARGS;
FREE_ARGS         642 ext/dl/sym.c       FREE_ARGS;
FREE_ARGS         660 ext/dl/sym.c       FREE_ARGS;
FREE_ARGS         664 ext/dl/sym.c       FREE_ARGS;
FREE_ARGS         732 ext/dl/sym.c       FREE_ARGS;
FREE_ARGS         801 ext/dl/sym.c         FREE_ARGS;
FREE_ARGS         827 ext/dl/sym.c       FREE_ARGS;
FREE_ARGS         887 ext/dl/sym.c       FREE_ARGS;
FREE_ARGS         929 ext/dl/sym.c   	  FREE_ARGS;
FREE_ARGS         944 ext/dl/sym.c     FREE_ARGS;


FREE_ENVIRON

FREE_ENVIRON     1787 hash.c             FREE_ENVIRON(environ);
FREE_ENVIRON     1936 hash.c             FREE_ENVIRON(environ);
FREE_ENVIRON     1967 hash.c             FREE_ENVIRON(environ);
FREE_ENVIRON     2002 hash.c             FREE_ENVIRON(environ);
FREE_ENVIRON     2098 hash.c             FREE_ENVIRON(environ);
FREE_ENVIRON     2150 hash.c             FREE_ENVIRON(environ);
FREE_ENVIRON     2172 hash.c             FREE_ENVIRON(environ);
FREE_ENVIRON     2191 hash.c             FREE_ENVIRON(environ);
FREE_ENVIRON     2202 hash.c         	FREE_ENVIRON(environ);
FREE_ENVIRON     2205 hash.c             FREE_ENVIRON(environ);
FREE_ENVIRON     2235 hash.c         		FREE_ENVIRON(environ);
FREE_ENVIRON     2241 hash.c             FREE_ENVIRON(environ);
FREE_ENVIRON     2260 hash.c         		FREE_ENVIRON(environ);
FREE_ENVIRON     2266 hash.c             FREE_ENVIRON(environ);
FREE_ENVIRON     2309 hash.c             FREE_ENVIRON(environ);
FREE_ENVIRON     2334 hash.c             FREE_ENVIRON(environ);


FREE_MIN

FREE_MIN         1096 gc.c           	if (n == heaps[i].limit && freed > FREE_MIN) {
FREE_MIN         1114 gc.c               if (freed < FREE_MIN) {


FREE_VARIABLES

FREE_VARIABLES    111 regex.c          FREE_VARIABLES();							\
FREE_VARIABLES    117 regex.c          FREE_VARIABLES();							\


FSHARP

FSHARP            293 sprintf.c      	    flags |= FSHARP;
FSHARP            473 sprintf.c      		if (flags & FSHARP) {
FSHARP            803 sprintf.c          if (flags & FSHARP) *buf++ = '#';


FSPACE

FSPACE            288 sprintf.c      	    flags |= FSPACE;
FSPACE            470 sprintf.c      		    if (flags&(FPLUS|FSPACE)) sign = 1;
FSPACE            544 sprintf.c      			else if (flags & FSPACE) {
FSPACE            596 sprintf.c      		    else if (flags & FSPACE) {
FSPACE            726 sprintf.c      			else if (flags & FSPACE)
FSPACE            739 sprintf.c      			else if (flags & FSPACE) {
FSPACE            807 sprintf.c          if (flags & FSPACE) *buf++ = ' ';


FUNCNAME_PATTERN

FUNCNAME_PATTERN  101 dln.c          #ifndef FUNCNAME_PATTERN
FUNCNAME_PATTERN  126 dln.c              len = strlen(FUNCNAME_PATTERN) + strlen(slash + 1);
FUNCNAME_PATTERN  128 dln.c              snprintf(*buf, len, FUNCNAME_PATTERN, slash + 1);


FWIDTH

FWIDTH            334 sprintf.c      	    flags |= FWIDTH;
FWIDTH            338 sprintf.c      	    if (flags & FWIDTH) {
FWIDTH            342 sprintf.c      	    flags |= FWIDTH;
FWIDTH            416 sprintf.c      		if (flags&FWIDTH) {
FWIDTH            716 sprintf.c      		    if ((flags & FWIDTH) && need < width)
FWIDTH            769 sprintf.c      		if ((flags&FWIDTH) && need < width)
FWIDTH            809 sprintf.c          if (flags & FWIDTH) {


FZERO

FZERO             308 sprintf.c      	    flags |= FZERO;
FZERO             558 sprintf.c      			if (!(flags&(FPREC|FZERO))) {
FZERO             617 sprintf.c      			if (!(flags&(FPREC|FZERO))) {
FZERO             646 sprintf.c      		if ((flags&(FZERO|FPREC)) == FZERO) {
FZERO             730 sprintf.c      		    else if (flags & FZERO) {
FZERO             806 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           944 ext/socket/socket.c # if defined(F_GETFL)
F_GETFL           945 ext/socket/socket.c     mode = fcntl(fd, F_GETFL, 0);
F_GETFL           418 io.c           #if defined(HAVE_FCNTL) && defined(F_GETFL) && defined(O_NONBLOCK)
F_GETFL           419 io.c                       && (r = fcntl(fileno(f), F_GETFL)) != -1 &&
F_GETFL          4072 io.c           #if defined(HAVE_FCNTL) && defined(F_GETFL)
F_GETFL          4073 io.c           	flags = fcntl(fd, F_GETFL);
F_GETFL            32 missing/dup2.c #ifdef F_GETFL
F_GETFL            33 missing/dup2.c 		if (fcntl(fd1, F_GETFL) < 0)
F_GETFL            35 missing/dup2.c 		if (fcntl(fd2, F_GETFL) >= 0)


F_LOCK

F_LOCK             66 missing/flock.c # ifndef F_LOCK
F_LOCK            105 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_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           962 ext/socket/socket.c     fcntl(fd, F_SETFL, mode|NONBLOCKING);
F_SETFL          1036 ext/socket/socket.c 	fcntl(fd, F_SETFL, mode);
F_SETFL          4775 io.c               if (!io_p && cmd == F_SETFL) {
F_SETFL          2421 win32/win32.c      if (cmd != F_SETFL) {


F_TLOCK

F_TLOCK            69 missing/flock.c # ifndef F_TLOCK
F_TLOCK           113 missing/flock.c 	return lockf (fd, F_TLOCK, 0);


F_ULOCK

F_ULOCK            63 missing/flock.c # ifndef F_ULOCK
F_ULOCK           117 missing/flock.c 	return lockf (fd, F_ULOCK, 0);


Fifo

Fifo             3610 ext/nkf/nkf-utf8/nkf.c         (*i_mgetc_buf)(f):Fifo(mime_input++));
Fifo             3621 ext/nkf/nkf-utf8/nkf.c 	Fifo(--mime_input)=c;
Fifo             3637 ext/nkf/nkf-utf8/nkf.c     Fifo(mime_last++)='='; Fifo(mime_last++)='?';
Fifo             3640 ext/nkf/nkf-utf8/nkf.c         c1 = (*i_getc)(f); Fifo(mime_last++)= c1 ;
Fifo             3652 ext/nkf/nkf-utf8/nkf.c             c1 = (*i_getc)(f); Fifo(mime_last++) = c1;
Fifo             3661 ext/nkf/nkf-utf8/nkf.c             c1 = (*i_getc)(f); Fifo(mime_last++) = c1;
Fifo             3882 ext/nkf/nkf-utf8/nkf.c         return  Fifo(mime_top++);
Fifo             4119 ext/nkf/nkf-utf8/nkf.c         Fifo(mime_last++) = cc;
Fifo             4122 ext/nkf/nkf-utf8/nkf.c             Fifo(mime_last++) = cc;
Fifo             4125 ext/nkf/nkf-utf8/nkf.c                 Fifo(mime_last++) = cc;
Fifo             4130 ext/nkf/nkf-utf8/nkf.c     return  Fifo(mime_top++);
Fifo             4138 ext/nkf/nkf-utf8/nkf.c     Fifo(--mime_top) = c;
Fifo             4153 ext/nkf/nkf-utf8/nkf.c     while(*p) Fifo(mime_input++) = *p++;
Fifo             4162 ext/nkf/nkf-utf8/nkf.c             Fifo(mime_input++) = c;
Fifo             4171 ext/nkf/nkf-utf8/nkf.c         Fifo(mime_input++) = c;
Fifo             4175 ext/nkf/nkf-utf8/nkf.c     Fifo(mime_input++) = c;


FindFirstFile

FindFirstFile    1405 win32/win32.c      fh = FindFirstFile(scanname, &fd);
FindFirstFile    2891 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    1201 dln.c              FormatMessage(
FormatMessage     502 ext/win32ole/win32ole.c     dwCount = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
FormatMessage    1704 win32/win32.c  	if (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |


FormatMessageA

FormatMessageA   1161 dln.c          #define FormatMessage FormatMessageA
FormatMessageA     69 wince/wince.h  #define FormatMessage FormatMessageA


FreeEnvironmentStrings

FreeEnvironmentStrings 3358 win32/win32.c      FreeEnvironmentStrings(envtop);
FreeEnvironmentStrings  151 wince/wince.h  BOOL FreeEnvironmentStrings(LPSTR lpszEnvironmentBlock);


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          302 gc.c           #ifdef GC_DEBUG
GC_DEBUG          386 gc.c           #ifdef GC_DEBUG


GC_MALLOC_LIMIT

GC_MALLOC_LIMIT    79 gc.c           #ifndef GC_MALLOC_LIMIT
GC_MALLOC_LIMIT    88 gc.c           static unsigned long malloc_limit = GC_MALLOC_LIMIT;
GC_MALLOC_LIMIT  1111 gc.c           	if (malloc_limit < GC_MALLOC_LIMIT) malloc_limit = GC_MALLOC_LIMIT;


GETA1

GETA1            1974 ext/nkf/nkf-utf8/nkf.c                             (*oconv)(GETA1, GETA2);
GETA1            1987 ext/nkf/nkf-utf8/nkf.c 				(*oconv)(GETA1, GETA2);
GETA1            2013 ext/nkf/nkf-utf8/nkf.c 			    (*oconv)(GETA1, GETA2);
GETA1            3451 ext/nkf/nkf-utf8/nkf.c 	c2 = GETA1;
GETA1            3455 ext/nkf/nkf-utf8/nkf.c 	c2 = GETA1;
GETA1            3464 ext/nkf/nkf-utf8/nkf.c 	    c2 = GETA1;


GETA2

GETA2            1974 ext/nkf/nkf-utf8/nkf.c                             (*oconv)(GETA1, GETA2);
GETA2            1987 ext/nkf/nkf-utf8/nkf.c 				(*oconv)(GETA1, GETA2);
GETA2            2013 ext/nkf/nkf-utf8/nkf.c 			    (*oconv)(GETA1, GETA2);
GETA2            3452 ext/nkf/nkf-utf8/nkf.c 	c1 = GETA2;
GETA2            3456 ext/nkf/nkf-utf8/nkf.c 	c1 = GETA2;
GETA2            3465 ext/nkf/nkf-utf8/nkf.c 	    c1 = GETA2;


GETARG

GETARG            129 sprintf.c      	tmp = GETARG(); \
GETARG            388 sprintf.c      		VALUE val = GETARG();
GETARG            404 sprintf.c      		VALUE arg = GETARG();
GETARG            448 sprintf.c      		volatile VALUE val = GETARG();
GETARG            697 sprintf.c      		VALUE val = GETARG();


GETASTER

GETASTER          343 sprintf.c      	    GETASTER(width);
GETASTER          360 sprintf.c      		GETASTER(prec);


GETGROUPS_T

GETGROUPS_T       820 file.c             GETGROUPS_T gid;
GETGROUPS_T       835 file.c         	GETGROUPS_T gary[NGROUPS];


GETNTHARG

GETNTHARG         102 sprintf.c          (posarg = nextarg++, GETNTHARG(posarg)))
GETNTHARG         107 sprintf.c      	       (posarg = -1, GETNTHARG(n))))
GETNTHARG         253 sprintf.c          fmt = GETNTHARG(0);


GETPGRP_VOID

GETPGRP_VOID      167 defines.h      #ifndef GETPGRP_VOID
GETPGRP_VOID     1607 process.c      #if defined(HAVE_GETPGRP) && defined(GETPGRP_VOID)


GETPOSARG

GETPOSARG         126 sprintf.c      	tmp = GETPOSARG(n); \
GETPOSARG         329 sprintf.c      		nextvalue = GETPOSARG(n);


GET_AI

GET_AI            452 ext/socket/getaddrinfo.c 				GET_AI(cur->ai_next, afd, afd->a_addrany, port);
GET_AI            457 ext/socket/getaddrinfo.c 				GET_AI(cur->ai_next, afd, afd->a_loopback,
GET_AI            505 ext/socket/getaddrinfo.c 					GET_AI(top, &afdl[i], pton, port);
GET_AI            568 ext/socket/getaddrinfo.c 		GET_AI(cur, afd, hp->h_addr_list[0], port);
GET_AI            571 ext/socket/getaddrinfo.c 		GET_AI(cur, afd, numaddr, port);
GET_AI            669 ext/socket/getaddrinfo.c 			GET_AI(cur->ai_next, &afdl[N_INET6], ap, port);
GET_AI            676 ext/socket/getaddrinfo.c 		GET_AI(cur->ai_next, afd, ap, port);


GET_BUFFER_SPACE

GET_BUFFER_SPACE  552 regex.c            GET_BUFFER_SPACE(1);						\
GET_BUFFER_SPACE 1393 regex.c        	GET_BUFFER_SPACE(3);
GET_BUFFER_SPACE 1400 regex.c              GET_BUFFER_SPACE(3);
GET_BUFFER_SPACE 1406 regex.c        	  GET_BUFFER_SPACE(3);
GET_BUFFER_SPACE 1417 regex.c        	GET_BUFFER_SPACE(3);
GET_BUFFER_SPACE 1972 regex.c              GET_BUFFER_SPACE(3);
GET_BUFFER_SPACE 1999 regex.c              GET_BUFFER_SPACE(3);
GET_BUFFER_SPACE 2076 regex.c        	GET_BUFFER_SPACE(3);
GET_BUFFER_SPACE 2095 regex.c        	  GET_BUFFER_SPACE((lower_bound-1)*mcnt);
GET_BUFFER_SPACE 2109 regex.c        	  GET_BUFFER_SPACE((lower_bound-1)*mcnt);
GET_BUFFER_SPACE 2133 regex.c        	GET_BUFFER_SPACE(nbytes);
GET_BUFFER_SPACE 2158 regex.c        	  GET_BUFFER_SPACE(5);


GET_CANONNAME

GET_CANONNAME     569 ext/socket/getaddrinfo.c 		GET_CANONNAME(cur, hp->h_name);
GET_CANONNAME     679 ext/socket/getaddrinfo.c 			GET_CANONNAME(top, hp->h_name);


GET_ENVIRON

GET_ENVIRON      1776 hash.c             env = GET_ENVIRON(environ);
GET_ENVIRON      1928 hash.c             env = GET_ENVIRON(environ);
GET_ENVIRON      1959 hash.c             env = GET_ENVIRON(environ);
GET_ENVIRON      1993 hash.c             env = GET_ENVIRON(environ);
GET_ENVIRON      2086 hash.c             env = GET_ENVIRON(environ);
GET_ENVIRON      2134 hash.c             env = GET_ENVIRON(environ);
GET_ENVIRON      2163 hash.c             env = GET_ENVIRON(environ);
GET_ENVIRON      2188 hash.c             env = GET_ENVIRON(environ);
GET_ENVIRON      2200 hash.c             env = GET_ENVIRON(environ);
GET_ENVIRON      2229 hash.c             env = GET_ENVIRON(environ);
GET_ENVIRON      2253 hash.c             env = GET_ENVIRON(environ);
GET_ENVIRON      2300 hash.c             env = GET_ENVIRON(environ);
GET_ENVIRON      2324 hash.c             env = GET_ENVIRON(environ);


GET_SCANNER

GET_SCANNER       245 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       264 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       291 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       336 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       362 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       382 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       404 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       682 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       712 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       755 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       795 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       822 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       844 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       877 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       899 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       919 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       942 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       981 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER      1010 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER      1031 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER      1047 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER      1064 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_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);


GET_UNSIGNED_NUMBER

GET_UNSIGNED_NUMBER 2021 regex.c              GET_UNSIGNED_NUMBER(lower_bound);
GET_UNSIGNED_NUMBER 2023 regex.c        	GET_UNSIGNED_NUMBER(upper_bound);
GET_UNSIGNED_NUMBER 2315 regex.c        	GET_UNSIGNED_NUMBER(c1);


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      791 dir.c              ((flags & GLOB_VERBOSE) && rb_protect((VALUE (*)_((VALUE)))rb_sys_warning, (VALUE)(val), 0))
GLOB_VERBOSE     1090 dir.c              return glob_helper(path, 0, flags & ~GLOB_VERBOSE, func, arg);
GLOB_VERBOSE     1130 dir.c              return glob_helper(path, 0, 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 1964 ext/zlib/zlib.c     gz->z.flags |= GZFILE_FLAG_FOOTER_FINISHED;
GZFILE_FLAG_FOOTER_FINISHED 2049 ext/zlib/zlib.c     gz->z.flags |= GZFILE_FLAG_FOOTER_FINISHED;
GZFILE_FLAG_FOOTER_FINISHED 2140 ext/zlib/zlib.c 	if (!(gz->z.flags & GZFILE_FLAG_FOOTER_FINISHED)) {
GZFILE_FLAG_FOOTER_FINISHED 2163 ext/zlib/zlib.c 	if (!(gz->z.flags & GZFILE_FLAG_FOOTER_FINISHED)) {
GZFILE_FLAG_FOOTER_FINISHED 2238 ext/zlib/zlib.c 	&& !(gz->z.flags & GZFILE_FLAG_FOOTER_FINISHED)) {
GZFILE_FLAG_FOOTER_FINISHED 2268 ext/zlib/zlib.c     if (!(gz->z.flags & GZFILE_FLAG_FOOTER_FINISHED)) {


GZFILE_FLAG_HEADER_FINISHED

GZFILE_FLAG_HEADER_FINISHED 1952 ext/zlib/zlib.c     gz->z.flags |= GZFILE_FLAG_HEADER_FINISHED;
GZFILE_FLAG_HEADER_FINISHED 2075 ext/zlib/zlib.c     if (!(gz->z.flags & GZFILE_FLAG_HEADER_FINISHED)) {
GZFILE_FLAG_HEADER_FINISHED 2203 ext/zlib/zlib.c     if (!(gz->z.flags & GZFILE_FLAG_HEADER_FINISHED)) {
GZFILE_FLAG_HEADER_FINISHED 2474 ext/zlib/zlib.c     if (gz->z.flags & GZFILE_FLAG_HEADER_FINISHED) {
GZFILE_FLAG_HEADER_FINISHED 2499 ext/zlib/zlib.c     if (gz->z.flags & GZFILE_FLAG_HEADER_FINISHED) {
GZFILE_FLAG_HEADER_FINISHED 2522 ext/zlib/zlib.c     if (gz->z.flags & GZFILE_FLAG_HEADER_FINISHED) {


GZFILE_FLAG_SYNC

GZFILE_FLAG_SYNC 1821 ext/zlib/zlib.c 	if ((gz->z.flags & GZFILE_FLAG_SYNC)
GZFILE_FLAG_SYNC 2079 ext/zlib/zlib.c     if (len > 0 || (gz->z.flags & GZFILE_FLAG_SYNC)) {
GZFILE_FLAG_SYNC 2081 ext/zlib/zlib.c 	zstream_run(&gz->z, str, len, (gz->z.flags & GZFILE_FLAG_SYNC)
GZFILE_FLAG_SYNC 2597 ext/zlib/zlib.c     return (get_gzfile(obj)->z.flags & GZFILE_FLAG_SYNC) ? Qtrue : Qfalse;
GZFILE_FLAG_SYNC 2614 ext/zlib/zlib.c 	gz->z.flags |= GZFILE_FLAG_SYNC;
GZFILE_FLAG_SYNC 2617 ext/zlib/zlib.c 	gz->z.flags &= ~GZFILE_FLAG_SYNC;


GZFILE_IS_FINISHED

GZFILE_IS_FINISHED 2139 ext/zlib/zlib.c     if (GZFILE_IS_FINISHED(gz)) {
GZFILE_IS_FINISHED 2162 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 2267 ext/zlib/zlib.c     if (!GZFILE_IS_FINISHED(gz)) return Qnil;
GZFILE_IS_FINISHED 2587 ext/zlib/zlib.c     return GZFILE_IS_FINISHED(gz) ? Qtrue : Qfalse;
GZFILE_IS_FINISHED 3044 ext/zlib/zlib.c 	if (GZFILE_IS_FINISHED(gz)) return;
GZFILE_IS_FINISHED 3055 ext/zlib/zlib.c 		if (GZFILE_IS_FINISHED(gz)) return;


GZIP_SUPPORT

GZIP_SUPPORT       18 ext/zlib/zlib.c #ifndef GZIP_SUPPORT
GZIP_SUPPORT      104 ext/zlib/zlib.c #if GZIP_SUPPORT
GZIP_SUPPORT     1661 ext/zlib/zlib.c #if GZIP_SUPPORT
GZIP_SUPPORT     3310 ext/zlib/zlib.c #if GZIP_SUPPORT
GZIP_SUPPORT     3397 ext/zlib/zlib.c #if GZIP_SUPPORT


GZ_EXTRAFLAG_FAST

GZ_EXTRAFLAG_FAST 1928 ext/zlib/zlib.c 	extraflags |= GZ_EXTRAFLAG_FAST;
GZ_EXTRAFLAG_FAST 1999 ext/zlib/zlib.c     if (head[8] & GZ_EXTRAFLAG_FAST) {


GZ_EXTRAFLAG_SLOW

GZ_EXTRAFLAG_SLOW 1931 ext/zlib/zlib.c 	extraflags |= GZ_EXTRAFLAG_SLOW;
GZ_EXTRAFLAG_SLOW 2002 ext/zlib/zlib.c     else if (head[8] & GZ_EXTRAFLAG_SLOW) {


GZ_FLAG_COMMENT

GZ_FLAG_COMMENT  1921 ext/zlib/zlib.c 	flags |= GZ_FLAG_COMMENT;
GZ_FLAG_COMMENT  2030 ext/zlib/zlib.c     if (flags & GZ_FLAG_COMMENT) {


GZ_FLAG_ORIG_NAME

GZ_FLAG_ORIG_NAME 1918 ext/zlib/zlib.c 	flags |= GZ_FLAG_ORIG_NAME;
GZ_FLAG_ORIG_NAME 2023 ext/zlib/zlib.c     if (flags & GZ_FLAG_ORIG_NAME) {


GZ_MAGIC1

GZ_MAGIC1        1934 ext/zlib/zlib.c     buf[0] = GZ_MAGIC1;
GZ_MAGIC1        1981 ext/zlib/zlib.c     if (head[0] != GZ_MAGIC1 || head[1] != GZ_MAGIC2) {


GZ_MAGIC2

GZ_MAGIC2        1935 ext/zlib/zlib.c     buf[1] = GZ_MAGIC2;
GZ_MAGIC2        1981 ext/zlib/zlib.c     if (head[0] != GZ_MAGIC1 || head[1] != GZ_MAGIC2) {


GZ_METHOD_DEFLATE

GZ_METHOD_DEFLATE 1936 ext/zlib/zlib.c     buf[2] = GZ_METHOD_DEFLATE;
GZ_METHOD_DEFLATE 1984 ext/zlib/zlib.c     if (head[2] != GZ_METHOD_DEFLATE) {


GenerateConsoleCtrlEvent

GenerateConsoleCtrlEvent 2632 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);


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         257 ext/openssl/ossl_cipher.c     GetCipher(self, ctx);
GetCipher         273 ext/openssl/ossl_cipher.c     GetCipher(self, ctx);
GetCipher         284 ext/openssl/ossl_cipher.c     GetCipher(self, ctx);
GetCipher         301 ext/openssl/ossl_cipher.c     GetCipher(self, ctx);
GetCipher         318 ext/openssl/ossl_cipher.c     GetCipher(self, ctx);
GetCipher         332 ext/openssl/ossl_cipher.c     GetCipher(self, ctx);
GetCipher         346 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 1975 win32/win32.c      main_thread.handle = GetCurrentThreadHandle();
GetCurrentThreadHandle  528 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            662 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            545 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           274 ext/dbm/dbm.c          GetDBM2(obj, dbmp, dbm);
GetDBM2           284 ext/dbm/dbm.c  	    GetDBM2(obj, dbmp, dbm);
GetDBM2           336 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           366 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           391 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           402 ext/dbm/dbm.c  	GetDBM2(obj, dbmp, dbm);
GetDBM2           429 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           451 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           519 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           541 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           561 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           584 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           588 ext/dbm/dbm.c  	GetDBM2(obj, dbmp, dbm);
GetDBM2           601 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           604 ext/dbm/dbm.c  	GetDBM2(obj, dbmp, dbm);
GetDBM2           618 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           625 ext/dbm/dbm.c  	GetDBM2(obj, dbmp, dbm);
GetDBM2           640 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           659 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           681 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           699 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           718 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           738 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           370 ext/gdbm/gdbm.c         GetDBM2(obj, dbmp, dbm);
GetDBM2           379 ext/gdbm/gdbm.c 	    GetDBM2(obj, dbmp, dbm);
GetDBM2           430 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           465 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           485 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           496 ext/gdbm/gdbm.c 	GetDBM2(obj, dbmp, dbm);
GetDBM2           516 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           554 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           622 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           641 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           686 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           691 ext/gdbm/gdbm.c 	GetDBM2(obj, dbmp, dbm);
GetDBM2           704 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           709 ext/gdbm/gdbm.c 	GetDBM2(obj, dbmp, dbm);
GetDBM2           722 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           727 ext/gdbm/gdbm.c 	GetDBM2(obj, dbmp, dbm);
GetDBM2           741 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           761 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           785 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           800 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           824 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           843 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           856 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           869 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           885 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           908 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           928 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           251 ext/sdbm/init.c         GetDBM2(obj, dbmp, dbm);
GetDBM2           261 ext/sdbm/init.c 	    GetDBM2(obj, dbmp, dbm);
GetDBM2           313 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           345 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           371 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           381 ext/sdbm/init.c 	GetDBM2(obj, dbmp, dbm);
GetDBM2           408 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           430 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           503 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           525 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           568 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           572 ext/sdbm/init.c 	GetDBM2(obj, dbmp, dbm);
GetDBM2           585 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           588 ext/sdbm/init.c 	GetDBM2(obj, dbmp, dbm);
GetDBM2           602 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           608 ext/sdbm/init.c 	GetDBM2(obj, dbmp, dbm);
GetDBM2           623 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           641 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           663 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           681 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           700 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           720 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);


GetDIR

GetDIR            348 dir.c              GetDIR(dir, dirp);
GetDIR            372 dir.c              GetDIR(dir, dirp);
GetDIR            411 dir.c              GetDIR(dir, dirp);
GetDIR            441 dir.c              GetDIR(dir, dirp);
GetDIR            470 dir.c              GetDIR(dir, dirp);
GetDIR            518 dir.c              GetDIR(dir, dirp);
GetDIR            539 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 3345 win32/win32.c      envtop = GetEnvironmentStrings();
GetEnvironmentStrings  150 wince/wince.h  LPVOID GetEnvironmentStrings(VOID);


GetEnvironmentVariable

GetEnvironmentVariable 2725 win32/win32.c      needlen = GetEnvironmentVariable(name, curitem, curlen);
GetEnvironmentVariable 2730 win32/win32.c  	    needlen = GetEnvironmentVariable(name, curitem, curlen);
GetEnvironmentVariable  149 wince/wince.h  DWORD GetEnvironmentVariable(LPCSTR name, LPSTR value, DWORD size);


GetFileAttributes

GetFileAttributes 2747 win32/win32.c      oldatts = GetFileAttributes(oldpath);
GetFileAttributes 2748 win32/win32.c      newatts = GetFileAttributes(newpath);
GetFileAttributes 2903 win32/win32.c  	DWORD attr = GetFileAttributes(path);
GetFileAttributes 3530 win32/win32.c  	const DWORD attr = GetFileAttributes(path);
GetFileAttributes 3550 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 1377 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       557 ext/dl/dl.c      GetOpenFile(self, fptr);
GetOpenFile        63 ext/io/wait/wait.c     GetOpenFile(io, fptr);
GetOpenFile        95 ext/io/wait/wait.c     GetOpenFile(io, fptr);
GetOpenFile        23 ext/openssl/ossl_bio.c 	GetOpenFile(obj, fptr);
GetOpenFile       553 ext/openssl/ossl_ssl.c         GetOpenFile(io, fptr);
GetOpenFile       584 ext/openssl/ossl_ssl.c     GetOpenFile(ossl_ssl_get_io(self), fptr);
GetOpenFile       637 ext/openssl/ossl_ssl.c     GetOpenFile(ossl_ssl_get_io(self), fptr);
GetOpenFile       685 ext/openssl/ossl_ssl.c     GetOpenFile(ossl_ssl_get_io(self), fptr);
GetOpenFile        73 ext/readline/readline.c     GetOpenFile(rb_stdout, ofp);
GetOpenFile        76 ext/readline/readline.c     GetOpenFile(rb_stdin, ifp);
GetOpenFile       228 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile       255 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile       271 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile       290 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile       378 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile       439 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile       441 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile       459 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile       473 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile       496 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile       555 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1201 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1353 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1367 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1430 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1445 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1460 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1543 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1560 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1593 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1626 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1685 ext/socket/socket.c 	GetOpenFile(val, valfptr);
GetOpenFile      1695 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1770 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1859 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1873 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1894 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1911 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      2192 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      2287 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      2373 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      2585 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      2638 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile       658 file.c         	GetOpenFile(tmp, fptr);
GetOpenFile       678 file.c         	GetOpenFile(tmp, fptr);
GetOpenFile       745 file.c             GetOpenFile(obj, fptr);
GetOpenFile       807 file.c             GetOpenFile(obj, fptr);
GetOpenFile      1589 file.c             GetOpenFile(obj, fptr);
GetOpenFile      1634 file.c             GetOpenFile(obj, fptr);
GetOpenFile      1682 file.c             GetOpenFile(obj, fptr);
GetOpenFile      1753 file.c             GetOpenFile(obj, fptr);
GetOpenFile      1897 file.c             GetOpenFile(obj, fptr);
GetOpenFile      3071 file.c             GetOpenFile(obj, fptr);
GetOpenFile      3178 file.c             GetOpenFile(obj, fptr);
GetOpenFile       558 io.c               GetOpenFile(io, fptr);
GetOpenFile       623 io.c               GetOpenFile(io, fptr);
GetOpenFile       652 io.c               GetOpenFile(io, fptr);
GetOpenFile       667 io.c               GetOpenFile(io, fptr);
GetOpenFile       731 io.c               GetOpenFile(io, fptr);
GetOpenFile       759 io.c               GetOpenFile(io, fptr);
GetOpenFile       809 io.c               GetOpenFile(io, fptr);
GetOpenFile       848 io.c               GetOpenFile(io, fptr);
GetOpenFile       873 io.c               GetOpenFile(io, fptr);
GetOpenFile       903 io.c               GetOpenFile(io, fptr);
GetOpenFile       935 io.c               GetOpenFile(io, fptr);
GetOpenFile       966 io.c               GetOpenFile(io, fptr);
GetOpenFile      1194 io.c               GetOpenFile(io, fptr);
GetOpenFile      1325 io.c           	GetOpenFile(io, fptr);
GetOpenFile      1343 io.c               GetOpenFile(io, fptr);
GetOpenFile      1554 io.c               GetOpenFile(io, fptr);
GetOpenFile      1611 io.c               GetOpenFile(io, fptr);
GetOpenFile      1679 io.c               GetOpenFile(io, fptr);
GetOpenFile      1707 io.c               GetOpenFile(io, fptr);
GetOpenFile      1862 io.c               GetOpenFile(io, fptr);
GetOpenFile      1907 io.c               GetOpenFile(io, fptr);
GetOpenFile      1990 io.c               GetOpenFile(io, fptr);
GetOpenFile      2019 io.c               GetOpenFile(io, fptr);
GetOpenFile      2217 io.c               GetOpenFile(io, fptr);
GetOpenFile      2262 io.c               GetOpenFile(io, fptr);
GetOpenFile      2305 io.c               GetOpenFile(io, fptr);
GetOpenFile      2344 io.c               GetOpenFile(io, fptr);
GetOpenFile      2400 io.c               GetOpenFile(io, fptr);
GetOpenFile      2449 io.c               GetOpenFile(io, fptr);
GetOpenFile      3363 io.c               GetOpenFile(io, fptr);
GetOpenFile      3364 io.c               GetOpenFile(nfile, orig);
GetOpenFile      3538 io.c               GetOpenFile(io, orig);
GetOpenFile      4026 io.c               GetOpenFile(io, fptr);
GetOpenFile      4215 io.c                   GetOpenFile(rb_stdout, fptr);
GetOpenFile      4524 io.c               GetOpenFile(port, fptr);
GetOpenFile      4576 io.c           	    GetOpenFile(rb_io_get_io(RARRAY(read)->ptr[i]), fptr);
GetOpenFile      4597 io.c           	    GetOpenFile(rb_io_get_io(RARRAY(write)->ptr[i]), fptr);
GetOpenFile      4614 io.c           	    GetOpenFile(rb_io_get_io(RARRAY(except)->ptr[i]), fptr);
GetOpenFile      4644 io.c           		GetOpenFile(rb_io_get_io(RARRAY(read)->ptr[i]), fptr);
GetOpenFile      4655 io.c           		GetOpenFile(rb_io_get_io(RARRAY(write)->ptr[i]), fptr);
GetOpenFile      4668 io.c           		GetOpenFile(rb_io_get_io(RARRAY(except)->ptr[i]), fptr);
GetOpenFile      4763 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        193 ext/openssl/ossl_ssl.c     GetPKeyPtr(key = rb_ary_entry(ary, 1));
GetPKeyPtr        228 ext/openssl/ossl_ssl.c     pkey = GetPKeyPtr(dh);
GetPKeyPtr        248 ext/openssl/ossl_ssl.c     return GetPKeyPtr(ossl_ssl_get_tmp_dh(args[0]))->pkey.dh;
GetPKeyPtr        337 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   1314 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     29 ext/dl/dl.h    #   define dlsym(handle,name) ((void*)GetProcAddress(handle,name))
GetProcAddress     67 ext/tk/stubs.c # define DL_SYM GetProcAddress
GetProcAddress   1389 ext/win32ole/win32ole.c             GetProcAddress(gole32, "CoCreateInstanceEx");
GetProcAddress   1728 ext/win32ole/win32ole.c     pfnHtmlHelp = (FNHTMLHELP*)GetProcAddress(ghhctrl, "HtmlHelpA");
GetProcAddress   2684 win32/win32.c  	    pCreateHardLink = (BOOL (WINAPI *)(LPCTSTR, LPCTSTR, LPSECURITY_ATTRIBUTES))GetProcAddress(hKernel, "CreateHardLinkA");


GetProcessTimes

GetProcessTimes  2974 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      886 win32/win32.c  	    aStartupInfo.hStdInput  = GetStdHandle(STD_INPUT_HANDLE);
GetStdHandle      892 win32/win32.c  	    aStartupInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
GetStdHandle      898 win32/win32.c  	    aStartupInfo.hStdError = GetStdHandle(STD_ERROR_HANDLE);
GetStdHandle      143 wince/wince.h  HANDLE GetStdHandle(DWORD nStdHandle);


GetTimeval

GetTimeval         98 time.c             GetTimeval(time, tobj);
GetTimeval        150 time.c             GetTimeval(time, tobj);
GetTimeval        230 time.c         	GetTimeval(time, tobj);
GetTimeval        272 time.c         	GetTimeval(time, tobj);
GetTimeval        273 time.c         	GetTimeval(t, tobj2);
GetTimeval        875 time.c             GetTimeval(time, tobj);
GetTimeval        897 time.c             GetTimeval(time, tobj);
GetTimeval        919 time.c             GetTimeval(time, tobj);
GetTimeval        945 time.c             GetTimeval(time1, tobj1);
GetTimeval        947 time.c         	GetTimeval(time2, tobj2);
GetTimeval        975 time.c             GetTimeval(time1, tobj1);
GetTimeval        977 time.c         	GetTimeval(time2, tobj2);
GetTimeval       1010 time.c             GetTimeval(time, tobj);
GetTimeval       1029 time.c             GetTimeval(time, tobj);
GetTimeval       1046 time.c             GetTimeval(time, tobj);
GetTimeval       1047 time.c             GetTimeval(copy, tcopy);
GetTimeval       1083 time.c             GetTimeval(time, tobj);
GetTimeval       1127 time.c             GetTimeval(time, tobj);
GetTimeval       1214 time.c             GetTimeval(time, tobj);
GetTimeval       1245 time.c             GetTimeval(time, tobj);
GetTimeval       1305 time.c         	GetTimeval(result, tobj);
GetTimeval       1327 time.c             GetTimeval(time1, tobj);
GetTimeval       1356 time.c             GetTimeval(time1, tobj);
GetTimeval       1361 time.c         	GetTimeval(time2, tobj2);
GetTimeval       1384 time.c             GetTimeval(time, tobj);
GetTimeval       1407 time.c             GetTimeval(time, tobj);
GetTimeval       1430 time.c             GetTimeval(time, tobj);
GetTimeval       1453 time.c             GetTimeval(time, tobj);
GetTimeval       1478 time.c             GetTimeval(time, tobj);
GetTimeval       1503 time.c             GetTimeval(time, tobj);
GetTimeval       1526 time.c             GetTimeval(time, tobj);
GetTimeval       1550 time.c             GetTimeval(time, tobj);
GetTimeval       1573 time.c             GetTimeval(time, tobj);
GetTimeval       1600 time.c             GetTimeval(time, tobj);
GetTimeval       1630 time.c             GetTimeval(time, tobj);
GetTimeval       1669 time.c             GetTimeval(time, tobj);
GetTimeval       1726 time.c             GetTimeval(time, tobj);
GetTimeval       1827 time.c             GetTimeval(time, tobj);
GetTimeval       1894 time.c             GetTimeval(time, tobj);
GetTimeval       1997 time.c             GetTimeval(time, tobj);


GetUserName

GetUserName       382 win32/win32.c  	if (GetUserName(buffer, &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);


GetWriteFile

GetWriteFile       74 ext/readline/readline.c     rl_outstream = GetWriteFile(ofp);
GetWriteFile      497 ext/socket/socket.c     f = GetWriteFile(fptr);
GetWriteFile     1594 ext/socket/socket.c     f = GetWriteFile(fptr);
GetWriteFile     3075 file.c             f = GetWriteFile(fptr);
GetWriteFile     3181 file.c         	fflush(GetWriteFile(fptr));
GetWriteFile      229 io.c           	io_fflush(GetWriteFile(fptr), fptr);
GetWriteFile      412 io.c               FILE *f = GetWriteFile(fptr);
GetWriteFile      437 io.c               FILE *f = GetWriteFile(fptr);
GetWriteFile      625 io.c               f = GetWriteFile(fptr);
GetWriteFile      904 io.c               f = GetWriteFile(fptr);
GetWriteFile     2346 io.c               f = GetWriteFile(fptr);
GetWriteFile     3377 io.c           	io_fflush(GetWriteFile(fptr), fptr);


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    192 ext/openssl/ossl_ssl.c     GetX509CertPtr(cert = rb_ary_entry(ary, 0));
GetX509CertPtr    335 ext/openssl/ossl_ssl.c     cert = NIL_P(val) ? NULL : GetX509CertPtr(val); /* NO DUP NEEDED */
GetX509CertPtr    356 ext/openssl/ossl_ssl.c 		client_ca = GetX509CertPtr(RARRAY(val)->ptr[i]);
GetX509CertPtr    364 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   323 ext/openssl/ossl_ssl.c         store = GetX509StorePtr(val); /* NO NEED TO DUP */
GetX509StorePtr   105 ext/openssl/ossl_x509.h X509_STORE *GetX509StorePtr(VALUE);


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      177 hash.c         	FL_SET(arg->hash, HASH_DELETED);
HASH_DELETED      193 hash.c         	if (FL_TEST(hash, HASH_DELETED)) {
HASH_DELETED      195 hash.c         	    FL_UNSET(hash, HASH_DELETED);
HASH_DELETED      664 hash.c         	    FL_SET(hash, HASH_DELETED);


HASH_PROC_DEFAULT

HASH_PROC_DEFAULT  295 hash.c         	FL_SET(hash, HASH_PROC_DEFAULT);
HASH_PROC_DEFAULT  510 hash.c             if (FL_TEST(hash, HASH_PROC_DEFAULT)) {
HASH_PROC_DEFAULT  542 hash.c             FL_UNSET(hash, HASH_PROC_DEFAULT);
HASH_PROC_DEFAULT  565 hash.c             if (FL_TEST(hash, HASH_PROC_DEFAULT)) {
HASH_PROC_DEFAULT  721 hash.c             else if (FL_TEST(hash, HASH_PROC_DEFAULT)) {
HASH_PROC_DEFAULT  955 hash.c             if (FL_TEST(hash2, HASH_PROC_DEFAULT)) {
HASH_PROC_DEFAULT  956 hash.c         	FL_SET(hash, HASH_PROC_DEFAULT);
HASH_PROC_DEFAULT  959 hash.c         	FL_UNSET(hash, HASH_PROC_DEFAULT);
HASH_PROC_DEFAULT 1464 hash.c         	      FL_TEST(hash1, HASH_PROC_DEFAULT) == FL_TEST(hash2, HASH_PROC_DEFAULT)))


HAVE_44BSD_SETUID

HAVE_44BSD_SETUID  104 process.c      #if defined(HAVE_44BSD_SETUID) || defined(__MacOS_X__)
HAVE_44BSD_SETUID 2166 process.c      #elif defined HAVE_44BSD_SETUID


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         52 ext/socket/socket.c #if defined(HAVE_FCNTL)
HAVE_FCNTL        943 ext/socket/socket.c #if defined(HAVE_FCNTL)
HAVE_FCNTL       1035 ext/socket/socket.c #ifdef HAVE_FCNTL
HAVE_FCNTL        418 io.c           #if defined(HAVE_FCNTL) && defined(F_GETFL) && defined(O_NONBLOCK)
HAVE_FCNTL       4072 io.c           #if defined(HAVE_FCNTL) && defined(F_GETFL)
HAVE_FCNTL       4690 io.c           #ifdef HAVE_FCNTL
HAVE_FCNTL       4835 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         30 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       62 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       47 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      188 random.c       #ifdef HAVE_FCNTL_H
HAVE_FCNTL_H       70 util.c         #if defined(HAVE_FCNTL_H)


HAVE_GETRLIMIT

HAVE_GETRLIMIT    424 gc.c           #elif defined(HAVE_GETRLIMIT)
HAVE_GETRLIMIT   1473 gc.c           #ifdef HAVE_GETRLIMIT


HAVE_LIMITS_H

HAVE_LIMITS_H      89 missing/vsnprintf.c #  ifdef HAVE_LIMITS_H
HAVE_LIMITS_H      87 ruby.h         #  ifdef HAVE_LIMITS_H


HAVE_LONG_LONG

HAVE_LONG_LONG     31 bignum.c       #if HAVE_LONG_LONG
HAVE_LONG_LONG    188 bignum.c       #ifdef HAVE_LONG_LONG
HAVE_LONG_LONG    539 bignum.c       #if HAVE_LONG_LONG
HAVE_LONG_LONG    788 bignum.c       #if HAVE_LONG_LONG
HAVE_LONG_LONG     77 intern.h       #if HAVE_LONG_LONG
HAVE_LONG_LONG     99 io.c           #if SIZEOF_OFF_T > SIZEOF_LONG && !defined(HAVE_LONG_LONG)
HAVE_LONG_LONG   1653 numeric.c      #if HAVE_LONG_LONG
HAVE_LONG_LONG    362 pack.c         #ifdef HAVE_LONG_LONG
HAVE_LONG_LONG    194 parse.c        #ifdef HAVE_LONG_LONG
HAVE_LONG_LONG     97 parse.y        #ifdef HAVE_LONG_LONG
HAVE_LONG_LONG    102 ruby.h         #if HAVE_LONG_LONG
HAVE_LONG_LONG    144 ruby.h         #if HAVE_LONG_LONG
HAVE_LONG_LONG    151 ruby.h         #if SIZEOF_OFF_T > SIZEOF_LONG && defined(HAVE_LONG_LONG)
HAVE_LONG_LONG    265 ruby.h         #if HAVE_LONG_LONG
HAVE_LONG_LONG    271 ruby.h         #if HAVE_LONG_LONG && SIZEOF_OFF_T > SIZEOF_LONG


HAVE_NATIVETHREAD

HAVE_NATIVETHREAD 1287 eval.c         #ifdef HAVE_NATIVETHREAD
HAVE_NATIVETHREAD 1306 eval.c         #ifdef HAVE_NATIVETHREAD
HAVE_NATIVETHREAD 10397 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 1316 gc.c           #ifdef HAVE_NATIVETHREAD
HAVE_NATIVETHREAD  699 ruby.h         #ifdef HAVE_NATIVETHREAD


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   129 ext/iconv/iconv.c #ifdef HAVE_PROTOTYPES
HAVE_PROTOTYPES   150 ext/iconv/iconv.c #ifdef HAVE_PROTOTYPES
HAVE_PROTOTYPES   192 ext/iconv/iconv.c #ifdef HAVE_PROTOTYPES
HAVE_PROTOTYPES   206 ext/iconv/iconv.c #ifdef HAVE_PROTOTYPES
HAVE_PROTOTYPES   220 ext/iconv/iconv.c #ifdef HAVE_PROTOTYPES
HAVE_PROTOTYPES   236 ext/iconv/iconv.c #ifdef HAVE_PROTOTYPES
HAVE_PROTOTYPES   286 ext/iconv/iconv.c #ifdef HAVE_PROTOTYPES
HAVE_PROTOTYPES   301 ext/iconv/iconv.c #ifdef HAVE_PROTOTYPES
HAVE_PROTOTYPES   339 ext/iconv/iconv.c #ifdef HAVE_PROTOTYPES
HAVE_PROTOTYPES   364 ext/iconv/iconv.c #ifdef HAVE_PROTOTYPES
HAVE_PROTOTYPES   508 ext/iconv/iconv.c #ifdef HAVE_PROTOTYPES
HAVE_PROTOTYPES   538 ext/iconv/iconv.c #ifdef HAVE_PROTOTYPES
HAVE_PROTOTYPES   563 ext/iconv/iconv.c #ifdef HAVE_PROTOTYPES
HAVE_PROTOTYPES   585 ext/iconv/iconv.c #ifdef HAVE_PROTOTYPES
HAVE_PROTOTYPES   628 ext/iconv/iconv.c #ifdef HAVE_PROTOTYPES
HAVE_PROTOTYPES   660 ext/iconv/iconv.c #ifdef HAVE_PROTOTYPES
HAVE_PROTOTYPES   690 ext/iconv/iconv.c #ifdef HAVE_PROTOTYPES
HAVE_PROTOTYPES   702 ext/iconv/iconv.c #ifdef HAVE_PROTOTYPES
HAVE_PROTOTYPES   746 ext/iconv/iconv.c #ifdef HAVE_PROTOTYPES
HAVE_PROTOTYPES   784 ext/iconv/iconv.c #ifdef HAVE_PROTOTYPES
HAVE_PROTOTYPES   803 ext/iconv/iconv.c #ifdef HAVE_PROTOTYPES
HAVE_PROTOTYPES   821 ext/iconv/iconv.c #ifdef HAVE_PROTOTYPES
HAVE_PROTOTYPES    71 ext/socket/addrinfo.h # ifdef HAVE_PROTOTYPES
HAVE_PROTOTYPES    58 regex.c        #ifdef HAVE_PROTOTYPES
HAVE_PROTOTYPES   632 ruby.h         #if defined(HAVE_PROTOTYPES)
HAVE_PROTOTYPES   649 ruby.h         #if defined(HAVE_PROTOTYPES)
HAVE_PROTOTYPES   666 ruby.h         #if defined(HAVE_PROTOTYPES)
HAVE_PROTOTYPES    18 util.h         # ifndef  HAVE_PROTOTYPES
HAVE_PROTOTYPES    25 util.h         #ifdef HAVE_PROTOTYPES


HAVE_RECVMSG

HAVE_RECVMSG     1730 ext/socket/socket.c #if defined(HAVE_RECVMSG) && (FD_PASSING_BY_MSG_CONTROL || FD_PASSING_BY_MSG_ACCRIGHTS)
HAVE_RECVMSG     1749 ext/socket/socket.c #if defined(HAVE_RECVMSG) && (FD_PASSING_BY_MSG_CONTROL || FD_PASSING_BY_MSG_ACCRIGHTS)


HAVE_SETRGID

HAVE_SETRGID     2234 process.c      #if defined HAVE_SETRGID
HAVE_SETRGID     2385 process.c      #elif defined HAVE_SETRGID
HAVE_SETRGID     2646 process.c      #elif defined(HAVE_SETRGID) && defined (HAVE_SETEGID)
HAVE_SETRGID     2695 process.c      #elif defined(HAVE_SETRGID) && defined(HAVE_SETEGID)


HAVE_SETRUID

HAVE_SETRUID     1891 process.c      #if defined HAVE_SETRUID
HAVE_SETRUID     2013 process.c      #elif defined HAVE_SETRUID
HAVE_SETRUID     2096 process.c      #elif defined(HAVE_SETRUID) && defined(HAVE_SETEUID)
HAVE_SETRUID     2144 process.c      #elif defined(HAVE_SETRUID) && defined(HAVE_SETEUID)


HAVE_SIGPROCMASK

HAVE_SIGPROCMASK  492 signal.c       # ifdef HAVE_SIGPROCMASK
HAVE_SIGPROCMASK  501 signal.c       # ifdef HAVE_SIGPROCMASK
HAVE_SIGPROCMASK  638 signal.c       #ifdef HAVE_SIGPROCMASK
HAVE_SIGPROCMASK  653 signal.c       #ifdef HAVE_SIGPROCMASK
HAVE_SIGPROCMASK  667 signal.c       # ifdef HAVE_SIGPROCMASK
HAVE_SIGPROCMASK  728 signal.c       # ifdef HAVE_SIGPROCMASK
HAVE_SIGPROCMASK  781 signal.c       # ifdef HAVE_SIGPROCMASK
HAVE_SIGPROCMASK  790 signal.c       # ifdef HAVE_SIGPROCMASK
HAVE_SIGPROCMASK  806 signal.c       #ifdef HAVE_SIGPROCMASK


HAVE_STDARG_PROTOTYPES

HAVE_STDARG_PROTOTYPES  147 array.c        #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES  156 array.c        #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES  939 class.c        #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES  948 class.c        #ifdef 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   18 error.c        #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES   81 error.c        #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES   98 error.c        #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES  130 error.c        #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES  152 error.c        #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES  192 error.c        #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES  595 error.c        #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES 1046 error.c        #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES 1065 error.c        #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES 1091 error.c        #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES 1127 error.c        #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES   66 eval.c         #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES 1113 eval.c         #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES 4983 eval.c         #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES 5258 eval.c         #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES 6001 eval.c         #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES 6018 eval.c         #ifdef 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   25 ext/win32ole/win32ole.c #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES  569 ext/win32ole/win32ole.c #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES  129 missing.h      # ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES  229 struct.c       #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES  238 struct.c       #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES  383 struct.c       #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      25 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      45 ruby.c         #ifndef HAVE_STDLIB_H
HAVE_STDLIB_H      27 ruby.h         #ifdef HAVE_STDLIB_H
HAVE_STDLIB_H       8 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      74 eval.c         #ifndef HAVE_STRING_H
HAVE_STRING_H      56 file.c         #ifndef HAVE_STRING_H
HAVE_STRING_H      40 missing/isinf.c #ifdef HAVE_STRING_H
HAVE_STRING_H     909 process.c      #ifndef HAVE_STRING_H
HAVE_STRING_H      26 regex.c        #ifdef HAVE_STRING_H
HAVE_STRING_H      98 regex.c        #ifdef HAVE_STRING_H
HAVE_STRING_H      37 ruby.c         #ifndef HAVE_STRING_H
HAVE_STRING_H      31 ruby.h         #ifdef HAVE_STRING_H
HAVE_STRING_H      24 util.c         #ifndef HAVE_STRING_H


HAVE_ST_RDEV

HAVE_ST_RDEV      404 file.c         #ifdef HAVE_ST_RDEV
HAVE_ST_RDEV      426 file.c         #if defined(HAVE_ST_RDEV) && defined(major)
HAVE_ST_RDEV      449 file.c         #if defined(HAVE_ST_RDEV) && defined(minor)


HAVE_SYS_TIME_H

HAVE_SYS_TIME_H    13 ext/openssl/ossl_asn1.c #if defined(HAVE_SYS_TIME_H)
HAVE_SYS_TIME_H    59 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_WAIT_H

HAVE_SYS_WAIT_H    18 ext/pty/pty.c  #ifdef HAVE_SYS_WAIT_H
HAVE_SYS_WAIT_H    42 process.c      #ifdef HAVE_SYS_WAIT_H


HAVE_TIMES

HAVE_TIMES         62 process.c      #if defined(HAVE_TIMES) || defined(_WIN32)
HAVE_TIMES       3326 process.c      #if defined(HAVE_TIMES) && !defined(__CHECKER__)
HAVE_TIMES       3455 process.c      #if defined(HAVE_TIMES) || defined(_WIN32)


HAVE_TRUNCATE

HAVE_TRUNCATE    3017 file.c         #ifdef HAVE_TRUNCATE
HAVE_TRUNCATE    3078 file.c         #ifdef HAVE_TRUNCATE


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      78 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      74 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     182 random.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      67 util.c         #ifdef HAVE_UNISTD_H


HAVE_UTIME_H

HAVE_UTIME_H       46 file.c         #ifdef HAVE_UTIME_H
HAVE_UTIME_H     2016 file.c         #if !defined HAVE_UTIME_H && !defined HAVE_SYS_UTIME_H


HAVE_WAITPID

HAVE_WAITPID      557 process.c      #if !defined(HAVE_WAITPID) && !defined(HAVE_WAIT4)
HAVE_WAITPID      577 process.c      #ifdef HAVE_WAITPID


HEAPCNT

HEAPCNT          10247 parse.c            size_t cnt = HEAPCNT(1, size);
HEAPCNT          10258 parse.c            size_t cnt = HEAPCNT(nelem, size);
HEAPCNT          10271 parse.c            size_t cnt = HEAPCNT(1, size);
HEAPCNT          6249 parse.y            size_t cnt = HEAPCNT(1, size);
HEAPCNT          6260 parse.y            size_t cnt = HEAPCNT(nelem, size);
HEAPCNT          6273 parse.y            size_t cnt = HEAPCNT(1, size);


HEAP_MIN_SLOTS

HEAP_MIN_SLOTS    320 gc.c           static int heap_slots = HEAP_MIN_SLOTS;
HEAP_MIN_SLOTS    353 gc.c           	    if (heap_slots == HEAP_MIN_SLOTS) {
HEAP_MIN_SLOTS    356 gc.c           	    heap_slots = HEAP_MIN_SLOTS;


HEXPREFIX

HEXPREFIX         786 missing/vsnprintf.c 			flags = (flags) | QUADINT | HEXPREFIX;
HEXPREFIX         790 missing/vsnprintf.c 			flags = (flags & ~QUADINT) | HEXPREFIX;
HEXPREFIX         792 missing/vsnprintf.c 			flags = (flags) | HEXPREFIX;
HEXPREFIX         852 missing/vsnprintf.c 				flags |= HEXPREFIX;
HEXPREFIX         913 missing/vsnprintf.c 		else if (flags & HEXPREFIX)
HEXPREFIX         924 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         358 ext/nkf/nkf-utf8/nkf.c static unsigned char   hold_buf[HOLD_SIZE*2];
HOLD_SIZE        2332 ext/nkf/nkf-utf8/nkf.c     if (hold_count >= HOLD_SIZE*2)
HOLD_SIZE        2335 ext/nkf/nkf-utf8/nkf.c     return ((hold_count >= HOLD_SIZE*2) ? EOF : hold_count);


HZ

HZ               3327 process.c      #ifndef HZ
HZ               3339 process.c      			 utime = rb_float_new((double)buf.tms_utime / HZ),
HZ               3340 process.c      			 stime = rb_float_new((double)buf.tms_stime / HZ),
HZ               3341 process.c      			 cutime = rb_float_new((double)buf.tms_cutime / HZ),
HZ               3342 process.c      			 sctime = rb_float_new((double)buf.tms_cstime / HZ));


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        11450 eval.c             IA64_INIT(th->bstr_ptr = 0);\
IA64_INIT        11451 eval.c             IA64_INIT(th->bstr_len = 0);\


ICONV2VALUE

ICONV2VALUE       549 ext/iconv/iconv.c     DATA_PTR(self) = (void *)ICONV2VALUE(iconv_create(to, from));
ICONV2VALUE       572 ext/iconv/iconv.c     VALUE cd = ICONV2VALUE(iconv_create(to, from));
ICONV2VALUE       647 ext/iconv/iconv.c     return rb_ensure(iconv_s_convert, (VALUE)&arg, iconv_free, ICONV2VALUE(arg.cd));
ICONV2VALUE       674 ext/iconv/iconv.c     return rb_ensure(iconv_s_convert, (VALUE)&arg, iconv_free, ICONV2VALUE(arg.cd));


ICONV_FREE

ICONV_FREE        228 ext/iconv/iconv.c     if (RDATA(obj)->dfree != ICONV_FREE) {
ICONV_FREE        515 ext/iconv/iconv.c     return Data_Wrap_Struct(klass, 0, ICONV_FREE, 0);
ICONV_FREE        574 ext/iconv/iconv.c     self = Data_Wrap_Struct(self, NULL, ICONV_FREE, (void *)cd);


ID

ID                 20 array.c        static ID id_cmp;
ID               1340 array.c        static ID inspect_key;
ID                 53 class.c            ID mid;
ID                 72 class.c        	ID id;
ID                176 class.c            ID id;
ID                215 class.c            ID id;
ID                247 class.c            ID id;
ID                288 class.c            ID id;
ID                303 class.c            ID id;
ID                325 class.c            ID id;
ID                527 class.c            ID name;
ID                551 class.c            ID name;
ID                560 class.c            ID name;
ID                569 class.c            ID name;
ID                578 class.c            ID name;
ID                587 class.c            ID key;
ID                607 class.c            int (*func) _((ID, long, VALUE));
ID                801 class.c            ID name;
ID                815 class.c            ID id = rb_intern(name);
ID                 17 compar.c       static ID cmp;
ID                 18 enum.c         static ID id_each, id_eqq, id_cmp;
ID                 20 env.h              ID last_func;
ID                 21 env.h              ID orig_func;
ID                 38 env.h              ID *local_tbl;
ID                 54 env.h              ID id;
ID                491 error.c            ID bt = rb_intern("bt");
ID                596 error.c        rb_name_error(ID id, const char *fmt, ...)
ID                599 error.c            ID id;
ID                270 eval.c         NORETURN(static void print_undef _((VALUE, ID)));
ID                274 eval.c             ID id;
ID                282 eval.c         static ID removed, singleton_removed, undefined, singleton_undefined;
ID                289 eval.c             ID mid;			/* method's id */
ID                290 eval.c             ID mid0;			/* method's original id */
ID                316 eval.c             ID id;
ID                332 eval.c             ID id;
ID                362 eval.c         static ID init, eqq, each, aref, aset, match, missing;
ID                363 eval.c         static ID added, singleton_added;
ID                364 eval.c         static ID __id__, __send__, respond_to;
ID                374 eval.c             ID mid;
ID                429 eval.c             ID id;
ID                446 eval.c             ID *idp;
ID                449 eval.c             ID id = *idp;
ID                507 eval.c             ID id;
ID                517 eval.c             ID mid;
ID                597 eval.c             ID name;
ID                598 eval.c             ID noex;
ID                626 eval.c             ID id;
ID                651 eval.c             ID id;
ID                656 eval.c             ID attriv;
ID                803 eval.c             ID id;
ID                818 eval.c             ID id;
ID                831 eval.c             ID id;
ID                845 eval.c             ID id;
ID                860 eval.c             ID id;
ID                868 eval.c             ID id;
ID                898 eval.c             ID id;
ID                906 eval.c             ID id;
ID                917 eval.c             ID id;
ID               1068 eval.c         static VALUE rb_call _((VALUE,VALUE,ID,int,const VALUE*,int));
ID               1094 eval.c         static void call_trace_func _((rb_event_t,NODE*,VALUE,ID,VALUE));
ID               1665 eval.c             ID id;
ID               1804 eval.c             ID id;
ID               1828 eval.c             ID id;
ID               1956 eval.c             ID id;
ID               2062 eval.c             ID name, def;
ID               2147 eval.c         	copy->nd_tbl = ALLOC_N(ID, node->nd_tbl[0]+1);
ID               2148 eval.c         	MEMCPY(copy->nd_tbl, node->nd_tbl, ID, node->nd_tbl[0]+1);
ID               2298 eval.c         		ID id = node->nd_mid;
ID               2596 eval.c             ID id;
ID               2746 eval.c         	ID id = rb_intern("to_a");
ID               3506 eval.c         	    ID id = node->nd_next->nd_vid;
ID               3909 eval.c         	    ID cname;
ID               3965 eval.c         	    ID cname;
ID               4105 eval.c             ID id;
ID               4125 eval.c             ID id;
ID               4146 eval.c             ID id;
ID               4221 eval.c             ID id = rb_to_id(mid);
ID               4261 eval.c             ID id = rb_to_id(mid);
ID               4301 eval.c             ID id = rb_to_id(mid);
ID               4574 eval.c             ID exception;
ID               5459 eval.c             ID id;
ID               5511 eval.c             ID    id;
ID               5627 eval.c             ID    id;
ID               5628 eval.c             ID    oid;
ID               5872 eval.c             ID    mid;
ID               5879 eval.c             ID     id = mid;
ID               5926 eval.c             ID mid;
ID               5977 eval.c             ID mid;
ID               6002 eval.c         rb_funcall(VALUE recv, ID mid, int n, ...)
ID               6006 eval.c             ID mid;
ID               6019 eval.c         rb_funcall_rescue(VALUE recv, ID mid, int n, ...)
ID               6023 eval.c             ID mid;
ID               6052 eval.c             ID mid;
ID               6062 eval.c             ID mid;
ID               6208 eval.c         ID
ID               6649 eval.c             volatile ID last_func;
ID               6997 eval.c         	ID func;
ID               7095 eval.c             ID ex;
ID               7305 eval.c             ID id;
ID               7520 eval.c             ID id;
ID               7531 eval.c             ID id;
ID               7539 eval.c             ID id;
ID               7564 eval.c             ID *tbl;
ID               7868 eval.c             ID id = rb_to_id(sym);
ID               7963 eval.c             ID *tbl;
ID               8733 eval.c             ID id, oid;
ID               8751 eval.c             ID id;
ID               8758 eval.c             ID oid = id;
ID               9380 eval.c             ID id;
ID               11713 eval.c             const ID *tbl;
ID               11721 eval.c         	    ID id = *tbl++;
ID               12177 eval.c             ID id;
ID               12225 eval.c             ID id;
ID               12291 eval.c             ID key;
ID                 37 ext/digest/digest.c static ID id_metadata;
ID                 25 ext/digest/rmd160/rmd160init.c     ID id_metadata;
ID                 25 ext/digest/sha1/sha1init.c     ID id_metadata;
ID                 26 ext/digest/sha2/sha2init.c     ID id_metadata;
ID                 16 ext/dl/dl.c    static ID id_call;
ID                278 ext/dl/dl.h      ID   *ids;
ID                564 ext/dl/ptr.c     data->ids  = (ID*)dlmalloc(sizeof(ID) * data->ids_num);
ID                731 ext/dl/ptr.c     ID id;
ID                845 ext/dl/ptr.c     ID id;
ID                321 ext/dl/sym.c   static ID rb_dl_id_DLErrno;
ID                339 ext/dl/sym.c   static ID rb_dl_id_DLW32Error;
ID                 25 ext/enumerator/enumerator.c static ID sym_each, sym_each_with_index, sym_each_slice, sym_each_cons;
ID                 26 ext/enumerator/enumerator.c static ID id_new, id_enum_obj, id_enum_method, id_enum_args;
ID                 93 ext/iconv/iconv.c static ID rb_success, rb_failed;
ID                251 ext/openssl/ossl.c ID ossl_s_to_der;
ID                153 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                663 ext/openssl/ossl_ssl.c         ID id_sysread = rb_intern("sysread");
ID                707 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               1835 ext/socket/socket.c 	static ID for_fd = 0;
ID               1288 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                150 ext/win32ole/win32ole.c static ID id_events;
ID               1279 ext/win32ole/win32ole.c     ID id;
ID               2666 ext/win32ole/win32ole.c     ID id;
ID               1705 ext/zlib/zlib.c static ID id_write, id_read, id_flush, id_seek, id_close;
ID                644 gc.c               ID key;
ID                 47 hash.c         static ID id_hash, id_call, id_default;
ID                107 intern.h       VALUE rb_define_class_id _((ID, VALUE));
ID                109 intern.h       VALUE rb_define_module_id _((ID));
ID                118 intern.h       void rb_define_method_id _((VALUE, ID, VALUE (*)(ANYARGS), int));
ID                120 intern.h       void rb_undef _((VALUE, ID));
ID                135 intern.h       NORETURN(void rb_name_error __((ID, const char*, ...)));
ID                157 intern.h       void rb_alias _((VALUE, ID, ID));
ID                158 intern.h       void rb_attr _((VALUE,ID,int,int,int));
ID                159 intern.h       int rb_method_boundp _((VALUE, ID, int));
ID                160 intern.h       VALUE rb_dvar_defined _((ID));
ID                161 intern.h       VALUE rb_dvar_curr _((ID));
ID                162 intern.h       VALUE rb_dvar_ref _((ID));
ID                163 intern.h       void rb_dvar_asgn _((ID, VALUE));
ID                164 intern.h       void rb_dvar_push _((ID, VALUE));
ID                167 intern.h       int rb_obj_respond_to _((VALUE, ID, int));
ID                168 intern.h       int rb_respond_to _((VALUE, ID));
ID                170 intern.h       VALUE rb_apply _((VALUE, ID, VALUE));
ID                172 intern.h       ID rb_frame_last_func _((void));
ID                219 intern.h       VALUE rb_thread_local_aref _((VALUE, ID));
ID                220 intern.h       VALUE rb_thread_local_aset _((VALUE, ID, VALUE));
ID                222 intern.h       VALUE rb_funcall_rescue __((VALUE, ID, int, ...));
ID                329 intern.h       ID rb_id_attrset _((ID));
ID                334 intern.h       int rb_is_const_id _((ID));
ID                335 intern.h       int rb_is_instance_id _((ID));
ID                336 intern.h       int rb_is_class_id _((ID));
ID                337 intern.h       int rb_is_local_id _((ID));
ID                338 intern.h       int rb_is_junk_id _((ID));
ID                433 intern.h       void rb_str_setter _((VALUE, ID, VALUE*));
ID                441 intern.h       VALUE rb_struct_getmember _((VALUE, ID));
ID                452 intern.h       void rb_name_class _((VALUE, ID));
ID                454 intern.h       void rb_autoload _((VALUE, ID, const char*));
ID                455 intern.h       VALUE rb_autoload_load _((VALUE, ID));
ID                456 intern.h       VALUE rb_autoload_p _((VALUE, ID));
ID                461 intern.h       void rb_alias_variable _((ID, ID));
ID                467 intern.h       VALUE rb_ivar_get _((VALUE, ID));
ID                468 intern.h       VALUE rb_ivar_set _((VALUE, ID, VALUE));
ID                469 intern.h       VALUE rb_ivar_defined _((VALUE, ID));
ID                472 intern.h       VALUE rb_attr_get _((VALUE, ID));
ID                480 intern.h       int rb_const_defined _((VALUE, ID));
ID                481 intern.h       int rb_const_defined_at _((VALUE, ID));
ID                482 intern.h       int rb_const_defined_from _((VALUE, ID));
ID                483 intern.h       VALUE rb_const_get _((VALUE, ID));
ID                484 intern.h       VALUE rb_const_get_at _((VALUE, ID));
ID                485 intern.h       VALUE rb_const_get_from _((VALUE, ID));
ID                486 intern.h       void rb_const_set _((VALUE, ID, VALUE));
ID                489 intern.h       VALUE rb_cvar_defined _((VALUE, ID));
ID                491 intern.h       void rb_cvar_set _((VALUE, ID, VALUE, int));
ID                492 intern.h       VALUE rb_cvar_get _((VALUE, ID));
ID                126 io.c           static ID id_write, id_read, id_getc;
ID               1716 io.c               ID id;
ID               3956 io.c               ID mid;
ID               3958 io.c               ID id;
ID               3970 io.c               ID id;
ID               3980 io.c               ID id;
ID               3990 io.c               ID id;
ID                 83 marshal.c      static ID s_dump, s_load, s_mdump, s_mload;
ID                 84 marshal.c      static ID s_dump_data, s_load_data, s_alloc;
ID                 85 marshal.c      static ID s_getc, s_read, s_write, s_binmode;
ID                328 marshal.c          ID id;
ID                424 marshal.c          ID id;
ID                897 marshal.c      static ID
ID                901 marshal.c          ID id;
ID                910 marshal.c      static ID
ID                914 marshal.c          ID id;
ID                922 marshal.c      static ID
ID                966 marshal.c      	    ID id = r_symbol(arg);
ID               1198 marshal.c      	    ID slot;
ID                133 node.h         	ID id;
ID                136 node.h         	ID *tbl;
ID                140 node.h         	ID id;
ID                146 node.h         	ID id;
ID                350 node.h         void rb_add_method _((VALUE, ID, NODE *, int));
ID                353 node.h         NODE* rb_method_node _((VALUE klass, ID id));
ID                355 node.h         struct global_entry *rb_global_entry _((ID));
ID                 66 numeric.c      static ID id_coerce, id_to_i, id_eq;
ID               1487 numeric.c      	ID cmp;
ID               2607 numeric.c          ID id = FIX2UINT(fix);
ID                 34 object.c       static ID id_eq, id_eql, id_inspect, id_init_copy;
ID                379 object.c           ID id;
ID               1139 object.c           ID id = SYM2ID(sym);
ID               1171 object.c           ID id = SYM2ID(sym);
ID               1645 object.c       static ID
ID               1658 object.c       ID
ID               1663 object.c           ID id;
ID               1812 object.c           ID id = rb_to_id(name);
ID               1836 object.c           ID id = rb_to_id(name);
ID               1859 object.c           ID id = rb_to_id(name);
ID               2006 object.c           ID id = rb_to_id(iv);
ID               2039 object.c           ID id = rb_to_id(iv);
ID               2068 object.c           ID id = rb_to_id(iv);
ID               2102 object.c           ID id = rb_to_id(iv);
ID               2117 object.c           ID m;
ID               2500 object.c           ID id = rb_intern(name);
ID                221 parse.c        static ID cur_mid = 0;
ID                269 parse.c        static ID  *local_tbl();
ID                270 parse.c        static ID   internal_id();
ID                308 parse.c            ID id;
ID               3879 parse.c        			    ID vid = yyvsp[-2].node->nd_vid;
ID               4495 parse.c        			    ID vid = yyvsp[-2].node->nd_vid;
ID               8757 parse.c            ID id;
ID               8812 parse.c            ID id;
ID               8861 parse.c            ID id;
ID               8930 parse.c        ID
ID               8932 parse.c            ID id;
ID               8942 parse.c            ID id;
ID               9540 parse.c            ID m;
ID               9552 parse.c            ID m;
ID               9574 parse.c            ID *tbl;
ID               9617 parse.c        static ID*
ID               9626 parse.c            ID id;
ID               9629 parse.c        	lvtbl->tbl = ALLOC_N(ID, 4);
ID               9638 parse.c        	REALLOC_N(lvtbl->tbl, ID, lvtbl->cnt+2);
ID               9647 parse.c            ID id;
ID               9661 parse.c            ID id;
ID               9678 parse.c        	lvtbl->tbl = ALLOC_N(ID, lvtbl->cnt+3);
ID               9679 parse.c        	MEMCPY(lvtbl->tbl, ruby_scope->local_tbl, ID, lvtbl->cnt+1);
ID               9826 parse.c            ID token;
ID               9881 parse.c        static ID last_id = tLAST_TOKEN;
ID               9883 parse.c        static ID
ID               9986 parse.c        ID
ID               9991 parse.c            ID id;
ID               10066 parse.c            ID id;
ID               10083 parse.c        	ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL;
ID               10106 parse.c            ID value;
ID               10140 parse.c            ID id;
ID               10148 parse.c            ID id;
ID               10156 parse.c            ID id;
ID               10164 parse.c            ID id;
ID               10172 parse.c            ID id;
ID                124 parse.y        static ID cur_mid = 0;
ID                172 parse.y        static ID  *local_tbl();
ID                173 parse.y        static ID   internal_id();
ID                210 parse.y            ID id;
ID                518 parse.y        			    ID vid = $1->nd_vid;
ID                982 parse.y        			    ID vid = $1->nd_vid;
ID               4759 parse.y            ID id;
ID               4814 parse.y            ID id;
ID               4863 parse.y            ID id;
ID               4932 parse.y        ID
ID               4934 parse.y            ID id;
ID               4944 parse.y            ID id;
ID               5542 parse.y            ID m;
ID               5554 parse.y            ID m;
ID               5576 parse.y            ID *tbl;
ID               5619 parse.y        static ID*
ID               5628 parse.y            ID id;
ID               5631 parse.y        	lvtbl->tbl = ALLOC_N(ID, 4);
ID               5640 parse.y        	REALLOC_N(lvtbl->tbl, ID, lvtbl->cnt+2);
ID               5649 parse.y            ID id;
ID               5663 parse.y            ID id;
ID               5680 parse.y        	lvtbl->tbl = ALLOC_N(ID, lvtbl->cnt+3);
ID               5681 parse.y        	MEMCPY(lvtbl->tbl, ruby_scope->local_tbl, ID, lvtbl->cnt+1);
ID               5828 parse.y            ID token;
ID               5883 parse.y        static ID last_id = tLAST_TOKEN;
ID               5885 parse.y        static ID
ID               5988 parse.y        ID
ID               5993 parse.y            ID id;
ID               6068 parse.y            ID id;
ID               6085 parse.y        	ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL;
ID               6108 parse.y            ID value;
ID               6142 parse.y            ID id;
ID               6150 parse.y            ID id;
ID               6158 parse.y            ID id;
ID               6166 parse.y            ID id;
ID               6174 parse.y            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                341 range.c        	    ID c = rb_intern(EXCL(range) ? "<" : "<=");
ID               2153 re.c               ID id;
ID               1004 ruby.c             ID id;
ID               1120 ruby.c             ID id;
ID                508 ruby.h         ID rb_intern _((const char*));
ID                509 ruby.h         char *rb_id2name _((ID));
ID                510 ruby.h         ID rb_to_id _((VALUE));
ID                520 ruby.h         VALUE rb_funcall __((VALUE, ID, int, ...));
ID                521 ruby.h         VALUE rb_funcall2 _((VALUE, ID, int, const VALUE*));
ID                522 ruby.h         VALUE rb_funcall3 _((VALUE, ID, int, const VALUE*));
ID                289 string.c       static ID id_to_s;
ID               1450 string.c           ID succ = rb_intern("succ");
ID               4392 string.c           ID id;
ID               4607 string.c           ID id;
ID                 25 struct.c           ID id;
ID                102 struct.c           ID id;
ID                163 struct.c           ID id;
ID                185 struct.c           ID id;
ID                214 struct.c       	ID id = SYM2ID(RARRAY(members)->ptr[i]);
ID                256 struct.c       	ID slot = rb_intern(mem);
ID                307 struct.c           ID id;
ID                483 struct.c       	ID id;
ID                570 struct.c           ID id;
ID                629 struct.c           ID id;
ID                 23 variable.c     static ID autoload, classpath, tmp_classpath;
ID                 36 variable.c         ID name;
ID                 46 variable.c         ID name;
ID                 72 variable.c         ID key;
ID                152 variable.c     	    ID classid = rb_intern("__classid__");
ID                242 variable.c         ID id;
ID                280 variable.c         ID id;
ID                325 variable.c         ID id;
ID                342 variable.c         ID id;
ID                367 variable.c         ID id;
ID                377 variable.c         ID id;
ID                395 variable.c         ID id;
ID                404 variable.c         ID id;
ID                420 variable.c         ID id;
ID                430 variable.c         ID id;
ID                446 variable.c         ID id;
ID                454 variable.c         ID key;
ID                477 variable.c     static ID
ID                481 variable.c         ID id;
ID                501 variable.c         ID id = global_id(name);
ID                636 variable.c         ID id;
ID                760 variable.c         ID key;
ID                796 variable.c         ID name1;
ID                797 variable.c         ID name2;
ID                851 variable.c         ID id;
ID                873 variable.c         ID id;
ID                898 variable.c         ID id;
ID                914 variable.c         ID id;
ID                944 variable.c         ID key;
ID               1003 variable.c         ID id;
ID               1029 variable.c         ID id;
ID               1037 variable.c         ID id;
ID               1045 variable.c         ID id;
ID               1068 variable.c         ID id;
ID               1087 variable.c         ID key;
ID               1170 variable.c         ID id = rb_to_id(name);
ID               1199 variable.c     NORETURN(static void uninitialized_constant _((VALUE, ID)));
ID               1203 variable.c         ID id;
ID               1217 variable.c         ID id;
ID               1275 variable.c         ID id;
ID               1310 variable.c         ID id;
ID               1337 variable.c         ID id;
ID               1351 variable.c         ID id;
ID               1386 variable.c         ID id;
ID               1400 variable.c         ID id;
ID               1435 variable.c         ID id;
ID               1443 variable.c         ID id;
ID               1451 variable.c         ID id;
ID               1469 variable.c         ID id = rb_to_id(name);
ID               1497 variable.c         ID key;
ID               1541 variable.c         ID key, value;
ID               1582 variable.c         ID id;
ID               1610 variable.c         ID id;
ID               1618 variable.c         ID id;
ID               1626 variable.c         ID id;
ID               1634 variable.c         ID id;
ID               1670 variable.c         ID id;
ID               1682 variable.c         ID id = rb_intern(name);
ID               1712 variable.c         ID id;
ID               1733 variable.c         ID id;
ID               1763 variable.c         ID id;
ID               1789 variable.c         ID id;
ID               1810 variable.c         ID id = rb_intern(name);
ID               1822 variable.c         ID id = rb_intern(name);
ID               1835 variable.c         ID id = rb_intern(name);
ID               1845 variable.c         ID key;
ID               1915 variable.c         ID id = rb_to_id(name);
ID               1942 variable.c         ID id = rb_intern(name);
ID               1953 variable.c         ID id = rb_intern(name);


ID2SYM

ID2SYM            613 error.c            argv[1] = ID2SYM(id);
ID2SYM            401 eval.c         	    rb_funcall(rb_iv_get(klass, "__attached__"), singleton_added, 1, ID2SYM(mid));
ID2SYM            404 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           1682 eval.c             rb_iv_set(exc, "@reason", ID2SYM(id));
ID2SYM           1995 eval.c         		   singleton_undefined, 1, ID2SYM(id));
ID2SYM           1998 eval.c         	rb_funcall(klass, undefined, 1, ID2SYM(id));
ID2SYM           2102 eval.c         	rb_funcall(singleton, singleton_added, 1, ID2SYM(name));
ID2SYM           2105 eval.c         	rb_funcall(klass, added, 1, ID2SYM(name));
ID2SYM           2642 eval.c         					    id?ID2SYM(id):Qnil,
ID2SYM           4116 eval.c         	args[n++] = ID2SYM(id);
ID2SYM           5530 eval.c             nargv[0] = ID2SYM(id);
ID2SYM           12294 eval.c             rb_ary_push(ary, ID2SYM(key));
ID2SYM           12817 eval.c             tag = ID2SYM(rb_to_id(tag));
ID2SYM           12845 eval.c             return rb_iterate((VALUE(*)_((VALUE)))catch_i, ID2SYM(rb_intern(tag)), func, data);
ID2SYM           12869 eval.c             tag = ID2SYM(rb_to_id(tag));
ID2SYM           12901 eval.c             argv[0] = ID2SYM(rb_intern(tag));
ID2SYM            289 ext/enumerator/enumerator.c     sym_each		= ID2SYM(rb_intern("each"));
ID2SYM            290 ext/enumerator/enumerator.c     sym_each_with_index	= ID2SYM(rb_intern("each_with_index"));
ID2SYM            291 ext/enumerator/enumerator.c     sym_each_slice	= ID2SYM(rb_intern("each_slice"));
ID2SYM            292 ext/enumerator/enumerator.c     sym_each_cons	= ID2SYM(rb_intern("each_cons"));
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           2202 ext/syck/rubyext.c     sym_model = ID2SYM(rb_intern("Model"));
ID2SYM           2203 ext/syck/rubyext.c     sym_generic = ID2SYM(rb_intern("Generic"));
ID2SYM           2204 ext/syck/rubyext.c     sym_bytecode = ID2SYM(rb_intern("bytecode"));
ID2SYM           2205 ext/syck/rubyext.c     sym_map = ID2SYM(rb_intern("map"));
ID2SYM           2206 ext/syck/rubyext.c     sym_scalar = ID2SYM(rb_intern("scalar"));
ID2SYM           2207 ext/syck/rubyext.c     sym_seq = ID2SYM(rb_intern("seq"));
ID2SYM           2208 ext/syck/rubyext.c     sym_1quote = ID2SYM(rb_intern("quote1"));
ID2SYM           2209 ext/syck/rubyext.c     sym_2quote = ID2SYM(rb_intern("quote2"));
ID2SYM           2210 ext/syck/rubyext.c     sym_fold = ID2SYM(rb_intern("fold"));
ID2SYM           2211 ext/syck/rubyext.c     sym_literal = ID2SYM(rb_intern("literal"));
ID2SYM           2212 ext/syck/rubyext.c     sym_plain = ID2SYM(rb_intern("plain"));
ID2SYM           2213 ext/syck/rubyext.c     sym_inline = ID2SYM(rb_intern("inline"));
ID2SYM           1246 ext/tk/tkutil/tkutil.c             arg_sym = ID2SYM(rb_intern(str));
ID2SYM           1216 marshal.c      		if (RARRAY(mem)->ptr[i] != ID2SYM(slot)) {
ID2SYM           1336 marshal.c      	v = ID2SYM(r_symreal(arg));
ID2SYM           1340 marshal.c      	return ID2SYM(r_symlink(arg));
ID2SYM           2610 numeric.c      	return ID2SYM(id);
ID2SYM           5675 parse.c        			yyval.node = NEW_LIT(ID2SYM(yyvsp[0].id));
ID2SYM           5915 parse.c        				    yyval.node->nd_lit = ID2SYM(rb_intern(RSTRING(yyval.node->nd_lit)->ptr));
ID2SYM           10109 parse.c            rb_ary_push(ary, ID2SYM(value));
ID2SYM           1933 parse.y        			$$ = NEW_LIT(ID2SYM($1));
ID2SYM           2159 parse.y        				    $$->nd_lit = ID2SYM(rb_intern(RSTRING($$->nd_lit)->ptr));
ID2SYM           6111 parse.y            rb_ary_push(ary, ID2SYM(value));
ID2SYM           4400 string.c           return ID2SYM(id);
ID2SYM            108 struct.c           slot = ID2SYM(id);
ID2SYM            202 struct.c       	    rb_mod_remove_const(klass, ID2SYM(id));
ID2SYM            257 struct.c       	rb_ary_push(ary, ID2SYM(slot));
ID2SYM            312 struct.c       	RARRAY(rest)->ptr[i] = ID2SYM(id);
ID2SYM            319 struct.c       	    rb_ary_unshift(rest, ID2SYM(id));
ID2SYM            282 variable.c         rb_iv_set(klass, "__classid__", ID2SYM(id));
ID2SYM           1219 variable.c         return rb_funcall(klass, rb_intern("const_missing"), 1, ID2SYM(id));


ID_ALLOCATOR

ID_ALLOCATOR      593 class.c            if (key == ID_ALLOCATOR) return ST_CONTINUE;
ID_ALLOCATOR      393 eval.c         	mid = ID_ALLOCATOR;
ID_ALLOCATOR      399 eval.c             if (node && mid != ID_ALLOCATOR && ruby_running) {
ID_ALLOCATOR      415 eval.c             rb_add_method(CLASS_OF(klass), ID_ALLOCATOR, NEW_CFUNC(func, 0), NOEX_PRIVATE);
ID_ALLOCATOR      423 eval.c             rb_add_method(CLASS_OF(klass), ID_ALLOCATOR, 0, NOEX_UNDEF);
ID_ALLOCATOR     2608 eval.c             if (id == ID_ALLOCATOR) return;
ID_ALLOCATOR     5525 eval.c             else if (id == ID_ALLOCATOR) {
ID_ALLOCATOR     6104 eval.c             if (frame->last_func == ID_ALLOCATOR) {
ID_ALLOCATOR     1569 object.c           obj = rb_funcall(klass, ID_ALLOCATOR, 0, 0);


ID_ATTRSET

ID_ATTRSET        162 parse.c        #define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET)
ID_ATTRSET       8935 parse.c            id |= ID_ATTRSET;
ID_ATTRSET       10039 parse.c        	    id = ID_ATTRSET;
ID_ATTRSET         65 parse.y        #define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET)
ID_ATTRSET       4937 parse.y            id |= ID_ATTRSET;
ID_ATTRSET       6041 parse.y        	    id = ID_ATTRSET;


ID_CLASS

ID_CLASS          164 parse.c        #define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS)
ID_CLASS          170 parse.c        	 ((id)&ID_SCOPE_MASK) == ID_CLASS))
ID_CLASS         10007 parse.c        	    id |= ID_CLASS;
ID_CLASS           67 parse.y        #define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS)
ID_CLASS           73 parse.y        	 ((id)&ID_SCOPE_MASK) == ID_CLASS))
ID_CLASS         6009 parse.y        	    id |= ID_CLASS;


ID_CONST

ID_CONST          163 parse.c        #define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST)
ID_CONST         10042 parse.c        	    id = ID_CONST;
ID_CONST         10096 parse.c        	    id2 = (id & ~ID_SCOPE_MASK) | ID_CONST;
ID_CONST           66 parse.y        #define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST)
ID_CONST         6044 parse.y        	    id = ID_CONST;
ID_CONST         6098 parse.y        	    id2 = (id & ~ID_SCOPE_MASK) | ID_CONST;


ID_GLOBAL

ID_GLOBAL         160 parse.c        #define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL)
ID_GLOBAL         168 parse.c        	(((id)&ID_SCOPE_MASK) == ID_GLOBAL || \
ID_GLOBAL        10001 parse.c        	id |= ID_GLOBAL;
ID_GLOBAL          63 parse.y        #define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL)
ID_GLOBAL          71 parse.y        	(((id)&ID_SCOPE_MASK) == ID_GLOBAL || \
ID_GLOBAL        6003 parse.y        	id |= ID_GLOBAL;


ID_INSTANCE

ID_INSTANCE       161 parse.c        #define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE)
ID_INSTANCE       169 parse.c        	 ((id)&ID_SCOPE_MASK) == ID_INSTANCE || \
ID_INSTANCE      10010 parse.c        	    id |= ID_INSTANCE;
ID_INSTANCE        64 parse.y        #define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE)
ID_INSTANCE        72 parse.y        	 ((id)&ID_SCOPE_MASK) == ID_INSTANCE || \
ID_INSTANCE      6012 parse.y        	    id |= ID_INSTANCE;


ID_INTERNAL

ID_INTERNAL      9886 parse.c            return ID_INTERNAL | (++last_id << ID_SCOPE_SHIFT);
ID_INTERNAL      5888 parse.y            return ID_INTERNAL | (++last_id << ID_SCOPE_SHIFT);


ID_JUNK

ID_JUNK           156 parse.c        #define ID_INTERNAL ID_JUNK
ID_JUNK           165 parse.c        #define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK)
ID_JUNK          10054 parse.c            if (*m) id = ID_JUNK;
ID_JUNK            59 parse.y        #define ID_INTERNAL ID_JUNK
ID_JUNK            68 parse.y        #define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK)
ID_JUNK          6056 parse.y            if (*m) id = ID_JUNK;


ID_LOCAL

ID_LOCAL          159 parse.c        #define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL)
ID_LOCAL         10045 parse.c        	    id = ID_LOCAL;
ID_LOCAL         10083 parse.c        	ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL;
ID_LOCAL           62 parse.y        #define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL)
ID_LOCAL         6047 parse.y        	    id = ID_LOCAL;
ID_LOCAL         6085 parse.y        	ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL;


ID_SCOPE_MASK

ID_SCOPE_MASK     159 parse.c        #define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL)
ID_SCOPE_MASK     160 parse.c        #define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL)
ID_SCOPE_MASK     161 parse.c        #define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE)
ID_SCOPE_MASK     162 parse.c        #define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET)
ID_SCOPE_MASK     163 parse.c        #define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST)
ID_SCOPE_MASK     164 parse.c        #define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS)
ID_SCOPE_MASK     165 parse.c        #define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK)
ID_SCOPE_MASK     168 parse.c        	(((id)&ID_SCOPE_MASK) == ID_GLOBAL || \
ID_SCOPE_MASK     169 parse.c        	 ((id)&ID_SCOPE_MASK) == ID_INSTANCE || \
ID_SCOPE_MASK     170 parse.c        	 ((id)&ID_SCOPE_MASK) == ID_CLASS))
ID_SCOPE_MASK    8934 parse.c            id &= ~ID_SCOPE_MASK;
ID_SCOPE_MASK    10083 parse.c        	ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL;
ID_SCOPE_MASK    10096 parse.c        	    id2 = (id & ~ID_SCOPE_MASK) | ID_CONST;
ID_SCOPE_MASK      62 parse.y        #define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL)
ID_SCOPE_MASK      63 parse.y        #define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL)
ID_SCOPE_MASK      64 parse.y        #define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE)
ID_SCOPE_MASK      65 parse.y        #define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET)
ID_SCOPE_MASK      66 parse.y        #define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST)
ID_SCOPE_MASK      67 parse.y        #define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS)
ID_SCOPE_MASK      68 parse.y        #define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK)
ID_SCOPE_MASK      71 parse.y        	(((id)&ID_SCOPE_MASK) == ID_GLOBAL || \
ID_SCOPE_MASK      72 parse.y        	 ((id)&ID_SCOPE_MASK) == ID_INSTANCE || \
ID_SCOPE_MASK      73 parse.y        	 ((id)&ID_SCOPE_MASK) == ID_CLASS))
ID_SCOPE_MASK    4936 parse.y            id &= ~ID_SCOPE_MASK;
ID_SCOPE_MASK    6085 parse.y        	ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL;
ID_SCOPE_MASK    6098 parse.y        	    id2 = (id & ~ID_SCOPE_MASK) | ID_CONST;


ID_SCOPE_SHIFT

ID_SCOPE_SHIFT   9886 parse.c            return ID_INTERNAL | (++last_id << ID_SCOPE_SHIFT);
ID_SCOPE_SHIFT   10056 parse.c            id |= ++last_id << ID_SCOPE_SHIFT;
ID_SCOPE_SHIFT   5888 parse.y            return ID_INTERNAL | (++last_id << ID_SCOPE_SHIFT);
ID_SCOPE_SHIFT   6058 parse.y            id |= ++last_id << ID_SCOPE_SHIFT;


IEVENTSINKOBJ

IEVENTSINKOBJ     186 ext/win32ole/win32ole.c     IEVENTSINKOBJ *pEvent;
IEVENTSINKOBJ    5634 ext/win32ole/win32ole.c     pEv = ALLOC_N(IEVENTSINKOBJ, 1);
IEVENTSINKOBJ    5923 ext/win32ole/win32ole.c     IEVENTSINKOBJ *pIEV;


IEventSinkVtbl

IEventSinkVtbl     89 ext/win32ole/win32ole.c     struct IEventSinkVtbl * lpVtbl;
IEventSinkVtbl    130 ext/win32ole/win32ole.c     IEventSinkVtbl *lpVtbl;
IEventSinkVtbl   5334 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);


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      1081 ext/socket/socket.c 				    (type == INET_SERVER) ? AI_PASSIVE : 0);
INET_SERVER      1086 ext/socket/socket.c     if (type != INET_SERVER && (!NIL_P(arg->local.host) || !NIL_P(arg->local.serv))) {
INET_SERVER      1099 ext/socket/socket.c 	if (type == INET_SERVER) {
INET_SERVER      1134 ext/socket/socket.c     if (type == INET_SERVER)
INET_SERVER      1299 ext/socket/socket.c 	return init_inetsock(sock, arg1, arg2, Qnil, Qnil, INET_SERVER);
INET_SERVER      1301 ext/socket/socket.c 	return init_inetsock(sock, Qnil, arg1, Qnil, Qnil, INET_SERVER);


INET_SOCKS

INET_SOCKS       1116 ext/socket/socket.c 				      (type == INET_SOCKS));
INET_SOCKS       1188 ext/socket/socket.c     return init_inetsock(sock, host, serv, Qnil, Qnil, INET_SOCKS);


INIT_BUF_SIZE

INIT_BUF_SIZE    1302 regex.c            bufp->allocated = INIT_BUF_SIZE;
INIT_BUF_SIZE    1304 regex.c            bufp->buffer = (char*)xrealloc(bufp->buffer, INIT_BUF_SIZE);


INPUT_CODE_FIX

INPUT_CODE_FIX   1364 ext/nkf/nkf-utf8/nkf.c #ifdef INPUT_CODE_FIX
INPUT_CODE_FIX   1372 ext/nkf/nkf-utf8/nkf.c #ifdef INPUT_CODE_FIX


INPUT_OPTION

INPUT_OPTION      405 ext/nkf/nkf-utf8/nkf.c #ifdef INPUT_OPTION
INPUT_OPTION      941 ext/nkf/nkf-utf8/nkf.c #ifdef INPUT_OPTION
INPUT_OPTION     1006 ext/nkf/nkf-utf8/nkf.c #ifdef INPUT_OPTION
INPUT_OPTION     1840 ext/nkf/nkf-utf8/nkf.c #ifdef INPUT_OPTION
INPUT_OPTION     3741 ext/nkf/nkf-utf8/nkf.c #ifdef INPUT_OPTION
INPUT_OPTION     4609 ext/nkf/nkf-utf8/nkf.c #ifdef INPUT_OPTION
INPUT_OPTION     4758 ext/nkf/nkf-utf8/nkf.c #ifdef INPUT_OPTION


INSPECT_LENGTH

INSPECT_LENGTH   1146 ext/strscan/strscan.c     if (p->curr > INSPECT_LENGTH) {
INSPECT_LENGTH   1148 ext/strscan/strscan.c         len = INSPECT_LENGTH;
INSPECT_LENGTH   1167 ext/strscan/strscan.c     if (len > INSPECT_LENGTH) {
INSPECT_LENGTH   1168 ext/strscan/strscan.c         len = INSPECT_LENGTH;


INT2FIX

INT2FIX          2597 array.c        	if (v != INT2FIX(0)) {
INT2FIX          2602 array.c            if (len == 0) return INT2FIX(0);
INT2FIX          2603 array.c            if (len > 0) return INT2FIX(1);
INT2FIX          2604 array.c            return INT2FIX(-1);
INT2FIX           333 bignum.c       	return INT2FIX(0);
INT2FIX           351 bignum.c       	return INT2FIX(0);
INT2FIX           942 bignum.c           if (RBIGNUM(x)->sign > RBIGNUM(y)->sign) return INT2FIX(1);
INT2FIX           943 bignum.c           if (RBIGNUM(x)->sign < RBIGNUM(y)->sign) return INT2FIX(-1);
INT2FIX           945 bignum.c       	return (RBIGNUM(x)->sign) ? INT2FIX(-1) : INT2FIX(1);
INT2FIX           947 bignum.c       	return (RBIGNUM(x)->sign) ? INT2FIX(1) : INT2FIX(-1);
INT2FIX           950 bignum.c           if (-1 == xlen) return INT2FIX(0);
INT2FIX           952 bignum.c       	(RBIGNUM(x)->sign ? INT2FIX(1) : INT2FIX(-1)) :
INT2FIX           953 bignum.c       	    (RBIGNUM(x)->sign ? INT2FIX(-1) : INT2FIX(1));
INT2FIX          1593 bignum.c           if (y == INT2FIX(0)) return INT2FIX(1);
INT2FIX          1823 bignum.c           if (shift < 0) return rb_big_rshift(x, INT2FIX(-shift));
INT2FIX          1860 bignum.c           if (shift < 0) return rb_big_lshift(x, INT2FIX(-shift));
INT2FIX          1864 bignum.c       	    return INT2FIX(0);
INT2FIX          1866 bignum.c       	    return INT2FIX(-1);
INT2FIX          1919 bignum.c       	    return INT2FIX(0);
INT2FIX          1920 bignum.c       	return INT2FIX(1);
INT2FIX          1923 bignum.c           if (shift < 0) return INT2FIX(0);
INT2FIX          1928 bignum.c       	if (s1 >= RBIGNUM(x)->len) return INT2FIX(1);
INT2FIX          1933 bignum.c       	if (s1 >= RBIGNUM(x)->len) return INT2FIX(0);
INT2FIX          1937 bignum.c       	return INT2FIX(1);
INT2FIX          1938 bignum.c           return INT2FIX(0);
INT2FIX            31 compar.c           if (RTEST(rb_funcall(val, '>', 1, INT2FIX(0)))) return 1;
INT2FIX            32 compar.c           if (RTEST(rb_funcall(val, '<', 1, INT2FIX(0)))) return -1;
INT2FIX           663 dir.c              return INT2FIX(0);
INT2FIX           726 dir.c              return INT2FIX(0);
INT2FIX           766 dir.c              return INT2FIX(0);
INT2FIX           786 dir.c              return INT2FIX(0);
INT2FIX          1565 dir.c              rb_file_const("FNM_NOESCAPE", INT2FIX(FNM_NOESCAPE));
INT2FIX          1566 dir.c              rb_file_const("FNM_PATHNAME", INT2FIX(FNM_PATHNAME));
INT2FIX          1567 dir.c              rb_file_const("FNM_DOTMATCH", INT2FIX(FNM_DOTMATCH));
INT2FIX          1568 dir.c              rb_file_const("FNM_CASEFOLD", INT2FIX(FNM_CASEFOLD));
INT2FIX           786 enum.c             rb_yield_values(2, val, INT2FIX(*memo));
INT2FIX           551 error.c            VALUE status = INT2FIX(EXIT_SUCCESS);
INT2FIX           590 error.c            if (status == INT2FIX(EXIT_SUCCESS)) return Qtrue;
INT2FIX           978 eval.c         #define PROT_FUNC   INT2FIX(0)	/* 1 */
INT2FIX           979 eval.c         #define PROT_LOOP   INT2FIX(1)	/* 3 */
INT2FIX           980 eval.c         #define PROT_LAMBDA INT2FIX(2)	/* 5 */
INT2FIX           981 eval.c         #define PROT_YIELD  INT2FIX(3)	/* 7 */
INT2FIX          2641 eval.c         					    INT2FIX(ruby_sourceline),
INT2FIX          8498 eval.c         	return INT2FIX(-1);
INT2FIX          8500 eval.c             if (data->var == (NODE*)1) return INT2FIX(0);
INT2FIX          8501 eval.c             if (data->var == (NODE*)2) return INT2FIX(0);
INT2FIX          8504 eval.c         	return INT2FIX(1);
INT2FIX          8512 eval.c         	if (data->var->nd_args) return INT2FIX(-n-1);
INT2FIX          8513 eval.c         	return INT2FIX(n);
INT2FIX          9178 eval.c         	if (body->nd_argc < 0) return INT2FIX(-1);
INT2FIX          9179 eval.c         	return INT2FIX(body->nd_argc);
INT2FIX          9181 eval.c         	return INT2FIX(-1);
INT2FIX          9183 eval.c         	return INT2FIX(1);
INT2FIX          9185 eval.c         	return INT2FIX(0);
INT2FIX          9194 eval.c         	if (!body) return INT2FIX(0);
INT2FIX          9198 eval.c         	return INT2FIX(n);
INT2FIX          9807 eval.c             arg[1] = rb_ary_new3(1, INT2FIX(sig));
INT2FIX          11211 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           542 ext/dbm/dbm.c      if (dbmp->di_size > 0) return INT2FIX(dbmp->di_size);
INT2FIX           549 ext/dbm/dbm.c      return INT2FIX(i);
INT2FIX           808 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "READER",  INT2FIX(O_RDONLY|RUBY_DBM_RW_BIT));
INT2FIX           809 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "WRITER",  INT2FIX(O_RDWR|RUBY_DBM_RW_BIT));
INT2FIX           810 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "WRCREAT", INT2FIX(O_RDWR|O_CREAT|RUBY_DBM_RW_BIT));
INT2FIX           811 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "NEWDB",   INT2FIX(O_RDWR|O_CREAT|O_TRUNC|RUBY_DBM_RW_BIT));
INT2FIX           604 ext/dl/ptr.c     pass_argv[0] = INT2FIX(DLPTR_CTYPE_STRUCT);
INT2FIX           619 ext/dl/ptr.c     pass_argv[0] = INT2FIX(DLPTR_CTYPE_UNION);
INT2FIX           633 ext/dl/ptr.c       return rb_assoc_new(INT2FIX(data->ctype),
INT2FIX           636 ext/dl/ptr.c       return rb_assoc_new(INT2FIX(data->ctype), Qnil);
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           642 ext/gdbm/gdbm.c     if (dbmp->di_size > 0) return INT2FIX(dbmp->di_size);
INT2FIX           651 ext/gdbm/gdbm.c     return INT2FIX(i);
INT2FIX          1005 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "READER",  INT2FIX(GDBM_READER|RUBY_GDBM_RW_BIT));
INT2FIX          1006 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "WRITER",  INT2FIX(GDBM_WRITER|RUBY_GDBM_RW_BIT));
INT2FIX          1007 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "WRCREAT", INT2FIX(GDBM_WRCREAT|RUBY_GDBM_RW_BIT));
INT2FIX          1008 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "NEWDB",   INT2FIX(GDBM_NEWDB|RUBY_GDBM_RW_BIT));
INT2FIX          1010 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "FAST", INT2FIX(GDBM_FAST));
INT2FIX          1016 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "SYNC",    INT2FIX(GDBM_SYNC));
INT2FIX          1019 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           242 ext/openssl/ossl_ssl.c     args[1] = INT2FIX(is_export);
INT2FIX           243 ext/openssl/ossl_ssl.c     args[2] = INT2FIX(keylength);
INT2FIX           419 ext/openssl/ossl_ssl.c     rb_ary_push(ary, INT2FIX(bits));
INT2FIX           420 ext/openssl/ossl_ssl.c     rb_ary_push(ary, INT2FIX(alg_bits));
INT2FIX           899 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           526 ext/sdbm/init.c     if (dbmp->di_size > 0) return INT2FIX(dbmp->di_size);
INT2FIX           533 ext/sdbm/init.c     return INT2FIX(i);
INT2FIX           259 ext/socket/socket.c     return INT2FIX(0);
INT2FIX           382 ext/socket/socket.c     return INT2FIX(0);
INT2FIX           518 ext/socket/socket.c     return INT2FIX(n);
INT2FIX           856 ext/socket/socket.c     port = INT2FIX(atoi(pbuf));
INT2FIX          1548 ext/socket/socket.c     return INT2FIX(0);
INT2FIX          1566 ext/socket/socket.c 	return INT2FIX(0);
INT2FIX          1570 ext/socket/socket.c     return INT2FIX(0);
INT2FIX          1601 ext/socket/socket.c 	    return INT2FIX(n);
INT2FIX          1609 ext/socket/socket.c     return INT2FIX(n);
INT2FIX          1833 ext/socket/socket.c 	return INT2FIX(fd);
INT2FIX          1841 ext/socket/socket.c 	ff_argv[0] = INT2FIX(fd);
INT2FIX          2060 ext/socket/socket.c     domain = INT2FIX(PF_UNIX);
INT2FIX          2064 ext/socket/socket.c 	type = INT2FIX(SOCK_STREAM);
INT2FIX          2066 ext/socket/socket.c 	protocol = INT2FIX(0);
INT2FIX          2198 ext/socket/socket.c     return INT2FIX(0);
INT2FIX          2291 ext/socket/socket.c     return INT2FIX(0);
INT2FIX          2377 ext/socket/socket.c     return INT2FIX(0);
INT2FIX          2696 ext/socket/socket.c 	rb_ary_push(ary, INT2FIX(res->ai_family));
INT2FIX          2697 ext/socket/socket.c 	rb_ary_push(ary, INT2FIX(res->ai_socktype));
INT2FIX          2698 ext/socket/socket.c 	rb_ary_push(ary, INT2FIX(res->ai_protocol));
INT2FIX          2816 ext/socket/socket.c     return INT2FIX(port);
INT2FIX          3104 ext/socket/socket.c     rb_define_const(rb_cSocket, name, INT2FIX(value));
INT2FIX          3105 ext/socket/socket.c     rb_define_const(mConst, name, INT2FIX(value));
INT2FIX           312 ext/stringio/stringio.c     return INT2FIX(0);
INT2FIX           626 ext/stringio/stringio.c     return INT2FIX(0);
INT2FIX           665 ext/stringio/stringio.c     return INT2FIX(0);
INT2FIX          1005 ext/stringio/stringio.c     if (!len) return INT2FIX(0);
INT2FIX           363 ext/strscan/strscan.c     return INT2FIX(p->curr);
INT2FIX           440 ext/strscan/strscan.c         return INT2FIX(p->regs.end[0]);
INT2FIX          1066 ext/strscan/strscan.c         return INT2FIX(0);
INT2FIX          1070 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          2001 ext/syck/rubyext.c     rb_ivar_set(self, s_level, INT2FIX(0));
INT2FIX          2021 ext/syck/rubyext.c     rb_ivar_set(self, s_level, INT2FIX(level));
INT2FIX          2038 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          1796 ext/win32ole/win32ole.c     return INT2FIX(cWIN32OLE_cp);
INT2FIX          3208 ext/win32ole/win32ole.c         rb_str_concat(str, rb_fix2str(INT2FIX(pTypeDesc->vt), 10));
INT2FIX          3679 ext/win32ole/win32ole.c     ver = INT2FIX(pTypeAttr->wMajorVerNum);
INT2FIX          3711 ext/win32ole/win32ole.c     ver = INT2FIX(pTypeAttr->wMinorVerNum);
INT2FIX          3743 ext/win32ole/win32ole.c     typekind = INT2FIX(pTypeAttr->typekind);
INT2FIX          3874 ext/win32ole/win32ole.c     return INT2FIX(helpcontext);
INT2FIX          4269 ext/win32ole/win32ole.c     kind = INT2FIX(pVarDesc->varkind);
INT2FIX          4444 ext/win32ole/win32ole.c     vt = INT2FIX(pFuncDesc->elemdescFunc.tdesc.vt);
INT2FIX          4516 ext/win32ole/win32ole.c     invkind = INT2FIX(pFuncDesc->invkind);
INT2FIX          4837 ext/win32ole/win32ole.c     return INT2FIX(helpcontext);
INT2FIX          4903 ext/win32ole/win32ole.c     offset_vtbl = INT2FIX(pFuncDesc->oVft);
INT2FIX          4937 ext/win32ole/win32ole.c     size_params = INT2FIX(pFuncDesc->cParams);
INT2FIX          4972 ext/win32ole/win32ole.c     size_opt_params = INT2FIX(pFuncDesc->cParamsOpt);
INT2FIX          6140 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_ACP"       ,INT2FIX(CP_ACP));
INT2FIX          6141 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_OEMCP"     ,INT2FIX(CP_OEMCP));
INT2FIX          6142 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_MACCP"     ,INT2FIX(CP_MACCP));
INT2FIX          6143 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_THREAD_ACP",INT2FIX(CP_THREAD_ACP));
INT2FIX          6144 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_SYMBOL"    ,INT2FIX(CP_SYMBOL));
INT2FIX          6145 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_UTF7"      ,INT2FIX(CP_UTF7));
INT2FIX          6146 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_UTF8"      ,INT2FIX(CP_UTF8));
INT2FIX          6149 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_I2", INT2FIX(VT_I2));
INT2FIX          6150 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_I4", INT2FIX(VT_I4));
INT2FIX          6151 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_R4", INT2FIX(VT_R4));
INT2FIX          6152 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_R8", INT2FIX(VT_R8));
INT2FIX          6153 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_CY", INT2FIX(VT_CY));
INT2FIX          6154 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_DATE", INT2FIX(VT_DATE));
INT2FIX          6155 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_BSTR", INT2FIX(VT_BSTR));
INT2FIX          6156 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_USERDEFINED", INT2FIX(VT_USERDEFINED));
INT2FIX          6157 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_PTR", INT2FIX(VT_PTR));
INT2FIX          6158 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_DISPATCH", INT2FIX(VT_DISPATCH));
INT2FIX          6159 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_ERROR", INT2FIX(VT_ERROR));
INT2FIX          6160 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_BOOL", INT2FIX(VT_BOOL));
INT2FIX          6161 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_VARIANT", INT2FIX(VT_VARIANT));
INT2FIX          6162 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_UNKNOWN", INT2FIX(VT_UNKNOWN));
INT2FIX          6163 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_I1", INT2FIX(VT_I1));
INT2FIX          6164 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_UI1", INT2FIX(VT_UI1));
INT2FIX          6165 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_UI2", INT2FIX(VT_UI2));
INT2FIX          6166 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_UI4", INT2FIX(VT_UI4));
INT2FIX          6167 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_INT", INT2FIX(VT_INT));
INT2FIX          6168 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_UINT", INT2FIX(VT_UINT));
INT2FIX          6169 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_ARRAY", INT2FIX(VT_ARRAY));
INT2FIX          6170 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_BYREF", INT2FIX(VT_BYREF));
INT2FIX          1032 ext/zlib/zlib.c     return INT2FIX(NIL_P(z->input) ? 0 : (int)(RSTRING(z->input)->len));
INT2FIX          1064 ext/zlib/zlib.c     return INT2FIX(get_zstream(obj)->stream.data_type);
INT2FIX          1833 ext/zlib/zlib.c     str = rb_funcall(gz->io, id_read, 1, INT2FIX(GZFILE_READ_SIZE));
INT2FIX          2256 ext/zlib/zlib.c     rb_funcall(gz->io, id_seek, 2, rb_int2inum(-n), INT2FIX(1));
INT2FIX          2397 ext/zlib/zlib.c     return INT2FIX(get_gzfile(obj)->level);
INT2FIX          2407 ext/zlib/zlib.c     return INT2FIX(get_gzfile(obj)->os_code);
INT2FIX          2774 ext/zlib/zlib.c     return INT2FIX(RSTRING(str)->len);
INT2FIX          2936 ext/zlib/zlib.c     return INT2FIX(0);
INT2FIX          2989 ext/zlib/zlib.c 	dst = INT2FIX((unsigned int)(RSTRING(dst)->ptr[0]) & 0xff);
INT2FIX          3353 ext/zlib/zlib.c     rb_define_const(mZlib, "BINARY", INT2FIX(Z_BINARY));
INT2FIX          3354 ext/zlib/zlib.c     rb_define_const(mZlib, "ASCII", INT2FIX(Z_ASCII));
INT2FIX          3355 ext/zlib/zlib.c     rb_define_const(mZlib, "UNKNOWN", INT2FIX(Z_UNKNOWN));
INT2FIX          3378 ext/zlib/zlib.c     rb_define_const(mZlib, "NO_COMPRESSION", INT2FIX(Z_NO_COMPRESSION));
INT2FIX          3379 ext/zlib/zlib.c     rb_define_const(mZlib, "BEST_SPEED", INT2FIX(Z_BEST_SPEED));
INT2FIX          3380 ext/zlib/zlib.c     rb_define_const(mZlib, "BEST_COMPRESSION", INT2FIX(Z_BEST_COMPRESSION));
INT2FIX          3382 ext/zlib/zlib.c 		    INT2FIX(Z_DEFAULT_COMPRESSION));
INT2FIX          3384 ext/zlib/zlib.c     rb_define_const(mZlib, "FILTERED", INT2FIX(Z_FILTERED));
INT2FIX          3385 ext/zlib/zlib.c     rb_define_const(mZlib, "HUFFMAN_ONLY", INT2FIX(Z_HUFFMAN_ONLY));
INT2FIX          3386 ext/zlib/zlib.c     rb_define_const(mZlib, "DEFAULT_STRATEGY", INT2FIX(Z_DEFAULT_STRATEGY));
INT2FIX          3388 ext/zlib/zlib.c     rb_define_const(mZlib, "MAX_WBITS", INT2FIX(MAX_WBITS));
INT2FIX          3389 ext/zlib/zlib.c     rb_define_const(mZlib, "DEF_MEM_LEVEL", INT2FIX(DEF_MEM_LEVEL));
INT2FIX          3390 ext/zlib/zlib.c     rb_define_const(mZlib, "MAX_MEM_LEVEL", INT2FIX(MAX_MEM_LEVEL));
INT2FIX          3392 ext/zlib/zlib.c     rb_define_const(mZlib, "NO_FLUSH", INT2FIX(Z_NO_FLUSH));
INT2FIX          3393 ext/zlib/zlib.c     rb_define_const(mZlib, "SYNC_FLUSH", INT2FIX(Z_SYNC_FLUSH));
INT2FIX          3394 ext/zlib/zlib.c     rb_define_const(mZlib, "FULL_FLUSH", INT2FIX(Z_FULL_FLUSH));
INT2FIX          3395 ext/zlib/zlib.c     rb_define_const(mZlib, "FINISH", INT2FIX(Z_FINISH));
INT2FIX          3468 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_CODE", INT2FIX(OS_CODE));
INT2FIX          3469 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_MSDOS", INT2FIX(OS_MSDOS));
INT2FIX          3470 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_AMIGA", INT2FIX(OS_AMIGA));
INT2FIX          3471 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_VMS", INT2FIX(OS_VMS));
INT2FIX          3472 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_UNIX", INT2FIX(OS_UNIX));
INT2FIX          3473 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_ATARI", INT2FIX(OS_ATARI));
INT2FIX          3474 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_OS2", INT2FIX(OS_OS2));
INT2FIX          3475 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_MACOS", INT2FIX(OS_MACOS));
INT2FIX          3476 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_TOPS20", INT2FIX(OS_TOPS20));
INT2FIX          3477 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_WIN32", INT2FIX(OS_WIN32));
INT2FIX          3479 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_VMCMS", INT2FIX(OS_VMCMS));
INT2FIX          3480 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_ZSYSTEM", INT2FIX(OS_ZSYSTEM));
INT2FIX          3481 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_CPM", INT2FIX(OS_CPM));
INT2FIX          3482 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_QDOS", INT2FIX(OS_QDOS));
INT2FIX          3483 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_RISCOS", INT2FIX(OS_RISCOS));
INT2FIX          3484 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_UNKNOWN", INT2FIX(OS_UNKNOWN));
INT2FIX           201 file.c         	    return INT2FIX(0);
INT2FIX           203 file.c         	    return INT2FIX(-1);
INT2FIX           205 file.c         	    return INT2FIX(1);
INT2FIX          1763 file.c             return INT2FIX(0);
INT2FIX          1907 file.c             return INT2FIX(0);
INT2FIX          2093 file.c             return INT2FIX(0);
INT2FIX          2123 file.c             return INT2FIX(0);
INT2FIX          2239 file.c         		return INT2FIX(0);
INT2FIX          2245 file.c             return INT2FIX(0);
INT2FIX          2281 file.c             return INT2FIX(omask);
INT2FIX          3044 file.c             return INT2FIX(0);
INT2FIX          3089 file.c             return INT2FIX(0);
INT2FIX          3201 file.c             return INT2FIX(0);
INT2FIX          4422 file.c             rb_file_const("LOCK_SH", INT2FIX(LOCK_SH));
INT2FIX          4423 file.c             rb_file_const("LOCK_EX", INT2FIX(LOCK_EX));
INT2FIX          4424 file.c             rb_file_const("LOCK_UN", INT2FIX(LOCK_UN));
INT2FIX          4425 file.c             rb_file_const("LOCK_NB", INT2FIX(LOCK_NB));
INT2FIX          1557 gc.c               return INT2FIX(n);
INT2FIX          1592 gc.c               return INT2FIX(n);
INT2FIX          1744 gc.c               block = rb_ary_new3(2, INT2FIX(ruby_safe_level), block);
INT2FIX           106 hash.c         	    hval = rb_funcall(hval, '%', 1, INT2FIX(536870923));
INT2FIX           982 hash.c             return INT2FIX(RHASH(hash)->tbl->num_entries);
INT2FIX          2192 hash.c             return INT2FIX(i);
INT2FIX           135 io.c           static VALUE lineno = INT2FIX(0);
INT2FIX           556 io.c               if (RSTRING(str)->len == 0) return INT2FIX(0);
INT2FIX           672 io.c               return INT2FIX(0);
INT2FIX           767 io.c               return INT2FIX(0);
INT2FIX           909 io.c               return INT2FIX(0);
INT2FIX           937 io.c               return INT2FIX(fd);
INT2FIX           969 io.c               return INT2FIX(fptr->pid);
INT2FIX          1527 io.c           	lineno = INT2FIX(fptr->lineno);
INT2FIX          1598 io.c           	lineno = INT2FIX(fptr->lineno);
INT2FIX          1720 io.c               *var = INT2FIX(gets_lineno);
INT2FIX          1728 io.c               lineno = INT2FIX(gets_lineno);
INT2FIX          1881 io.c           	rb_yield(INT2FIX(c & 0xff));
INT2FIX          1927 io.c               return INT2FIX(c & 0xff);
INT2FIX          2853 io.c               rb_last_status = INT2FIX(status);
INT2FIX          4357 io.c           	lineno = INT2FIX(gets_lineno);
INT2FIX          4429 io.c           	lineno = INT2FIX(gets_lineno);
INT2FIX          5027 io.c               args[2] = INT2FIX(O_RDONLY);
INT2FIX          5035 io.c               args[2] = INT2FIX(O_WRONLY);
INT2FIX          5648 io.c               rb_define_const(rb_cIO, "SEEK_SET", INT2FIX(SEEK_SET));
INT2FIX          5649 io.c               rb_define_const(rb_cIO, "SEEK_CUR", INT2FIX(SEEK_CUR));
INT2FIX          5650 io.c               rb_define_const(rb_cIO, "SEEK_END", INT2FIX(SEEK_END));
INT2FIX          5745 io.c               rb_file_const("RDONLY", INT2FIX(O_RDONLY));
INT2FIX          5746 io.c               rb_file_const("WRONLY", INT2FIX(O_WRONLY));
INT2FIX          5747 io.c               rb_file_const("RDWR", INT2FIX(O_RDWR));
INT2FIX          5748 io.c               rb_file_const("APPEND", INT2FIX(O_APPEND));
INT2FIX          5749 io.c               rb_file_const("CREAT", INT2FIX(O_CREAT));
INT2FIX          5750 io.c               rb_file_const("EXCL", INT2FIX(O_EXCL));
INT2FIX          5753 io.c               rb_file_const("NONBLOCK", INT2FIX(O_NONBLOCK));
INT2FIX          5755 io.c               rb_file_const("NONBLOCK", INT2FIX(O_NDELAY));
INT2FIX          5758 io.c               rb_file_const("TRUNC", INT2FIX(O_TRUNC));
INT2FIX          5760 io.c               rb_file_const("NOCTTY", INT2FIX(O_NOCTTY));
INT2FIX          5763 io.c               rb_file_const("BINARY", INT2FIX(O_BINARY));
INT2FIX          5766 io.c               rb_file_const("SYNC", INT2FIX(O_SYNC));
INT2FIX           951 marshal.c          rb_hash_aset(arg->data, INT2FIX(RHASH(arg->data)->tbl->num_entries), v);
INT2FIX          1488 marshal.c          rb_define_const(rb_mMarshal, "MAJOR_VERSION", INT2FIX(MARSHAL_MAJOR));
INT2FIX          1489 marshal.c          rb_define_const(rb_mMarshal, "MINOR_VERSION", INT2FIX(MARSHAL_MINOR));
INT2FIX           238 numeric.c          zero = INT2FIX(0);
INT2FIX           357 numeric.c          if ((!rb_equal(z, INT2FIX(0))) &&
INT2FIX           358 numeric.c      	((RTEST(rb_funcall(x, '<', 1, INT2FIX(0))) &&
INT2FIX           359 numeric.c      	  RTEST(rb_funcall(y, '>', 1, INT2FIX(0)))) ||
INT2FIX           360 numeric.c      	 (RTEST(rb_funcall(x, '>', 1, INT2FIX(0))) &&
INT2FIX           361 numeric.c      	  RTEST(rb_funcall(y, '<', 1, INT2FIX(0)))))) {
INT2FIX           397 numeric.c          if (RTEST(rb_funcall(num, '<', 1, INT2FIX(0)))) {
INT2FIX           415 numeric.c          if (rb_equal(num, INT2FIX(0))) {
INT2FIX           797 numeric.c          if (x == y) return INT2FIX(0);
INT2FIX           868 numeric.c          return INT2FIX(hash);
INT2FIX           876 numeric.c          if (a == b) return INT2FIX(0);
INT2FIX           877 numeric.c          if (a > b) return INT2FIX(1);
INT2FIX           878 numeric.c          if (a < b) return INT2FIX(-1);
INT2FIX          1176 numeric.c      	return INT2FIX( value < 0 ? -1 : 1 );
INT2FIX          1435 numeric.c      	step = INT2FIX(1);
INT2FIX          1445 numeric.c      	if (rb_equal(step, INT2FIX(0))) {
INT2FIX          1489 numeric.c      	if (RTEST(rb_funcall(step, '>', 1, INT2FIX(0)))) {
INT2FIX          1602 numeric.c          if (RTEST(rb_funcall(INT2FIX(0), '<', 1, val))) {
INT2FIX          1773 numeric.c          return rb_funcall(num, '+', 1, INT2FIX(1));
INT2FIX          2198 numeric.c      	if (b == 0) return INT2FIX(1);
INT2FIX          2251 numeric.c      	if (a == b) return INT2FIX(0);
INT2FIX          2252 numeric.c      	if (a > b) return INT2FIX(1);
INT2FIX          2253 numeric.c      	return INT2FIX(-1);
INT2FIX          2475 numeric.c      	if (val < 0) return INT2FIX(-1);
INT2FIX          2476 numeric.c      	return INT2FIX(0);
INT2FIX          2509 numeric.c      		return INT2FIX(0);
INT2FIX          2510 numeric.c      	    return INT2FIX(1);
INT2FIX          2515 numeric.c          if (i < 0) return INT2FIX(0);
INT2FIX          2517 numeric.c      	if (val < 0) return INT2FIX(1);
INT2FIX          2518 numeric.c      	return INT2FIX(0);
INT2FIX          2521 numeric.c      	return INT2FIX(1);
INT2FIX          2522 numeric.c          return INT2FIX(0);
INT2FIX          2632 numeric.c          return INT2FIX(sizeof(long));
INT2FIX          2666 numeric.c      	    i = rb_funcall(i, '+', 1, INT2FIX(1));
INT2FIX          2705 numeric.c      	    i = rb_funcall(i, '-', 1, INT2FIX(1));
INT2FIX          2741 numeric.c      	VALUE i = INT2FIX(0);
INT2FIX          2746 numeric.c      	    i = rb_funcall(i, '+', 1, INT2FIX(1));
INT2FIX          2889 numeric.c          rb_define_const(rb_cFloat, "ROUNDS", INT2FIX(FLT_ROUNDS));
INT2FIX          2890 numeric.c          rb_define_const(rb_cFloat, "RADIX", INT2FIX(FLT_RADIX));
INT2FIX          2891 numeric.c          rb_define_const(rb_cFloat, "MANT_DIG", INT2FIX(DBL_MANT_DIG));
INT2FIX          2892 numeric.c          rb_define_const(rb_cFloat, "DIG", INT2FIX(DBL_DIG));
INT2FIX          2893 numeric.c          rb_define_const(rb_cFloat, "MIN_EXP", INT2FIX(DBL_MIN_EXP));
INT2FIX          2894 numeric.c          rb_define_const(rb_cFloat, "MAX_EXP", INT2FIX(DBL_MAX_EXP));
INT2FIX          2895 numeric.c          rb_define_const(rb_cFloat, "MIN_10_EXP", INT2FIX(DBL_MIN_10_EXP));
INT2FIX          2896 numeric.c          rb_define_const(rb_cFloat, "MAX_10_EXP", INT2FIX(DBL_MAX_10_EXP));
INT2FIX           790 object.c           return INT2FIX(0);
INT2FIX          1444 object.c           if (mod == arg) return INT2FIX(0);
INT2FIX          1456 object.c       	return INT2FIX(-1);
INT2FIX          1458 object.c           return INT2FIX(1);
INT2FIX          1493 pack.c         		rb_ary_push(ary, INT2FIX(c));
INT2FIX          1502 pack.c         		rb_ary_push(ary, INT2FIX(c));
INT2FIX          1514 pack.c         		rb_ary_push(ary, INT2FIX(tmp));
INT2FIX          1525 pack.c         		rb_ary_push(ary, INT2FIX(tmp));
INT2FIX          7635 parse.c        	yylval.node = NEW_LIT(INT2FIX(c));
INT2FIX          7905 parse.c        		    yylval.node = NEW_LIT(INT2FIX(0));
INT2FIX          8830 parse.c        	return NEW_LIT(INT2FIX(ruby_sourceline));
INT2FIX          3637 parse.y        	yylval.node = NEW_LIT(INT2FIX(c));
INT2FIX          3907 parse.y        		    yylval.node = NEW_LIT(INT2FIX(0));
INT2FIX          4832 parse.y        	return NEW_LIT(INT2FIX(ruby_sourceline));
INT2FIX           128 process.c          return INT2FIX(getpid());
INT2FIX           153 process.c          return INT2FIX(0);
INT2FIX           155 process.c          return INT2FIX(getppid());
INT2FIX           198 process.c          rb_iv_set(rb_last_status, "status", INT2FIX(status));
INT2FIX           199 process.c          rb_iv_set(rb_last_status, "pid", INT2FIX(pid));
INT2FIX           746 process.c          return INT2FIX(pid);
INT2FIX          1297 process.c      	return INT2FIX(pid);
INT2FIX          1586 process.c          return INT2FIX(end);
INT2FIX          1610 process.c          return INT2FIX(pgrp);
INT2FIX          1615 process.c          return INT2FIX(pgrp);
INT2FIX          1646 process.c          return INT2FIX(0);
INT2FIX          1697 process.c          return INT2FIX(0);
INT2FIX          1724 process.c          return INT2FIX(pid);
INT2FIX          1745 process.c        return INT2FIX(pid);
INT2FIX          1783 process.c          return INT2FIX(prio);
INT2FIX          1816 process.c          return INT2FIX(0);
INT2FIX          1990 process.c          return INT2FIX(uid);
INT2FIX          2027 process.c          return INT2FIX(uid);
INT2FIX          2193 process.c          return INT2FIX(uid);
INT2FIX          2363 process.c          return INT2FIX(gid);
INT2FIX          2399 process.c          return INT2FIX(gid);
INT2FIX          2555 process.c          return INT2FIX(maxgroups);
INT2FIX          2577 process.c          return INT2FIX(maxgroups);
INT2FIX          2744 process.c          return INT2FIX(gid);
INT2FIX          2764 process.c          return INT2FIX(euid);
INT2FIX          2833 process.c          return INT2FIX(euid);
INT2FIX          2877 process.c          return INT2FIX(egid);
INT2FIX          2947 process.c          return INT2FIX(egid);
INT2FIX          3027 process.c          return INT2FIX(uid);
INT2FIX          3085 process.c          return INT2FIX(gid);
INT2FIX          3145 process.c      	proc_seteuid(obj, INT2FIX(uid));
INT2FIX          3150 process.c      	    return INT2FIX(euid);
INT2FIX          3153 process.c      	proc_seteuid(obj, INT2FIX(SAVED_USER_ID));
INT2FIX          3158 process.c      	    return INT2FIX(uid);
INT2FIX          3194 process.c      	return INT2FIX(euid);
INT2FIX          3256 process.c      	proc_setegid(obj, INT2FIX(gid));
INT2FIX          3261 process.c      	    return INT2FIX(egid);
INT2FIX          3264 process.c      	proc_setegid(obj, INT2FIX(SAVED_GROUP_ID));
INT2FIX          3269 process.c      	    return INT2FIX(gid);
INT2FIX          3304 process.c      	return INT2FIX(egid);
INT2FIX          3374 process.c          rb_define_const(rb_mProcess, "WNOHANG", INT2FIX(WNOHANG));
INT2FIX          3376 process.c          rb_define_const(rb_mProcess, "WNOHANG", INT2FIX(0));
INT2FIX          3379 process.c          rb_define_const(rb_mProcess, "WUNTRACED", INT2FIX(WUNTRACED));
INT2FIX          3381 process.c          rb_define_const(rb_mProcess, "WUNTRACED", INT2FIX(0));
INT2FIX          3434 process.c          rb_define_const(rb_mProcess, "PRIO_PROCESS", INT2FIX(PRIO_PROCESS));
INT2FIX          3435 process.c          rb_define_const(rb_mProcess, "PRIO_PGRP", INT2FIX(PRIO_PGRP));
INT2FIX          3436 process.c          rb_define_const(rb_mProcess, "PRIO_USER", INT2FIX(PRIO_USER));
INT2FIX           193 random.c       static VALUE saved_seed = INT2FIX(0);
INT2FIX           470 random.c                   limit = (struct RBignum *)rb_big_minus((VALUE)limit, INT2FIX(1));
INT2FIX           162 range.c            if (c == 0) return INT2FIX(0);
INT2FIX           250 range.c        	    if (c == INT2FIX(0)) break;
INT2FIX           309 range.c        	step = INT2FIX(1);
INT2FIX           343 range.c        	    if (rb_equal(step, INT2FIX(0))) rb_raise(rb_eArgError, "step can't be 0");
INT2FIX           718 re.c               return INT2FIX(RMATCH(match)->regs->num_regs);
INT2FIX           746 re.c               return rb_assoc_new(INT2FIX(RMATCH(match)->regs->beg[i]),
INT2FIX           747 re.c           			INT2FIX(RMATCH(match)->regs->end[i]));
INT2FIX           775 re.c               return INT2FIX(RMATCH(match)->regs->beg[i]);
INT2FIX           803 re.c               return INT2FIX(RMATCH(match)->regs->end[i]);
INT2FIX          1457 re.c               return INT2FIX(hashval);
INT2FIX          2275 re.c               rb_define_const(rb_cRegexp, "IGNORECASE", INT2FIX(RE_OPTION_IGNORECASE));
INT2FIX          2276 re.c               rb_define_const(rb_cRegexp, "EXTENDED", INT2FIX(RE_OPTION_EXTENDED));
INT2FIX          2277 re.c               rb_define_const(rb_cRegexp, "MULTILINE", INT2FIX(RE_OPTION_MULTILINE));
INT2FIX           886 ruby.c         	if (c == INT2FIX('#')) {
INT2FIX           133 ruby.h         #define LONG2FIX(i) INT2FIX(i)
INT2FIX           134 ruby.h         #define rb_fix_new(v) INT2FIX(v)
INT2FIX           287 ruby.h         #define CHR2FIX(x) INT2FIX((long)((x)&0xff))
INT2FIX           299 signal.c           return INT2FIX(i-1);
INT2FIX           469 signal.c       	rb_eval_cmd(trap_exit, rb_ary_new3(1, INT2FIX(0)), trap_list[0].safe);
INT2FIX           757 signal.c       	rb_hash_aset(h, rb_str_new2(sigs->signm), INT2FIX(sigs->signo));
INT2FIX           899 string.c           return INT2FIX(key);
INT2FIX          1050 string.c       	if (RSTRING(str1)->len == RSTRING(str2)->len) return INT2FIX(0);
INT2FIX          1051 string.c       	if (RSTRING(str1)->len > RSTRING(str2)->len) return INT2FIX(1);
INT2FIX          1052 string.c       	return INT2FIX(-1);
INT2FIX          1054 string.c           if (retval == 0) return INT2FIX(0);
INT2FIX          1055 string.c           if (retval > 0) return INT2FIX(1);
INT2FIX          1056 string.c           return INT2FIX(-1);
INT2FIX          1529 string.c       	return INT2FIX(RSTRING(str)->ptr[idx] & 0xff);
INT2FIX          3413 string.c           if (!s || RSTRING(str)->len == 0) return INT2FIX(0);
INT2FIX          3738 string.c       	rb_yield(INT2FIX(RSTRING(str)->ptr[i] & 0xff));
INT2FIX          4435 string.c       	VALUE sum = INT2FIX(0);
INT2FIX          4439 string.c       	    sum = rb_funcall(sum, '+', 1, INT2FIX((unsigned char)*p));
INT2FIX          4445 string.c       	    mod = rb_funcall(INT2FIX(1), rb_intern("<<"), 1, INT2FIX(bits));
INT2FIX          4446 string.c       	    mod = rb_funcall(mod, '-', 1, INT2FIX(1));
INT2FIX           949 time.c         	    if (tobj1->tv.tv_usec == tobj2->tv.tv_usec) return INT2FIX(0);
INT2FIX           950 time.c         	    if (tobj1->tv.tv_usec > tobj2->tv.tv_usec) return INT2FIX(1);
INT2FIX           951 time.c         	    return INT2FIX(-1);
INT2FIX           953 time.c         	if (tobj1->tv.tv_sec > tobj2->tv.tv_sec) return INT2FIX(1);
INT2FIX           954 time.c         	return INT2FIX(-1);
INT2FIX          1411 time.c             return INT2FIX(tobj->tm.tm_sec);
INT2FIX          1434 time.c             return INT2FIX(tobj->tm.tm_min);
INT2FIX          1457 time.c             return INT2FIX(tobj->tm.tm_hour);
INT2FIX          1482 time.c             return INT2FIX(tobj->tm.tm_mday);
INT2FIX          1507 time.c             return INT2FIX(tobj->tm.tm_mon+1);
INT2FIX          1554 time.c             return INT2FIX(tobj->tm.tm_wday);
INT2FIX          1577 time.c             return INT2FIX(tobj->tm.tm_yday+1);
INT2FIX          1675 time.c         	return INT2FIX(0);
INT2FIX          1731 time.c         		    INT2FIX(tobj->tm.tm_sec),
INT2FIX          1732 time.c         		    INT2FIX(tobj->tm.tm_min),
INT2FIX          1733 time.c         		    INT2FIX(tobj->tm.tm_hour),
INT2FIX          1734 time.c         		    INT2FIX(tobj->tm.tm_mday),
INT2FIX          1735 time.c         		    INT2FIX(tobj->tm.tm_mon+1),
INT2FIX          1737 time.c         		    INT2FIX(tobj->tm.tm_wday),
INT2FIX          1738 time.c         		    INT2FIX(tobj->tm.tm_yday+1),


INT2NUM

INT2NUM           841 error.c        	rb_define_const(error, "Errno", INT2NUM(n));
INT2NUM          4318 eval.c             args[0] = INT2NUM(status);
INT2NUM          9862 eval.c             return INT2NUM(ruby_safe_level);
INT2NUM          11249 eval.c             return INT2NUM(rb_thread_check(thread)->priority);
INT2NUM          11311 eval.c         	return INT2NUM(ruby_safe_level);
INT2NUM          11313 eval.c             return INT2NUM(th->safe);
INT2NUM          12094 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            34 ext/dl/dl.c    	val = INT2NUM(v);
INT2NUM            42 ext/dl/dl.c    	val = INT2NUM(v);
INT2NUM            50 ext/dl/dl.c    	val = INT2NUM(v);
INT2NUM            58 ext/dl/dl.c    	val = INT2NUM(v);
INT2NUM           587 ext/dl/dl.c      return INT2NUM(dlsizeof(StringValuePtr(str)));
INT2NUM           643 ext/dl/dl.c        if (rb_hash_aref(DLFuncTable, rb_assoc_new(INT2NUM(rettype), INT2NUM(i))) == Qnil) {
INT2NUM           653 ext/dl/dl.c    	       rb_assoc_new(INT2NUM(rettype),INT2NUM(entry)),
INT2NUM           671 ext/dl/dl.c    	rb_hash_aset(DLFuncTable, rb_assoc_new(INT2NUM(i),INT2NUM(j)),Qnil);
INT2NUM           697 ext/dl/dl.c      rb_define_const(rb_mDL, "RTLD_GLOBAL", INT2NUM(RTLD_GLOBAL));
INT2NUM           698 ext/dl/dl.c      rb_define_const(rb_mDL, "RTLD_LAZY",   INT2NUM(RTLD_LAZY));
INT2NUM           699 ext/dl/dl.c      rb_define_const(rb_mDL, "RTLD_NOW",    INT2NUM(RTLD_NOW));
INT2NUM           701 ext/dl/dl.c      rb_define_const(rb_mDL, "ALIGN_INT",   INT2NUM(ALIGN_INT));
INT2NUM           702 ext/dl/dl.c      rb_define_const(rb_mDL, "ALIGN_LONG",  INT2NUM(ALIGN_LONG));
INT2NUM           703 ext/dl/dl.c      rb_define_const(rb_mDL, "ALIGN_FLOAT", INT2NUM(ALIGN_FLOAT));
INT2NUM           704 ext/dl/dl.c      rb_define_const(rb_mDL, "ALIGN_SHORT", INT2NUM(ALIGN_SHORT));
INT2NUM           705 ext/dl/dl.c      rb_define_const(rb_mDL, "ALIGN_DOUBLE",INT2NUM(ALIGN_DOUBLE));
INT2NUM           706 ext/dl/dl.c      rb_define_const(rb_mDL, "ALIGN_VOIDP", INT2NUM(ALIGN_VOIDP));
INT2NUM           708 ext/dl/dl.c      rb_define_const(rb_mDL, "MAX_ARG", INT2NUM(MAX_ARG));
INT2NUM           209 ext/dl/dl.h    # define DLLONG2NUM(x) INT2NUM((long)x)
INT2NUM            25 ext/dl/handle.c   return INT2NUM(dlclose(dlhandle->ptr));
INT2NUM           362 ext/dl/ptr.c         rb_ary_push(ary, INT2NUM(((char*)(data->ptr))[i]));
INT2NUM           365 ext/dl/ptr.c         rb_ary_push(ary, INT2NUM(((short*)(data->ptr))[i]));
INT2NUM           368 ext/dl/ptr.c         rb_ary_push(ary, INT2NUM(((int*)(data->ptr))[i]));
INT2NUM           652 ext/dl/ptr.c         elem = INT2NUM(*((int*)ptr));
INT2NUM           673 ext/dl/ptr.c         elem = INT2NUM(*((char*)ptr));
INT2NUM           677 ext/dl/ptr.c         elem = INT2NUM(*((short*)ptr));
INT2NUM           690 ext/dl/ptr.c         elem = INT2NUM(*((int*)ptr));
INT2NUM           711 ext/dl/ptr.c         elem = INT2NUM(*((char*)ptr));
INT2NUM           715 ext/dl/ptr.c         elem = INT2NUM(*((short*)ptr));
INT2NUM           737 ext/dl/ptr.c       num = INT2NUM(0);
INT2NUM           816 ext/dl/sym.c       rb_thread_local_aset(rb_thread_current(), rb_dl_id_DLErrno, INT2NUM(last_errno));
INT2NUM           818 ext/dl/sym.c       rb_thread_local_aset(rb_thread_current(), rb_dl_id_DLW32Error, INT2NUM(win32_last_err));
INT2NUM           848 ext/dl/sym.c       val = INT2NUM((short)(ANY2H(ret)));
INT2NUM           852 ext/dl/sym.c       val = INT2NUM((int)(ANY2I(ret)));
INT2NUM           899 ext/dl/sym.c   	rb_ary_push(dvals, INT2NUM(*((short*)(ANY2P(args[i])))));
INT2NUM           902 ext/dl/sym.c   	rb_ary_push(dvals, INT2NUM(*((int*)(ANY2P(args[i])))));
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           347 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           713 ext/openssl/ossl_ssl.c     return INT2NUM(nwrite);
INT2NUM           850 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           643 ext/readline/readline.c     return INT2NUM(history_length);
INT2NUM          1251 ext/socket/socket.c     rb_ary_push(ary, INT2NUM(addr->ai_family));
INT2NUM          1341 ext/socket/socket.c     if (!klass) return INT2NUM(fd2);
INT2NUM          2777 ext/socket/socket.c     rb_ary_push(ary, INT2NUM(h->h_addrtype));
INT2NUM          3058 ext/socket/socket.c     return rb_assoc_new(INT2NUM(ntohs(sockaddr->sin_port)), host);
INT2NUM           388 ext/strscan/strscan.c     return INT2NUM(i);
INT2NUM           945 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           979 ext/win32ole/win32ole.c             obj = INT2NUM((long)*V_UI1REF(pvar));
INT2NUM           981 ext/win32ole/win32ole.c             obj = INT2NUM((long)V_UI1(pvar));
INT2NUM           986 ext/win32ole/win32ole.c             obj = INT2NUM((long)*V_I2REF(pvar));
INT2NUM           988 ext/win32ole/win32ole.c             obj = INT2NUM((long)V_I2(pvar));
INT2NUM           993 ext/win32ole/win32ole.c             obj = INT2NUM((long)*V_I4REF(pvar));
INT2NUM           995 ext/win32ole/win32ole.c             obj = INT2NUM((long)V_I4(pvar));
INT2NUM          1026 ext/win32ole/win32ole.c             obj = INT2NUM(*V_ERRORREF(pvar));
INT2NUM          1028 ext/win32ole/win32ole.c             obj = INT2NUM(V_ERROR(pvar));
INT2NUM          1688 ext/win32ole/win32ole.c     return INT2NUM(reference_count(pole));
INT2NUM          1713 ext/win32ole/win32ole.c     return INT2NUM(n);
INT2NUM          4869 ext/win32ole/win32ole.c     dispid = INT2NUM(pFuncDesc->memid);
INT2NUM          2449 ext/zlib/zlib.c     return INT2NUM(get_gzfile(obj)->lineno);
INT2NUM           238 file.c             return INT2NUM(get_stat(self)->st_dev);
INT2NUM          1681 io.c               return INT2NUM(fptr->lineno);
INT2NUM          3206 io.c               return INT2NUM(fd);
INT2NUM          4785 io.c               return INT2NUM(retval);
INT2NUM          4959 io.c               return INT2NUM(retval);
INT2NUM          5026 io.c               args[1] = INT2NUM(pipes[0]);
INT2NUM          5034 io.c               args[1] = INT2NUM(pipes[1]);
INT2NUM          5303 io.c           	    argv[0] = INT2NUM(len);
INT2NUM           516 marshal.c      	    v = rb_funcall(obj, s_dump, 1, INT2NUM(limit));
INT2NUM           401 math.c             return rb_assoc_new(rb_float_new(d), INT2NUM(exp));
INT2NUM          1536 pack.c         		rb_ary_push(ary, INT2NUM(tmp));
INT2NUM           350 process.c          return INT2NUM(status);
INT2NUM           372 process.c          return INT2NUM(status);
INT2NUM           413 process.c      	return INT2NUM(WSTOPSIG(status));
INT2NUM           455 process.c      	return INT2NUM(WTERMSIG(status));
INT2NUM           508 process.c      	return INT2NUM(WEXITSTATUS(status));
INT2NUM           657 process.c          rb_ary_push(ary, rb_assoc_new(INT2NUM(pid), rb_last_status));
INT2NUM           823 process.c      	rb_ary_push(result, rb_assoc_new(INT2NUM(pid), rb_last_status));
INT2NUM           834 process.c      	rb_ary_push(result, rb_assoc_new(INT2NUM(pid), rb_last_status));
INT2NUM          1670 process.c          return INT2NUM(i);
INT2NUM          2434 process.c      	rb_ary_push(ary, INT2NUM(groups[i]));
INT2NUM           581 re.c               return INT2NUM(options);
INT2NUM           137 ruby.h         #define LONG2NUM(v) INT2NUM(v)
INT2NUM           154 ruby.h         # define OFFT2NUM(v) INT2NUM(v)
INT2NUM          3421 string.c           return INT2NUM(i);
INT2NUM          1679 time.c         	return INT2NUM(tobj->tm.tm_gmtoff);


INT_ALIGN

INT_ALIGN         182 ext/dl/dl.c          DLALIGN(0,size,INT_ALIGN);
INT_ALIGN         759 ext/dl/ptr.c   	  DLALIGN(data->ptr,offset,INT_ALIGN);
INT_ALIGN         889 ext/dl/ptr.c   	  DLALIGN(data->ptr,offset,INT_ALIGN);


INT_DLTYPE

INT_DLTYPE         69 ext/dl/dl.h    # define PUSH_I(x) PUSH_ARG(x,INT_DLTYPE)
INT_DLTYPE         97 ext/dl/dl.h    # define PUSH_P(x) PUSH_ARG(x,INT_DLTYPE)


IN_CLASSA_NSHIFT

IN_CLASSA_NSHIFT  485 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   483 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    486 ext/socket/getaddrinfo.c 				if (v4a == 0 || v4a == IN_LOOPBACKNET)
IN_LOOPBACKNET     56 ext/socket/sockport.h #ifndef IN_LOOPBACKNET


IN_MULTICAST

IN_MULTICAST      483 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


IOBUF_SIZE

IOBUF_SIZE        356 ext/nkf/nkf-utf8/nkf.c static unsigned char   stdibuf[IOBUF_SIZE];
IOBUF_SIZE        357 ext/nkf/nkf-utf8/nkf.c static unsigned char   stdobuf[IOBUF_SIZE];
IOBUF_SIZE        727 ext/nkf/nkf-utf8/nkf.c       setvbuffer(stdout, stdobuf, IOBUF_SIZE);
IOBUF_SIZE        736 ext/nkf/nkf-utf8/nkf.c       setvbuffer(stdin, stdibuf, IOBUF_SIZE);
IOBUF_SIZE        825 ext/nkf/nkf-utf8/nkf.c               setvbuffer(fin, stdibuf, IOBUF_SIZE);


IOCPARM_LEN

IOCPARM_LEN      4742 io.c           #ifndef IOCPARM_LEN
IOCPARM_LEN      4746 io.c           #ifdef IOCPARM_LEN
IOCPARM_LEN      4747 io.c           	    len = IOCPARM_LEN(cmd);	/* on BSDish systems we're safe */


IOINFO_L2E

IOINFO_L2E       1571 win32/win32.c  #define IOINFO_ARRAY_ELTS	(1 << IOINFO_L2E)
IOINFO_L2E       1572 win32/win32.c  #define _pioinfo(i)	(__pioinfo[i >> IOINFO_L2E] + (i & (IOINFO_ARRAY_ELTS - 1)))


ISALNUM

ISALNUM          6493 parse.c        #define is_identchar(c) (SIGN_EXTEND_CHAR(c)!=-1&&(ISALNUM(c) || (c) == '_' || ismbchar(c)))
ISALNUM          7627 parse.c        	else if ((ISALNUM(c) || c == '_') && lex_p < lex_pend && is_identchar(*lex_p)) {
ISALNUM          8161 parse.c        	    if (!ISALNUM(c)) {
ISALNUM          8167 parse.c        		if (ISALNUM(term) || ismbchar(term)) {
ISALNUM          10015 parse.c        	if (name[0] != '_' && ISASCII(name[0]) && !ISALNUM(name[0])) {
ISALNUM          2495 parse.y        #define is_identchar(c) (SIGN_EXTEND_CHAR(c)!=-1&&(ISALNUM(c) || (c) == '_' || ismbchar(c)))
ISALNUM          3629 parse.y        	else if ((ISALNUM(c) || c == '_') && lex_p < lex_pend && is_identchar(*lex_p)) {
ISALNUM          4163 parse.y        	    if (!ISALNUM(c)) {
ISALNUM          4169 parse.y        		if (ISALNUM(term) || ismbchar(term)) {
ISALNUM          6017 parse.y        	if (name[0] != '_' && ISASCII(name[0]) && !ISALNUM(name[0])) {
ISALNUM          1651 regex.c        	      if (   (is_alnum  && ISALNUM(ch))
ISALNUM           402 ruby.c         		else if (*p != '_' && !ISALNUM(*p)) {
ISALNUM          1399 string.c       	if (ISALNUM(*s)) {


ISALPHA

ISALPHA          2309 file.c             if (ISALPHA(buf[0]) && buf[1] == ':') {
ISALPHA           616 pack.c         			if (ISALPHA(*ptr))
ISALPHA           647 pack.c         			if (ISALPHA(*ptr))
ISALPHA          6962 parse.c            while (c = nextc(), ISALPHA(c)) {
ISALPHA          9974 parse.c        	if (*m != '_' && !ISALPHA(*m) && !ismbchar(*m)) return Qfalse;
ISALPHA          2964 parse.y            while (c = nextc(), ISALPHA(c)) {
ISALPHA          5976 parse.y        	if (*m != '_' && !ISALPHA(*m) && !ismbchar(*m)) return Qfalse;
ISALPHA          1031 process.c      	if (*s != ' ' && !ISALPHA(*s) && strchr("*?{}[]<>()~&|\\$;'`\"\n",*s)) {
ISALPHA          1162 process.c      	if (*s != ' ' && !ISALPHA(*s) && strchr("*?{}[]<>()~&|\\$;'`\"\n",*s)) {
ISALPHA          1652 regex.c        		  || (is_alpha  && ISALPHA(ch))
ISALPHA          1376 win32/win32.c  	(!ISALPHA(filename[0]) || filename[1] != ':' || filename[2] != '\0' ||


ISASCII

ISASCII           465 bignum.c       	else if (!ISASCII(c)) {
ISASCII          10015 parse.c        	if (name[0] != '_' && ISASCII(name[0]) && !ISALNUM(name[0])) {
ISASCII          6017 parse.y        	if (name[0] != '_' && ISASCII(name[0]) && !ISALNUM(name[0])) {
ISASCII           245 regex.c        # define ISBLANK(c) (ISASCII(c) && isblank(c))
ISASCII           250 regex.c        # define ISGRAPH(c) (ISASCII(c) && isgraph(c))
ISASCII           252 regex.c        # define ISGRAPH(c) (ISASCII(c) && isprint(c) && !isspace(c))
ISASCII           256 regex.c        #define ISPRINT(c) (ISASCII(c) && isprint(c))
ISASCII           257 regex.c        #define ISDIGIT(c) (ISASCII(c) && isdigit(c))
ISASCII           258 regex.c        #define ISALNUM(c) (ISASCII(c) && isalnum(c))
ISASCII           259 regex.c        #define ISALPHA(c) (ISASCII(c) && isalpha(c))
ISASCII           260 regex.c        #define ISCNTRL(c) (ISASCII(c) && iscntrl(c))
ISASCII           261 regex.c        #define ISLOWER(c) (ISASCII(c) && islower(c))
ISASCII           262 regex.c        #define ISPUNCT(c) (ISASCII(c) && ispunct(c))
ISASCII           263 regex.c        #define ISSPACE(c) (ISASCII(c) && isspace(c))
ISASCII           264 regex.c        #define ISUPPER(c) (ISASCII(c) && isupper(c))
ISASCII           265 regex.c        #define ISXDIGIT(c) (ISASCII(c) && isxdigit(c))
ISASCII            48 ruby.h         #define ISPRINT(c) (ISASCII(c) && isprint((int)(unsigned char)(c)))
ISASCII            49 ruby.h         #define ISSPACE(c) (ISASCII(c) && isspace((int)(unsigned char)(c)))
ISASCII            50 ruby.h         #define ISUPPER(c) (ISASCII(c) && isupper((int)(unsigned char)(c)))
ISASCII            51 ruby.h         #define ISLOWER(c) (ISASCII(c) && islower((int)(unsigned char)(c)))
ISASCII            52 ruby.h         #define ISALNUM(c) (ISASCII(c) && isalnum((int)(unsigned char)(c)))
ISASCII            53 ruby.h         #define ISALPHA(c) (ISASCII(c) && isalpha((int)(unsigned char)(c)))
ISASCII            54 ruby.h         #define ISDIGIT(c) (ISASCII(c) && isdigit((int)(unsigned char)(c)))
ISASCII            55 ruby.h         #define ISXDIGIT(c) (ISASCII(c) && isxdigit((int)(unsigned char)(c)))


ISDIGIT

ISDIGIT           967 class.c            if (ISDIGIT(*p)) {
ISDIGIT           981 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           506 numeric.c          if (!ISDIGIT(e[-1])) { /* reformat if ended with decimal point (ex 111111111111111.) */
ISDIGIT           513 numeric.c          while (p[-1]=='0' && ISDIGIT(p[-2]))
ISDIGIT          2286 object.c       		    if (n == buf || !ISDIGIT(n[-1])) goto bad;
ISDIGIT          2288 object.c       		    if (!ISDIGIT(*p)) goto bad;
ISDIGIT           499 pack.c         	else if (ISDIGIT(*p)) {
ISDIGIT          1358 pack.c         	else if (ISDIGIT(*p)) {
ISDIGIT          7718 parse.c        	    if (ISDIGIT(c)) {
ISDIGIT          7748 parse.c        	    if (ISDIGIT(c)) {
ISDIGIT          7767 parse.c        	if (ISDIGIT(c)) {
ISDIGIT          7840 parse.c        		    if (ISDIGIT(c)) {
ISDIGIT          7847 parse.c        			    if (!ISDIGIT(c)) break;
ISDIGIT          7925 parse.c        			if (!ISDIGIT(c0)) {
ISDIGIT          8314 parse.c        	    } while (ISDIGIT(c));
ISDIGIT          8339 parse.c        	if (ISDIGIT(c)) {
ISDIGIT          9906 parse.c        	if (!ISDIGIT(*m)) return 0;
ISDIGIT          9907 parse.c        	do ++m; while (ISDIGIT(*m));
ISDIGIT          10049 parse.c            if (!ISDIGIT(*m)) {
ISDIGIT          3720 parse.y        	    if (ISDIGIT(c)) {
ISDIGIT          3750 parse.y        	    if (ISDIGIT(c)) {
ISDIGIT          3769 parse.y        	if (ISDIGIT(c)) {
ISDIGIT          3842 parse.y        		    if (ISDIGIT(c)) {
ISDIGIT          3849 parse.y        			    if (!ISDIGIT(c)) break;
ISDIGIT          3927 parse.y        			if (!ISDIGIT(c0)) {
ISDIGIT          4316 parse.y        	    } while (ISDIGIT(c));
ISDIGIT          4341 parse.y        	if (ISDIGIT(c)) {
ISDIGIT          5908 parse.y        	if (!ISDIGIT(*m)) return 0;
ISDIGIT          5909 parse.y        	do ++m; while (ISDIGIT(*m));
ISDIGIT          6051 parse.y            if (!ISDIGIT(*m)) {
ISDIGIT           588 regex.c        	while (ISDIGIT(c)) { 						\
ISDIGIT          1554 regex.c        	      if (!ISDIGIT(c))
ISDIGIT          1655 regex.c        		  || (is_digit  && ISDIGIT(ch))
ISDIGIT          2316 regex.c        	if (!ISDIGIT(c)) PATUNFETCH;
ISDIGIT           115 sprintf.c          for (; p < end && ISDIGIT(*p); p++) { \
ISDIGIT           315 sprintf.c      	    for (; p < end && ISDIGIT(*p); p++) {
ISDIGIT           368 sprintf.c      	    for (; p < end && ISDIGIT(*p); p++) {
ISDIGIT           786 util.c         	if (!ISDIGIT(c)) {
ISDIGIT           866 util.c         	    while (ISDIGIT(*p)) {


ISDIRSEP

ISDIRSEP          133 dir.c          		  ((s) == string || ISDIRSEP((s)[-1])))
ISDIRSEP          151 dir.c          	    if (!*s || ISDIRSEP(*s) || PERIOD(s))
ISDIRSEP          168 dir.c          	    else if (ISDIRSEP(c)) {
ISDIRSEP          184 dir.c          		else if (ISDIRSEP(*s))
ISDIRSEP          191 dir.c          	    if (!*s || ISDIRSEP(*s) || PERIOD(s))
ISDIRSEP          215 dir.c          	    if (ISDIRSEP(c) && isdirsep(*s))


ISLOWER

ISLOWER          1657 regex.c        		  || (is_lower  && ISLOWER(ch))
ISLOWER          2751 string.c       	else if (ISLOWER(*s)) {
ISLOWER          2861 string.c           if (ISLOWER(*s)) {
ISLOWER          2926 string.c       	else if (ISLOWER(*s)) {


ISO8859_1

ISO8859_1        1968 ext/nkf/nkf-utf8/nkf.c                         c2 = ISO8859_1;
ISO8859_1        2008 ext/nkf/nkf-utf8/nkf.c                         c2 = ISO8859_1;
ISO8859_1        2702 ext/nkf/nkf-utf8/nkf.c     } else if (c2 == ISO8859_1) {
ISO8859_1        2703 ext/nkf/nkf-utf8/nkf.c 	output_mode = ISO8859_1;
ISO8859_1        2741 ext/nkf/nkf-utf8/nkf.c     if (c2 == ISO8859_1) {
ISO8859_1        2787 ext/nkf/nkf-utf8/nkf.c     } else if (c2 == ISO8859_1) {
ISO8859_1        2788 ext/nkf/nkf-utf8/nkf.c 	output_mode = ISO8859_1;
ISO8859_1        2910 ext/nkf/nkf-utf8/nkf.c     } else if (c2 == ISO8859_1) {
ISO8859_1        2911 ext/nkf/nkf-utf8/nkf.c 	output_mode = ISO8859_1;
ISO8859_1        2961 ext/nkf/nkf-utf8/nkf.c         if (output_mode !=ASCII && output_mode!=ISO8859_1) {
ISO8859_1        2988 ext/nkf/nkf-utf8/nkf.c     } else if (c2==ISO8859_1) {
ISO8859_1        2992 ext/nkf/nkf-utf8/nkf.c 	output_mode = ISO8859_1;
ISO8859_1        2995 ext/nkf/nkf-utf8/nkf.c         if (output_mode !=ASCII && output_mode!=ISO8859_1) {
ISO8859_1        3401 ext/nkf/nkf-utf8/nkf.c     if (c2==0 || c2==X0201 || c2==ISO8859_1) {
ISO8859_1        3500 ext/nkf/nkf-utf8/nkf.c     JAPANESE_EUC, SHIFT_JIS,ISO8859_1, ISO8859_1, X0208, X0201,
ISO8859_1        4432 ext/nkf/nkf-utf8/nkf.c         if (c <= DEL && (output_mode==ASCII ||output_mode == ISO8859_1 ) ) {
ISO8859_1        4451 ext/nkf/nkf-utf8/nkf.c         if (c <= DEL && (output_mode==ASCII ||output_mode == ISO8859_1)) {
ISO8859_1        4502 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           282 re.c           	if (*p == '/' || (!ISPRINT(*p) && !ismbchar(*p))) {
ISPRINT           310 re.c           	    else if (ISPRINT(*p)) {
ISPRINT          1658 regex.c        		  || (is_print  && ISPRINT(ch))
ISPRINT           713 ruby.c         		if (ISPRINT(*s)) {
ISPRINT            45 ruby.h         #ifndef ISPRINT
ISPRINT           281 sprintf.c      	    if (ISPRINT(*p))
ISPRINT          2582 string.c       	else if (ISPRINT(c)) {
ISPRINT          2660 string.c       	    if (ISPRINT(c)) {
ISPRINT          2686 string.c       	else if (ISPRINT(c)) {


ISSPACE

ISSPACE           336 bignum.c       	while (ISSPACE(*str)) str++;
ISSPACE           339 bignum.c       	while (ISSPACE(*str) || *str == '_') str++;
ISSPACE           433 bignum.c       	    while (*end && ISSPACE(*end)) end++;
ISSPACE           500 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          2260 object.c       	while (ISSPACE(*p)) p++;
ISSPACE          2263 object.c       	while (ISSPACE(*p) || *p == '_') p++;
ISSPACE          2306 object.c       	    while (*end && ISSPACE(*end)) end++;
ISSPACE           475 pack.c         	if (ISSPACE(type)) continue;
ISSPACE          1330 pack.c         	if (ISSPACE(type)) continue;
ISSPACE          7077 parse.c        		else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
ISSPACE          7093 parse.c        	else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
ISSPACE          7121 parse.c            if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
ISSPACE          7122 parse.c        	do {c = nextc();} while (ISSPACE(c));
ISSPACE          7245 parse.c        	while (*p && ISSPACE(*p)) p++;
ISSPACE          7426 parse.c        	    if (IS_ARG() && space_seen && !ISSPACE(c)){
ISSPACE          7459 parse.c        	    if (strncmp(lex_p, "begin", 5) == 0 && ISSPACE(lex_p[5])) {
ISSPACE          7469 parse.c        			(lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) {
ISSPACE          7591 parse.c        	if (ISSPACE(c)){
ISSPACE          7655 parse.c        	if (IS_ARG() && space_seen && !ISSPACE(c)){
ISSPACE          7714 parse.c        	    (IS_ARG() && space_seen && !ISSPACE(c))) {
ISSPACE          7744 parse.c        	    (IS_ARG() && space_seen && !ISSPACE(c))) {
ISSPACE          8010 parse.c        	if (lex_state == EXPR_END || lex_state == EXPR_ENDARG || ISSPACE(c)) {
ISSPACE          8041 parse.c        	    if (!ISSPACE(c)) {
ISSPACE          8194 parse.c        		do {c = nextc();} while (ISSPACE(c));
ISSPACE          8200 parse.c        		do {c = nextc();} while (ISSPACE(c));
ISSPACE          8227 parse.c        	if (IS_ARG() && space_seen && !ISSPACE(c)) {
ISSPACE          3079 parse.y        		else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
ISSPACE          3095 parse.y        	else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
ISSPACE          3123 parse.y            if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
ISSPACE          3124 parse.y        	do {c = nextc();} while (ISSPACE(c));
ISSPACE          3247 parse.y        	while (*p && ISSPACE(*p)) p++;
ISSPACE          3428 parse.y        	    if (IS_ARG() && space_seen && !ISSPACE(c)){
ISSPACE          3461 parse.y        	    if (strncmp(lex_p, "begin", 5) == 0 && ISSPACE(lex_p[5])) {
ISSPACE          3471 parse.y        			(lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) {
ISSPACE          3593 parse.y        	if (ISSPACE(c)){
ISSPACE          3657 parse.y        	if (IS_ARG() && space_seen && !ISSPACE(c)){
ISSPACE          3716 parse.y        	    (IS_ARG() && space_seen && !ISSPACE(c))) {
ISSPACE          3746 parse.y        	    (IS_ARG() && space_seen && !ISSPACE(c))) {
ISSPACE          4012 parse.y        	if (lex_state == EXPR_END || lex_state == EXPR_ENDARG || ISSPACE(c)) {
ISSPACE          4043 parse.y        	    if (!ISSPACE(c)) {
ISSPACE          4196 parse.y        		do {c = nextc();} while (ISSPACE(c));
ISSPACE          4202 parse.y        		do {c = nextc();} while (ISSPACE(c));
ISSPACE          4229 parse.y        	if (IS_ARG() && space_seen && !ISSPACE(c)) {
ISSPACE          1022 process.c          while (*str && ISSPACE(*str))
ISSPACE           313 re.c           	    else if (!ISSPACE(*p)) {
ISSPACE          1529 regex.c        	      if (ISSPACE(c))
ISSPACE          1537 regex.c        	      if (!ISSPACE(c))
ISSPACE          1660 regex.c        		  || (is_space  && ISSPACE(ch))
ISSPACE           130 ruby.c         	    while (*newp && !ISSPACE(*newp) && *newp != ';') {
ISSPACE           133 ruby.c         	    while (*newp && (ISSPACE(*newp) || *newp == ';')) {
ISSPACE           441 ruby.c             while (*s && !ISSPACE(*s))
ISSPACE           448 ruby.c             while (*s && ISSPACE(*s))
ISSPACE           732 ruby.c         	while (ISSPACE(*s)) s++;
ISSPACE           748 ruby.c         		    if (ISSPACE(*s)) {
ISSPACE           749 ruby.c         			do {s++;} while (ISSPACE(*s));
ISSPACE           902 ruby.c         		    while (p < pend && ISSPACE(*p))
ISSPACE           905 ruby.c         		    while (p < pend && !ISSPACE(*p))
ISSPACE          3522 string.c       		if (ISSPACE(*ptr)) {
ISSPACE          3532 string.c       		if (ISSPACE(*ptr)) {
ISSPACE          4044 string.c           while (s < t && ISSPACE(*s)) s++;
ISSPACE          4104 string.c           while (s < t && ISSPACE(*(t-1))) t--;
ISSPACE           766 util.c             while (ISSPACE(*p)) {
ISSPACE           912 win32/win32.c  	while (ISSPACE(*cmd)) cmd++;
ISSPACE           914 win32/win32.c  	    if (ISSPACE(*prog)) {
ISSPACE           916 win32/win32.c  		do ++prog; while (ISSPACE(*prog));
ISSPACE           953 win32/win32.c  		if (ISSPACE(*prog) || strchr("<>|", *prog)) {
ISSPACE          1113 win32/win32.c      while (ISSPACE(*ptr))
ISSPACE          1134 win32/win32.c      while (ISSPACE(*cmd))


ISUPPER

ISUPPER            78 dir.c          #define downcase(c) (nocase && ISUPPER(c) ? tolower(c) : (c))
ISUPPER          2450 file.c         #define TOLOWER(c) (ISUPPER(c) ? tolower(c) : (c))
ISUPPER          8425 parse.c        		if (result == 0 && ISUPPER(tok()[0])) {
ISUPPER          9972 parse.c        	localid = !ISUPPER(*m);
ISUPPER          10041 parse.c        	else if (ISUPPER(name[0])) {
ISUPPER          4427 parse.y        		if (result == 0 && ISUPPER(tok()[0])) {
ISUPPER          5974 parse.y        	localid = !ISUPPER(*m);
ISUPPER          6043 parse.y        	else if (ISUPPER(name[0])) {
ISUPPER          1661 regex.c        		  || (is_upper  && ISUPPER(ch))
ISUPPER          2805 string.c       	else if (ISUPPER(*s)) {
ISUPPER          2869 string.c       	else if (ISUPPER(*s)) {
ISUPPER          2922 string.c       	else if (ISUPPER(*s)) {


ISXDIGIT

ISXDIGIT         7792 parse.c        		    if (ISXDIGIT(c)) {
ISXDIGIT         7799 parse.c        			    if (!ISXDIGIT(c)) break;
ISXDIGIT         3794 parse.y        		    if (ISXDIGIT(c)) {
ISXDIGIT         3801 parse.y        			    if (!ISXDIGIT(c)) break;
ISXDIGIT         1662 regex.c        		  || (is_xdigit && ISXDIGIT(ch)))


IS_ACTIVE

IS_ACTIVE        3458 regex.c                if (IS_ACTIVE(reg_info[this_reg]))				\
IS_ACTIVE        3630 regex.c            IS_ACTIVE (reg_info[mcnt]) = 0;
IS_ACTIVE        3729 regex.c        	IS_ACTIVE(reg_info[*p]) = 1;
IS_ACTIVE        3737 regex.c        	IS_ACTIVE(reg_info[*p]) = 0;
IS_ACTIVE        3755 regex.c        	  if (IS_ACTIVE(reg_info[regno])) goto fail;
IS_ACTIVE        4323 regex.c        	IS_ACTIVE(reg_info[this_reg]) = 0;


IS_ARG

IS_ARG           7426 parse.c        	    if (IS_ARG() && space_seen && !ISSPACE(c)){
IS_ARG           7507 parse.c        	    (!IS_ARG() || space_seen)) {
IS_ARG           7592 parse.c        	    if (!IS_ARG()){
IS_ARG           7655 parse.c        	if (IS_ARG() && space_seen && !ISSPACE(c)){
IS_ARG           7714 parse.c        	    (IS_ARG() && space_seen && !ISSPACE(c))) {
IS_ARG           7715 parse.c        	    if (IS_ARG()) arg_ambiguous();
IS_ARG           7744 parse.c        	    (IS_ARG() && space_seen && !ISSPACE(c))) {
IS_ARG           7745 parse.c        	    if (IS_ARG()) arg_ambiguous();
IS_ARG           8003 parse.c        		lex_state == EXPR_CLASS || (IS_ARG() && space_seen)) {
IS_ARG           8040 parse.c        	if (IS_ARG() && space_seen) {
IS_ARG           8125 parse.c        	else if (IS_ARG() && space_seen) {
IS_ARG           8134 parse.c        	if (IS_ARG() || lex_state == EXPR_END)
IS_ARG           8227 parse.c        	if (IS_ARG() && space_seen && !ISSPACE(c)) {
IS_ARG           3428 parse.y        	    if (IS_ARG() && space_seen && !ISSPACE(c)){
IS_ARG           3509 parse.y        	    (!IS_ARG() || space_seen)) {
IS_ARG           3594 parse.y        	    if (!IS_ARG()){
IS_ARG           3657 parse.y        	if (IS_ARG() && space_seen && !ISSPACE(c)){
IS_ARG           3716 parse.y        	    (IS_ARG() && space_seen && !ISSPACE(c))) {
IS_ARG           3717 parse.y        	    if (IS_ARG()) arg_ambiguous();
IS_ARG           3746 parse.y        	    (IS_ARG() && space_seen && !ISSPACE(c))) {
IS_ARG           3747 parse.y        	    if (IS_ARG()) arg_ambiguous();
IS_ARG           4005 parse.y        		lex_state == EXPR_CLASS || (IS_ARG() && space_seen)) {
IS_ARG           4042 parse.y        	if (IS_ARG() && space_seen) {
IS_ARG           4127 parse.y        	else if (IS_ARG() && space_seen) {
IS_ARG           4136 parse.y        	if (IS_ARG() || lex_state == EXPR_END)
IS_ARG           4229 parse.y        	if (IS_ARG() && space_seen && !ISSPACE(c)) {


IS_A_LETTER

IS_A_LETTER      3474 regex.c        			     IS_A_LETTER((d)-(!AT_STRINGS_BEG((d)-1)&&	\
IS_A_LETTER      3477 regex.c        			      IS_A_LETTER((d)-1)))
IS_A_LETTER      4190 regex.c        	  if (IS_A_LETTER(d)) break;
IS_A_LETTER      4197 regex.c        	if (PREV_IS_A_LETTER(d) != IS_A_LETTER(d))
IS_A_LETTER      4203 regex.c        	  if (IS_A_LETTER(d)) goto fail;
IS_A_LETTER      4210 regex.c        	if (PREV_IS_A_LETTER(d) != IS_A_LETTER(d))
IS_A_LETTER      4215 regex.c        	if (IS_A_LETTER(d) && (AT_STRINGS_BEG(d) || !PREV_IS_A_LETTER(d)))
IS_A_LETTER      4221 regex.c        	    && (!IS_A_LETTER(d) || AT_STRINGS_END(d)))
IS_A_LETTER      4227 regex.c        	if (!IS_A_LETTER(d))
IS_A_LETTER      4237 regex.c        	if (IS_A_LETTER(d))


IS_DLEXT

IS_DLEXT         6824 eval.c         	if ((!rb || !ext) && (IS_SOEXT(e) || IS_DLEXT(e))) {
IS_DLEXT         6957 eval.c         	else if (IS_DLEXT(ext)) {


IS_EVSTR

IS_EVSTR         2578 string.c       	else if (c == '"'|| c == '\\' || (c == '#' && IS_EVSTR(p, pend))) {
IS_EVSTR         2656 string.c       	    len += IS_EVSTR(p, pend) ? 2 : 1;
IS_EVSTR         2683 string.c       	    if (IS_EVSTR(p, pend)) *q++ = '\\';


IS_SOEXT

IS_SOEXT         6824 eval.c         	if ((!rb || !ext) && (IS_SOEXT(e) || IS_DLEXT(e))) {
IS_SOEXT         6938 eval.c         	else if (IS_SOEXT(ext)) {


ITER_CUR

ITER_CUR         4638 eval.c             if (ruby_frame->iter == ITER_CUR && ruby_block)
ITER_CUR         4674 eval.c             if (ruby_frame->prev && ruby_frame->prev->iter == ITER_CUR && ruby_block)
ITER_CUR         5644 eval.c         	itr = ITER_CUR;
ITER_CUR         5646 eval.c               case ITER_CUR:
ITER_CUR         7662 eval.c             ruby_frame->iter = ITER_CUR;
ITER_CUR         8380 eval.c             PUSH_ITER(ITER_CUR);
ITER_CUR         8381 eval.c             ruby_frame->iter = ITER_CUR;
ITER_CUR         9267 eval.c             PUSH_ITER(ITER_CUR);


ITER_NOT

ITER_NOT         1512 eval.c             PUSH_ITER(ITER_NOT);
ITER_NOT         1539 eval.c             PUSH_ITER(ITER_NOT);
ITER_NOT         1760 eval.c         	PUSH_ITER(ITER_NOT);
ITER_NOT         2208 eval.c         	tmp_iter = ITER_NOT;\
ITER_NOT         5648 eval.c         	itr = ITER_NOT;
ITER_NOT         5967 eval.c             PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
ITER_NOT         6087 eval.c             PUSH_ITER(ruby_iter->iter ? ITER_PRE : ITER_NOT);
ITER_NOT         6685 eval.c             PUSH_ITER(ITER_NOT);
ITER_NOT         7400 eval.c             PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
ITER_NOT         7646 eval.c             PUSH_ITER(ITER_NOT);
ITER_NOT         8655 eval.c         	PUSH_ITER(ITER_NOT);
ITER_NOT         8691 eval.c             if (ruby_frame->iter == ITER_NOT)
ITER_NOT         9000 eval.c             PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
ITER_NOT         9811 eval.c             PUSH_ITER(ITER_NOT);


ITER_PAS

ITER_PAS         2207 eval.c               case ITER_PAS:\
ITER_PAS         5643 eval.c               case ITER_PAS:
ITER_PAS         8675 eval.c         	PUSH_ITER(ITER_PAS);


ITER_PRE

ITER_PRE         2205 eval.c               case ITER_PRE:\
ITER_PRE         3107 eval.c         		PUSH_ITER(ITER_PRE);
ITER_PRE         5202 eval.c             PUSH_ITER(ITER_PRE);
ITER_PRE         5642 eval.c               case ITER_PRE:
ITER_PRE         5967 eval.c             PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
ITER_PRE         6087 eval.c             PUSH_ITER(ruby_iter->iter ? ITER_PRE : ITER_NOT);
ITER_PRE         7400 eval.c             PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
ITER_PRE         8690 eval.c             PUSH_ITER(ITER_PRE);
ITER_PRE         8692 eval.c         	ruby_frame->iter = ITER_PRE;
ITER_PRE         9000 eval.c             PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);


Init_Array

Init_Array         15 inits.c        void Init_Array _((void));
Init_Array         65 inits.c            Init_Array();


Init_Bignum

Init_Bignum        16 inits.c        void Init_Bignum _((void));
Init_Bignum        63 inits.c            Init_Bignum();


Init_Binding

Init_Binding       17 inits.c        void Init_Binding _((void));
Init_Binding       79 inits.c            Init_Binding();


Init_Comparable

Init_Comparable    18 inits.c        void Init_Comparable _((void));
Init_Comparable    55 inits.c            Init_Comparable();


Init_Dir

Init_Dir           19 inits.c        void Init_Dir _((void));
Init_Dir           72 inits.c            Init_Dir();


Init_Enumerable

Init_Enumerable    20 inits.c        void Init_Enumerable _((void));
Init_Enumerable    56 inits.c            Init_Enumerable();


Init_Exception

Init_Exception     21 inits.c        void Init_Exception _((void));
Init_Exception     60 inits.c            Init_Exception();


Init_File

Init_File          27 inits.c        void Init_File _((void));
Init_File          84 io.c           extern void Init_File _((void));
Init_File        5741 io.c               Init_File();


Init_GC

Init_GC            28 inits.c        void Init_GC _((void));
Init_GC            81 inits.c            Init_GC();


Init_Hash

Init_Hash          29 inits.c        void Init_Hash _((void));
Init_Hash          66 inits.c            Init_Hash();


Init_IO

Init_IO            30 inits.c        void Init_IO _((void));
Init_IO            71 inits.c            Init_IO();


Init_Math

Init_Math          31 inits.c        void Init_Math _((void));
Init_Math          80 inits.c            Init_Math();


Init_Numeric

Init_Numeric       33 inits.c        void Init_Numeric _((void));
Init_Numeric       62 inits.c            Init_Numeric();


Init_Object

Init_Object        34 inits.c        void Init_Object _((void));
Init_Object        54 inits.c            Init_Object();


Init_Precision

Init_Precision     36 inits.c        void Init_Precision _((void));
Init_Precision     57 inits.c            Init_Precision();


Init_Proc

Init_Proc          25 inits.c        void Init_Proc _((void));
Init_Proc          78 inits.c            Init_Proc();


Init_Random

Init_Random        39 inits.c        void Init_Random _((void));
Init_Random        74 inits.c            Init_Random();


Init_Range

Init_Range         40 inits.c        void Init_Range _((void));
Init_Range         70 inits.c            Init_Range();


Init_Regexp

Init_Regexp        41 inits.c        void Init_Regexp _((void));
Init_Regexp        68 inits.c            Init_Regexp();


Init_String

Init_String        43 inits.c        void Init_String _((void));
Init_String        59 inits.c            Init_String();


Init_Struct

Init_Struct        44 inits.c        void Init_Struct _((void));
Init_Struct        67 inits.c            Init_Struct();


Init_Thread

Init_Thread        26 inits.c        void Init_Thread _((void));
Init_Thread        61 inits.c            Init_Thread();


Init_Time

Init_Time          45 inits.c        void Init_Time _((void));
Init_Time          73 inits.c            Init_Time();


Init_dlhandle

Init_dlhandle     684 ext/dl/dl.c      void Init_dlhandle();
Init_dlhandle     721 ext/dl/dl.c      Init_dlhandle();


Init_dlptr

Init_dlptr        682 ext/dl/dl.c      void Init_dlptr();
Init_dlptr        719 ext/dl/dl.c      Init_dlptr();


Init_dlsym

Init_dlsym        683 ext/dl/dl.c      void Init_dlsym();
Init_dlsym        720 ext/dl/dl.c      Init_dlsym();


Init_eval

Init_eval          23 inits.c        void Init_eval _((void));
Init_eval          58 inits.c            Init_eval();


Init_ext

Init_ext         1285 eval.c         void Init_ext _((void));
Init_ext          332 ruby.c         extern void Init_ext _((void));
Init_ext          348 ruby.c             Init_ext();		/* should be called here for some reason :-( */


Init_heap

Init_heap        1284 eval.c         void Init_heap _((void));
Init_heap        1320 eval.c             Init_heap();


Init_load

Init_load          24 inits.c        void Init_load _((void));
Init_load          77 inits.c            Init_load();


Init_marshal

Init_marshal       32 inits.c        void Init_marshal _((void));
Init_marshal       82 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          35 inits.c        void Init_pack _((void));
Init_pack          69 inits.c            Init_pack();


Init_process

Init_process       38 inits.c        void Init_process _((void));
Init_process       76 inits.c            Init_process();


Init_signal

Init_signal        42 inits.c        void Init_signal _((void));
Init_signal        75 inits.c            Init_signal();


Init_stack

Init_stack       1283 eval.c         void Init_stack _((VALUE*));
Init_stack       1319 eval.c             Init_stack((void*)&state);
Init_stack       1457 eval.c             Init_stack((void*)&state);
Init_stack       1508 eval.c             Init_stack((void*)&state);
Init_stack       1562 eval.c             Init_stack((void*)&tmp);
Init_stack       11704 eval.c             Init_stack((VALUE*)&arg);
Init_stack       1523 gc.c           	Init_stack(0);


Init_sym

Init_sym           37 inits.c        void Init_sym _((void));
Init_sym           52 inits.c            Init_sym();


Init_syserr

Init_syserr        22 inits.c        void Init_syserr _((void));
Init_syserr        64 inits.c            Init_syserr();


Init_var_tables

Init_var_tables    46 inits.c        void Init_var_tables _((void));
Init_var_tables    53 inits.c            Init_var_tables();


Init_version

Init_version       47 inits.c        void Init_version _((void));
Init_version       83 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          2600 win32/win32.c      if (IsWin95()) pid = -pid;
IsWin95          3380 win32/win32.c      if (IsWin95()) pid = -pid;
IsWin95          3470 win32/win32.c  			   IsWin95() ? 0 : FILE_FLAG_BACKUP_SEMANTICS, 0);


IsWinNT

IsWinNT           330 win32/win32.c  	if (IsWinNT())
IsWinNT           991 win32/win32.c      if (!IsWinNT()) {
IsWinNT          2766 win32/win32.c  		if (IsWinNT()) {
IsWinNT          2952 win32/win32.c      ret = IsWinNT() ? winnt_stat(buf1, st) : stat(buf1, st);
IsWinNT          3034 win32/win32.c      if (IsWinNT()) {
IsWinNT          3056 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     2785 ext/nkf/nkf-utf8/nkf.c 	output_mode = JAPANESE_EUC;
JAPANESE_EUC     2792 ext/nkf/nkf-utf8/nkf.c 	output_mode = JAPANESE_EUC;
JAPANESE_EUC     2818 ext/nkf/nkf-utf8/nkf.c 	output_mode = JAPANESE_EUC;
JAPANESE_EUC     3500 ext/nkf/nkf-utf8/nkf.c     JAPANESE_EUC, SHIFT_JIS,ISO8859_1, ISO8859_1, X0208, X0201,


JIS_INPUT

JIS_INPUT        1202 ext/nkf/nkf-utf8/nkf.c             input_f = JIS_INPUT;
JIS_INPUT        1864 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         1652 eval.c         	JUMP_TAG(status);
JUMP_TAG         1743 eval.c             JUMP_TAG(state);
JUMP_TAG         1769 eval.c         	if (state) JUMP_TAG(state);
JUMP_TAG         2654 eval.c             if (state) JUMP_TAG(state);
JUMP_TAG         2921 eval.c         	if (state) JUMP_TAG(state);
JUMP_TAG         3056 eval.c         	if (state) JUMP_TAG(state);
JUMP_TAG         3091 eval.c         	if (state) JUMP_TAG(state);
JUMP_TAG         3138 eval.c         		JUMP_TAG(state);
JUMP_TAG         3150 eval.c         	JUMP_TAG(TAG_NEXT);
JUMP_TAG         3155 eval.c         	JUMP_TAG(TAG_REDO);
JUMP_TAG         3160 eval.c         	JUMP_TAG(TAG_RETRY);
JUMP_TAG         3233 eval.c         		JUMP_TAG(state);
JUMP_TAG         3256 eval.c         	if (state) JUMP_TAG(state);
JUMP_TAG         3471 eval.c         	    if (state) JUMP_TAG(state);
JUMP_TAG         4095 eval.c             if (state) JUMP_TAG(state);
JUMP_TAG         4459 eval.c         	JUMP_TAG(TAG_FATAL);
JUMP_TAG         4497 eval.c         	    JUMP_TAG(status);
JUMP_TAG         4512 eval.c             JUMP_TAG(tag);
JUMP_TAG         4632 eval.c             JUMP_TAG(tag);
JUMP_TAG         4720 eval.c         	    JUMP_TAG(TAG_RETURN);
JUMP_TAG         4725 eval.c         	    JUMP_TAG(TAG_RETURN);
JUMP_TAG         4750 eval.c         	    JUMP_TAG(TAG_BREAK);
JUMP_TAG         4960 eval.c         		    JUMP_TAG(TAG_BREAK);
JUMP_TAG         4968 eval.c         	JUMP_TAG(state);
JUMP_TAG         5226 eval.c         	JUMP_TAG(state);
JUMP_TAG         5308 eval.c             if (state) JUMP_TAG(state);
JUMP_TAG         5368 eval.c             if (state) JUMP_TAG(state);
JUMP_TAG         5393 eval.c             if (status) JUMP_TAG(status);
JUMP_TAG         5412 eval.c         	JUMP_TAG(state);
JUMP_TAG         5689 eval.c         		if (state) JUMP_TAG(state);
JUMP_TAG         5847 eval.c         		JUMP_TAG(state);
JUMP_TAG         5851 eval.c         		if (rb_block_given_p()) JUMP_TAG(state);
JUMP_TAG         6045 eval.c         	JUMP_TAG(status);
JUMP_TAG         6366 eval.c         	JUMP_TAG(state);
JUMP_TAG         6470 eval.c             if (state) JUMP_TAG(state);
JUMP_TAG         7063 eval.c             if (state) JUMP_TAG(state);
JUMP_TAG         8403 eval.c         	JUMP_TAG(state);
JUMP_TAG         8415 eval.c         	JUMP_TAG(state);
JUMP_TAG         8724 eval.c         	JUMP_TAG(state);
JUMP_TAG         9818 eval.c         	JUMP_TAG(state);
JUMP_TAG         10109 eval.c         	JUMP_TAG(TAG_FATAL);
JUMP_TAG         12827 eval.c             if (state) JUMP_TAG(state);
JUMP_TAG         12888 eval.c             JUMP_TAG(TAG_THROW);


KCODE_EUC

KCODE_EUC         101 defines.h      #define DEFAULT_KCODE KCODE_EUC
KCODE_EUC         160 re.c           #define KCODE_MASK (KCODE_EUC|KCODE_SJIS|KCODE_UTF8)
KCODE_EUC         169 re.c               FL_SET(re, KCODE_EUC);
KCODE_EUC         213 re.c                 case KCODE_EUC:
KCODE_EUC         233 re.c                 case KCODE_EUC:
KCODE_EUC         351 re.c           	      case KCODE_EUC:
KCODE_EUC         602 re.c           	  case KCODE_EUC:
KCODE_EUC        1671 re.c           	      case KCODE_EUC:
KCODE_EUC        1843 re.c                 case KCODE_EUC:
KCODE_EUC        1862 re.c                 case KCODE_EUC:
KCODE_EUC        1965 re.c                     case KCODE_EUC:
KCODE_EUC        2087 re.c                 case KCODE_EUC:
KCODE_EUC        2111 re.c           	reg_kcode = KCODE_EUC;
KCODE_EUC        2227 re.c           #if DEFAULT_KCODE == KCODE_EUC
KCODE_EUC          53 vms/config.h   #define DEFAULT_KCODE KCODE_EUC


KCODE_FIXED

KCODE_FIXED       170 re.c               FL_SET(re, KCODE_FIXED);
KCODE_FIXED       179 re.c               FL_SET(re, KCODE_FIXED);
KCODE_FIXED       188 re.c               FL_SET(re, KCODE_FIXED);
KCODE_FIXED       196 re.c               FL_SET(re, KCODE_FIXED);
KCODE_FIXED       205 re.c               if (!FL_TEST(re, KCODE_FIXED)) return;
KCODE_FIXED       252 re.c               if (!FL_TEST(re, KCODE_FIXED))
KCODE_FIXED       346 re.c           	if (FL_TEST(re, KCODE_FIXED)) {
KCODE_FIXED       598 re.c               if (FL_TEST(re, KCODE_FIXED)) {
KCODE_FIXED       839 re.c               if (!FL_TEST(re, KCODE_FIXED) &&
KCODE_FIXED       849 re.c           	if (FL_TEST(re, KCODE_FIXED))
KCODE_FIXED       870 re.c               if (FL_TEST(re, KCODE_FIXED))
KCODE_FIXED       904 re.c               if (FL_TEST(re, KCODE_FIXED))
KCODE_FIXED       918 re.c               if (FL_TEST(re, KCODE_FIXED))
KCODE_FIXED      1428 re.c               if (FL_TEST(re, KCODE_FIXED)) {
KCODE_FIXED      1666 re.c           	if (FL_TEST(argv[0], KCODE_FIXED)) {
KCODE_FIXED      1882 re.c               if (FL_TEST(re, KCODE_FIXED)) {
KCODE_FIXED      1935 re.c                           if (FL_TEST(v, KCODE_FIXED)) {


KCODE_MASK

KCODE_MASK        168 re.c               FL_UNSET(re, KCODE_MASK);
KCODE_MASK        177 re.c               FL_UNSET(re, KCODE_MASK);
KCODE_MASK        186 re.c               FL_UNSET(re, KCODE_MASK);
KCODE_MASK        195 re.c               FL_UNSET(re, KCODE_MASK);
KCODE_MASK        207 re.c               curr_kcode = RBASIC(re)->flags & KCODE_MASK;
KCODE_MASK        347 re.c           	    switch ((RBASIC(re)->flags & KCODE_MASK)) {
KCODE_MASK        599 re.c           	switch (RBASIC(re)->flags & KCODE_MASK) {
KCODE_MASK        840 re.c           	(RBASIC(re)->flags & KCODE_MASK) != reg_kcode) {
KCODE_MASK        842 re.c           	RBASIC(re)->flags &= ~KCODE_MASK;
KCODE_MASK       1429 re.c           	return RBASIC(re)->flags & KCODE_MASK;
KCODE_MASK       1667 re.c           	    switch (RBASIC(argv[0])->flags & KCODE_MASK) {
KCODE_MASK       1859 re.c               switch (RBASIC(re)->flags & KCODE_MASK) {
KCODE_MASK       1938 re.c                                   kcode = RBASIC(v)->flags & KCODE_MASK;
KCODE_MASK       1940 re.c                               else if ((RBASIC(v)->flags & KCODE_MASK) != kcode) {


KCODE_NONE

KCODE_NONE        210 re.c                 case KCODE_NONE:
KCODE_NONE        230 re.c                 case KCODE_NONE:
KCODE_NONE        348 re.c           	      case KCODE_NONE:
KCODE_NONE        600 re.c           	  case KCODE_NONE:
KCODE_NONE       1668 re.c           	      case KCODE_NONE:
KCODE_NONE       1849 re.c                 case KCODE_NONE:
KCODE_NONE       1860 re.c                 case KCODE_NONE:
KCODE_NONE       1962 re.c                     case KCODE_NONE:
KCODE_NONE       2130 re.c           	reg_kcode = KCODE_NONE;


KCODE_SJIS

KCODE_SJIS         99 defines.h      #define DEFAULT_KCODE KCODE_SJIS
KCODE_SJIS        160 re.c           #define KCODE_MASK (KCODE_EUC|KCODE_SJIS|KCODE_UTF8)
KCODE_SJIS        178 re.c               FL_SET(re, KCODE_SJIS);
KCODE_SJIS        216 re.c                 case KCODE_SJIS:
KCODE_SJIS        236 re.c                 case KCODE_SJIS:
KCODE_SJIS        354 re.c           	      case KCODE_SJIS:
KCODE_SJIS        604 re.c           	  case KCODE_SJIS:
KCODE_SJIS       1674 re.c           	      case KCODE_SJIS:
KCODE_SJIS       1845 re.c                 case KCODE_SJIS:
KCODE_SJIS       1864 re.c                 case KCODE_SJIS:
KCODE_SJIS       1968 re.c                     case KCODE_SJIS:
KCODE_SJIS       2085 re.c                 case KCODE_SJIS:
KCODE_SJIS       2116 re.c           	reg_kcode = KCODE_SJIS;
KCODE_SJIS       2230 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        187 re.c               FL_SET(re, KCODE_UTF8);
KCODE_UTF8        219 re.c                 case KCODE_UTF8:
KCODE_UTF8        239 re.c                 case KCODE_UTF8:
KCODE_UTF8        357 re.c           	      case KCODE_UTF8:
KCODE_UTF8        606 re.c           	  case KCODE_UTF8:
KCODE_UTF8       1677 re.c           	      case KCODE_UTF8:
KCODE_UTF8       1847 re.c                 case KCODE_UTF8:
KCODE_UTF8       1866 re.c                 case KCODE_UTF8:
KCODE_UTF8       1971 re.c                     case KCODE_UTF8:
KCODE_UTF8       2089 re.c                 case KCODE_UTF8:
KCODE_UTF8       2121 re.c           	reg_kcode = KCODE_UTF8;
KCODE_UTF8       2233 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           608 missing/vsnprintf.c 			flags |= LADJUST;
LADJUST           918 missing/vsnprintf.c 		if ((flags & (LADJUST|ZEROPAD)) == 0)
LADJUST           931 missing/vsnprintf.c 		if ((flags & (LADJUST|ZEROPAD)) == ZEROPAD)
LADJUST           986 missing/vsnprintf.c 		if (flags & LADJUST)


LAST

LAST             1922 ext/nkf/nkf-utf8/nkf.c                         LAST;
LAST             2031 ext/nkf/nkf-utf8/nkf.c                         LAST;
LAST             2037 ext/nkf/nkf-utf8/nkf.c 				LAST;
LAST             2041 ext/nkf/nkf-utf8/nkf.c                             LAST;
LAST             2062 ext/nkf/nkf-utf8/nkf.c                     LAST;
LAST             2068 ext/nkf/nkf-utf8/nkf.c                         LAST;
LAST             2083 ext/nkf/nkf-utf8/nkf.c                             LAST;
LAST             2119 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     1113 ext/nkf/nkf-utf8/nkf.c             input_f = LATIN1_INPUT;
LATIN1_INPUT     1864 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         151 dln.c          #ifndef LIBC_NAME
LIBC_NAME         645 dln.c              static char *libc = LIBC_NAME;


LK_ERR

LK_ERR            268 win32/win32.c  	LK_ERR(LockFileEx(fh, 0, 0, LK_LEN, LK_LEN, &o), i);
LK_ERR            271 win32/win32.c  	LK_ERR(LockFileEx(fh, LOCKFILE_EXCLUSIVE_LOCK, 0, LK_LEN, LK_LEN, &o), i);
LK_ERR            274 win32/win32.c  	LK_ERR(LockFileEx(fh, LOCKFILE_FAIL_IMMEDIATELY, 0, LK_LEN, LK_LEN, &o), i);
LK_ERR            277 win32/win32.c  	LK_ERR(LockFileEx(fh,
LK_ERR            283 win32/win32.c  	LK_ERR(UnlockFileEx(fh, 0, LK_LEN, LK_LEN, &o), i);
LK_ERR            303 win32/win32.c  	    LK_ERR(LockFile(fh, 0, 0, LK_LEN, LK_LEN), i);
LK_ERR            307 win32/win32.c  	LK_ERR(LockFile(fh, 0, 0, LK_LEN, LK_LEN), i);
LK_ERR            311 win32/win32.c  	LK_ERR(UnlockFile(fh, 0, 0, LK_LEN, LK_LEN), i);


LK_LEN

LK_LEN            268 win32/win32.c  	LK_ERR(LockFileEx(fh, 0, 0, LK_LEN, LK_LEN, &o), i);
LK_LEN            271 win32/win32.c  	LK_ERR(LockFileEx(fh, LOCKFILE_EXCLUSIVE_LOCK, 0, LK_LEN, LK_LEN, &o), i);
LK_LEN            274 win32/win32.c  	LK_ERR(LockFileEx(fh, LOCKFILE_FAIL_IMMEDIATELY, 0, LK_LEN, LK_LEN, &o), i);
LK_LEN            279 win32/win32.c  			  0, LK_LEN, LK_LEN, &o), i);
LK_LEN            283 win32/win32.c  	LK_ERR(UnlockFileEx(fh, 0, LK_LEN, LK_LEN, &o), i);
LK_LEN            303 win32/win32.c  	    LK_ERR(LockFile(fh, 0, 0, LK_LEN, LK_LEN), i);
LK_LEN            307 win32/win32.c  	LK_ERR(LockFile(fh, 0, 0, LK_LEN, LK_LEN), i);
LK_LEN            311 win32/win32.c  	LK_ERR(UnlockFile(fh, 0, 0, LK_LEN, LK_LEN), i);
LK_LEN           3393 win32/win32.c  	UnlockFile((HANDLE)sock, 0, 0, LK_LEN, LK_LEN);
LK_LEN           3411 win32/win32.c  	UnlockFile((HANDLE)sock, 0, 0, LK_LEN, LK_LEN);


LLONG_MAX

LLONG_MAX        1667 numeric.c      	if (RFLOAT(val)->value <= (double)LLONG_MAX
LLONG_MAX         103 ruby.h         # ifndef LLONG_MAX
LLONG_MAX         122 ruby.h         #    define LLONG_MIN (-LLONG_MAX-1)


LLONG_MIN

LLONG_MIN         827 bignum.c       			       || (LONG_LONG)num != LLONG_MIN)) {
LLONG_MIN        1668 numeric.c      	    && RFLOAT(val)->value >= (double)LLONG_MIN) {
LLONG_MIN         115 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  271 win32/win32.c  	LK_ERR(LockFileEx(fh, LOCKFILE_EXCLUSIVE_LOCK, 0, LK_LEN, LK_LEN, &o), i);
LOCKFILE_EXCLUSIVE_LOCK  278 win32/win32.c  			  LOCKFILE_EXCLUSIVE_LOCK|LOCKFILE_FAIL_IMMEDIATELY,


LOCKFILE_FAIL_IMMEDIATELY

LOCKFILE_FAIL_IMMEDIATELY  274 win32/win32.c  	LK_ERR(LockFileEx(fh, LOCKFILE_FAIL_IMMEDIATELY, 0, LK_LEN, LK_LEN, &o), i);
LOCKFILE_FAIL_IMMEDIATELY  278 win32/win32.c  			  LOCKFILE_EXCLUSIVE_LOCK|LOCKFILE_FAIL_IMMEDIATELY,


LOCK_EX

LOCK_EX          3095 file.c         # ifndef LOCK_EX
LOCK_EX          4423 file.c             rb_file_const("LOCK_EX", INT2FIX(LOCK_EX));
LOCK_EX            11 missing/flock.c # ifndef LOCK_EX
LOCK_EX            36 missing/flock.c     case LOCK_EX:
LOCK_EX            82 missing/flock.c # ifndef LOCK_EX
LOCK_EX           104 missing/flock.c       case LOCK_EX:
LOCK_EX           112 missing/flock.c       case LOCK_EX|LOCK_NB:
LOCK_EX           270 win32/win32.c        case LOCK_EX:		/* exclusive lock */
LOCK_EX           276 win32/win32.c        case LOCK_EX|LOCK_NB:	/* non-blocking exclusive lock */
LOCK_EX           301 win32/win32.c        case LOCK_EX:
LOCK_EX           306 win32/win32.c        case LOCK_EX|LOCK_NB:


LOCK_NB

LOCK_NB          3098 file.c         # ifndef LOCK_NB
LOCK_NB          3111 file.c             if (rb_thread_alone() || (op & LOCK_NB)) {
LOCK_NB          3118 file.c             op |= LOCK_NB;
LOCK_NB          4425 file.c             rb_file_const("LOCK_NB", INT2FIX(LOCK_NB));
LOCK_NB            14 missing/flock.c # ifndef LOCK_NB
LOCK_NB            32 missing/flock.c     switch (operation & ~LOCK_NB) {
LOCK_NB            49 missing/flock.c     return fcntl(fd, (operation & LOCK_NB) ? F_SETLK : F_SETLKW, &lock);
LOCK_NB            85 missing/flock.c # ifndef LOCK_NB
LOCK_NB           108 missing/flock.c       case LOCK_SH|LOCK_NB:
LOCK_NB           112 missing/flock.c       case LOCK_EX|LOCK_NB:
LOCK_NB           273 win32/win32.c        case LOCK_SH|LOCK_NB:	/* non-blocking shared lock */
LOCK_NB           276 win32/win32.c        case LOCK_EX|LOCK_NB:	/* non-blocking exclusive lock */
LOCK_NB           282 win32/win32.c        case LOCK_UN|LOCK_NB:	/* unlock is always non-blocking, I hope */
LOCK_NB           306 win32/win32.c        case LOCK_EX|LOCK_NB:
LOCK_NB           310 win32/win32.c        case LOCK_UN|LOCK_NB:


LOCK_SH

LOCK_SH          3092 file.c         # ifndef LOCK_SH
LOCK_SH          4422 file.c             rb_file_const("LOCK_SH", INT2FIX(LOCK_SH));
LOCK_SH             8 missing/flock.c # ifndef LOCK_SH
LOCK_SH            33 missing/flock.c     case LOCK_SH:
LOCK_SH            79 missing/flock.c # ifndef LOCK_SH
LOCK_SH           100 missing/flock.c       case LOCK_SH:
LOCK_SH           108 missing/flock.c       case LOCK_SH|LOCK_NB:
LOCK_SH           267 win32/win32.c        case LOCK_SH:		/* shared lock */
LOCK_SH           273 win32/win32.c        case LOCK_SH|LOCK_NB:	/* non-blocking shared lock */


LOCK_UN

LOCK_UN          3101 file.c         # ifndef LOCK_UN
LOCK_UN          4424 file.c             rb_file_const("LOCK_UN", INT2FIX(LOCK_UN));
LOCK_UN            17 missing/flock.c # ifndef LOCK_UN
LOCK_UN            39 missing/flock.c     case LOCK_UN:
LOCK_UN            88 missing/flock.c # ifndef LOCK_UN
LOCK_UN           116 missing/flock.c       case LOCK_UN:
LOCK_UN           281 win32/win32.c        case LOCK_UN:		/* unlock lock */
LOCK_UN           282 win32/win32.c        case LOCK_UN|LOCK_NB:	/* unlock is always non-blocking, I hope */
LOCK_UN           309 win32/win32.c        case LOCK_UN:
LOCK_UN           310 win32/win32.c        case LOCK_UN|LOCK_NB:


LOG_PI_OVER_2

LOG_PI_OVER_2      79 missing/erf.c      if (x >= 0) return   p_gamma(0.5, x * x, LOG_PI_OVER_2);
LOG_PI_OVER_2      80 missing/erf.c      else        return - p_gamma(0.5, x * x, LOG_PI_OVER_2);
LOG_PI_OVER_2      90 missing/erf.c      if (x >= 0) return  q_gamma(0.5, x * x, LOG_PI_OVER_2);
LOG_PI_OVER_2      91 missing/erf.c      else        return  1 + p_gamma(0.5, x * x, LOG_PI_OVER_2);


LONG2FIX

LONG2FIX         2532 array.c            return LONG2FIX(h);
LONG2FIX          116 bignum.c       		    if (POSFIXABLE(num)) return LONG2FIX(num);
LONG2FIX          118 bignum.c       		else if (NEGFIXABLE(-(long)num)) return LONG2FIX(-(long)num);
LONG2FIX          176 bignum.c           if (POSFIXABLE(n)) return LONG2FIX(n);
LONG2FIX          184 bignum.c           if (FIXABLE(n)) return LONG2FIX(n);
LONG2FIX          231 bignum.c       	if (FIXABLE((LONG_LONG)q)) return LONG2FIX((LONG_LONG)q);
LONG2FIX          238 bignum.c       	if (POSFIXABLE(q)) return LONG2FIX(q);
LONG2FIX          438 bignum.c       	    if (sign) return LONG2FIX(val);
LONG2FIX          441 bignum.c       		return LONG2FIX(result);
LONG2FIX          585 bignum.c           if (POSFIXABLE(n)) return LONG2FIX(n);
LONG2FIX          593 bignum.c           if (FIXABLE(n)) return LONG2FIX(n);
LONG2FIX         1959 bignum.c           return LONG2FIX(key);
LONG2FIX         2041 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         1727 file.c             return LONG2FIX(n);
LONG2FIX         1801 file.c             return LONG2FIX(n);
LONG2FIX         1869 file.c             return LONG2FIX(n);
LONG2FIX         1959 file.c             return LONG2FIX(n);
LONG2FIX         2011 file.c             return LONG2FIX(n);
LONG2FIX         2051 file.c             return LONG2FIX(n);
LONG2FIX         2203 file.c             return LONG2FIX(n);
LONG2FIX          567 io.c               return LONG2FIX(n);
LONG2FIX         2360 io.c               return LONG2FIX(n);
LONG2FIX         1011 marshal.c      	v = rb_hash_aref(arg->data, LONG2FIX(id));
LONG2FIX         1077 marshal.c      	    v = LONG2FIX(i);
LONG2FIX         1222 marshal.c      		rb_struct_aset(v, LONG2FIX(i), r_object(arg));
LONG2FIX         1232 numeric.c          return LONG2FIX(val);
LONG2FIX         1259 numeric.c          return LONG2FIX(val);
LONG2FIX         1293 numeric.c          return LONG2FIX(val);
LONG2FIX         1319 numeric.c          return LONG2FIX(val);
LONG2FIX         1459 numeric.c      		rb_yield(LONG2FIX(i));
LONG2FIX         1465 numeric.c      		rb_yield(LONG2FIX(i));
LONG2FIX         1650 numeric.c          return LONG2FIX(v);
LONG2FIX         1981 numeric.c      	r = LONG2FIX(c);
LONG2FIX         2014 numeric.c      	r = LONG2FIX(c);
LONG2FIX         2049 numeric.c      	r = LONG2FIX(c);
LONG2FIX         2447 numeric.c      	return fix_rshift(x, LONG2FIX(-width));
LONG2FIX         2471 numeric.c      	return fix_lshift(x, LONG2FIX(-i));
LONG2FIX         2479 numeric.c          return LONG2FIX(val);
LONG2FIX         2658 numeric.c      	    rb_yield(LONG2FIX(i));
LONG2FIX         2697 numeric.c      	    rb_yield(LONG2FIX(i));
LONG2FIX         2737 numeric.c      	    rb_yield(LONG2FIX(i));
LONG2FIX         1141 object.c           return LONG2FIX(id);
LONG2FIX         9490 parse.c        	node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit));
LONG2FIX         5492 parse.y        	node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit));
LONG2FIX          222 range.c            return LONG2FIX(hash);
LONG2FIX         1518 re.c               return LONG2FIX(start);
LONG2FIX         1589 re.c               return LONG2FIX(start);
LONG2FIX         1016 string.c       		return rb_funcall(LONG2FIX(0), '-', 1, tmp);
LONG2FIX          827 struct.c           return LONG2FIX(h);
LONG2FIX          873 struct.c           return LONG2FIX(RSTRUCT(s)->len);
LONG2FIX         1031 time.c             return LONG2FIX(hash);
LONG2FIX         1700 time.c         	return LONG2FIX(off);


LONG2NUM

LONG2NUM          308 array.c        	    rb_ary_store(ary, i, rb_yield(LONG2NUM(i)));
LONG2NUM          863 array.c        	    return LONG2NUM(i);
LONG2NUM          894 array.c        	    return LONG2NUM(i);
LONG2NUM         1155 array.c        	rb_yield(LONG2NUM(i));
LONG2NUM         1203 array.c            return LONG2NUM(RARRAY(ary)->len);
LONG2NUM         2273 array.c        	    v = rb_yield(LONG2NUM(i));
LONG2NUM         2859 array.c            return LONG2NUM(n);
LONG2NUM         7045 eval.c         		    rb_ary_push(ruby_dln_librefs, LONG2NUM(handle));
LONG2NUM          205 ext/dl/dl.h    #if defined(LONG2NUM) && (SIZEOF_LONG == SIZEOF_VOIDP)
LONG2NUM          206 ext/dl/dl.h    # define DLLONG2NUM(x) LONG2NUM((long)x)
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          525 ext/stringio/stringio.c     return LONG2NUM(StringIO(self)->lineno);
LONG2NUM          587 ext/stringio/stringio.c     return LONG2NUM(StringIO(self)->pos);
LONG2NUM         1020 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          887 marshal.c      	VALUE n = LONG2NUM(len);
LONG2NUM         1771 numeric.c      	return LONG2NUM(i);
LONG2NUM         1892 numeric.c          return LONG2NUM(-FIX2LONG(num));
LONG2NUM         2131 numeric.c      	return LONG2NUM(div);
LONG2NUM         2153 numeric.c      	return LONG2NUM(mod);
LONG2NUM         2173 numeric.c      	return rb_assoc_new(LONG2NUM(div), LONG2NUM(mod));
LONG2NUM         2366 numeric.c          return LONG2NUM(val);
LONG2NUM         2386 numeric.c          return LONG2NUM(val);
LONG2NUM         2406 numeric.c          return LONG2NUM(val);
LONG2NUM         2426 numeric.c          return LONG2NUM(val);
LONG2NUM         2453 numeric.c          return LONG2NUM(val);
LONG2NUM         2563 numeric.c          return LONG2NUM(i);
LONG2NUM          136 object.c       	return LONG2NUM((long)obj);
LONG2NUM         1559 pack.c         		rb_ary_push(ary, LONG2NUM(tmp));
LONG2NUM          474 random.c                       return LONG2NUM(limited_rand(FIX2LONG((VALUE)limit)));
LONG2NUM          494 random.c           return LONG2NUM(val);
LONG2NUM          323 range.c        	    rb_yield(LONG2NUM(i));
LONG2NUM          411 range.c        	    rb_yield(LONG2NUM(i));
LONG2NUM          350 string.c           return LONG2NUM(RSTRING(str)->len);
LONG2NUM         1024 string.c           return LONG2NUM(result);
LONG2NUM         1136 string.c       	      if (p[pos] == c) return LONG2NUM(pos);
LONG2NUM         1158 string.c           return LONG2NUM(pos);
LONG2NUM         1244 string.c       	if (pos >= 0) return LONG2NUM(pos);
LONG2NUM         1249 string.c       	if (pos >= 0) return LONG2NUM(pos);
LONG2NUM         1263 string.c       	      if (*p == c) return LONG2NUM((char*)p - RSTRING(str)->ptr);
LONG2NUM          206 struct.c           rb_iv_set(nstr, "__size__", LONG2NUM(RARRAY(members)->len));
LONG2NUM          701 struct.c           return rb_struct_aref(s, LONG2NUM(n));
LONG2NUM          876 time.c             return LONG2NUM(tobj->tv.tv_sec);
LONG2NUM          920 time.c             return LONG2NUM(tobj->tv.tv_usec);
LONG2NUM         1530 time.c             return LONG2NUM((long)tobj->tm.tm_year+1900);
LONG2NUM         1736 time.c         		    LONG2NUM((long)tobj->tm.tm_year+1900),


LONGINT

LONGINT           543 missing/vsnprintf.c 	(flags&LONGINT ? va_arg(ap, long) : \
LONGINT           547 missing/vsnprintf.c 	(flags&LONGINT ? va_arg(ap, u_long) : \
LONGINT           652 missing/vsnprintf.c 			flags |= LONGINT;
LONGINT           665 missing/vsnprintf.c 			flags |= LONGINT;
LONGINT           754 missing/vsnprintf.c 			else if (flags & LONGINT)
LONGINT           756 missing/vsnprintf.c 			if (flags & LONGINT)
LONGINT           765 missing/vsnprintf.c 			flags |= LONGINT;
LONGINT           821 missing/vsnprintf.c 			flags |= LONGINT;


LONG_ALIGN

LONG_ALIGN        187 ext/dl/dl.c          DLALIGN(0,size,LONG_ALIGN);
LONG_ALIGN        762 ext/dl/ptr.c   	  DLALIGN(data->ptr,offset,LONG_ALIGN);
LONG_ALIGN        892 ext/dl/ptr.c   	  DLALIGN(data->ptr,offset,LONG_ALIGN);


LONG_DLTYPE

LONG_DLTYPE        65 ext/dl/dl.h    # define PUSH_I(x) PUSH_ARG(x,LONG_DLTYPE)
LONG_DLTYPE        73 ext/dl/dl.h    #define PUSH_L(x) PUSH_ARG(x,LONG_DLTYPE)
LONG_DLTYPE       101 ext/dl/dl.h    # define PUSH_P(x) PUSH_ARG(x,LONG_DLTYPE)


LONG_LONG

LONG_LONG         195 bignum.c           LONG_LONG q;
LONG_LONG         223 bignum.c           unsigned LONG_LONG q;
LONG_LONG         231 bignum.c       	if (FIXABLE((LONG_LONG)q)) return LONG2FIX((LONG_LONG)q);
LONG_LONG         232 bignum.c       	if ((LONG_LONG)q < 0) {
LONG_LONG         233 bignum.c       	    q = -(LONG_LONG)q;
LONG_LONG         543 bignum.c           unsigned LONG_LONG n;
LONG_LONG         565 bignum.c           LONG_LONG n;
LONG_LONG         583 bignum.c           unsigned LONG_LONG n;
LONG_LONG         591 bignum.c           LONG_LONG n;
LONG_LONG         790 bignum.c       static unsigned LONG_LONG
LONG_LONG         810 bignum.c       unsigned LONG_LONG
LONG_LONG         814 bignum.c           unsigned LONG_LONG num = big2ull(x, "unsigned long long");
LONG_LONG         820 bignum.c       LONG_LONG
LONG_LONG         824 bignum.c           unsigned LONG_LONG num = big2ull(x, "long long");
LONG_LONG         826 bignum.c           if ((LONG_LONG)num < 0 && (RBIGNUM(x)->sign
LONG_LONG         827 bignum.c       			       || (LONG_LONG)num != LLONG_MIN)) {
LONG_LONG         830 bignum.c           if (!RBIGNUM(x)->sign) return -(LONG_LONG)num;
LONG_LONG          66 defines.h      # define BDIGIT_DBL unsigned LONG_LONG
LONG_LONG          67 defines.h      # define BDIGIT_DBL_SIGNED LONG_LONG
LONG_LONG          78 intern.h       VALUE rb_ll2inum _((LONG_LONG));
LONG_LONG          79 intern.h       VALUE rb_ull2inum _((unsigned LONG_LONG));
LONG_LONG          80 intern.h       LONG_LONG rb_big2ll _((VALUE));
LONG_LONG          81 intern.h       unsigned LONG_LONG rb_big2ull _((VALUE));
LONG_LONG        1655 numeric.c      LONG_LONG
LONG_LONG        1663 numeric.c          if (FIXNUM_P(val)) return (LONG_LONG)FIX2LONG(val);
LONG_LONG        1669 numeric.c      	    return (LONG_LONG)(RFLOAT(val)->value);
LONG_LONG        1698 numeric.c      unsigned LONG_LONG
LONG_LONG        1705 numeric.c          return (unsigned LONG_LONG)rb_num2ll(val);
LONG_LONG         363 pack.c         # define QUAD_SIZE sizeof(LONG_LONG)
LONG_LONG         145 ruby.h         VALUE rb_ll2inum _((LONG_LONG));
LONG_LONG         147 ruby.h         VALUE rb_ull2inum _((unsigned LONG_LONG));
LONG_LONG         266 ruby.h         LONG_LONG rb_num2ll _((VALUE));
LONG_LONG         267 ruby.h         unsigned LONG_LONG rb_num2ull _((VALUE));


LONG_MAX

LONG_MAX         2368 array.c            if (LONG_MAX/len < RARRAY(ary)->len) {
LONG_MAX         1125 io.c           	    if (siz > LONG_MAX) {
LONG_MAX           88 missing/vsnprintf.c # ifndef LONG_MAX
LONG_MAX          380 missing/vsnprintf.c 		if (val > LONG_MAX) {
LONG_MAX         1516 numeric.c      	if (RFLOAT(val)->value <= (double)LONG_MAX
LONG_MAX          453 random.c       	if (RFLOAT(vmax)->value <= LONG_MAX && RFLOAT(vmax)->value >= LONG_MIN) {
LONG_MAX           86 ruby.h         # ifndef LONG_MAX
LONG_MAX           95 ruby.h         #  define LONG_MIN (-LONG_MAX-1)
LONG_MAX          128 ruby.h         #define FIXNUM_MAX (LONG_MAX>>1)
LONG_MAX          422 string.c           if (len && LONG_MAX/len <  RSTRING(str)->len) {


LONG_MIN

LONG_MIN          781 bignum.c           if ((long)num < 0 && (RBIGNUM(x)->sign || (long)num != LONG_MIN)) {
LONG_MIN         1517 numeric.c      	    && RFLOAT(val)->value >= (double)LONG_MIN) {
LONG_MIN          453 random.c       	if (RFLOAT(vmax)->value <= LONG_MAX && RFLOAT(vmax)->value >= LONG_MIN) {
LONG_MIN           94 ruby.h         # ifndef LONG_MIN
LONG_MIN          129 ruby.h         #define FIXNUM_MIN RSHIFT((long)LONG_MIN,1)


LOOKUP_ORDERS

LOOKUP_ORDERS     132 ext/socket/socket.c static int lookup_order_table[LOOKUP_ORDERS] = {
LOOKUP_ORDERS     156 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


LoadLibrary

LoadLibrary      1309 dln.c              if ((handle = LoadLibrary(winfile)) == NULL) {
LoadLibrary        53 ext/Win32API/Win32API.c     hdll = LoadLibrary(RSTRING(dllname)->ptr);
LoadLibrary        27 ext/dl/dl.h    #   define dlopen(name,flag) ((void*)LoadLibrary(name))
LoadLibrary        66 ext/tk/stubs.c # define DL_OPEN LoadLibrary
LoadLibrary      1384 ext/win32ole/win32ole.c         gole32 = LoadLibrary("OLE32");
LoadLibrary      1725 ext/win32ole/win32ole.c         ghhctrl = LoadLibrary("HHCTRL.OCX");


LockFile

LockFile          303 win32/win32.c  	    LK_ERR(LockFile(fh, 0, 0, LK_LEN, LK_LEN), i);
LockFile          307 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        268 win32/win32.c  	LK_ERR(LockFileEx(fh, 0, 0, LK_LEN, LK_LEN, &o), i);
LockFileEx        271 win32/win32.c  	LK_ERR(LockFileEx(fh, LOCKFILE_EXCLUSIVE_LOCK, 0, LK_LEN, LK_LEN, &o), i);
LockFileEx        274 win32/win32.c  	LK_ERR(LockFileEx(fh, LOCKFILE_FAIL_IMMEDIATELY, 0, LK_LEN, LK_LEN, &o), i);
LockFileEx        277 win32/win32.c  	LK_ERR(LockFileEx(fh,
LockFileEx        130 wince/wince.h  BOOL LockFileEx(HANDLE hFile,


M

M                 139 random.c           for (j=N-M+1; --j; p++)
M                 140 random.c               *p = p[M] ^ TWIST(p[0], p[1]);
M                 142 random.c           for (j=M; --j; p++)
M                 143 random.c               *p = p[M-N] ^ TWIST(p[0], p[1]);
M                 145 random.c           *p = p[M-N] ^ TWIST(p[0], state[0]);


MANT_BITS

MANT_BITS         234 marshal.c      	    d = modf(ldexp(d, MANT_BITS), &n);
MANT_BITS         236 marshal.c      #if MANT_BITS > 24
MANT_BITS         239 marshal.c      #if MANT_BITS > 16
MANT_BITS         242 marshal.c      #if MANT_BITS > 8
MANT_BITS         267 marshal.c      #if MANT_BITS > 24
MANT_BITS         270 marshal.c      #if MANT_BITS > 16
MANT_BITS         273 marshal.c      #if MANT_BITS > 8
MANT_BITS         277 marshal.c      	    dig -= len < MANT_BITS / 8 ? 8 * (unsigned)len : MANT_BITS;
MANT_BITS         279 marshal.c      	} while ((len -= MANT_BITS / 8) > 0);


MARK_FRAME_ADJ

MARK_FRAME_ADJ   9953 eval.c         	MARK_FRAME_ADJ(frame);
MARK_FRAME_ADJ   9959 eval.c         		MARK_FRAME_ADJ(tmp);
MARK_FRAME_ADJ   9968 eval.c         	MARK_FRAME_ADJ(&block->frame);


MARK_STACK_MAX

MARK_STACK_MAX    504 gc.c           static VALUE mark_stack[MARK_STACK_MAX];
MARK_STACK_MAX    584 gc.c               VALUE tmp_arry[MARK_STACK_MAX];
MARK_STACK_MAX    588 gc.c               MEMCPY(tmp_arry, mark_stack, VALUE, MARK_STACK_MAX);
MARK_STACK_MAX    721 gc.c           	    if (mark_stack_ptr - mark_stack < MARK_STACK_MAX) {


MARSHAL_MAJOR

MARSHAL_MAJOR     773 marshal.c          w_byte(MARSHAL_MAJOR, &arg);
MARSHAL_MAJOR    1414 marshal.c          if (major != MARSHAL_MAJOR || minor > MARSHAL_MINOR) {
MARSHAL_MAJOR    1417 marshal.c      		 MARSHAL_MAJOR, MARSHAL_MINOR, major, minor);
MARSHAL_MAJOR    1422 marshal.c      		MARSHAL_MAJOR, MARSHAL_MINOR, major, minor);
MARSHAL_MAJOR    1488 marshal.c          rb_define_const(rb_mMarshal, "MAJOR_VERSION", INT2FIX(MARSHAL_MAJOR));


MARSHAL_MINOR

MARSHAL_MINOR     774 marshal.c          w_byte(MARSHAL_MINOR, &arg);
MARSHAL_MINOR    1414 marshal.c          if (major != MARSHAL_MAJOR || minor > MARSHAL_MINOR) {
MARSHAL_MINOR    1417 marshal.c      		 MARSHAL_MAJOR, MARSHAL_MINOR, major, minor);
MARSHAL_MINOR    1419 marshal.c          if (RTEST(ruby_verbose) && minor != MARSHAL_MINOR) {
MARSHAL_MINOR    1422 marshal.c      		MARSHAL_MAJOR, MARSHAL_MINOR, major, minor);
MARSHAL_MINOR    1489 marshal.c          rb_define_const(rb_mMarshal, "MINOR_VERSION", INT2FIX(MARSHAL_MINOR));


MATCHED

MATCHED           431 ext/strscan/strscan.c     MATCHED(p);
MATCHED           692 ext/strscan/strscan.c     MATCHED(p);
MATCHED           719 ext/strscan/strscan.c     MATCHED(p);


MATCHED_P

MATCHED_P         796 ext/strscan/strscan.c     if (! MATCHED_P(p))
MATCHED_P         900 ext/strscan/strscan.c     if (MATCHED_P(p))
MATCHED_P         920 ext/strscan/strscan.c     if (! MATCHED_P(p)) return Qnil;
MATCHED_P         943 ext/strscan/strscan.c     if (! MATCHED_P(p)) return Qnil;
MATCHED_P         982 ext/strscan/strscan.c     if (! MATCHED_P(p))        return Qnil;
MATCHED_P        1011 ext/strscan/strscan.c     if (! MATCHED_P(p)) return Qnil;
MATCHED_P        1032 ext/strscan/strscan.c     if (! MATCHED_P(p)) return Qnil;


MATCHED_SOMETHING

MATCHED_SOMETHING 3459 regex.c                  MATCHED_SOMETHING(reg_info[this_reg]) = 1;			\
MATCHED_SOMETHING 3461 regex.c                  MATCHED_SOMETHING(reg_info[this_reg]) = 0;			\
MATCHED_SOMETHING 3631 regex.c            MATCHED_SOMETHING (reg_info[mcnt]) = 0;
MATCHED_SOMETHING 3730 regex.c        	MATCHED_SOMETHING(reg_info[*p]) = 0;
MATCHED_SOMETHING 4324 regex.c        	MATCHED_SOMETHING(reg_info[this_reg]) = 0;


MATCH_BUSY

MATCH_BUSY        812 re.c               FL_SET(match, MATCH_BUSY);
MATCH_BUSY        932 re.c               if (NIL_P(match) || FL_TEST(match, MATCH_BUSY)) {


MATCH_DATA

MATCH_DATA       2413 eval.c         	if (RTEST(rb_reg_nth_defined(node->nd_nth, MATCH_DATA))) {
MATCH_DATA       2420 eval.c         	if (RTEST(rb_reg_nth_defined(0, MATCH_DATA))) {
MATCH_DATA       3668 eval.c         	result = rb_reg_nth_match(node->nd_nth, MATCH_DATA);
MATCH_DATA       3674 eval.c         	    result = rb_reg_last_match(MATCH_DATA);
MATCH_DATA       3677 eval.c         	    result = rb_reg_match_pre(MATCH_DATA);
MATCH_DATA       3680 eval.c         	    result = rb_reg_match_post(MATCH_DATA);
MATCH_DATA       3683 eval.c         	    result = rb_reg_match_last(MATCH_DATA);


MAXCHILDNUM

MAXCHILDNUM       399 win32/win32.c  } ChildRecord[MAXCHILDNUM];
MAXCHILDNUM      2489 win32/win32.c  	HANDLE events[MAXCHILDNUM + 1];


MAXEXP

MAXEXP            420 missing/vsnprintf.c #ifndef MAXEXP
MAXEXP            428 missing/vsnprintf.c #define	BUF		(MAXEXP+MAXFRACT+1)	/* + decimal point */
MAXEXP           1050 missing/vsnprintf.c 	char expbuf[MAXEXP];
MAXEXP           1060 missing/vsnprintf.c 	t = expbuf + MAXEXP;
MAXEXP           1066 missing/vsnprintf.c 		for (; t < expbuf + MAXEXP; *p++ = *t++);


MAXFRACT

MAXFRACT          424 missing/vsnprintf.c #ifndef MAXFRACT
MAXFRACT          428 missing/vsnprintf.c #define	BUF		(MAXEXP+MAXFRACT+1)	/* + decimal point */


MAXPATHLEN

MAXPATHLEN         64 dln.c          #ifndef MAXPATHLEN
MAXPATHLEN        383 dln.c          	char buf[MAXPATHLEN];
MAXPATHLEN        412 dln.c          	    if (p-buf >= MAXPATHLEN) {
MAXPATHLEN       1297 dln.c              char winfile[MAXPATHLEN];
MAXPATHLEN       1301 dln.c              if (strlen(file) >= MAXPATHLEN) rb_loaderror("filename too long");
MAXPATHLEN       1512 dln.c          	char real_name[MAXPATHLEN];
MAXPATHLEN       1549 dln.c                char fullpath[MAXPATHLEN];
MAXPATHLEN       1714 dln.c          static char fbuf[MAXPATHLEN];
MAXPATHLEN         38 file.c         #ifndef MAXPATHLEN
MAXPATHLEN       2659 file.c             return file_expand_path(fname, dname, rb_str_new(0, MAXPATHLEN + 2));
MAXPATHLEN       1042 win32/win32.c      char buffer[MAXPATHLEN], *buf = buffer;
MAXPATHLEN       1046 win32/win32.c      if (patt->len >= MAXPATHLEN)


MAXRECOVER

MAXRECOVER       3560 ext/nkf/nkf-utf8/nkf.c     int r[MAXRECOVER];    /* recovery buffer, max mime pattern lenght */
MAXRECOVER       3638 ext/nkf/nkf-utf8/nkf.c     for(i=2;i<MAXRECOVER;i++) {                   /* start at =? */
MAXRECOVER       3653 ext/nkf/nkf-utf8/nkf.c             if (!(++i<MAXRECOVER) || c1==EOF) break;
MAXRECOVER       3662 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_NUM_FAILURE_ITEMS

MAX_NUM_FAILURE_ITEMS 3610 regex.c          stacka = RE_TALLOC(MAX_NUM_FAILURE_ITEMS * NFAILURES, unsigned char*);
MAX_NUM_FAILURE_ITEMS 3613 regex.c          stacke = &stackb[MAX_NUM_FAILURE_ITEMS * NFAILURES];


MAY_TRANSLATE

MAY_TRANSLATE    2453 regex.c        		   (unsigned char*)(MAY_TRANSLATE()?translate:0));
MAY_TRANSLATE    3224 regex.c        			MAY_TRANSLATE()?translate:0);
MAY_TRANSLATE    3230 regex.c        		      MAY_TRANSLATE()?translate:0);
MAY_TRANSLATE    3271 regex.c        	    if (fastmap[MAY_TRANSLATE() ? translate[c] : c])
MAY_TRANSLATE    3284 regex.c        	if (MAY_TRANSLATE() ? !fastmap[translate[c]] : !fastmap[c])


MBC2WC

MBC2WC            472 regex.c            MBC2WC(c, p);							\
MBC2WC           3870 regex.c        	      MBC2WC(c, d);
MBC2WC           4008 regex.c        	      MBC2WC(c, pp);


MBCTYPE_ASCII

MBCTYPE_ASCII     211 re.c           	re_mbcinit(MBCTYPE_ASCII);
MBCTYPE_ASCII     231 re.c           	re_mbcinit(MBCTYPE_ASCII);
MBCTYPE_ASCII    1850 re.c           	return MBCTYPE_ASCII;
MBCTYPE_ASCII    2131 re.c           	re_mbcinit(MBCTYPE_ASCII);
MBCTYPE_ASCII    2236 re.c               re_mbcinit(MBCTYPE_ASCII);
MBCTYPE_ASCII     182 regex.c        static int current_mbctype = MBCTYPE_ASCII;
MBCTYPE_ASCII    2953 regex.c        	case MBCTYPE_ASCII:
MBCTYPE_ASCII    2975 regex.c        	case MBCTYPE_ASCII:
MBCTYPE_ASCII    4546 regex.c          case MBCTYPE_ASCII:
MBCTYPE_ASCII    4548 regex.c            current_mbctype = MBCTYPE_ASCII;


MBCTYPE_EUC

MBCTYPE_EUC       214 re.c           	re_mbcinit(MBCTYPE_EUC);
MBCTYPE_EUC       234 re.c           	re_mbcinit(MBCTYPE_EUC);
MBCTYPE_EUC      1844 re.c           	return MBCTYPE_EUC;
MBCTYPE_EUC      2112 re.c           	re_mbcinit(MBCTYPE_EUC);
MBCTYPE_EUC      2228 re.c               re_mbcinit(MBCTYPE_EUC);
MBCTYPE_EUC      2959 regex.c        	case MBCTYPE_EUC:
MBCTYPE_EUC      2981 regex.c        	case MBCTYPE_EUC:
MBCTYPE_EUC      4550 regex.c          case MBCTYPE_EUC:
MBCTYPE_EUC      4552 regex.c            current_mbctype = MBCTYPE_EUC;


MBCTYPE_SJIS

MBCTYPE_SJIS      217 re.c           	re_mbcinit(MBCTYPE_SJIS);
MBCTYPE_SJIS      237 re.c           	re_mbcinit(MBCTYPE_SJIS);
MBCTYPE_SJIS     1846 re.c           	return MBCTYPE_SJIS;
MBCTYPE_SJIS     2117 re.c           	re_mbcinit(MBCTYPE_SJIS);
MBCTYPE_SJIS     2231 re.c               re_mbcinit(MBCTYPE_SJIS);
MBCTYPE_SJIS     2437 regex.c          if (current_mbctype == MBCTYPE_SJIS) bufp->options |= RE_OPTIMIZE_NO_BM;
MBCTYPE_SJIS     2960 regex.c        	case MBCTYPE_SJIS:
MBCTYPE_SJIS     2982 regex.c        	case MBCTYPE_SJIS:
MBCTYPE_SJIS     3473 regex.c        #define PREV_IS_A_LETTER(d) ((current_mbctype == MBCTYPE_SJIS)?		\
MBCTYPE_SJIS     4554 regex.c          case MBCTYPE_SJIS:
MBCTYPE_SJIS     4556 regex.c            current_mbctype = MBCTYPE_SJIS;


MBCTYPE_UTF8

MBCTYPE_UTF8      220 re.c           	re_mbcinit(MBCTYPE_UTF8);
MBCTYPE_UTF8      240 re.c           	re_mbcinit(MBCTYPE_UTF8);
MBCTYPE_UTF8     1848 re.c           	return MBCTYPE_UTF8;
MBCTYPE_UTF8     2122 re.c           	re_mbcinit(MBCTYPE_UTF8);
MBCTYPE_UTF8     2234 re.c               re_mbcinit(MBCTYPE_UTF8);
MBCTYPE_UTF8      456 regex.c            if (current_mbctype == MBCTYPE_UTF8) {				\
MBCTYPE_UTF8      476 regex.c         ((current_mbctype != MBCTYPE_UTF8) ? ((c<0x100) ? (c) : (((c)>>8)&0xff)) : utf8_firstbyte(c))
MBCTYPE_UTF8      512 regex.c          if (current_mbctype == MBCTYPE_UTF8) {
MBCTYPE_UTF8     2961 regex.c        	case MBCTYPE_UTF8:
MBCTYPE_UTF8     2983 regex.c        	case MBCTYPE_UTF8:
MBCTYPE_UTF8     4558 regex.c          case MBCTYPE_UTF8:
MBCTYPE_UTF8     4560 regex.c            current_mbctype = MBCTYPE_UTF8;


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            991 bignum.c           if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,RBIGNUM(y)->len) != 0) return Qfalse;
MEMCMP           1013 bignum.c           if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,RBIGNUM(y)->len) != 0) return Qfalse;
MEMCMP            886 ext/stringio/stringio.c 		    if (MEMCMP(p, RSTRING(str)->ptr, char, n) == 0) {
MEMCMP            217 ext/win32ole/win32ole.c     if (MEMCMP(riid, &IID_IUnknown, GUID, 1) == 0
MEMCMP            218 ext/win32ole/win32ole.c         || MEMCMP(riid, &IID_IDispatch, GUID, 1) == 0)


MEMCPY

MEMCPY             69 array.c        	MEMCPY(ptr, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
MEMCPY            189 array.c        	MEMCPY(RARRAY(ary)->ptr, elts, VALUE, n);
MEMCPY            339 array.c        	MEMCPY(RARRAY(ary)->ptr, argv, VALUE, argc);
MEMCPY            559 array.c            MEMCPY(RARRAY(ary)->ptr, argv, VALUE, argc);
MEMCPY            975 array.c        	    MEMCPY(RARRAY(ary)->ptr + beg, RARRAY(rpl)->ptr, VALUE, rlen);
MEMCPY           1231 array.c            MEMCPY(RARRAY(dup)->ptr, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
MEMCPY           2308 array.c            MEMCPY(RARRAY(z)->ptr, RARRAY(x)->ptr, VALUE, RARRAY(x)->len);
MEMCPY           2309 array.c            MEMCPY(RARRAY(z)->ptr + RARRAY(x)->len, RARRAY(y)->ptr, VALUE, RARRAY(y)->len);
MEMCPY           2377 array.c        	MEMCPY(RARRAY(ary2)->ptr+i, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
MEMCPY             64 bignum.c           MEMCPY(BDIGITS(z), BDIGITS(x), BDIGIT, RBIGNUM(x)->len);
MEMCPY            531 bignum.c       	    MEMCPY(p, s, char, len);
MEMCPY           2148 eval.c         	MEMCPY(copy->nd_tbl, node->nd_tbl, ID, node->nd_tbl[0]+1);
MEMCPY           2195 eval.c         	MEMCPY(argv, RARRAY(args)->ptr, VALUE, argc);\
MEMCPY           5531 eval.c             MEMCPY(nargv+1, argv, VALUE, argc);
MEMCPY           5795 eval.c         			    MEMCPY(local_vars+2, argv, VALUE, i);
MEMCPY           5934 eval.c             MEMCPY(argv, RARRAY(args)->ptr, VALUE, argc);
MEMCPY           7973 eval.c         	MEMCPY(vars, scope->local_vars, VALUE, tbl[0]);
MEMCPY           8039 eval.c         	    MEMCPY(argv, frame->argv, VALUE, frame->argc);
MEMCPY           8062 eval.c         	MEMCPY(tmp, block->prev, struct BLOCK, 1);
MEMCPY           8081 eval.c             MEMCPY(dup, orig, struct BLOCK, 1);
MEMCPY           8376 eval.c             MEMCPY(_block.frame.argv, RARRAY(tmp)->ptr, VALUE, RARRAY(tmp)->len);
MEMCPY           8626 eval.c             MEMCPY(data, orig, struct BLOCK, 1);
MEMCPY           10053 eval.c             MEMCPY(th->stk_ptr, th->stk_pos, VALUE, th->stk_len);
MEMCPY           10068 eval.c         	MEMCPY(th->bstr_ptr, (VALUE*)__libc_ia64_register_backing_store_base, VALUE, th->bstr_len);
MEMCPY           10211 eval.c             MEMCPY(tmp->stk_pos, tmp->stk_ptr, VALUE, tmp->stk_len);
MEMCPY           10213 eval.c             MEMCPY((VALUE*)__libc_ia64_register_backing_store_base, tmp->bstr_ptr, VALUE, tmp->bstr_len);
MEMCPY            158 ext/socket/socket.c 	MEMCPY(&tmp_hints, hints, struct addrinfo, 1);
MEMCPY           1147 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           1750 ext/syck/rubyext.c     MEMCPY( copy_n, orig_n, SyckNode, 1 );
MEMCPY           5499 ext/tk/tcltklib.c         MEMCPY(temp, argv, VALUE, argc);
MEMCPY            529 gc.c           	MEMCPY(ptr, f, char, len);
MEMCPY            588 gc.c               MEMCPY(tmp_arry, mark_stack, VALUE, MARK_STACK_MAX);
MEMCPY           1123 marshal.c      	    MEMCPY(digits, RSTRING(data)->ptr, char, len * 2);
MEMCPY           2332 object.c       	    MEMCPY(p, s, char, len);
MEMCPY           6531 parse.c        	MEMCPY(buf, p, char, len);
MEMCPY           9679 parse.c        	MEMCPY(lvtbl->tbl, ruby_scope->local_tbl, ID, lvtbl->cnt+1);
MEMCPY           9704 parse.c        		    MEMCPY(vars, ruby_scope->local_vars, VALUE, i);
MEMCPY           2533 parse.y        	MEMCPY(buf, p, char, len);
MEMCPY           5681 parse.y        	MEMCPY(lvtbl->tbl, ruby_scope->local_tbl, ID, lvtbl->cnt+1);
MEMCPY           5706 parse.y        		    MEMCPY(vars, ruby_scope->local_vars, VALUE, i);
MEMCPY            911 ruby.c         			MEMCPY(argv+2, origargv+1, char*, origargc);
MEMCPY            461 string.c       	MEMCPY(argv+1, RARRAY(arg)->ptr, VALUE, RARRAY(arg)->len);
MEMCPY            348 struct.c           MEMCPY(RSTRUCT(self)->ptr, RARRAY(values)->ptr, VALUE, RARRAY(values)->len);
MEMCPY            562 struct.c           MEMCPY(RSTRUCT(copy)->ptr, RSTRUCT(s)->ptr, VALUE, RSTRUCT(copy)->len);
MEMCPY           1048 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           524 array.c            MEMMOVE(RARRAY(ary)->ptr + 1, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
MEMMOVE           558 array.c            MEMMOVE(RARRAY(ary)->ptr + argc, RARRAY(ary)->ptr, VALUE, len);
MEMMOVE           993 array.c        	    MEMMOVE(RARRAY(ary)->ptr + beg + rlen, RARRAY(ary)->ptr + beg + len,
MEMMOVE           998 array.c        	    MEMMOVE(RARRAY(ary)->ptr + beg, RARRAY(rpl)->ptr, VALUE, rlen);
MEMMOVE           815 ext/sdbm/_sdbm.c #ifdef MEMMOVE


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           875 ext/dl/ptr.c         if (n > len) MEMZERO((char*)dst + len, char, n - len);
MEMZERO           662 ext/socket/socket.c     MEMZERO(&sin, struct sockaddr_in, 1);
MEMZERO           772 ext/socket/socket.c     MEMZERO(&hints, struct addrinfo, 1);
MEMZERO          1402 ext/socket/socket.c     MEMZERO(&sockaddr, struct sockaddr_un, 1);
MEMZERO          2853 ext/socket/socket.c     MEMZERO(&hints, struct addrinfo, 1);
MEMZERO          2928 ext/socket/socket.c 	MEMZERO(&hints, struct addrinfo, 1);
MEMZERO          3069 ext/socket/socket.c     MEMZERO(&sockaddr, struct sockaddr_un, 1);
MEMZERO           737 ext/stringio/stringio.c 	    MEMZERO(RSTRING(ptr->string)->ptr + olen, char, pos - olen);
MEMZERO          1235 ext/stringio/stringio.c 	MEMZERO(RSTRING(string)->ptr + plen, char, l - plen);
MEMZERO           189 ext/strscan/strscan.c     MEMZERO(p, struct strscanner, 1);
MEMZERO           191 ext/strscan/strscan.c     MEMZERO(&(p->regs), struct re_registers, 1);
MEMZERO           628 ext/syck/rubyext.c         MEMZERO((void *)obj, RVALUE, 1);
MEMZERO           385 gc.c               MEMZERO((void*)obj, RVALUE, 1);
MEMZERO          3487 io.c           	MEMZERO(fptr, OpenFile, 1);
MEMZERO          1125 marshal.c      	    MEMZERO((char *)digits + len * 2, char,
MEMZERO           489 re.c           	    MEMZERO((char *)rp, Regexp, 1);
MEMZERO           634 re.c               MEMZERO((char *)rp, Regexp, 1);
MEMZERO           678 re.c               MEMZERO(match->regs, struct re_registers, 1);
MEMZERO          1664 string.c       	MEMZERO(RSTRING(str)->ptr + RSTRING(str)->len, char, -len);
MEMZERO           306 time.c             MEMZERO(tm, struct tm, 1);
MEMZERO           324 util.c             MEMZERO(p, struct PathList, 1);
MEMZERO          1021 win32/win32.c      MEMZERO(tmpcurr, NtCmdLineElement, 1);
MEMZERO          1286 win32/win32.c  	MEMZERO(curr, NtCmdLineElement, 1);


MIMEOUT_BUF_LENGTH

MIMEOUT_BUF_LENGTH 4208 ext/nkf/nkf-utf8/nkf.c char mimeout_buf[MIMEOUT_BUF_LENGTH+1];
MIMEOUT_BUF_LENGTH 4477 ext/nkf/nkf-utf8/nkf.c                 if (mimeout_buf_count>MIMEOUT_BUF_LENGTH) {
MIMEOUT_BUF_LENGTH 4530 ext/nkf/nkf-utf8/nkf.c                 if (mimeout_buf_count>MIMEOUT_BUF_LENGTH) {
MIMEOUT_BUF_LENGTH 4542 ext/nkf/nkf-utf8/nkf.c                 if (mimeout_buf_count>MIMEOUT_BUF_LENGTH) {


MIME_BUF_MASK

MIME_BUF_MASK     365 ext/nkf/nkf-utf8/nkf.c #define Fifo(n)         mime_buf[(n)&MIME_BUF_MASK]
MIME_BUF_MASK    4157 ext/nkf/nkf-utf8/nkf.c         if (((mime_input-mime_top)&MIME_BUF_MASK)==0) {


MIME_BUF_SIZE

MIME_BUF_SIZE     364 ext/nkf/nkf-utf8/nkf.c #define MIME_BUF_MASK   (MIME_BUF_SIZE-1)
MIME_BUF_SIZE     366 ext/nkf/nkf-utf8/nkf.c static unsigned char           mime_buf[MIME_BUF_SIZE];


MODE_BINARY

MODE_BINARY      2621 io.c           	    return MODE_BINARY("a+", "ab+");
MODE_BINARY      2623 io.c           	return MODE_BINARY("a", "ab");
MODE_BINARY      2627 io.c           	return MODE_BINARY("r", "rb");
MODE_BINARY      2629 io.c           	return MODE_BINARY("w", "wb");
MODE_BINARY      2631 io.c           	return MODE_BINARY("r+", "rb+");


MODE_BINMODE

MODE_BINMODE     2478 io.c           	    return MODE_BINMODE("a+", "ab+");
MODE_BINMODE     2480 io.c           	return MODE_BINMODE("a", "ab");
MODE_BINMODE     2484 io.c           	return MODE_BINMODE("r", "rb");
MODE_BINMODE     2486 io.c           	return MODE_BINMODE("w", "wb");
MODE_BINMODE     2489 io.c           	    return MODE_BINMODE("w+", "wb+");
MODE_BINMODE     2491 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 2767 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              89 defines.h      #if defined(MSDOS) || defined(_WIN32) || defined(__human68k__) || defined(__EMX__)
MSDOS            1662 dln.c          #if defined(MSDOS) || defined(_WIN32) || defined(__human68k__) || defined(__MACOS__)
MSDOS            1830 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             115 ext/nkf/nkf-utf8/nkf.c #if defined(MSDOS) || defined(__OS2__)
MSDOS             120 ext/nkf/nkf-utf8/nkf.c #ifdef MSDOS
MSDOS             149 ext/nkf/nkf-utf8/nkf.c #ifndef MSDOS /* UNIX, OS/2 */
MSDOS             386 ext/nkf/nkf-utf8/nkf.c #if defined(MSDOS) || defined(__OS2__)
MSDOS             770 ext/nkf/nkf-utf8/nkf.c #ifdef MSDOS
MSDOS             838 ext/nkf/nkf-utf8/nkf.c #if defined(MSDOS) && !defined(__MINGW32__) && !defined(__WIN32__)
MSDOS             858 ext/nkf/nkf-utf8/nkf.c #if defined(MSDOS) && !defined(__MINGW32__) && !defined(__WIN32__)
MSDOS             870 ext/nkf/nkf-utf8/nkf.c #ifdef MSDOS
MSDOS            1136 ext/nkf/nkf-utf8/nkf.c #if defined(MSDOS) || defined(__OS2__)
MSDOS            4598 ext/nkf/nkf-utf8/nkf.c #if defined(MSDOS) || defined(__OS2__)
MSDOS            4745 ext/nkf/nkf-utf8/nkf.c #ifdef MSDOS
MSDOS            4779 ext/nkf/nkf-utf8/nkf.c #if defined(MSDOS) && !defined(__WIN32__) && !defined(__WIN16__)
MSDOS            4782 ext/nkf/nkf-utf8/nkf.c #if defined(MSDOS) && defined(__WIN16__)
MSDOS            4785 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              80 gc.c           #if defined(MSDOS) || defined(__human68k__)
MSDOS            1858 hash.c         #ifndef MSDOS
MSDOS              27 io.c           #if defined(MSDOS) || defined(__BOW__) || defined(__CYGWIN__) || defined(_WIN32) || defined(__human68k__) || defined(__EMX__) || defined(__BEOS__)
MSDOS              31 io.c           #if defined(MSDOS) || defined(__CYGWIN__) || defined(_WIN32)
MSDOS            4682 io.c           #if !defined(MSDOS) && !defined(__human68k__)
MSDOS            4715 io.c           #if !defined(MSDOS) && !defined(__human68k__)
MSDOS             118 missing/strftime.c #if !defined(OS2) && !defined(MSDOS) && defined(HAVE_TZNAME)
MSDOS             946 process.c      #if (defined(MSDOS) && !defined(DJGPP)) || defined(__human68k__) || defined(__EMX__) || defined(OS2)
MSDOS             954 process.c      #if (defined(MSDOS) && !defined(DJGPP))
MSDOS            1032 process.c      #if defined(MSDOS)
MSDOS            1149 ruby.c         #ifdef MSDOS
MSDOS              78 util.c         #if defined(MSDOS) || defined(__CYGWIN32__) || defined(_WIN32)
MSDOS              42 util.h         #if defined(MSDOS) || defined(__CYGWIN32__) || defined(_WIN32)


MSVCRT_THREADS

MSVCRT_THREADS   1541 win32/win32.c  #ifdef MSVCRT_THREADS
MSVCRT_THREADS   1556 win32/win32.c  #ifdef MSVCRT_THREADS


MTHREAD_ONLY

MTHREAD_ONLY     1615 win32/win32.c  	MTHREAD_ONLY(EnterCriticalSection(&(_pioinfo(fh)->lock)));
MTHREAD_ONLY     1622 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      212 ext/socket/socket.c     MakeOpenFile(sock, fp);
MakeOpenFile     2733 io.c               MakeOpenFile(io, fptr);
MakeOpenFile     2759 io.c               MakeOpenFile(io, fptr);
MakeOpenFile     2895 io.c           	MakeOpenFile(port, fptr);
MakeOpenFile     2927 io.c           	MakeOpenFile(port, fptr);
MakeOpenFile     3006 io.c           	    MakeOpenFile(port, fptr);
MakeOpenFile     3539 io.c               MakeOpenFile(dest, fptr);
MakeOpenFile     4006 io.c               MakeOpenFile(io, fp);
MakeOpenFile     4079 io.c               MakeOpenFile(io, fp);


Max

Max              1990 ext/bigdecimal/bigdecimal.c     nalloc = Max(nalloc, mx);
Max              2396 ext/bigdecimal/bigdecimal.c     right_word = Max((a->Prec),left_word);


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);


MoveFile

MoveFile         2759 win32/win32.c  	if (!MoveFile(oldpath, newpath))
MoveFile         2773 win32/win32.c  			else if (MoveFile(oldpath, newpath)) {


MoveFileEx

MoveFileEx       2767 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                3053 parse.c             ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE))	\
N                3057 parse.c             ((N) * (sizeof (short) + sizeof (YYSTYPE))				\
N                3156 parse.c           Current.last_line   = Rhs[N].last_line;	\
N                3157 parse.c           Current.last_column = Rhs[N].last_column;
N                  72 random.c       static unsigned long state[N]; /* the array for the state vector  */
N                  84 random.c           for (j=1; j<N; j++) {
N                 105 random.c           k = (N>key_length ? N : key_length);
N                 111 random.c               if (i>=N) { state[0] = state[N-1]; i=1; }
N                 114 random.c           for (k=N-1; k; k--) {
N                 119 random.c               if (i>=N) { state[0] = state[N-1]; i=1; }
N                 136 random.c           left = N;
N                 139 random.c           for (j=N-M+1; --j; p++)
N                 143 random.c               *p = p[M-N] ^ TWIST(p[0], p[1]);
N                 145 random.c           *p = p[M-N] ^ TWIST(p[0], state[0]);
N                  19 sprintf.c      #define BIT_DIGITS(N)   (((N)*146)/485 + 1)  /* log2(10) =~ 146/485 */


NAMLEN

NAMLEN            376 dir.c          	return rb_tainted_str_new(dp->d_name, NAMLEN(dp));
NAMLEN            414 dir.c          	rb_yield(rb_tainted_str_new(dp->d_name, NAMLEN(dp)));
NAMLEN           1014 dir.c          		    REALLOC_N(buf, char, strlen(base)+NAMLEN(dp)+strlen(m)+6);
NAMLEN           1032 dir.c          		    REALLOC_N(buf, char, strlen(base)+NAMLEN(dp)+2);


NATINT_LEN

NATINT_LEN        688 pack.c         		rb_str_buf_cat(res, OFF16(&s), NATINT_LEN(short,2));
NATINT_LEN        699 pack.c         		rb_str_buf_cat(res, OFF32(&i), NATINT_LEN(int,4));
NATINT_LEN        710 pack.c         		rb_str_buf_cat(res, OFF32(&l), NATINT_LEN(long,4));
NATINT_LEN        732 pack.c         		rb_str_buf_cat(res, OFF16(&s), NATINT_LEN(short,2));
NATINT_LEN        743 pack.c         		rb_str_buf_cat(res, OFF32(&l), NATINT_LEN(long,4));
NATINT_LEN        754 pack.c         		rb_str_buf_cat(res, OFF16(&s), NATINT_LEN(short,2));
NATINT_LEN        765 pack.c         		rb_str_buf_cat(res, OFF32(&l), NATINT_LEN(long,4));
NATINT_LEN       1141 pack.c             int t__len = NATINT_LEN(type,(sz));		\
NATINT_LEN       1511 pack.c         		memcpy(OFF16(&tmp), s, NATINT_LEN(short,2));
NATINT_LEN       1513 pack.c         		s += NATINT_LEN(short,2);
NATINT_LEN       1523 pack.c         		memcpy(OFF16(&tmp), s, NATINT_LEN(unsigned short,2));
NATINT_LEN       1524 pack.c         		s += NATINT_LEN(unsigned short,2);
NATINT_LEN       1556 pack.c         		memcpy(OFF32(&tmp), s, NATINT_LEN(long,4));
NATINT_LEN       1558 pack.c         		s += NATINT_LEN(long,4);
NATINT_LEN       1567 pack.c         		memcpy(OFF32(&tmp), s, NATINT_LEN(unsigned long,4));
NATINT_LEN       1568 pack.c         		s += NATINT_LEN(unsigned long,4);
NATINT_LEN       1596 pack.c         		memcpy(OFF16B(&tmp), s, NATINT_LEN(unsigned short,2));
NATINT_LEN       1597 pack.c         		s += NATINT_LEN(unsigned short,2);
NATINT_LEN       1607 pack.c         		memcpy(OFF32B(&tmp), s, NATINT_LEN(unsigned long,4));
NATINT_LEN       1608 pack.c         		s += NATINT_LEN(unsigned long,4);
NATINT_LEN       1618 pack.c         		memcpy(OFF16(&tmp), s, NATINT_LEN(unsigned short,2));
NATINT_LEN       1619 pack.c         		s += NATINT_LEN(unsigned short,2);
NATINT_LEN       1629 pack.c         		memcpy(OFF32(&tmp), s, NATINT_LEN(long,4));
NATINT_LEN       1630 pack.c         		s += NATINT_LEN(long,4);


NATINT_PACK

NATINT_PACK        24 pack.c         #ifdef NATINT_PACK
NATINT_PACK       218 pack.c         # ifdef NATINT_PACK
NATINT_PACK       244 pack.c         # ifdef NATINT_PACK
NATINT_PACK       273 pack.c         # ifdef NATINT_PACK
NATINT_PACK       451 pack.c         #ifdef NATINT_PACK
NATINT_PACK       471 pack.c         #ifdef NATINT_PACK
NATINT_PACK       486 pack.c         #ifdef NATINT_PACK
NATINT_PACK      1139 pack.c         #ifdef NATINT_PACK
NATINT_PACK      1312 pack.c         #ifdef NATINT_PACK
NATINT_PACK      1326 pack.c         #ifdef NATINT_PACK
NATINT_PACK      1342 pack.c         #ifdef NATINT_PACK


NATIVETHREAD_CURRENT

NATIVETHREAD_CURRENT 1291 eval.c             return NATIVETHREAD_EQUAL(ruby_thid, NATIVETHREAD_CURRENT());
NATIVETHREAD_CURRENT 1307 eval.c             ruby_thid = NATIVETHREAD_CURRENT();


NDIV

NDIV              127 time.c         	tmp = sec + NDIV(usec,1000000); /* negative div */
NDIV              410 time.c         #define DIV(n,d) ((n)<0 ? NDIV((n),(d)) : (n)/(d))


NEGFIXABLE

NEGFIXABLE        118 bignum.c       		else if (NEGFIXABLE(-(long)num)) return LONG2FIX(-(long)num);
NEGFIXABLE        162 ruby.h         #define FIXABLE(f) (POSFIXABLE(f) && NEGFIXABLE(f))


NEWHEAP

NEWHEAP          10248 parse.c            NODE *n = NEWHEAP();
NEWHEAP          10259 parse.c            NODE *n = NEWHEAP();
NEWHEAP          10282 parse.c            n = NEWHEAP();
NEWHEAP          6250 parse.y            NODE *n = NEWHEAP();
NEWHEAP          6261 parse.y            NODE *n = NEWHEAP();
NEWHEAP          6284 parse.y            n = NEWHEAP();


NEWLINE

NEWLINE           195 ext/syck/token.c     NEWLINE(indent); \
NEWLINE           200 ext/syck/token.c             NEWLINE(indent); \


NEWOBJ

NEWOBJ            103 array.c            NEWOBJ(ary, struct RArray);
NEWOBJ            464 array.c        	NEWOBJ(shared, struct RArray);
NEWOBJ             47 bignum.c           NEWOBJ(big, struct RBignum);
NEWOBJ             25 class.c            NEWOBJ(klass, struct RClass);
NEWOBJ            113 class.c        	NEWOBJ(clone, struct RClass);
NEWOBJ            275 class.c            NEWOBJ(mdl, struct RClass);
NEWOBJ            346 class.c            NEWOBJ(klass, struct RClass);
NEWOBJ            807 eval.c             NEWOBJ(vars, struct RVarmap);
NEWOBJ           1025 eval.c             NEWOBJ(_scope, struct SCOPE);	\
NEWOBJ            400 gc.c               NEWOBJ(data, struct RData);
NEWOBJ            231 hash.c             NEWOBJ(hash, struct RHash);
NEWOBJ            320 io.c               NEWOBJ(io, struct RFile);
NEWOBJ           1112 marshal.c      	    NEWOBJ(big, struct RBignum);
NEWOBJ            472 numeric.c          NEWOBJ(flt, struct RFloat);
NEWOBJ           1581 object.c           NEWOBJ(obj, struct RObject);
NEWOBJ            266 random.c           NEWOBJ(big, struct RBignum);
NEWOBJ            672 re.c               NEWOBJ(match, struct RMatch);
NEWOBJ           1381 re.c               NEWOBJ(re, struct RRegexp);
NEWOBJ             67 string.c           NEWOBJ(str, struct RString);
NEWOBJ            362 struct.c           NEWOBJ(st, struct RStruct);


NEW_ALIAS

NEW_ALIAS        3745 parse.c        		        yyval.node = NEW_ALIAS(yyvsp[-2].id, yyvsp[0].id);
NEW_ALIAS         414 parse.y        		        $$ = NEW_ALIAS($2, $4);


NEW_ARGS

NEW_ARGS         6013 parse.c        			yyval.node = block_append(NEW_ARGS(yyvsp[-5].num, yyvsp[-3].node, yyvsp[-1].id), yyvsp[0].node);
NEW_ARGS         6019 parse.c        			yyval.node = block_append(NEW_ARGS(yyvsp[-3].num, yyvsp[-1].node, -1), yyvsp[0].node);
NEW_ARGS         6025 parse.c        			yyval.node = block_append(NEW_ARGS(yyvsp[-3].num, 0, yyvsp[-1].id), yyvsp[0].node);
NEW_ARGS         6031 parse.c        			yyval.node = block_append(NEW_ARGS(yyvsp[-1].num, 0, -1), yyvsp[0].node);
NEW_ARGS         6037 parse.c        			yyval.node = block_append(NEW_ARGS(0, yyvsp[-3].node, yyvsp[-1].id), yyvsp[0].node);
NEW_ARGS         6043 parse.c        			yyval.node = block_append(NEW_ARGS(0, yyvsp[-1].node, -1), yyvsp[0].node);
NEW_ARGS         6049 parse.c        			yyval.node = block_append(NEW_ARGS(0, 0, yyvsp[-1].id), yyvsp[0].node);
NEW_ARGS         6055 parse.c        			yyval.node = block_append(NEW_ARGS(0, 0, -1), yyvsp[0].node);
NEW_ARGS         6061 parse.c        			yyval.node = NEW_ARGS(0, 0, -1);
NEW_ARGS         2241 parse.y        			$$ = block_append(NEW_ARGS($1, $3, $5), $6);
NEW_ARGS         2245 parse.y        			$$ = block_append(NEW_ARGS($1, $3, -1), $4);
NEW_ARGS         2249 parse.y        			$$ = block_append(NEW_ARGS($1, 0, $3), $4);
NEW_ARGS         2253 parse.y        			$$ = block_append(NEW_ARGS($1, 0, -1), $2);
NEW_ARGS         2257 parse.y        			$$ = block_append(NEW_ARGS(0, $1, $3), $4);
NEW_ARGS         2261 parse.y        			$$ = block_append(NEW_ARGS(0, $1, -1), $2);
NEW_ARGS         2265 parse.y        			$$ = block_append(NEW_ARGS(0, 0, $1), $2);
NEW_ARGS         2269 parse.y        			$$ = block_append(NEW_ARGS(0, 0, -1), $1);
NEW_ARGS         2273 parse.y        			$$ = NEW_ARGS(0, 0, -1);


NEW_ARGSCAT

NEW_ARGSCAT      8971 parse.c            return NEW_ARGSCAT(node1, node2);
NEW_ARGSCAT      4973 parse.y            return NEW_ARGSCAT(node1, node2);


NEW_ARGSPUSH

NEW_ARGSPUSH     8984 parse.c        	return NEW_ARGSPUSH(node1, node2);
NEW_ARGSPUSH     4986 parse.y        	return NEW_ARGSPUSH(node1, node2);


NEW_ARRAY

NEW_ARRAY         264 node.h         #define NEW_LIST(a)  NEW_ARRAY(a)
NEW_ARRAY        3870 parse.c        			yyvsp[-2].node->nd_value = (yyvsp[-2].node->nd_head) ? NEW_TO_ARY(yyvsp[0].node) : NEW_ARRAY(yyvsp[0].node);
NEW_ARRAY        3980 parse.c        			yyvsp[-2].node->nd_value = (yyvsp[-2].node->nd_head) ? NEW_TO_ARY(yyvsp[0].node) : NEW_ARRAY(yyvsp[0].node);
NEW_ARRAY        9803 parse.c        			       NEW_ARRAY(NEW_GVAR(rb_intern("$_")))));
NEW_ARRAY         511 parse.y        			$1->nd_value = ($1->nd_head) ? NEW_TO_ARY($3) : NEW_ARRAY($3);
NEW_ARRAY         605 parse.y        			$1->nd_value = ($1->nd_head) ? NEW_TO_ARY($3) : NEW_ARRAY($3);
NEW_ARRAY        5805 parse.y        			       NEW_ARRAY(NEW_GVAR(rb_intern("$_")))));


NEW_ATTRASGN

NEW_ATTRASGN     8927 parse.c            return NEW_ATTRASGN(recv, tASET, idx);
NEW_ATTRASGN     8948 parse.c            return NEW_ATTRASGN(recv, rb_id_attrset(id), 0);
NEW_ATTRASGN     4929 parse.y            return NEW_ATTRASGN(recv, tASET, idx);
NEW_ATTRASGN     4950 parse.y            return NEW_ATTRASGN(recv, rb_id_attrset(id), 0);


NEW_BACK_REF

NEW_BACK_REF     8304 parse.c        	    yylval.node = NEW_BACK_REF(c);
NEW_BACK_REF     4306 parse.y        	    yylval.node = NEW_BACK_REF(c);


NEW_BEGIN

NEW_BEGIN        5126 parse.c        			    yyval.node = NEW_BEGIN(yyvsp[-1].node);
NEW_BEGIN        1474 parse.y        			    $$ = NEW_BEGIN($3);


NEW_BLOCK

NEW_BLOCK        6118 parse.c        			yyval.node = NEW_BLOCK(yyvsp[0].node);
NEW_BLOCK        8587 parse.c        	h = end = NEW_BLOCK(head);
NEW_BLOCK        8619 parse.c        	tail = NEW_BLOCK(tail);
NEW_BLOCK        2323 parse.y        			$$ = NEW_BLOCK($1);
NEW_BLOCK        4589 parse.y        	h = end = NEW_BLOCK(head);
NEW_BLOCK        4621 parse.y        	tail = NEW_BLOCK(tail);


NEW_BLOCK_ARG

NEW_BLOCK_ARG    6151 parse.c        			yyval.node = NEW_BLOCK_ARG(yyvsp[0].id);
NEW_BLOCK_ARG    2360 parse.y        			$$ = NEW_BLOCK_ARG($2);


NEW_BLOCK_PASS

NEW_BLOCK_PASS   5069 parse.c        			yyval.node = NEW_BLOCK_PASS(yyvsp[0].node);
NEW_BLOCK_PASS   1417 parse.y        			$$ = NEW_BLOCK_PASS($2);


NEW_BREAK

NEW_BREAK        4031 parse.c        			yyval.node = NEW_BREAK(ret_args(yyvsp[0].node));
NEW_BREAK        5443 parse.c        			yyval.node = NEW_BREAK(0);
NEW_BREAK         651 parse.y        			$$ = NEW_BREAK(ret_args($2));
NEW_BREAK        1709 parse.y        			$$ = NEW_BREAK(0);


NEW_CALL

NEW_CALL         5165 parse.c        			    yyval.node = NEW_CALL(yyvsp[-3].node, tAREF, yyvsp[-1].node);
NEW_CALL         8769 parse.c            return NEW_CALL(recv, id, arg1);
NEW_CALL         8807 parse.c            return NEW_CALL(node1, tMATCH, NEW_LIST(node2));
NEW_CALL         9544 parse.c        	a->nd_iter = NEW_CALL(r,m,a->nd_head);
NEW_CALL         9547 parse.c            return NEW_CALL(r,m,a);
NEW_CALL         9813 parse.c        				   NEW_CALL(NEW_GVAR(rb_intern("$_")),
NEW_CALL         9819 parse.c        	    block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")),
NEW_CALL         1499 parse.y        			    $$ = NEW_CALL($1, tAREF, $3);
NEW_CALL         4771 parse.y            return NEW_CALL(recv, id, arg1);
NEW_CALL         4809 parse.y            return NEW_CALL(node1, tMATCH, NEW_LIST(node2));
NEW_CALL         5546 parse.y        	a->nd_iter = NEW_CALL(r,m,a->nd_head);
NEW_CALL         5549 parse.y            return NEW_CALL(r,m,a);
NEW_CALL         5815 parse.y        				   NEW_CALL(NEW_GVAR(rb_intern("$_")),
NEW_CALL         5821 parse.y        	    block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")),


NEW_CASE

NEW_CASE         5303 parse.c        			yyval.node = NEW_CASE(yyvsp[-3].node, yyvsp[-1].node);
NEW_CASE         1602 parse.y        			$$ = NEW_CASE($2, $4);


NEW_CDECL

NEW_CDECL        4249 parse.c        			yyval.node = NEW_CDECL(0, 0, NEW_COLON2(yyvsp[-2].node, yyvsp[0].id));
NEW_CDECL        4257 parse.c        			yyval.node = NEW_CDECL(0, 0, NEW_COLON3(yyvsp[0].id));
NEW_CDECL        4302 parse.c        			yyval.node = NEW_CDECL(0, 0, NEW_COLON2(yyvsp[-2].node, yyvsp[0].id));
NEW_CDECL        4310 parse.c        			yyval.node = NEW_CDECL(0, 0, NEW_COLON3(yyvsp[0].id));
NEW_CDECL        8907 parse.c        	return NEW_CDECL(id, val, 0);
NEW_CDECL         829 parse.y        			$$ = NEW_CDECL(0, 0, NEW_COLON2($1, $3));
NEW_CDECL         835 parse.y        			$$ = NEW_CDECL(0, 0, NEW_COLON3($2));
NEW_CDECL         868 parse.y        			$$ = NEW_CDECL(0, 0, NEW_COLON2($1, $3));
NEW_CDECL         874 parse.y        			$$ = NEW_CDECL(0, 0, NEW_COLON3($2));
NEW_CDECL        4909 parse.y        	return NEW_CDECL(id, val, 0);


NEW_CFUNC

NEW_CFUNC         805 class.c            rb_add_method(klass, name, NEW_CFUNC(func,argc), NOEX_PUBLIC);
NEW_CFUNC         819 class.c            rb_add_method(klass, id, NEW_CFUNC(func, argc), ex);
NEW_CFUNC         829 class.c            rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PROTECTED);
NEW_CFUNC         839 class.c            rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PRIVATE);
NEW_CFUNC         415 eval.c             rb_add_method(CLASS_OF(klass), ID_ALLOCATOR, NEW_CFUNC(func, 0), NOEX_PRIVATE);


NEW_CLASS

NEW_CLASS        5347 parse.c        		        yyval.node = NEW_CLASS(yyvsp[-4].node, yyvsp[-1].node, yyvsp[-3].node);
NEW_CLASS        1631 parse.y        		        $$ = NEW_CLASS($2, $5, $3);


NEW_COLON2

NEW_COLON2       4249 parse.c        			yyval.node = NEW_CDECL(0, 0, NEW_COLON2(yyvsp[-2].node, yyvsp[0].id));
NEW_COLON2       4302 parse.c        			yyval.node = NEW_CDECL(0, 0, NEW_COLON2(yyvsp[-2].node, yyvsp[0].id));
NEW_COLON2       4335 parse.c        			yyval.node = NEW_COLON2(0, yyval.node);
NEW_COLON2       4341 parse.c        			yyval.node = NEW_COLON2(yyvsp[-2].node, yyvsp[0].id);
NEW_COLON2       5150 parse.c        			yyval.node = NEW_COLON2(yyvsp[-2].node, yyvsp[0].id);
NEW_COLON2        829 parse.y        			$$ = NEW_CDECL(0, 0, NEW_COLON2($1, $3));
NEW_COLON2        868 parse.y        			$$ = NEW_CDECL(0, 0, NEW_COLON2($1, $3));
NEW_COLON2        896 parse.y        			$$ = NEW_COLON2(0, $$);
NEW_COLON2        900 parse.y        			$$ = NEW_COLON2($1, $3);
NEW_COLON2       1488 parse.y        			$$ = NEW_COLON2($1, $3);


NEW_COLON3

NEW_COLON3       4257 parse.c        			yyval.node = NEW_CDECL(0, 0, NEW_COLON3(yyvsp[0].id));
NEW_COLON3       4310 parse.c        			yyval.node = NEW_CDECL(0, 0, NEW_COLON3(yyvsp[0].id));
NEW_COLON3       4329 parse.c        			yyval.node = NEW_COLON3(yyvsp[0].id);
NEW_COLON3       5156 parse.c        			yyval.node = NEW_COLON3(yyvsp[0].id);
NEW_COLON3        835 parse.y        			$$ = NEW_CDECL(0, 0, NEW_COLON3($2));
NEW_COLON3        874 parse.y        			$$ = NEW_CDECL(0, 0, NEW_COLON3($2));
NEW_COLON3        892 parse.y        			$$ = NEW_COLON3($2);
NEW_COLON3       1492 parse.y        			$$ = NEW_COLON3($2);


NEW_CONST

NEW_CONST        8850 parse.c        	return NEW_CONST(id);
NEW_CONST        4852 parse.y        	return NEW_CONST(id);


NEW_CVAR

NEW_CVAR         5885 parse.c        {yyval.node = NEW_CVAR(yyvsp[0].id);}
NEW_CVAR         8853 parse.c        	return NEW_CVAR(id);
NEW_CVAR         2122 parse.y        		| tCVAR {$$ = NEW_CVAR($1);}
NEW_CVAR         4855 parse.y        	return NEW_CVAR(id);


NEW_CVASGN

NEW_CVASGN       8910 parse.c        	if (in_def || in_single) return NEW_CVASGN(id, val);
NEW_CVASGN       4912 parse.y        	if (in_def || in_single) return NEW_CVASGN(id, val);


NEW_CVDECL

NEW_CVDECL       8911 parse.c        	return NEW_CVDECL(id, val);
NEW_CVDECL       4913 parse.y        	return NEW_CVDECL(id, val);


NEW_DASGN

NEW_DASGN        8888 parse.c        	    return NEW_DASGN(id, val);
NEW_DASGN        4890 parse.y        	    return NEW_DASGN(id, val);


NEW_DASGN_CURR

NEW_DASGN_CURR   8885 parse.c        	    return NEW_DASGN_CURR(id, val);
NEW_DASGN_CURR   8895 parse.c        	    return NEW_DASGN_CURR(id, val);
NEW_DASGN_CURR   9764 parse.c        	var = NEW_DASGN_CURR(post->id, var);
NEW_DASGN_CURR   4887 parse.y        	    return NEW_DASGN_CURR(id, val);
NEW_DASGN_CURR   4897 parse.y        	    return NEW_DASGN_CURR(id, val);
NEW_DASGN_CURR   5766 parse.y        	var = NEW_DASGN_CURR(post->id, var);


NEW_DEFINED

NEW_DEFINED      4818 parse.c        			yyval.node = NEW_DEFINED(yyvsp[0].node);
NEW_DEFINED      5218 parse.c        			yyval.node = NEW_DEFINED(yyvsp[-1].node);
NEW_DEFINED      1223 parse.y        			$$ = NEW_DEFINED($4);
NEW_DEFINED      1534 parse.y        			$$ = NEW_DEFINED($5);


NEW_DEFN

NEW_DEFN         5412 parse.c        			yyval.node = NEW_DEFN(yyvsp[-4].id, yyvsp[-2].node, yyvsp[-1].node, NOEX_PRIVATE);
NEW_DEFN         1686 parse.y        			$$ = NEW_DEFN($2, $4, $5, NOEX_PRIVATE);


NEW_DEFS

NEW_DEFS         5434 parse.c        			yyval.node = NEW_DEFS(yyvsp[-7].node, yyvsp[-4].id, yyvsp[-2].node, yyvsp[-1].node);
NEW_DEFS         1702 parse.y        			$$ = NEW_DEFS($2, $5, $7, $8);


NEW_DOT2

NEW_DOT2         4612 parse.c        			    yyval.node = NEW_DOT2(yyvsp[-2].node, yyvsp[0].node);
NEW_DOT2         1083 parse.y        			    $$ = NEW_DOT2($1, $3);


NEW_DOT3

NEW_DOT3         4627 parse.c        			    yyval.node = NEW_DOT3(yyvsp[-2].node, yyvsp[0].node);
NEW_DOT3         1096 parse.y        			    $$ = NEW_DOT3($1, $3);


NEW_DSTR

NEW_DSTR         8686 parse.c        	NODE *node = NEW_DSTR(rb_str_new(0, 0));
NEW_DSTR         8730 parse.c        	node = list_append(NEW_DSTR(rb_str_new(0, 0)), node);
NEW_DSTR         4688 parse.y        	NODE *node = NEW_DSTR(rb_str_new(0, 0));
NEW_DSTR         4732 parse.y        	node = list_append(NEW_DSTR(rb_str_new(0, 0)), node);


NEW_DVAR

NEW_DVAR         8833 parse.c        	if (dyna_in_block() && rb_dvar_defined(id)) return NEW_DVAR(id);
NEW_DVAR         4835 parse.y        	if (dyna_in_block() && rb_dvar_defined(id)) return NEW_DVAR(id);


NEW_ENSURE

NEW_ENSURE       3708 parse.c        			    yyval.node = NEW_ENSURE(yyval.node, yyvsp[0].node);
NEW_ENSURE        384 parse.y        			    $$ = NEW_ENSURE($$, $4);


NEW_EVSTR

NEW_EVSTR        5849 parse.c        		        yyval.node = NEW_EVSTR(yyvsp[0].node);
NEW_EVSTR        8751 parse.c            return NEW_EVSTR(head);
NEW_EVSTR        2097 parse.y        		        $$ = NEW_EVSTR($3);
NEW_EVSTR        4753 parse.y            return NEW_EVSTR(head);


NEW_FALSE

NEW_FALSE        8824 parse.c        	return NEW_FALSE();
NEW_FALSE        4826 parse.y        	return NEW_FALSE();


NEW_FCALL

NEW_FCALL        5111 parse.c        			yyval.node = NEW_FCALL(yyvsp[0].id, 0);
NEW_FCALL        5163 parse.c        			    yyval.node = NEW_FCALL(tAREF, yyvsp[-1].node);
NEW_FCALL        5224 parse.c        			yyvsp[0].node->nd_iter = NEW_FCALL(yyvsp[-1].id, 0);
NEW_FCALL        9556 parse.c        	a->nd_iter = NEW_FCALL(m,a->nd_head);
NEW_FCALL        9559 parse.c            return NEW_FCALL(m,a);
NEW_FCALL        9802 parse.c        		     NEW_FCALL(rb_intern("print"),
NEW_FCALL        1462 parse.y        			$$ = NEW_FCALL($1, 0);
NEW_FCALL        1497 parse.y        			    $$ = NEW_FCALL(tAREF, $3);
NEW_FCALL        1538 parse.y        			$2->nd_iter = NEW_FCALL($1, 0);
NEW_FCALL        5558 parse.y        	a->nd_iter = NEW_FCALL(m,a->nd_head);
NEW_FCALL        5561 parse.y            return NEW_FCALL(m,a);
NEW_FCALL        5804 parse.y        		     NEW_FCALL(rb_intern("print"),


NEW_FOR

NEW_FOR          5330 parse.c        			yyval.node = NEW_FOR(yyvsp[-7].node, yyvsp[-4].node, yyvsp[-1].node);
NEW_FOR          1617 parse.y        			$$ = NEW_FOR($2, $5, $8);


NEW_GASGN

NEW_GASGN        8899 parse.c        	return NEW_GASGN(id, val);
NEW_GASGN        9812 parse.c        	    block_append(NEW_GASGN(rb_intern("$F"),
NEW_GASGN        4901 parse.y        	return NEW_GASGN(id, val);
NEW_GASGN        5814 parse.y        	    block_append(NEW_GASGN(rb_intern("$F"),


NEW_GVAR

NEW_GVAR         5643 parse.c        		            yyvsp[-3].node = node_assign(yyvsp[-3].node, NEW_GVAR(rb_intern("$!")));
NEW_GVAR         5877 parse.c        {yyval.node = NEW_GVAR(yyvsp[0].id);}
NEW_GVAR         8844 parse.c        	return NEW_GVAR(id);
NEW_GVAR         9297 parse.c        	return call_op(node,tEQ,1,NEW_GVAR(rb_intern("$.")));
NEW_GVAR         9343 parse.c        	return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_")));
NEW_GVAR         9803 parse.c        			       NEW_ARRAY(NEW_GVAR(rb_intern("$_")))));
NEW_GVAR         9813 parse.c        				   NEW_CALL(NEW_GVAR(rb_intern("$_")),
NEW_GVAR         9819 parse.c        	    block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")),
NEW_GVAR         1895 parse.y        		            $3 = node_assign($3, NEW_GVAR(rb_intern("$!")));
NEW_GVAR         2120 parse.y        string_dvar	: tGVAR {$$ = NEW_GVAR($1);}
NEW_GVAR         4846 parse.y        	return NEW_GVAR(id);
NEW_GVAR         5299 parse.y        	return call_op(node,tEQ,1,NEW_GVAR(rb_intern("$.")));
NEW_GVAR         5345 parse.y        	return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_")));
NEW_GVAR         5805 parse.y        			       NEW_ARRAY(NEW_GVAR(rb_intern("$_")))));
NEW_GVAR         5815 parse.y        				   NEW_CALL(NEW_GVAR(rb_intern("$_")),
NEW_GVAR         5821 parse.y        	    block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")),


NEW_HASH

NEW_HASH         4864 parse.c        			yyval.node = NEW_LIST(NEW_HASH(yyvsp[-1].node));
NEW_HASH         4923 parse.c        			yyval.node = NEW_LIST(NEW_HASH(yyvsp[-1].node));
NEW_HASH         4930 parse.c        			yyval.node = arg_concat(NEW_LIST(NEW_HASH(yyvsp[-4].node)), yyvsp[-1].node);
NEW_HASH         4937 parse.c        			yyval.node = list_append(yyvsp[-3].node, NEW_HASH(yyvsp[-1].node));
NEW_HASH         4945 parse.c        			yyval.node = arg_concat(list_append(yyvsp[-6].node, NEW_HASH(yyvsp[-4].node)), yyvsp[-1].node);
NEW_HASH         4984 parse.c        			yyval.node = NEW_LIST(NEW_HASH(yyvsp[-1].node));
NEW_HASH         4991 parse.c        			yyval.node = arg_concat(NEW_LIST(NEW_HASH(yyvsp[-4].node)), yyvsp[-1].node);
NEW_HASH         4998 parse.c        			yyval.node = list_append(NEW_LIST(yyvsp[-3].node), NEW_HASH(yyvsp[-1].node));
NEW_HASH         5005 parse.c        			yyval.node = list_append(list_concat(NEW_LIST(yyvsp[-5].node),yyvsp[-3].node), NEW_HASH(yyvsp[-1].node));
NEW_HASH         5012 parse.c        			yyval.node = arg_concat(list_append(NEW_LIST(yyvsp[-6].node), NEW_HASH(yyvsp[-4].node)), yyvsp[-1].node);
NEW_HASH         5019 parse.c        			yyval.node = arg_concat(list_append(list_concat(NEW_LIST(yyvsp[-8].node), yyvsp[-6].node), NEW_HASH(yyvsp[-4].node)), yyvsp[-1].node);
NEW_HASH         5183 parse.c        			yyval.node = NEW_HASH(yyvsp[-1].node);
NEW_HASH         1260 parse.y        			$$ = NEW_LIST(NEW_HASH($1));
NEW_HASH         1309 parse.y        			$$ = NEW_LIST(NEW_HASH($1));
NEW_HASH         1314 parse.y        			$$ = arg_concat(NEW_LIST(NEW_HASH($1)), $4);
NEW_HASH         1319 parse.y        			$$ = list_append($1, NEW_HASH($3));
NEW_HASH         1325 parse.y        			$$ = arg_concat(list_append($1, NEW_HASH($3)), $6);
NEW_HASH         1355 parse.y        			$$ = NEW_LIST(NEW_HASH($1));
NEW_HASH         1360 parse.y        			$$ = arg_concat(NEW_LIST(NEW_HASH($1)), $4);
NEW_HASH         1365 parse.y        			$$ = list_append(NEW_LIST($1), NEW_HASH($3));
NEW_HASH         1370 parse.y        			$$ = list_append(list_concat(NEW_LIST($1),$3), NEW_HASH($5));
NEW_HASH         1375 parse.y        			$$ = arg_concat(list_append(NEW_LIST($1), NEW_HASH($3)), $6);
NEW_HASH         1380 parse.y        			$$ = arg_concat(list_append(list_concat(NEW_LIST($1), $3), NEW_HASH($5)), $8);
NEW_HASH         1513 parse.y        			$$ = NEW_HASH($2);


NEW_IASGN

NEW_IASGN        8902 parse.c        	return NEW_IASGN(id, val);
NEW_IASGN        4904 parse.y        	return NEW_IASGN(id, val);


NEW_IF

NEW_IF            246 node.h         #define NEW_UNLESS(c,t,e) NEW_IF(c,e,t)
NEW_IF           3779 parse.c        			yyval.node = NEW_IF(cond(yyvsp[0].node), yyvsp[-2].node, 0);
NEW_IF           4824 parse.c        			yyval.node = NEW_IF(cond(yyvsp[-4].node), yyvsp[-2].node, yyvsp[0].node);
NEW_IF           5243 parse.c        			yyval.node = NEW_IF(cond(yyvsp[-4].node), yyvsp[-2].node, yyvsp[-1].node);
NEW_IF           5474 parse.c        			yyval.node = NEW_IF(cond(yyvsp[-3].node), yyvsp[-1].node, yyvsp[0].node);
NEW_IF            438 parse.y        			$$ = NEW_IF(cond($3), $1, 0);
NEW_IF           1227 parse.y        			$$ = NEW_IF(cond($1), $3, $5);
NEW_IF           1557 parse.y        			$$ = NEW_IF(cond($2), $4, $5);
NEW_IF           1748 parse.y        			$$ = NEW_IF(cond($2), $4, $5);


NEW_ITER

NEW_ITER         3857 parse.c        			yyval.node = NEW_ITER(0, NEW_POSTEXE(), yyvsp[-1].node);
NEW_ITER         4066 parse.c        			yyval.node = NEW_ITER(yyvsp[-3].node, 0, dyna_init(yyvsp[-1].node, yyvsp[-2].vars));
NEW_ITER         5516 parse.c        			yyval.node = NEW_ITER(yyvsp[-3].node, 0, dyna_init(yyvsp[-1].node, yyvsp[-2].vars));
NEW_ITER         5597 parse.c        			yyval.node = NEW_ITER(yyvsp[-3].node, 0, dyna_init(yyvsp[-1].node, yyvsp[-2].vars));
NEW_ITER         5616 parse.c        			yyval.node = NEW_ITER(yyvsp[-3].node, 0, dyna_init(yyvsp[-1].node, yyvsp[-2].vars));
NEW_ITER          502 parse.y        			$$ = NEW_ITER(0, NEW_POSTEXE(), $3);
NEW_ITER          679 parse.y        			$$ = NEW_ITER($3, 0, dyna_init($5, $<vars>4));
NEW_ITER         1788 parse.y        			$$ = NEW_ITER($3, 0, dyna_init($5, $<vars>4));
NEW_ITER         1850 parse.y        			$$ = NEW_ITER($3, 0, dyna_init($5, $<vars>4));
NEW_ITER         1862 parse.y        			$$ = NEW_ITER($3, 0, dyna_init($5, $<vars>4));


NEW_IVAR

NEW_IVAR          688 eval.c         	rb_add_method(klass, id, NEW_IVAR(attriv), noex);
NEW_IVAR         5881 parse.c        {yyval.node = NEW_IVAR(yyvsp[0].id);}
NEW_IVAR         8847 parse.c        	return NEW_IVAR(id);
NEW_IVAR         2121 parse.y        		| tIVAR {$$ = NEW_IVAR($1);}
NEW_IVAR         4849 parse.y        	return NEW_IVAR(id);


NEW_LASGN

NEW_LASGN        8891 parse.c        	    return NEW_LASGN(id, val);
NEW_LASGN        4893 parse.y        	    return NEW_LASGN(id, val);


NEW_LIST

NEW_LIST         3907 parse.c        		        args = NEW_LIST(yyvsp[0].node);
NEW_LIST         3909 parse.c        			    yyvsp[-3].node = NEW_LIST(yyvsp[-3].node);
NEW_LIST         4157 parse.c        			yyval.node = NEW_MASGN(NEW_LIST(yyvsp[-1].node), 0);
NEW_LIST         4205 parse.c        			yyval.node = NEW_LIST(yyvsp[-1].node);
NEW_LIST         4523 parse.c        			args = NEW_LIST(yyvsp[0].node);
NEW_LIST         4525 parse.c        			    yyvsp[-3].node = NEW_LIST(yyvsp[-3].node);
NEW_LIST         4845 parse.c        			yyval.node = NEW_LIST(yyvsp[-1].node);
NEW_LIST         4864 parse.c        			yyval.node = NEW_LIST(NEW_HASH(yyvsp[-1].node));
NEW_LIST         4890 parse.c        			yyval.node = NEW_LIST(yyvsp[-2].node);
NEW_LIST         4904 parse.c        			yyval.node = NEW_LIST(yyvsp[0].node);
NEW_LIST         4923 parse.c        			yyval.node = NEW_LIST(NEW_HASH(yyvsp[-1].node));
NEW_LIST         4930 parse.c        			yyval.node = arg_concat(NEW_LIST(NEW_HASH(yyvsp[-4].node)), yyvsp[-1].node);
NEW_LIST         4958 parse.c        			yyval.node = arg_blk_pass(list_concat(NEW_LIST(yyvsp[-3].node),yyvsp[-1].node), yyvsp[0].node);
NEW_LIST         4970 parse.c        			yyval.node = arg_concat(NEW_LIST(yyvsp[-4].node), yyvsp[-1].node);
NEW_LIST         4977 parse.c                               yyval.node = arg_concat(list_concat(NEW_LIST(yyvsp[-6].node),yyvsp[-4].node), yyvsp[-1].node);
NEW_LIST         4984 parse.c        			yyval.node = NEW_LIST(NEW_HASH(yyvsp[-1].node));
NEW_LIST         4991 parse.c        			yyval.node = arg_concat(NEW_LIST(NEW_HASH(yyvsp[-4].node)), yyvsp[-1].node);
NEW_LIST         4998 parse.c        			yyval.node = list_append(NEW_LIST(yyvsp[-3].node), NEW_HASH(yyvsp[-1].node));
NEW_LIST         5005 parse.c        			yyval.node = list_append(list_concat(NEW_LIST(yyvsp[-5].node),yyvsp[-3].node), NEW_HASH(yyvsp[-1].node));
NEW_LIST         5012 parse.c        			yyval.node = arg_concat(list_append(NEW_LIST(yyvsp[-6].node), NEW_HASH(yyvsp[-4].node)), yyvsp[-1].node);
NEW_LIST         5019 parse.c        			yyval.node = arg_concat(list_append(list_concat(NEW_LIST(yyvsp[-8].node), yyvsp[-6].node), NEW_HASH(yyvsp[-4].node)), yyvsp[-1].node);
NEW_LIST         5081 parse.c        			yyval.node = NEW_LIST(yyvsp[0].node);
NEW_LIST         5636 parse.c        			yyval.node = NEW_LIST(NEW_WHEN(yyvsp[0].node, 0, 0));
NEW_LIST         5653 parse.c        			yyval.node = NEW_LIST(yyvsp[0].node);
NEW_LIST         5719 parse.c        				node = NEW_NODE(NODE_DXSTR, rb_str_new(0, 0), 1, NEW_LIST(node));
NEW_LIST         5745 parse.c        			    node = NEW_NODE(NODE_DSTR, rb_str_new(0, 0), 1, NEW_LIST(node));
NEW_LIST         5921 parse.c        				yyval.node = NEW_NODE(NODE_DSYM, rb_str_new(0, 0), 1, NEW_LIST(yyval.node));
NEW_LIST         6225 parse.c        			yyval.node = list_append(NEW_LIST(yyvsp[-2].node), yyvsp[0].node);
NEW_LIST         8634 parse.c            if (list == 0) return NEW_LIST(item);
NEW_LIST         8643 parse.c            last->nd_next = NEW_LIST(item);
NEW_LIST         8764 parse.c        	arg1 = NEW_LIST(arg1);
NEW_LIST         8807 parse.c            return NEW_CALL(node1, tMATCH, NEW_LIST(node2));
NEW_LIST         8979 parse.c            if (!node1) return NEW_LIST(node2);
NEW_LIST         9522 parse.c        	return list_concat(NEW_LIST(node1), node2);
NEW_LIST          544 parse.y        		        args = NEW_LIST($6);
NEW_LIST          546 parse.y        			    $3 = NEW_LIST($3);
NEW_LIST          758 parse.y        			$$ = NEW_MASGN(NEW_LIST($2), 0);
NEW_LIST          797 parse.y        			$$ = NEW_LIST($1);
NEW_LIST         1008 parse.y        			args = NEW_LIST($6);
NEW_LIST         1010 parse.y        			    $3 = NEW_LIST($3);
NEW_LIST         1247 parse.y        			$$ = NEW_LIST($1);
NEW_LIST         1260 parse.y        			$$ = NEW_LIST(NEW_HASH($1));
NEW_LIST         1280 parse.y        			$$ = NEW_LIST($2);
NEW_LIST         1296 parse.y        			$$ = NEW_LIST($1);
NEW_LIST         1309 parse.y        			$$ = NEW_LIST(NEW_HASH($1));
NEW_LIST         1314 parse.y        			$$ = arg_concat(NEW_LIST(NEW_HASH($1)), $4);
NEW_LIST         1337 parse.y        			$$ = arg_blk_pass(list_concat(NEW_LIST($1),$3), $4);
NEW_LIST         1345 parse.y        			$$ = arg_concat(NEW_LIST($1), $4);
NEW_LIST         1350 parse.y                               $$ = arg_concat(list_concat(NEW_LIST($1),$3), $6);
NEW_LIST         1355 parse.y        			$$ = NEW_LIST(NEW_HASH($1));
NEW_LIST         1360 parse.y        			$$ = arg_concat(NEW_LIST(NEW_HASH($1)), $4);
NEW_LIST         1365 parse.y        			$$ = list_append(NEW_LIST($1), NEW_HASH($3));
NEW_LIST         1370 parse.y        			$$ = list_append(list_concat(NEW_LIST($1),$3), NEW_HASH($5));
NEW_LIST         1375 parse.y        			$$ = arg_concat(list_append(NEW_LIST($1), NEW_HASH($3)), $6);
NEW_LIST         1380 parse.y        			$$ = arg_concat(list_append(list_concat(NEW_LIST($1), $3), NEW_HASH($5)), $8);
NEW_LIST         1430 parse.y        			$$ = NEW_LIST($1);
NEW_LIST         1882 parse.y        			$$ = NEW_LIST(NEW_WHEN($2, 0, 0));
NEW_LIST         1906 parse.y        			$$ = NEW_LIST($1);
NEW_LIST         1979 parse.y        				node = NEW_NODE(NODE_DXSTR, rb_str_new(0, 0), 1, NEW_LIST(node));
NEW_LIST         2005 parse.y        			    node = NEW_NODE(NODE_DSTR, rb_str_new(0, 0), 1, NEW_LIST(node));
NEW_LIST         2165 parse.y        				$$ = NEW_NODE(NODE_DSYM, rb_str_new(0, 0), 1, NEW_LIST($$));
NEW_LIST         2429 parse.y        			$$ = list_append(NEW_LIST($1), $3);
NEW_LIST         4636 parse.y            if (list == 0) return NEW_LIST(item);
NEW_LIST         4645 parse.y            last->nd_next = NEW_LIST(item);
NEW_LIST         4766 parse.y        	arg1 = NEW_LIST(arg1);
NEW_LIST         4809 parse.y            return NEW_CALL(node1, tMATCH, NEW_LIST(node2));
NEW_LIST         4981 parse.y            if (!node1) return NEW_LIST(node2);
NEW_LIST         5524 parse.y        	return list_concat(NEW_LIST(node1), node2);


NEW_LIT

NEW_LIT          5675 parse.c        			yyval.node = NEW_LIT(ID2SYM(yyvsp[0].id));
NEW_LIT          5732 parse.c        			    node = NEW_LIT(rb_reg_new("", 0, options & ~RE_OPTION_ONCE));
NEW_LIT          7635 parse.c        	yylval.node = NEW_LIT(INT2FIX(c));
NEW_LIT          7810 parse.c        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 16, Qfalse));
NEW_LIT          7834 parse.c        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 2, Qfalse));
NEW_LIT          7858 parse.c        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 10, Qfalse));
NEW_LIT          7889 parse.c        			yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 8, Qfalse));
NEW_LIT          7905 parse.c        		    yylval.node = NEW_LIT(INT2FIX(0));
NEW_LIT          7984 parse.c        		yylval.node = NEW_LIT(rb_float_new(d));
NEW_LIT          7987 parse.c        	    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 10, Qfalse));
NEW_LIT          8830 parse.c        	return NEW_LIT(INT2FIX(ruby_sourceline));
NEW_LIT          1933 parse.y        			$$ = NEW_LIT(ID2SYM($1));
NEW_LIT          1992 parse.y        			    node = NEW_LIT(rb_reg_new("", 0, options & ~RE_OPTION_ONCE));
NEW_LIT          3637 parse.y        	yylval.node = NEW_LIT(INT2FIX(c));
NEW_LIT          3812 parse.y        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 16, Qfalse));
NEW_LIT          3836 parse.y        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 2, Qfalse));
NEW_LIT          3860 parse.y        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 10, Qfalse));
NEW_LIT          3891 parse.y        			yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 8, Qfalse));
NEW_LIT          3907 parse.y        		    yylval.node = NEW_LIT(INT2FIX(0));
NEW_LIT          3986 parse.y        		yylval.node = NEW_LIT(rb_float_new(d));
NEW_LIT          3989 parse.y        	    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 10, Qfalse));
NEW_LIT          4832 parse.y        	return NEW_LIT(INT2FIX(ruby_sourceline));


NEW_LVAR

NEW_LVAR         8834 parse.c        	if (local_id(id)) return NEW_LVAR(id);
NEW_LVAR         4836 parse.y        	if (local_id(id)) return NEW_LVAR(id);


NEW_MASGN

NEW_MASGN        4157 parse.c        			yyval.node = NEW_MASGN(NEW_LIST(yyvsp[-1].node), 0);
NEW_MASGN        4163 parse.c        			yyval.node = NEW_MASGN(yyvsp[0].node, 0);
NEW_MASGN        4169 parse.c        			yyval.node = NEW_MASGN(list_append(yyvsp[-1].node,yyvsp[0].node), 0);
NEW_MASGN        4175 parse.c        			yyval.node = NEW_MASGN(yyvsp[-2].node, yyvsp[0].node);
NEW_MASGN        4181 parse.c        			yyval.node = NEW_MASGN(yyvsp[-1].node, -1);
NEW_MASGN        4187 parse.c        			yyval.node = NEW_MASGN(0, yyvsp[0].node);
NEW_MASGN        4193 parse.c        			yyval.node = NEW_MASGN(0, -1);
NEW_MASGN         758 parse.y        			$$ = NEW_MASGN(NEW_LIST($2), 0);
NEW_MASGN         764 parse.y        			$$ = NEW_MASGN($1, 0);
NEW_MASGN         768 parse.y        			$$ = NEW_MASGN(list_append($1,$2), 0);
NEW_MASGN         772 parse.y        			$$ = NEW_MASGN($1, $3);
NEW_MASGN         776 parse.y        			$$ = NEW_MASGN($1, -1);
NEW_MASGN         780 parse.y        			$$ = NEW_MASGN(0, $2);
NEW_MASGN         784 parse.y        			$$ = NEW_MASGN(0, -1);


NEW_MATCH2

NEW_MATCH2       8785 parse.c        	    return NEW_MATCH2(node1, node2);
NEW_MATCH2       8789 parse.c        		return NEW_MATCH2(node1, node2);
NEW_MATCH2       9343 parse.c        	return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_")));
NEW_MATCH2       4787 parse.y        	    return NEW_MATCH2(node1, node2);
NEW_MATCH2       4791 parse.y        		return NEW_MATCH2(node1, node2);
NEW_MATCH2       5345 parse.y        	return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_")));


NEW_MATCH3

NEW_MATCH3       8798 parse.c        	    return NEW_MATCH3(node2, node1);
NEW_MATCH3       8802 parse.c        		return NEW_MATCH3(node2, node1);
NEW_MATCH3       4800 parse.y        	    return NEW_MATCH3(node2, node1);
NEW_MATCH3       4804 parse.y        		return NEW_MATCH3(node2, node1);


NEW_METHOD

NEW_METHOD         57 class.c            st_insert(tbl, mid, (st_data_t)NEW_METHOD(body->nd_body, body->nd_noex));
NEW_METHOD        397 eval.c             body = NEW_METHOD(node, NOEX_WITH_SAFE(noex));
NEW_METHOD       2100 eval.c               (st_data_t)NEW_METHOD(NEW_FBODY(body, def, origin), orig->nd_noex));


NEW_MODULE

NEW_MODULE       5393 parse.c        		        yyval.node = NEW_MODULE(yyvsp[-3].node, yyvsp[-1].node);
NEW_MODULE       1669 parse.y        		        $$ = NEW_MODULE($2, $4);


NEW_NEWLINE

NEW_NEWLINE      2611 eval.c         	node_save = NEW_NEWLINE(0);
NEW_NEWLINE      6698 eval.c         	last_node = NEW_NEWLINE(0);
NEW_NEWLINE      4871 parse.c        			yyval.node = NEW_NEWLINE(NEW_SPLAT(yyvsp[-1].node));
NEW_NEWLINE      8528 parse.c                nl = NEW_NEWLINE(node);
NEW_NEWLINE      1265 parse.y        			$$ = NEW_NEWLINE(NEW_SPLAT($2));
NEW_NEWLINE      4530 parse.y                nl = NEW_NEWLINE(node);
NEW_NEWLINE       345 ruby.c             save[2] = NEW_NEWLINE(0);
NEW_NEWLINE       796 ruby.c         		script_node = NEW_NEWLINE(0);


NEW_NEXT

NEW_NEXT         4037 parse.c        			yyval.node = NEW_NEXT(ret_args(yyvsp[0].node));
NEW_NEXT         5449 parse.c        			yyval.node = NEW_NEXT(0);
NEW_NEXT          655 parse.y        			$$ = NEW_NEXT(ret_args($2));
NEW_NEXT         1713 parse.y        			$$ = NEW_NEXT(0);


NEW_NIL

NEW_NIL          3910 parse.c        			yyvsp[-3].node = list_append(yyvsp[-3].node, NEW_NIL());
NEW_NIL          4526 parse.c        			yyvsp[-3].node = list_append(yyvsp[-3].node, NEW_NIL());
NEW_NIL          5124 parse.c        			    yyval.node = NEW_NIL();
NEW_NIL          5411 parse.c        			if (!yyvsp[-1].node) yyvsp[-1].node = NEW_NIL();
NEW_NIL          5669 parse.c        			    yyval.node = NEW_NIL();
NEW_NIL          8818 parse.c        	return NEW_NIL();
NEW_NIL           547 parse.y        			$3 = list_append($3, NEW_NIL());
NEW_NIL          1011 parse.y        			$3 = list_append($3, NEW_NIL());
NEW_NIL          1472 parse.y        			    $$ = NEW_NIL();
NEW_NIL          1685 parse.y        			if (!$5) $5 = NEW_NIL();
NEW_NIL          1925 parse.y        			    $$ = NEW_NIL();
NEW_NIL          4820 parse.y        	return NEW_NIL();


NEW_NODE

NEW_NODE         1019 eval.c         #define PUSH_CREF(c) ruby_cref = NEW_NODE(NODE_CREF,(c),0,ruby_cref)
NEW_NODE         2144 eval.c             NODE *copy = NEW_NODE(NODE_SCOPE,0,rval,node->nd_next);
NEW_NODE         2159 eval.c             (tmp__protect_tmp = NEW_NODE(NODE_ALLOCA,				\
NEW_NODE          236 node.h         #define NEW_METHOD(n,x) NEW_NODE(NODE_METHOD,x,n,0)
NEW_NODE          237 node.h         #define NEW_FBODY(n,i,o) NEW_NODE(NODE_FBODY,n,i,o)
NEW_NODE          238 node.h         #define NEW_DEFN(i,a,d,p) NEW_NODE(NODE_DEFN,p,i,NEW_RFUNC(a,d))
NEW_NODE          239 node.h         #define NEW_DEFS(r,i,a,d) NEW_NODE(NODE_DEFS,r,i,NEW_RFUNC(a,d))
NEW_NODE          240 node.h         #define NEW_CFUNC(f,c) NEW_NODE(NODE_CFUNC,f,c,0)
NEW_NODE          241 node.h         #define NEW_IFUNC(f,c) NEW_NODE(NODE_IFUNC,f,c,0)
NEW_NODE          243 node.h         #define NEW_SCOPE(b) NEW_NODE(NODE_SCOPE,local_tbl(),0,(b))
NEW_NODE          244 node.h         #define NEW_BLOCK(a) NEW_NODE(NODE_BLOCK,a,0,0)
NEW_NODE          245 node.h         #define NEW_IF(c,t,e) NEW_NODE(NODE_IF,c,t,e)
NEW_NODE          247 node.h         #define NEW_CASE(h,b) NEW_NODE(NODE_CASE,h,b,0)
NEW_NODE          248 node.h         #define NEW_WHEN(c,t,e) NEW_NODE(NODE_WHEN,c,t,e)
NEW_NODE          249 node.h         #define NEW_OPT_N(b) NEW_NODE(NODE_OPT_N,0,b,0)
NEW_NODE          250 node.h         #define NEW_WHILE(c,b,n) NEW_NODE(NODE_WHILE,c,b,n)
NEW_NODE          251 node.h         #define NEW_UNTIL(c,b,n) NEW_NODE(NODE_UNTIL,c,b,n)
NEW_NODE          252 node.h         #define NEW_FOR(v,i,b) NEW_NODE(NODE_FOR,v,b,i)
NEW_NODE          253 node.h         #define NEW_ITER(v,i,b) NEW_NODE(NODE_ITER,v,b,i)
NEW_NODE          254 node.h         #define NEW_BREAK(s) NEW_NODE(NODE_BREAK,s,0,0)
NEW_NODE          255 node.h         #define NEW_NEXT(s) NEW_NODE(NODE_NEXT,s,0,0)
NEW_NODE          256 node.h         #define NEW_REDO() NEW_NODE(NODE_REDO,0,0,0)
NEW_NODE          257 node.h         #define NEW_RETRY() NEW_NODE(NODE_RETRY,0,0,0)
NEW_NODE          258 node.h         #define NEW_BEGIN(b) NEW_NODE(NODE_BEGIN,0,b,0)
NEW_NODE          259 node.h         #define NEW_RESCUE(b,res,e) NEW_NODE(NODE_RESCUE,b,res,e)
NEW_NODE          260 node.h         #define NEW_RESBODY(a,ex,n) NEW_NODE(NODE_RESBODY,n,ex,a)
NEW_NODE          261 node.h         #define NEW_ENSURE(b,en) NEW_NODE(NODE_ENSURE,b,0,en)
NEW_NODE          262 node.h         #define NEW_RETURN(s) NEW_NODE(NODE_RETURN,s,0,0)
NEW_NODE          263 node.h         #define NEW_YIELD(a,s) NEW_NODE(NODE_YIELD,a,0,s)
NEW_NODE          265 node.h         #define NEW_ARRAY(a) NEW_NODE(NODE_ARRAY,a,1,0)
NEW_NODE          266 node.h         #define NEW_ZARRAY() NEW_NODE(NODE_ZARRAY,0,0,0)
NEW_NODE          267 node.h         #define NEW_HASH(a)  NEW_NODE(NODE_HASH,a,0,0)
NEW_NODE          268 node.h         #define NEW_NOT(a)   NEW_NODE(NODE_NOT,0,a,0)
NEW_NODE          269 node.h         #define NEW_MASGN(l,r)   NEW_NODE(NODE_MASGN,l,0,r)
NEW_NODE          270 node.h         #define NEW_GASGN(v,val) NEW_NODE(NODE_GASGN,v,val,rb_global_entry(v))
NEW_NODE          271 node.h         #define NEW_LASGN(v,val) NEW_NODE(NODE_LASGN,v,val,local_cnt(v))
NEW_NODE          272 node.h         #define NEW_DASGN(v,val) NEW_NODE(NODE_DASGN,v,val,0)
NEW_NODE          273 node.h         #define NEW_DASGN_CURR(v,val) NEW_NODE(NODE_DASGN_CURR,v,val,0)
NEW_NODE          274 node.h         #define NEW_IASGN(v,val) NEW_NODE(NODE_IASGN,v,val,0)
NEW_NODE          275 node.h         #define NEW_CDECL(v,val,path) NEW_NODE(NODE_CDECL,v,val,path)
NEW_NODE          276 node.h         #define NEW_CVASGN(v,val) NEW_NODE(NODE_CVASGN,v,val,0)
NEW_NODE          277 node.h         #define NEW_CVDECL(v,val) NEW_NODE(NODE_CVDECL,v,val,0)
NEW_NODE          278 node.h         #define NEW_OP_ASGN1(p,id,a) NEW_NODE(NODE_OP_ASGN1,p,id,a)
NEW_NODE          279 node.h         #define NEW_OP_ASGN2(r,i,o,val) NEW_NODE(NODE_OP_ASGN2,r,val,NEW_OP_ASGN22(i,o))
NEW_NODE          280 node.h         #define NEW_OP_ASGN22(i,o) NEW_NODE(NODE_OP_ASGN2,i,o,rb_id_attrset(i))
NEW_NODE          281 node.h         #define NEW_OP_ASGN_OR(i,val) NEW_NODE(NODE_OP_ASGN_OR,i,val,0)
NEW_NODE          282 node.h         #define NEW_OP_ASGN_AND(i,val) NEW_NODE(NODE_OP_ASGN_AND,i,val,0)
NEW_NODE          283 node.h         #define NEW_GVAR(v) NEW_NODE(NODE_GVAR,v,0,rb_global_entry(v))
NEW_NODE          284 node.h         #define NEW_LVAR(v) NEW_NODE(NODE_LVAR,v,0,local_cnt(v))
NEW_NODE          285 node.h         #define NEW_DVAR(v) NEW_NODE(NODE_DVAR,v,0,0)
NEW_NODE          286 node.h         #define NEW_IVAR(v) NEW_NODE(NODE_IVAR,v,0,0)
NEW_NODE          287 node.h         #define NEW_CONST(v) NEW_NODE(NODE_CONST,v,0,0)
NEW_NODE          288 node.h         #define NEW_CVAR(v) NEW_NODE(NODE_CVAR,v,0,0)
NEW_NODE          289 node.h         #define NEW_NTH_REF(n)  NEW_NODE(NODE_NTH_REF,0,n,local_cnt('~'))
NEW_NODE          290 node.h         #define NEW_BACK_REF(n) NEW_NODE(NODE_BACK_REF,0,n,local_cnt('~'))
NEW_NODE          291 node.h         #define NEW_MATCH(c) NEW_NODE(NODE_MATCH,c,0,0)
NEW_NODE          292 node.h         #define NEW_MATCH2(n1,n2) NEW_NODE(NODE_MATCH2,n1,n2,0)
NEW_NODE          293 node.h         #define NEW_MATCH3(r,n2) NEW_NODE(NODE_MATCH3,r,n2,0)
NEW_NODE          294 node.h         #define NEW_LIT(l) NEW_NODE(NODE_LIT,l,0,0)
NEW_NODE          295 node.h         #define NEW_STR(s) NEW_NODE(NODE_STR,s,0,0)
NEW_NODE          296 node.h         #define NEW_DSTR(s) NEW_NODE(NODE_DSTR,s,1,0)
NEW_NODE          297 node.h         #define NEW_XSTR(s) NEW_NODE(NODE_XSTR,s,0,0)
NEW_NODE          298 node.h         #define NEW_DXSTR(s) NEW_NODE(NODE_DXSTR,s,0,0)
NEW_NODE          299 node.h         #define NEW_DSYM(s) NEW_NODE(NODE_DSYM,s,0,0)
NEW_NODE          300 node.h         #define NEW_EVSTR(n) NEW_NODE(NODE_EVSTR,0,(n),0)
NEW_NODE          301 node.h         #define NEW_CALL(r,m,a) NEW_NODE(NODE_CALL,r,m,a)
NEW_NODE          302 node.h         #define NEW_FCALL(m,a) NEW_NODE(NODE_FCALL,0,m,a)
NEW_NODE          303 node.h         #define NEW_VCALL(m) NEW_NODE(NODE_VCALL,0,m,0)
NEW_NODE          304 node.h         #define NEW_SUPER(a) NEW_NODE(NODE_SUPER,0,0,a)
NEW_NODE          305 node.h         #define NEW_ZSUPER() NEW_NODE(NODE_ZSUPER,0,0,0)
NEW_NODE          306 node.h         #define NEW_ARGS(f,o,r) NEW_NODE(NODE_ARGS,o,r,f)
NEW_NODE          307 node.h         #define NEW_ARGSCAT(a,b) NEW_NODE(NODE_ARGSCAT,a,b,0)
NEW_NODE          308 node.h         #define NEW_ARGSPUSH(a,b) NEW_NODE(NODE_ARGSPUSH,a,b,0)
NEW_NODE          309 node.h         #define NEW_SPLAT(a) NEW_NODE(NODE_SPLAT,a,0,0)
NEW_NODE          310 node.h         #define NEW_TO_ARY(a) NEW_NODE(NODE_TO_ARY,a,0,0)
NEW_NODE          311 node.h         #define NEW_SVALUE(a) NEW_NODE(NODE_SVALUE,a,0,0)
NEW_NODE          312 node.h         #define NEW_BLOCK_ARG(v) NEW_NODE(NODE_BLOCK_ARG,v,0,local_cnt(v))
NEW_NODE          313 node.h         #define NEW_BLOCK_PASS(b) NEW_NODE(NODE_BLOCK_PASS,0,b,0)
NEW_NODE          314 node.h         #define NEW_ALIAS(n,o) NEW_NODE(NODE_ALIAS,o,n,0)
NEW_NODE          315 node.h         #define NEW_VALIAS(n,o) NEW_NODE(NODE_VALIAS,o,n,0)
NEW_NODE          316 node.h         #define NEW_UNDEF(i) NEW_NODE(NODE_UNDEF,0,i,0)
NEW_NODE          317 node.h         #define NEW_CLASS(n,b,s) NEW_NODE(NODE_CLASS,n,NEW_SCOPE(b),(s))
NEW_NODE          318 node.h         #define NEW_SCLASS(r,b) NEW_NODE(NODE_SCLASS,r,NEW_SCOPE(b),0)
NEW_NODE          319 node.h         #define NEW_MODULE(n,b) NEW_NODE(NODE_MODULE,n,NEW_SCOPE(b),0)
NEW_NODE          320 node.h         #define NEW_COLON2(c,i) NEW_NODE(NODE_COLON2,c,i,0)
NEW_NODE          321 node.h         #define NEW_COLON3(i) NEW_NODE(NODE_COLON3,0,i,0)
NEW_NODE          322 node.h         #define NEW_CREF(c) (NEW_NODE(NODE_CREF,0,0,c))
NEW_NODE          323 node.h         #define NEW_DOT2(b,e) NEW_NODE(NODE_DOT2,b,e,0)
NEW_NODE          324 node.h         #define NEW_DOT3(b,e) NEW_NODE(NODE_DOT3,b,e,0)
NEW_NODE          325 node.h         #define NEW_ATTRSET(a) NEW_NODE(NODE_ATTRSET,a,0,0)
NEW_NODE          326 node.h         #define NEW_SELF() NEW_NODE(NODE_SELF,0,0,0)
NEW_NODE          327 node.h         #define NEW_NIL() NEW_NODE(NODE_NIL,0,0,0)
NEW_NODE          328 node.h         #define NEW_TRUE() NEW_NODE(NODE_TRUE,0,0,0)
NEW_NODE          329 node.h         #define NEW_FALSE() NEW_NODE(NODE_FALSE,0,0,0)
NEW_NODE          330 node.h         #define NEW_DEFINED(e) NEW_NODE(NODE_DEFINED,e,0,0)
NEW_NODE          331 node.h         #define NEW_NEWLINE(n) NEW_NODE(NODE_NEWLINE,0,0,n)
NEW_NODE          333 node.h         #define NEW_POSTEXE() NEW_NODE(NODE_POSTEXE,0,0,0)
NEW_NODE          334 node.h         #define NEW_DMETHOD(b) NEW_NODE(NODE_DMETHOD,0,0,b)
NEW_NODE          335 node.h         #define NEW_BMETHOD(b) NEW_NODE(NODE_BMETHOD,0,0,b)
NEW_NODE          336 node.h         #define NEW_ATTRASGN(r,m,a) NEW_NODE(NODE_ATTRASGN,r,m,a)
NEW_NODE         5719 parse.c        				node = NEW_NODE(NODE_DXSTR, rb_str_new(0, 0), 1, NEW_LIST(node));
NEW_NODE         5745 parse.c        			    node = NEW_NODE(NODE_DSTR, rb_str_new(0, 0), 1, NEW_LIST(node));
NEW_NODE         5921 parse.c        				yyval.node = NEW_NODE(NODE_DSYM, rb_str_new(0, 0), 1, NEW_LIST(yyval.node));
NEW_NODE         9411 parse.c        	node->nd_2nd = NEW_NODE(type, second, right, 0);
NEW_NODE         9414 parse.c            return NEW_NODE(type, left, right, 0);
NEW_NODE         1979 parse.y        				node = NEW_NODE(NODE_DXSTR, rb_str_new(0, 0), 1, NEW_LIST(node));
NEW_NODE         2005 parse.y        			    node = NEW_NODE(NODE_DSTR, rb_str_new(0, 0), 1, NEW_LIST(node));
NEW_NODE         2165 parse.y        				$$ = NEW_NODE(NODE_DSYM, rb_str_new(0, 0), 1, NEW_LIST($$));
NEW_NODE         5413 parse.y        	node->nd_2nd = NEW_NODE(type, second, right, 0);
NEW_NODE         5416 parse.y            return NEW_NODE(type, left, right, 0);


NEW_NOT

NEW_NOT          4006 parse.c        			yyval.node = NEW_NOT(cond(yyvsp[0].node));
NEW_NOT          4012 parse.c        			yyval.node = NEW_NOT(cond(yyvsp[0].node));
NEW_NOT          4759 parse.c        			yyval.node = NEW_NOT(call_op(yyvsp[-2].node, tEQ, 1, yyvsp[0].node));
NEW_NOT          4771 parse.c        			yyval.node = NEW_NOT(match_gen(yyvsp[-2].node, yyvsp[0].node));
NEW_NOT          4777 parse.c        			yyval.node = NEW_NOT(cond(yyvsp[0].node));
NEW_NOT           627 parse.y        			$$ = NEW_NOT(cond($2));
NEW_NOT           631 parse.y        			$$ = NEW_NOT(cond($2));
NEW_NOT          1186 parse.y        			$$ = NEW_NOT(call_op($1, tEQ, 1, $3));
NEW_NOT          1194 parse.y        			$$ = NEW_NOT(match_gen($1, $3));
NEW_NOT          1198 parse.y        			$$ = NEW_NOT(cond($2));


NEW_NTH_REF

NEW_NTH_REF      8318 parse.c        	    yylval.node = NEW_NTH_REF(atoi(tok()+1));
NEW_NTH_REF      4320 parse.y        	    yylval.node = NEW_NTH_REF(atoi(tok()+1));


NEW_OPT_N

NEW_OPT_N        9822 parse.c            ruby_eval_tree = NEW_OPT_N(ruby_eval_tree);
NEW_OPT_N        5824 parse.y            ruby_eval_tree = NEW_OPT_N(ruby_eval_tree);


NEW_OP_ASGN1

NEW_OP_ASGN1     3918 parse.c        			yyval.node = NEW_OP_ASGN1(yyvsp[-5].node, yyvsp[-1].id, args);
NEW_OP_ASGN1     4534 parse.c        			yyval.node = NEW_OP_ASGN1(yyvsp[-5].node, yyvsp[-1].id, args);
NEW_OP_ASGN1      555 parse.y        			$$ = NEW_OP_ASGN1($1, $5, args);
NEW_OP_ASGN1     1019 parse.y        			$$ = NEW_OP_ASGN1($1, $5, args);


NEW_OP_ASGN2

NEW_OP_ASGN2     3932 parse.c        			yyval.node = NEW_OP_ASGN2(yyvsp[-4].node, yyvsp[-2].id, yyvsp[-1].id, yyvsp[0].node);
NEW_OP_ASGN2     3946 parse.c        			yyval.node = NEW_OP_ASGN2(yyvsp[-4].node, yyvsp[-2].id, yyvsp[-1].id, yyvsp[0].node);
NEW_OP_ASGN2     3960 parse.c        			yyval.node = NEW_OP_ASGN2(yyvsp[-4].node, yyvsp[-2].id, yyvsp[-1].id, yyvsp[0].node);
NEW_OP_ASGN2     4548 parse.c        			yyval.node = NEW_OP_ASGN2(yyvsp[-4].node, yyvsp[-2].id, yyvsp[-1].id, yyvsp[0].node);
NEW_OP_ASGN2     4562 parse.c        			yyval.node = NEW_OP_ASGN2(yyvsp[-4].node, yyvsp[-2].id, yyvsp[-1].id, yyvsp[0].node);
NEW_OP_ASGN2     4576 parse.c        			yyval.node = NEW_OP_ASGN2(yyvsp[-4].node, yyvsp[-2].id, yyvsp[-1].id, yyvsp[0].node);
NEW_OP_ASGN2      567 parse.y        			$$ = NEW_OP_ASGN2($1, $3, $4, $5);
NEW_OP_ASGN2      579 parse.y        			$$ = NEW_OP_ASGN2($1, $3, $4, $5);
NEW_OP_ASGN2      591 parse.y        			$$ = NEW_OP_ASGN2($1, $3, $4, $5);
NEW_OP_ASGN2     1031 parse.y        			$$ = NEW_OP_ASGN2($1, $3, $4, $5);
NEW_OP_ASGN2     1043 parse.y        			$$ = NEW_OP_ASGN2($1, $3, $4, $5);
NEW_OP_ASGN2     1055 parse.y        			$$ = NEW_OP_ASGN2($1, $3, $4, $5);


NEW_OP_ASGN_AND

NEW_OP_ASGN_AND  3889 parse.c        				yyval.node = NEW_OP_ASGN_AND(gettable(vid), yyvsp[-2].node);
NEW_OP_ASGN_AND  4505 parse.c        				yyval.node = NEW_OP_ASGN_AND(gettable(vid), yyvsp[-2].node);
NEW_OP_ASGN_AND   528 parse.y        				$$ = NEW_OP_ASGN_AND(gettable(vid), $1);
NEW_OP_ASGN_AND   992 parse.y        				$$ = NEW_OP_ASGN_AND(gettable(vid), $1);


NEW_OP_ASGN_OR

NEW_OP_ASGN_OR   3882 parse.c        				yyval.node = NEW_OP_ASGN_OR(gettable(vid), yyvsp[-2].node);
NEW_OP_ASGN_OR   4498 parse.c        				yyval.node = NEW_OP_ASGN_OR(gettable(vid), yyvsp[-2].node);
NEW_OP_ASGN_OR    521 parse.y        				$$ = NEW_OP_ASGN_OR(gettable(vid), $1);
NEW_OP_ASGN_OR    985 parse.y        				$$ = NEW_OP_ASGN_OR(gettable(vid), $1);


NEW_POSTEXE

NEW_POSTEXE      3857 parse.c        			yyval.node = NEW_ITER(0, NEW_POSTEXE(), yyvsp[-1].node);
NEW_POSTEXE       502 parse.y        			$$ = NEW_ITER(0, NEW_POSTEXE(), $3);


NEW_PREEXE

NEW_PREEXE       3845 parse.c        						            NEW_PREEXE(yyvsp[-1].node));
NEW_PREEXE        492 parse.y        						            NEW_PREEXE($4));


NEW_REDO

NEW_REDO         5455 parse.c        			yyval.node = NEW_REDO();
NEW_REDO         1717 parse.y        			$$ = NEW_REDO();


NEW_RESBODY

NEW_RESBODY      3829 parse.c        			yyval.node = NEW_RESCUE(yyvsp[-2].node, NEW_RESBODY(0,yyvsp[0].node,0), 0);
NEW_RESBODY      4487 parse.c        			yyval.node = node_assign(yyvsp[-4].node, NEW_RESCUE(yyvsp[-2].node, NEW_RESBODY(0,yyvsp[0].node,0), 0));
NEW_RESBODY      5646 parse.c        			yyval.node = NEW_RESBODY(yyvsp[-4].node, yyvsp[-1].node, yyvsp[0].node);
NEW_RESBODY       480 parse.y        			$$ = NEW_RESCUE($1, NEW_RESBODY(0,$3,0), 0);
NEW_RESBODY       976 parse.y        			$$ = node_assign($1, NEW_RESCUE($3, NEW_RESBODY(0,$5,0), 0));
NEW_RESBODY      1898 parse.y        			$$ = NEW_RESBODY($2, $5, $6);


NEW_RESCUE

NEW_RESCUE       3701 parse.c        			    yyval.node = NEW_RESCUE(yyvsp[-3].node, yyvsp[-2].node, yyvsp[-1].node);
NEW_RESCUE       3829 parse.c        			yyval.node = NEW_RESCUE(yyvsp[-2].node, NEW_RESBODY(0,yyvsp[0].node,0), 0);
NEW_RESCUE       4487 parse.c        			yyval.node = node_assign(yyvsp[-4].node, NEW_RESCUE(yyvsp[-2].node, NEW_RESBODY(0,yyvsp[0].node,0), 0));
NEW_RESCUE        377 parse.y        			    $$ = NEW_RESCUE($1, $2, $3);
NEW_RESCUE        480 parse.y        			$$ = NEW_RESCUE($1, NEW_RESBODY(0,$3,0), 0);
NEW_RESCUE        976 parse.y        			$$ = node_assign($1, NEW_RESCUE($3, NEW_RESBODY(0,$5,0), 0));


NEW_RETRY

NEW_RETRY        5461 parse.c        			yyval.node = NEW_RETRY();
NEW_RETRY        1721 parse.y        			$$ = NEW_RETRY();


NEW_RETURN

NEW_RETURN       4025 parse.c        			yyval.node = NEW_RETURN(ret_args(yyvsp[0].node));
NEW_RETURN       5189 parse.c        			yyval.node = NEW_RETURN(0);
NEW_RETURN        647 parse.y        			$$ = NEW_RETURN(ret_args($2));
NEW_RETURN       1517 parse.y        			$$ = NEW_RETURN(0);


NEW_RFUNC

NEW_RFUNC         238 node.h         #define NEW_DEFN(i,a,d,p) NEW_NODE(NODE_DEFN,p,i,NEW_RFUNC(a,d))
NEW_RFUNC         239 node.h         #define NEW_DEFS(r,i,a,d) NEW_NODE(NODE_DEFS,r,i,NEW_RFUNC(a,d))


NEW_SCLASS

NEW_SCLASS       5372 parse.c        		        yyval.node = NEW_SCLASS(yyvsp[-5].node, yyvsp[-1].node);
NEW_SCLASS       1651 parse.y        		        $$ = NEW_SCLASS($3, $7);


NEW_SCOPE

NEW_SCOPE         242 node.h         #define NEW_RFUNC(b1,b2) NEW_SCOPE(block_append(b1,b2))
NEW_SCOPE         317 node.h         #define NEW_CLASS(n,b,s) NEW_NODE(NODE_CLASS,n,NEW_SCOPE(b),(s))
NEW_SCOPE         318 node.h         #define NEW_SCLASS(r,b) NEW_NODE(NODE_SCLASS,r,NEW_SCOPE(b),0)
NEW_SCOPE         319 node.h         #define NEW_MODULE(n,b) NEW_NODE(NODE_MODULE,n,NEW_SCOPE(b),0)
NEW_SCOPE         332 node.h         #define NEW_PREEXE(b) NEW_SCOPE(b)


NEW_SELF

NEW_SELF         6164 parse.c        			    yyval.node = NEW_SELF();
NEW_SELF         8815 parse.c        	return NEW_SELF();
NEW_SELF         2374 parse.y        			    $$ = NEW_SELF();
NEW_SELF         4817 parse.y        	return NEW_SELF();


NEW_SPLAT

NEW_SPLAT        4871 parse.c        			yyval.node = NEW_NEWLINE(NEW_SPLAT(yyvsp[-1].node));
NEW_SPLAT        4952 parse.c        			yyval.node = arg_blk_pass(NEW_SPLAT(yyvsp[-1].node), yyvsp[0].node);
NEW_SPLAT        5026 parse.c        			yyval.node = arg_blk_pass(NEW_SPLAT(yyvsp[-1].node), yyvsp[0].node);
NEW_SPLAT        5105 parse.c        			yyval.node = NEW_SPLAT(yyvsp[0].node);
NEW_SPLAT        1265 parse.y        			$$ = NEW_NEWLINE(NEW_SPLAT($2));
NEW_SPLAT        1330 parse.y        			$$ = arg_blk_pass(NEW_SPLAT($2), $3);
NEW_SPLAT        1385 parse.y        			$$ = arg_blk_pass(NEW_SPLAT($2), $3);
NEW_SPLAT        1448 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          5683 parse.c        			    node = NEW_STR(rb_str_new(0, 0));
NEW_STR          7158 parse.c            yylval.node = NEW_STR(rb_str_new(tok(), toklen()));
NEW_STR          7322 parse.c        		yylval.node = NEW_STR(rb_str_new(tok(), toklen()));
NEW_STR          7332 parse.c            yylval.node = NEW_STR(str);
NEW_STR          8709 parse.c        	    tail->nd_head = NEW_STR(tail->nd_lit);
NEW_STR          8827 parse.c        	return NEW_STR(rb_str_new2(ruby_sourcefile));
NEW_STR          1942 parse.y        			    node = NEW_STR(rb_str_new(0, 0));
NEW_STR          3160 parse.y            yylval.node = NEW_STR(rb_str_new(tok(), toklen()));
NEW_STR          3324 parse.y        		yylval.node = NEW_STR(rb_str_new(tok(), toklen()));
NEW_STR          3334 parse.y            yylval.node = NEW_STR(str);
NEW_STR          4711 parse.y        	    tail->nd_head = NEW_STR(tail->nd_lit);
NEW_STR          4829 parse.y        	return NEW_STR(rb_str_new2(ruby_sourcefile));


NEW_STRTERM

NEW_STRTERM      7331 parse.c            lex_strterm = NEW_STRTERM(-1, 0, 0);
NEW_STRTERM      7559 parse.c        	lex_strterm = NEW_STRTERM(str_dquote, '"', 0);
NEW_STRTERM      7574 parse.c        	lex_strterm = NEW_STRTERM(str_xquote, '`', 0);
NEW_STRTERM      7578 parse.c        	lex_strterm = NEW_STRTERM(str_squote, '\'', 0);
NEW_STRTERM      8017 parse.c        	    lex_strterm = NEW_STRTERM(str_ssym, c, 0);
NEW_STRTERM      8020 parse.c        	    lex_strterm = NEW_STRTERM(str_dsym, c, 0);
NEW_STRTERM      8031 parse.c        	    lex_strterm = NEW_STRTERM(str_regexp, '/', 0);
NEW_STRTERM      8043 parse.c        		lex_strterm = NEW_STRTERM(str_regexp, '/', 0);
NEW_STRTERM      8185 parse.c        		lex_strterm = NEW_STRTERM(str_dquote, term, paren);
NEW_STRTERM      8189 parse.c        		lex_strterm = NEW_STRTERM(str_squote, term, paren);
NEW_STRTERM      8193 parse.c        		lex_strterm = NEW_STRTERM(str_dquote | STR_FUNC_QWORDS, term, paren);
NEW_STRTERM      8199 parse.c        		lex_strterm = NEW_STRTERM(str_squote | STR_FUNC_QWORDS, term, paren);
NEW_STRTERM      8205 parse.c        		lex_strterm = NEW_STRTERM(str_xquote, term, paren);
NEW_STRTERM      8209 parse.c        		lex_strterm = NEW_STRTERM(str_regexp, term, paren);
NEW_STRTERM      8213 parse.c        		lex_strterm = NEW_STRTERM(str_ssym, term, paren);
NEW_STRTERM      3333 parse.y            lex_strterm = NEW_STRTERM(-1, 0, 0);
NEW_STRTERM      3561 parse.y        	lex_strterm = NEW_STRTERM(str_dquote, '"', 0);
NEW_STRTERM      3576 parse.y        	lex_strterm = NEW_STRTERM(str_xquote, '`', 0);
NEW_STRTERM      3580 parse.y        	lex_strterm = NEW_STRTERM(str_squote, '\'', 0);
NEW_STRTERM      4019 parse.y        	    lex_strterm = NEW_STRTERM(str_ssym, c, 0);
NEW_STRTERM      4022 parse.y        	    lex_strterm = NEW_STRTERM(str_dsym, c, 0);
NEW_STRTERM      4033 parse.y        	    lex_strterm = NEW_STRTERM(str_regexp, '/', 0);
NEW_STRTERM      4045 parse.y        		lex_strterm = NEW_STRTERM(str_regexp, '/', 0);
NEW_STRTERM      4187 parse.y        		lex_strterm = NEW_STRTERM(str_dquote, term, paren);
NEW_STRTERM      4191 parse.y        		lex_strterm = NEW_STRTERM(str_squote, term, paren);
NEW_STRTERM      4195 parse.y        		lex_strterm = NEW_STRTERM(str_dquote | STR_FUNC_QWORDS, term, paren);
NEW_STRTERM      4201 parse.y        		lex_strterm = NEW_STRTERM(str_squote | STR_FUNC_QWORDS, term, paren);
NEW_STRTERM      4207 parse.y        		lex_strterm = NEW_STRTERM(str_xquote, term, paren);
NEW_STRTERM      4211 parse.y        		lex_strterm = NEW_STRTERM(str_regexp, term, paren);
NEW_STRTERM      4215 parse.y        		lex_strterm = NEW_STRTERM(str_ssym, term, paren);


NEW_SUPER

NEW_SUPER        9567 parse.c        	a->nd_iter = NEW_SUPER(a->nd_head);
NEW_SUPER        9570 parse.c            return NEW_SUPER(a);
NEW_SUPER        5569 parse.y        	a->nd_iter = NEW_SUPER(a->nd_head);
NEW_SUPER        5572 parse.y            return NEW_SUPER(a);


NEW_SVALUE

NEW_SVALUE       3974 parse.c        			yyval.node = node_assign(yyvsp[-2].node, NEW_SVALUE(yyvsp[0].node));
NEW_SVALUE       9456 parse.c        	    node = NEW_SVALUE(node);
NEW_SVALUE        601 parse.y        			$$ = node_assign($1, NEW_SVALUE($3));
NEW_SVALUE       5458 parse.y        	    node = NEW_SVALUE(node);


NEW_TO_ARY

NEW_TO_ARY       3870 parse.c        			yyvsp[-2].node->nd_value = (yyvsp[-2].node->nd_head) ? NEW_TO_ARY(yyvsp[0].node) : NEW_ARRAY(yyvsp[0].node);
NEW_TO_ARY       3980 parse.c        			yyvsp[-2].node->nd_value = (yyvsp[-2].node->nd_head) ? NEW_TO_ARY(yyvsp[0].node) : NEW_ARRAY(yyvsp[0].node);
NEW_TO_ARY        511 parse.y        			$1->nd_value = ($1->nd_head) ? NEW_TO_ARY($3) : NEW_ARRAY($3);
NEW_TO_ARY        605 parse.y        			$1->nd_value = ($1->nd_head) ? NEW_TO_ARY($3) : NEW_ARRAY($3);


NEW_TRUE

NEW_TRUE         8821 parse.c        	return NEW_TRUE();
NEW_TRUE         4823 parse.y        	return NEW_TRUE();


NEW_UNDEF

NEW_UNDEF        4361 parse.c        			yyval.node = NEW_UNDEF(yyvsp[0].id);
NEW_UNDEF        4371 parse.c        			yyval.node = block_append(yyvsp[-3].node, NEW_UNDEF(yyvsp[0].id));
NEW_UNDEF         925 parse.y        			$$ = NEW_UNDEF($1);
NEW_UNDEF         929 parse.y        			$$ = block_append($1, NEW_UNDEF($4));


NEW_UNLESS

NEW_UNLESS       3790 parse.c        			yyval.node = NEW_UNLESS(cond(yyvsp[0].node), yyvsp[-2].node, 0);
NEW_UNLESS       5255 parse.c        			yyval.node = NEW_UNLESS(cond(yyvsp[-4].node), yyvsp[-2].node, yyvsp[-1].node);
NEW_UNLESS        447 parse.y        			$$ = NEW_UNLESS(cond($3), $1, 0);
NEW_UNLESS       1570 parse.y        			$$ = NEW_UNLESS(cond($2), $4, $5);


NEW_UNTIL

NEW_UNTIL        3816 parse.c        			    yyval.node = NEW_UNTIL(cond(yyvsp[0].node), yyvsp[-2].node->nd_body, 0);
NEW_UNTIL        3819 parse.c        			    yyval.node = NEW_UNTIL(cond(yyvsp[0].node), yyvsp[-2].node, 1);
NEW_UNTIL        5293 parse.c        			yyval.node = NEW_UNTIL(cond(yyvsp[-4].node), yyvsp[-1].node, 1);
NEW_UNTIL         469 parse.y        			    $$ = NEW_UNTIL(cond($3), $1->nd_body, 0);
NEW_UNTIL         472 parse.y        			    $$ = NEW_UNTIL(cond($3), $1, 1);
NEW_UNTIL        1592 parse.y        			$$ = NEW_UNTIL(cond($3), $6, 1);


NEW_VALIAS

NEW_VALIAS       3751 parse.c        		        yyval.node = NEW_VALIAS(yyvsp[-1].id, yyvsp[0].id);
NEW_VALIAS       3760 parse.c        		        yyval.node = NEW_VALIAS(yyvsp[-1].id, rb_intern(buf));
NEW_VALIAS        418 parse.y        		        $$ = NEW_VALIAS($2, $3);
NEW_VALIAS        425 parse.y        		        $$ = NEW_VALIAS($2, rb_intern(buf));


NEW_VCALL

NEW_VCALL        8841 parse.c        	return NEW_VCALL(id);
NEW_VCALL        4843 parse.y        	return NEW_VCALL(id);


NEW_WHEN

NEW_WHEN         5624 parse.c        			yyval.node = NEW_WHEN(yyvsp[-3].node, yyvsp[-1].node, yyvsp[0].node);
NEW_WHEN         5630 parse.c        			yyval.node = list_append(yyvsp[-3].node, NEW_WHEN(yyvsp[0].node, 0, 0));
NEW_WHEN         5636 parse.c        			yyval.node = NEW_LIST(NEW_WHEN(yyvsp[0].node, 0, 0));
NEW_WHEN         1872 parse.y        			$$ = NEW_WHEN($2, $4, $5);
NEW_WHEN         1878 parse.y        			$$ = list_append($1, NEW_WHEN($4, 0, 0));
NEW_WHEN         1882 parse.y        			$$ = NEW_LIST(NEW_WHEN($2, 0, 0));


NEW_WHILE

NEW_WHILE        3802 parse.c        			    yyval.node = NEW_WHILE(cond(yyvsp[0].node), yyvsp[-2].node->nd_body, 0);
NEW_WHILE        3805 parse.c        			    yyval.node = NEW_WHILE(cond(yyvsp[0].node), yyvsp[-2].node, 1);
NEW_WHILE        5275 parse.c        			yyval.node = NEW_WHILE(cond(yyvsp[-4].node), yyvsp[-1].node, 1);
NEW_WHILE         457 parse.y        			    $$ = NEW_WHILE(cond($3), $1->nd_body, 0);
NEW_WHILE         460 parse.y        			    $$ = NEW_WHILE(cond($3), $1, 1);
NEW_WHILE        1582 parse.y        			$$ = NEW_WHILE(cond($3), $6, 1);


NEW_XSTR

NEW_XSTR         5708 parse.c        			    node = NEW_XSTR(rb_str_new(0, 0));
NEW_XSTR         1968 parse.y        			    node = NEW_XSTR(rb_str_new(0, 0));


NEW_YIELD

NEW_YIELD        5201 parse.c        			yyval.node = NEW_YIELD(0, Qfalse);
NEW_YIELD        5207 parse.c        			yyval.node = NEW_YIELD(0, Qfalse);
NEW_YIELD        9481 parse.c            return NEW_YIELD(node, state);
NEW_YIELD        1525 parse.y        			$$ = NEW_YIELD(0, Qfalse);
NEW_YIELD        1529 parse.y        			$$ = NEW_YIELD(0, Qfalse);
NEW_YIELD        5483 parse.y            return NEW_YIELD(node, state);


NEW_ZARRAY

NEW_ZARRAY       5173 parse.c        			    yyval.node = NEW_ZARRAY(); /* zero length array*/
NEW_ZARRAY       5762 parse.c        			yyval.node = NEW_ZARRAY();
NEW_ZARRAY       5792 parse.c        			yyval.node = NEW_ZARRAY();
NEW_ZARRAY       1505 parse.y        			    $$ = NEW_ZARRAY(); /* zero length array*/
NEW_ZARRAY       2022 parse.y        			$$ = NEW_ZARRAY();
NEW_ZARRAY       2049 parse.y        			$$ = NEW_ZARRAY();


NEW_ZSUPER

NEW_ZSUPER        618 eval.c         	    rb_add_method(klass, name, NEW_ZSUPER(), noex);
NEW_ZSUPER       5580 parse.c        			yyval.node = NEW_ZSUPER();
NEW_ZSUPER       1838 parse.y        			$$ = NEW_ZSUPER();


NEXT

NEXT             1925 ext/nkf/nkf-utf8/nkf.c                     NEXT;
NEXT             1931 ext/nkf/nkf-utf8/nkf.c                         NEXT;
NEXT             1940 ext/nkf/nkf-utf8/nkf.c                     NEXT;
NEXT             1965 ext/nkf/nkf-utf8/nkf.c                     NEXT;
NEXT             1975 ext/nkf/nkf-utf8/nkf.c                             NEXT;
NEXT             1988 ext/nkf/nkf-utf8/nkf.c 				NEXT;
NEXT             1995 ext/nkf/nkf-utf8/nkf.c                             NEXT;
NEXT             2000 ext/nkf/nkf-utf8/nkf.c                        NEXT;
NEXT             2014 ext/nkf/nkf-utf8/nkf.c 			    NEXT;
NEXT             2021 ext/nkf/nkf-utf8/nkf.c                         NEXT;
NEXT             2026 ext/nkf/nkf-utf8/nkf.c                     NEXT;
NEXT             2039 ext/nkf/nkf-utf8/nkf.c 				NEXT;
NEXT             2043 ext/nkf/nkf-utf8/nkf.c                             NEXT;
NEXT             2047 ext/nkf/nkf-utf8/nkf.c                         NEXT;
NEXT             2055 ext/nkf/nkf-utf8/nkf.c                 NEXT;
NEXT             2058 ext/nkf/nkf-utf8/nkf.c                 NEXT;
NEXT             2075 ext/nkf/nkf-utf8/nkf.c                         NEXT;
NEXT             2088 ext/nkf/nkf-utf8/nkf.c                             NEXT;
NEXT             2093 ext/nkf/nkf-utf8/nkf.c                             NEXT;
NEXT             2101 ext/nkf/nkf-utf8/nkf.c                             NEXT;
NEXT             2107 ext/nkf/nkf-utf8/nkf.c                         NEXT;
NEXT             2112 ext/nkf/nkf-utf8/nkf.c                         NEXT;
NEXT             2124 ext/nkf/nkf-utf8/nkf.c                             NEXT;
NEXT             2128 ext/nkf/nkf-utf8/nkf.c                             NEXT;
NEXT             2131 ext/nkf/nkf-utf8/nkf.c                             NEXT;


NEXTFROM

NEXTFROM          510 pack.c         	    from = NEXTFROM;
NEXTFROM          675 pack.c         		from = NEXTFROM;
NEXTFROM          686 pack.c         		from = NEXTFROM;
NEXTFROM          697 pack.c         		from = NEXTFROM;
NEXTFROM          708 pack.c         		from = NEXTFROM;
NEXTFROM          719 pack.c         		from = NEXTFROM;
NEXTFROM          729 pack.c         		from = NEXTFROM;
NEXTFROM          740 pack.c         		from = NEXTFROM;
NEXTFROM          751 pack.c         		from = NEXTFROM;
NEXTFROM          762 pack.c         		from = NEXTFROM;
NEXTFROM          774 pack.c         		from = NEXTFROM;
NEXTFROM          785 pack.c         		from = NEXTFROM;
NEXTFROM          797 pack.c         		from = NEXTFROM;
NEXTFROM          809 pack.c         		from = NEXTFROM;
NEXTFROM          820 pack.c         		from = NEXTFROM;
NEXTFROM          832 pack.c         		from = NEXTFROM;
NEXTFROM          874 pack.c         		from = NEXTFROM;
NEXTFROM          887 pack.c         	    from = NEXTFROM;
NEXTFROM          910 pack.c         	    from = rb_obj_as_string(NEXTFROM);
NEXTFROM          930 pack.c         		from = NEXTFROM;
NEXTFROM          951 pack.c         		from = NEXTFROM;


NEXT_ARGF_FORWARD

NEXT_ARGF_FORWARD 4489 io.c               NEXT_ARGF_FORWARD();
NEXT_ARGF_FORWARD 5337 io.c               NEXT_ARGF_FORWARD();


NFAILURES

NFAILURES         384 regex.c        #ifndef NFAILURES
NFAILURES        2782 regex.c          unsigned char *stacka[NFAILURES];
NFAILURES        2785 regex.c          unsigned char **stacke = stackb + NFAILURES;
NFAILURES        3610 regex.c          stacka = RE_TALLOC(MAX_NUM_FAILURE_ITEMS * NFAILURES, unsigned char*);
NFAILURES        3613 regex.c          stacke = &stackb[MAX_NUM_FAILURE_ITEMS * NFAILURES];


NGROUPS

NGROUPS           827 file.c         #  ifndef NGROUPS
NGROUPS           835 file.c         	GETGROUPS_T gary[NGROUPS];
NGROUPS           838 file.c         	anum = getgroups(NGROUPS, gary);


NIL_P

NIL_P             283 array.c        	if (!NIL_P(val)) {
NIL_P             958 array.c            if (NIL_P(rpl)) {
NIL_P            1259 array.c        	len += NIL_P(tmp) ? 10 : RSTRING(tmp)->len;
NIL_P            1261 array.c            if (!NIL_P(sep)) {
NIL_P            1286 array.c        	if (i > 0 && !NIL_P(sep))
NIL_P            1316 array.c            if (NIL_P(sep)) sep = rb_output_fs;
NIL_P            1360 array.c            if (NIL_P(inspect_tbl)) {
NIL_P            1383 array.c            if (!NIL_P(inspect_tbl)) {
NIL_P            1418 array.c            if (NIL_P(inspect_tbl)) return Qfalse;
NIL_P            2249 array.c        	beg = NIL_P(arg1) ? 0 : NUM2LONG(arg1);
NIL_P            2254 array.c        	len = NIL_P(arg2) ? RARRAY(ary)->len - beg : NUM2LONG(arg2);
NIL_P            2359 array.c            if (!NIL_P(tmp)) {
NIL_P            2804 array.c        	if (NIL_P(*t)) t++;
NIL_P            2856 array.c        	if (!NIL_P(*p)) n++;
NIL_P            2882 array.c        	if (!NIL_P(tmp)) {
NIL_P            2920 array.c        	if (!NIL_P(tmp)) {
NIL_P            2921 array.c        	    if (NIL_P(memo)) {
NIL_P             382 class.c            if (NIL_P(module)) return;
NIL_P              23 compar.c           if (NIL_P(val)) {
NIL_P              61 compar.c           if (NIL_P(c)) return Qnil;
NIL_P             107 compar.c           if (NIL_P(c)) return cmperr();
NIL_P             126 compar.c           if (NIL_P(c)) return cmperr();
NIL_P             145 compar.c           if (NIL_P(c)) return cmperr();
NIL_P             165 compar.c           if (NIL_P(c)) return cmperr();
NIL_P             121 enum.c             if (!NIL_P(if_none)) {
NIL_P             141 error.c            if (NIL_P(ruby_verbose)) return;
NIL_P             184 error.c            if (!NIL_P(ruby_verbose)) {
NIL_P             263 error.c        		if (NIL_P(x)) {
NIL_P             406 error.c            if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc));
NIL_P             504 error.c            if (!NIL_P(bt)) {
NIL_P             589 error.c            if (NIL_P(status)) return Qtrue;
NIL_P             668 error.c            if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc));
NIL_P             729 error.c            if (NIL_P(mesg)) return Qnil;
NIL_P             747 error.c        	    if (NIL_P(d) || RSTRING(d)->len > 65) {
NIL_P             894 error.c        	if (!NIL_P(error) && st_lookup(syserr_tbl, NUM2LONG(error), &klass)) {
NIL_P             906 error.c            if (!NIL_P(error)) err = strerror(NUM2LONG(error));
NIL_P             908 error.c            if (!NIL_P(mesg)) {
NIL_P             960 error.c            if (NIL_P(num)) {
NIL_P            1551 error.c        	if (NIL_P(ruby_errinfo)) {
NIL_P             380 eval.c             if (NIL_P(klass)) klass = rb_cObject;
NIL_P            1155 eval.c             if (NIL_P(info)) return Qnil;
NIL_P            1157 eval.c             if (NIL_P(info)) return Qnil;
NIL_P            1176 eval.c             if (NIL_P(ruby_errinfo)) return;
NIL_P            1186 eval.c             if (NIL_P(errat)){
NIL_P            1199 eval.c         	if (NIL_P(mesg)) error_pos();
NIL_P            1251 eval.c             if (!NIL_P(errat)) {
NIL_P            1591 eval.c             if (!NIL_P(ruby_errinfo)) {
NIL_P            1813 eval.c         	if (NIL_P(klass)) return rb_const_defined(CLASS_OF(self), id);
NIL_P            1815 eval.c         	    if (result == Qundef && NIL_P(rb_autoload_p((VALUE)klass, id))) {
NIL_P            1837 eval.c         	if (NIL_P(klass)) return rb_const_get(CLASS_OF(self), id);
NIL_P            1855 eval.c             while (cref && cref->nd_next && (NIL_P(cref->nd_clss) || FL_TEST(cref->nd_clss, FL_SINGLETON))) {
NIL_P            1861 eval.c             if (NIL_P(cref->nd_clss)) {
NIL_P            1889 eval.c         	if (!NIL_P(cbase->nd_clss)) rb_ary_push(ary, cbase->nd_clss);
NIL_P            1919 eval.c         	if (!NIL_P(cbase->nd_clss)) {
NIL_P            1925 eval.c             if (!NIL_P(ruby_cbase)) {
NIL_P            2549 eval.c             if (NIL_P(trace)) {
NIL_P            2664 eval.c             if (NIL_P(tmp)) {
NIL_P            2672 eval.c         	if (NIL_P(top)) {
NIL_P            2691 eval.c             if (NIL_P(tmp)) {
NIL_P            2696 eval.c         	if (!NIL_P(top) && RARRAY(top)->len > 1) {
NIL_P            2713 eval.c             if (NIL_P(tmp)) {
NIL_P            2743 eval.c             if (NIL_P(tmp)) {
NIL_P            2768 eval.c             if (NIL_P(v)) return rb_ary_new3(1, Qnil);
NIL_P            2903 eval.c         	    while (!NIL_P(rb_gets())) {
NIL_P            3581 eval.c         	    if (NIL_P(ruby_cbase)) {
NIL_P            3589 eval.c         	if (NIL_P(ruby_cbase)) {
NIL_P            3811 eval.c         	    if (NIL_P(ruby_class)) {
NIL_P            3886 eval.c         	if (NIL_P(ruby_class)) {
NIL_P            3894 eval.c         	if (NIL_P(ruby_class)) {
NIL_P            3915 eval.c         	    if (NIL_P(ruby_cbase)) {
NIL_P            3967 eval.c         	    if (NIL_P(ruby_cbase)) {
NIL_P            4425 eval.c         	if (!NIL_P(ruby_errinfo)) {
NIL_P            4461 eval.c             if (NIL_P(mesg)) mesg = ruby_errinfo;
NIL_P            4462 eval.c             if (NIL_P(mesg)) {
NIL_P            4467 eval.c             if (ruby_sourcefile && !NIL_P(mesg)) {
NIL_P            4469 eval.c         	if (NIL_P(at)) {
NIL_P            4474 eval.c             if (!NIL_P(mesg)) {
NIL_P            4478 eval.c             if (RTEST(ruby_debug) && !NIL_P(ruby_errinfo)
NIL_P            4583 eval.c         	if (NIL_P(argv[0])) break;
NIL_P            6183 eval.c             if (NIL_P(level)) lev = 1;
NIL_P            6254 eval.c             if (!NIL_P(scope)) {
NIL_P            6313 eval.c         	if (!NIL_P(result)) ruby_errinfo = result;
NIL_P            6320 eval.c             if (!NIL_P(scope)) {
NIL_P            6356 eval.c         		if (!NIL_P(errat) && TYPE(errat) == T_ARRAY) {
NIL_P            6357 eval.c         		    if (!NIL_P(mesg) && TYPE(mesg) == T_STRING) {
NIL_P            6404 eval.c         	if (!NIL_P(scope) && !OBJ_TAINTED(scope)) {
NIL_P            6418 eval.c             if (!NIL_P(vfile)) file = RSTRING(vfile)->ptr;
NIL_P            6419 eval.c             if (NIL_P(scope) && ruby_frame->prev) {
NIL_P            6740 eval.c             if (!NIL_P(ruby_errinfo))	/* exception during load */
NIL_P            7064 eval.c             if (NIL_P(result)) {
NIL_P            7523 eval.c             if (!NIL_P(val) && !rb_obj_is_kind_of(val, rb_eException)) {
NIL_P            7542 eval.c             if (NIL_P(ruby_errinfo)) {
NIL_P            8654 eval.c             if (NIL_P(proc)) {
NIL_P            10844 eval.c             if (!NIL_P(th->errinfo) && (th->flags & THREAD_RAISED)) {
NIL_P            10911 eval.c             if (!NIL_P(limit)) delay = rb_num2dbl(limit);
NIL_P            11666 eval.c             if (state && status != THREAD_TO_KILL && !NIL_P(ruby_errinfo)) {
NIL_P            11885 eval.c         	if (!NIL_P(th->errinfo) && (th->flags & THREAD_RAISED))
NIL_P            12238 eval.c             if (NIL_P(val)) {
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             189 ext/digest/digest.c     if (!NIL_P(arg)) rb_digest_base_update(self, arg);
NIL_P             414 ext/dl/dl.c          if (NIL_P(tmp)) {
NIL_P             462 ext/dl/dl.c      if(NIL_P(TYPE(val0))) {
NIL_P              55 ext/dl/handle.c     clib = NIL_P(lib) ? NULL : StringValuePtr(lib);
NIL_P              59 ext/dl/handle.c     clib = NIL_P(lib) ? NULL : StringValuePtr(lib);
NIL_P             157 ext/dl/sym.c     if (!NIL_P(name)) StringValue(name);
NIL_P             158 ext/dl/sym.c     stype = NIL_P(type) ? NULL : StringValuePtr(type);
NIL_P             159 ext/dl/sym.c     sname = NIL_P(name) ? NULL : RSTRING(name)->ptr;
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             467 ext/gdbm/gdbm.c     if (NIL_P(keystr)) return Qnil;
NIL_P             806 ext/gdbm/gdbm.c         if (!NIL_P(valstr2) &&
NIL_P             350 ext/iconv/iconv.c     if (NIL_P(str))
NIL_P             388 ext/iconv/iconv.c     if (NIL_P(str)) {
NIL_P             405 ext/iconv/iconv.c 	    else if (!NIL_P(str)) {
NIL_P             443 ext/iconv/iconv.c 	    if (NIL_P(error) ||	/* something converted */
NIL_P             448 ext/iconv/iconv.c 		if (NIL_P(str)) {
NIL_P             485 ext/iconv/iconv.c 		if (len > 1 && !NIL_P(str = RARRAY(rescue)->ptr[1])) {
NIL_P             492 ext/iconv/iconv.c 	    else if (!NIL_P(rescue)) {
NIL_P             599 ext/iconv/iconv.c     if (!NIL_P(last)) {
NIL_P             762 ext/iconv/iconv.c 			 NIL_P(n1) ? 0 : NUM2INT(n1),
NIL_P             763 ext/iconv/iconv.c 			 NIL_P(n2) ? -1 : NUM2INT(n2),
NIL_P              98 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             189 ext/openssl/ossl_ssl.c     if (NIL_P(cb)) return Qfalse;
NIL_P             226 ext/openssl/ossl_ssl.c     if (NIL_P(cb)) return Qfalse;
NIL_P             316 ext/openssl/ossl_ssl.c     if(!NIL_P(val)){
NIL_P             329 ext/openssl/ossl_ssl.c     if(!NIL_P(val)){
NIL_P             335 ext/openssl/ossl_ssl.c     cert = NIL_P(val) ? NULL : GetX509CertPtr(val); /* NO DUP NEEDED */
NIL_P             337 ext/openssl/ossl_ssl.c     key = NIL_P(val) ? NULL : GetPKeyPtr(val); /* NO DUP NEEDED */
NIL_P             353 ext/openssl/ossl_ssl.c     if(!NIL_P(val)){
NIL_P             373 ext/openssl/ossl_ssl.c     ca_file = NIL_P(val) ? NULL : StringValuePtr(val);
NIL_P             375 ext/openssl/ossl_ssl.c     ca_path = NIL_P(val) ? NULL : StringValuePtr(val);
NIL_P             382 ext/openssl/ossl_ssl.c     verify_mode = NIL_P(val) ? SSL_VERIFY_NONE : NUM2INT(val);
NIL_P             388 ext/openssl/ossl_ssl.c     if(!NIL_P(val)) SSL_CTX_set_timeout(ctx, NUM2LONG(val));
NIL_P             391 ext/openssl/ossl_ssl.c     if(!NIL_P(val)) SSL_CTX_set_verify_depth(ctx, NUM2LONG(val));
NIL_P             394 ext/openssl/ossl_ssl.c     if(!NIL_P(val)) SSL_CTX_set_options(ctx, NUM2LONG(val));
NIL_P             398 ext/openssl/ossl_ssl.c     if (!NIL_P(val)){
NIL_P             461 ext/openssl/ossl_ssl.c     if (NIL_P(v))
NIL_P             628 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             152 ext/readline/readline.c     if (NIL_P(proc))
NIL_P             241 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             495 ext/socket/socket.c     if (!NIL_P(to)) StringValue(to);
NIL_P             501 ext/socket/socket.c     if (!NIL_P(to)) {
NIL_P             691 ext/socket/socket.c     if (NIL_P(host)) {
NIL_P             727 ext/socket/socket.c     if (NIL_P(port)) {
NIL_P            1086 ext/socket/socket.c     if (type != INET_SERVER && (!NIL_P(arg->local.host) || !NIL_P(arg->local.serv))) {
NIL_P            1930 ext/socket/socket.c     if (!NIL_P(tmp)) {
NIL_P            1981 ext/socket/socket.c     if (!NIL_P(tmp)) {
NIL_P            2751 ext/socket/socket.c     if (!NIL_P(type)) {
NIL_P            2799 ext/socket/socket.c     if (NIL_P(proto)) proto = rb_str_new2("tcp");
NIL_P            2832 ext/socket/socket.c     if (NIL_P(host)) {
NIL_P            2840 ext/socket/socket.c     if (NIL_P(port)) {
NIL_P            2854 ext/socket/socket.c     if (NIL_P(family)) {
NIL_P            2871 ext/socket/socket.c     if (!NIL_P(socktype)) {
NIL_P            2874 ext/socket/socket.c     if (!NIL_P(protocol)) {
NIL_P            2877 ext/socket/socket.c     if (!NIL_P(flags)) {
NIL_P            2909 ext/socket/socket.c     if (!NIL_P(flags)) {
NIL_P            2913 ext/socket/socket.c     if (!NIL_P(tmp)) {
NIL_P            2926 ext/socket/socket.c     if (!NIL_P(tmp)) {
NIL_P            2938 ext/socket/socket.c 	    if (NIL_P(host)) {
NIL_P            2956 ext/socket/socket.c 	if (NIL_P(host)) {
NIL_P            2965 ext/socket/socket.c 	if (NIL_P(port)) {
NIL_P            2980 ext/socket/socket.c 	if (NIL_P(af)) {
NIL_P             648 ext/stringio/stringio.c     switch (NIL_P(whence) ? 0 : NUM2LONG(whence)) {
NIL_P             787 ext/stringio/stringio.c     if (NIL_P(c)) rb_eof_error();
NIL_P             846 ext/stringio/stringio.c 	if (!NIL_P(str)) StringValue(str);
NIL_P             856 ext/stringio/stringio.c     if (NIL_P(str)) {
NIL_P             939 ext/stringio/stringio.c     if (NIL_P(line)) rb_eof_error();
NIL_P             959 ext/stringio/stringio.c     while (!NIL_P(line = strio_getline(argc, argv, readable(ptr)))) {
NIL_P             979 ext/stringio/stringio.c     while (!NIL_P(line = strio_getline(argc, argv, readable(ptr)))) {
NIL_P            1103 ext/stringio/stringio.c 	if (!NIL_P(argv[0])) {
NIL_P            1110 ext/stringio/stringio.c 		if (!NIL_P(str)) rb_str_resize(str, 0);
NIL_P            1114 ext/stringio/stringio.c 		if (!NIL_P(str)) rb_str_resize(str, 0);
NIL_P            1125 ext/stringio/stringio.c 	    if (NIL_P(str)) {
NIL_P            1140 ext/stringio/stringio.c     if (NIL_P(str)) {
NIL_P            1149 ext/stringio/stringio.c     if (NIL_P(str)) {
NIL_P            1174 ext/stringio/stringio.c     if (NIL_P(val) || RSTRING(val)->len == 0) {
NIL_P            1210 ext/stringio/stringio.c     if (NIL_P(string)) {
NIL_P              65 ext/strscan/strscan.c     if (NIL_P(var->str)) rb_raise(rb_eArgError, "uninitialized StringScanner object");\
NIL_P            1109 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            1080 ext/syck/rubyext.c     if (NIL_P(type) || RSTRING(StringValue(type))->len == 0)
NIL_P            1085 ext/syck/rubyext.c     if ( ! (NIL_P(type) || RSTRING(StringValue(type))->len == 0) )
NIL_P            1097 ext/syck/rubyext.c         if ( NIL_P( target_class ) )
NIL_P            1108 ext/syck/rubyext.c                 if ( NIL_P( target_class ) )
NIL_P            1117 ext/syck/rubyext.c                 if ( ! NIL_P( target_class ) )
NIL_P            1158 ext/syck/rubyext.c             else if ( !NIL_P( target_class ) )
NIL_P            1165 ext/syck/rubyext.c                 else if ( !NIL_P( obj ) && rb_obj_is_instance_of( val, rb_cHash ) )
NIL_P            1202 ext/syck/rubyext.c     if ( !NIL_P(tmp) )
NIL_P            1222 ext/syck/rubyext.c     if ( !NIL_P(tmp) )
NIL_P            1456 ext/syck/rubyext.c     if ( NIL_P( style ) )
NIL_P            1547 ext/syck/rubyext.c     if ( !NIL_P( val ) ) {
NIL_P            1628 ext/syck/rubyext.c     if ( !NIL_P( val ) )
NIL_P            1633 ext/syck/rubyext.c         if ( NIL_P(hsh) )
NIL_P            1663 ext/syck/rubyext.c     if ( !NIL_P( val ) )
NIL_P            1668 ext/syck/rubyext.c         if ( NIL_P(hsh) )
NIL_P            1766 ext/syck/rubyext.c     if ( !NIL_P( type_id ) ) {
NIL_P            1910 ext/syck/rubyext.c     if ( !NIL_P( bonus->oid ) ) {
NIL_P            1986 ext/syck/rubyext.c     else if ( !NIL_P(tmp = rb_check_string_type(options)) )
NIL_P            2029 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            1875 ext/win32ole/win32ole.c     if (!NIL_P(host)) {
NIL_P            5421 ext/win32ole/win32ole.c         if(NIL_P(event_name) && NIL_P(ev)) {
NIL_P            5451 ext/win32ole/win32ole.c         if(NIL_P(event_name)) {
NIL_P            5578 ext/win32ole/win32ole.c     if (NIL_P(ary) || TYPE(ary) != T_ARRAY) {
NIL_P            5588 ext/win32ole/win32ole.c     if (NIL_P(event)) {
NIL_P            6014 ext/win32ole/win32ole.c     if (NIL_P(events) || TYPE(events) != T_ARRAY) {
NIL_P            6034 ext/win32ole/win32ole.c     if(!NIL_P(event)) {
NIL_P             270 ext/zlib/zlib.c     if (!NIL_P(vsum)) {
NIL_P             273 ext/zlib/zlib.c     else if (NIL_P(str)) {
NIL_P             280 ext/zlib/zlib.c     if (NIL_P(str)) {
NIL_P             435 ext/zlib/zlib.c     if (NIL_P(z->buf)) {
NIL_P             467 ext/zlib/zlib.c     if (NIL_P(z->buf)) {
NIL_P             489 ext/zlib/zlib.c     if (NIL_P(z->buf)) {
NIL_P             525 ext/zlib/zlib.c     if (NIL_P(z->buf)) {
NIL_P             571 ext/zlib/zlib.c     if (NIL_P(z->buf) || RSTRING(z->buf)->len - z->buf_filled == 0) {
NIL_P             592 ext/zlib/zlib.c     if (NIL_P(z->input)) {
NIL_P             610 ext/zlib/zlib.c     if (NIL_P(z->input) || RSTRING(z->input)->len <= len) {
NIL_P             631 ext/zlib/zlib.c     if (!NIL_P(z->input)) {
NIL_P             643 ext/zlib/zlib.c     if (NIL_P(z->input)) {
NIL_P             711 ext/zlib/zlib.c     if (NIL_P(z->input) && len == 0) {
NIL_P             775 ext/zlib/zlib.c     if (!NIL_P(z->input)) {
NIL_P            1032 ext/zlib/zlib.c     return INT2FIX(NIL_P(z->input) ? 0 : (int)(RSTRING(z->input)->len));
NIL_P            1110 ext/zlib/zlib.c     (NIL_P((val)) ? (ifnil) \
NIL_P            1246 ext/zlib/zlib.c     if (NIL_P(src)) {
NIL_P            1505 ext/zlib/zlib.c     if (NIL_P(src)) {
NIL_P            1539 ext/zlib/zlib.c 	if (NIL_P(src)) {
NIL_P            1576 ext/zlib/zlib.c 	if (!NIL_P(src)) {
NIL_P            1834 ext/zlib/zlib.c     if (!NIL_P(str)) {
NIL_P            1847 ext/zlib/zlib.c     while (NIL_P(gz->z.input) || RSTRING(gz->z.input)->len < size) {
NIL_P            1849 ext/zlib/zlib.c 	if (NIL_P(str)) return Qfalse;
NIL_P            1868 ext/zlib/zlib.c 	if (NIL_P(str)) {
NIL_P            1917 ext/zlib/zlib.c     if (!NIL_P(gz->orig_name)) {
NIL_P            1920 ext/zlib/zlib.c     if (!NIL_P(gz->comment)) {
NIL_P            1943 ext/zlib/zlib.c     if (!NIL_P(gz->orig_name)) {
NIL_P            1947 ext/zlib/zlib.c     if (!NIL_P(gz->comment)) {
NIL_P            2095 ext/zlib/zlib.c 	if (NIL_P(str)) {
NIL_P            2211 ext/zlib/zlib.c 	if (NIL_P(gz->io)) return;
NIL_P            2252 ext/zlib/zlib.c     if (!NIL_P(gz->z.input)) {
NIL_P            2271 ext/zlib/zlib.c     if (NIL_P(gz->z.input)) return Qnil;
NIL_P            2419 ext/zlib/zlib.c     if (!NIL_P(str)) {
NIL_P            2435 ext/zlib/zlib.c     if (!NIL_P(str)) {
NIL_P            2576 ext/zlib/zlib.c     return NIL_P(gz->io) ? Qtrue : Qfalse;
NIL_P            2966 ext/zlib/zlib.c     if (NIL_P(vlen)) {
NIL_P            2988 ext/zlib/zlib.c     if (!NIL_P(dst)) {
NIL_P            3003 ext/zlib/zlib.c     if (NIL_P(dst)) {
NIL_P            3017 ext/zlib/zlib.c     while (!NIL_P(c = rb_gzreader_getc(obj))) {
NIL_P            3095 ext/zlib/zlib.c 	if (!NIL_P(rs)) {
NIL_P            3100 ext/zlib/zlib.c     if (NIL_P(rs)) {
NIL_P            3168 ext/zlib/zlib.c     if (!NIL_P(dst)) {
NIL_P            3185 ext/zlib/zlib.c     if (NIL_P(dst)) {
NIL_P            3201 ext/zlib/zlib.c     while (!NIL_P(str = gzreader_gets(argc, argv, obj))) {
NIL_P            3218 ext/zlib/zlib.c     while (!NIL_P(str = gzreader_gets(argc, argv, obj))) {
NIL_P             654 file.c             if (!NIL_P(tmp)) {
NIL_P             675 file.c             if (!NIL_P(tmp)) {
NIL_P            1855 file.c             if (NIL_P(o)) {
NIL_P            1861 file.c             if (NIL_P(g)) {
NIL_P            1895 file.c             o = NIL_P(owner) ? -1 : NUM2INT(owner);
NIL_P            1896 file.c             g = NIL_P(group) ? -1 : NUM2INT(group);
NIL_P            1945 file.c             if (NIL_P(o)) {
NIL_P            1951 file.c             if (NIL_P(g)) {
NIL_P            2527 file.c         	    if (!NIL_P(dname)) {
NIL_P            2550 file.c         	if (!NIL_P(dname)) {
NIL_P            2776 file.c         	if (NIL_P(fext) || !(f = rmext(name, StringValueCStr(fext)))) {
NIL_P            2784 file.c         	if (NIL_P(fext) || !(f = rmext(p, StringValueCStr(fext)))) {
NIL_P            2932 file.c             if (!NIL_P(sep) && TYPE(sep) == T_STRING) {
NIL_P            2957 file.c         	if (i > 0 && !NIL_P(sep)) {
NIL_P            1684 hash.c             if (NIL_P(val) && rb_block_given_p()) rb_yield(name);
NIL_P            1890 hash.c             if (NIL_P(val)) {
NIL_P            2041 hash.c         	if (!NIL_P(val)) {
NIL_P            2114 hash.c         	if (!NIL_P(val)) {
NIL_P            2282 hash.c         	if (NIL_P(tmp)) {
NIL_P            1143 io.c               if (NIL_P(str)) {
NIL_P            1184 io.c               if (NIL_P(str)) {
NIL_P            1285 io.c               if (NIL_P(ret))
NIL_P            1323 io.c               if (NIL_P(length)) {
NIL_P            1324 io.c           	if (!NIL_P(str)) StringValue(str);
NIL_P            1334 io.c               if (NIL_P(str)) {
NIL_P            1395 io.c           	    if (!NIL_P(str)) {
NIL_P            1411 io.c           	    if (!NIL_P(str)) {
NIL_P            1445 io.c           		if (!NIL_P(str))
NIL_P            1464 io.c           	if (!NIL_P(str)) {
NIL_P            1525 io.c               if (!NIL_P(str)) {
NIL_P            1556 io.c               if (NIL_P(rs)) {
NIL_P            1596 io.c               if (!NIL_P(str)) {
NIL_P            1646 io.c           	if (!NIL_P(rs)) StringValue(rs);
NIL_P            1754 io.c               if (NIL_P(line)) {
NIL_P            1789 io.c           	if (!NIL_P(rs)) StringValue(rs);
NIL_P            1792 io.c               while (!NIL_P(line = rb_io_getline(rs, io))) {
NIL_P            1832 io.c           	if (!NIL_P(rs)) StringValue(rs);
NIL_P            1834 io.c               while (!NIL_P(str = rb_io_getline(rs, io))) {
NIL_P            1961 io.c               if (NIL_P(c)) {
NIL_P            2390 io.c               if (NIL_P(str)) {
NIL_P            3094 io.c               if (NIL_P(port)) {
NIL_P            3124 io.c               if (FIXNUM_P(vmode) || !NIL_P(perm)) {
NIL_P            3132 io.c           	fmode = NIL_P(perm) ? 0666 :  NUM2INT(perm);
NIL_P            3137 io.c           	mode = NIL_P(vmode) ? "r" : StringValuePtr(vmode);
NIL_P            3194 io.c               if (NIL_P(vmode)) flags = O_RDONLY;
NIL_P            3200 io.c               if (NIL_P(perm)) fmode = 0666;
NIL_P            3477 io.c           	if (!NIL_P(tmp)) {
NIL_P            3490 io.c               if (!NIL_P(nmode)) {
NIL_P            3674 io.c           	if (!NIL_P(rb_output_fs) && i>0) {
NIL_P            3686 io.c               if (!NIL_P(rb_output_rs)) {
NIL_P            3819 io.c           	if (NIL_P(argv[i])) {
NIL_P            3824 io.c           	    if (!NIL_P(line)) {
NIL_P            4119 io.c           	if (!NIL_P(fd)) {
NIL_P            4346 io.c           	    if (!NIL_P(rs)) StringValue(rs);
NIL_P            4350 io.c               if (NIL_P(line) && next_p != -1) {
NIL_P            4355 io.c               if (!NIL_P(line)) {
NIL_P            4421 io.c               if (NIL_P(line) && next_p != -1) {
NIL_P            4427 io.c               if (!NIL_P(line)) {
NIL_P            4453 io.c               if (NIL_P(line)) {
NIL_P            4491 io.c               while (!NIL_P(line = argf_getline(argc, argv))) {
NIL_P            4522 io.c               if (NIL_P(port)) return rb_str_new(0,0);
NIL_P            4562 io.c               if (NIL_P(timeout)) {
NIL_P            4571 io.c               if (!NIL_P(read)) {
NIL_P            4592 io.c               if (!NIL_P(write)) {
NIL_P            4609 io.c               if (!NIL_P(except)) {
NIL_P            4724 io.c               if (NIL_P(arg) || arg == Qfalse) {
NIL_P            4736 io.c           	if (NIL_P(tmp)) {
NIL_P            4892 io.c           	if (!NIL_P(v)) {
NIL_P            5039 io.c           	if (!NIL_P(r)) rb_io_close(r);
NIL_P            5063 io.c               while (!NIL_P(str = rb_io_getline(arg->sep, arg->io))) {
NIL_P            5100 io.c               else if (!NIL_P(arg.sep)) {
NIL_P            5104 io.c               if (NIL_P(arg.io)) return Qnil;
NIL_P            5143 io.c               if (NIL_P(arg.io)) return Qnil;
NIL_P            5181 io.c               if (NIL_P(arg.io)) return Qnil;
NIL_P            5182 io.c               if (!NIL_P(offset)) {
NIL_P            5272 io.c               if (!NIL_P(length)) {
NIL_P            5275 io.c               if (!NIL_P(str)) {
NIL_P            5291 io.c               if (NIL_P(str)) str = tmp;
NIL_P            5292 io.c               else if (!NIL_P(tmp)) rb_str_append(str, tmp);
NIL_P            5293 io.c               if (NIL_P(tmp) || NIL_P(length)) {
NIL_P            5323 io.c               if (NIL_P(byte) && next_p != -1) {
NIL_P            5339 io.c               if (NIL_P(c)) {
NIL_P            5360 io.c               while (!NIL_P(str = argf_getline(argc, argv))) {
NIL_P            5371 io.c               while (!NIL_P(byte = argf_getc())) {
NIL_P             613 marshal.c      	    if (NIL_P(RHASH(obj)->ifnone)) {
NIL_P             625 marshal.c      	    if (!NIL_P(RHASH(obj)->ifnone)) {
NIL_P             740 marshal.c      	if (!NIL_P(a2)) limit = NUM2INT(a2);
NIL_P             741 marshal.c      	if (NIL_P(a1)) goto type_error;
NIL_P             746 marshal.c      	else if (NIL_P(a1)) goto type_error;
NIL_P             750 marshal.c          if (!NIL_P(port)) {
NIL_P             809 marshal.c      	if (NIL_P(v)) rb_eof_error();
NIL_P             889 marshal.c      	if (NIL_P(str)) goto too_short;
NIL_P            1012 marshal.c      	if (NIL_P(v)) {
NIL_P            1030 marshal.c                  if (NIL_P(extmod)) extmod = rb_ary_new2(0);
NIL_P            1252 marshal.c                  if (! NIL_P(extmod)) {
NIL_P            1427 marshal.c          if (NIL_P(proc)) arg.proc = 0;
NIL_P            1501 marshal.c          if (!NIL_P(port)) argc = 2;
NIL_P             176 numeric.c      	NIL_P(c = rb_funcall(x, ruby_frame->orig_func, 1, y))) {
NIL_P            1508 numeric.c          if (NIL_P(val)) {
NIL_P            1659 numeric.c          if (NIL_P(val)) {
NIL_P            2668 numeric.c      	if (NIL_P(c)) rb_cmperr(i, to);
NIL_P            2707 numeric.c      	if (NIL_P(c)) rb_cmperr(i, to);
NIL_P            1454 object.c           if (NIL_P(cmp)) return Qnil;
NIL_P            1680 object.c       	if (!NIL_P(tmp)) {
NIL_P            2123 object.c       		     NIL_P(val) ? "nil" :
NIL_P            2164 object.c           if (NIL_P(v)) return Qnil;
NIL_P            2218 object.c           if (NIL_P(tmp)) {
NIL_P            2464 object.c           if (NIL_P(tmp)) {
NIL_P            2466 object.c       	if (NIL_P(tmp)) {
NIL_P             511 pack.c         	    if (NIL_P(from)) {
NIL_P             918 pack.c         	    if (!NIL_P(from)) {
NIL_P             931 pack.c         		if (NIL_P(from)) {
NIL_P            6579 parse.c        	    if (NIL_P(ruby_debug_lines)) {
NIL_P            6650 parse.c            if (ruby_debug_lines && !NIL_P(line)) {
NIL_P            6703 parse.c        	    if (NIL_P(v)) return -1;
NIL_P            2581 parse.y        	    if (NIL_P(ruby_debug_lines)) {
NIL_P            2652 parse.y            if (ruby_debug_lines && !NIL_P(line)) {
NIL_P            2705 parse.y        	    if (NIL_P(v)) return -1;
NIL_P             737 process.c      	if (argc == 2 && !NIL_P(vflags)) {
NIL_P             773 process.c          if (NIL_P(pid)) return Qnil;
NIL_P            1221 process.c          if (!NIL_P(tmp)) {
NIL_P            2483 process.c      	    if (NIL_P(tmp)) {
NIL_P              49 range.c        	if (NIL_P(v)) range_failed();
NIL_P             148 range.c            if (NIL_P(r)) return Qfalse;
NIL_P             160 range.c            if (NIL_P(r)) return Qfalse;
NIL_P             329 range.c        	if (!NIL_P(tmp)) {
NIL_P             932 re.c               if (NIL_P(match) || FL_TEST(match, MATCH_BUSY)) {
NIL_P             956 re.c               if (NIL_P(match)) return Qnil;
NIL_P             976 re.c               if (NIL_P(match)) return Qnil;
NIL_P            1018 re.c               if (NIL_P(match)) return Qnil;
NIL_P            1044 re.c               if (NIL_P(match)) return Qnil;
NIL_P            1059 re.c               if (NIL_P(match)) return Qnil;
NIL_P            1200 re.c               if (!NIL_P(rest) || !FIXNUM_P(idx) || FIX2INT(idx) < 0) {
NIL_P            1294 re.c               if (NIL_P(str)) str = rb_str_new(0,0);
NIL_P            1509 re.c               if (NIL_P(str)) {
NIL_P            1548 re.c           	if (NIL_P(str)) {
NIL_P            1610 re.c               if (NIL_P(result)) return Qnil;
NIL_P            1692 re.c           	if (argc == 3 && !NIL_P(argv[2])) {
NIL_P            1828 re.c               if (!NIL_P(kcode)) {
NIL_P            1916 re.c                   if (!NIL_P(v))
NIL_P            1934 re.c                       if (!NIL_P(v)) {
NIL_P            2165 re.c               if (NIL_P(match)) return Qnil;
NIL_P            2174 re.c               if (!NIL_P(val)) {
NIL_P             872 ruby.c         	    while (!NIL_P(line = rb_io_gets(f))) {
NIL_P             888 ruby.c         	    if (NIL_P(line)) return;
NIL_P             937 ruby.c         	else if (!NIL_P(c)) {
NIL_P             941 ruby.c         	if (NIL_P(c)) return;
NIL_P             270 signal.c       	    if (!NIL_P(str)) {
NIL_P             526 signal.c           if (NIL_P(command)) {
NIL_P             265 string.c           if (NIL_P(str2)) {
NIL_P             582 string.c           if (!NIL_P(str) && !RSTRING(str)->ptr) {
NIL_P            1014 string.c       	    if (NIL_P(tmp)) return Qnil;
NIL_P            1145 string.c       	  if (NIL_P(tmp)) {
NIL_P            1896 string.c           if (!NIL_P(result)) {
NIL_P            1918 string.c       	if (NIL_P(val)) {
NIL_P            2284 string.c       		 NIL_P(line) ? "nil" : rb_obj_classname(line));
NIL_P            2321 string.c           if (NIL_P(rb_str_sub_bang(argc, argv, str)))
NIL_P            2368 string.c           if (NIL_P(rb_str_gsub_bang(argc, argv, str)))
NIL_P            3490 string.c           if (NIL_P(spat)) {
NIL_P            3491 string.c       	if (!NIL_P(rb_fs)) {
NIL_P            3528 string.c       		    if (!NIL_P(limit) && lim <= i) break;
NIL_P            3536 string.c       		    if (!NIL_P(limit)) ++i;
NIL_P            3581 string.c       	    if (!NIL_P(limit) && lim <= ++i) break;
NIL_P            3584 string.c           if (RSTRING(str)->len > 0 && (!NIL_P(limit) || RSTRING(str)->len > beg || lim < 0)) {
NIL_P            3591 string.c           if (NIL_P(limit) && lim == 0) {
NIL_P            3678 string.c           if (NIL_P(rs)) {
NIL_P            3900 string.c           if (NIL_P(rs)) return Qnil;
NIL_P            4015 string.c           if (NIL_P(rb_str_chomp_bang(argc, argv, dup)))
NIL_P            4152 string.c           if (NIL_P(l) && NIL_P(r)) return Qnil;
NIL_P            4257 string.c       	while (!NIL_P(result = scan_once(str, pat, &start))) {
NIL_P            4265 string.c           while (!NIL_P(result = scan_once(str, pat, &start))) {
NIL_P            4610 string.c           if (!NIL_P(val) && TYPE(val) != T_STRING) {
NIL_P              43 struct.c           if (NIL_P(members)) {
NIL_P             189 struct.c           if (NIL_P(name)) {
NIL_P             314 struct.c           if (!NIL_P(name)) {
NIL_P             317 struct.c       	if (NIL_P(tmp)) {
NIL_P             341 time.c             if (NIL_P(v[1])) {
NIL_P             346 time.c         	if (!NIL_P(s)) {
NIL_P             367 time.c             if (NIL_P(v[2])) {
NIL_P             373 time.c             tm->tm_hour = NIL_P(v[3])?0:obj2long(v[3]);
NIL_P             374 time.c             tm->tm_min  = NIL_P(v[4])?0:obj2long(v[4]);
NIL_P             375 time.c             tm->tm_sec  = NIL_P(v[5])?0:obj2long(v[5]);
NIL_P             376 time.c             if (!NIL_P(v[6])) {
NIL_P             182 variable.c         if (!NIL_P(path)) return rb_str_dup(path);
NIL_P             192 variable.c         if (!NIL_P(path)) return path;
NIL_P             580 variable.c         if (NIL_P(cmd)) {
NIL_P             647 variable.c         if (NIL_P(cmd)) {
NIL_P             785 variable.c         if (!NIL_P(rb_backref_get())) {
NIL_P            1592 variable.c     	    if (value == Qundef && NIL_P(autoload_file(klass, id)))


NIOV

NIOV              493 missing/vsnprintf.c 	struct __siov iov[NIOV];/* ... and individual io vectors */
NIOV              516 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         2978 ext/socket/socket.c 	hints.ai_socktype = (fl & NI_DGRAM) ? SOCK_DGRAM : SOCK_STREAM;
NI_DGRAM         3921 ext/socket/socket.c #ifdef NI_DGRAM
NI_DGRAM         3922 ext/socket/socket.c     sock_define_const("NI_DGRAM", NI_DGRAM);


NI_MAXHOST

NI_MAXHOST        118 ext/socket/addrinfo.h #ifndef NI_MAXHOST
NI_MAXHOST        747 ext/socket/socket.c #ifndef NI_MAXHOST
NI_MAXHOST        763 ext/socket/socket.c     char hbuf[NI_MAXHOST], pbuf[NI_MAXSERV];
NI_MAXHOST       1228 ext/socket/socket.c     char hbuf[NI_MAXHOST];
NI_MAXHOST       3903 ext/socket/socket.c #ifdef NI_MAXHOST
NI_MAXHOST       3904 ext/socket/socket.c     sock_define_const("NI_MAXHOST", NI_MAXHOST);


NI_MAXSERV

NI_MAXSERV        750 ext/socket/socket.c #ifndef NI_MAXSERV
NI_MAXSERV        763 ext/socket/socket.c     char hbuf[NI_MAXHOST], pbuf[NI_MAXSERV];
NI_MAXSERV       3906 ext/socket/socket.c #ifdef NI_MAXSERV
NI_MAXSERV       3907 ext/socket/socket.c     sock_define_const("NI_MAXSERV", NI_MAXSERV);


NI_NAMEREQD

NI_NAMEREQD       257 ext/socket/getnameinfo.c 			if (flags & NI_NAMEREQD)
NI_NAMEREQD      3915 ext/socket/socket.c #ifdef NI_NAMEREQD
NI_NAMEREQD      3916 ext/socket/socket.c     sock_define_const("NI_NAMEREQD", NI_NAMEREQD);


NI_NOFQDN

NI_NOFQDN         242 ext/socket/getnameinfo.c 			if (flags & NI_NOFQDN) {
NI_NOFQDN        3909 ext/socket/socket.c #ifdef NI_NOFQDN
NI_NOFQDN        3910 ext/socket/socket.c     sock_define_const("NI_NOFQDN", NI_NOFQDN);


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    638 ext/socket/socket.c     error = getnameinfo(addr, SA_LEN(addr), buf, len, NULL, 0, NI_NUMERICHOST);
NI_NUMERICHOST    848 ext/socket/socket.c 			pbuf, sizeof(pbuf), NI_NUMERICHOST | NI_NUMERICSERV);
NI_NUMERICHOST   3912 ext/socket/socket.c #ifdef NI_NUMERICHOST
NI_NUMERICHOST   3913 ext/socket/socket.c     sock_define_const("NI_NUMERICHOST", NI_NUMERICHOST);


NI_NUMERICSERV

NI_NUMERICSERV    184 ext/socket/getnameinfo.c 	} else if (flags & NI_NUMERICSERV) {
NI_NUMERICSERV    848 ext/socket/socket.c 			pbuf, sizeof(pbuf), NI_NUMERICHOST | NI_NUMERICSERV);
NI_NUMERICSERV   3918 ext/socket/socket.c #ifdef NI_NUMERICSERV
NI_NUMERICSERV   3919 ext/socket/socket.c     sock_define_const("NI_NUMERICSERV", NI_NUMERICSERV);


NKF_RELEASE_DATE

NKF_RELEASE_DATE 4791 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      4791 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               1300 ext/nkf/nkf-utf8/nkf.c             crmode_f = NL;
NL               1307 ext/nkf/nkf-utf8/nkf.c                 crmode_f = NL; cp++;
NL               2157 ext/nkf/nkf-utf8/nkf.c             } else if ((c1 == NL || c1 == CR) && broken_f&4) {
NL               2160 ext/nkf/nkf-utf8/nkf.c 	    } else if (c1 == NL && mime_decode_f && !mime_decode_mode ) {
NL               2167 ext/nkf/nkf-utf8/nkf.c 		c1 = NL;
NL               2174 ext/nkf/nkf-utf8/nkf.c 		    } else if (c1 == NL && (c1=(*i_getc)(f))!=EOF && c1 == SPACE) {
NL               2180 ext/nkf/nkf-utf8/nkf.c 		    i_ungetc(NL,f);
NL               3089 ext/nkf/nkf-utf8/nkf.c 	if (! (c2==0&&c1==NL) ) {
NL               3104 ext/nkf/nkf-utf8/nkf.c 	(*o_crconv)(0,NL);
NL               3105 ext/nkf/nkf-utf8/nkf.c     } else if (c1!='\032' || crmode_f!=NL){
NL               3525 ext/nkf/nkf-utf8/nkf.c #define nkf_isspace(c) (nkf_isblank(c) || c == CR || c == NL)
NL               3916 ext/nkf/nkf-utf8/nkf.c 		case NL:
NL               3918 ext/nkf/nkf-utf8/nkf.c 		    if (c1==NL) {
NL               3925 ext/nkf/nkf-utf8/nkf.c 			c1 = NL;
NL               3927 ext/nkf/nkf-utf8/nkf.c 			if ((c1=(*i_getc)(f))!=EOF && c1 == NL) {
NL               3934 ext/nkf/nkf-utf8/nkf.c 			    i_ungetc(NL,f);
NL               4032 ext/nkf/nkf-utf8/nkf.c 	    case NL:
NL               4034 ext/nkf/nkf-utf8/nkf.c 		if (c1==NL) {
NL               4041 ext/nkf/nkf-utf8/nkf.c 		    c1 = NL;
NL               4053 ext/nkf/nkf-utf8/nkf.c 			i_ungetc(NL,f);
NL               4235 ext/nkf/nkf-utf8/nkf.c 	(*o_mputc)(NL);
NL               4240 ext/nkf/nkf-utf8/nkf.c 	    	|| mimeout_buf[i]==CR || mimeout_buf[i]==NL )) {
NL               4247 ext/nkf/nkf-utf8/nkf.c 		|| mimeout_buf[i]==CR || mimeout_buf[i]==NL ) {
NL               4313 ext/nkf/nkf-utf8/nkf.c 	} else if (c==CR||c==NL) {
NL               4360 ext/nkf/nkf-utf8/nkf.c                 (*o_base64conv)(0,NL);
NL               4389 ext/nkf/nkf-utf8/nkf.c                 if (c!=CR && c!=NL) {
NL               4391 ext/nkf/nkf-utf8/nkf.c                     (*o_mputc)(NL);
NL               4398 ext/nkf/nkf-utf8/nkf.c                 (*o_mputc)(NL);
NL               4453 ext/nkf/nkf-utf8/nkf.c                 if (c==CR || c==NL) {
NL               4458 ext/nkf/nkf-utf8/nkf.c                     if (mimeout_buf[i] == CR || mimeout_buf[i] == NL){
NL               4469 ext/nkf/nkf-utf8/nkf.c                     (*o_mputc)(NL);
NL               4483 ext/nkf/nkf-utf8/nkf.c             if (lastchar==CR || lastchar == NL){
NL               4503 ext/nkf/nkf-utf8/nkf.c             if (lastchar == CR || lastchar == NL){
NL               4518 ext/nkf/nkf-utf8/nkf.c             if (c==SPACE || c==TAB || c==CR || c==NL) {
NL               4557 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                 97 ext/socket/getaddrinfo.c static int translate = NO;
NO                236 ext/socket/getaddrinfo.c 			return NO;


NODE

NODE               54 class.c            NODE *body;
NODE              588 class.c            NODE *body;
NODE              382 enum.c             NODE *memo;
NODE              395 enum.c             NODE **aa, **bb;
NODE              190 eval.c         static VALUE block_pass _((VALUE,NODE*));
NODE              208 eval.c         NODE* ruby_current_node;
NODE              293 eval.c             NODE *method;
NODE              375 eval.c             NODE *node;
NODE              378 eval.c             NODE *body;
NODE              426 eval.c         static NODE*
NODE              431 eval.c             NODE *body;
NODE              443 eval.c         static NODE*
NODE              452 eval.c             NODE * volatile body;
NODE              504 eval.c         NODE*
NODE              519 eval.c             NODE *body;
NODE              600 eval.c             NODE *body;
NODE              698 eval.c         extern NODE *ruby_eval_tree_begin;
NODE              699 eval.c         extern NODE *ruby_eval_tree;
NODE              732 eval.c             NODE *var;
NODE              733 eval.c             NODE *body;
NODE              738 eval.c             NODE *cref;
NODE             1017 eval.c         static NODE *ruby_cref = 0;
NODE             1018 eval.c         static NODE *top_cref;
NODE             1056 eval.c         static VALUE rb_eval _((VALUE,NODE*));
NODE             1058 eval.c         static NODE *compile _((VALUE, char*, int));
NODE             1069 eval.c         static VALUE module_setup _((VALUE,NODE*));
NODE             1071 eval.c         static VALUE massign _((VALUE,NODE*,VALUE,int));
NODE             1072 eval.c         static void assign _((VALUE,NODE*,VALUE,int));
NODE             1094 eval.c         static void call_trace_func _((rb_event_t,NODE*,VALUE,ID,VALUE));
NODE             1358 eval.c             NODE *node;
NODE             1360 eval.c             NODE *beg_tree = ruby_eval_tree_begin;
NODE             1424 eval.c         	    NODE *tag = prot_tag->frame->node;
NODE             1560 eval.c             volatile NODE *tmp;
NODE             1602 eval.c             NODE *oldsrc = ruby_current_node;
NODE             1803 eval.c             NODE *cref;
NODE             1807 eval.c             NODE *cbase = cref;
NODE             1827 eval.c             NODE *cref;
NODE             1831 eval.c             NODE *cbase = cref;
NODE             1853 eval.c             NODE *cref = ruby_cref;
NODE             1885 eval.c             NODE *cbase = ruby_cref;
NODE             1915 eval.c             NODE *cbase = ruby_cref;
NODE             1959 eval.c             NODE *body;
NODE             2065 eval.c             NODE *orig, *body, *node;
NODE             2139 eval.c         static NODE*
NODE             2141 eval.c             NODE *node;
NODE             2142 eval.c             NODE *rval;
NODE             2144 eval.c             NODE *copy = NEW_NODE(NODE_SCOPE,0,rval,node->nd_next);
NODE             2157 eval.c         # define TMP_PROTECT NODE * volatile tmp__protect_tmp=0
NODE             2219 eval.c         static char* is_defined _((VALUE, NODE*, char*));
NODE             2224 eval.c             NODE *node;
NODE             2251 eval.c             NODE *node;			/* OK */
NODE             2280 eval.c         	if (node->nd_recv == (NODE *)1) goto check_bound;
NODE             2445 eval.c         static int handle_rescue _((VALUE,NODE*));
NODE             2594 eval.c             NODE *node;
NODE             2601 eval.c             NODE *node_save;
NODE             2707 eval.c             NODE *lhs;
NODE             2775 eval.c             NODE *cpath;
NODE             2811 eval.c         NORETURN(static void unknown_node _((NODE * volatile)));
NODE             2815 eval.c             NODE *volatile node;
NODE             2832 eval.c             NODE *n;
NODE             2834 eval.c             NODE * volatile contnode = 0;
NODE             2835 eval.c             NODE * volatile node = n;
NODE             2950 eval.c         	    NODE *tag;
NODE             2989 eval.c         		NODE *tag;
NODE             3212 eval.c         		NODE *resq = node->nd_resq;
NODE             3350 eval.c         	    if (node->nd_recv == (NODE *)1) {
NODE             3440 eval.c         	    NODE *saved_cref = 0;
NODE             3450 eval.c         		ruby_cref = (NODE*)node->nd_rval;
NODE             3479 eval.c         	    NODE *rval;
NODE             3692 eval.c         	    NODE *list;
NODE             3745 eval.c         	    NODE *list = node->nd_next;
NODE             3807 eval.c         	    NODE *body,  *defn;
NODE             3856 eval.c         	    NODE *body = 0, *defn;
NODE             4051 eval.c             NODE *n;
NODE             4053 eval.c             NODE * volatile node = n->nd_body;
NODE             4100 eval.c         static NODE *basic_respond_to = 0;
NODE             4776 eval.c             NODE *node;
NODE             4784 eval.c             NODE *cnode = ruby_current_node;
NODE             4822 eval.c         	    if (block->var == (NODE*)1) { /* no parameter || */
NODE             4828 eval.c         	    else if (block->var == (NODE*)2) {
NODE             4943 eval.c             ruby_cref = (NODE*)old_cref;
NODE             5050 eval.c             NODE *node;
NODE             5054 eval.c             NODE *list;
NODE             5097 eval.c             NODE *lhs;
NODE             5158 eval.c         	    if (lhs->nd_recv == (NODE *)1) {
NODE             5199 eval.c             NODE *node = NEW_IFUNC(bl_proc, data2);
NODE             5234 eval.c             NODE *node;
NODE             5337 eval.c             cont_protect = ((NODE *)cont_protect)->u1.value;
NODE             5462 eval.c             NODE *cnode = ruby_current_node;
NODE             5631 eval.c             NODE * volatile body;
NODE             5634 eval.c             NODE *b2;		/* OK */
NODE             5723 eval.c         	    NODE *saved_cref = 0;
NODE             5728 eval.c         		ruby_cref = (NODE*)body->nd_rval;
NODE             5755 eval.c         		NODE *node = 0;
NODE             5778 eval.c         			NODE *optnode = node->nd_opt;
NODE             5799 eval.c         			    NODE *opt = node->nd_opt;
NODE             5877 eval.c             NODE  *body;		/* OK */
NODE             6101 eval.c             NODE *n;
NODE             6214 eval.c         static NODE*
NODE             6220 eval.c             NODE *node;
NODE             6249 eval.c             NODE *nodesave = ruby_current_node;
NODE             6303 eval.c         	NODE *node;
NODE             6324 eval.c         	ruby_cref  = (NODE*)old_cref;
NODE             6652 eval.c             NODE *volatile last_node;
NODE             6653 eval.c             NODE *saved_cref = ruby_cref;
NODE             6702 eval.c         	NODE *node;
NODE             6996 eval.c         	NODE *node;
NODE             7306 eval.c             NODE *body;
NODE             8489 eval.c             NODE *list;
NODE             8500 eval.c             if (data->var == (NODE*)1) return INT2FIX(0);
NODE             8501 eval.c             if (data->var == (NODE*)2) return INT2FIX(0);
NODE             8559 eval.c             NODE *node;
NODE             8642 eval.c             NODE *node;
NODE             8735 eval.c             NODE *body;
NODE             8754 eval.c             NODE *body;
NODE             9170 eval.c             NODE *body;
NODE             9382 eval.c             NODE *node;
NODE             9682 eval.c             NODE *cref;
NODE             9686 eval.c             NODE *node;
NODE             9726 eval.c             NODE *node;
NODE             10019 eval.c         static NODE *th_raise_node;
NODE             11800 eval.c         	NODE *node = th->node;
NODE               72 ext/enumerator/enumerator.c     NODE *memo;
NODE              107 ext/enumerator/enumerator.c     NODE *memo;
NODE              139 ext/enumerator/enumerator.c     NODE *memo;
NODE              179 ext/enumerator/enumerator.c     NODE *memo;
NODE              240 ext/enumerator/enumerator.c     NODE *memo;
NODE              161 node.h         #define NODE_LMASK  (((long)1<<(sizeof(NODE*)*CHAR_BIT-NODE_LSHIFT))-1)
NODE              346 node.h         NODE *rb_compile_cstr _((const char*, const char*, int, int));
NODE              347 node.h         NODE *rb_compile_string _((const char*, VALUE, int));
NODE              348 node.h         NODE *rb_compile_file _((const char*, VALUE, int));
NODE              350 node.h         void rb_add_method _((VALUE, ID, NODE *, int));
NODE              351 node.h         NODE *rb_node_newnode _((enum node_type,VALUE,VALUE,VALUE));
NODE              353 node.h         NODE* rb_method_node _((VALUE klass, ID id));
NODE              172 parse.c        NODE *ruby_eval_tree_begin = 0;
NODE              173 parse.c        NODE *ruby_eval_tree = 0;
NODE              192 parse.c        static NODE *lex_strterm;
NODE              223 parse.c        static NODE *cond();
NODE              224 parse.c        static NODE *logop();
NODE              227 parse.c        static NODE *newline_node();
NODE              233 parse.c        static NODE *remove_begin();
NODE              237 parse.c        static NODE *block_append();
NODE              238 parse.c        static NODE *list_append();
NODE              239 parse.c        static NODE *list_concat();
NODE              240 parse.c        static NODE *arg_concat();
NODE              241 parse.c        static NODE *arg_prepend();
NODE              242 parse.c        static NODE *literal_concat();
NODE              243 parse.c        static NODE *new_evstr();
NODE              244 parse.c        static NODE *evstr2dstr();
NODE              245 parse.c        static NODE *call_op();
NODE              248 parse.c        static NODE *negate_lit();
NODE              249 parse.c        static NODE *ret_args();
NODE              250 parse.c        static NODE *arg_blk_pass();
NODE              251 parse.c        static NODE *new_call();
NODE              252 parse.c        static NODE *new_fcall();
NODE              253 parse.c        static NODE *new_super();
NODE              254 parse.c        static NODE *new_yield();
NODE              256 parse.c        static NODE *gettable();
NODE              257 parse.c        static NODE *assignable();
NODE              258 parse.c        static NODE *aryset();
NODE              259 parse.c        static NODE *attrset();
NODE              261 parse.c        static NODE *node_assign();
NODE              263 parse.c        static NODE *match_gen();
NODE              275 parse.c        static NODE *dyna_init();
NODE              307 parse.c            NODE *node;
NODE             3684 parse.c        				NODE *node = yyvsp[0].node;
NODE             3904 parse.c                                NODE *args;
NODE             4520 parse.c                                NODE *args;
NODE             5246 parse.c        		            NODE *tmp = yyval.node->nd_body;
NODE             5258 parse.c        		            NODE *tmp = yyval.node->nd_body;
NODE             5487 parse.c        			yyval.node = (NODE*)1;
NODE             5493 parse.c        			yyval.node = (NODE*)1;
NODE             5681 parse.c        			NODE *node = yyvsp[0].node;
NODE             5706 parse.c        			NODE *node = yyvsp[-1].node;
NODE             5730 parse.c        			NODE *node = yyvsp[-1].node;
NODE             6558 parse.c        static NODE *parser_heap;
NODE             6561 parse.c        static NODE*
NODE             6567 parse.c            NODE *node = 0;
NODE             6656 parse.c        NODE*
NODE             6672 parse.c        NODE*
NODE             6680 parse.c        NODE*
NODE             7112 parse.c            NODE *quote;
NODE             7223 parse.c            NODE *here;
NODE             7255 parse.c            NODE *here;
NODE             8488 parse.c        NODE*
NODE             8493 parse.c            NODE *n = (NODE*)rb_newobj();
NODE             8509 parse.c            NODE *node;
NODE             8516 parse.c            NODE *node;
NODE             8521 parse.c        static NODE*
NODE             8523 parse.c            NODE *node;
NODE             8525 parse.c            NODE *nl = 0;
NODE             8537 parse.c            NODE *node, *orig;
NODE             8541 parse.c            if (orig == (NODE*)1) return;
NODE             8548 parse.c            NODE *node;
NODE             8559 parse.c            NODE *node;
NODE             8568 parse.c        static NODE*
NODE             8570 parse.c            NODE *head, *tail;
NODE             8572 parse.c            NODE *end, *h = head;
NODE             8598 parse.c        	NODE *nd = end->nd_head;
NODE             8628 parse.c        static NODE*
NODE             8630 parse.c            NODE *list, *item;
NODE             8632 parse.c            NODE *last;
NODE             8649 parse.c        static NODE*
NODE             8651 parse.c            NODE *head, *tail;
NODE             8653 parse.c            NODE *last;
NODE             8675 parse.c        static NODE *
NODE             8677 parse.c            NODE *head, *tail;
NODE             8686 parse.c        	NODE *node = NEW_DSTR(rb_str_new(0, 0));
NODE             8725 parse.c        static NODE *
NODE             8727 parse.c            NODE *node;
NODE             8735 parse.c        static NODE *
NODE             8737 parse.c            NODE *node;
NODE             8739 parse.c            NODE *head = node;
NODE             8754 parse.c        static NODE *
NODE             8756 parse.c            NODE *recv;
NODE             8759 parse.c            NODE *arg1;
NODE             8772 parse.c        static NODE*
NODE             8774 parse.c            NODE *node1;
NODE             8775 parse.c            NODE *node2;
NODE             8810 parse.c        static NODE*
NODE             8859 parse.c        static NODE*
NODE             8862 parse.c            NODE *val;
NODE             8919 parse.c        static NODE *
NODE             8921 parse.c            NODE *recv, *idx;
NODE             8924 parse.c        	recv = (NODE *)1;
NODE             8939 parse.c        static NODE *
NODE             8941 parse.c            NODE *recv;
NODE             8945 parse.c        	recv = (NODE *)1;
NODE             8953 parse.c            NODE *node;
NODE             8965 parse.c        static NODE *
NODE             8967 parse.c            NODE *node1;
NODE             8968 parse.c            NODE *node2;
NODE             8974 parse.c        static NODE *
NODE             8976 parse.c            NODE *node1;
NODE             8977 parse.c            NODE *node2;
NODE             8988 parse.c        static NODE*
NODE             8990 parse.c            NODE *lhs, *rhs;
NODE             9023 parse.c            NODE *node;
NODE             9079 parse.c            NODE *node;
NODE             9175 parse.c            NODE *node;
NODE             9188 parse.c        static NODE *
NODE             9190 parse.c            NODE *node;
NODE             9192 parse.c            NODE **n = &node;
NODE             9209 parse.c            NODE *node;
NODE             9263 parse.c            NODE *node;
NODE             9271 parse.c            NODE *node;
NODE             9277 parse.c        static NODE *cond0();
NODE             9279 parse.c        static NODE*
NODE             9281 parse.c            NODE *node;
NODE             9304 parse.c            NODE *node;
NODE             9324 parse.c        static NODE*
NODE             9326 parse.c            NODE *node;
NODE             9387 parse.c        static NODE*
NODE             9389 parse.c            NODE *node;
NODE             9400 parse.c        static NODE*
NODE             9403 parse.c            NODE *left, *right;
NODE             9407 parse.c        	NODE *node = left, *second;
NODE             9419 parse.c            NODE **nodep;
NODE             9421 parse.c            NODE *c = *nodep;
NODE             9439 parse.c            NODE *node;
NODE             9446 parse.c        static NODE *
NODE             9448 parse.c            NODE *node;
NODE             9462 parse.c        static NODE *
NODE             9464 parse.c            NODE *node;
NODE             9484 parse.c        static NODE*
NODE             9486 parse.c            NODE *node;
NODE             9504 parse.c        static NODE *
NODE             9506 parse.c            NODE *node1;
NODE             9507 parse.c            NODE *node2;
NODE             9516 parse.c        static NODE*
NODE             9518 parse.c            NODE *node1, *node2;
NODE             9537 parse.c        static NODE*
NODE             9539 parse.c            NODE *r;
NODE             9541 parse.c            NODE *a;
NODE             9550 parse.c        static NODE*
NODE             9553 parse.c            NODE *a;
NODE             9562 parse.c        static NODE*
NODE             9564 parse.c            NODE *a;
NODE             9754 parse.c        static NODE *
NODE             9756 parse.c            NODE *node;
NODE             9760 parse.c            NODE *var;
NODE             10248 parse.c            NODE *n = NEWHEAP();
NODE             10259 parse.c            NODE *n = NEWHEAP();
NODE             10270 parse.c            NODE *n;
NODE             10291 parse.c            NODE **prev = &parser_heap, *n;
NODE               75 parse.y        NODE *ruby_eval_tree_begin = 0;
NODE               76 parse.y        NODE *ruby_eval_tree = 0;
NODE               95 parse.y        static NODE *lex_strterm;
NODE              126 parse.y        static NODE *cond();
NODE              127 parse.y        static NODE *logop();
NODE              130 parse.y        static NODE *newline_node();
NODE              136 parse.y        static NODE *remove_begin();
NODE              140 parse.y        static NODE *block_append();
NODE              141 parse.y        static NODE *list_append();
NODE              142 parse.y        static NODE *list_concat();
NODE              143 parse.y        static NODE *arg_concat();
NODE              144 parse.y        static NODE *arg_prepend();
NODE              145 parse.y        static NODE *literal_concat();
NODE              146 parse.y        static NODE *new_evstr();
NODE              147 parse.y        static NODE *evstr2dstr();
NODE              148 parse.y        static NODE *call_op();
NODE              151 parse.y        static NODE *negate_lit();
NODE              152 parse.y        static NODE *ret_args();
NODE              153 parse.y        static NODE *arg_blk_pass();
NODE              154 parse.y        static NODE *new_call();
NODE              155 parse.y        static NODE *new_fcall();
NODE              156 parse.y        static NODE *new_super();
NODE              157 parse.y        static NODE *new_yield();
NODE              159 parse.y        static NODE *gettable();
NODE              160 parse.y        static NODE *assignable();
NODE              161 parse.y        static NODE *aryset();
NODE              162 parse.y        static NODE *attrset();
NODE              164 parse.y        static NODE *node_assign();
NODE              166 parse.y        static NODE *match_gen();
NODE              178 parse.y        static NODE *dyna_init();
NODE              209 parse.y            NODE *node;
NODE              357 parse.y        				NODE *node = $2;
NODE              541 parse.y                                NODE *args;
NODE             1005 parse.y                                NODE *args;
NODE             1560 parse.y        		            NODE *tmp = $$->nd_body;
NODE             1573 parse.y        		            NODE *tmp = $$->nd_body;
NODE             1767 parse.y        			$$ = (NODE*)1;
NODE             1771 parse.y        			$$ = (NODE*)1;
NODE             1940 parse.y        			NODE *node = $1;
NODE             1966 parse.y        			NODE *node = $2;
NODE             1990 parse.y        			NODE *node = $2;
NODE             2560 parse.y        static NODE *parser_heap;
NODE             2563 parse.y        static NODE*
NODE             2569 parse.y            NODE *node = 0;
NODE             2658 parse.y        NODE*
NODE             2674 parse.y        NODE*
NODE             2682 parse.y        NODE*
NODE             3114 parse.y            NODE *quote;
NODE             3225 parse.y            NODE *here;
NODE             3257 parse.y            NODE *here;
NODE             4490 parse.y        NODE*
NODE             4495 parse.y            NODE *n = (NODE*)rb_newobj();
NODE             4511 parse.y            NODE *node;
NODE             4518 parse.y            NODE *node;
NODE             4523 parse.y        static NODE*
NODE             4525 parse.y            NODE *node;
NODE             4527 parse.y            NODE *nl = 0;
NODE             4539 parse.y            NODE *node, *orig;
NODE             4543 parse.y            if (orig == (NODE*)1) return;
NODE             4550 parse.y            NODE *node;
NODE             4561 parse.y            NODE *node;
NODE             4570 parse.y        static NODE*
NODE             4572 parse.y            NODE *head, *tail;
NODE             4574 parse.y            NODE *end, *h = head;
NODE             4600 parse.y        	NODE *nd = end->nd_head;
NODE             4630 parse.y        static NODE*
NODE             4632 parse.y            NODE *list, *item;
NODE             4634 parse.y            NODE *last;
NODE             4651 parse.y        static NODE*
NODE             4653 parse.y            NODE *head, *tail;
NODE             4655 parse.y            NODE *last;
NODE             4677 parse.y        static NODE *
NODE             4679 parse.y            NODE *head, *tail;
NODE             4688 parse.y        	NODE *node = NEW_DSTR(rb_str_new(0, 0));
NODE             4727 parse.y        static NODE *
NODE             4729 parse.y            NODE *node;
NODE             4737 parse.y        static NODE *
NODE             4739 parse.y            NODE *node;
NODE             4741 parse.y            NODE *head = node;
NODE             4756 parse.y        static NODE *
NODE             4758 parse.y            NODE *recv;
NODE             4761 parse.y            NODE *arg1;
NODE             4774 parse.y        static NODE*
NODE             4776 parse.y            NODE *node1;
NODE             4777 parse.y            NODE *node2;
NODE             4812 parse.y        static NODE*
NODE             4861 parse.y        static NODE*
NODE             4864 parse.y            NODE *val;
NODE             4921 parse.y        static NODE *
NODE             4923 parse.y            NODE *recv, *idx;
NODE             4926 parse.y        	recv = (NODE *)1;
NODE             4941 parse.y        static NODE *
NODE             4943 parse.y            NODE *recv;
NODE             4947 parse.y        	recv = (NODE *)1;
NODE             4955 parse.y            NODE *node;
NODE             4967 parse.y        static NODE *
NODE             4969 parse.y            NODE *node1;
NODE             4970 parse.y            NODE *node2;
NODE             4976 parse.y        static NODE *
NODE             4978 parse.y            NODE *node1;
NODE             4979 parse.y            NODE *node2;
NODE             4990 parse.y        static NODE*
NODE             4992 parse.y            NODE *lhs, *rhs;
NODE             5025 parse.y            NODE *node;
NODE             5081 parse.y            NODE *node;
NODE             5177 parse.y            NODE *node;
NODE             5190 parse.y        static NODE *
NODE             5192 parse.y            NODE *node;
NODE             5194 parse.y            NODE **n = &node;
NODE             5211 parse.y            NODE *node;
NODE             5265 parse.y            NODE *node;
NODE             5273 parse.y            NODE *node;
NODE             5279 parse.y        static NODE *cond0();
NODE             5281 parse.y        static NODE*
NODE             5283 parse.y            NODE *node;
NODE             5306 parse.y            NODE *node;
NODE             5326 parse.y        static NODE*
NODE             5328 parse.y            NODE *node;
NODE             5389 parse.y        static NODE*
NODE             5391 parse.y            NODE *node;
NODE             5402 parse.y        static NODE*
NODE             5405 parse.y            NODE *left, *right;
NODE             5409 parse.y        	NODE *node = left, *second;
NODE             5421 parse.y            NODE **nodep;
NODE             5423 parse.y            NODE *c = *nodep;
NODE             5441 parse.y            NODE *node;
NODE             5448 parse.y        static NODE *
NODE             5450 parse.y            NODE *node;
NODE             5464 parse.y        static NODE *
NODE             5466 parse.y            NODE *node;
NODE             5486 parse.y        static NODE*
NODE             5488 parse.y            NODE *node;
NODE             5506 parse.y        static NODE *
NODE             5508 parse.y            NODE *node1;
NODE             5509 parse.y            NODE *node2;
NODE             5518 parse.y        static NODE*
NODE             5520 parse.y            NODE *node1, *node2;
NODE             5539 parse.y        static NODE*
NODE             5541 parse.y            NODE *r;
NODE             5543 parse.y            NODE *a;
NODE             5552 parse.y        static NODE*
NODE             5555 parse.y            NODE *a;
NODE             5564 parse.y        static NODE*
NODE             5566 parse.y            NODE *a;
NODE             5756 parse.y        static NODE *
NODE             5758 parse.y            NODE *node;
NODE             5762 parse.y            NODE *var;
NODE             6250 parse.y            NODE *n = NEWHEAP();
NODE             6261 parse.y            NODE *n = NEWHEAP();
NODE             6272 parse.y            NODE *n;
NODE             6293 parse.y            NODE **prev = &parser_heap, *n;
NODE              337 ruby.c             extern NODE *ruby_eval_tree;
NODE              338 ruby.c             extern NODE *ruby_eval_tree_begin;
NODE              339 ruby.c             NODE *save[3];
NODE              461 ruby.c             NODE *volatile script_node = 0;
NODE             1307 variable.c     static NODE*
NODE             1331 variable.c         return (NODE *)load;
NODE             1340 variable.c         NODE *load = autoload_delete(klass, id);
NODE             1361 variable.c         file = ((NODE *)load)->nd_lit;


NODE_HEREDOC

NODE_HEREDOC     7214 parse.c            lex_strterm = rb_node_newnode(NODE_HEREDOC,
NODE_HEREDOC     7356 parse.c        	if (nd_type(lex_strterm) == NODE_HEREDOC) {
NODE_HEREDOC     3216 parse.y            lex_strterm = rb_node_newnode(NODE_HEREDOC,
NODE_HEREDOC     3358 parse.y        	if (nd_type(lex_strterm) == NODE_HEREDOC) {


NODE_LMASK

NODE_LMASK        162 node.h         #define nd_line(n) ((unsigned int)(((RNODE(n))->flags>>NODE_LSHIFT)&NODE_LMASK))
NODE_LMASK        164 node.h             RNODE(n)->flags=((RNODE(n)->flags&~(-1<<NODE_LSHIFT))|(((l)&NODE_LMASK)<<NODE_LSHIFT))


NODE_LSHIFT

NODE_LSHIFT      8567 eval.c         	len += strlen(node->nd_file) + 2 + (SIZEOF_LONG*CHAR_BIT-NODE_LSHIFT)/3;
NODE_LSHIFT       161 node.h         #define NODE_LMASK  (((long)1<<(sizeof(NODE*)*CHAR_BIT-NODE_LSHIFT))-1)
NODE_LSHIFT       162 node.h         #define nd_line(n) ((unsigned int)(((RNODE(n))->flags>>NODE_LSHIFT)&NODE_LMASK))
NODE_LSHIFT       164 node.h             RNODE(n)->flags=((RNODE(n)->flags&~(-1<<NODE_LSHIFT))|(((l)&NODE_LMASK)<<NODE_LSHIFT))


NODE_STRTERM

NODE_STRTERM     7108 parse.c        	rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0)
NODE_STRTERM     3110 parse.y        	rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0)


NOEX_MASK

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


NOEX_NOSUPER

NOEX_NOSUPER     3839 eval.c         		noex |= NOEX_NOSUPER;
NOEX_NOSUPER     5662 eval.c             ruby_frame->last_class = (flags & NOEX_NOSUPER)?0:klass;
NOEX_NOSUPER      344 node.h         #define NOEX_UNDEF     NOEX_NOSUPER


NOEX_PRIVATE

NOEX_PRIVATE      534 class.c              case NOEX_PRIVATE:
NOEX_PRIVATE      540 class.c        	visi = (type != NOEX_PRIVATE);
NOEX_PRIVATE      573 class.c            return ins_methods_push(name, type, ary, NOEX_PRIVATE);
NOEX_PRIVATE      839 class.c            rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PRIVATE);
NOEX_PRIVATE      387 eval.c         	noex = NOEX_PRIVATE | noex;
NOEX_PRIVATE      415 eval.c             rb_add_method(CLASS_OF(klass), ID_ALLOCATOR, NEW_CFUNC(func, 0), NOEX_PRIVATE);
NOEX_PRIVATE      635 eval.c         	if (ex && (ent->noex & NOEX_PRIVATE))
NOEX_PRIVATE      641 eval.c         	if (ex && (noex & NOEX_PRIVATE))
NOEX_PRIVATE      663 eval.c         	    noex = NOEX_PRIVATE;
NOEX_PRIVATE     2302 eval.c         		if ((noex & NOEX_PRIVATE))
NOEX_PRIVATE     3830 eval.c         		noex = NOEX_PRIVATE;
NOEX_PRIVATE     4265 eval.c         	if (VISI_CHECK(noex, NOEX_PRIVATE))
NOEX_PRIVATE     5905 eval.c         	if (noex & NOEX_PRIVATE)
NOEX_PRIVATE     7188 eval.c         	set_method_visibility(module, argc, argv, NOEX_PRIVATE);
NOEX_PRIVATE     7232 eval.c             set_method_visibility(CLASS_OF(obj), argc, argv, NOEX_PRIVATE);
NOEX_PRIVATE     7318 eval.c             set_method_visibility(module, argc, argv, NOEX_PRIVATE);
NOEX_PRIVATE     9419 eval.c         	noex = NOEX_PRIVATE;
NOEX_PRIVATE     5412 parse.c        			yyval.node = NEW_DEFN(yyvsp[-4].id, yyvsp[-2].node, yyvsp[-1].node, NOEX_PRIVATE);
NOEX_PRIVATE     1686 parse.y        			$$ = NEW_DEFN($2, $4, $5, NOEX_PRIVATE);


NOEX_PROTECTED

NOEX_PROTECTED    535 class.c              case NOEX_PROTECTED:
NOEX_PROTECTED    564 class.c            return ins_methods_push(name, type, ary, NOEX_PROTECTED);
NOEX_PROTECTED    829 class.c            rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PROTECTED);
NOEX_PROTECTED    669 eval.c         	    noex = NOEX_PROTECTED;
NOEX_PROTECTED   2304 eval.c         		if ((noex & NOEX_PROTECTED) &&
NOEX_PROTECTED   3833 eval.c         		noex = NOEX_PROTECTED;
NOEX_PROTECTED   4305 eval.c         	if (VISI_CHECK(noex, NOEX_PROTECTED))
NOEX_PROTECTED   5909 eval.c         	if (noex & NOEX_PROTECTED) {
NOEX_PROTECTED   7153 eval.c         	set_method_visibility(module, argc, argv, NOEX_PROTECTED);
NOEX_PROTECTED   9422 eval.c         	noex = NOEX_PROTECTED;


NOEX_PUBLIC

NOEX_PUBLIC       536 class.c              case NOEX_PUBLIC:
NOEX_PUBLIC       582 class.c            return ins_methods_push(name, type, ary, NOEX_PUBLIC);
NOEX_PUBLIC       805 class.c            rb_add_method(klass, name, NEW_CFUNC(func,argc), NOEX_PUBLIC);
NOEX_PUBLIC       816 class.c            int ex = NOEX_PUBLIC;
NOEX_PUBLIC       660 eval.c             if (!ex) noex = NOEX_PUBLIC;
NOEX_PUBLIC       672 eval.c         	    noex = NOEX_PUBLIC;
NOEX_PUBLIC      1992 eval.c             rb_add_method(klass, id, 0, NOEX_PUBLIC);
NOEX_PUBLIC      3836 eval.c         		noex = NOEX_PUBLIC;
NOEX_PUBLIC      3846 eval.c         			      node->nd_mid, defn, NOEX_PUBLIC);
NOEX_PUBLIC      3880 eval.c         			  NOEX_PUBLIC|(body?body->nd_noex&NOEX_UNDEF:0));
NOEX_PUBLIC      4225 eval.c         	if (VISI_CHECK(noex, NOEX_PUBLIC))
NOEX_PUBLIC      7127 eval.c         	set_method_visibility(module, argc, argv, NOEX_PUBLIC);
NOEX_PUBLIC      7206 eval.c             set_method_visibility(CLASS_OF(obj), argc, argv, NOEX_PUBLIC);
NOEX_PUBLIC      7337 eval.c         	rb_add_method(rb_singleton_class(module), id, body->nd_body, NOEX_PUBLIC);
NOEX_PUBLIC      9425 eval.c         	noex = NOEX_PUBLIC;


NOEX_SAFE

NOEX_SAFE        5744 eval.c         	    if (NOEX_SAFE(flags) > ruby_safe_level) {
NOEX_SAFE        5745 eval.c         		if (!(flags&NOEX_TAINTED) && ruby_safe_level == 0 && NOEX_SAFE(flags) > 2) {
NOEX_SAFE        5750 eval.c         		ruby_safe_level = NOEX_SAFE(flags);


NOEX_TAINTED

NOEX_TAINTED     5745 eval.c         		if (!(flags&NOEX_TAINTED) && ruby_safe_level == 0 && NOEX_SAFE(flags) > 2) {
NOEX_TAINTED     8995 eval.c                 safe = NOEX_WITH(data->safe_level, 4)|NOEX_TAINTED;


NOEX_UNDEF

NOEX_UNDEF        847 class.c            rb_add_method(klass, rb_intern(name), 0, NOEX_UNDEF);
NOEX_UNDEF        423 eval.c             rb_add_method(CLASS_OF(klass), ID_ALLOCATOR, 0, NOEX_UNDEF);
NOEX_UNDEF       3880 eval.c         			  NOEX_PUBLIC|(body?body->nd_noex&NOEX_UNDEF:0));


NOEX_WITH

NOEX_WITH         369 eval.c         #define NOEX_WITH_SAFE(n) NOEX_WITH(n, ruby_safe_level)
NOEX_WITH        8995 eval.c                 safe = NOEX_WITH(data->safe_level, 4)|NOEX_TAINTED;


NOEX_WITH_SAFE

NOEX_WITH_SAFE    397 eval.c             body = NEW_METHOD(node, NOEX_WITH_SAFE(noex));
NOEX_WITH_SAFE   8782 eval.c             data->safe_level = NOEX_WITH_SAFE(0);


NOFILE

NOFILE             70 io.c           #if !defined NOFILE
NOFILE             87 io.c           # ifndef NOFILE
NOFILE           2981 io.c           	    for (fd = 3; fd < NOFILE; fd++)


NON_GREEDY

NON_GREEDY       3664 regex.c        	while (stackp != stackb && stackp[-1] == NON_GREEDY) {
NON_GREEDY       4134 regex.c        	  stackp[-1] = NON_GREEDY;
NON_GREEDY       4145 regex.c        	stackp[-1] = NON_GREEDY;
NON_GREEDY       4162 regex.c        	  stackp[-1] = NON_GREEDY;
NON_GREEDY       4308 regex.c              if (stackp[-4] == 0 || (best_regs_set && stackp[-1] == NON_GREEDY)) {


NORETURN

NORETURN          100 eval.c         NORETURN(static void rb_jump_context(rb_jmpbuf_t, int));
NORETURN          196 eval.c         NORETURN(static void rb_raise_jump _((VALUE)));
NORETURN          270 eval.c         NORETURN(static void print_undef _((VALUE, ID)));
NORETURN         1657 eval.c         NORETURN(static void localjump_error(const char*, VALUE, int));
NORETURN         1714 eval.c         NORETURN(static void jump_tag_but_local_jump _((int,VALUE)));
NORETURN         2809 eval.c         NORETURN(static void return_jump _((VALUE)));
NORETURN         2810 eval.c         NORETURN(static void break_jump _((VALUE)));
NORETURN         2811 eval.c         NORETURN(static void unknown_node _((NODE * volatile)));
NORETURN         4311 eval.c         NORETURN(static VALUE terminate_process _((int, VALUE)));
NORETURN         4447 eval.c         NORETURN(static void rb_longjmp _((int, VALUE)));
NORETURN         4681 eval.c         NORETURN(static void proc_jump_error(int, VALUE));
NORETURN         6639 eval.c         NORETURN(static void load_failed _((VALUE)));
NORETURN         7590 eval.c         NORETURN(static VALUE rb_f_throw _((int,VALUE*)));
NORETURN         10144 eval.c         NORETURN(static void rb_thread_restore_context _((rb_thread_t,int)));
NORETURN         10284 eval.c         NORETURN(static void rb_thread_main_jump _((VALUE, int)));
NORETURN         10296 eval.c         NORETURN(static void rb_thread_deadlock _((void)));
NORETURN          134 ext/openssl/ossl.h NORETURN(void ossl_raise(VALUE, const char *, ...));
NORETURN           34 ext/zlib/zlib.c static NORETURN(void raise_zlib_error _((int, const char *)));
NORETURN         2056 file.c         NORETURN(static void sys_fail2 _((VALUE,VALUE)));
NORETURN          127 intern.h       NORETURN(void rb_cmperr _((VALUE, VALUE)));
NORETURN          134 intern.h       NORETURN(void rb_loaderror __((const char*, ...)));
NORETURN          135 intern.h       NORETURN(void rb_name_error __((ID, const char*, ...)));
NORETURN          136 intern.h       NORETURN(void rb_invalid_str _((const char*, const char*)));
NORETURN          139 intern.h       NORETURN(void rb_load_fail _((const char*)));
NORETURN          140 intern.h       NORETURN(void rb_error_frozen _((const char*)));
NORETURN          145 intern.h       NORETURN(void rb_exc_raise _((VALUE)));
NORETURN          146 intern.h       NORETURN(void rb_exc_fatal _((VALUE)));
NORETURN          177 intern.h       NORETURN(void rb_jump_tag _((int)));
NORETURN          192 intern.h       NORETURN(void ruby_stop _((int)));
NORETURN          235 intern.h       NORETURN(void rb_memerror __((void)));
NORETURN           59 ruby.h         #ifndef NORETURN
NORETURN          535 ruby.h         NORETURN(void rb_raise __((VALUE, const char*, ...)));
NORETURN          536 ruby.h         NORETURN(void rb_fatal __((const char*, ...)));
NORETURN          537 ruby.h         NORETURN(void rb_bug __((const char*, ...)));
NORETURN          538 ruby.h         NORETURN(void rb_sys_fail _((const char*)));
NORETURN          539 ruby.h         NORETURN(void rb_iter_break _((void)));
NORETURN          540 ruby.h         NORETURN(void rb_exit _((int)));
NORETURN          541 ruby.h         NORETURN(void rb_notimplement _((void)));
NORETURN          558 ruby.h         NORETURN(void rb_throw _((const char*,VALUE)));
NORETURN          564 ruby.h         NORETURN(void ruby_run _((void)));
NORETURN           83 rubyio.h       NORETURN(void rb_eof_error _((void)));
NORETURN         1199 variable.c     NORETURN(static void uninitialized_constant _((VALUE, ID)));


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      1286 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   4263 io.c           #ifdef NO_SAFE_RENAME
NO_SAFE_RENAME   4278 io.c           #ifdef NO_SAFE_RENAME
NO_SAFE_RENAME   4290 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        569 process.c      #ifndef NO_WAITPID
NO_WAITPID        633 process.c      #ifdef NO_WAITPID
NO_WAITPID        806 process.c      #ifdef NO_WAITPID


NO_X0201

NO_X0201          389 ext/nkf/nkf-utf8/nkf.c static int             x0201_f = NO_X0201;     /* Assume NO JISX0201 */
NO_X0201          714 ext/nkf/nkf-utf8/nkf.c          x0201_f = ((!iso2022jp_f)? TRUE : NO_X0201);
NO_X0201         1206 ext/nkf/nkf-utf8/nkf.c             if (x0201_f==NO_X0201) x0201_f=TRUE;
NO_X0201         1973 ext/nkf/nkf-utf8/nkf.c                         if(iso2022jp_f && x0201_f==NO_X0201) {
NO_X0201         1986 ext/nkf/nkf-utf8/nkf.c 			    if(iso2022jp_f &&  x0201_f==NO_X0201) {
NO_X0201         2012 ext/nkf/nkf-utf8/nkf.c 			if(iso2022jp_f && x0201_f==NO_X0201) {
NO_X0201         4601 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);


NSIG

NSIG               24 signal.c       #ifndef NSIG
NSIG              305 signal.c       } trap_list[NSIG];
NSIG              306 signal.c       static rb_atomic_t trap_pending_list[NSIG];
NSIG              317 signal.c           for (i=0; i<NSIG; i++) {
NSIG              413 signal.c           if (sig >= NSIG) {
NSIG              480 signal.c           for (i=0; i<NSIG; i++) {
NSIG              581 signal.c           if (sig < 0 || sig > NSIG) {


NSLINKMODULE_OPTION_BINDNOW

NSLINKMODULE_OPTION_BINDNOW 1145 dln.c          #ifndef NSLINKMODULE_OPTION_BINDNOW
NSLINKMODULE_OPTION_BINDNOW 1475 dln.c          	NSLinkModule(obj_file, file, NSLINKMODULE_OPTION_BINDNOW);


NTMALLOC

NTMALLOC         1024 win32/win32.c      tmpcurr->flags |= NTMALLOC;
NTMALLOC         1059 win32/win32.c      if (patt->flags & NTMALLOC)
NTMALLOC         1335 win32/win32.c  	if (curr->flags & NTMALLOC) free(curr->str);


NULL

NULL              116 dir.c          	    return NULL;
NULL              123 dir.c          		return NULL;
NULL              128 dir.c              return ok == not ? NULL : (char *)pat + 1;
NULL              194 dir.c          	    if (pat == NULL)
NULL              256 dir.c              dirp->dir = NULL;
NULL              257 dir.c              dirp->path = NULL;
NULL              278 dir.c              dp->dir = NULL;
NULL              279 dir.c              dp->path = NULL;
NULL              281 dir.c              if (dp->dir == NULL) {
NULL              286 dir.c          	if (dp->dir == NULL) {
NULL              330 dir.c              if (dirp->dir == NULL) dir_closed();\
NULL              413 dir.c              for (dp = readdir(dirp->dir); dp != NULL; dp = readdir(dirp->dir)) {
NULL              415 dir.c          	if (dirp->dir == NULL) dir_closed();
NULL              541 dir.c              dirp->dir = NULL;
NULL              989 dir.c          		if (dirp == NULL) {
NULL             1008 dir.c          	    for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp)) {
NULL              277 dln.c              if (reloc == NULL) {
NULL              279 dln.c          	return NULL;
NULL              285 dln.c          	return NULL;
NULL              309 dln.c              if (buffer == NULL) {
NULL              311 dln.c          	return NULL;
NULL              332 dln.c              return NULL;
NULL              345 dln.c              if (tbl == NULL) {
NULL              347 dln.c          	return NULL;
NULL              368 dln.c              file = dln_find_exe(prog, NULL);
NULL              369 dln.c              if (file == NULL || (fd = open(file, O_RDONLY)) < 0) {
NULL              376 dln.c              if (syms == NULL) {
NULL              381 dln.c              if (sym_tbl == NULL) {	/* file may be start with #! */
NULL              449 dln.c              if (addr == NULL) {
NULL              482 dln.c              st_foreach(undef_tbl, undef_print, NULL);
NULL              507 dln.c          static st_table *reloc_tbl = NULL;
NULL              533 dln.c              if (reloc_tbl == NULL) {
NULL              647 dln.c              struct relocation_info *reloc = NULL;
NULL              650 dln.c              struct nlist *syms = NULL;
NULL              661 dln.c              if (reloc == NULL) return -1;
NULL              664 dln.c              if (syms == NULL) {
NULL              680 dln.c          		if (st_delete(undef_tbl, (st_data_t*)&key, NULL)) {
NULL              692 dln.c          		st_insert(undef_tbl, strdup(sym[1].n_un.n_name), NULL);
NULL              693 dln.c          		if (st_delete(undef_tbl, (st_data_t*)&key, NULL)) {
NULL              703 dln.c          		old_sym = NULL;
NULL              731 dln.c          		    st_insert(undef_tbl, strdup(sym->n_un.n_name), NULL);
NULL              761 dln.c          	    if (st_delete(undef_tbl, (st_data_t*)&key, NULL) != 0) {
NULL              951 dln.c              st_table *lib_tbl = NULL;
NULL              976 dln.c              if (path == NULL) path = dln_librrb_ary_path;
NULL              999 dln.c          	if (data == NULL) goto syserr;
NULL             1048 dln.c          		if (syms == NULL) goto badlib;
NULL             1053 dln.c          			&& st_lookup(undef_tbl, sym->n_un.n_name, NULL)) {
NULL             1115 dln.c              return NULL;
NULL             1203 dln.c          	NULL,
NULL             1208 dln.c          	NULL);
NULL             1241 dln.c          	{L_ERROR_ERRNO,		NULL}
NULL             1309 dln.c              if ((handle = LoadLibrary(winfile)) == NULL) {
NULL             1314 dln.c              if ((init_fct = (void(*)())GetProcAddress(handle, buf)) == NULL) {
NULL             1351 dln.c          	if ((handle = (void*)dlopen(file, RTLD_LAZY|RTLD_GLOBAL)) == NULL) {
NULL             1357 dln.c          	if (init_fct == NULL) {
NULL             1372 dln.c          	shl_t lib = NULL;
NULL             1378 dln.c          	if (lib == NULL) {
NULL             1383 dln.c          	if (init_fct == NULL) {
NULL             1385 dln.c          	    if (init_fct == NULL) {
NULL             1401 dln.c          	if (init_fct == NULL) {
NULL             1428 dln.c          	char *object_files[2] = {NULL, NULL};
NULL             1437 dln.c          	if(rld_load(s, NULL, object_files, NULL) == 0) {
NULL             1752 dln.c          	if (ep == NULL)
NULL             1776 dln.c          		if (home != NULL) {
NULL             1842 dln.c          		(char *) NULL
NULL             1869 dln.c          	    return NULL;
NULL              919 eval.c             if (!ruby_scope->local_tbl) return NULL;
NULL              920 eval.c             if (cnt >= ruby_scope->local_tbl[0]) return NULL;
NULL              926 eval.c             if (ruby_scope->local_vars == 0) return NULL;
NULL             2479 eval.c             prev = NULL;
NULL             6240 eval.c             struct BLOCK *data = NULL;
NULL             9885 eval.c             gettimeofday(&tv, NULL);
NULL             11526 eval.c         	select(0, NULL, NULL, NULL, &tv);
NULL             11569 eval.c             setitimer(ITIMER_VIRTUAL, &tval, NULL);
NULL             11581 eval.c             setitimer(ITIMER_VIRTUAL, &tval, NULL);
NULL             11978 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              429 ext/dl/dl.c          ary[i] = NULL;
NULL              469 ext/dl/dl.c        return NULL;
NULL               55 ext/dl/handle.c     clib = NIL_P(lib) ? NULL : StringValuePtr(lib);
NULL               59 ext/dl/handle.c     clib = NIL_P(lib) ? NULL : StringValuePtr(lib);
NULL              147 ext/dl/handle.c     stype = NULL;
NULL              154 ext/dl/handle.c     name = NULL;
NULL              103 ext/dl/ptr.c         data->stype = NULL;
NULL              104 ext/dl/ptr.c         data->ssize = NULL;
NULL              107 ext/dl/ptr.c         data->ids = NULL;
NULL              153 ext/dl/ptr.c       ptr = NULL;
NULL              173 ext/dl/ptr.c     data->stype = NULL;
NULL              174 ext/dl/ptr.c     data->ssize = NULL;
NULL              177 ext/dl/ptr.c     data->ids   = NULL;
NULL              188 ext/dl/ptr.c     void *p = NULL;
NULL              189 ext/dl/ptr.c     freefunc_t f = NULL;
NULL              228 ext/dl/ptr.c     freefunc_t f = NULL;
NULL              535 ext/dl/ptr.c   	data->stype = NULL;
NULL              539 ext/dl/ptr.c   	data->ids = NULL;
NULL              982 ext/dl/ptr.c   	memimg = ary2cary(data->stype[i], val, NULL);
NULL               54 ext/dl/sym.c     return NULL;
NULL               95 ext/dl/sym.c       data->name = name ? strdup(name) : NULL;
NULL               96 ext/dl/sym.c       data->type = type ? strdup(type) : NULL;
NULL              122 ext/dl/sym.c       func = NULL;
NULL              158 ext/dl/sym.c     stype = NIL_P(type) ? NULL : StringValuePtr(type);
NULL              159 ext/dl/sym.c     sname = NIL_P(name) ? NULL : RSTRING(name)->ptr;
NULL              181 ext/dl/sym.c     if (type == NULL)
NULL              508 ext/dl/sym.c   	ANY2P(args[i]) = DLVOIDP(rb_ary2cary(0, argv[i], NULL));
NULL              217 ext/dl/test/test.c   data->next = NULL;
NULL              246 ext/dl/test/test.c   return NULL;
NULL              549 ext/etc/etc.c  				NULL);
NULL              557 ext/etc/etc.c  			      "gid", "mem", NULL);
NULL              183 ext/iconv/iconv.c 		       Qnil, rb_ary_new3(2, to, from), NULL, s);
NULL              410 ext/iconv/iconv.c 	inptr = NULL;
NULL              548 ext/iconv/iconv.c     DATA_PTR(self) = NULL;
NULL              574 ext/iconv/iconv.c     self = Data_Wrap_Struct(self, NULL, ICONV_FREE, (void *)cd);
NULL              697 ext/iconv/iconv.c     return iconv_convert(VALUE2ICONV(cd), Qnil, 0, 0, NULL);
NULL              712 ext/iconv/iconv.c     DATA_PTR(self) = NULL;
NULL              764 ext/iconv/iconv.c 			 NULL);
NULL              112 ext/io/wait/wait.c     if (rb_thread_select(fd + 1, &rd, NULL, NULL, tp) < 0)
NULL              675 ext/nkf/nkf-utf8/nkf.c     char *outfname = NULL;
NULL              718 ext/nkf/nkf-utf8/nkf.c     if (freopen("","wb",stdout) == NULL)
NULL              725 ext/nkf/nkf-utf8/nkf.c       setbuf(stdout, (char *) NULL);
NULL              732 ext/nkf/nkf-utf8/nkf.c       if (freopen("","rb",stdin) == NULL) return (-1);
NULL              741 ext/nkf/nkf-utf8/nkf.c           if (guess_f) print_guessed_code(NULL);
NULL              749 ext/nkf/nkf-utf8/nkf.c           if ((fin = fopen((origfname = *argv++), "r")) == NULL) {
NULL              805 ext/nkf/nkf-utf8/nkf.c 		  if(freopen(outfname, "w", stdout) == NULL) {
NULL              811 ext/nkf/nkf-utf8/nkf.c                       if (freopen("","wb",stdout) == NULL)
NULL              820 ext/nkf/nkf-utf8/nkf.c                  if (freopen("","rb",fin) == NULL)
NULL              829 ext/nkf/nkf-utf8/nkf.c                   char *filename = NULL;
NULL              969 ext/nkf/nkf-utf8/nkf.c     unsigned char *p = NULL;
NULL             3486 ext/nkf/nkf-utf8/nkf.c    NULL
NULL             3728 ext/nkf/nkf-utf8/nkf.c     if (filename != NULL) printf("%s:", filename);
NULL             3910 ext/nkf/nkf-utf8/nkf.c 	    if (lwsp_buf==NULL) {
NULL             3947 ext/nkf/nkf-utf8/nkf.c 			if (lwsp_buf_new==NULL) {
NULL             3949 ext/nkf/nkf-utf8/nkf.c 			    lwsp_buf = NULL;
NULL             3970 ext/nkf/nkf-utf8/nkf.c 	    lwsp_buf = NULL;
NULL             4026 ext/nkf/nkf-utf8/nkf.c 	if (lwsp_buf==NULL) {
NULL             4066 ext/nkf/nkf-utf8/nkf.c 		    if (lwsp_buf_new==NULL) {
NULL             4068 ext/nkf/nkf-utf8/nkf.c 			lwsp_buf = NULL;
NULL             4089 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               31 ext/openssl/ossl_bio.c     if (!bio) ossl_raise(eOSSLError, NULL);
NULL               39 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              260 ext/openssl/ossl_cipher.c 	ossl_raise(eCipherError, NULL);
NULL              289 ext/openssl/ossl_cipher.c     if (EVP_CipherInit_ex(ctx, NULL, NULL, RSTRING(key)->ptr, NULL, -1) != 1)
NULL              290 ext/openssl/ossl_cipher.c         ossl_raise(eCipherError, NULL);
NULL              306 ext/openssl/ossl_cipher.c     if (EVP_CipherInit_ex(ctx, NULL, NULL, NULL, RSTRING(iv)->ptr, -1) != 1)
NULL              307 ext/openssl/ossl_cipher.c 	ossl_raise(eCipherError, NULL);
NULL              320 ext/openssl/ossl_cipher.c         ossl_raise(eCipherError, NULL);
NULL              334 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              125 ext/openssl/ossl_ssl.c 	ctx->cert_store = NULL;
NULL              147 ext/openssl/ossl_ssl.c     SSL_METHOD *method = NULL;
NULL              246 ext/openssl/ossl_ssl.c     if (status || !success) return NULL;
NULL              260 ext/openssl/ossl_ssl.c     return NULL;
NULL              285 ext/openssl/ossl_ssl.c 	ossl_raise(eSSLError, NULL);
NULL              295 ext/openssl/ossl_ssl.c     X509 *cert = NULL, *client_ca = NULL;
NULL              297 ext/openssl/ossl_ssl.c     EVP_PKEY *key = NULL;
NULL              298 ext/openssl/ossl_ssl.c     char *ca_path = NULL, *ca_file = NULL;
NULL              335 ext/openssl/ossl_ssl.c     cert = NIL_P(val) ? NULL : GetX509CertPtr(val); /* NO DUP NEEDED */
NULL              337 ext/openssl/ossl_ssl.c     key = NIL_P(val) ? NULL : GetPKeyPtr(val); /* NO DUP NEEDED */
NULL              373 ext/openssl/ossl_ssl.c     ca_file = NIL_P(val) ? NULL : StringValuePtr(val);
NULL              375 ext/openssl/ossl_ssl.c     ca_path = NIL_P(val) ? NULL : StringValuePtr(val);
NULL              464 ext/openssl/ossl_ssl.c         str = rb_str_new2(NULL);
NULL              511 ext/openssl/ossl_ssl.c     return Data_Wrap_Struct(klass, 0, ossl_ssl_free, NULL);
NULL              597 ext/openssl/ossl_ssl.c 	    ossl_raise(eSSLError, NULL);
NULL              733 ext/openssl/ossl_ssl.c     X509 *cert = NULL;
NULL              757 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              153 ext/readline/readline.c 	return NULL;
NULL              163 ext/readline/readline.c 	return NULL;
NULL              170 ext/readline/readline.c     result[matches + 1] = NULL;
NULL              284 ext/readline/readline.c     static char *basic_word_break_characters = NULL;
NULL              288 ext/readline/readline.c     if (basic_word_break_characters == NULL) {
NULL              312 ext/readline/readline.c     if (rl_basic_word_break_characters == NULL)
NULL              326 ext/readline/readline.c     static char *completer_word_break_characters = NULL;
NULL              330 ext/readline/readline.c     if (completer_word_break_characters == NULL) {
NULL              354 ext/readline/readline.c     if (rl_completer_word_break_characters == NULL)
NULL              368 ext/readline/readline.c     static char *basic_quote_characters = NULL;
NULL              372 ext/readline/readline.c     if (basic_quote_characters == NULL) {
NULL              397 ext/readline/readline.c     if (rl_basic_quote_characters == NULL)
NULL              411 ext/readline/readline.c     static char *completer_quote_characters = NULL;
NULL              415 ext/readline/readline.c     if (completer_quote_characters == NULL) {
NULL              440 ext/readline/readline.c     if (rl_completer_quote_characters == NULL)
NULL              454 ext/readline/readline.c     static char *filename_quote_characters = NULL;
NULL              458 ext/readline/readline.c     if (filename_quote_characters == NULL) {
NULL              483 ext/readline/readline.c     if (rl_filename_quote_characters == NULL)
NULL              513 ext/readline/readline.c     if (entry == NULL) {
NULL              535 ext/readline/readline.c     entry = replace_history_entry(i, RSTRING(str)->ptr, NULL);
NULL              536 ext/readline/readline.c     if (entry == NULL) {
NULL              631 ext/readline/readline.c         if (entry == NULL)
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              138 ext/socket/getaddrinfo.c 	{0, 0, 0, 0, NULL, NULL},
NULL              174 ext/socket/getaddrinfo.c 	if (((ai)->ai_canonname = (char *)malloc(strlen(str) + 1)) != NULL) {\
NULL              186 ext/socket/getaddrinfo.c 	    == NULL) {\
NULL              226 ext/socket/getaddrinfo.c 	} while ((ai = next) != NULL);
NULL              282 ext/socket/getaddrinfo.c 	struct addrinfo *top = NULL;
NULL              305 ext/socket/getaddrinfo.c 	sentinel.ai_next = NULL;
NULL              313 ext/socket/getaddrinfo.c 	pai->ai_canonname = NULL;
NULL              314 ext/socket/getaddrinfo.c 	pai->ai_addr = NULL;
NULL              315 ext/socket/getaddrinfo.c 	pai->ai_next = NULL;
NULL              318 ext/socket/getaddrinfo.c 	if (hostname == NULL && servname == NULL)
NULL              393 ext/socket/getaddrinfo.c 			proto = NULL;
NULL              396 ext/socket/getaddrinfo.c 				proto = NULL;
NULL              408 ext/socket/getaddrinfo.c 			if ((sp = getservbyname((char*)servname, proto)) == NULL)
NULL              428 ext/socket/getaddrinfo.c 	if (hostname == NULL) {
NULL              541 ext/socket/getaddrinfo.c 	*res = NULL;
NULL              587 ext/socket/getaddrinfo.c 	*res = NULL;
NULL              607 ext/socket/getaddrinfo.c 	top = NULL;
NULL              608 ext/socket/getaddrinfo.c 	sentinel.ai_next = NULL;
NULL              620 ext/socket/getaddrinfo.c 	if (hp == NULL) {
NULL              637 ext/socket/getaddrinfo.c 	if ((hp->h_name == NULL) || (hp->h_name[0] == 0) ||
NULL              638 ext/socket/getaddrinfo.c 	    (hp->h_addr_list[0] == NULL))
NULL              641 ext/socket/getaddrinfo.c 	for (i = 0; (ap = hp->h_addr_list[i]) != NULL; i++) {
NULL              696 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              188 ext/socket/socket.c     for (r = *res; r != NULL; r = r->ai_next) {
NULL              638 ext/socket/socket.c     error = getnameinfo(addr, SA_LEN(addr), buf, len, NULL, 0, NI_NUMERICHOST);
NULL              677 ext/socket/socket.c     ep = NULL;
NULL              692 ext/socket/socket.c 	return NULL;
NULL              760 ext/socket/socket.c     struct addrinfo* res = NULL;
NULL              842 ext/socket/socket.c 			    NULL, 0, 0);
NULL             1241 ext/socket/socket.c 	if (h->h_aliases != NULL) {
NULL             1697 ext/socket/socket.c     msg.msg_name = NULL;
NULL             1774 ext/socket/socket.c     msg.msg_name = NULL;
NULL             2690 ext/socket/socket.c     if (res0 == NULL) {
NULL             2760 ext/socket/socket.c     if (h == NULL) {
NULL             2772 ext/socket/socket.c     if (h->h_aliases != NULL) {
NULL             2833 ext/socket/socket.c 	hptr = NULL;
NULL             2841 ext/socket/socket.c 	pptr = NULL;
NULL             2899 ext/socket/socket.c     struct addrinfo hints, *res = NULL, *r;
NULL             2957 ext/socket/socket.c 	    hptr = NULL;
NULL             2967 ext/socket/socket.c 	    pptr = NULL;
NULL              646 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             1261 ext/syck/rubyext.c     if ( n->type_id != NULL )
NULL             1818 ext/syck/rubyext.c     if ( orig_n->type_id != NULL )
NULL             1822 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              152 ext/win32ole/win32ole.c static HINSTANCE ghhctrl = NULL;
NULL              153 ext/win32ole/win32ole.c static HINSTANCE gole32 = NULL;
NULL              154 ext/win32ole/win32ole.c static FNCOCREATEINSTANCEEX *gCoCreateInstanceEx = NULL;
NULL              477 ext/win32ole/win32ole.c     size = WideCharToMultiByte(cWIN32OLE_cp, 0, pw, -1, NULL, 0, NULL, NULL);
NULL              480 ext/win32ole/win32ole.c         WideCharToMultiByte(cWIN32OLE_cp, 0, pw, -1, pm, size, NULL, NULL);
NULL              494 ext/win32ole/win32ole.c     char *p_msg = NULL;
NULL              495 ext/win32ole/win32ole.c     char *term = NULL;
NULL              505 ext/win32ole/win32ole.c                             NULL, hr, LOCALE_SYSTEM_DEFAULT,
NULL              506 ext/win32ole/win32ole.c                             (LPTSTR)&p_msg, 0, NULL);
NULL              528 ext/win32ole/win32ole.c     char *pSource = NULL;
NULL              529 ext/win32ole/win32ole.c     char *pDescription = NULL;
NULL              531 ext/win32ole/win32ole.c     if(pExInfo->pfnDeferredFillIn != NULL) {
NULL              534 ext/win32ole/win32ole.c     if (pExInfo->bstrSource != NULL) {
NULL              537 ext/win32ole/win32ole.c     if (pExInfo->bstrDescription != NULL) {
NULL              547 ext/win32ole/win32ole.c     if(pSource != NULL) {
NULL              554 ext/win32ole/win32ole.c     if(pDescription != NULL) {
NULL              608 ext/win32ole/win32ole.c         hr = OleInitialize(NULL);
NULL              625 ext/win32ole/win32ole.c     while(PeekMessage(&msg,NULL,0,0,PM_REMOVE)) {
NULL              674 ext/win32ole/win32ole.c     size = MultiByteToWideChar(cWIN32OLE_cp, 0, pm, len, NULL, 0);
NULL              675 ext/win32ole/win32ole.c     pw = SysAllocStringLen(NULL, size - 1);
NULL              793 ext/win32ole/win32ole.c         if (psa == NULL)
NULL              809 ext/win32ole/win32ole.c         else if (psa != NULL)
NULL              871 ext/win32ole/win32ole.c         pole->pDispatch = NULL;
NULL              886 ext/win32ole/win32ole.c     pole->pDispatch = NULL;
NULL             1047 ext/win32ole/win32ole.c         if (pDispatch != NULL ) {
NULL             1067 ext/win32ole/win32ole.c         if(punk != NULL) {
NULL             1134 ext/win32ole/win32ole.c                             NULL, NULL, NULL, &ft);
NULL             1166 ext/win32ole/win32ole.c     char *pclsid = NULL;
NULL             1226 ext/win32ole/win32ole.c             typelib = reg_get_val(hversion, NULL);
NULL             1276 ext/win32ole/win32ole.c     char *pName = NULL;
NULL             1316 ext/win32ole/win32ole.c                     pName = NULL;
NULL             1353 ext/win32ole/win32ole.c         err = RegQueryValueEx(hpid, "", NULL, &dwtype, clsid, &len);
NULL             1409 ext/win32ole/win32ole.c     hr = gCoCreateInstanceEx(&clsid, NULL, clsctx, &serverinfo, 1, &multi_qi);
NULL             1452 ext/win32ole/win32ole.c     hr = pMoniker->lpVtbl->BindToObject(pMoniker, pBindCtx, NULL,
NULL             1644 ext/win32ole/win32ole.c                                                 &bstr, NULL, NULL, NULL);
NULL             1897 ext/win32ole/win32ole.c     hr = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER,
NULL             1984 ext/win32ole/win32ole.c     VARIANTARG* realargs = NULL;
NULL             1994 ext/win32ole/win32ole.c     op.dp.rgvarg = NULL;
NULL             1995 ext/win32ole/win32ole.c     op.dp.rgdispidNamedArgs = NULL;
NULL             2039 ext/win32ole/win32ole.c             op.pNamedArgs[i] = NULL;
NULL             2200 ext/win32ole/win32ole.c     VARIANTARG* realargs = NULL;
NULL             2518 ext/win32ole/win32ole.c     pBuf[0] = NULL;
NULL             2529 ext/win32ole/win32ole.c                                          NULL, &excepinfo, &argErr);
NULL             2558 ext/win32ole/win32ole.c     pole->pDispatch = NULL;
NULL             2570 ext/win32ole/win32ole.c     while(pEnum->lpVtbl->Next(pEnum, 1, &variant, NULL) == S_OK) {
NULL             2615 ext/win32ole/win32ole.c     IEnumVARIANT *pEnum = NULL;
NULL             2618 ext/win32ole/win32ole.c     dispParams.rgvarg = NULL;
NULL             2619 ext/win32ole/win32ole.c     dispParams.rgdispidNamedArgs = NULL;
NULL             2710 ext/win32ole/win32ole.c                                                  &bstr, NULL, NULL, NULL);
NULL             2721 ext/win32ole/win32ole.c         pFuncDesc=NULL;
NULL             2780 ext/win32ole/win32ole.c         pstr = NULL;
NULL             2786 ext/win32ole/win32ole.c                                                  &bstr, NULL, NULL, NULL);
NULL             2798 ext/win32ole/win32ole.c         pFuncDesc=NULL;
NULL             2856 ext/win32ole/win32ole.c                                              NULL, NULL, NULL);
NULL             2866 ext/win32ole/win32ole.c                                                 &bstr, NULL, NULL, NULL);
NULL             3004 ext/win32ole/win32ole.c                                              &bstr, NULL, NULL, NULL);
NULL             3059 ext/win32ole/win32ole.c     hr = ole_docinfo_from_type(pRefTypeInfo, &bstr, NULL, NULL, NULL);
NULL             3380 ext/win32ole/win32ole.c     poletype->pTypeInfo = NULL;
NULL             3420 ext/win32ole/win32ole.c                                                 &bstr, NULL, NULL, NULL);
NULL             3772 ext/win32ole/win32ole.c     hr = ole_docinfo_from_type(pTypeInfo, NULL, &bhelpstr, NULL, NULL);
NULL             3839 ext/win32ole/win32ole.c     hr = ole_docinfo_from_type(pTypeInfo, NULL, NULL, NULL, &bhelpfile);
NULL             3870 ext/win32ole/win32ole.c     hr = ole_docinfo_from_type(pTypeInfo, NULL, NULL,
NULL             3871 ext/win32ole/win32ole.c                                &helpcontext, NULL);
NULL             3918 ext/win32ole/win32ole.c         pstr = NULL;
NULL             3933 ext/win32ole/win32ole.c         pVarDesc = NULL;
NULL             4334 ext/win32ole/win32ole.c     pmethod->pTypeInfo = NULL;
NULL             4335 ext/win32ole/win32ole.c     pmethod->pOwnerTypeInfo = NULL;
NULL             4668 ext/win32ole/win32ole.c                                                         &bstr, NULL, NULL, NULL);
NULL             4729 ext/win32ole/win32ole.c         hr = ole_docinfo_from_type(pmethod->pTypeInfo, &name, NULL, NULL, NULL);
NULL             4765 ext/win32ole/win32ole.c     hr = ole_method_docinfo_from_type(pTypeInfo, method_index, NULL, &bhelpstring,
NULL             4766 ext/win32ole/win32ole.c                                       NULL, NULL);
NULL             4799 ext/win32ole/win32ole.c     hr = ole_method_docinfo_from_type(pTypeInfo, method_index, NULL, NULL,
NULL             4800 ext/win32ole/win32ole.c                                       NULL, &bhelpfile);
NULL             4833 ext/win32ole/win32ole.c     hr = ole_method_docinfo_from_type(pTypeInfo, method_index, NULL, NULL,
NULL             4834 ext/win32ole/win32ole.c                                       &helpcontext, NULL);
NULL             5351 ext/win32ole/win32ole.c         *ppv = NULL;
NULL             5391 ext/win32ole/win32ole.c     *pInfo = NULL;
NULL             5635 ext/win32ole/win32ole.c     if(pEv == NULL) return NULL;
NULL             5640 ext/win32ole/win32ole.c     pEv->pConnectionPoint = NULL;
NULL             5641 ext/win32ole/win32ole.c     pEv->pTypeInfo = NULL;
NULL             5642 ext/win32ole/win32ole.c     pEv->ptr_freed = NULL;
NULL             5649 ext/win32ole/win32ole.c     if(pEVObj != NULL) {
NULL             5732 ext/win32ole/win32ole.c                                                              NULL, NULL, NULL);
NULL             5799 ext/win32ole/win32ole.c         return find_iid(ole, NULL, piid, ppTypeInfo);
NULL             5869 ext/win32ole/win32ole.c     ITypeInfo *pti = NULL;
NULL             5870 ext/win32ole/win32ole.c     IConnectionPoint *pcp = NULL;
NULL             5894 ext/win32ole/win32ole.c     poleev->pEvent = NULL;
NULL              160 file.c             return Data_Wrap_Struct(klass, NULL, free, nst);
NULL              685 file.c         	               FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING,
NULL              686 file.c         	               rb_w32_iswin95() ? 0 : FILE_FLAG_BACKUP_SEMANTICS, NULL);
NULL             2400 file.c             char *last = NULL;
NULL             3469 file.c         	DATA_PTR(obj) = NULL;
NULL             4146 file.c             if (f == NULL) return 0;
NULL             2523 hash.c         	envtbl = rb_hash_s_new(0, NULL, rb_cHash);
NULL              369 io.c           	rb_thread_select(f + 1, &rfds, NULL, NULL, NULL);
NULL              397 io.c           	rb_thread_select(f + 1, NULL, &wfds, NULL, NULL);
NULL              517 io.c               of.f2 = NULL;
NULL              519 io.c               of.path = NULL;
NULL             1101 io.c               of.f2 = NULL;
NULL             2494 io.c               return NULL;		/* not reached */
NULL             2634 io.c               return NULL;		/* not reached */
NULL             2676 io.c               if (setvbuf(file, NULL, _IOFBF, 0) != 0)
NULL             2720 io.c               if (setvbuf(file, NULL, _IOFBF, 0) != 0)
NULL             3404 io.c           	    fptr->f2 = NULL;
NULL             3514 io.c               if (setvbuf(fptr->f, NULL, _IOFBF, 0) != 0)
NULL             5546 io.c           	{NULL, 0}
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               38 missing/os2.c      if ((shell = getenv("RUBYSHELL")) != NULL && *shell != '\0') {
NULL               47 missing/os2.c      } else if ((shell = getenv("SHELL")) != NULL && *shell != '\0') {
NULL               56 missing/os2.c      } else if ((shell = getenv("COMSPEC")) != NULL && *shell != '\0') {
NULL               86 missing/os2.c  	    status = spawnlp(P_WAIT,shell,shell,sw,cmd,(char*)NULL);
NULL              102 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              109 missing/vsnprintf.c #ifndef NULL
NULL              800 missing/vsnprintf.c 			if ((cp = va_arg(ap, char *)) == NULL)
NULL              810 missing/vsnprintf.c 				if (p != NULL) {
NULL             5123 parse.c        			if (yyvsp[-1].node == NULL)
NULL             6495 parse.c        static char *tokenbuf = NULL;
NULL             7320 parse.c        	    if ((c = tokadd_string(func, '\n', 0, NULL)) == -1) goto error;
NULL             10273 parse.c            if (ptr && (n = parser_heap) != NULL) {
NULL             10280 parse.c        	} while ((n = n->u2.node) != NULL);
NULL             1471 parse.y        			if ($3 == NULL)
NULL             2497 parse.y        static char *tokenbuf = NULL;
NULL             3322 parse.y        	    if ((c = tokadd_string(func, '\n', 0, NULL)) == -1) goto error;
NULL             6275 parse.y            if (ptr && (n = parser_heap) != NULL) {
NULL             6282 parse.y        	} while ((n = n->u2.node) != NULL);
NULL              580 process.c          result = wait4(pid, st, flags, NULL);
NULL              599 process.c      	st_delete(pid_tbl, (st_data_t*)&pid, NULL);
NULL              959 process.c      	if ((extension = strrchr(prog, '.')) != NULL && strcasecmp(extension, ".bat") == 0) {
NULL             1045 process.c      		execl(shell, "sh", "-c", str, (char *) NULL);
NULL             1053 process.c      	    execl("/bin/sh", "sh", "-c", str, (char *)NULL);
NULL             1064 process.c      	while (t = strtok(NULL, " \t")) {
NULL             1067 process.c      	*a = NULL;
NULL             1094 process.c          if ((extension = strrchr(prog, '.')) != NULL && strcasecmp(extension, ".bat") == 0) {
NULL             1165 process.c      	    status = shell?spawnl(P_WAIT,shell,"sh","-c",str,(char*)NULL):system(str);
NULL             1174 process.c      	while (t = strtok(NULL, " \t"))
NULL             1176 process.c      	*a = NULL;
NULL             1742 process.c          ioctl(fd, TIOCNOTTY, NULL);
NULL             2488 process.c      		if (gr == NULL)
NULL             3456 process.c          S_Tms = rb_struct_define("Tms", "utime", "stime", "cutime", "cstime", NULL);
NULL              424 range.c        	range_each_func(range, each_i, beg, end, NULL);
NULL              643 re.c               if (err != NULL) {
NULL              854 re.c           	if (err != NULL) {
NULL              267 regex.c        #ifndef NULL
NULL              761 regex.c          if (start == NULL) {
NULL             1018 regex.c          if (start == NULL) return 0;
NULL              101 ruby.c         NULL
NULL              243 ruby.c             HMODULE libruby = NULL;
NULL              849 ruby.c         	if (fp == NULL) {
NULL              986 ruby.c             if (!environ || (s = environ[0]) == NULL) return;
NULL             1053 ruby.c         	    ruby_setenv("", NULL); /* duplicate environ vars */
NULL               55 rubyio.h           fp->f = fp->f2 = NULL;\
NULL               59 rubyio.h           fp->path = NULL;\
NULL              168 signal.c           {NULL, 0}
NULL              654 signal.c           sigprocmask(SIG_SETMASK, &arg->mask, NULL);
NULL              668 signal.c           sigprocmask(SIG_SETMASK, &trap_last_mask, NULL);
NULL              808 signal.c           sigprocmask(SIG_SETMASK, &mask, NULL);
NULL              524 time.c                     (tm = (utc_p ? gmtime : localtime)(&guess)) != NULL) {
NULL              936 util.c             if (endPtr != NULL) {
NULL               33 vms/vmsruby_private.c     itemlist[i].retlen = NULL;
NULL               71 win32/win32.c  # define CreateSignal() CreateEvent(NULL, FALSE, FALSE, NULL);
NULL              238 win32/win32.c      static HANDLE current_process_handle = NULL;
NULL              246 win32/win32.c  	return NULL;
NULL              327 win32/win32.c      static asynchronous_func_t locker = NULL;
NULL              340 win32/win32.c  			      (VALUE)_get_osfhandle(fd), oper, NULL,
NULL              381 win32/win32.c      if (NTLoginName == NULL) {
NULL              412 win32/win32.c      return NULL;
NULL              424 win32/win32.c      return NULL;
NULL              431 win32/win32.c      child->hProcess = NULL;
NULL              442 win32/win32.c  	    child->hProcess = NULL;
NULL              446 win32/win32.c      return NULL;
NULL              609 win32/win32.c      sa.lpSecurityDescriptor = NULL;
NULL              612 win32/win32.c      hWriteIn = hReadOut = NULL;
NULL              657 win32/win32.c  	child = CreateChild(cmd, NULL, &sa, hWriteIn, hReadOut, NULL);
NULL              686 win32/win32.c  	    if ((*fpr = (FILE *)fdopen(fd, modes)) == NULL) {
NULL              705 win32/win32.c  	    if ((*fpw = (FILE *)fdopen(fd, modes)) == NULL) {
NULL              734 win32/win32.c      child = CreateChild(cmd, NULL, NULL, NULL, NULL, NULL);
NULL              825 win32/win32.c      child = CreateChild(cmd, prog, NULL, NULL, NULL, NULL);
NULL              857 win32/win32.c      char *p = NULL;
NULL              861 win32/win32.c  	return NULL;
NULL              867 win32/win32.c  	return NULL;
NULL              872 win32/win32.c  	sa.lpSecurityDescriptor = NULL;
NULL              905 win32/win32.c  	if (!(p = dln_find_exe(prog, NULL))) {
NULL              937 win32/win32.c  	    shell = NULL;
NULL              941 win32/win32.c  		    p = dln_find_exe(cmd, NULL);
NULL              958 win32/win32.c  		    p = dln_find_exe(p, NULL);
NULL              976 win32/win32.c  			     psa->bInheritHandle, dwCreationFlags, NULL, NULL,
NULL              983 win32/win32.c  	return NULL;
NULL             1128 win32/win32.c      NtCmdLineElement *cmdhead = NULL, **cmdtail = &cmdhead;
NULL             1137 win32/win32.c  	*vec = NULL;
NULL             1374 win32/win32.c  	return NULL;
NULL             1379 win32/win32.c  	return NULL;
NULL             1387 win32/win32.c      if (p == NULL)
NULL             1388 win32/win32.c  	return NULL;
NULL             1396 win32/win32.c      if (index("/\\:", *CharPrev(scanname, scanname + strlen(scanname))) == NULL)
NULL             1408 win32/win32.c  	return NULL;
NULL             1438 win32/win32.c  	if (p->start == NULL) {
NULL             1484 win32/win32.c  	    dirp->curr = NULL;
NULL             1490 win32/win32.c  	return NULL;
NULL             1606 win32/win32.c      hF = CreateFile("NUL", 0, 0, NULL, OPEN_ALWAYS, 0, NULL);
NULL             1706 win32/win32.c  			  buffer, 512, NULL) == 0) {
NULL             1716 win32/win32.c      while ((p = strpbrk(p, "\r\n")) != NULL) {
NULL             2273 win32/win32.c  	if (r == NULL)
NULL             2290 win32/win32.c  	if (r == NULL)
NULL             2324 win32/win32.c  	if (r == NULL)
NULL             2341 win32/win32.c  	if (r == NULL)
NULL             2358 win32/win32.c  	if (r == NULL)
NULL             2375 win32/win32.c  	if (r == NULL)
NULL             2390 win32/win32.c  struct netent *getnetent (void) {return (struct netent *) NULL;}
NULL             2392 win32/win32.c  struct netent *getnetbyaddr(long net, int type) {return (struct netent *)NULL;}
NULL             2394 win32/win32.c  struct netent *getnetbyname(char *name) {return (struct netent *)NULL;}
NULL             2396 win32/win32.c  struct protoent *getprotoent (void) {return (struct protoent *) NULL;}
NULL             2398 win32/win32.c  struct servent *getservent (void) {return (struct servent *) NULL;}
NULL             2567 win32/win32.c      if (getcwd(buffer, size) == NULL) {
NULL             2568 win32/win32.c          return NULL;
NULL             2572 win32/win32.c          return NULL;
NULL             2615 win32/win32.c  	    if (hProc == NULL || hProc == INVALID_HANDLE_VALUE) {
NULL             2645 win32/win32.c  	    if (hProc == NULL || hProc == INVALID_HANDLE_VALUE) {
NULL             2676 win32/win32.c      static BOOL (WINAPI *pCreateHardLink)(LPCTSTR, LPCTSTR, LPSECURITY_ATTRIBUTES) = NULL;
NULL             2699 win32/win32.c      if (!pCreateHardLink(to, from, NULL)) {
NULL             2716 win32/win32.c      static char *curitem = NULL;
NULL             2720 win32/win32.c      if (curitem == NULL || curlen == 0) {
NULL             2734 win32/win32.c  	return NULL;
NULL             3118 win32/win32.c      static HANDLE interrupt_done = NULL;
NULL             3141 win32/win32.c  	    interrupt_done = CreateEvent(NULL, FALSE, FALSE, NULL);
NULL             3181 win32/win32.c      RUBY_CRITICAL(ret = wait_events(NULL, msec));
NULL             3191 win32/win32.c      RUBY_CRITICAL(wait_events(NULL, 0));
NULL             3274 win32/win32.c  	arg.stackaddr = NULL;
NULL             3281 win32/win32.c  	thr = CreateThread(NULL, 0, call_asynchronous, &arg, 0, &val);
NULL             3357 win32/win32.c      *myenv = NULL;
NULL             3476 win32/win32.c  	    if (!SetFileTime(hFile, NULL, &atime, &mtime)) {
NULL             3512 win32/win32.c  	if (CreateDirectory(path, NULL) == FALSE) {
NULL             3601 win32/win32.c      if (f == NULL && errno == 0) {
NULL             3612 win32/win32.c      if (f == NULL && errno == 0) {
NULL             3625 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 );


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           513 ext/dl/sym.c         ANY2C(args[i]) = DLCHAR(NUM2CHR(argv[i]));
NUM2CHR           517 ext/dl/sym.c         ANY2C(dargs[i]) = DLCHAR(NUM2CHR(argv[i]));
NUM2CHR          1059 ext/stringio/stringio.c     int c = NUM2CHR(ch);
NUM2CHR          5477 ext/win32ole/win32ole.c             *V_UI1REF(var) = NUM2CHR(val);
NUM2CHR          2785 ext/zlib/zlib.c     char c = NUM2CHR(ch);
NUM2CHR          3031 ext/zlib/zlib.c     gzfile_ungetc(gz, NUM2CHR(ch));
NUM2CHR          3300 file.c             cmd = NUM2CHR(argv[0]);
NUM2CHR          3745 io.c               char c = NUM2CHR(ch);


NUM2DBL

NUM2DBL          1140 ext/tk/tcltklib.c         tcl_time.usec = (long)(NUM2DBL(RARRAY(divmod)->ptr[1]) * 1000000);
NUM2DBL           827 ext/win32ole/win32ole.c         V_R8(var) = NUM2DBL(val);
NUM2DBL          5504 ext/win32ole/win32ole.c             *V_R4REF(var) = (float)NUM2DBL(val);
NUM2DBL          5507 ext/win32ole/win32ole.c             *V_R8REF(var) = NUM2DBL(val);
NUM2DBL          1472 numeric.c      	double beg = NUM2DBL(from);
NUM2DBL          1473 numeric.c      	double end = NUM2DBL(to);
NUM2DBL          1474 numeric.c      	double unit = NUM2DBL(step);
NUM2DBL          1274 time.c             double v = NUM2DBL(offset);


NUM2INT

NUM2INT           725 bignum.c           else base = NUM2INT(b);
NUM2INT          1816 bignum.c           int shift = NUM2INT(y);
NUM2INT          1852 bignum.c           int shift = NUM2INT(y);
NUM2INT          1922 bignum.c           shift = NUM2INT(y);
NUM2INT           756 dir.c          	mode = NUM2INT(vmode);
NUM2INT          1363 dir.c          	flags = NUM2INT(rflags);
NUM2INT          1503 dir.c          	flags = NUM2INT(rflags);
NUM2INT          1387 eval.c             return NUM2INT(st);
NUM2INT          1528 eval.c         	return NUM2INT(st);
NUM2INT          4392 eval.c         	    istatus = NUM2INT(status);
NUM2INT          6184 eval.c             else lev = NUM2INT(level);
NUM2INT          6415 eval.c         	line = NUM2INT(vline);
NUM2INT          6555 eval.c         	    if (argc > 2) line = NUM2INT(argv[2]);
NUM2INT          9869 eval.c             int level = NUM2INT(val);
NUM2INT          11285 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           298 ext/dl/dl.c          ary[i] = (long)(NUM2INT(e));
NUM2INT           327 ext/dl/dl.c          ary[i] = (int)(NUM2INT(e));
NUM2INT           356 ext/dl/dl.c          ary[i] = (short)(NUM2INT(e));
NUM2INT           385 ext/dl/dl.c          ary[i] = (char)(NUM2INT(e));
NUM2INT           210 ext/dl/dl.h    # define DLNUM2LONG(x) (long)(NUM2INT(x))
NUM2INT            60 ext/dl/handle.c     cflag = NUM2INT(flag);
NUM2INT           232 ext/dl/ptr.c       s = NUM2INT(size);
NUM2INT           235 ext/dl/ptr.c       s = NUM2INT(size);
NUM2INT           320 ext/dl/ptr.c       n = NUM2INT(size);
NUM2INT           429 ext/dl/ptr.c       len = NUM2INT(arg1);
NUM2INT           452 ext/dl/ptr.c       len = NUM2INT(arg1);
NUM2INT           529 ext/dl/ptr.c       if (NUM2INT(data_type) == DLPTR_CTYPE_UNKNOWN) {
NUM2INT           548 ext/dl/ptr.c     t = NUM2INT(data_type);
NUM2INT           873 ext/dl/ptr.c         long n = NUM2INT(num);
NUM2INT           332 ext/dl/sym.c     errno = NUM2INT(val);
NUM2INT           350 ext/dl/sym.c       SetLastError(NUM2INT(val));
NUM2INT           523 ext/dl/sym.c         ANY2H(args[i]) = DLSHORT(NUM2INT(argv[i]));
NUM2INT           527 ext/dl/sym.c         ANY2H(dargs[i]) = DLSHORT(NUM2INT(argv[i]));
NUM2INT           533 ext/dl/sym.c         ANY2I(args[i]) = DLINT(NUM2INT(argv[i]));
NUM2INT           537 ext/dl/sym.c         ANY2I(dargs[i]) = DLINT(NUM2INT(argv[i]));
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           762 ext/iconv/iconv.c 			 NIL_P(n1) ? 0 : NUM2INT(n1),
NUM2INT           763 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           316 ext/openssl/ossl_cipher.c     int len = NUM2INT(key_length);
NUM2INT           330 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           382 ext/openssl/ossl_ssl.c     verify_mode = NIL_P(val) ? SSL_VERIFY_NONE : NUM2INT(val);
NUM2INT           627 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           508 ext/readline/readline.c     i = NUM2INT(index);
NUM2INT           530 ext/readline/readline.c     i = NUM2INT(index);
NUM2INT           662 ext/readline/readline.c     i = NUM2INT(index);
NUM2INT           106 ext/sdbm/init.c 	mode = NUM2INT(vmode);
NUM2INT           226 ext/socket/socket.c     VALUE sock = init_sock(rb_obj_alloc(klass), NUM2INT(fd));
NUM2INT           250 ext/socket/socket.c 	how = NUM2INT(howto);
NUM2INT           356 ext/socket/socket.c     level = NUM2INT(lev);
NUM2INT           357 ext/socket/socket.c     option = NUM2INT(optname);
NUM2INT           435 ext/socket/socket.c     level = NUM2INT(lev);
NUM2INT           436 ext/socket/socket.c     option = NUM2INT(optname);
NUM2INT           503 ext/socket/socket.c 	n = sendto(fd, RSTRING(mesg)->ptr, RSTRING(mesg)->len, NUM2INT(flags),
NUM2INT           509 ext/socket/socket.c 	n = send(fd, RSTRING(mesg)->ptr, RSTRING(mesg)->len, NUM2INT(flags));
NUM2INT           552 ext/socket/socket.c     else             flags = NUM2INT(flg);
NUM2INT           553 ext/socket/socket.c     buflen = NUM2INT(len);
NUM2INT          1502 ext/socket/socket.c 	socktype = NUM2INT(arg);
NUM2INT          1597 ext/socket/socket.c 	n = sendto(fileno(f), RSTRING(mesg)->ptr, RSTRING(mesg)->len, NUM2INT(flags),
NUM2INT          1978 ext/socket/socket.c 	*dv = NUM2INT(domain);
NUM2INT          2009 ext/socket/socket.c 	*tv = NUM2INT(type);
NUM2INT          2022 ext/socket/socket.c     fd = ruby_socket(d, t, NUM2INT(protocol));
NUM2INT          2037 ext/socket/socket.c     if (socketpair(d, t, NUM2INT(protocol), sp) < 0) {
NUM2INT          2372 ext/socket/socket.c     backlog = NUM2INT(log);
NUM2INT          2752 ext/socket/socket.c 	t = NUM2INT(type);
NUM2INT          2872 ext/socket/socket.c 	hints.ai_socktype = NUM2INT(socktype);
NUM2INT          2875 ext/socket/socket.c 	hints.ai_protocol = NUM2INT(protocol);
NUM2INT          2878 ext/socket/socket.c 	hints.ai_flags = NUM2INT(flags);
NUM2INT          2910 ext/socket/socket.c 	fl = NUM2INT(flags);
NUM2INT           759 ext/stringio/stringio.c     int cc = NUM2INT(ch);
NUM2INT           383 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           819 ext/win32ole/win32ole.c         V_I4(var) = NUM2INT(val);
NUM2INT          1732 ext/win32ole/win32ole.c                     0x0f, NUM2INT(helpcontext));
NUM2INT          1735 ext/win32ole/win32ole.c                  0,  NUM2INT(helpcontext));
NUM2INT          2024 ext/win32ole/win32ole.c         cNamedArgs = NUM2INT(rb_funcall(param, rb_intern("length"), 0));
NUM2INT          2358 ext/win32ole/win32ole.c     hr = pole->pDispatch->lpVtbl->Invoke(pole->pDispatch, NUM2INT(dispid),
NUM2INT          5480 ext/win32ole/win32ole.c             *V_I2REF(var) = (short)NUM2INT(val);
NUM2INT          5483 ext/win32ole/win32ole.c             *V_I4REF(var) = NUM2INT(val);
NUM2INT          5486 ext/win32ole/win32ole.c             *V_R4REF(var) = (float)NUM2INT(val);
NUM2INT          5489 ext/win32ole/win32ole.c             *V_R8REF(var) = NUM2INT(val);
NUM2INT          5498 ext/win32ole/win32ole.c             *V_I2REF(var) = (short)NUM2INT(val);
NUM2INT          5501 ext/win32ole/win32ole.c             *V_I4REF(var) = NUM2INT(val);
NUM2INT          5981 ext/win32ole/win32ole.c         = NUM2INT(rb_funcall(ary_ole_event, rb_intern("length"), 0));
NUM2INT          2460 ext/zlib/zlib.c     gz->lineno = NUM2INT(lineno);
NUM2INT          2970 ext/zlib/zlib.c     len = NUM2INT(vlen);
NUM2INT          1724 file.c             mode = NUM2INT(vmode);
NUM2INT          1751 file.c             mode = NUM2INT(vmode);
NUM2INT          1798 file.c             mode = NUM2INT(vmode);
NUM2INT          1859 file.c         	arg.owner = NUM2INT(o);
NUM2INT          1865 file.c         	arg.group = NUM2INT(g);
NUM2INT          1895 file.c             o = NIL_P(owner) ? -1 : NUM2INT(owner);
NUM2INT          1896 file.c             g = NIL_P(group) ? -1 : NUM2INT(group);
NUM2INT          1949 file.c         	arg.owner = NUM2INT(o);
NUM2INT          1955 file.c         	arg.group = NUM2INT(g);
NUM2INT          2276 file.c         	omask = umask(NUM2INT(argv[0]));
NUM2INT          3177 file.c             op = NUM2INT(operation);
NUM2INT           706 io.c           	whence = NUM2INT(ptrname);
NUM2INT          1709 io.c               fptr->lineno = NUM2INT(lineno);
NUM2INT          1719 io.c               gets_lineno = NUM2INT(val);
NUM2INT          1727 io.c               gets_lineno = NUM2INT(val);
NUM2INT          1988 io.c               int cc = NUM2INT(c);
NUM2INT          2302 io.c           	whence = NUM2INT(ptrname);
NUM2INT          3132 io.c           	fmode = NIL_P(perm) ? 0666 :  NUM2INT(perm);
NUM2INT          3201 io.c               else             fmode = NUM2INT(perm);
NUM2INT          4061 io.c               fd = NUM2INT(fnum);
NUM2INT           740 marshal.c      	if (!NIL_P(a2)) limit = NUM2INT(a2);
NUM2INT           419 math.c             return rb_float_new(ldexp(RFLOAT(x)->value, NUM2INT(n)));
NUM2INT          1952 numeric.c          else base = NUM2INT(b);
NUM2INT           876 pack.c         		l = NUM2INT(from);
NUM2INT           956 pack.c         			c = NUM2INT(RARRAY(from)->ptr[1]) | 0x80; /* mod */
NUM2INT           275 process.c          status = NUM2INT(st);
NUM2INT           348 process.c          int status = NUM2INT(st1) & NUM2INT(st2);
NUM2INT           370 process.c          int status = NUM2INT(st1) >> NUM2INT(st2);
NUM2INT           389 process.c          int status = NUM2INT(st);
NUM2INT           410 process.c          int status = NUM2INT(st);
NUM2INT           430 process.c          int status = NUM2INT(st);
NUM2INT           452 process.c          int status = NUM2INT(st);
NUM2INT           473 process.c          int status = NUM2INT(st);
NUM2INT           505 process.c          int status = NUM2INT(st);
NUM2INT           525 process.c          int status = NUM2INT(st);
NUM2INT           546 process.c          int status = NUM2INT(st);
NUM2INT           736 process.c      	pid = NUM2INT(vpid);
NUM2INT           906 process.c          return rb_detach_process(NUM2INT(pid));
NUM2INT          1335 process.c      	    istatus = NUM2INT(status);
NUM2INT          1541 process.c          status = NUM2INT(rb_last_status);
NUM2INT          1668 process.c          i = getpgid(NUM2INT(pid));
NUM2INT          1693 process.c          ipid = NUM2INT(pid);
NUM2INT          1694 process.c          ipgrp = NUM2INT(pgrp);
NUM2INT          1777 process.c          iwhich = NUM2INT(which);
NUM2INT          1778 process.c          iwho   = NUM2INT(who);
NUM2INT          1810 process.c          iwhich = NUM2INT(which);
NUM2INT          1811 process.c          iwho   = NUM2INT(who);
NUM2INT          1812 process.c          iprio  = NUM2INT(prio);
NUM2INT          1869 process.c          if (setuid(NUM2INT(id)) != 0) rb_sys_fail(0);
NUM2INT          1893 process.c          if (setruid(NUM2INT(id)) != 0) rb_sys_fail(0);
NUM2INT          1916 process.c          if (seteuid(NUM2INT(id)) != 0) rb_sys_fail(0);
NUM2INT          1941 process.c          if (setreuid(NUM2INT(rid),NUM2INT(eid)) != 0) rb_sys_fail(0);
NUM2INT          1966 process.c          if (setresuid(NUM2INT(rid),NUM2INT(eid),NUM2INT(sid)) != 0) rb_sys_fail(0);
NUM2INT          2006 process.c          int uid = NUM2INT(id);
NUM2INT          2065 process.c          uid = NUM2INT(id);
NUM2INT          2213 process.c          if (setgid(NUM2INT(id)) != 0) rb_sys_fail(0);
NUM2INT          2236 process.c          if (setrgid(NUM2INT(id)) != 0) rb_sys_fail(0);
NUM2INT          2260 process.c          if (setegid(NUM2INT(id)) != 0) rb_sys_fail(0);
NUM2INT          2285 process.c          if (setregid(NUM2INT(rid),NUM2INT(eid)) != 0) rb_sys_fail(0);
NUM2INT          2309 process.c          if (setresgid(NUM2INT(rid),NUM2INT(eid),NUM2INT(sid)) != 0) rb_sys_fail(0);
NUM2INT          2378 process.c          int gid = NUM2INT(id);
NUM2INT          2484 process.c      		groups[i] = NUM2INT(g);
NUM2INT          2530 process.c          if (initgroups(StringValuePtr(uname), (rb_gid_t)NUM2INT(base_grp)) != 0) {
NUM2INT          2615 process.c          gid = NUM2INT(id);
NUM2INT          2782 process.c          if (setresuid(-1, NUM2INT(euid), -1) < 0) rb_sys_fail(0);
NUM2INT          2784 process.c          if (setreuid(-1, NUM2INT(euid)) < 0) rb_sys_fail(0);
NUM2INT          2786 process.c          if (seteuid(NUM2INT(euid)) < 0) rb_sys_fail(0);
NUM2INT          2788 process.c          euid = NUM2INT(euid);
NUM2INT          2855 process.c          return rb_seteuid_core(NUM2INT(id));
NUM2INT          2896 process.c          if (setresgid(-1, NUM2INT(egid), -1) < 0) rb_sys_fail(0);
NUM2INT          2898 process.c          if (setregid(-1, NUM2INT(egid)) < 0) rb_sys_fail(0);
NUM2INT          2900 process.c          if (setegid(NUM2INT(egid)) < 0) rb_sys_fail(0);
NUM2INT          2902 process.c          egid = NUM2INT(egid);
NUM2INT          2969 process.c          return rb_setegid_core(NUM2INT(id));
NUM2INT           738 re.c               int i = NUM2INT(n);
NUM2INT           767 re.c               int i = NUM2INT(n);
NUM2INT           795 re.c               int i = NUM2INT(n);
NUM2INT          2205 re.c           	return rb_reg_nth_match(NUM2INT(nth), rb_backref_get());
NUM2INT           286 ruby.h                              RSTRING(x)->ptr[0]:(char)(NUM2INT(x)&0xff))
NUM2INT           283 signal.c       	    int pid = NUM2INT(argv[i]);
NUM2INT           132 sprintf.c          val = NUM2INT(tmp); \
NUM2INT           394 sprintf.c      		c = NUM2INT(val) & 0xff;
NUM2INT          1618 string.c       	    return rb_str_subpat(str, argv[0], NUM2INT(argv[1]));
NUM2INT          1810 string.c       	    rb_str_subpat_set(str, argv[0], NUM2INT(argv[1]), argv[2]);
NUM2INT          2499 string.c           else base = NUM2INT(b);
NUM2INT          3480 string.c       	lim = NUM2INT(limit);
NUM2INT          4429 string.c           else bits = NUM2INT(vbits);
NUM2INT           742 win32/win32.c  	return NUM2INT(rb_last_status);
NUM2INT           833 win32/win32.c  	return NUM2INT(rb_last_status);


NUM2LL

NUM2LL           1694 numeric.c      	  return NUM2LL(val);
NUM2LL            272 ruby.h         # define NUM2OFFT(x) ((off_t)NUM2LL(x))


NUM2LONG

NUM2LONG          289 array.c            len = NUM2LONG(size);
NUM2LONG          663 array.c        	beg = NUM2LONG(argv[0]);
NUM2LONG          664 array.c        	len = NUM2LONG(argv[1]);
NUM2LONG          690 array.c            return rb_ary_entry(ary, NUM2LONG(arg));
NUM2LONG          712 array.c            return rb_ary_entry(ary, NUM2LONG(pos));
NUM2LONG          745 array.c        	n = NUM2LONG(nv);
NUM2LONG          781 array.c        	n = NUM2LONG(nv);
NUM2LONG          826 array.c            idx = NUM2LONG(pos);
NUM2LONG         1046 array.c        	rb_ary_splice(ary, NUM2LONG(argv[0]), NUM2LONG(argv[1]), argv[2]);
NUM2LONG         1065 array.c            offset = NUM2LONG(argv[0]);
NUM2LONG         1095 array.c            pos = NUM2LONG(argv[0]);
NUM2LONG         1762 array.c        	rb_ary_push(result, (*func)(obj, NUM2LONG(argv[i])));
NUM2LONG         1915 array.c            return rb_ary_delete_at(ary, NUM2LONG(pos));
NUM2LONG         1953 array.c        	pos = NUM2LONG(arg1);
NUM2LONG         1954 array.c        	len = NUM2LONG(arg2);
NUM2LONG         1968 array.c            return rb_ary_delete_at(ary, NUM2LONG(arg1));
NUM2LONG         2249 array.c        	beg = NIL_P(arg1) ? 0 : NUM2LONG(arg1);
NUM2LONG         2254 array.c        	len = NIL_P(arg2) ? RARRAY(ary)->len - beg : NUM2LONG(arg2);
NUM2LONG         2363 array.c            len = NUM2LONG(times);
NUM2LONG         2530 array.c        	h ^= NUM2LONG(n);
NUM2LONG          894 error.c        	if (!NIL_P(error) && st_lookup(syserr_tbl, NUM2LONG(error), &klass)) {
NUM2LONG          906 error.c            if (!NIL_P(error)) err = strerror(NUM2LONG(error));
NUM2LONG           57 ext/curses/curses.c #define NUM2CH NUM2LONG
NUM2LONG          207 ext/dl/dl.h    # define DLNUM2LONG(x) (long)(NUM2LONG(x))
NUM2LONG          106 ext/enumerator/enumerator.c     long size = NUM2LONG(n);
NUM2LONG          178 ext/enumerator/enumerator.c     long size = NUM2LONG(n);
NUM2LONG           74 ext/openssl/ossl_asn1.c     return (time_t)NUM2LONG(rb_Integer(time));
NUM2LONG          388 ext/openssl/ossl_ssl.c     if(!NIL_P(val)) SSL_CTX_set_timeout(ctx, NUM2LONG(val));
NUM2LONG          391 ext/openssl/ossl_ssl.c     if(!NIL_P(val)) SSL_CTX_set_verify_depth(ctx, NUM2LONG(val));
NUM2LONG          394 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          695 ext/socket/socket.c 	long i = NUM2LONG(host);
NUM2LONG         2970 ext/socket/socket.c 	    snprintf(pbuf, sizeof(pbuf), "%ld", NUM2LONG(port));
NUM2LONG          539 ext/stringio/stringio.c     StringIO(self)->lineno = NUM2LONG(lineno);
NUM2LONG          602 ext/stringio/stringio.c     long p = NUM2LONG(pos);
NUM2LONG          647 ext/stringio/stringio.c     offset = NUM2LONG(argv[0]);
NUM2LONG          648 ext/stringio/stringio.c     switch (NIL_P(whence) ? 0 : NUM2LONG(whence)) {
NUM2LONG          658 ext/stringio/stringio.c 	rb_raise(rb_eArgError, "invalid whence %ld", NUM2LONG(whence));
NUM2LONG         1104 ext/stringio/stringio.c 	    len = olen = NUM2LONG(argv[0]);
NUM2LONG         1228 ext/stringio/stringio.c     long l = NUM2LONG(len);
NUM2LONG          757 ext/strscan/strscan.c     len = NUM2LONG(vlen);
NUM2LONG          984 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         1180 io.c               if ((len = NUM2LONG(length)) < 0) {
NUM2LONG         1329 io.c               len = NUM2LONG(length);
NUM2LONG         2388 io.c               ilen = NUM2LONG(len);
NUM2LONG         4737 io.c           	    narg = NUM2LONG(arg);
NUM2LONG         4888 io.c               arg[0] = NUM2LONG(argv[0]); argv++;
NUM2LONG         4898 io.c           	    arg[i] = (unsigned long)NUM2LONG(*argv);
NUM2LONG         5273 io.c           	len = NUM2LONG(argv[0]);
NUM2LONG         1534 numeric.c      	return NUM2LONG(val);
NUM2LONG         1793 numeric.c          long i = NUM2LONG(num);
NUM2LONG         2385 numeric.c          val = FIX2LONG(x) & NUM2LONG(y);
NUM2LONG         2405 numeric.c          val = FIX2LONG(x) | NUM2LONG(y);
NUM2LONG         2425 numeric.c          val = FIX2LONG(x) ^ NUM2LONG(y);
NUM2LONG         2444 numeric.c          val = NUM2LONG(x);
NUM2LONG         2445 numeric.c          width = NUM2LONG(y);
NUM2LONG         2469 numeric.c          i = NUM2LONG(y);
NUM2LONG         2513 numeric.c          i = NUM2LONG(idx);
NUM2LONG          963 pack.c         		    long l = NUM2LONG(from);
NUM2LONG          277 process.c          snprintf(buf, sizeof(buf), "#<%s: pid=%ld", rb_class2name(CLASS_OF(st)), NUM2LONG(pid));
NUM2LONG          312 range.c            unit = NUM2LONG(step);
NUM2LONG          475 range.c            beg = b = NUM2LONG(rb_ivar_get(range, id_beg));
NUM2LONG          476 range.c            end = e = NUM2LONG(rb_ivar_get(range, id_end));
NUM2LONG          259 ruby.h         #define NUM2INT(x) ((int)NUM2LONG(x))
NUM2LONG          274 ruby.h         # define NUM2OFFT(x) NUM2LONG(x)
NUM2LONG          418 string.c           len = NUM2LONG(times);
NUM2LONG         1108 string.c       	pos = NUM2LONG(initpos);
NUM2LONG         1222 string.c       	pos = NUM2LONG(position);
NUM2LONG         1556 string.c       	idx = NUM2LONG(indx);
NUM2LONG         1620 string.c       	return rb_str_substr(str, NUM2LONG(argv[0]), NUM2LONG(argv[1]));
NUM2LONG         1772 string.c       	idx = NUM2LONG(indx);
NUM2LONG         1813 string.c       	    rb_str_splice(str, NUM2LONG(argv[0]), NUM2LONG(argv[1]), argv[2]);
NUM2LONG         1844 string.c           long pos = NUM2LONG(idx);
NUM2LONG         4481 string.c           width = NUM2LONG(w);
NUM2LONG          615 struct.c           i = NUM2LONG(idx);
NUM2LONG          681 struct.c           i = NUM2LONG(idx);
NUM2LONG          825 struct.c       	h ^= NUM2LONG(n);
NUM2LONG          201 time.c         	t.tv_sec = NUM2LONG(time);
NUM2LONG          262 time.c         	tv.tv_sec = NUM2LONG(time);
NUM2LONG          263 time.c         	tv.tv_usec = NUM2LONG(t);
NUM2LONG          292 time.c             return NUM2LONG(obj);


NUM2OFFT

NUM2OFFT          468 dir.c              off_t p = NUM2OFFT(pos);
NUM2OFFT         3014 file.c             pos = NUM2OFFT(len);
NUM2OFFT         3070 file.c             pos = NUM2OFFT(len);
NUM2OFFT          666 io.c               pos = NUM2OFFT(offset);
NUM2OFFT          730 io.c               pos = NUM2OFFT(offset);
NUM2OFFT         2304 io.c               pos = NUM2OFFT(offset);


NUM2UINT

NUM2UINT          708 ext/curses/curses.c   return INT2NUM(mousemask(NUM2UINT(mask),NULL));
NUM2UINT          738 process.c      	    flags = NUM2UINT(vflags);


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         189 ext/openssl/ossl_x509name.c     else iflag = NUM2ULONG(flag);
NUM2ULONG          82 ext/racc/cparse/cparse.c     return (ID)NUM2ULONG(v);
NUM2ULONG         271 ext/zlib/zlib.c 	sum = NUM2ULONG(vsum);
NUM2ULONG         627 file.c         	    sprintf(buf, "0%lo", NUM2ULONG(v));
NUM2ULONG         633 file.c         	    sprintf(buf, "0x%lx", NUM2ULONG(v));
NUM2ULONG        1887 gc.c               p0 = ptr = NUM2ULONG(id);
NUM2ULONG        4716 io.c               int cmd = NUM2ULONG(req);
NUM2ULONG         260 ruby.h         #define NUM2UINT(x) ((unsigned int)NUM2ULONG(x))


NUMCHAR_OPTION

NUMCHAR_OPTION    399 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION    945 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   1016 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   1515 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   1581 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   1678 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   1850 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   1955 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   2287 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   2466 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   2555 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   2687 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   2744 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   2770 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   2896 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   2955 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   3804 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   4761 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION


NUM_NONREG_ITEMS

NUM_NONREG_ITEMS 3372 regex.c        #define MAX_NUM_FAILURE_ITEMS   (num_regs * NUM_REG_ITEMS + NUM_NONREG_ITEMS)
NUM_NONREG_ITEMS 3375 regex.c        #define NUM_FAILURE_ITEMS  (last_used_reg * NUM_REG_ITEMS + NUM_NONREG_ITEMS + 1)
NUM_NONREG_ITEMS 3435 regex.c            stackp -= NUM_NONREG_ITEMS;	/* Remove failure points (and flag). */	\


NUM_REG_ITEMS

NUM_REG_ITEMS    3372 regex.c        #define MAX_NUM_FAILURE_ITEMS   (num_regs * NUM_REG_ITEMS + NUM_NONREG_ITEMS)
NUM_REG_ITEMS    3375 regex.c        #define NUM_FAILURE_ITEMS  (last_used_reg * NUM_REG_ITEMS + NUM_NONREG_ITEMS + 1)
NUM_REG_ITEMS    3437 regex.c            temp *= NUM_REG_ITEMS;	/* How much to take off the stack.  */	\


N_COMM

N_COMM            175 dln.c          #ifndef N_COMM
N_COMM            708 dln.c          		    sym->n_type = N_EXT | N_COMM;
N_COMM            717 dln.c          		    sym->n_type = N_COMM;
N_COMM            726 dln.c          		    sym->n_type = N_EXT | N_COMM;
N_COMM            747 dln.c          	  case N_COMM:
N_COMM            805 dln.c          		  case N_EXT|N_COMM:
N_COMM            806 dln.c          		  case N_COMM:


N_INET

N_INET            652 ext/socket/getaddrinfo.c 			afd = &afdl[N_INET];
N_INET            659 ext/socket/getaddrinfo.c 				afd = &afdl[N_INET];


N_INET6

N_INET6           645 ext/socket/getaddrinfo.c 			afd = &afdl[N_INET6];
N_INET6           661 ext/socket/getaddrinfo.c 				afd = &afdl[N_INET6];
N_INET6           669 ext/socket/getaddrinfo.c 			GET_AI(cur->ai_next, &afdl[N_INET6], ap, port);


N_MAGIC

N_MAGIC           178 dln.c          #ifndef N_MAGIC
N_MAGIC           182 dln.c          #define INVALID_OBJECT(h) (N_MAGIC(h) != OMAGIC)


Need_Float

Need_Float         21 math.c             Need_Float(x);\
Need_Float         22 math.c             Need_Float(y);\
Need_Float         57 math.c             Need_Float(x);
Need_Float         73 math.c             Need_Float(x);
Need_Float         90 math.c             Need_Float(x);
Need_Float        108 math.c             Need_Float(x);
Need_Float        130 math.c             Need_Float(x);
Need_Float        150 math.c             Need_Float(x);
Need_Float        174 math.c             Need_Float(x);
Need_Float        200 math.c             Need_Float(x);
Need_Float        225 math.c             Need_Float(x);
Need_Float        242 math.c             Need_Float(x);
Need_Float        262 math.c             Need_Float(x);
Need_Float        279 math.c             Need_Float(x);
Need_Float        299 math.c             Need_Float(x);
Need_Float        325 math.c             Need_Float(x);
Need_Float        347 math.c             Need_Float(x);
Need_Float        370 math.c             Need_Float(x);
Need_Float        398 math.c             Need_Float(x);
Need_Float        418 math.c             Need_Float(x);
Need_Float        451 math.c             Need_Float(x);
Need_Float        466 math.c             Need_Float(x);


Need_Float2

Need_Float2        39 math.c             Need_Float2(y, x);
Need_Float2       436 math.c             Need_Float2(x, y);


NtCmdLineElement

NtCmdLineElement 1017 win32/win32.c      NtCmdLineElement *tmpcurr;
NtCmdLineElement 1018 win32/win32.c      NtCmdLineElement ***tail = (NtCmdLineElement ***)vinfo;
NtCmdLineElement 1020 win32/win32.c      tmpcurr = ALLOC(NtCmdLineElement);
NtCmdLineElement 1021 win32/win32.c      MEMZERO(tmpcurr, NtCmdLineElement, 1);
NtCmdLineElement 1039 win32/win32.c  static NtCmdLineElement **
NtCmdLineElement 1044 win32/win32.c      NtCmdLineElement **last = tail;
NtCmdLineElement 1127 win32/win32.c      NtCmdLineElement *curr, **tail;
NtCmdLineElement 1128 win32/win32.c      NtCmdLineElement *cmdhead = NULL, **cmdtail = &cmdhead;
NtCmdLineElement 1285 win32/win32.c  	curr = ALLOC(NtCmdLineElement);
NtCmdLineElement 1286 win32/win32.c  	MEMZERO(curr, NtCmdLineElement, 1);


NtInitialize

NtInitialize       38 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          104 array.c            OBJSETUP(ary, klass, T_ARRAY);
OBJSETUP          465 array.c        	OBJSETUP(shared, rb_cArray, T_ARRAY);
OBJSETUP           48 bignum.c           OBJSETUP(big, klass, T_BIGNUM);
OBJSETUP           26 class.c            OBJSETUP(klass, rb_cClass, T_CLASS);
OBJSETUP          114 class.c        	OBJSETUP(clone, 0, RBASIC(klass)->flags);
OBJSETUP          276 class.c            OBJSETUP(mdl, rb_cModule, T_MODULE);
OBJSETUP          347 class.c            OBJSETUP(klass, rb_cClass, T_ICLASS);
OBJSETUP          808 eval.c             OBJSETUP(vars, 0, T_VARMAP);
OBJSETUP         1026 eval.c             OBJSETUP(_scope, 0, T_SCOPE);	\
OBJSETUP          402 gc.c               OBJSETUP(data, klass, T_DATA);
OBJSETUP          232 hash.c             OBJSETUP(hash, klass, T_HASH);
OBJSETUP          321 io.c               OBJSETUP(io, klass, T_FILE);
OBJSETUP         1113 marshal.c      	    OBJSETUP(big, rb_cBignum, T_BIGNUM);
OBJSETUP          473 numeric.c          OBJSETUP(flt, rb_cFloat, T_FLOAT);
OBJSETUP         1582 object.c           OBJSETUP(obj, klass, T_OBJECT);
OBJSETUP          267 random.c           OBJSETUP(big, rb_cBignum, T_BIGNUM);
OBJSETUP          673 re.c               OBJSETUP(match, klass, T_MATCH);
OBJSETUP         1382 re.c               OBJSETUP(re, klass, T_REGEXP);
OBJSETUP          297 ruby.h             OBJSETUP(clone,rb_singleton_class_clone((VALUE)obj),RBASIC(obj)->flags);\
OBJSETUP          302 ruby.h             OBJSETUP(dup,rb_obj_class(obj),(RBASIC(obj)->flags)&(T_MASK|FL_EXIVAR|FL_TAINT));\
OBJSETUP           68 string.c           OBJSETUP(str, klass, T_STRING);
OBJSETUP          363 struct.c           OBJSETUP(st, klass, T_STRUCT);


OBJ_FREEZE

OBJ_FREEZE        472 array.c        	OBJ_FREEZE(shared);
OBJ_FREEZE        886 class.c            if (OBJ_FROZEN(obj)) OBJ_FREEZE(klass);
OBJ_FREEZE       6943 eval.c         	    OBJ_FREEZE(tmp);
OBJ_FREEZE       6951 eval.c         	    OBJ_FREEZE(tmp);
OBJ_FREEZE       7077 eval.c             OBJ_FREEZE(fn);
OBJ_FREEZE       1594 ext/tk/tkutil/tkutil.c     OBJ_FREEZE(TK_None);
OBJ_FREEZE       4168 file.c         	OBJ_FREEZE(fname);
OBJ_FREEZE       4177 file.c         	    OBJ_FREEZE(fname);
OBJ_FREEZE       4198 file.c         	    OBJ_FREEZE(fname);
OBJ_FREEZE       4222 file.c         	OBJ_FREEZE(path);
OBJ_FREEZE       4282 file.c         	OBJ_FREEZE(tmp);
OBJ_FREEZE       5600 io.c               OBJ_FREEZE(rb_default_rs);	/* avoid modifying RS_default */
OBJ_FREEZE        745 object.c       	OBJ_FREEZE(obj);
OBJ_FREEZE       1174 ruby.c         	OBJ_FREEZE(arg);
OBJ_FREEZE        205 string.c           OBJ_FREEZE(str);
OBJ_FREEZE        639 string.c       	    OBJ_FREEZE(shared);
OBJ_FREEZE        645 string.c           OBJ_FREEZE(str);
OBJ_FREEZE        188 struct.c           OBJ_FREEZE(members);
OBJ_FREEZE       1303 variable.c         OBJ_FREEZE(fn);


OBJ_FROZEN

OBJ_FROZEN         51 array.c            if (OBJ_FROZEN(ary)) rb_error_frozen("array");
OBJ_FROZEN         93 array.c            if (OBJ_FROZEN(ary)) return Qtrue;
OBJ_FROZEN        886 class.c            if (OBJ_FROZEN(obj)) OBJ_FREEZE(klass);
OBJ_FROZEN       1170 error.c            if (OBJ_FROZEN(obj)) rb_error_frozen(rb_obj_classname(obj));
OBJ_FROZEN        395 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       1937 eval.c             if (OBJ_FROZEN(klass)) {
OBJ_FROZEN       3868 eval.c         	    if (OBJ_FROZEN(recv)) rb_error_frozen("object");
OBJ_FROZEN       11599 eval.c             if (OBJ_FROZEN(curr_thread->thgroup)) {
OBJ_FROZEN       12233 eval.c             if (OBJ_FROZEN(thread)) rb_error_frozen("thread locals");
OBJ_FROZEN       12668 eval.c             if (OBJ_FROZEN(group)) {
OBJ_FROZEN       12679 eval.c             if (OBJ_FROZEN(th->thgroup)) {
OBJ_FROZEN        319 ext/dbm/dbm.c      if (OBJ_FROZEN(obj)) rb_error_frozen("DBM");
OBJ_FROZEN        414 ext/gdbm/gdbm.c     if (OBJ_FROZEN(obj)) rb_error_frozen("GDBM");
OBJ_FROZEN        302 ext/openssl/ossl_ssl.c     if(OBJ_FROZEN(self)) return Qnil;
OBJ_FROZEN        296 ext/sdbm/init.c     if (OBJ_FROZEN(obj)) rb_error_frozen("SDBM");
OBJ_FROZEN        132 ext/stringio/stringio.c     if (OBJ_FROZEN(ptr->string)) {
OBJ_FROZEN        240 ext/stringio/stringio.c 	if ((ptr->flags & FMODE_WRITABLE) && OBJ_FROZEN(string)) {
OBJ_FROZEN        250 ext/stringio/stringio.c 	ptr->flags = OBJ_FROZEN(string) ? FMODE_READABLE : FMODE_READWRITE;
OBJ_FROZEN        367 ext/stringio/stringio.c     ptr->flags = OBJ_FROZEN(string) ? FMODE_READABLE : FMODE_READWRITE;
OBJ_FROZEN         32 hash.c             if (OBJ_FROZEN(hash)) rb_error_frozen("hash");
OBJ_FROZEN        207 object.c           if (OBJ_FROZEN(dest)) {
OBJ_FROZEN        680 object.c       	if (OBJ_FROZEN(obj)) {
OBJ_FROZEN        702 object.c       	if (OBJ_FROZEN(obj)) {
OBJ_FROZEN        741 object.c           if (!OBJ_FROZEN(obj)) {
OBJ_FROZEN        765 object.c           if (OBJ_FROZEN(obj)) return Qtrue;
OBJ_FROZEN         57 string.c           if (OBJ_FROZEN(s)) {
OBJ_FROZEN        187 string.c           if (OBJ_FROZEN(orig)) return orig;
OBJ_FROZEN        478 string.c           if (OBJ_FROZEN(str)) rb_error_frozen("string");
OBJ_FROZEN        643 string.c           if (OBJ_FROZEN(str)) return str;
OBJ_FROZEN        153 struct.c           if (OBJ_FROZEN(s)) rb_error_frozen("Struct");
OBJ_FROZEN       1050 variable.c         if (OBJ_FROZEN(obj)) rb_error_frozen("object");
OBJ_FROZEN       1174 variable.c         if (OBJ_FROZEN(obj)) rb_error_frozen("object");
OBJ_FROZEN       1477 variable.c         if (OBJ_FROZEN(mod)) rb_error_frozen("class/module");
OBJ_FROZEN       1642 variable.c         if (OBJ_FROZEN(klass)) {
OBJ_FROZEN       1742 variable.c     	    if (OBJ_FROZEN(tmp)) rb_error_frozen("class/module");
OBJ_FROZEN       1923 variable.c         if (OBJ_FROZEN(mod)) rb_error_frozen("class/module");


OBJ_INFECT

OBJ_INFECT       2379 array.c            OBJ_INFECT(ary2, ary);
OBJ_INFECT         33 class.c            OBJ_INFECT(klass, super);
OBJ_INFECT        364 class.c            OBJ_INFECT(klass, module);
OBJ_INFECT        365 class.c            OBJ_INFECT(klass, super);
OBJ_INFECT        389 class.c            OBJ_INFECT(klass, module);
OBJ_INFECT       3759 eval.c         		    OBJ_INFECT(str, str2);
OBJ_INFECT       8783 eval.c             OBJ_INFECT(method, klass);
OBJ_INFECT       8867 eval.c             OBJ_INFECT(method, obj);
OBJ_INFECT       12346 eval.c             OBJ_INFECT(str, thread);
OBJ_INFECT        358 ext/iconv/iconv.c     OBJ_INFECT(ret, str);
OBJ_INFECT        457 ext/iconv/iconv.c 			OBJ_INFECT(ret, str);
OBJ_INFECT        114 ext/nkf/nkf.c    OBJ_INFECT(result, src);
OBJ_INFECT       3042 ext/socket/socket.c     OBJ_INFECT(addr, port);
OBJ_INFECT       3043 ext/socket/socket.c     OBJ_INFECT(addr, host);
OBJ_INFECT       3057 ext/socket/socket.c     OBJ_INFECT(host, addr);
OBJ_INFECT       3073 ext/socket/socket.c     OBJ_INFECT(addr, path);
OBJ_INFECT       3092 ext/socket/socket.c     OBJ_INFECT(path, addr);
OBJ_INFECT        506 ext/stringio/stringio.c     OBJ_INFECT(copy, orig);
OBJ_INFECT        768 ext/stringio/stringio.c 	    OBJ_INFECT(ptr->string, self);
OBJ_INFECT       1018 ext/stringio/stringio.c     OBJ_INFECT(ptr->string, self);
OBJ_INFECT       1069 ext/stringio/stringio.c     OBJ_INFECT(ptr->string, self);
OBJ_INFECT        135 ext/strscan/strscan.c     OBJ_INFECT(str, p->str);
OBJ_INFECT        957 ext/zlib/zlib.c     OBJ_INFECT(dst, obj);
OBJ_INFECT        973 ext/zlib/zlib.c     OBJ_INFECT(dst, obj);
OBJ_INFECT        989 ext/zlib/zlib.c     OBJ_INFECT(dst, obj);
OBJ_INFECT       1236 ext/zlib/zlib.c     OBJ_INFECT(dst, src);
OBJ_INFECT       1280 ext/zlib/zlib.c     OBJ_INFECT(obj, src);
OBJ_INFECT       1284 ext/zlib/zlib.c     OBJ_INFECT(dst, obj);
OBJ_INFECT       1299 ext/zlib/zlib.c     OBJ_INFECT(obj, src);
OBJ_INFECT       1330 ext/zlib/zlib.c     OBJ_INFECT(dst, obj);
OBJ_INFECT       1386 ext/zlib/zlib.c     OBJ_INFECT(obj, dic);
OBJ_INFECT       1496 ext/zlib/zlib.c     OBJ_INFECT(dst, src);
OBJ_INFECT       1536 ext/zlib/zlib.c     OBJ_INFECT(obj, src);
OBJ_INFECT       1556 ext/zlib/zlib.c     OBJ_INFECT(dst, obj);
OBJ_INFECT       1573 ext/zlib/zlib.c     OBJ_INFECT(obj, src);
OBJ_INFECT       1605 ext/zlib/zlib.c     OBJ_INFECT(obj, src);
OBJ_INFECT       1648 ext/zlib/zlib.c     OBJ_INFECT(obj, dic);
OBJ_INFECT        641 file.c             OBJ_INFECT(str, self);
OBJ_INFECT       2789 file.c             OBJ_INFECT(basename, fname);
OBJ_INFECT       2839 file.c             OBJ_INFECT(dirname, fname);
OBJ_INFECT       2875 file.c              OBJ_INFECT(extname, fname);
OBJ_INFECT       1210 hash.c             OBJ_INFECT(str, str2);
OBJ_INFECT       1214 hash.c             OBJ_INFECT(str, str2);
OBJ_INFECT       1228 hash.c             OBJ_INFECT(str, hash);
OBJ_INFECT       3301 io.c           	    OBJ_INFECT(tmp, argv[0]);
OBJ_INFECT        401 object.c           OBJ_INFECT(str, str2);
OBJ_INFECT        413 object.c           OBJ_INFECT(str, obj);
OBJ_INFECT        714 object.c           OBJ_INFECT(obj1, obj2);
OBJ_INFECT        519 pack.c         		OBJ_INFECT(res, from);
OBJ_INFECT       1159 pack.c             OBJ_INFECT(s, str);
OBJ_INFECT       1941 pack.c         			OBJ_INFECT(tmp, str);
OBJ_INFECT        521 range.c            OBJ_INFECT(str, str2);
OBJ_INFECT        547 range.c            OBJ_INFECT(str, str2);
OBJ_INFECT        363 re.c               OBJ_INFECT(str, re);
OBJ_INFECT        516 re.c               OBJ_INFECT(str, re);
OBJ_INFECT        946 re.c               OBJ_INFECT(match, re);
OBJ_INFECT        947 re.c               OBJ_INFECT(match, str);
OBJ_INFECT        989 re.c               OBJ_INFECT(str, match);
OBJ_INFECT       1801 re.c               OBJ_INFECT(tmp, str);
OBJ_INFECT        149 string.c           OBJ_INFECT(str2, str);
OBJ_INFECT        204 string.c           OBJ_INFECT(str, orig);
OBJ_INFECT        433 string.c           OBJ_INFECT(str2, str);
OBJ_INFECT        620 string.c           OBJ_INFECT(str2, str);
OBJ_INFECT        790 string.c           OBJ_INFECT(str, str2);
OBJ_INFECT        814 string.c           OBJ_INFECT(str, str2);
OBJ_INFECT       1393 string.c           OBJ_INFECT(str, orig);
OBJ_INFECT       1552 string.c       		OBJ_INFECT(tmp, indx);
OBJ_INFECT       1673 string.c           OBJ_INFECT(str, val);
OBJ_INFECT       2164 string.c       	OBJ_INFECT(dest, str);
OBJ_INFECT       2272 string.c           OBJ_INFECT(str, str2);
OBJ_INFECT       2428 string.c           OBJ_INFECT(obj, str);
OBJ_INFECT       2621 string.c           OBJ_INFECT(result, str);
OBJ_INFECT       2725 string.c           OBJ_INFECT(result, str);
OBJ_INFECT       3700 string.c       	    OBJ_INFECT(line, str);
OBJ_INFECT       3710 string.c       	OBJ_INFECT(line, str);
OBJ_INFECT       4361 string.c           OBJ_INFECT(result, str);
OBJ_INFECT       4362 string.c           OBJ_INFECT(result, salt);
OBJ_INFECT       4530 string.c           OBJ_INFECT(res, str);
OBJ_INFECT       4531 string.c           if (flen > 0) OBJ_INFECT(res, pad);
OBJ_INFECT        502 struct.c           OBJ_INFECT(str, s);


OBJ_TAINT

OBJ_TAINT        1292 array.c            if (taint) OBJ_TAINT(result);
OBJ_TAINT        1438 array.c            if (tainted) OBJ_TAINT(str);
OBJ_TAINT         881 class.c        	OBJ_TAINT(klass);
OBJ_TAINT         407 error.c            if (OBJ_TAINTED(exc)) OBJ_TAINT(mesg);
OBJ_TAINT         673 error.c            if (OBJ_TAINTED(exc)) OBJ_TAINT(mesg);
OBJ_TAINT         763 error.c            if (OBJ_TAINTED(obj)) OBJ_TAINT(mesg);
OBJ_TAINT        8579 eval.c             if (OBJ_TAINTED(self)) OBJ_TAINT(str);
OBJ_TAINT        9463 eval.c             OBJ_TAINT(sysstack_error);
OBJ_TAINT          85 ext/dl/ptr.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         671 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         255 ext/zlib/zlib.c     OBJ_TAINT(str);  /* for safe */
OBJ_TAINT        1819 ext/zlib/zlib.c 	OBJ_TAINT(str);  /* for safe */
OBJ_TAINT        2027 ext/zlib/zlib.c 	OBJ_TAINT(gz->orig_name);  /* for safe */
OBJ_TAINT        2034 ext/zlib/zlib.c 	OBJ_TAINT(gz->comment);  /* for safe */
OBJ_TAINT        2149 ext/zlib/zlib.c     OBJ_TAINT(dst);  /* for safe */
OBJ_TAINT        2172 ext/zlib/zlib.c     OBJ_TAINT(dst);  /* for safe */
OBJ_TAINT        2274 ext/zlib/zlib.c     OBJ_TAINT(str);  /* for safe */
OBJ_TAINT        2422 ext/zlib/zlib.c     OBJ_TAINT(str);  /* for safe */
OBJ_TAINT        2438 ext/zlib/zlib.c     OBJ_TAINT(str);  /* for safe */
OBJ_TAINT        2649 file.c             if (tainted) OBJ_TAINT(result);
OBJ_TAINT        2970 file.c             if (taint) OBJ_TAINT(result);
OBJ_TAINT        1169 hash.c             if (OBJ_TAINTED(hash)) OBJ_TAINT(ary);
OBJ_TAINT        2152 hash.c             OBJ_TAINT(str);
OBJ_TAINT        1166 io.c               OBJ_TAINT(str);
OBJ_TAINT        1192 io.c               OBJ_TAINT(str);
OBJ_TAINT        1366 io.c               OBJ_TAINT(str);
OBJ_TAINT        1528 io.c           	OBJ_TAINT(str);
OBJ_TAINT        1599 io.c           	OBJ_TAINT(str);
OBJ_TAINT        2428 io.c               OBJ_TAINT(str);
OBJ_TAINT         130 marshal.c      	if (arg->taint) OBJ_TAINT(buf);
OBJ_TAINT         696 marshal.c      	OBJ_TAINT(arg->str);
OBJ_TAINT         952 marshal.c          if (arg->taint) OBJ_TAINT(v);
OBJ_TAINT         365 object.c           if (OBJ_TAINTED(obj)) OBJ_TAINT(str);
OBJ_TAINT         683 object.c       	OBJ_TAINT(obj);
OBJ_TAINT         385 re.c               if (OBJ_TAINTED(re)) OBJ_TAINT(str);
OBJ_TAINT         937 re.c           	    OBJ_TAINT(match);
OBJ_TAINT        1021 re.c               if (OBJ_TAINTED(match)) OBJ_TAINT(str);
OBJ_TAINT        1049 re.c               if (OBJ_TAINTED(match)) OBJ_TAINT(str);
OBJ_TAINT        1109 re.c           	    if (taint) OBJ_TAINT(str);
OBJ_TAINT        1268 re.c           	    if (taint) OBJ_TAINT(str);
OBJ_TAINT        1295 re.c               if (OBJ_TAINTED(match)) OBJ_TAINT(str);
OBJ_TAINT        1296 re.c               if (OBJ_TAINTED(RMATCH(match)->str)) OBJ_TAINT(str);
OBJ_TAINT         770 ruby.c         	OBJ_TAINT(rb_argv);
OBJ_TAINT         771 ruby.c         	OBJ_TAINT(rb_load_path);
OBJ_TAINT         792 sprintf.c          if (tainted) OBJ_TAINT(result);
OBJ_TAINT         125 string.c           OBJ_TAINT(str);
OBJ_TAINT         135 string.c           OBJ_TAINT(str);
OBJ_TAINT         286 string.c           if (OBJ_TAINTED(str2)) OBJ_TAINT(str);
OBJ_TAINT         303 string.c           if (OBJ_TAINTED(obj)) OBJ_TAINT(str);
OBJ_TAINT         396 string.c       	OBJ_TAINT(str3);
OBJ_TAINT        1998 string.c       	if (tainted) OBJ_TAINT(str);
OBJ_TAINT        2169 string.c           if (tainted) OBJ_TAINT(str);


OBJ_TAINTED

OBJ_TAINTED        54 array.c            if (!OBJ_TAINTED(ary) && rb_safe_level() >= 4)
OBJ_TAINTED      1255 array.c            if (OBJ_TAINTED(ary) || OBJ_TAINTED(sep)) taint = Qtrue;
OBJ_TAINTED      1289 array.c        	if (OBJ_TAINTED(tmp)) taint = Qtrue;
OBJ_TAINTED      1426 array.c            int tainted = OBJ_TAINTED(ary);
OBJ_TAINTED      1433 array.c        	if (OBJ_TAINTED(s)) tainted = Qtrue;
OBJ_TAINTED       378 class.c            if (!OBJ_TAINTED(klass)) {
OBJ_TAINTED       880 class.c            if (OBJ_TAINTED(obj)) {
OBJ_TAINTED       407 error.c            if (OBJ_TAINTED(exc)) OBJ_TAINT(mesg);
OBJ_TAINTED       673 error.c            if (OBJ_TAINTED(exc)) OBJ_TAINT(mesg);
OBJ_TAINTED       763 error.c            if (OBJ_TAINTED(obj)) OBJ_TAINT(mesg);
OBJ_TAINTED       240 eval.c             if (!OBJ_TAINTED(obj)) rb_secure(4);
OBJ_TAINTED       247 eval.c             if (ruby_safe_level > 0 && OBJ_TAINTED(x)){
OBJ_TAINTED       381 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      1756 eval.c             if (OBJ_TAINTED(cmd)) {
OBJ_TAINTED      1964 eval.c             if (ruby_safe_level >= 4 && !OBJ_TAINTED(klass)) {
OBJ_TAINTED      3858 eval.c         	    if (ruby_safe_level >= 4 && !OBJ_TAINTED(recv)) {
OBJ_TAINTED      4005 eval.c         	    if (ruby_safe_level >= 4 && !OBJ_TAINTED(result))
OBJ_TAINTED      6404 eval.c         	if (!NIL_P(scope) && !OBJ_TAINTED(scope)) {
OBJ_TAINTED      7002 eval.c             if (OBJ_TAINTED(fname)) {
OBJ_TAINTED      7085 eval.c             if (ruby_safe_level >= 4 && !OBJ_TAINTED(self)) {
OBJ_TAINTED      8579 eval.c             if (OBJ_TAINTED(self)) OBJ_TAINT(str);
OBJ_TAINTED      8669 eval.c             if (ruby_safe_level >= 1 && OBJ_TAINTED(proc) &&
OBJ_TAINTED      8994 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       243 ext/socket/socket.c     if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) {
OBJ_TAINTED       268 ext/socket/socket.c     if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) {
OBJ_TAINTED       287 ext/socket/socket.c     if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) {
OBJ_TAINTED      1198 ext/socket/socket.c     if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) {
OBJ_TAINTED       122 ext/stringio/stringio.c     if (!OBJ_TAINTED(ptr->string)) {
OBJ_TAINTED       364 ext/stringio/stringio.c     if (!OBJ_TAINTED(self)) rb_secure(4);
OBJ_TAINTED       569 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      1494 ext/win32ole/win32ole.c     if (ruby_safe_level > 0 && OBJ_TAINTED(svr_name)) {
OBJ_TAINTED      1871 ext/win32ole/win32ole.c     if (ruby_safe_level > 0 && OBJ_TAINTED(svr_name)) {
OBJ_TAINTED      1876 ext/win32ole/win32ole.c         if (ruby_safe_level > 0 && OBJ_TAINTED(host)) {
OBJ_TAINTED      5935 ext/win32ole/win32ole.c         if (ruby_safe_level > 0 && OBJ_TAINTED(itf)) {
OBJ_TAINTED      2465 file.c             tainted = OBJ_TAINTED(fname);
OBJ_TAINTED      2920 file.c             if (OBJ_TAINTED(ary)) taint = 1;
OBJ_TAINTED      2921 file.c             if (OBJ_TAINTED(sep)) taint = 1;
OBJ_TAINTED      2967 file.c         	if (OBJ_TAINTED(tmp)) taint = 1;
OBJ_TAINTED      4165 file.c         	if (rb_safe_level() >= 2 && OBJ_TAINTED(fname)) {
OBJ_TAINTED      4219 file.c         	if (rb_safe_level() >= 1 && OBJ_TAINTED(path)) {
OBJ_TAINTED        33 hash.c             if (!OBJ_TAINTED(hash) && rb_safe_level() >= 4)
OBJ_TAINTED      1169 hash.c             if (OBJ_TAINTED(hash)) OBJ_TAINT(ary);
OBJ_TAINTED      1910 hash.c         	if (OBJ_TAINTED(val)) {
OBJ_TAINTED       197 io.c               if (!OBJ_TAINTED(io) && rb_safe_level() >= 4)
OBJ_TAINTED      2141 io.c               if (rb_safe_level() >= 4 && !OBJ_TAINTED(io)) {
OBJ_TAINTED      2214 io.c               if (rb_safe_level() >= 4 && !OBJ_TAINTED(io)) {
OBJ_TAINTED      2259 io.c               if (rb_safe_level() >= 4 && !OBJ_TAINTED(io)) {
OBJ_TAINTED      3360 io.c               if (rb_safe_level() >= 4 && (!OBJ_TAINTED(io) || !OBJ_TAINTED(nfile))) {
OBJ_TAINTED       501 marshal.c      	if (OBJ_TAINTED(obj)) arg->taint = Qtrue;
OBJ_TAINTED       892 marshal.c      	if (OBJ_TAINTED(str)) arg->taint = Qtrue;
OBJ_TAINTED      1397 marshal.c      	arg.taint = OBJ_TAINTED(port); /* original taintedness */
OBJ_TAINTED       365 object.c           if (OBJ_TAINTED(obj)) OBJ_TAINT(str);
OBJ_TAINTED       660 object.c           if (OBJ_TAINTED(obj))
OBJ_TAINTED       679 object.c           if (!OBJ_TAINTED(obj)) {
OBJ_TAINTED       701 object.c           if (OBJ_TAINTED(obj)) {
OBJ_TAINTED       742 object.c       	if (rb_safe_level() >= 4 && !OBJ_TAINTED(obj)) {
OBJ_TAINTED       385 re.c               if (OBJ_TAINTED(re)) OBJ_TAINT(str);
OBJ_TAINTED      1021 re.c               if (OBJ_TAINTED(match)) OBJ_TAINT(str);
OBJ_TAINTED      1049 re.c               if (OBJ_TAINTED(match)) OBJ_TAINT(str);
OBJ_TAINTED      1101 re.c               int taint = OBJ_TAINTED(match);
OBJ_TAINTED      1264 re.c           	int taint = OBJ_TAINTED(match);
OBJ_TAINTED      1295 re.c               if (OBJ_TAINTED(match)) OBJ_TAINT(str);
OBJ_TAINTED      1296 re.c               if (OBJ_TAINTED(RMATCH(match)->str)) OBJ_TAINT(str);
OBJ_TAINTED       723 signal.c           if (OBJ_TAINTED(arg.cmd)) {
OBJ_TAINTED       254 sprintf.c          if (OBJ_TAINTED(fmt)) tainted = 1;
OBJ_TAINTED       409 sprintf.c      		if (OBJ_TAINTED(str)) tainted = 1;
OBJ_TAINTED       286 string.c           if (OBJ_TAINTED(str2)) OBJ_TAINT(str);
OBJ_TAINTED       303 string.c           if (OBJ_TAINTED(obj)) OBJ_TAINT(str);
OBJ_TAINTED       395 string.c           if (OBJ_TAINTED(str1) || OBJ_TAINTED(str2))
OBJ_TAINTED       479 string.c           if (!OBJ_TAINTED(str) && rb_safe_level() >= 4)
OBJ_TAINTED      1960 string.c       	if (OBJ_TAINTED(repl)) tainted = 1;
OBJ_TAINTED      1984 string.c       	if (OBJ_TAINTED(repl)) tainted = 1;
OBJ_TAINTED      2068 string.c       	if (OBJ_TAINTED(repl)) tainted = 1;
OBJ_TAINTED      2107 string.c       	if (OBJ_TAINTED(val)) tainted = 1;
OBJ_TAINTED       154 struct.c           if (!OBJ_TAINTED(s) && rb_safe_level() >= 4)
OBJ_TAINTED        65 time.c             if (!OBJ_TAINTED(time) && rb_safe_level() >= 4)
OBJ_TAINTED       584 variable.c         if (OBJ_TAINTED(cmd)) {
OBJ_TAINTED      1048 variable.c         if (!OBJ_TAINTED(obj) && rb_safe_level() >= 4)
OBJ_TAINTED      1172 variable.c         if (!OBJ_TAINTED(obj) && rb_safe_level() >= 4)
OBJ_TAINTED      1475 variable.c         if (!OBJ_TAINTED(mod) && rb_safe_level() >= 4)
OBJ_TAINTED      1640 variable.c         if (!OBJ_TAINTED(klass) && rb_safe_level() >= 4)
OBJ_TAINTED      1743 variable.c     	    if (!OBJ_TAINTED(tmp) && rb_safe_level() >= 4)
OBJ_TAINTED      1921 variable.c         if (!OBJ_TAINTED(mod) && rb_safe_level() >= 4)


OBSOLETE_SETREGID

OBSOLETE_SETREGID 2624 process.c      #elif defined(HAVE_SETREGID) && !defined(OBSOLETE_SETREGID)
OBSOLETE_SETREGID 2678 process.c      #elif defined(HAVE_SETREGID) && !defined(OBSOLETE_SETREGID)
OBSOLETE_SETREGID 2932 process.c      #elif defined(HAVE_SETREGID) && !defined(OBSOLETE_SETREGID)
OBSOLETE_SETREGID 3045 process.c      #elif defined(HAVE_SETREGID) && !defined(OBSOLETE_SETREGID)
OBSOLETE_SETREGID 3079 process.c      #elif defined(HAVE_SETREGID) && !defined(OBSOLETE_SETREGID)


OBSOLETE_SETREUID

OBSOLETE_SETREUID 2074 process.c      #elif defined(HAVE_SETREUID) && !defined(OBSOLETE_SETREUID)
OBSOLETE_SETREUID 2127 process.c      #elif defined(HAVE_SETREUID) && !defined(OBSOLETE_SETREUID)
OBSOLETE_SETREUID 2818 process.c      #elif defined(HAVE_SETREUID) && !defined(OBSOLETE_SETREUID)
OBSOLETE_SETREUID 2987 process.c      #elif defined(HAVE_SETREUID) && !defined(OBSOLETE_SETREUID)
OBSOLETE_SETREUID 3021 process.c      #elif defined(HAVE_SETREUID) && !defined(OBSOLETE_SETREUID)


OFF16

OFF16              44 pack.c         #ifndef OFF16
OFF16             688 pack.c         		rb_str_buf_cat(res, OFF16(&s), NATINT_LEN(short,2));
OFF16             732 pack.c         		rb_str_buf_cat(res, OFF16(&s), NATINT_LEN(short,2));
OFF16             754 pack.c         		rb_str_buf_cat(res, OFF16(&s), NATINT_LEN(short,2));
OFF16            1511 pack.c         		memcpy(OFF16(&tmp), s, NATINT_LEN(short,2));
OFF16            1523 pack.c         		memcpy(OFF16(&tmp), s, NATINT_LEN(unsigned short,2));
OFF16            1618 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           1596 pack.c         		memcpy(OFF16B(&tmp), s, NATINT_LEN(unsigned short,2));


OFF32

OFF32             699 pack.c         		rb_str_buf_cat(res, OFF32(&i), NATINT_LEN(int,4));
OFF32             710 pack.c         		rb_str_buf_cat(res, OFF32(&l), NATINT_LEN(long,4));
OFF32             743 pack.c         		rb_str_buf_cat(res, OFF32(&l), NATINT_LEN(long,4));
OFF32             765 pack.c         		rb_str_buf_cat(res, OFF32(&l), NATINT_LEN(long,4));
OFF32            1556 pack.c         		memcpy(OFF32(&tmp), s, NATINT_LEN(long,4));
OFF32            1567 pack.c         		memcpy(OFF32(&tmp), s, NATINT_LEN(unsigned long,4));
OFF32            1629 pack.c         		memcpy(OFF32(&tmp), s, NATINT_LEN(long,4));


OFF32B

OFF32B             30 pack.c         #   define OFF32(p) OFF32B(p)
OFF32B           1607 pack.c         		memcpy(OFF32B(&tmp), s, NATINT_LEN(unsigned long,4));


OFFT2NUM

OFFT2NUM          470 file.c             return OFFT2NUM(get_stat(self)->st_size);
OFFT2NUM         1271 file.c             return OFFT2NUM(st.st_size);
OFFT2NUM         1476 file.c             return OFFT2NUM(st.st_size);
OFFT2NUM         3952 file.c             return OFFT2NUM(size);
OFFT2NUM          655 io.c               return OFFT2NUM(pos);
OFFT2NUM          736 io.c               return OFFT2NUM(pos);
OFFT2NUM         2316 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 1583 ext/win32ole/win32ole.c         OLEData_Get_Struct(ole, pole);
OLEData_Get_Struct 1687 ext/win32ole/win32ole.c     OLEData_Get_Struct(obj, pole);
OLEData_Get_Struct 1707 ext/win32ole/win32ole.c     OLEData_Get_Struct(obj, pole);
OLEData_Get_Struct 2000 ext/win32ole/win32ole.c     OLEData_Get_Struct(self, pole);
OLEData_Get_Struct 2213 ext/win32ole/win32ole.c     OLEData_Get_Struct(self, pole);
OLEData_Get_Struct 2511 ext/win32ole/win32ole.c     OLEData_Get_Struct(self, pole);
OLEData_Get_Struct 2556 ext/win32ole/win32ole.c     OLEData_Get_Struct(self, pole);
OLEData_Get_Struct 2624 ext/win32ole/win32ole.c     OLEData_Get_Struct(self, pole);
OLEData_Get_Struct 2889 ext/win32ole/win32ole.c     OLEData_Get_Struct(self, pole);
OLEData_Get_Struct 2992 ext/win32ole/win32ole.c     OLEData_Get_Struct(self, pole);
OLEData_Get_Struct 3236 ext/win32ole/win32ole.c     OLEData_Get_Struct(self, pole);
OLEData_Get_Struct 5681 ext/win32ole/win32ole.c     OLEData_Get_Struct(ole, pole);
OLEData_Get_Struct 5789 ext/win32ole/win32ole.c     OLEData_Get_Struct(ole, pole);
OLEData_Get_Struct 5950 ext/win32ole/win32ole.c     OLEData_Get_Struct(ole, pole);


OLE_ADDREF

OLE_ADDREF        744 ext/win32ole/win32ole.c         OLE_ADDREF(pole->pDispatch);
OLE_ADDREF       1048 ext/win32ole/win32ole.c             OLE_ADDREF(pDispatch);
OLE_ADDREF       1667 ext/win32ole/win32ole.c         OLE_ADDREF(pole->pDispatch);
OLE_ADDREF       3394 ext/win32ole/win32ole.c     if(pTypeInfo) OLE_ADDREF(pTypeInfo);
OLE_ADDREF       3927 ext/win32ole/win32ole.c         OLE_ADDREF(pTypeInfo);
OLE_ADDREF       4317 ext/win32ole/win32ole.c     OLE_ADDREF(pTypeInfo);
OLE_ADDREF       4319 ext/win32ole/win32ole.c     if(pOwnerTypeInfo) OLE_ADDREF(pOwnerTypeInfo);
OLE_ADDREF       5026 ext/win32ole/win32ole.c             OLE_ADDREF(pTypeInfo);


OLE_FREE

OLE_FREE          635 ext/win32ole/win32ole.c     OLE_FREE(pole->pDispatch);
OLE_FREE          642 ext/win32ole/win32ole.c     OLE_FREE(poletype->pTypeInfo);
OLE_FREE          649 ext/win32ole/win32ole.c     OLE_FREE(polemethod->pTypeInfo);
OLE_FREE          650 ext/win32ole/win32ole.c     OLE_FREE(polemethod->pOwnerTypeInfo);
OLE_FREE          657 ext/win32ole/win32ole.c     OLE_FREE(polevar->pTypeInfo);
OLE_FREE          664 ext/win32ole/win32ole.c     OLE_FREE(pole->pTypeInfo);
OLE_FREE         2557 ext/win32ole/win32ole.c     OLE_FREE(pole->pDispatch);


OLE_GET_TYPEATTR

OLE_GET_TYPEATTR 1286 ext/win32ole/win32ole.c         hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 2700 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 2739 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 2775 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 2816 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 3503 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 3569 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 3605 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 3640 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 3676 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 3708 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 3740 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 3803 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 3908 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 4638 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 5710 ext/win32ole/win32ole.c         hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 5813 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);


OLE_RELEASE

OLE_RELEASE        66 ext/win32ole/win32ole.c             OLE_RELEASE(x);\
OLE_RELEASE       870 ext/win32ole/win32ole.c         OLE_RELEASE(pole->pDispatch);
OLE_RELEASE      1288 ext/win32ole/win32ole.c             OLE_RELEASE(pTypeInfo);
OLE_RELEASE      1322 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeInfo);
OLE_RELEASE      1447 ext/win32ole/win32ole.c         OLE_RELEASE(pBindCtx);
OLE_RELEASE      1455 ext/win32ole/win32ole.c     OLE_RELEASE(pMoniker);
OLE_RELEASE      1456 ext/win32ole/win32ole.c     OLE_RELEASE(pBindCtx);
OLE_RELEASE      1518 ext/win32ole/win32ole.c         OLE_RELEASE(pUnknown);
OLE_RELEASE      1524 ext/win32ole/win32ole.c     OLE_RELEASE(pUnknown);
OLE_RELEASE      1591 ext/win32ole/win32ole.c             OLE_RELEASE(pTypeInfo);
OLE_RELEASE      1594 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeInfo);
OLE_RELEASE      1601 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeLib);
OLE_RELEASE      1619 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeLib);
OLE_RELEASE      1656 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeInfo);
OLE_RELEASE      1668 ext/win32ole/win32ole.c         n = OLE_RELEASE(pole->pDispatch);
OLE_RELEASE      1710 ext/win32ole/win32ole.c             n = OLE_RELEASE(pole->pDispatch);
OLE_RELEASE      2584 ext/win32ole/win32ole.c     OLE_RELEASE(pEnum);
OLE_RELEASE      2755 ext/win32ole/win32ole.c        OLE_RELEASE(pRefTypeInfo);
OLE_RELEASE      2830 ext/win32ole/win32ole.c        OLE_RELEASE(pRefTypeInfo);
OLE_RELEASE      2859 ext/win32ole/win32ole.c     OLE_RELEASE(pTypeInfo);
OLE_RELEASE      2875 ext/win32ole/win32ole.c     OLE_RELEASE(pTypeLib);
OLE_RELEASE      2896 ext/win32ole/win32ole.c     OLE_RELEASE(pTypeInfo);
OLE_RELEASE      3000 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeInfo);
OLE_RELEASE      3009 ext/win32ole/win32ole.c     OLE_RELEASE(pTypeLib);
OLE_RELEASE      3010 ext/win32ole/win32ole.c     OLE_RELEASE(pTypeInfo);
OLE_RELEASE      3036 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeLib);
OLE_RELEASE      3039 ext/win32ole/win32ole.c     OLE_RELEASE(pTypeLib);
OLE_RELEASE      3061 ext/win32ole/win32ole.c         OLE_RELEASE(pRefTypeInfo);
OLE_RELEASE      3064 ext/win32ole/win32ole.c     OLE_RELEASE(pRefTypeInfo);
OLE_RELEASE      3242 ext/win32ole/win32ole.c     OLE_RELEASE(pTypeInfo);
OLE_RELEASE      3278 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeLib);
OLE_RELEASE      3428 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeInfo);
OLE_RELEASE      3473 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeLib);
OLE_RELEASE      3477 ext/win32ole/win32ole.c     OLE_RELEASE(pTypeLib);
OLE_RELEASE      4662 ext/win32ole/win32ole.c                 OLE_RELEASE(pRefTypeInfo);
OLE_RELEASE      4671 ext/win32ole/win32ole.c                 OLE_RELEASE(pRefTypeInfo);
OLE_RELEASE      4677 ext/win32ole/win32ole.c             OLE_RELEASE(pRefTypeInfo);
OLE_RELEASE      5692 ext/win32ole/win32ole.c     OLE_RELEASE(pTypeInfo);
OLE_RELEASE      5700 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeLib);
OLE_RELEASE      5713 ext/win32ole/win32ole.c             OLE_RELEASE(pTypeInfo);
OLE_RELEASE      5734 ext/win32ole/win32ole.c                     OLE_RELEASE(pImplTypeInfo);
OLE_RELEASE      5753 ext/win32ole/win32ole.c                 OLE_RELEASE(pImplTypeInfo);
OLE_RELEASE      5760 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeInfo);
OLE_RELEASE      5764 ext/win32ole/win32ole.c     OLE_RELEASE(pTypeLib);
OLE_RELEASE      5798 ext/win32ole/win32ole.c         OLE_RELEASE(pProvideClassInfo2);
OLE_RELEASE      5809 ext/win32ole/win32ole.c     OLE_RELEASE(pProvideClassInfo);
OLE_RELEASE      5815 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeInfo);
OLE_RELEASE      5843 ext/win32ole/win32ole.c     OLE_RELEASE(pTypeInfo);
OLE_RELEASE      5859 ext/win32ole/win32ole.c         OLE_RELEASE(*ppTypeInfo);
OLE_RELEASE      5877 ext/win32ole/win32ole.c         if(pti) OLE_RELEASE(pti);
OLE_RELEASE      5881 ext/win32ole/win32ole.c             OLE_RELEASE(pcp);
OLE_RELEASE      5956 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeInfo);
OLE_RELEASE      5964 ext/win32ole/win32ole.c     OLE_RELEASE(pContainer);
OLE_RELEASE      5966 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeInfo);


OLE_RELEASE_TYPEATTR

OLE_RELEASE_TYPEATTR 2723 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 2757 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 2800 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 2832 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 3539 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 3576 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 3611 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 3648 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 3680 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 3712 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 3744 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 3807 ext/win32ole/win32ole.c         OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 3811 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 3935 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 4684 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 5759 ext/win32ole/win32ole.c         OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 5842 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);


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);


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   522 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        172 ext/openssl/ossl.h   OSSL_Debug(fmt, ##__VA_ARGS__); \
OSSL_Debug        177 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  100 ext/openssl/ossl_ssl.c     OSSL_SSL_METHOD_ENTRY(TLSv1),
OSSL_SSL_METHOD_ENTRY  101 ext/openssl/ossl_ssl.c     OSSL_SSL_METHOD_ENTRY(TLSv1_server),
OSSL_SSL_METHOD_ENTRY  102 ext/openssl/ossl_ssl.c     OSSL_SSL_METHOD_ENTRY(TLSv1_client),
OSSL_SSL_METHOD_ENTRY  103 ext/openssl/ossl_ssl.c     OSSL_SSL_METHOD_ENTRY(SSLv2),
OSSL_SSL_METHOD_ENTRY  104 ext/openssl/ossl_ssl.c     OSSL_SSL_METHOD_ENTRY(SSLv2_server),
OSSL_SSL_METHOD_ENTRY  105 ext/openssl/ossl_ssl.c     OSSL_SSL_METHOD_ENTRY(SSLv2_client),
OSSL_SSL_METHOD_ENTRY  106 ext/openssl/ossl_ssl.c     OSSL_SSL_METHOD_ENTRY(SSLv3),
OSSL_SSL_METHOD_ENTRY  107 ext/openssl/ossl_ssl.c     OSSL_SSL_METHOD_ENTRY(SSLv3_server),
OSSL_SSL_METHOD_ENTRY  108 ext/openssl/ossl_ssl.c     OSSL_SSL_METHOD_ENTRY(SSLv3_client),
OSSL_SSL_METHOD_ENTRY  109 ext/openssl/ossl_ssl.c     OSSL_SSL_METHOD_ENTRY(SSLv23),
OSSL_SSL_METHOD_ENTRY  110 ext/openssl/ossl_ssl.c     OSSL_SSL_METHOD_ENTRY(SSLv23_server),
OSSL_SSL_METHOD_ENTRY  111 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          1701 ext/zlib/zlib.c #ifndef OS_CODE
OS_CODE          1771 ext/zlib/zlib.c     gz->os_code = OS_CODE;
OS_CODE          3468 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_CODE", INT2FIX(OS_CODE));


OS_UNIX

OS_UNIX          1702 ext/zlib/zlib.c #define OS_CODE  OS_UNIX
OS_UNIX          3472 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_UNIX", INT2FIX(OS_UNIX));


OVERWRITE

OVERWRITE         145 ext/nkf/nkf-utf8/nkf.c #ifdef OVERWRITE
OVERWRITE         650 ext/nkf/nkf-utf8/nkf.c #ifdef OVERWRITE
OVERWRITE         753 ext/nkf/nkf-utf8/nkf.c #ifdef OVERWRITE
OVERWRITE         760 ext/nkf/nkf-utf8/nkf.c #ifdef OVERWRITE
OVERWRITE         835 ext/nkf/nkf-utf8/nkf.c #ifdef OVERWRITE
OVERWRITE         938 ext/nkf/nkf-utf8/nkf.c #ifdef OVERWRITE
OVERWRITE         999 ext/nkf/nkf-utf8/nkf.c #ifdef OVERWRITE
OVERWRITE        4767 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          95 io.c           #ifndef O_ACCMODE
O_ACCMODE        2598 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         2553 io.c               if (mode & O_APPEND) {
O_APPEND         2583 io.c           	flags |= O_WRONLY | O_CREAT | O_APPEND;
O_APPEND         2619 io.c               if (flags & O_APPEND) {
O_APPEND         5545 io.c           	{"", O_APPEND | O_BINARY},
O_APPEND         5748 io.c               rb_file_const("APPEND", INT2FIX(O_APPEND));
O_APPEND         1596 win32/win32.c      if (flags & O_APPEND)


O_BINARY

O_BINARY          124 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         2456 io.c               if (fptr->f && setmode(fileno(fptr->f), O_BINARY) == -1)
O_BINARY         2458 io.c               if (fptr->f2 && setmode(fileno(fptr->f2), O_BINARY) == -1)
O_BINARY         2471 io.c           #ifdef O_BINARY
O_BINARY         2559 io.c           #ifdef O_BINARY
O_BINARY         2560 io.c               if (mode & O_BINARY) {
O_BINARY         2593 io.c           #ifdef O_BINARY
O_BINARY         2594 io.c                       flags |= O_BINARY;
O_BINARY         2614 io.c           #ifdef O_BINARY
O_BINARY         2615 io.c           # define MODE_BINARY(a,b) ((flags & O_BINARY) ? (b) : (a))
O_BINARY         4009 io.c           	mode |= O_BINARY;
O_BINARY         4010 io.c           	setmode(fileno(f), O_BINARY);
O_BINARY         5019 io.c               if (_pipe(pipes, 1024, O_BINARY) == -1)
O_BINARY         5542 io.c           	{"", O_RDONLY | O_BINARY},
O_BINARY         5543 io.c           	{"", O_WRONLY | O_BINARY},
O_BINARY         5544 io.c           	{"", O_RDWR | O_BINARY},
O_BINARY         5545 io.c           	{"", O_APPEND | O_BINARY},
O_BINARY         5762 io.c           #ifdef O_BINARY
O_BINARY         5763 io.c               rb_file_const("BINARY", INT2FIX(O_BINARY));
O_BINARY          598 win32/win32.c      if (mode & O_BINARY) {
O_BINARY          599 win32/win32.c  	pipemode = O_BINARY;
O_BINARY         2001 win32/win32.c  	    s = rb_w32_open_osfhandle(r, O_RDWR|O_BINARY);
O_BINARY         2256 win32/win32.c  	    fd = rb_w32_open_osfhandle(s, O_RDWR|O_BINARY);


O_CREAT

O_CREAT           130 ext/dbm/dbm.c              dbm = dbm_open(RSTRING(file)->ptr, O_RDWR|O_CREAT, mode);
O_CREAT           810 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "WRCREAT", INT2FIX(O_RDWR|O_CREAT|RUBY_DBM_RW_BIT));
O_CREAT           811 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           783 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          2556 io.c               if (mode & O_CREAT) {
O_CREAT          2580 io.c           	flags |= O_WRONLY | O_CREAT | O_TRUNC;
O_CREAT          2583 io.c           	flags |= O_WRONLY | O_CREAT | O_APPEND;
O_CREAT          5749 io.c               rb_file_const("CREAT", INT2FIX(O_CREAT));
O_CREAT           246 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           5750 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        956 ext/socket/socket.c # define NONBLOCKING O_NONBLOCK
O_NONBLOCK        418 io.c           #if defined(HAVE_FCNTL) && defined(F_GETFL) && defined(O_NONBLOCK)
O_NONBLOCK        420 io.c                       !(r & O_NONBLOCK)
O_NONBLOCK       4776 io.c                 if (narg & O_NONBLOCK) {
O_NONBLOCK       5751 io.c           #if defined(O_NDELAY) || defined(O_NONBLOCK)
O_NONBLOCK       5752 io.c           #   ifdef O_NONBLOCK
O_NONBLOCK       5753 io.c               rb_file_const("NONBLOCK", INT2FIX(O_NONBLOCK));
O_NONBLOCK        279 random.c       #ifdef O_NONBLOCK
O_NONBLOCK        280 random.c                   |O_NONBLOCK
O_NONBLOCK       2429 win32/win32.c      if (arg & O_NONBLOCK) {


O_RDONLY

O_RDONLY          369 dln.c              if (file == NULL || (fd = open(file, O_RDONLY)) < 0) {
O_RDONLY          979 dln.c              fd = open(file, O_RDONLY);
O_RDONLY         1096 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          808 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           96 io.c           #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
O_RDONLY         2541 io.c               switch (mode & (O_RDONLY|O_WRONLY|O_RDWR)) {
O_RDONLY         2542 io.c                 case O_RDONLY:
O_RDONLY         2577 io.c           	flags |= O_RDONLY;
O_RDONLY         2625 io.c               switch (flags & (O_RDONLY|O_WRONLY|O_RDWR)) {
O_RDONLY         2626 io.c                 case O_RDONLY:
O_RDONLY         3194 io.c               if (NIL_P(vmode)) flags = O_RDONLY;
O_RDONLY         4076 io.c           	flags = O_RDONLY;
O_RDONLY         5027 io.c               args[2] = INT2FIX(O_RDONLY);
O_RDONLY         5542 io.c           	{"", O_RDONLY | O_BINARY},
O_RDONLY         5745 io.c               rb_file_const("RDONLY", INT2FIX(O_RDONLY));
O_RDONLY          278 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            809 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "WRITER",  INT2FIX(O_RDWR|RUBY_DBM_RW_BIT));
O_RDWR            810 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "WRCREAT", INT2FIX(O_RDWR|O_CREAT|RUBY_DBM_RW_BIT));
O_RDWR            811 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           3026 file.c         	if ((tmpfd = open(StringValueCStr(path), O_RDWR)) < 0) {
O_RDWR             96 io.c           #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
O_RDWR           2541 io.c               switch (mode & (O_RDONLY|O_WRONLY|O_RDWR)) {
O_RDWR           2548 io.c                 case O_RDWR:
O_RDWR           2598 io.c                       flags = (flags & ~O_ACCMODE) | O_RDWR;
O_RDWR           2620 io.c           	if ((flags & O_RDWR) == O_RDWR) {
O_RDWR           2625 io.c               switch (flags & (O_RDONLY|O_WRONLY|O_RDWR)) {
O_RDWR           2630 io.c                 case O_RDWR:
O_RDWR           5544 io.c           	{"", O_RDWR | O_BINARY},
O_RDWR           5747 io.c               rb_file_const("RDWR", INT2FIX(O_RDWR));
O_RDWR           1741 process.c        if ((fd = open("/dev/tty", O_RDWR)) >= 0) {
O_RDWR            596 win32/win32.c      writing = (mode & (O_WRONLY | O_RDWR)) ? TRUE : FALSE;
O_RDWR            597 win32/win32.c      reading = ((mode & O_RDWR) || !writing) ? TRUE : FALSE;
O_RDWR           2001 win32/win32.c  	    s = rb_w32_open_osfhandle(r, O_RDWR|O_BINARY);
O_RDWR           2256 win32/win32.c  	    fd = rb_w32_open_osfhandle(s, 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            604 win32/win32.c  	pipemode = O_TEXT;
O_TEXT           1599 win32/win32.c      if (flags & O_TEXT)


O_TRUNC

O_TRUNC           811 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           783 ext/nkf/nkf-utf8/nkf.c                       fd = open(outfname, O_WRONLY | O_CREAT | O_TRUNC,
O_TRUNC           232 ext/stringio/stringio.c 	    trunc = flags & O_TRUNC;
O_TRUNC          2580 io.c           	flags |= O_WRONLY | O_CREAT | O_TRUNC;
O_TRUNC          5758 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          783 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           96 io.c           #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
O_WRONLY         2541 io.c               switch (mode & (O_RDONLY|O_WRONLY|O_RDWR)) {
O_WRONLY         2545 io.c                 case O_WRONLY:
O_WRONLY         2580 io.c           	flags |= O_WRONLY | O_CREAT | O_TRUNC;
O_WRONLY         2583 io.c           	flags |= O_WRONLY | O_CREAT | O_APPEND;
O_WRONLY         2625 io.c               switch (flags & (O_RDONLY|O_WRONLY|O_RDWR)) {
O_WRONLY         2628 io.c                 case O_WRONLY:
O_WRONLY         5035 io.c               args[2] = INT2FIX(O_WRONLY);
O_WRONLY         5543 io.c           	{"", O_WRONLY | O_BINARY},
O_WRONLY         5746 io.c               rb_file_const("WRONLY", INT2FIX(O_WRONLY));
O_WRONLY          596 win32/win32.c      writing = (mode & (O_WRONLY | O_RDWR)) ? TRUE : FALSE;
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());


OpenFile

OpenFile          554 ext/dl/dl.c      OpenFile *fptr;
OpenFile           59 ext/io/wait/wait.c     OpenFile *fptr;
OpenFile           87 ext/io/wait/wait.c     OpenFile *fptr;
OpenFile           22 ext/openssl/ossl_bio.c 	OpenFile *fptr;
OpenFile          539 ext/openssl/ossl_ssl.c     OpenFile *fptr;
OpenFile          580 ext/openssl/ossl_ssl.c     OpenFile *fptr;
OpenFile          624 ext/openssl/ossl_ssl.c     OpenFile *fptr;
OpenFile          681 ext/openssl/ossl_ssl.c     OpenFile *fptr;
OpenFile          418 ext/pty/pty.c      OpenFile *wfptr,*rfptr;
OpenFile           62 ext/readline/readline.c     OpenFile *ofp, *ifp;
OpenFile          210 ext/socket/socket.c     OpenFile *fp;
OpenFile          225 ext/socket/socket.c     OpenFile *fptr;
OpenFile          241 ext/socket/socket.c     OpenFile *fptr;
OpenFile          266 ext/socket/socket.c     OpenFile *fptr;
OpenFile          285 ext/socket/socket.c     OpenFile *fptr;
OpenFile          350 ext/socket/socket.c     OpenFile *fptr;
OpenFile          433 ext/socket/socket.c     OpenFile *fptr;
OpenFile          457 ext/socket/socket.c     OpenFile *fptr;
OpenFile          471 ext/socket/socket.c     OpenFile *fptr;
OpenFile          487 ext/socket/socket.c     OpenFile *fptr;
OpenFile          540 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1196 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1349 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1363 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1394 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1441 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1456 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1537 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1555 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1580 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1624 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1671 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1684 ext/socket/socket.c         OpenFile *valfptr;
OpenFile         1751 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1855 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1869 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1890 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1907 ext/socket/socket.c     OpenFile *fptr;
OpenFile         2187 ext/socket/socket.c     OpenFile *fptr;
OpenFile         2284 ext/socket/socket.c     OpenFile *fptr;
OpenFile         2368 ext/socket/socket.c     OpenFile *fptr;
OpenFile         2580 ext/socket/socket.c     OpenFile *fptr;
OpenFile         2633 ext/socket/socket.c     OpenFile *fptr;
OpenFile          141 file.c             OpenFile *fptr;
OpenFile          655 file.c         	OpenFile *fptr;
OpenFile          676 file.c         	OpenFile *fptr;
OpenFile          742 file.c             OpenFile *fptr;
OpenFile          803 file.c             OpenFile *fptr;
OpenFile         1586 file.c             OpenFile *fptr;
OpenFile         1631 file.c             OpenFile *fptr;
OpenFile         1679 file.c             OpenFile *fptr;
OpenFile         1747 file.c             OpenFile *fptr;
OpenFile         1891 file.c             OpenFile *fptr;
OpenFile         3065 file.c             OpenFile *fptr;
OpenFile         3173 file.c             OpenFile *fptr;
OpenFile          224 io.c           static OpenFile *
OpenFile          514 io.c               OpenFile of;
OpenFile          545 io.c               OpenFile *fptr;
OpenFile          620 io.c               OpenFile *fptr;
OpenFile          649 io.c               OpenFile *fptr;
OpenFile          663 io.c               OpenFile *fptr;
OpenFile          727 io.c               OpenFile *fptr;
OpenFile          757 io.c               OpenFile *fptr;
OpenFile          806 io.c               OpenFile *fptr;
OpenFile          846 io.c               OpenFile *fptr;
OpenFile          871 io.c               OpenFile *fptr;
OpenFile          900 io.c               OpenFile *fptr;
OpenFile          932 io.c               OpenFile *fptr;
OpenFile          964 io.c               OpenFile *fptr;
OpenFile          983 io.c               OpenFile *fptr;
OpenFile         1098 io.c               OpenFile of;
OpenFile         1174 io.c               OpenFile *fptr;
OpenFile         1317 io.c               OpenFile *fptr;
OpenFile         1552 io.c               OpenFile *fptr;
OpenFile         1609 io.c               OpenFile *fptr;
OpenFile         1677 io.c               OpenFile *fptr;
OpenFile         1705 io.c               OpenFile *fptr;
OpenFile         1858 io.c               OpenFile *fptr;
OpenFile         1903 io.c               OpenFile *fptr;
OpenFile         1987 io.c               OpenFile *fptr;
OpenFile         2017 io.c               OpenFile *fptr;
OpenFile         2100 io.c               OpenFile *fptr;
OpenFile         2182 io.c               OpenFile *fptr;
OpenFile         2211 io.c               OpenFile *fptr;
OpenFile         2256 io.c               OpenFile *fptr;
OpenFile         2298 io.c               OpenFile *fptr;
OpenFile         2336 io.c               OpenFile *fptr;
OpenFile         2384 io.c               OpenFile *fptr;
OpenFile         2447 io.c               OpenFile *fptr;
OpenFile         2731 io.c               OpenFile *fptr;
OpenFile         2755 io.c               OpenFile *fptr;
OpenFile         2780 io.c               OpenFile *fptr;
OpenFile         2883 io.c               OpenFile *fptr;
OpenFile         3354 io.c               OpenFile *fptr, *orig;
OpenFile         3472 io.c               OpenFile *fptr;
OpenFile         3486 io.c           	fptr = RFILE(file)->fptr = ALLOC(OpenFile);
OpenFile         3487 io.c           	MEMZERO(fptr, OpenFile, 1);
OpenFile         3532 io.c               OpenFile *fptr, *orig;
OpenFile         4003 io.c               OpenFile *fp;
OpenFile         4024 io.c               OpenFile *fptr;
OpenFile         4056 io.c               OpenFile *fp;
OpenFile         4211 io.c               OpenFile *fptr;
OpenFile         4518 io.c               OpenFile *fptr;
OpenFile         4555 io.c               OpenFile *fptr;
OpenFile         4717 io.c               OpenFile *fptr;
OpenFile           30 rubyio.h           void (*finalize) _((struct OpenFile*,int)); /* finalize proc */
OpenFile           54 rubyio.h           fp = RFILE(obj)->fptr = ALLOC(OpenFile);\


PACK_ITEM_ADJUST

PACK_ITEM_ADJUST 1495 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1504 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1516 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1527 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1538 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1549 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1561 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1571 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1581 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1600 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1611 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1622 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1633 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 1673 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1685 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1699 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1713 pack.c         	    PACK_ITEM_ADJUST();


PACK_LENGTH_ADJUST

PACK_LENGTH_ADJUST 1489 pack.c         	    PACK_LENGTH_ADJUST(char,sizeof(char));
PACK_LENGTH_ADJUST 1499 pack.c         	    PACK_LENGTH_ADJUST(unsigned char,sizeof(unsigned char));
PACK_LENGTH_ADJUST 1508 pack.c         	    PACK_LENGTH_ADJUST(short,2);
PACK_LENGTH_ADJUST 1520 pack.c         	    PACK_LENGTH_ADJUST(unsigned short,2);
PACK_LENGTH_ADJUST 1531 pack.c         	    PACK_LENGTH_ADJUST(int,sizeof(int));
PACK_LENGTH_ADJUST 1542 pack.c         	    PACK_LENGTH_ADJUST(unsigned int,sizeof(unsigned int));
PACK_LENGTH_ADJUST 1553 pack.c         	    PACK_LENGTH_ADJUST(long,4);
PACK_LENGTH_ADJUST 1564 pack.c         	    PACK_LENGTH_ADJUST(unsigned long,4);
PACK_LENGTH_ADJUST 1593 pack.c         	    PACK_LENGTH_ADJUST(unsigned short,2);
PACK_LENGTH_ADJUST 1604 pack.c         	    PACK_LENGTH_ADJUST(unsigned long,4);
PACK_LENGTH_ADJUST 1615 pack.c         	    PACK_LENGTH_ADJUST(unsigned short,2);
PACK_LENGTH_ADJUST 1626 pack.c         	    PACK_LENGTH_ADJUST(unsigned long,4);
PACK_LENGTH_ADJUST 1638 pack.c         	    PACK_LENGTH_ADJUST(float,sizeof(float));
PACK_LENGTH_ADJUST 1649 pack.c         	    PACK_LENGTH_ADJUST(float,sizeof(float));
PACK_LENGTH_ADJUST 1663 pack.c         	    PACK_LENGTH_ADJUST(double,sizeof(double));
PACK_LENGTH_ADJUST 1678 pack.c         	    PACK_LENGTH_ADJUST(double,sizeof(double));
PACK_LENGTH_ADJUST 1689 pack.c         	    PACK_LENGTH_ADJUST(float,sizeof(float));
PACK_LENGTH_ADJUST 1703 pack.c         	    PACK_LENGTH_ADJUST(double,sizeof(double));


PACK_LENGTH_ADJUST_SIZE

PACK_LENGTH_ADJUST_SIZE 1142 pack.c             PACK_LENGTH_ADJUST_SIZE(t__len);		\
PACK_LENGTH_ADJUST_SIZE 1146 pack.c             PACK_LENGTH_ADJUST_SIZE(sizeof(type))
PACK_LENGTH_ADJUST_SIZE 1575 pack.c         	    PACK_LENGTH_ADJUST_SIZE(QUAD_SIZE);
PACK_LENGTH_ADJUST_SIZE 1584 pack.c         	    PACK_LENGTH_ADJUST_SIZE(QUAD_SIZE);


PAD

PAD               919 missing/vsnprintf.c 			PAD(width - realsz, blanks);
PAD               932 missing/vsnprintf.c 			PAD(width - realsz, zeroes);
PAD               935 missing/vsnprintf.c 		PAD(dprec - fieldsz, zeroes);
PAD               950 missing/vsnprintf.c 						PAD(ndig - 1, zeroes);
PAD               954 missing/vsnprintf.c 					PAD(-expt, zeroes);
PAD               958 missing/vsnprintf.c 					PAD(expt - ndig, zeroes);
PAD               976 missing/vsnprintf.c 						PAD(ndig - 1, zeroes);
PAD               987 missing/vsnprintf.c 			PAD(width - realsz, blanks);


PADSIZE

PADSIZE           503 missing/vsnprintf.c 	static char blanks[PADSIZE] =
PADSIZE           505 missing/vsnprintf.c 	static char zeroes[PADSIZE] =
PADSIZE           524 missing/vsnprintf.c 		while (n > PADSIZE) { \
PADSIZE           525 missing/vsnprintf.c 			PRINT(with, PADSIZE); \
PADSIZE           526 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);


PATFETCH

PATFETCH          587 regex.c                PATFETCH(c); 							\
PATFETCH          594 regex.c        	  PATFETCH(c); 							\
PATFETCH         1310 regex.c            PATFETCH(c);
PATFETCH         1356 regex.c        	PATFETCH(c);
PATFETCH         1645 regex.c        	    PATFETCH(c);
PATFETCH         1737 regex.c        	PATFETCH(c);
PATFETCH         1799 regex.c        	      PATFETCH(c);
PATFETCH         2043 regex.c        	PATFETCH(c);
PATFETCH         2191 regex.c              PATFETCH(c);
PATFETCH         2351 regex.c        	  PATFETCH(c);


PATFETCH_MBC

PATFETCH_MBC     1487 regex.c        	  PATFETCH_MBC(c);
PATFETCH_MBC     1594 regex.c        	      PATFETCH_MBC(c);


PATFETCH_RAW

PATFETCH_RAW     1157 regex.c          PATFETCH_RAW(c);
PATFETCH_RAW     1160 regex.c            PATFETCH_RAW(c);
PATFETCH_RAW     1162 regex.c            PATFETCH_RAW(c);
PATFETCH_RAW     1173 regex.c            PATFETCH_RAW(c);
PATFETCH_RAW     1176 regex.c            PATFETCH_RAW(c);
PATFETCH_RAW     1468 regex.c        	PATFETCH_RAW(c);
PATFETCH_RAW     1501 regex.c        	  PATFETCH_RAW(c);
PATFETCH_RAW     1604 regex.c        	  PATFETCH_RAW(c);
PATFETCH_RAW     1612 regex.c        	    PATFETCH_RAW(c);
PATFETCH_RAW     1703 regex.c        	  PATFETCH_RAW(c1);
PATFETCH_RAW     1741 regex.c        	  PATFETCH_RAW(c);
PATFETCH_RAW     1793 regex.c        	      PATFETCH_RAW(c);
PATFETCH_RAW     2200 regex.c              PATFETCH_RAW(c);
PATFETCH_RAW     2400 regex.c        	  PATFETCH_RAW(c);


PATH_ENV

PATH_ENV         1658 dln.c          	path = getenv(PATH_ENV);
PATH_ENV         1665 hash.c         	if (strcasecmp(nam, PATH_ENV) == 0)
PATH_ENV         1667 hash.c         	if (strcmp(nam, PATH_ENV) == 0)
PATH_ENV         1702 hash.c         	if (strcasecmp(nam, PATH_ENV) == 0 && !rb_env_path_tainted())
PATH_ENV         1704 hash.c         	if (strcmp(nam, PATH_ENV) == 0 && !rb_env_path_tainted())
PATH_ENV         1745 hash.c             if (strcasecmp(nam, PATH_ENV) == 0 && !rb_env_path_tainted())
PATH_ENV         1747 hash.c             if (strcmp(nam, PATH_ENV) == 0 && !rb_env_path_tainted())
PATH_ENV         1764 hash.c         	path_tainted_p(getenv(PATH_ENV));
PATH_ENV         1906 hash.c             if (strcasecmp(name, PATH_ENV) == 0) {
PATH_ENV         1908 hash.c             if (strcmp(name, PATH_ENV) == 0) {
PATH_ENV          792 ruby.c         		    script = dln_find_file(argv[0], getenv(PATH_ENV));


PATH_MAX

PATH_MAX          340 util.c             char path_buffer[PATH_MAX];
PATH_MAX          346 util.c             if (PATH_MAX <= len)
PATH_MAX          654 util.c         # ifndef PATH_MAX
PATH_MAX          657 util.c             char *buf = xmalloc(PATH_MAX+1);


PATH_SEP

PATH_SEP          242 defines.h      #define PATH_SEP_CHAR PATH_SEP[0]
PATH_SEP         1751 dln.c          	ep = strchr(dp, PATH_SEP[0]);
PATH_SEP         4258 file.c         	tmp = rb_ary_join(tmp, rb_str_new2(PATH_SEP));
PATH_SEP         4405 file.c             rb_define_const(rb_cFile, "PATH_SEPARATOR", rb_obj_freeze(rb_str_new2(PATH_SEP)));


PATH_SEP_CHAR

PATH_SEP_CHAR    4106 file.c             const char sep = PATH_SEP_CHAR;
PATH_SEP_CHAR     178 ruby.c             const char sep = PATH_SEP_CHAR;


PATUNFETCH

PATUNFETCH       1365 regex.c        	  PATUNFETCH;
PATUNFETCH       1571 regex.c        	    PATUNFETCH;
PATUNFETCH       1671 regex.c        	      PATUNFETCH;
PATUNFETCH       1816 regex.c        	  PATUNFETCH;
PATUNFETCH       2045 regex.c        	else PATUNFETCH;
PATUNFETCH       2310 regex.c        	PATUNFETCH;
PATUNFETCH       2316 regex.c        	if (!ISDIGIT(c)) PATUNFETCH;


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)) {


PERIOD

PERIOD            151 dir.c          	    if (!*s || ISDIRSEP(*s) || PERIOD(s))
PERIOD            159 dir.c          	    if (PERIOD(s))
PERIOD            191 dir.c          	    if (!*s || ISDIRSEP(*s) || PERIOD(s))


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           350 ext/nkf/nkf-utf8/nkf.c #if defined(PERL_XS) || defined(WIN32DLL)
PERL_XS           665 ext/nkf/nkf-utf8/nkf.c #elif defined(PERL_XS)
PERL_XS          1141 ext/nkf/nkf-utf8/nkf.c #ifndef PERL_XS
PERL_XS          1291 ext/nkf/nkf-utf8/nkf.c #ifndef PERL_XS
PERL_XS          1317 ext/nkf/nkf-utf8/nkf.c #ifndef PERL_XS
PERL_XS          4574 ext/nkf/nkf-utf8/nkf.c #if defined(PERL_XS) || defined(WIN32DLL)
PERL_XS          4703 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         96 ext/win32ole/win32ole.c         PEVENTSINK,
PEVENTSINK         99 ext/win32ole/win32ole.c     STDMETHOD_(ULONG, AddRef)(PEVENTSINK);
PEVENTSINK        100 ext/win32ole/win32ole.c     STDMETHOD_(ULONG, Release)(PEVENTSINK);
PEVENTSINK        103 ext/win32ole/win32ole.c         PEVENTSINK,
PEVENTSINK        106 ext/win32ole/win32ole.c         PEVENTSINK,
PEVENTSINK        111 ext/win32ole/win32ole.c         PEVENTSINK,
PEVENTSINK        118 ext/win32ole/win32ole.c         PEVENTSINK,
PEVENTSINK       5341 ext/win32ole/win32ole.c     PEVENTSINK pEV,
PEVENTSINK       5360 ext/win32ole/win32ole.c     PEVENTSINK pEV
PEVENTSINK       5367 ext/win32ole/win32ole.c     PEVENTSINK pEV
PEVENTSINK       5378 ext/win32ole/win32ole.c     PEVENTSINK pEV,
PEVENTSINK       5386 ext/win32ole/win32ole.c     PEVENTSINK pEV,
PEVENTSINK       5396 ext/win32ole/win32ole.c     PEVENTSINK pEV,
PEVENTSINK       5549 ext/win32ole/win32ole.c     PEVENTSINK pEventSink,


PF_INET

PF_INET           134 ext/socket/getaddrinfo.c 	{PF_INET, sizeof(struct in_addr),
PF_INET           329 ext/socket/getaddrinfo.c 		case PF_INET:
PF_INET           102 ext/socket/getnameinfo.c 	{PF_INET, sizeof(struct in_addr),
PF_INET           134 ext/socket/socket.c     PF_INET, PF_INET6, PF_UNSPEC,
PF_INET           136 ext/socket/socket.c     PF_INET6, PF_INET, PF_UNSPEC,
PF_INET          1952 ext/socket/socket.c #ifdef PF_INET
PF_INET          1954 ext/socket/socket.c 	    *dv = PF_INET;
PF_INET          2862 ext/socket/socket.c 	    hints.ai_family = PF_INET;
PF_INET          2988 ext/socket/socket.c 		hints.ai_family = PF_INET;
PF_INET          3259 ext/socket/socket.c #ifdef PF_INET
PF_INET          3260 ext/socket/socket.c     sock_define_const("PF_INET", PF_INET);
PF_INET            68 ext/socket/sockport.h #ifndef PF_INET


PF_UNSPEC

PF_UNSPEC         309 ext/socket/getaddrinfo.c 	pai->ai_family = PF_UNSPEC;
PF_UNSPEC         328 ext/socket/getaddrinfo.c 		case PF_UNSPEC:
PF_UNSPEC         433 ext/socket/getaddrinfo.c 			if (!(pai->ai_family == PF_UNSPEC
PF_UNSPEC         503 ext/socket/getaddrinfo.c 			    pai->ai_family == PF_UNSPEC) {
PF_UNSPEC         134 ext/socket/socket.c     PF_INET, PF_INET6, PF_UNSPEC,
PF_UNSPEC         136 ext/socket/socket.c     PF_INET6, PF_INET, PF_UNSPEC,
PF_UNSPEC         152 ext/socket/socket.c     if (hints->ai_family != PF_UNSPEC) {
PF_UNSPEC         162 ext/socket/socket.c 	    if (tmp_hints.ai_family == PF_UNSPEC) {
PF_UNSPEC        2855 ext/socket/socket.c 	hints.ai_family = PF_UNSPEC;
PF_UNSPEC        2981 ext/socket/socket.c 	    hints.ai_family = PF_UNSPEC;
PF_UNSPEC        3280 ext/socket/socket.c     sock_define_const("PF_UNSPEC", PF_UNSPEC);
PF_UNSPEC          64 ext/socket/sockport.h #ifndef PF_UNSPEC


PIEVENTSINKOBJ

PIEVENTSINKOBJ   5337 ext/win32ole/win32ole.c void EVENTSINK_Destructor(PIEVENTSINKOBJ);
PIEVENTSINKOBJ   5347 ext/win32ole/win32ole.c         IsEqualIID(iid, &((PIEVENTSINKOBJ)pEV)->m_iid)) {
PIEVENTSINKOBJ   5362 ext/win32ole/win32ole.c     PIEVENTSINKOBJ pEVObj = (PIEVENTSINKOBJ)pEV;
PIEVENTSINKOBJ   5369 ext/win32ole/win32ole.c     PIEVENTSINKOBJ pEVObj = (PIEVENTSINKOBJ)pEV;
PIEVENTSINKOBJ   5569 ext/win32ole/win32ole.c     PIEVENTSINKOBJ pEV = (PIEVENTSINKOBJ)pEventSink;
PIEVENTSINKOBJ   5620 ext/win32ole/win32ole.c PIEVENTSINKOBJ
PIEVENTSINKOBJ   5622 ext/win32ole/win32ole.c     PIEVENTSINKOBJ pEv;
PIEVENTSINKOBJ   5647 ext/win32ole/win32ole.c     PIEVENTSINKOBJ pEVObj


PIPE_BUF

PIPE_BUF          103 io.c           #ifndef PIPE_BUF
PIPE_BUF          448 io.c                   if (PIPE_BUF < l &&
PIPE_BUF          452 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();


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               494 util.c           POP(L,R);


POP_BLOCK

POP_BLOCK        3132 eval.c         	    POP_BLOCK();
POP_BLOCK        5218 eval.c             POP_BLOCK();
POP_BLOCK        8180 eval.c             POP_BLOCK();


POP_CLASS

POP_CLASS        1646 eval.c             POP_CLASS();
POP_CLASS        4090 eval.c             POP_CLASS();
POP_CLASS        4925 eval.c             POP_CLASS();
POP_CLASS        5834 eval.c         	    POP_CLASS();
POP_CLASS        6317 eval.c             POP_CLASS();
POP_CLASS        6469 eval.c             POP_CLASS();
POP_CLASS        6732 eval.c             POP_CLASS();


POP_CREF

POP_CREF         4087 eval.c             POP_CREF();
POP_CREF         6466 eval.c             if (cbase) POP_CREF();


POP_FAILURE_COUNT

POP_FAILURE_COUNT 3441 regex.c              POP_FAILURE_COUNT();      /* Remove the counter info.  */		\
POP_FAILURE_COUNT 4335 regex.c        	POP_FAILURE_COUNT();


POP_FAILURE_POINT

POP_FAILURE_POINT 3667 regex.c        	  POP_FAILURE_POINT();
POP_FAILURE_POINT 3807 regex.c        	POP_FAILURE_POINT();
POP_FAILURE_POINT 3813 regex.c        	POP_FAILURE_POINT();
POP_FAILURE_POINT 3819 regex.c        	POP_FAILURE_POINT();
POP_FAILURE_POINT 4036 regex.c        	  POP_FAILURE_POINT();
POP_FAILURE_POINT 4039 regex.c        	POP_FAILURE_POINT();
POP_FAILURE_POINT 4140 regex.c        	POP_FAILURE_POINT();
POP_FAILURE_POINT 4159 regex.c        	  POP_FAILURE_POINT();
POP_FAILURE_POINT 4309 regex.c        	POP_FAILURE_POINT();


POP_FRAME

POP_FRAME        1645 eval.c             POP_FRAME();
POP_FRAME        1793 eval.c             POP_FRAME();
POP_FRAME        2649 eval.c             POP_FRAME();
POP_FRAME        4623 eval.c         	POP_FRAME();
POP_FRAME        5523 eval.c         	POP_FRAME();
POP_FRAME        5864 eval.c             POP_FRAME();
POP_FRAME        6428 eval.c         	POP_FRAME();
POP_FRAME        6468 eval.c             POP_FRAME();
POP_FRAME        6730 eval.c             POP_FRAME();
POP_FRAME        7653 eval.c             POP_FRAME();
POP_FRAME        7664 eval.c             POP_FRAME();
POP_FRAME        9270 eval.c             POP_FRAME();


POP_ITER

POP_ITER         1520 eval.c             POP_ITER();
POP_ITER         1545 eval.c             POP_ITER();
POP_ITER         1768 eval.c         	POP_ITER();
POP_ITER         2214 eval.c             POP_ITER();\
POP_ITER         3122 eval.c         		POP_ITER();
POP_ITER         4923 eval.c             POP_ITER();
POP_ITER         5220 eval.c             POP_ITER();
POP_ITER         5865 eval.c             POP_ITER();
POP_ITER         5969 eval.c             POP_ITER();
POP_ITER         6089 eval.c             POP_ITER();
POP_ITER         6731 eval.c             POP_ITER();
POP_ITER         7402 eval.c             POP_ITER();
POP_ITER         7654 eval.c             POP_ITER();
POP_ITER         8392 eval.c             POP_ITER();
POP_ITER         8657 eval.c         	POP_ITER();
POP_ITER         8677 eval.c         	POP_ITER();
POP_ITER         8712 eval.c             POP_ITER();
POP_ITER         9002 eval.c             POP_ITER();
POP_ITER         9271 eval.c             POP_ITER();
POP_ITER         9813 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        1349 eval.c             POP_SCOPE();
POP_SCOPE        1644 eval.c             POP_SCOPE();
POP_SCOPE        3467 eval.c         	    POP_SCOPE();
POP_SCOPE        4089 eval.c             POP_SCOPE();
POP_SCOPE        5835 eval.c         	    POP_SCOPE();
POP_SCOPE        6729 eval.c             POP_SCOPE();


POP_TAG

POP_TAG          1272 eval.c             POP_TAG();
POP_TAG          1344 eval.c             POP_TAG();
POP_TAG          1467 eval.c             POP_TAG();
POP_TAG          1479 eval.c             POP_TAG();
POP_TAG          1524 eval.c             POP_TAG();
POP_TAG          1546 eval.c             POP_TAG();
POP_TAG          1767 eval.c         	POP_TAG();
POP_TAG          1792 eval.c             POP_TAG();
POP_TAG          2286 eval.c         	POP_TAG();
POP_TAG          2386 eval.c         	POP_TAG();
POP_TAG          2435 eval.c         	POP_TAG();
POP_TAG          2648 eval.c             POP_TAG();
POP_TAG          2920 eval.c         	POP_TAG();
POP_TAG          3055 eval.c         	POP_TAG();
POP_TAG          3090 eval.c         	POP_TAG();
POP_TAG          3133 eval.c         	    POP_TAG();
POP_TAG          3229 eval.c         	    POP_TAG();
POP_TAG          3247 eval.c         	POP_TAG();
POP_TAG          3466 eval.c         	    POP_TAG();
POP_TAG          4086 eval.c             POP_TAG();
POP_TAG          4491 eval.c         	POP_TAG();
POP_TAG          4868 eval.c         	POP_TAG();
POP_TAG          4922 eval.c             POP_TAG();
POP_TAG          5219 eval.c             POP_TAG();
POP_TAG          5307 eval.c             POP_TAG();
POP_TAG          5338 eval.c             POP_TAG();
POP_TAG          5364 eval.c             POP_TAG();
POP_TAG          5389 eval.c         	POP_TAG();
POP_TAG          5410 eval.c         	POP_TAG();
POP_TAG          5685 eval.c         		POP_TAG();
POP_TAG          5832 eval.c         	    POP_TAG();
POP_TAG          6038 eval.c             POP_TAG();
POP_TAG          6316 eval.c             POP_TAG();
POP_TAG          6465 eval.c             POP_TAG();
POP_TAG          6726 eval.c             POP_TAG();
POP_TAG          6756 eval.c             POP_TAG();
POP_TAG          7052 eval.c             POP_TAG();
POP_TAG          7717 eval.c         	    POP_TAG();
POP_TAG          7735 eval.c         	    POP_TAG();
POP_TAG          8391 eval.c             POP_TAG();
POP_TAG          8711 eval.c             POP_TAG();
POP_TAG          11656 eval.c             POP_TAG();
POP_TAG          12826 eval.c             POP_TAG();


POP_VARS

POP_VARS         4088 eval.c             POP_VARS();
POP_VARS         4940 eval.c             POP_VARS();
POP_VARS         5833 eval.c         	    POP_VARS();
POP_VARS         6733 eval.c             POP_VARS();
POP_VARS         8395 eval.c             POP_VARS();


POSFIXABLE

POSFIXABLE        116 bignum.c       		    if (POSFIXABLE(num)) return LONG2FIX(num);
POSFIXABLE        176 bignum.c           if (POSFIXABLE(n)) return LONG2FIX(n);
POSFIXABLE        238 bignum.c       	if (POSFIXABLE(q)) return LONG2FIX(q);
POSFIXABLE        437 bignum.c       	if (POSFIXABLE(val)) {
POSFIXABLE        585 bignum.c           if (POSFIXABLE(n)) return LONG2FIX(n);
POSFIXABLE        853 bignum.c           while (!POSFIXABLE(u) || 0 != (long)u) {
POSFIXABLE        162 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


PREFETCH

PREFETCH         3773 regex.c        	    PREFETCH;
PREFETCH         3823 regex.c        	PREFETCH;
PREFETCH         3841 regex.c        	  PREFETCH;
PREFETCH         3865 regex.c        	  PREFETCH;
PREFETCH         4226 regex.c        	PREFETCH;
PREFETCH         4236 regex.c        	PREFETCH;
PREFETCH         4255 regex.c        	    PREFETCH;
PREFETCH         4286 regex.c        	    PREFETCH;


PREV_IS_A_LETTER

PREV_IS_A_LETTER 4194 regex.c        	  if (PREV_IS_A_LETTER(d)) break;
PREV_IS_A_LETTER 4197 regex.c        	if (PREV_IS_A_LETTER(d) != IS_A_LETTER(d))
PREV_IS_A_LETTER 4207 regex.c        	  if (PREV_IS_A_LETTER(d)) goto fail;
PREV_IS_A_LETTER 4210 regex.c        	if (PREV_IS_A_LETTER(d) != IS_A_LETTER(d))
PREV_IS_A_LETTER 4215 regex.c        	if (IS_A_LETTER(d) && (AT_STRINGS_BEG(d) || !PREV_IS_A_LETTER(d)))
PREV_IS_A_LETTER 4220 regex.c        	if (!AT_STRINGS_BEG(d) && PREV_IS_A_LETTER(d)


PRINT

PRINT             525 missing/vsnprintf.c 			PRINT(with, PADSIZE); \
PRINT             528 missing/vsnprintf.c 		PRINT(with, n); \
PRINT             569 missing/vsnprintf.c 			PRINT(cp, n);
PRINT             923 missing/vsnprintf.c 			PRINT(&sign, 1);
PRINT             927 missing/vsnprintf.c 			PRINT(ox, 2);
PRINT             940 missing/vsnprintf.c 			PRINT(cp, size);
PRINT             947 missing/vsnprintf.c 						PRINT("0", 1);
PRINT             949 missing/vsnprintf.c 						PRINT("0.", 2);
PRINT             953 missing/vsnprintf.c 					PRINT("0.", 2);
PRINT             955 missing/vsnprintf.c 					PRINT(cp, ndig);
PRINT             957 missing/vsnprintf.c 					PRINT(cp, ndig);
PRINT             960 missing/vsnprintf.c 						PRINT(".", 1);
PRINT             962 missing/vsnprintf.c 					PRINT(cp, expt);
PRINT             964 missing/vsnprintf.c 					PRINT(".", 1);
PRINT             965 missing/vsnprintf.c 					PRINT(cp, ndig-expt);
PRINT             971 missing/vsnprintf.c 					PRINT(ox, 2);
PRINT             973 missing/vsnprintf.c 						PRINT(cp, ndig-1);
PRINT             978 missing/vsnprintf.c 					PRINT(cp, 1);
PRINT             979 missing/vsnprintf.c 				PRINT(expstr, expsize);
PRINT             983 missing/vsnprintf.c 		PRINT(cp, size);


PROC_TMASK

PROC_TMASK       8187 eval.c         #define PROC_TMAX   (PROC_TMASK >> PROC_TSHIFT)
PROC_TMASK       8189 eval.c         #define SAFE_LEVEL_MAX PROC_TMASK
PROC_TMASK       8197 eval.c             FL_SET(data, (safe << PROC_TSHIFT) & PROC_TMASK);
PROC_TMASK       8204 eval.c             return (RBASIC(data)->flags & PROC_TMASK) >> PROC_TSHIFT;


PROC_TSHIFT

PROC_TSHIFT      8187 eval.c         #define PROC_TMAX   (PROC_TMASK >> PROC_TSHIFT)
PROC_TSHIFT      8197 eval.c             FL_SET(data, (safe << PROC_TSHIFT) & PROC_TMASK);
PROC_TSHIFT      8204 eval.c             return (RBASIC(data)->flags & PROC_TMASK) >> PROC_TSHIFT;


PROTO

PROTO             282 ext/nkf/nkf-utf8/nkf.c     void (*status_func)PROTO((struct input_code *, int));
PROTO             283 ext/nkf/nkf-utf8/nkf.c     int (*iconv_func)PROTO((int c2, int c1, int c0));
PROTO             289 ext/nkf/nkf-utf8/nkf.c STATIC  int     noconvert PROTO((FILE *f));
PROTO             290 ext/nkf/nkf-utf8/nkf.c STATIC  int     kanji_convert PROTO((FILE *f));
PROTO             291 ext/nkf/nkf-utf8/nkf.c STATIC  int     h_conv PROTO((FILE *f,int c2,int c1));
PROTO             292 ext/nkf/nkf-utf8/nkf.c STATIC  int     push_hold_buf PROTO((int c2));
PROTO             293 ext/nkf/nkf-utf8/nkf.c STATIC  void    set_iconv PROTO((int f, int (*iconv_func)(int c2,int c1,int c0)));
PROTO             294 ext/nkf/nkf-utf8/nkf.c STATIC  int     s_iconv PROTO((int c2,int c1,int c0));
PROTO             295 ext/nkf/nkf-utf8/nkf.c STATIC  int     s2e_conv PROTO((int c2, int c1, int *p2, int *p1));
PROTO             296 ext/nkf/nkf-utf8/nkf.c STATIC  int     e_iconv PROTO((int c2,int c1,int c0));
PROTO             298 ext/nkf/nkf-utf8/nkf.c STATIC  int     w2e_conv PROTO((int c2,int c1,int c0,int *p2,int *p1));
PROTO             299 ext/nkf/nkf-utf8/nkf.c STATIC  int     w_iconv PROTO((int c2,int c1,int c0));
PROTO             300 ext/nkf/nkf-utf8/nkf.c STATIC  int     w_iconv16 PROTO((int c2,int c1,int c0));
PROTO             301 ext/nkf/nkf-utf8/nkf.c STATIC  int	w_iconv_common PROTO((int c1,int c0,unsigned short **pp,int psize,int *p2,int *p1));
PROTO             302 ext/nkf/nkf-utf8/nkf.c STATIC  int     ww16_conv PROTO((int c2, int c1, int c0));
PROTO             305 ext/nkf/nkf-utf8/nkf.c STATIC  int     e2w_conv PROTO((int c2,int c1));
PROTO             306 ext/nkf/nkf-utf8/nkf.c STATIC  void    w_oconv PROTO((int c2,int c1));
PROTO             307 ext/nkf/nkf-utf8/nkf.c STATIC  void    w_oconv16 PROTO((int c2,int c1));
PROTO             309 ext/nkf/nkf-utf8/nkf.c STATIC  void    e_oconv PROTO((int c2,int c1));
PROTO             310 ext/nkf/nkf-utf8/nkf.c STATIC  int     e2s_conv PROTO((int c2, int c1, int *p2, int *p1));
PROTO             311 ext/nkf/nkf-utf8/nkf.c STATIC  void    s_oconv PROTO((int c2,int c1));
PROTO             312 ext/nkf/nkf-utf8/nkf.c STATIC  void    j_oconv PROTO((int c2,int c1));
PROTO             313 ext/nkf/nkf-utf8/nkf.c STATIC  void    fold_conv PROTO((int c2,int c1));
PROTO             314 ext/nkf/nkf-utf8/nkf.c STATIC  void    cr_conv PROTO((int c2,int c1));
PROTO             315 ext/nkf/nkf-utf8/nkf.c STATIC  void    z_conv PROTO((int c2,int c1));
PROTO             316 ext/nkf/nkf-utf8/nkf.c STATIC  void    rot_conv PROTO((int c2,int c1));
PROTO             317 ext/nkf/nkf-utf8/nkf.c STATIC  void    hira_conv PROTO((int c2,int c1));
PROTO             318 ext/nkf/nkf-utf8/nkf.c STATIC  void    base64_conv PROTO((int c2,int c1));
PROTO             319 ext/nkf/nkf-utf8/nkf.c STATIC  void    iso2022jp_check_conv PROTO((int c2,int c1));
PROTO             320 ext/nkf/nkf-utf8/nkf.c STATIC  void    no_connection PROTO((int c2,int c1));
PROTO             321 ext/nkf/nkf-utf8/nkf.c STATIC  int     no_connection2 PROTO((int c2,int c1,int c0));
PROTO             323 ext/nkf/nkf-utf8/nkf.c STATIC  void    code_score PROTO((struct input_code *ptr));
PROTO             324 ext/nkf/nkf-utf8/nkf.c STATIC  void    code_status PROTO((int c));
PROTO             326 ext/nkf/nkf-utf8/nkf.c STATIC  void    std_putc PROTO((int c));
PROTO             327 ext/nkf/nkf-utf8/nkf.c STATIC  int     std_getc PROTO((FILE *f));
PROTO             328 ext/nkf/nkf-utf8/nkf.c STATIC  int     std_ungetc PROTO((int c,FILE *f));
PROTO             330 ext/nkf/nkf-utf8/nkf.c STATIC  int     broken_getc PROTO((FILE *f));
PROTO             331 ext/nkf/nkf-utf8/nkf.c STATIC  int     broken_ungetc PROTO((int c,FILE *f));
PROTO             333 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_begin PROTO((FILE *f));
PROTO             334 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_getc PROTO((FILE *f));
PROTO             335 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_ungetc PROTO((int c,FILE *f));
PROTO             337 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_begin_strict PROTO((FILE *f));
PROTO             338 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_getc_buf PROTO((FILE *f));
PROTO             339 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_ungetc_buf  PROTO((int c,FILE *f));
PROTO             340 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_integrity PROTO((FILE *f,unsigned char *p));
PROTO             342 ext/nkf/nkf-utf8/nkf.c STATIC  int     base64decode PROTO((int c));
PROTO             343 ext/nkf/nkf-utf8/nkf.c STATIC  void    mime_prechar PROTO((int c2, int c1));
PROTO             344 ext/nkf/nkf-utf8/nkf.c STATIC  void    mime_putc PROTO((int c));
PROTO             345 ext/nkf/nkf-utf8/nkf.c STATIC  void    open_mime PROTO((int c));
PROTO             346 ext/nkf/nkf-utf8/nkf.c STATIC  void    close_mime PROTO(());
PROTO             347 ext/nkf/nkf-utf8/nkf.c STATIC  void    usage PROTO(());
PROTO             348 ext/nkf/nkf-utf8/nkf.c STATIC  void    version PROTO(());
PROTO             349 ext/nkf/nkf-utf8/nkf.c STATIC  void    options PROTO((unsigned char *c));
PROTO             351 ext/nkf/nkf-utf8/nkf.c STATIC  void    reinit PROTO(());
PROTO             407 ext/nkf/nkf-utf8/nkf.c static int (*i_cgetc)PROTO((FILE *)) = std_getc; /* input of cgetc */
PROTO             408 ext/nkf/nkf-utf8/nkf.c static int (*i_cungetc)PROTO((int c ,FILE *f)) = std_ungetc;
PROTO             409 ext/nkf/nkf-utf8/nkf.c STATIC int cap_getc PROTO((FILE *f));
PROTO             410 ext/nkf/nkf-utf8/nkf.c STATIC int cap_ungetc PROTO((int c,FILE *f));
PROTO             413 ext/nkf/nkf-utf8/nkf.c static int (*i_ugetc)PROTO((FILE *)) = std_getc; /* input of ugetc */
PROTO             414 ext/nkf/nkf-utf8/nkf.c static int (*i_uungetc)PROTO((int c ,FILE *f)) = std_ungetc;
PROTO             415 ext/nkf/nkf-utf8/nkf.c STATIC int url_getc PROTO((FILE *f));
PROTO             416 ext/nkf/nkf-utf8/nkf.c STATIC int url_ungetc PROTO((int c,FILE *f));
PROTO             419 ext/nkf/nkf-utf8/nkf.c static int (*i_ngetc)PROTO((FILE *)) = std_getc; /* input of ugetc */
PROTO             420 ext/nkf/nkf-utf8/nkf.c static int (*i_nungetc)PROTO((int c ,FILE *f)) = std_ungetc;
PROTO             421 ext/nkf/nkf-utf8/nkf.c STATIC int numchar_getc PROTO((FILE *f));
PROTO             422 ext/nkf/nkf-utf8/nkf.c STATIC int numchar_ungetc PROTO((int c,FILE *f));
PROTO             427 ext/nkf/nkf-utf8/nkf.c STATIC void no_putc PROTO((int c));
PROTO             429 ext/nkf/nkf-utf8/nkf.c STATIC void debug PROTO((char *str));
PROTO             433 ext/nkf/nkf-utf8/nkf.c STATIC  void    print_guessed_code PROTO((char *filename));
PROTO             434 ext/nkf/nkf-utf8/nkf.c STATIC  void    set_input_codename PROTO((char *codename));
PROTO             456 ext/nkf/nkf-utf8/nkf.c static int x0212_shift PROTO((int c));
PROTO             457 ext/nkf/nkf-utf8/nkf.c static int x0212_unshift PROTO((int c));
PROTO             462 ext/nkf/nkf-utf8/nkf.c STATIC void e_status PROTO((struct input_code *, int));
PROTO             463 ext/nkf/nkf-utf8/nkf.c STATIC void s_status PROTO((struct input_code *, int));
PROTO             466 ext/nkf/nkf-utf8/nkf.c STATIC void w_status PROTO((struct input_code *, int));
PROTO             467 ext/nkf/nkf-utf8/nkf.c STATIC void w16_status PROTO((struct input_code *, int));
PROTO             518 ext/nkf/nkf-utf8/nkf.c static void (*output_conv)PROTO((int c2,int c1)) = DEFAULT_CONV;
PROTO             520 ext/nkf/nkf-utf8/nkf.c static void (*oconv)PROTO((int c2,int c1)) = no_connection;
PROTO             522 ext/nkf/nkf-utf8/nkf.c static int (*iconv)PROTO((int c2,int c1,int c0)) = no_connection2;
PROTO             524 ext/nkf/nkf-utf8/nkf.c static void (*o_zconv)PROTO((int c2,int c1)) = no_connection;
PROTO             525 ext/nkf/nkf-utf8/nkf.c static void (*o_fconv)PROTO((int c2,int c1)) = no_connection;
PROTO             526 ext/nkf/nkf-utf8/nkf.c static void (*o_crconv)PROTO((int c2,int c1)) = no_connection;
PROTO             527 ext/nkf/nkf-utf8/nkf.c static void (*o_rot_conv)PROTO((int c2,int c1)) = no_connection;
PROTO             528 ext/nkf/nkf-utf8/nkf.c static void (*o_hira_conv)PROTO((int c2,int c1)) = no_connection;
PROTO             529 ext/nkf/nkf-utf8/nkf.c static void (*o_base64conv)PROTO((int c2,int c1)) = no_connection;
PROTO             530 ext/nkf/nkf-utf8/nkf.c static void (*o_iso2022jp_check_conv)PROTO((int c2,int c1)) = no_connection;
PROTO             534 ext/nkf/nkf-utf8/nkf.c static  void   (*o_putc)PROTO((int c)) = std_putc;
PROTO             536 ext/nkf/nkf-utf8/nkf.c static  int    (*i_getc)PROTO((FILE *f)) = std_getc; /* general input */
PROTO             537 ext/nkf/nkf-utf8/nkf.c static  int    (*i_ungetc)PROTO((int c,FILE *f)) =std_ungetc;
PROTO             539 ext/nkf/nkf-utf8/nkf.c static  int    (*i_bgetc)PROTO((FILE *)) = std_getc; /* input of mgetc */
PROTO             540 ext/nkf/nkf-utf8/nkf.c static  int    (*i_bungetc)PROTO((int c ,FILE *f)) = std_ungetc;
PROTO             542 ext/nkf/nkf-utf8/nkf.c static  void   (*o_mputc)PROTO((int c)) = std_putc ; /* output of mputc */
PROTO             544 ext/nkf/nkf-utf8/nkf.c static  int    (*i_mgetc)PROTO((FILE *)) = std_getc; /* input of mgetc */
PROTO             545 ext/nkf/nkf-utf8/nkf.c static  int    (*i_mungetc)PROTO((int c ,FILE *f)) = std_ungetc;
PROTO             548 ext/nkf/nkf-utf8/nkf.c static  int    (*i_mgetc_buf)PROTO((FILE *)) = std_getc; /* input of mgetc_buf */
PROTO             549 ext/nkf/nkf-utf8/nkf.c static  int    (*i_mungetc_buf)PROTO((int c,FILE *f)) = std_ungetc;
PROTO            3491 ext/nkf/nkf-utf8/nkf.c int (*mime_priority_func[])PROTO((int c2, int c1, int c0)) = {


PROT_FUNC

PROT_FUNC        4717 eval.c         	if (tt->tag == PROT_FUNC && tt->frame->uniq == ruby_frame->uniq) {
PROT_FUNC        4752 eval.c         	  case PROT_FUNC:
PROT_FUNC        5681 eval.c         		PUSH_TAG(PROT_FUNC);
PROT_FUNC        5753 eval.c         	    PUSH_TAG(PROT_FUNC);


PROT_LAMBDA

PROT_LAMBDA      4722 eval.c         	if (tt->tag == PROT_LAMBDA && !yield) {
PROT_LAMBDA      4747 eval.c         	  case PROT_LAMBDA:
PROT_LAMBDA      8382 eval.c             PUSH_TAG(pcall ? PROT_LAMBDA : PROT_NONE);


PROT_LOOP

PROT_LOOP        2899 eval.c         	PUSH_TAG(PROT_LOOP);
PROT_LOOP        3025 eval.c         	PUSH_TAG(PROT_LOOP);
PROT_LOOP        3060 eval.c         	PUSH_TAG(PROT_LOOP);
PROT_LOOP        3101 eval.c         	    PUSH_TAG(PROT_LOOP);
PROT_LOOP        4746 eval.c         	  case PROT_LOOP:
PROT_LOOP        4957 eval.c         		if (tt->tag == PROT_LOOP && tt->blkid == ruby_block->uniq) {
PROT_LOOP        5203 eval.c             PUSH_TAG(PROT_LOOP);
PROT_LOOP        8694 eval.c             PUSH_TAG(PROT_LOOP);


PROT_NONE

PROT_NONE        1178 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        1328 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        1458 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        1475 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        1511 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        1538 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        1761 eval.c         	PUSH_TAG(PROT_NONE);
PROT_NONE        1784 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        2282 eval.c         	PUSH_TAG(PROT_NONE);
PROT_NONE        2382 eval.c         	PUSH_TAG(PROT_NONE);
PROT_NONE        2431 eval.c         	PUSH_TAG(PROT_NONE);
PROT_NONE        2634 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        3193 eval.c         	    PUSH_TAG(PROT_NONE);
PROT_NONE        3243 eval.c         	PUSH_TAG(PROT_NONE);
PROT_NONE        3447 eval.c         	    PUSH_TAG(PROT_NONE);
PROT_NONE        4080 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        4483 eval.c         	PUSH_TAG(PROT_NONE);
PROT_NONE        4820 eval.c         	PUSH_TAG(PROT_NONE);
PROT_NONE        4878 eval.c             PUSH_TAG(lambda ? PROT_NONE : PROT_YIELD);
PROT_NONE        5274 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        5332 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        5360 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        5385 eval.c         	PUSH_TAG(PROT_NONE);
PROT_NONE        5406 eval.c         	PUSH_TAG(PROT_NONE);
PROT_NONE        6034 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        6301 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        6461 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        6693 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        6752 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        7011 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        7712 eval.c         	    PUSH_TAG(PROT_NONE);
PROT_NONE        7730 eval.c         	    PUSH_TAG(PROT_NONE);
PROT_NONE        8382 eval.c             PUSH_TAG(pcall ? PROT_LAMBDA : PROT_NONE);


PROT_THREAD

PROT_THREAD      4727 eval.c         	if (tt->tag == PROT_THREAD) {
PROT_THREAD      4744 eval.c         	  case PROT_THREAD:
PROT_THREAD      11644 eval.c             PUSH_TAG(PROT_THREAD);
PROT_THREAD      12877 eval.c         	if (tt->tag == PROT_THREAD) {


PROT_YIELD

PROT_YIELD       4713 eval.c         	if (tt->tag == PROT_YIELD) {
PROT_YIELD       4745 eval.c         	  case PROT_YIELD:
PROT_YIELD       4878 eval.c             PUSH_TAG(lambda ? PROT_NONE : PROT_YIELD);


PTR_NOT_EQUAL

PTR_NOT_EQUAL     227 st.c               if (PTR_NOT_EQUAL(table, ptr, hash_val, key)) {\
PTR_NOT_EQUAL     229 st.c           	while (PTR_NOT_EQUAL(table, ptr->next, hash_val, key)) {\


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              269 sprintf.c      	PUSH(p, t - p);
PUSH              383 sprintf.c      	    PUSH("%", 1);
PUSH              393 sprintf.c      			PUSH(" ", 1);
PUSH              395 sprintf.c      		PUSH(&c, 1);
PUSH              397 sprintf.c      		    PUSH(" ", 1);
PUSH              435 sprintf.c      		PUSH(RSTRING(str)->ptr, len);
PUSH              660 sprintf.c      		if (sc) PUSH(&sc, 1);
PUSH              663 sprintf.c      		    PUSH(prefix, plen);
PUSH              683 sprintf.c      		PUSH(s, len);
PUSH              617 util.c         	if (l-L < R-r) {PUSH(r,R); R = l;} /* sort left side first */
PUSH              618 util.c         	else           {PUSH(L,l); L = r;} /* sort right side first */


PUSH_0

PUSH_0            134 ext/dl/dl.h    #define CBPUSH_0(x) PUSH_0(x)
PUSH_0            607 ext/dl/sym.c       PUSH_0(ftype);


PUSH_ARG

PUSH_ARG           62 ext/dl/dl.h    #define PUSH_0(x) PUSH_ARG(x,VOID_DLTYPE)
PUSH_ARG           65 ext/dl/dl.h    # define PUSH_I(x) PUSH_ARG(x,LONG_DLTYPE)
PUSH_ARG           69 ext/dl/dl.h    # define PUSH_I(x) PUSH_ARG(x,INT_DLTYPE)
PUSH_ARG           73 ext/dl/dl.h    #define PUSH_L(x) PUSH_ARG(x,LONG_DLTYPE)
PUSH_ARG           79 ext/dl/dl.h    #   define PUSH_F(x) PUSH_ARG(x,DOUBLE_DLTYPE)
PUSH_ARG           83 ext/dl/dl.h    #   define PUSH_F(x) PUSH_ARG(x,FLOAT_DLTYPE)
PUSH_ARG           88 ext/dl/dl.h    # define PUSH_F(x) PUSH_ARG(x,DOUBLE_DLTYPE)
PUSH_ARG           92 ext/dl/dl.h    #define PUSH_D(x) PUSH_ARG(x,DOUBLE_DLTYPE)
PUSH_ARG           97 ext/dl/dl.h    # define PUSH_P(x) PUSH_ARG(x,INT_DLTYPE)
PUSH_ARG          101 ext/dl/dl.h    # define PUSH_P(x) PUSH_ARG(x,LONG_DLTYPE)
PUSH_ARG          105 ext/dl/dl.h    # define PUSH_P(x) PUSH_ARG(x,VOIDP_DLTYPE)
PUSH_ARG          111 ext/dl/dl.h    # define PUSH_C(x) PUSH_ARG(x,CHAR_DLTYPE)
PUSH_ARG          121 ext/dl/dl.h    # define PUSH_H(x) PUSH_ARG(x,SHORT_DLTYPE)
PUSH_ARG          142 ext/dl/dl.h    # define CBPUSH_P(x) PUSH_ARG(x,VOIDP_DLTYPE)


PUSH_BLOCK

PUSH_BLOCK       3102 eval.c         	    PUSH_BLOCK(node->nd_var, node->nd_body);
PUSH_BLOCK       5204 eval.c             PUSH_BLOCK(0, node);
PUSH_BLOCK       8153 eval.c             PUSH_BLOCK(0,0);


PUSH_C

PUSH_C            135 ext/dl/dl.h    #define CBPUSH_C(x) PUSH_C(x)
PUSH_C            514 ext/dl/sym.c         PUSH_C(ftype);
PUSH_C            524 ext/dl/sym.c         PUSH_C(ftype);
PUSH_C            619 ext/dl/sym.c       PUSH_C(ftype);


PUSH_CLASS

PUSH_CLASS       1630 eval.c             PUSH_CLASS(ruby_wrapper = rb_module_new());
PUSH_CLASS       4063 eval.c             PUSH_CLASS(module);
PUSH_CLASS       4813 eval.c             PUSH_CLASS(klass ? klass : block->klass);
PUSH_CLASS       5730 eval.c         	    PUSH_CLASS(ruby_cbase);
PUSH_CLASS       6296 eval.c             PUSH_CLASS(ruby_cbase);
PUSH_CLASS       6447 eval.c             PUSH_CLASS(under);
PUSH_CLASS       6671 eval.c             PUSH_CLASS(ruby_wrapper);


PUSH_CREF

PUSH_CREF        1638 eval.c             PUSH_CREF(ruby_wrapper);
PUSH_CREF        1780 eval.c             PUSH_CREF(ruby_wrapper ? ruby_wrapper : rb_cObject);
PUSH_CREF        4079 eval.c             PUSH_CREF(module);
PUSH_CREF        6456 eval.c         	PUSH_CREF(cbase);
PUSH_CREF        6683 eval.c         	PUSH_CREF(ruby_wrapper);


PUSH_D

PUSH_D            140 ext/dl/dl.h    #define CBPUSH_D(x) PUSH_D(x)
PUSH_D            567 ext/dl/sym.c         PUSH_D(ftype);
PUSH_D            639 ext/dl/sym.c       PUSH_D(ftype);


PUSH_F

PUSH_F            139 ext/dl/dl.h    #define CBPUSH_F(x) PUSH_F(x)
PUSH_F            555 ext/dl/sym.c         PUSH_F(ftype);
PUSH_F            635 ext/dl/sym.c       PUSH_F(ftype);


PUSH_FAILURE_COUNT

PUSH_FAILURE_COUNT 4099 regex.c        	  PUSH_FAILURE_COUNT(p);
PUSH_FAILURE_COUNT 4113 regex.c        	  PUSH_FAILURE_COUNT(p + 2);


PUSH_FAILURE_POINT

PUSH_FAILURE_POINT 3795 regex.c        	PUSH_FAILURE_POINT(0, d);
PUSH_FAILURE_POINT 3840 regex.c        	  PUSH_FAILURE_POINT(p, d);
PUSH_FAILURE_POINT 3959 regex.c              PUSH_FAILURE_POINT(p + mcnt, d);
PUSH_FAILURE_POINT 4062 regex.c        	PUSH_FAILURE_POINT(0, 0);
PUSH_FAILURE_POINT 4088 regex.c        	  PUSH_FAILURE_POINT(0, 0);
PUSH_FAILURE_POINT 4101 regex.c        	  PUSH_FAILURE_POINT(0, 0);
PUSH_FAILURE_POINT 4133 regex.c        	  PUSH_FAILURE_POINT(p, d);
PUSH_FAILURE_POINT 4144 regex.c        	PUSH_FAILURE_POINT(p + mcnt, d);
PUSH_FAILURE_POINT 4161 regex.c        	  PUSH_FAILURE_POINT(p + mcnt, d);
PUSH_FAILURE_POINT 4363 regex.c        	      PUSH_FAILURE_POINT(p1 + mcnt, d);


PUSH_FRAME

PUSH_FRAME       1633 eval.c             PUSH_FRAME();
PUSH_FRAME       1775 eval.c             PUSH_FRAME();
PUSH_FRAME       2615 eval.c             PUSH_FRAME();
PUSH_FRAME       4620 eval.c         	PUSH_FRAME();		/* fake frame */
PUSH_FRAME       5521 eval.c         	PUSH_FRAME();
PUSH_FRAME       5658 eval.c             PUSH_FRAME();
PUSH_FRAME       6424 eval.c         	PUSH_FRAME();
PUSH_FRAME       6448 eval.c             PUSH_FRAME();
PUSH_FRAME       6686 eval.c             PUSH_FRAME();
PUSH_FRAME       7647 eval.c             PUSH_FRAME();
PUSH_FRAME       7660 eval.c             PUSH_FRAME();
PUSH_FRAME       9268 eval.c             PUSH_FRAME();


PUSH_H

PUSH_H            136 ext/dl/dl.h    #define CBPUSH_H(x) PUSH_H(x)
PUSH_H            623 ext/dl/sym.c       PUSH_H(ftype);


PUSH_I

PUSH_I            115 ext/dl/dl.h    # define PUSH_C(x) PUSH_I(x)
PUSH_I            125 ext/dl/dl.h    # define PUSH_H(x) PUSH_I(x)
PUSH_I            137 ext/dl/dl.h    #define CBPUSH_I(x) PUSH_I(x)
PUSH_I            534 ext/dl/sym.c         PUSH_I(ftype);
PUSH_I            627 ext/dl/sym.c       PUSH_I(ftype);


PUSH_ITER

PUSH_ITER        1512 eval.c             PUSH_ITER(ITER_NOT);
PUSH_ITER        1539 eval.c             PUSH_ITER(ITER_NOT);
PUSH_ITER        1760 eval.c         	PUSH_ITER(ITER_NOT);
PUSH_ITER        2210 eval.c             PUSH_ITER(tmp_iter)
PUSH_ITER        3107 eval.c         		PUSH_ITER(ITER_PRE);
PUSH_ITER        4877 eval.c             PUSH_ITER(block->iter);
PUSH_ITER        5202 eval.c             PUSH_ITER(ITER_PRE);
PUSH_ITER        5657 eval.c             PUSH_ITER(itr);
PUSH_ITER        5967 eval.c             PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
PUSH_ITER        6087 eval.c             PUSH_ITER(ruby_iter->iter ? ITER_PRE : ITER_NOT);
PUSH_ITER        6685 eval.c             PUSH_ITER(ITER_NOT);
PUSH_ITER        7400 eval.c             PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
PUSH_ITER        7646 eval.c             PUSH_ITER(ITER_NOT);
PUSH_ITER        8380 eval.c             PUSH_ITER(ITER_CUR);
PUSH_ITER        8655 eval.c         	PUSH_ITER(ITER_NOT);
PUSH_ITER        8675 eval.c         	PUSH_ITER(ITER_PAS);
PUSH_ITER        8690 eval.c             PUSH_ITER(ITER_PRE);
PUSH_ITER        9000 eval.c             PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
PUSH_ITER        9267 eval.c             PUSH_ITER(ITER_CUR);
PUSH_ITER        9811 eval.c             PUSH_ITER(ITER_NOT);


PUSH_L

PUSH_L            138 ext/dl/dl.h    #define CBPUSH_L(x) PUSH_L(x)
PUSH_L            544 ext/dl/sym.c         PUSH_L(ftype);
PUSH_L            631 ext/dl/sym.c       PUSH_L(ftype);


PUSH_P

PUSH_P            130 ext/dl/dl.h    #define PUSH_S(x) PUSH_P(x)
PUSH_P            144 ext/dl/dl.h    # define CBPUSH_P(x) PUSH_P(x)
PUSH_P            499 ext/dl/sym.c         PUSH_P(ftype);
PUSH_P            510 ext/dl/sym.c         PUSH_P(ftype);
PUSH_P            520 ext/dl/sym.c         PUSH_P(ftype);
PUSH_P            530 ext/dl/sym.c         PUSH_P(ftype);
PUSH_P            540 ext/dl/sym.c         PUSH_P(ftype);
PUSH_P            550 ext/dl/sym.c         PUSH_P(ftype);
PUSH_P            562 ext/dl/sym.c         PUSH_P(ftype);
PUSH_P            574 ext/dl/sym.c         PUSH_P(ftype);
PUSH_P            585 ext/dl/sym.c         PUSH_P(ftype);
PUSH_P            595 ext/dl/sym.c         PUSH_P(ftype);
PUSH_P            615 ext/dl/sym.c       PUSH_P(ftype);


PUSH_SCOPE

PUSH_SCOPE       1321 eval.c             PUSH_SCOPE();
PUSH_SCOPE       1639 eval.c             PUSH_SCOPE();
PUSH_SCOPE       3446 eval.c         	    PUSH_SCOPE();
PUSH_SCOPE       4064 eval.c             PUSH_SCOPE();
PUSH_SCOPE       5725 eval.c         	    PUSH_SCOPE();
PUSH_SCOPE       6690 eval.c             PUSH_SCOPE();


PUSH_TAG

PUSH_TAG         1178 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         1328 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         1458 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         1475 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         1511 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         1538 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         1761 eval.c         	PUSH_TAG(PROT_NONE);
PUSH_TAG         1784 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         2282 eval.c         	PUSH_TAG(PROT_NONE);
PUSH_TAG         2382 eval.c         	PUSH_TAG(PROT_NONE);
PUSH_TAG         2431 eval.c         	PUSH_TAG(PROT_NONE);
PUSH_TAG         2634 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         2899 eval.c         	PUSH_TAG(PROT_LOOP);
PUSH_TAG         3025 eval.c         	PUSH_TAG(PROT_LOOP);
PUSH_TAG         3060 eval.c         	PUSH_TAG(PROT_LOOP);
PUSH_TAG         3101 eval.c         	    PUSH_TAG(PROT_LOOP);
PUSH_TAG         3193 eval.c         	    PUSH_TAG(PROT_NONE);
PUSH_TAG         3243 eval.c         	PUSH_TAG(PROT_NONE);
PUSH_TAG         3447 eval.c         	    PUSH_TAG(PROT_NONE);
PUSH_TAG         4080 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         4483 eval.c         	PUSH_TAG(PROT_NONE);
PUSH_TAG         4820 eval.c         	PUSH_TAG(PROT_NONE);
PUSH_TAG         4878 eval.c             PUSH_TAG(lambda ? PROT_NONE : PROT_YIELD);
PUSH_TAG         5203 eval.c             PUSH_TAG(PROT_LOOP);
PUSH_TAG         5274 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         5332 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         5360 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         5385 eval.c         	PUSH_TAG(PROT_NONE);
PUSH_TAG         5406 eval.c         	PUSH_TAG(PROT_NONE);
PUSH_TAG         5681 eval.c         		PUSH_TAG(PROT_FUNC);
PUSH_TAG         5753 eval.c         	    PUSH_TAG(PROT_FUNC);
PUSH_TAG         6034 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         6301 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         6461 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         6693 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         6752 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         7011 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         7712 eval.c         	    PUSH_TAG(PROT_NONE);
PUSH_TAG         7730 eval.c         	    PUSH_TAG(PROT_NONE);
PUSH_TAG         8382 eval.c             PUSH_TAG(pcall ? PROT_LAMBDA : PROT_NONE);
PUSH_TAG         8694 eval.c             PUSH_TAG(PROT_LOOP);
PUSH_TAG         11644 eval.c             PUSH_TAG(PROT_THREAD);
PUSH_TAG         12818 eval.c             PUSH_TAG(tag);


PUSH_VARS

PUSH_VARS        4065 eval.c             PUSH_VARS();
PUSH_VARS        4790 eval.c             PUSH_VARS();
PUSH_VARS        5752 eval.c         	    PUSH_VARS();
PUSH_VARS        6670 eval.c             PUSH_VARS();
PUSH_VARS        8366 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);


P_NOWAIT

P_NOWAIT          726 win32/win32.c        case P_NOWAIT:
P_NOWAIT          743 win32/win32.c        case P_NOWAIT:
P_NOWAIT          765 win32/win32.c        case P_NOWAIT:
P_NOWAIT          834 win32/win32.c        case P_NOWAIT:


P_OVERLAY

P_OVERLAY        1027 process.c          do_spawn(P_OVERLAY, (char *)str);
P_OVERLAY         727 win32/win32.c        case P_OVERLAY:
P_OVERLAY         745 win32/win32.c        case P_OVERLAY:
P_OVERLAY         766 win32/win32.c        case P_OVERLAY:
P_OVERLAY         836 win32/win32.c        case P_OVERLAY:
P_OVERLAY         142 win32/win32.h  #define execv(path,argv)	do_aspawn(P_OVERLAY,path,argv)


P_WAIT

P_WAIT             86 missing/os2.c  	    status = spawnlp(P_WAIT,shell,shell,sw,cmd,(char*)NULL);
P_WAIT            104 missing/os2.c  	if ((status = spawnvp(P_WAIT, argv[0], argv)) == -1) {
P_WAIT           1119 process.c          status = do_aspawn(P_WAIT, prog, argv);
P_WAIT           1121 process.c          status = spawnv(P_WAIT, prog, argv);
P_WAIT           1165 process.c      	    status = shell?spawnl(P_WAIT,shell,"sh","-c",str,(char*)NULL):system(str);
P_WAIT           1461 process.c      	status = do_spawn(P_WAIT, RSTRING(argv[0])->ptr);
P_WAIT            725 win32/win32.c        case P_WAIT:
P_WAIT            740 win32/win32.c        case P_WAIT:
P_WAIT            764 win32/win32.c        case P_WAIT:
P_WAIT            831 win32/win32.c        case P_WAIT:


Person

Person              3 ext/dl/sample/c++sample.C class Person {
Person              9 ext/dl/sample/c++sample.C   Person(const char *name, int age);
Person             15 ext/dl/sample/c++sample.C Person::Person(const char *name, int age)
Person             22 ext/dl/sample/c++sample.C Person::get_name()
Person             28 ext/dl/sample/c++sample.C Person::get_age(){
Person             33 ext/dl/sample/c++sample.C Person::set_age(int i){


QUADINT

QUADINT           656 missing/vsnprintf.c 			flags |= QUADINT;
QUADINT           670 missing/vsnprintf.c 			if (flags & QUADINT) {
QUADINT           752 missing/vsnprintf.c 			if (flags & QUADINT)
QUADINT           769 missing/vsnprintf.c 			if (flags & QUADINT)
QUADINT           786 missing/vsnprintf.c 			flags = (flags) | QUADINT | HEXPREFIX;
QUADINT           790 missing/vsnprintf.c 			flags = (flags & ~QUADINT) | HEXPREFIX;
QUADINT           825 missing/vsnprintf.c 			if (flags & QUADINT)
QUADINT           839 missing/vsnprintf.c 			if (flags & QUADINT)
QUADINT           848 missing/vsnprintf.c 			    (flags & QUADINT ? uqval != 0 : ulval != 0))
QUADINT           871 missing/vsnprintf.c 			if (flags & QUADINT) {


QUAD_SIZE

QUAD_SIZE         270 bignum.c           memset(buf, 0, QUAD_SIZE);
QUAD_SIZE         276 bignum.c           if (len > QUAD_SIZE) {
QUAD_SIZE         281 bignum.c       	len = QUAD_SIZE;
QUAD_SIZE         289 bignum.c       #define BNEG(b) (RSHIFT(((BDIGIT*)b)[QUAD_SIZE/SIZEOF_BDIGITS-1],BITSPERDIG-1) != 0)
QUAD_SIZE         296 bignum.c           VALUE big = bignew(QUAD_SIZE/SIZEOF_BDIGITS, 1);
QUAD_SIZE         298 bignum.c           memcpy((char*)BDIGITS(big), buf, QUAD_SIZE);
QUAD_SIZE         300 bignum.c       	long len = QUAD_SIZE;
QUAD_SIZE         717 pack.c         		char tmp[QUAD_SIZE];
QUAD_SIZE         721 pack.c         		rb_str_buf_cat(res, (char*)&tmp, QUAD_SIZE);
QUAD_SIZE        1575 pack.c         	    PACK_LENGTH_ADJUST_SIZE(QUAD_SIZE);
QUAD_SIZE        1578 pack.c         		s += QUAD_SIZE;
QUAD_SIZE        1584 pack.c         	    PACK_LENGTH_ADJUST_SIZE(QUAD_SIZE);
QUAD_SIZE        1587 pack.c         		s += QUAD_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             95 array.c            return Qfalse;
Qfalse            683 array.c              case Qfalse:
Qfalse           1221 array.c            return Qfalse;
Qfalse           1251 array.c            int taint = Qfalse;
Qfalse           1382 array.c            inspect_tbl = get_inspect_tbl(Qfalse);
Qfalse           1417 array.c            inspect_tbl = get_inspect_tbl(Qfalse);
Qfalse           1418 array.c            if (NIL_P(inspect_tbl)) return Qfalse;
Qfalse           1752 array.c        	  case Qfalse:
Qfalse           2228 array.c            int block_p = Qfalse;
Qfalse           2475 array.c        	    return Qfalse;
Qfalse           2479 array.c            if (RARRAY(ary1)->len != RARRAY(ary2)->len) return Qfalse;
Qfalse           2482 array.c        	    return Qfalse;
Qfalse           2502 array.c            if (TYPE(ary2) != T_ARRAY) return Qfalse;
Qfalse           2503 array.c            if (RARRAY(ary1)->len != RARRAY(ary2)->len) return Qfalse;
Qfalse           2506 array.c        	    return Qfalse;
Qfalse           2560 array.c            return Qfalse;
Qfalse            982 bignum.c       	    if (isnan(a)) return Qfalse;
Qfalse            984 bignum.c       	    return (a == b)?Qtrue:Qfalse;
Qfalse            989 bignum.c           if (RBIGNUM(x)->sign != RBIGNUM(y)->sign) return Qfalse;
Qfalse            990 bignum.c           if (RBIGNUM(x)->len != RBIGNUM(y)->len) return Qfalse;
Qfalse            991 bignum.c           if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,RBIGNUM(y)->len) != 0) return Qfalse;
Qfalse           1010 bignum.c           if (TYPE(y) != T_BIGNUM) return Qfalse;
Qfalse           1011 bignum.c           if (RBIGNUM(x)->sign != RBIGNUM(y)->sign) return Qfalse;
Qfalse           1012 bignum.c           if (RBIGNUM(x)->len != RBIGNUM(y)->len) return Qfalse;
Qfalse           1013 bignum.c           if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,RBIGNUM(y)->len) != 0) return Qfalse;
Qfalse            392 class.c        	int superclass_seen = Qfalse;
Qfalse            484 class.c            return Qfalse;
Qfalse            867 class.c        	SPECIAL_SINGLETON(Qfalse, rb_cFalseClass);
Qfalse            936 class.c            rb_attr(klass, rb_intern(name), read, write, Qfalse);
Qfalse             63 compar.c           return Qfalse;
Qfalse            109 compar.c           return Qfalse;
Qfalse            128 compar.c           return Qfalse;
Qfalse            147 compar.c           return Qfalse;
Qfalse            167 compar.c           return Qfalse;
Qfalse            189 compar.c           if (RTEST(cmp_lt(x, min))) return Qfalse;
Qfalse            190 compar.c           if (RTEST(cmp_gt(x, max))) return Qfalse;
Qfalse            658 dir.c          	args.done = Qfalse;
Qfalse            820 dir.c          		return Qfalse;
Qfalse            825 dir.c              return Qfalse;
Qfalse           1513 dir.c              return Qfalse;
Qfalse            506 enum.c         	*memo = Qfalse;
Qfalse            518 enum.c         	*memo = Qfalse;
Qfalse            597 enum.c             VALUE result = Qfalse;
Qfalse            776 enum.c             memo[1] = Qfalse;
Qfalse            591 error.c            return Qfalse;
Qfalse            956 error.c            if (!rb_obj_is_kind_of(exc, rb_eSystemCallError)) return Qfalse;
Qfalse            971 error.c            return Qfalse;
Qfalse            636 eval.c         	    return Qfalse;
Qfalse            637 eval.c         	if (!ent->method) return Qfalse;
Qfalse            642 eval.c         	    return Qfalse;
Qfalse            645 eval.c             return Qfalse;
Qfalse            826 eval.c             return Qfalse;
Qfalse            840 eval.c             return Qfalse;
Qfalse            976 eval.c         #define PROT_NONE   Qfalse	/* 0 */
Qfalse           1816 eval.c         		return Qfalse;
Qfalse           2456 eval.c             return Qfalse;
Qfalse           2934 eval.c         	RETURN(Qfalse);
Qfalse           3272 eval.c         	if (RTEST(rb_eval(self, node->nd_body))) result = Qfalse;
Qfalse           3291 eval.c         		    *flip = RTEST(rb_eval(self, node->nd_end))?Qfalse:Qtrue;
Qfalse           3295 eval.c         		    result = Qfalse;
Qfalse           3300 eval.c         		    *flip = Qfalse;
Qfalse           3312 eval.c         		result = RTEST(rb_eval(self, node->nd_beg)) ? Qtrue : Qfalse;
Qfalse           3317 eval.c         		    *flip = Qfalse;
Qfalse           3598 eval.c         	rb_cvar_set(cvar_cbase(), node->nd_vid, result, Qfalse);
Qfalse           3910 eval.c         	    int gen = Qfalse;
Qfalse           4127 eval.c             return rb_obj_respond_to(obj, id, Qfalse);
Qfalse           4153 eval.c             return Qfalse;
Qfalse           4228 eval.c             return Qfalse;
Qfalse           4268 eval.c             return Qfalse;
Qfalse           4308 eval.c             return Qfalse;
Qfalse           4388 eval.c         	  case Qfalse:
Qfalse           4640 eval.c             return Qfalse;
Qfalse           4676 eval.c             return Qfalse;
Qfalse           4709 eval.c             int yield = Qfalse;
Qfalse           4979 eval.c             return rb_yield_0(val, 0, 0, 0, Qfalse);
Qfalse           4995 eval.c         	return rb_yield_0(Qundef, 0, 0, 0, Qfalse);
Qfalse           5010 eval.c             int avalue = Qfalse;
Qfalse           5041 eval.c         	rb_yield_0(Qundef, 0, 0, 0, Qfalse);
Qfalse           5146 eval.c         	rb_cvar_set(cvar_cbase(), lhs->nd_vid, val, Qfalse);
Qfalse           5270 eval.c             volatile int handle = Qfalse;
Qfalse           5278 eval.c         	handle = Qfalse;
Qfalse           5286 eval.c         	handle = Qfalse;
Qfalse           6513 eval.c             return rb_yield_0(self, self, ruby_class, YIELD_PUBLIC_DEF, Qfalse);
Qfalse           6849 eval.c             if (rb_feature_p(feature, 0, Qfalse))
Qfalse           6851 eval.c             if (!loading_tbl) return Qfalse;
Qfalse           6860 eval.c             return Qfalse;
Qfalse           6883 eval.c             if (!loading_tbl) return Qfalse;
Qfalse           6884 eval.c             if (!st_lookup(loading_tbl, (st_data_t)ftptr, &th)) return Qfalse;
Qfalse           6939 eval.c         	    if (rb_feature_p(ftptr, ext, Qfalse)) return 's';
Qfalse           6958 eval.c         	    if (rb_feature_p(ftptr, ext, Qfalse)) return 's';
Qfalse           6965 eval.c         	if ((ext = rb_feature_p(ftptr, 0, Qfalse))) {
Qfalse           7021 eval.c         		result = Qfalse;
Qfalse           8238 eval.c             data->iter = data->prev?Qtrue:Qfalse;
Qfalse           8289 eval.c             VALUE block = proc_alloc(klass, Qfalse);
Qfalse           8298 eval.c             return proc_alloc(rb_cProc, Qfalse);
Qfalse           8362 eval.c         	avalue = Qfalse;
Qfalse           8532 eval.c             if (TYPE(other) != T_DATA) return Qfalse;
Qfalse           8533 eval.c             if (RDATA(other)->dmark != (RUBY_DATA_FUNC)blk_mark) return Qfalse;
Qfalse           8534 eval.c             if (CLASS_OF(self) != CLASS_OF(other)) return Qfalse;
Qfalse           8537 eval.c             if (data->body != data2->body) return Qfalse;
Qfalse           8538 eval.c             if (data->var != data2->var) return Qfalse;
Qfalse           8539 eval.c             if (data->scope != data2->scope) return Qfalse;
Qfalse           8540 eval.c             if (data->dyna_vars != data2->dyna_vars) return Qfalse;
Qfalse           8541 eval.c             if (data->flags != data2->flags) return Qfalse;
Qfalse           8829 eval.c         	return Qfalse;
Qfalse           8831 eval.c         	return Qfalse;
Qfalse           8838 eval.c         	return Qfalse;
Qfalse           9334 eval.c             return Qfalse;
Qfalse           10339 eval.c             return Qfalse;
Qfalse           10369 eval.c             int i, test = Qfalse;
Qfalse           10659 eval.c             return Qfalse;
Qfalse           10833 eval.c         	if (limit == 0) return Qfalse;
Qfalse           10841 eval.c         	if (!rb_thread_dead(th)) return Qfalse;
Qfalse           11335 eval.c             return ruby_thread_abort?Qtrue:Qfalse;
Qfalse           11386 eval.c             return rb_thread_check(thread)->abort?Qtrue:Qfalse;
Qfalse           11723 eval.c         		rb_dvar_push(id, Qfalse);
Qfalse           11887 eval.c         	return Qfalse;
Qfalse           11912 eval.c             if (rb_thread_dead(th)) return Qfalse;
Qfalse           11937 eval.c             return Qfalse;
Qfalse           11998 eval.c             return rb_thread_critical?Qtrue:Qfalse;
Qfalse           12283 eval.c             if (!th->locals) return Qfalse;
Qfalse           12286 eval.c             return Qfalse;
Qfalse           12624 eval.c             return Qfalse;
Qfalse           12820 eval.c         	val = rb_yield_0(tag, 0, 0, 0, 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            573 ext/dbm/dbm.c      return Qfalse;
Qfalse            684 ext/dbm/dbm.c      return Qfalse;
Qfalse            706 ext/dbm/dbm.c      return Qfalse;
Qfalse             50 ext/digest/digest.c     if (rb_cvar_defined(klass, id_metadata) == Qfalse) {
Qfalse            273 ext/digest/digest.c 	return algo->equal_func(pctx1, pctx2) ? Qtrue : Qfalse;
Qfalse            288 ext/digest/digest.c     return Qfalse;
Qfalse            280 ext/dl/ptr.c     return data->ptr ? Qfalse : Qtrue;
Qfalse            481 ext/dl/ptr.c     return ptr1 == ptr2 ? 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            669 ext/gdbm/gdbm.c             return Qfalse;
Qfalse            675 ext/gdbm/gdbm.c     return Qfalse;
Qfalse            788 ext/gdbm/gdbm.c     return Qfalse;
Qfalse            813 ext/gdbm/gdbm.c     return Qfalse;
Qfalse            901 ext/gdbm/gdbm.c     fgdbm_set_fastmode(obj, RTEST(val) ? Qfalse : Qtrue);
Qfalse            258 ext/iconv/iconv.c 	    return Qfalse;
Qfalse            280 ext/iconv/iconv.c     return Qfalse;
Qfalse            375 ext/iconv/iconv.c     VALUE ret = Qfalse;
Qfalse            376 ext/iconv/iconv.c     VALUE error = Qfalse;
Qfalse             65 ext/io/wait/wait.c     if (!FIONREAD_POSSIBLE_P(fileno(fptr->f))) return Qfalse;
Qfalse             67 ext/io/wait/wait.c     if (feof(fp)) return Qfalse;
Qfalse            107 ext/io/wait/wait.c     if (feof(fp)) return Qfalse;
Qfalse            115 ext/io/wait/wait.c     if (!FIONREAD_POSSIBLE_P(fileno(fptr->f))) 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            189 ext/openssl/ossl_ssl.c     if (NIL_P(cb)) return Qfalse;
Qfalse            226 ext/openssl/ossl_ssl.c     if (NIL_P(cb)) return Qfalse;
Qfalse            229 ext/openssl/ossl_ssl.c     if (EVP_PKEY_type(pkey->type) != EVP_PKEY_DH) return Qfalse;
Qfalse            526 ext/openssl/ossl_ssl.c     ossl_ssl_set_sync_close(self, Qfalse);
Qfalse            873 ext/openssl/ossl_ssl.c         rb_attr(cSSLContext, rb_intern(ossl_sslctx_attrs[i]), 1, 1, Qfalse);
Qfalse            882 ext/openssl/ossl_ssl.c         rb_attr(cSSLSocket, rb_intern(ossl_ssl_attr_readers[i]), 1, 0, Qfalse);
Qfalse            884 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            651 ext/readline/readline.c     return history_length == 0 ? Qtrue : Qfalse;
Qfalse             77 ext/sdbm/init.c     return Qfalse;
Qfalse            557 ext/sdbm/init.c     return Qfalse;
Qfalse            666 ext/sdbm/init.c     return Qfalse;
Qfalse            688 ext/sdbm/init.c     return Qfalse;
Qfalse            618 ext/socket/socket.c     return do_not_reverse_lookup?Qtrue:Qfalse;
Qfalse           1530 ext/socket/socket.c     return Qfalse;
Qfalse            221 ext/stringio/stringio.c     int trunc = Qfalse;
Qfalse            279 ext/stringio/stringio.c     return Qfalse;
Qfalse            441 ext/stringio/stringio.c     if (!CLOSED(ptr)) return Qfalse;
Qfalse            456 ext/stringio/stringio.c     if (READABLE(ptr)) return Qfalse;
Qfalse            471 ext/stringio/stringio.c     if (WRITABLE(ptr)) return Qfalse;
Qfalse            488 ext/stringio/stringio.c     if (ptr->pos < RSTRING(ptr->string)->len) return Qfalse;
Qfalse            825 ext/strscan/strscan.c     return (*(CURPTR(p) - 1) == '\n') ? Qtrue : Qfalse;
Qfalse            848 ext/strscan/strscan.c         return Qfalse;
Qfalse            879 ext/strscan/strscan.c         return Qfalse;
Qfalse            903 ext/strscan/strscan.c         return 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            151 ext/win32ole/win32ole.c static BOOL gOLEInitialized = Qfalse;
Qfalse            599 ext/win32ole/win32ole.c     gOLEInitialized = Qfalse;
Qfalse            607 ext/win32ole/win32ole.c     if(gOLEInitialized == Qfalse) {
Qfalse           1033 ext/win32ole/win32ole.c             obj = (*V_BOOLREF(pvar) ? Qtrue : Qfalse);
Qfalse           1035 ext/win32ole/win32ole.c             obj = (V_BOOL(pvar) ? Qtrue : Qfalse);
Qfalse           3412 ext/win32ole/win32ole.c     VALUE found = Qfalse;
Qfalse           3415 ext/win32ole/win32ole.c     for (i = 0; i < count && found == Qfalse; i++) {
Qfalse           3472 ext/win32ole/win32ole.c     if (oleclass_from_typelib(self, pTypeLib, oleclass) == Qfalse) {
Qfalse           3644 ext/win32ole/win32ole.c         visible = Qfalse;
Qfalse           4156 ext/win32ole/win32ole.c     VALUE visible = Qfalse;
Qfalse           4592 ext/win32ole/win32ole.c         return Qfalse;
Qfalse           4596 ext/win32ole/win32ole.c         visible = Qfalse;
Qfalse           4636 ext/win32ole/win32ole.c     VALUE event = Qfalse;
Qfalse           4705 ext/win32ole/win32ole.c         return Qfalse;
Qfalse           5167 ext/win32ole/win32ole.c     VALUE ret = Qfalse;
Qfalse           6058 ext/win32ole/win32ole.c     return ev_on_event(argc, argv, self, Qfalse);
Qfalse            792 ext/zlib/zlib.c     if (len <= 0) return Qfalse;
Qfalse            805 ext/zlib/zlib.c     return Qfalse;
Qfalse           1084 ext/zlib/zlib.c     return ZSTREAM_IS_FINISHED(get_zstream(obj)) ? Qtrue : Qfalse;
Qfalse           1096 ext/zlib/zlib.c     return ZSTREAM_IS_READY(z) ? Qfalse : Qtrue;
Qfalse           1631 ext/zlib/zlib.c     return Qfalse;
Qfalse           1849 ext/zlib/zlib.c 	if (NIL_P(str)) return Qfalse;
Qfalse           2576 ext/zlib/zlib.c     return NIL_P(gz->io) ? Qtrue : Qfalse;
Qfalse           2587 ext/zlib/zlib.c     return GZFILE_IS_FINISHED(gz) ? Qtrue : Qfalse;
Qfalse           2597 ext/zlib/zlib.c     return (get_gzfile(obj)->z.flags & GZFILE_FLAG_SYNC) ? Qtrue : Qfalse;
Qfalse            845 file.c             return Qfalse;
Qfalse            923 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
Qfalse            925 file.c             return Qfalse;
Qfalse            946 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
Qfalse            950 file.c             return Qfalse;
Qfalse            990 file.c             if (lstat(StringValueCStr(fname), &st) < 0) return Qfalse;
Qfalse            994 file.c             return Qfalse;
Qfalse           1033 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
Qfalse           1037 file.c             return Qfalse;
Qfalse           1062 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
Qfalse           1066 file.c             return Qfalse;
Qfalse           1085 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
Qfalse           1088 file.c             return Qfalse;
Qfalse           1106 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
Qfalse           1123 file.c             if (eaccess(StringValueCStr(fname), R_OK) < 0) return Qfalse;
Qfalse           1140 file.c             if (access(StringValueCStr(fname), R_OK) < 0) return Qfalse;
Qfalse           1158 file.c             if (eaccess(StringValueCStr(fname), W_OK) < 0) return Qfalse;
Qfalse           1175 file.c             if (access(StringValueCStr(fname), W_OK) < 0) return Qfalse;
Qfalse           1192 file.c             if (eaccess(StringValueCStr(fname), X_OK) < 0) return Qfalse;
Qfalse           1209 file.c             if (access(StringValueCStr(fname), X_OK) < 0) return Qfalse;
Qfalse           1231 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
Qfalse           1233 file.c             return Qfalse;
Qfalse           1250 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
Qfalse           1252 file.c             return Qfalse;
Qfalse           1289 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
Qfalse           1291 file.c             return Qfalse;
Qfalse           1300 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
Qfalse           1302 file.c             return Qfalse;
Qfalse           1321 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
Qfalse           1324 file.c             return Qfalse;
Qfalse           1336 file.c             if (stat(StringValueCStr(fname), &st) < 0) return Qfalse;
Qfalse           1338 file.c             return Qfalse;
Qfalse           1356 file.c             return Qfalse;
Qfalse           1374 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           3191 file.c         	      return Qfalse;
Qfalse           3297 file.c         	return RTEST(argv[0]) ? Qtrue : Qfalse;
Qfalse           3301 file.c             if (cmd == 0) return Qfalse;
Qfalse           3401 file.c         	if (rb_stat(argv[1], &st1) < 0) return Qfalse;
Qfalse           3402 file.c         	if (rb_stat(argv[2], &st2) < 0) return Qfalse;
Qfalse           3407 file.c         	    return Qfalse;
Qfalse           3411 file.c         	    return Qfalse;
Qfalse           3415 file.c         	    return Qfalse;
Qfalse           3541 file.c             return Qfalse;
Qfalse           3560 file.c             return Qfalse;
Qfalse           3587 file.c             return Qfalse;
Qfalse           3610 file.c             return Qfalse;
Qfalse           3634 file.c             return Qfalse;
Qfalse           3655 file.c             return Qfalse;
Qfalse           3675 file.c             return Qfalse;
Qfalse           3683 file.c             return Qfalse;
Qfalse           3705 file.c             return Qfalse;
Qfalse           3727 file.c         	return st->st_mode & S_IRUSR ? Qtrue : Qfalse;
Qfalse           3731 file.c         	return st->st_mode & S_IRGRP ? Qtrue : Qfalse;
Qfalse           3734 file.c             if (!(st->st_mode & S_IROTH)) return Qfalse;
Qfalse           3760 file.c         	return st->st_mode & S_IRUSR ? Qtrue : Qfalse;
Qfalse           3764 file.c         	return st->st_mode & S_IRGRP ? Qtrue : Qfalse;
Qfalse           3767 file.c             if (!(st->st_mode & S_IROTH)) return Qfalse;
Qfalse           3791 file.c         	return st->st_mode & S_IWUSR ? Qtrue : Qfalse;
Qfalse           3795 file.c         	return st->st_mode & S_IWGRP ? Qtrue : Qfalse;
Qfalse           3798 file.c             if (!(st->st_mode & S_IWOTH)) return Qfalse;
Qfalse           3822 file.c         	return st->st_mode & S_IWUSR ? Qtrue : Qfalse;
Qfalse           3826 file.c         	return st->st_mode & S_IWGRP ? Qtrue : Qfalse;
Qfalse           3829 file.c             if (!(st->st_mode & S_IWOTH)) return Qfalse;
Qfalse           3855 file.c         	return st->st_mode & S_IXUSR ? Qtrue : Qfalse;
Qfalse           3859 file.c         	return st->st_mode & S_IXGRP ? Qtrue : Qfalse;
Qfalse           3862 file.c             if (!(st->st_mode & S_IXOTH)) return Qfalse;
Qfalse           3884 file.c         	return st->st_mode & S_IXUSR ? Qtrue : Qfalse;
Qfalse           3888 file.c         	return st->st_mode & S_IXGRP ? Qtrue : Qfalse;
Qfalse           3891 file.c             if (!(st->st_mode & S_IXOTH)) return Qfalse;
Qfalse           3912 file.c             return Qfalse;
Qfalse           3931 file.c             return Qfalse;
Qfalse           3973 file.c             return Qfalse;
Qfalse           3995 file.c             return Qfalse;
Qfalse           4017 file.c             return Qfalse;
Qfalse           4094 file.c             return path_check_0(rb_str_new2(path), Qfalse);
Qfalse            203 gc.c               dont_gc = Qfalse;
Qfalse            605 gc.c               if (p < lomem || p > himem) return Qfalse;
Qfalse            614 gc.c               return Qfalse;
Qfalse           1889 gc.c               if (ptr == Qfalse) return Qfalse;
Qfalse           1002 hash.c             return Qfalse;
Qfalse           1381 hash.c             return Qfalse;
Qfalse           1416 hash.c             data[0] = Qfalse;
Qfalse           1436 hash.c         	data->result = Qfalse;
Qfalse           1440 hash.c         	data->result = Qfalse;
Qfalse           1456 hash.c         	    return Qfalse;
Qfalse           1461 hash.c         	return Qfalse;
Qfalse           1465 hash.c         	    return Qfalse;
Qfalse           1498 hash.c             return hash_equal(hash1, hash2, Qfalse);
Qfalse           2019 hash.c             return env_each_i(ehash, Qfalse);
Qfalse           2206 hash.c             return Qfalse;
Qfalse           2219 hash.c             return Qfalse;
Qfalse           2228 hash.c             if (TYPE(value) != T_STRING) return Qfalse;
Qfalse           2242 hash.c             return Qfalse;
Qfalse            373 io.c           	return Qfalse;
Qfalse            401 io.c           	return Qfalse;
Qfalse            813 io.c               if (READ_DATA_PENDING(fptr->f)) return Qfalse;
Qfalse            822 io.c           	return Qfalse;
Qfalse            849 io.c               return (fptr->mode & FMODE_SYNC) ? Qtrue : Qfalse;
Qfalse           1383 io.c               int update = Qfalse;
Qfalse           1512 io.c               return Qfalse;
Qfalse           2021 io.c           	return Qfalse;
Qfalse           2114 io.c               rb_io_fptr_cleanup(fptr, Qfalse);
Qfalse           2186 io.c               return (fptr->f || fptr->f2)?Qfalse:Qtrue;
Qfalse           4312 io.c           	    return Qfalse;
Qfalse           4724 io.c               if (NIL_P(arg) || arg == Qfalse) {
Qfalse           5260 io.c               return Qfalse;
Qfalse            480 marshal.c          else if (obj == Qfalse) {
Qfalse            508 marshal.c      	    w_class(TYPE_USRMARSHAL, obj, arg, Qfalse);
Qfalse            523 marshal.c      	    w_class(TYPE_USERDEF, obj, arg, Qfalse);
Qfalse            768 marshal.c          arg.taint   = Qfalse;
Qfalse           1071 marshal.c      	v = Qfalse;
Qfalse           1239 marshal.c      		*ivp = Qfalse;
Qfalse           1288 marshal.c      		   warn = Qfalse;
Qfalse            144 numeric.c      	return Qfalse;
Qfalse            164 numeric.c          if (do_coerce(&x, &y, Qfalse))
Qfalse            175 numeric.c          if (!do_coerce(&x, &y, Qfalse) ||
Qfalse            379 numeric.c          return Qfalse;
Qfalse            418 numeric.c          return Qfalse;
Qfalse            780 numeric.c          if (TYPE(x) != TYPE(y)) return Qfalse;
Qfalse            836 numeric.c      	if (isnan(b)) return Qfalse;
Qfalse            842 numeric.c          if (isnan(a)) return Qfalse;
Qfalse            843 numeric.c          return (a == b)?Qtrue:Qfalse;
Qfalse            942 numeric.c      	if (isnan(b)) return Qfalse;
Qfalse            948 numeric.c          if (isnan(a)) return Qfalse;
Qfalse            949 numeric.c          return (a > b)?Qtrue:Qfalse;
Qfalse            978 numeric.c      	if (isnan(b)) return Qfalse;
Qfalse            984 numeric.c          if (isnan(a)) return Qfalse;
Qfalse            985 numeric.c          return (a >= b)?Qtrue:Qfalse;
Qfalse           1013 numeric.c      	if (isnan(b)) return Qfalse;
Qfalse           1019 numeric.c          if (isnan(a)) return Qfalse;
Qfalse           1020 numeric.c          return (a < b)?Qtrue:Qfalse;
Qfalse           1049 numeric.c      	if (isnan(b)) return Qfalse;
Qfalse           1055 numeric.c          if (isnan(a)) return Qfalse;
Qfalse           1056 numeric.c          return (a <= b)?Qtrue:Qfalse;
Qfalse           1078 numeric.c      	if (isnan(a) || isnan(b)) return Qfalse;
Qfalse           1081 numeric.c          return Qfalse;
Qfalse           1132 numeric.c          return Qfalse;
Qfalse           1154 numeric.c          return isnan(value) ? Qtrue : Qfalse;
Qfalse           1200 numeric.c      	return Qfalse;
Qfalse           1203 numeric.c      	return Qfalse;
Qfalse           2228 numeric.c      	return (FIX2LONG(x) == FIX2LONG(y))?Qtrue:Qfalse;
Qfalse           2276 numeric.c      	return Qfalse;
Qfalse           2299 numeric.c      	return Qfalse;
Qfalse           2322 numeric.c      	return Qfalse;
Qfalse           2345 numeric.c      	return Qfalse;
Qfalse           2767 numeric.c          return Qfalse;
Qfalse             54 object.c           return Qfalse;
Qfalse             98 object.c           return Qfalse;
Qfalse            482 object.c           return Qfalse;
Qfalse            533 object.c           return Qfalse;
Qfalse            662 object.c           return Qfalse;
Qfalse            766 object.c           return Qfalse;
Qfalse            922 object.c           return RTEST(obj2)?Qtrue:Qfalse;
Qfalse            962 object.c           return RTEST(obj2)?Qfalse:Qtrue;
Qfalse           1004 object.c           return Qfalse;
Qfalse           1021 object.c           return RTEST(obj2)?Qtrue:Qfalse;
Qfalse           1041 object.c           return RTEST(obj2)?Qtrue:Qfalse;
Qfalse           1071 object.c           return Qfalse;
Qfalse           1088 object.c           return Qfalse;
Qfalse           1355 object.c       	    return Qfalse;
Qfalse           1376 object.c           if (mod == arg) return Qfalse;
Qfalse           1423 object.c           if (mod == arg) return Qfalse;
Qfalse           2107 object.c           rb_cvar_set(obj, id, val, Qfalse);
Qfalse           2125 object.c       		     val == Qfalse ? "false" :
Qfalse           2163 object.c           v = convert_type(val, tname, method, Qfalse);
Qfalse           2217 object.c           tmp = convert_type(val, "Integer", "to_int", Qfalse);
Qfalse           2776 object.c           rb_define_global_const("FALSE", Qfalse);
Qfalse           4608 parse.c        			    yyvsp[-2].node->nd_lit = rb_range_new(yyvsp[-2].node->nd_lit, yyvsp[0].node->nd_lit, Qfalse);
Qfalse           5201 parse.c        			yyval.node = NEW_YIELD(0, Qfalse);
Qfalse           5207 parse.c        			yyval.node = NEW_YIELD(0, Qfalse);
Qfalse           7248 parse.c            if (n < 0 || (n > 0 && p[len] != '\n' && p[len] != '\r')) return Qfalse;
Qfalse           7250 parse.c            return Qfalse;
Qfalse           7374 parse.c            command_start = Qfalse;
Qfalse           7810 parse.c        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 16, Qfalse));
Qfalse           7834 parse.c        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 2, Qfalse));
Qfalse           7858 parse.c        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 10, Qfalse));
Qfalse           7889 parse.c        			yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 8, Qfalse));
Qfalse           7987 parse.c        	    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 10, Qfalse));
Qfalse           9032 parse.c        	    return Qfalse;
Qfalse           9041 parse.c        	    return Qfalse;
Qfalse           9055 parse.c        	    if (!value_expr(node->nd_body)) return Qfalse;
Qfalse           9258 parse.c            return Qfalse;
Qfalse           9472 parse.c                    state = Qfalse;
Qfalse           9479 parse.c                state = Qfalse;
Qfalse           9665 parse.c            if (lvtbl == 0) return Qfalse;
Qfalse           9669 parse.c            return Qfalse;
Qfalse           9773 parse.c            return Qfalse;
Qfalse           9917 parse.c            int localid = Qfalse;
Qfalse           9919 parse.c            if (!m) return Qfalse;
Qfalse           9922 parse.c        	return Qfalse;
Qfalse           9950 parse.c        	  default: return Qfalse;
Qfalse           9967 parse.c        	if (*++m != ']') return Qfalse;
Qfalse           9974 parse.c        	if (*m != '_' && !ISALPHA(*m) && !ismbchar(*m)) return Qfalse;
Qfalse           9983 parse.c            return *m ? Qfalse : Qtrue;
Qfalse           10143 parse.c            return Qfalse;
Qfalse           10151 parse.c            return Qfalse;
Qfalse           10159 parse.c            return Qfalse;
Qfalse           10167 parse.c            return Qfalse;
Qfalse           10175 parse.c            return Qfalse;
Qfalse           1079 parse.y        			    $1->nd_lit = rb_range_new($1->nd_lit, $3->nd_lit, Qfalse);
Qfalse           1525 parse.y        			$$ = NEW_YIELD(0, Qfalse);
Qfalse           1529 parse.y        			$$ = NEW_YIELD(0, Qfalse);
Qfalse           3250 parse.y            if (n < 0 || (n > 0 && p[len] != '\n' && p[len] != '\r')) return Qfalse;
Qfalse           3252 parse.y            return Qfalse;
Qfalse           3376 parse.y            command_start = Qfalse;
Qfalse           3812 parse.y        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 16, Qfalse));
Qfalse           3836 parse.y        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 2, Qfalse));
Qfalse           3860 parse.y        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 10, Qfalse));
Qfalse           3891 parse.y        			yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 8, Qfalse));
Qfalse           3989 parse.y        	    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 10, Qfalse));
Qfalse           5034 parse.y        	    return Qfalse;
Qfalse           5043 parse.y        	    return Qfalse;
Qfalse           5057 parse.y        	    if (!value_expr(node->nd_body)) return Qfalse;
Qfalse           5260 parse.y            return Qfalse;
Qfalse           5474 parse.y                    state = Qfalse;
Qfalse           5481 parse.y                state = Qfalse;
Qfalse           5667 parse.y            if (lvtbl == 0) return Qfalse;
Qfalse           5671 parse.y            return Qfalse;
Qfalse           5775 parse.y            return Qfalse;
Qfalse           5919 parse.y            int localid = Qfalse;
Qfalse           5921 parse.y            if (!m) return Qfalse;
Qfalse           5924 parse.y        	return Qfalse;
Qfalse           5952 parse.y        	  default: return Qfalse;
Qfalse           5969 parse.y        	if (*++m != ']') return Qfalse;
Qfalse           5976 parse.y        	if (*m != '_' && !ISALPHA(*m) && !ismbchar(*m)) return Qfalse;
Qfalse           5985 parse.y            return *m ? Qfalse : Qtrue;
Qfalse           6145 parse.y            return Qfalse;
Qfalse           6153 parse.y            return Qfalse;
Qfalse           6161 parse.y            return Qfalse;
Qfalse           6169 parse.y            return Qfalse;
Qfalse           6177 parse.y            return Qfalse;
Qfalse            394 process.c      	return Qfalse;
Qfalse            435 process.c      	return Qfalse;
Qfalse            478 process.c      	return Qfalse;
Qfalse            529 process.c          return WEXITSTATUS(status) == EXIT_SUCCESS ? Qtrue : Qfalse;
Qfalse            551 process.c      	return Qfalse;
Qfalse            553 process.c          return Qfalse;
Qfalse           1331 process.c      	  case Qfalse:
Qfalse           1364 process.c          int i, hooked = Qfalse;
Qfalse           1390 process.c      	overriding = Qfalse;
Qfalse           1545 process.c          return Qfalse;
Qfalse           2338 process.c      	return Qfalse;
Qfalse           2990 process.c          return Qfalse;
Qfalse           3048 process.c          return Qfalse;
Qfalse           3105 process.c          return Qfalse;
Qfalse           3217 process.c          return Qfalse;
Qfalse             19 range.c        #define SET_EXCL(r,v) rb_ivar_set((r), id_excl, (v) ? Qtrue : Qfalse)
Qfalse            106 range.c            return EXCL(range) ? Qtrue : Qfalse;
Qfalse            130 range.c        	return Qfalse;
Qfalse            133 range.c        	return Qfalse;
Qfalse            135 range.c        	return Qfalse;
Qfalse            137 range.c            if (EXCL(range) != EXCL(obj)) return Qfalse;
Qfalse            148 range.c            if (NIL_P(r)) return Qfalse;
Qfalse            150 range.c            return Qfalse;
Qfalse            160 range.c            if (NIL_P(r)) return Qfalse;
Qfalse            164 range.c            return Qfalse;
Qfalse            188 range.c        	return Qfalse;
Qfalse            191 range.c        	return Qfalse;
Qfalse            193 range.c        	return Qfalse;
Qfalse            195 range.c            if (EXCL(range) != EXCL(obj)) return Qfalse;
Qfalse            473 range.c            if (!rb_obj_is_kind_of(range, rb_cRange)) return Qfalse;
Qfalse            590 range.c            return Qfalse;
Qfalse            549 re.c               return Qfalse;
Qfalse            964 re.c               if (RMATCH(match)->BEG(nth) == -1) return Qfalse;
Qfalse           1480 re.c               if (TYPE(re2) != T_REGEXP) return Qfalse;
Qfalse           1482 re.c               if (RREGEXP(re1)->len != RREGEXP(re2)->len) return Qfalse;
Qfalse           1488 re.c               return Qfalse;
Qfalse           1550 re.c           	    return Qfalse;
Qfalse           1556 re.c           	return Qfalse;
Qfalse           2147 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            385 ruby.c         	    int hyphen = Qfalse;
Qfalse            466 ruby.c             VALUE e_script = Qfalse;
Qfalse            470 ruby.c             do_search = Qfalse;
Qfalse            528 ruby.c         		    ruby_verbose = Qfalse; break;
Qfalse            871 ruby.c         	    xflag = Qfalse;
Qfalse            641 ruby.h             if (obj == Qfalse) return rb_cFalseClass;
Qfalse            658 ruby.h             if (obj == Qfalse) return T_FALSE;
Qfalse            674 ruby.h             return Qfalse;
Qfalse            369 string.c           return Qfalse;
Qfalse            536 string.c           return Qfalse;
Qfalse            939 string.c       	    return Qfalse;
Qfalse            947 string.c           return Qfalse;
Qfalse            964 string.c       	return Qfalse;
Qfalse            970 string.c           return Qfalse;
Qfalse           1497 string.c           return rb_str_upto(beg, end, Qfalse);
Qfalse           1546 string.c       	      case Qfalse:
Qfalse           2456 string.c       	return Qfalse;
Qfalse           2462 string.c           if (i == -1) return Qfalse;
Qfalse           2504 string.c           return rb_str_to_inum(str, base, Qfalse);
Qfalse           2526 string.c           return rb_float_new(rb_str_to_dbl(str, Qfalse));
Qfalse           3474 string.c           int awk_split = Qfalse;
Qfalse           4310 string.c           return rb_str_to_inum(str, 16, Qfalse);
Qfalse           4332 string.c           return rb_str_to_inum(str, -8, Qfalse);
Qfalse            795 struct.c           if (TYPE(s2) != T_STRUCT) return Qfalse;
Qfalse            796 struct.c           if (rb_obj_class(s) != rb_obj_class(s2)) return Qfalse;
Qfalse            802 struct.c       	if (!rb_equal(RSTRUCT(s)->ptr[i], RSTRUCT(s2)->ptr[i])) return Qfalse;
Qfalse            845 struct.c           if (TYPE(s2) != T_STRUCT) return Qfalse;
Qfalse            846 struct.c           if (rb_obj_class(s) != rb_obj_class(s2)) return Qfalse;
Qfalse            852 struct.c       	if (!rb_eql(RSTRUCT(s)->ptr[i], RSTRUCT(s2)->ptr[i])) return Qfalse;
Qfalse            234 time.c             return time_timeval(time, Qfalse);
Qfalse            289 time.c         	obj = rb_str_to_inum(obj, 10, Qfalse);
Qfalse            853 time.c             return time_utc_or_local(argc, argv, Qfalse, klass);
Qfalse            982 time.c             return Qfalse;
Qfalse           1012 time.c             return Qfalse;
Qfalse           1604 time.c             return tobj->tm.tm_isdst?Qtrue:Qfalse;
Qfalse           1739 time.c         		    tobj->tm.tm_isdst?Qtrue:Qfalse,
Qfalse            754 variable.c         if (entry->var->getter == undef_getter) return Qfalse;
Qfalse            903 variable.c         if (!generic_iv_tbl) return Qfalse;
Qfalse            904 variable.c         if (!st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) return Qfalse;
Qfalse            908 variable.c         return Qfalse;
Qfalse           1039 variable.c         return ivar_get(obj, id, Qfalse);
Qfalse           1082 variable.c         return Qfalse;
Qfalse           1343 variable.c     	return Qfalse;
Qfalse           1445 variable.c         return rb_const_get_0(klass, id, Qfalse, Qtrue);
Qfalse           1453 variable.c         return rb_const_get_0(klass, id, Qtrue, Qfalse);
Qfalse           1593 variable.c     		return Qfalse;
Qfalse           1604 variable.c         return Qfalse;
Qfalse           1620 variable.c         return rb_const_defined_0(klass, id, Qfalse, Qtrue);
Qfalse           1628 variable.c         return rb_const_defined_0(klass, id, Qtrue, Qfalse);
Qfalse           1654 variable.c     	VALUE value = Qfalse;
Qfalse           1757 variable.c         mod_av_set(klass, id, val, Qfalse);
Qfalse           1801 variable.c         return Qfalse;
Qfalse           1814 variable.c         rb_cvar_set(klass, id, val, Qfalse);


Qnil

Qnil               30 array.c        	*mem++ = Qnil;
Qnil              449 array.c            if (RARRAY(ary)->len == 0) return Qnil;
Qnil              500 array.c            if (RARRAY(ary)->len == 0) return Qnil;
Qnil              555 array.c            rb_ary_store(ary, len + argc - 1, Qnil);
Qnil              570 array.c            if (RARRAY(ary)->len == 0) return Qnil;
Qnil              572 array.c        	return Qnil;
Qnil              596 array.c            if (beg > RARRAY(ary)->len) return Qnil;
Qnil              597 array.c            if (beg < 0 || len < 0) return Qnil;
Qnil              685 array.c              case Qnil:
Qnil              686 array.c        	return Qnil;
Qnil              737 array.c        	if (RARRAY(ary)->len == 0) return Qnil;
Qnil              773 array.c        	if (RARRAY(ary)->len == 0) return Qnil;
Qnil              865 array.c            return Qnil;
Qnil              896 array.c            return Qnil;
Qnil             1370 array.c        	rb_thread_local_aset(rb_thread_current(), inspect_key, Qnil);
Qnil             1371 array.c        	return Qnil;
Qnil             1754 array.c        	  case Qnil:
Qnil             1857 array.c        	return Qnil;
Qnil             1881 array.c            if (pos >= len) return Qnil;
Qnil             1884 array.c        	if (pos < 0) return Qnil;
Qnil             1960 array.c        	rb_ary_splice(ary, pos, len, Qnil);	/* Qnil/rb_ary_new2(0) */
Qnil             1996 array.c            if (RARRAY(ary)->len == i2) return Qnil;
Qnil             2084 array.c        	return Qnil;
Qnil             2418 array.c            return Qnil;
Qnil             2449 array.c            return Qnil;
Qnil             2750 array.c        	return Qnil;
Qnil             2808 array.c        	return Qnil;
Qnil             2913 array.c            VALUE memo = Qnil;
Qnil             2929 array.c            if (mod == 0) return Qnil;
Qnil             1981 bignum.c           return Qnil;
Qnil              866 class.c        	SPECIAL_SINGLETON(Qnil, rb_cNilClass);
Qnil              989 class.c        		if (var) *var = Qnil;
Qnil             1014 class.c        	    *var = Qnil;
Qnil               53 compar.c       #define cmperr() (rb_cmperr(x, y), Qnil)
Qnil               61 compar.c           if (NIL_P(c)) return Qnil;
Qnil               69 compar.c           return Qnil;
Qnil              349 dir.c              if (!dirp->path) return Qnil;
Qnil              379 dir.c          	return Qnil;
Qnil              384 dir.c              return Qnil;		/* not reached */
Qnil              543 dir.c              return Qnil;
Qnil              555 dir.c          static VALUE chdir_thread = Qnil;
Qnil              569 dir.c              if (chdir_thread == Qnil)
Qnil              581 dir.c          	    chdir_thread = Qnil;
Qnil              584 dir.c              return Qnil;
Qnil              632 dir.c              VALUE path = Qnil;
Qnil              729 dir.c              return Qnil;		/* not reached */
Qnil              899 dir.c              return Qnil;
Qnil             1275 dir.c          	return Qnil;
Qnil             1410 dir.c              return Qnil;
Qnil               34 enum.c             return Qnil;
Qnil               44 enum.c             return Qnil;
Qnil               89 enum.c             return Qnil;
Qnil              124 enum.c             return Qnil;
Qnil              134 enum.c             return Qnil;
Qnil              168 enum.c             return Qnil;
Qnil              199 enum.c             return Qnil;
Qnil              208 enum.c             return Qnil;
Qnil              267 enum.c             return Qnil;
Qnil              311 enum.c             if (memo == Qundef) return Qnil;
Qnil              325 enum.c             return Qnil;
Qnil              390 enum.c             return Qnil;
Qnil              509 enum.c             return Qnil;
Qnil              521 enum.c             return Qnil;
Qnil              560 enum.c             return Qnil;
Qnil              572 enum.c             return Qnil;
Qnil              619 enum.c             return Qnil;
Qnil              638 enum.c             return Qnil;
Qnil              663 enum.c             if (result == Qundef) return Qnil;
Qnil              697 enum.c             return Qnil;
Qnil              716 enum.c             return Qnil;
Qnil              740 enum.c             if (result == Qundef) return Qnil;
Qnil              753 enum.c             return Qnil;
Qnil              788 enum.c             return Qnil;
Qnil              839 enum.c             return Qnil;
Qnil              878 enum.c             result = rb_block_given_p() ? Qnil : rb_ary_new();
Qnil              188 error.c            return Qnil;
Qnil              358 error.c            rb_iv_set(exc, "bt", Qnil);
Qnil              493 error.c            if (!rb_ivar_defined(exc, bt)) return Qnil;
Qnil              635 error.c            name = (argc > 1) ? argv[--argc] : Qnil;
Qnil              693 error.c            VALUE args = (argc > 2) ? argv[--argc] : Qnil;
Qnil              729 error.c            if (NIL_P(mesg)) return Qnil;
Qnil              892 error.c        	    error = mesg; mesg = Qnil;
Qnil             1122 error.c            arg = mesg ? rb_str_new2(mesg) : Qnil;
Qnil              697 eval.c         VALUE ruby_errinfo = Qnil;
Qnil              855 eval.c             return Qnil;
Qnil              966 eval.c             _tag.retval = Qnil;			\
Qnil             1155 eval.c             if (NIL_P(info)) return Qnil;
Qnil             1157 eval.c             if (NIL_P(info)) return Qnil;
Qnil             1171 eval.c             VALUE errat = Qnil;		/* OK */
Qnil             1183 eval.c         	errat = Qnil;
Qnil             1367 eval.c             if (!node) return Qnil;
Qnil             1606 eval.c             v = eval(ruby_top_self, rb_str_new2(str), Qnil, 0, 0);
Qnil             1735 eval.c         	localjump_error("unexpected redo", Qnil, state);
Qnil             1738 eval.c         	localjump_error("retry outside of rescue clause", Qnil, state);
Qnil             1752 eval.c             VALUE val = Qnil;		/* OK */
Qnil             1786 eval.c         	val = eval(ruby_top_self, cmd, Qnil, 0, 0);
Qnil             2288 eval.c         	    ruby_errinfo = Qnil;
Qnil             2388 eval.c         	    ruby_errinfo = Qnil;
Qnil             2439 eval.c         	ruby_errinfo = Qnil;
Qnil             2552 eval.c         	return Qnil;
Qnil             2642 eval.c         					    id?ID2SYM(id):Qnil,
Qnil             2643 eval.c         					    self?rb_f_binding(self):Qnil,
Qnil             2768 eval.c             if (NIL_P(v)) return rb_ary_new3(1, Qnil);
Qnil             2805 eval.c             prot_tag->retval = Qnil;\
Qnil             2837 eval.c             volatile VALUE result = Qnil;
Qnil             2845 eval.c             if (!node) RETURN(Qnil);
Qnil             2861 eval.c         	result = Qnil;
Qnil             2922 eval.c         	RETURN(Qnil);
Qnil             2928 eval.c         	RETURN(Qnil);
Qnil             2980 eval.c         	RETURN(Qnil);
Qnil             3022 eval.c         	RETURN(Qnil);
Qnil             3026 eval.c         	result = Qnil;
Qnil             3061 eval.c         	result = Qnil;
Qnil             3173 eval.c         	if (result == Qundef) result = Qnil;
Qnil             3636 eval.c         	    result = Qnil;
Qnil             3848 eval.c         	    result = Qnil;
Qnil             3881 eval.c         	    result = Qnil;
Qnil             3890 eval.c         	result = Qnil;
Qnil             3898 eval.c         	result = Qnil;
Qnil             3903 eval.c         	result = Qnil;
Qnil             4024 eval.c         	    else result = Qnil;
Qnil             4056 eval.c             VALUE result = Qnil;	/* OK */
Qnil             4403 eval.c             return Qnil;		/* not reached */
Qnil             4438 eval.c             return Qnil;		/* not reached */
Qnil             4444 eval.c             break_jump(Qnil);
Qnil             4565 eval.c             return Qnil;		/* not reached */
Qnil             4577 eval.c             mesg = Qnil;
Qnil             4580 eval.c         	mesg = Qnil;
Qnil             4711 eval.c             if (retval == Qundef) retval = Qnil;
Qnil             4741 eval.c             if (retval == Qundef) retval = Qnil;
Qnil             4767 eval.c         	localjump_error("no block given", Qnil, 0);
Qnil             4777 eval.c             volatile VALUE result = Qnil;
Qnil             4856 eval.c         		    val = Qnil;
Qnil             4892 eval.c         		    val = Qnil;
Qnil             5044 eval.c             return Qnil;		/* dummy */
Qnil             5081 eval.c         	assign(self, list->nd_head, Qnil, pcall);
Qnil             5104 eval.c         	val = Qnil;
Qnil             5198 eval.c             volatile VALUE retval = Qnil;
Qnil             5280 eval.c         	ruby_errinfo = Qnil;
Qnil             5302 eval.c         		result = Qnil;
Qnil             5329 eval.c             VALUE result = Qnil;	/* OK */
Qnil             5343 eval.c         	return Qnil;
Qnil             5357 eval.c             volatile VALUE result = Qnil;
Qnil             5365 eval.c             retval = prot_tag ? prot_tag->retval : Qnil;	/* save retval */
Qnil             5377 eval.c             VALUE result = Qnil;	/* OK */
Qnil             5505 eval.c             return Qnil;		/* not reached */
Qnil             5621 eval.c             return Qnil;		/* not reached */
Qnil             5635 eval.c             volatile VALUE result = Qnil;
Qnil             6028 eval.c             VALUE result = Qnil;	/* OK */
Qnil             6127 eval.c         		ary = Qnil;
Qnil             6241 eval.c             volatile VALUE result = Qnil;
Qnil             6307 eval.c         	ruby_errinfo = Qnil;
Qnil             6442 eval.c             VALUE val = Qnil;		/* OK */
Qnil             6484 eval.c             return eval(args[0], args[1], Qnil, (char*)args[2], (int)args[3]);
Qnil             6596 eval.c         	klass = Qnil;
Qnil             6669 eval.c             ruby_errinfo = Qnil;	/* ensure */
Qnil             6992 eval.c             VALUE result = Qnil;
Qnil             7872 eval.c             return Qnil;
Qnil             8402 eval.c         	proc_jump_error(TAG_RETRY, Qnil); /* xxx */
Qnil             8649 eval.c             volatile VALUE result = Qnil;
Qnil             8986 eval.c             VALUE result = Qnil;	/* OK */
Qnil             9285 eval.c             a = Qnil; /* prevent tail call */
Qnil             9802 eval.c             VALUE val = Qnil;		/* OK */
Qnil             10913 eval.c         	return Qnil;
Qnil             11147 eval.c             return Qnil;
Qnil             11185 eval.c             return Qnil;
Qnil             11425 eval.c         	group = Qnil;
Qnil             11468 eval.c             th->errinfo = Qnil;\
Qnil             11471 eval.c             th->last_match = Qnil;\
Qnil             11726 eval.c             rb_dvar_push('_', Qnil);
Qnil             11727 eval.c             rb_dvar_push('~', Qnil);
Qnil             11886 eval.c         	    return Qnil;
Qnil             12118 eval.c             if (rb_thread_dead(th)) return Qnil;
Qnil             12136 eval.c             return Qnil;		/* not reached */
Qnil             12171 eval.c             return Qnil;		/* not reached */
Qnil             12186 eval.c             if (!th->locals) return Qnil;
Qnil             12190 eval.c             return Qnil;
Qnil             12240 eval.c         	return Qnil;
Qnil             12497 eval.c         	th->result = Qnil;
Qnil             12508 eval.c             return Qnil;
Qnil             12677 eval.c         	return Qnil;
Qnil             12815 eval.c             VALUE val = Qnil;		/* OK */
Qnil             12836 eval.c             return rb_funcall(Qnil, rb_intern("catch"), 1, tag);
Qnil             12890 eval.c             return Qnil; 		/* not reached */
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              251 ext/dbm/dbm.c  	rb_ary_push(new, fdbm_fetch(obj, argv[i], Qnil));
Qnil              291 ext/dbm/dbm.c              rb_ary_push(new, fdbm_fetch(obj, argv[i], Qnil));
Qnil              308 ext/dbm/dbm.c          rb_ary_push(new, fdbm_fetch(obj, argv[i], Qnil));
Qnil              340 ext/dbm/dbm.c  	return Qnil;
Qnil              370 ext/dbm/dbm.c      if (!key.dptr) return Qnil;
Qnil              481 ext/dbm/dbm.c      return Qnil;
Qnil              548 ext/dl/dl.c      return ptr ? rb_dlptr_new(ptr, size, dlfree) : Qnil;
Qnil              560 ext/dl/dl.c      return fp ? rb_dlptr_new(fp, 0, 0) : Qnil;
Qnil              598 ext/dl/dl.c      proc = Qnil;
Qnil              605 ext/dl/dl.c          proc = Qnil;
Qnil              643 ext/dl/dl.c        if (rb_hash_aref(DLFuncTable, rb_assoc_new(INT2NUM(rettype), INT2NUM(i))) == Qnil) {
Qnil              671 ext/dl/dl.c    	rb_hash_aset(DLFuncTable, rb_assoc_new(INT2NUM(i),INT2NUM(j)),Qnil);
Qnil              676 ext/dl/dl.c      return Qnil;
Qnil               89 ext/dl/handle.c   return Qnil;
Qnil               99 ext/dl/handle.c   return Qnil;
Qnil              109 ext/dl/handle.c   return Qnil;
Qnil              150 ext/dl/handle.c   if (sym == Qnil) {
Qnil               36 ext/dl/ptr.c     if (obj == Qnil) {
Qnil               50 ext/dl/ptr.c     return val == Qnil ? Qnil : (VALUE)DLNUM2LONG(val);
Qnil               97 ext/dl/ptr.c       if (val == Qnil) {
Qnil              119 ext/dl/ptr.c       val = Qnil;
Qnil              152 ext/dl/ptr.c     else if (val == Qnil) {
Qnil              220 ext/dl/ptr.c     return Qnil;
Qnil              292 ext/dl/ptr.c     return Qnil;
Qnil              386 ext/dl/ptr.c   	  rb_ary_push(ary, Qnil);
Qnil              398 ext/dl/ptr.c   	  rb_ary_push(ary, Qnil);
Qnil              528 ext/dl/ptr.c     if (argc == 1 || (argc == 2 && type == Qnil)) {
Qnil              541 ext/dl/ptr.c         return Qnil;
Qnil              593 ext/dl/ptr.c     return Qnil;
Qnil              636 ext/dl/ptr.c       return rb_assoc_new(INT2FIX(data->ctype), Qnil);
Qnil              647 ext/dl/ptr.c       return Qnil;
Qnil              730 ext/dl/ptr.c     VALUE key = Qnil, num = Qnil;
Qnil              824 ext/dl/ptr.c     return Qnil;
Qnil              844 ext/dl/ptr.c     VALUE key = Qnil, num = Qnil, val = Qnil;
Qnil              856 ext/dl/ptr.c       num = Qnil;
Qnil              869 ext/dl/ptr.c       if (num == Qnil) {
Qnil              993 ext/dl/ptr.c     return Qnil;
Qnil             1017 ext/dl/ptr.c     return Qnil;
Qnil             1024 ext/dl/ptr.c     return Qnil;
Qnil              105 ext/dl/sym.c       val = Qnil;
Qnil              121 ext/dl/sym.c     else if( val == Qnil ){
Qnil              171 ext/dl/sym.c     return Qnil;
Qnil              182 ext/dl/sym.c       return Qnil;
Qnil              193 ext/dl/sym.c     return sym->name ? rb_tainted_str_new2(sym->name) : Qnil;
Qnil              202 ext/dl/sym.c     return sym->type ? rb_tainted_str_new2(sym->type) : Qnil;
Qnil              334 ext/dl/sym.c     return Qnil;
Qnil              352 ext/dl/sym.c       return Qnil;
Qnil              464 ext/dl/sym.c     dvals = Qnil;
Qnil              482 ext/dl/sym.c   	if( argv[i] == Qnil ){
Qnil              504 ext/dl/sym.c         if( argv[i] == Qnil ){
Qnil              577 ext/dl/sym.c         if( argv[i] == Qnil ){
Qnil              834 ext/dl/sym.c       val = Qnil;
Qnil              871 ext/dl/sym.c         val = Qnil;
Qnil              883 ext/dl/sym.c         val = Qnil;
Qnil               84 ext/enumerator/enumerator.c     return Qnil;
Qnil              119 ext/enumerator/enumerator.c     return Qnil;
Qnil              151 ext/enumerator/enumerator.c     return Qnil;
Qnil              186 ext/enumerator/enumerator.c     return Qnil;
Qnil              228 ext/enumerator/enumerator.c     if (enum_method == Qnil)
Qnil              235 ext/enumerator/enumerator.c     return 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              432 ext/gdbm/gdbm.c 	return Qnil;
Qnil              451 ext/gdbm/gdbm.c     valstr = fgdbm_fetch(obj, keystr, Qnil);
Qnil              467 ext/gdbm/gdbm.c     if (NIL_P(keystr)) return Qnil;
Qnil              584 ext/gdbm/gdbm.c     return Qnil;
Qnil              183 ext/iconv/iconv.c 		       Qnil, rb_ary_new3(2, to, from), NULL, s);
Qnil              215 ext/iconv/iconv.c     return Qnil;
Qnil              278 ext/iconv/iconv.c 	return Qnil;		/* conversion */
Qnil              397 ext/iconv/iconv.c 	    rescue = iconv_fail(error, Qnil, Qnil, env, 0);
Qnil              399 ext/iconv/iconv.c 		str = RARRAY(rescue)->len > 0 ? RARRAY(rescue)->ptr[0] : Qnil;
Qnil              600 ext/iconv/iconv.c 	VALUE s = iconv_convert(env->cd, Qnil, 0, 0, env);
Qnil              697 ext/iconv/iconv.c     return iconv_convert(VALUE2ICONV(cd), Qnil, 0, 0, NULL);
Qnil              711 ext/iconv/iconv.c     if (!cd) return Qnil;
Qnil              758 ext/iconv/iconv.c     n1 = n2 = Qnil;
Qnil               71 ext/io/wait/wait.c     return Qnil;
Qnil              118 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              155 ext/openssl/ossl_ssl.c 	rb_iv_set(self, buf, Qnil);
Qnil              302 ext/openssl/ossl_ssl.c     if(OBJ_FROZEN(self)) return Qnil;
Qnil              437 ext/openssl/ossl_ssl.c         return Qnil;
Qnil              480 ext/openssl/ossl_ssl.c         return Qnil;
Qnil              726 ext/openssl/ossl_ssl.c     return Qnil;
Qnil              738 ext/openssl/ossl_ssl.c         return Qnil;
Qnil              748 ext/openssl/ossl_ssl.c         return Qnil;
Qnil              764 ext/openssl/ossl_ssl.c         return Qnil;
Qnil              770 ext/openssl/ossl_ssl.c         return Qnil;
Qnil              790 ext/openssl/ossl_ssl.c 	return Qnil;
Qnil              793 ext/openssl/ossl_ssl.c     if(!chain) return Qnil;
Qnil              813 ext/openssl/ossl_ssl.c         return Qnil;
Qnil              829 ext/openssl/ossl_ssl.c         return Qnil;
Qnil              847 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               99 ext/readline/readline.c 	result = Qnil;
Qnil              214 ext/readline/readline.c     return Qnil;
Qnil              217 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              228 ext/readline/readline.c     return Qnil;
Qnil              231 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              255 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              268 ext/readline/readline.c 	return Qnil;
Qnil              275 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              302 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              313 ext/readline/readline.c 	return Qnil;
Qnil              317 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              344 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              355 ext/readline/readline.c 	return Qnil;
Qnil              359 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              387 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              398 ext/readline/readline.c 	return Qnil;
Qnil              402 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              430 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              441 ext/readline/readline.c 	return Qnil;
Qnil              445 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              473 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              484 ext/readline/readline.c 	return Qnil;
Qnil              488 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              542 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              590 ext/readline/readline.c     return Qnil;
Qnil              593 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              605 ext/readline/readline.c 	return Qnil;
Qnil              617 ext/readline/readline.c 	return Qnil;
Qnil              693 ext/readline/readline.c 	result = Qnil;
Qnil              720 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              228 ext/sdbm/init.c 	rb_ary_push(new, fsdbm_fetch(obj, argv[i], Qnil));
Qnil              268 ext/sdbm/init.c             rb_ary_push(new, fsdbm_fetch(obj, argv[i], Qnil));
Qnil              285 ext/sdbm/init.c         rb_ary_push(new, fsdbm_fetch(obj, argv[i], Qnil));
Qnil              319 ext/sdbm/init.c 	return Qnil;
Qnil              347 ext/sdbm/init.c     if (!key.dptr) return Qnil;
Qnil              460 ext/sdbm/init.c     return Qnil;
Qnil              488 ext/sdbm/init.c     if (valstr == Qnil) {
Qnil              490 ext/sdbm/init.c 	return Qnil;
Qnil              247 ext/socket/socket.c     if (howto == Qnil)
Qnil              278 ext/socket/socket.c     return Qnil;
Qnil              297 ext/socket/socket.c     return Qnil;
Qnil              551 ext/socket/socket.c     if (flg == Qnil) flags = 0;
Qnil              594 ext/socket/socket.c 	  return rb_assoc_new(str, Qnil);
Qnil              839 ext/socket/socket.c     addr1 = Qnil;
Qnil              853 ext/socket/socket.c     if (addr1 == Qnil) {
Qnil             1068 ext/socket/socket.c     return Qnil;
Qnil             1188 ext/socket/socket.c     return init_inetsock(sock, host, serv, Qnil, Qnil, INET_SOCKS);
Qnil             1287 ext/socket/socket.c     return make_hostent(host, sock_addrinfo(host, Qnil, SOCK_STREAM, AI_CANONNAME), tcp_sockaddr);
Qnil             1299 ext/socket/socket.c 	return init_inetsock(sock, arg1, arg2, Qnil, Qnil, INET_SERVER);
Qnil             1301 ext/socket/socket.c 	return init_inetsock(sock, Qnil, arg1, Qnil, Qnil, INET_SERVER);
Qnil             1481 ext/socket/socket.c     struct addrinfo *res = sock_addrinfo(host, Qnil, SOCK_STREAM, 0);
Qnil             1723 ext/socket/socket.c     return Qnil;
Qnil             1726 ext/socket/socket.c     return Qnil;		/* not reached */
Qnil             1768 ext/socket/socket.c 	mode = Qnil;
Qnil             1832 ext/socket/socket.c     if (klass == Qnil)
Qnil             1840 ext/socket/socket.c 	ff_argc = mode == Qnil ? 1 : 2;
Qnil             1847 ext/socket/socket.c     return Qnil;		/* not reached */
Qnil             2734 ext/socket/socket.c     return make_hostent(host, sock_addrinfo(host, Qnil, SOCK_STREAM, AI_CANONNAME), sock_sockaddr);
Qnil             2830 ext/socket/socket.c     host = port = family = socktype = protocol = flags = Qnil;
Qnil             2895 ext/socket/socket.c     VALUE sa, af = Qnil, host = Qnil, port = Qnil, flags, tmp;
Qnil             2905 ext/socket/socket.c     sa = flags = Qnil;
Qnil               49 ext/stringio/stringio.c     ptr->string = Qnil;
Qnil              266 ext/stringio/stringio.c     ptr->string = Qnil;
Qnil              290 ext/stringio/stringio.c     return Qnil;
Qnil              337 ext/stringio/stringio.c     return Qnil;		/* not reached */
Qnil              389 ext/stringio/stringio.c     return Qnil;
Qnil              408 ext/stringio/stringio.c     return Qnil;
Qnil              427 ext/stringio/stringio.c     return Qnil;
Qnil              702 ext/stringio/stringio.c     return Qnil;
Qnil              719 ext/stringio/stringio.c 	return Qnil;
Qnil              773 ext/stringio/stringio.c     return Qnil;
Qnil              851 ext/stringio/stringio.c 	return Qnil;
Qnil              864 ext/stringio/stringio.c 		return Qnil;
Qnil             1094 ext/stringio/stringio.c     VALUE str = Qnil;
Qnil             1111 ext/stringio/stringio.c 		return Qnil;
Qnil             1115 ext/stringio/stringio.c 		return Qnil;
Qnil              144 ext/strscan/strscan.c     if (beg_i > S_LEN(p)) return Qnil;
Qnil              155 ext/strscan/strscan.c     if (beg_i > S_LEN(p)) return Qnil;
Qnil              192 ext/strscan/strscan.c     p->str = Qnil;
Qnil              408 ext/strscan/strscan.c         return Qnil;
Qnil              428 ext/strscan/strscan.c         return Qnil;
Qnil              685 ext/strscan/strscan.c         return Qnil;
Qnil              715 ext/strscan/strscan.c         return Qnil;
Qnil              823 ext/strscan/strscan.c     if (CURPTR(p) > S_PEND(p)) return Qnil;
Qnil              920 ext/strscan/strscan.c     if (! MATCHED_P(p)) return Qnil;
Qnil              943 ext/strscan/strscan.c     if (! MATCHED_P(p)) return Qnil;
Qnil              982 ext/strscan/strscan.c     if (! MATCHED_P(p))        return Qnil;
Qnil              987 ext/strscan/strscan.c     if (i < 0)                 return Qnil;
Qnil              988 ext/strscan/strscan.c     if (i >= p->regs.num_regs) return Qnil;
Qnil              989 ext/strscan/strscan.c     if (p->regs.beg[i] == -1)  return Qnil;
Qnil             1011 ext/strscan/strscan.c     if (! MATCHED_P(p)) return Qnil;
Qnil             1032 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             1052 ext/syck/rubyext.c     return Qnil;
Qnil             1067 ext/syck/rubyext.c         if ( !rb_const_defined( tclass, tpart ) ) return Qnil;
Qnil             1092 ext/syck/rubyext.c         VALUE obj = Qnil;
Qnil             1128 ext/syck/rubyext.c                         if ( subclass_v != Qnil )
Qnil             1132 ext/syck/rubyext.c                         else if ( rb_cObject == target_class && subclass_v == Qnil )
Qnil             1258 ext/syck/rubyext.c     VALUE t = Qnil, obj = Qnil, v = Qnil, style = Qnil;
Qnil             1977 ext/syck/rubyext.c     bonus->oid = Qnil;
Qnil             2002 ext/syck/rubyext.c     rb_ivar_set(self, s_resolver, Qnil);
Qnil             2093 ext/syck/rubyext.c         style = Qnil;
Qnil             2112 ext/syck/rubyext.c         style = Qnil;
Qnil             2133 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              493 ext/win32ole/win32ole.c     VALUE msg = Qnil;
Qnil              587 ext/win32ole/win32ole.c     if(err_msg != Qnil) {
Qnil              698 ext/win32ole/win32ole.c     VALUE obj = Qnil;
Qnil              906 ext/win32ole/win32ole.c     VALUE obj = Qnil;
Qnil              934 ext/win32ole/win32ole.c         obj = Qnil;
Qnil              958 ext/win32ole/win32ole.c                         if (obj == Qnil)
Qnil              970 ext/win32ole/win32ole.c         return (obj == Qnil) ? val2 : obj;
Qnil             1138 ext/win32ole/win32ole.c     return Qnil;
Qnil             1152 ext/win32ole/win32ole.c     return Qnil;
Qnil             1172 ext/win32ole/win32ole.c         return Qnil;
Qnil             1178 ext/win32ole/win32ole.c         return Qnil;
Qnil             1183 ext/win32ole/win32ole.c         return Qnil;
Qnil             1201 ext/win32ole/win32ole.c     VALUE file = Qnil;
Qnil             1208 ext/win32ole/win32ole.c         return Qnil;
Qnil             1212 ext/win32ole/win32ole.c         if (clsid == Qnil)
Qnil             1220 ext/win32ole/win32ole.c             if (ver == Qnil)
Qnil             1227 ext/win32ole/win32ole.c             if (typelib == Qnil)
Qnil             1232 ext/win32ole/win32ole.c                     if (lang == Qnil)
Qnil             1236 ext/win32ole/win32ole.c                         if ((file = reg_get_val(hlang, "win32")) != Qnil)
Qnil             1255 ext/win32ole/win32ole.c     if (file != Qnil) {
Qnil             1605 ext/win32ole/win32ole.c         if (file == Qnil) {
Qnil             1624 ext/win32ole/win32ole.c     return Qnil;
Qnil             1782 ext/win32ole/win32ole.c     return Qnil;
Qnil             1831 ext/win32ole/win32ole.c     return Qnil;
Qnil             1943 ext/win32ole/win32ole.c     return Qnil;
Qnil             2202 ext/win32ole/win32ole.c     VALUE obj = Qnil;
Qnil             2226 ext/win32ole/win32ole.c         if (param == Qnil)
Qnil             2538 ext/win32ole/win32ole.c     return Qnil;
Qnil             2559 ext/win32ole/win32ole.c     return Qnil;
Qnil             2567 ext/win32ole/win32ole.c     VALUE obj = Qnil;
Qnil             2576 ext/win32ole/win32ole.c     return Qnil;
Qnil             2585 ext/win32ole/win32ole.c     return Qnil;
Qnil             2651 ext/win32ole/win32ole.c     return Qnil;
Qnil             2699 ext/win32ole/win32ole.c     VALUE method = Qnil;
Qnil             2704 ext/win32ole/win32ole.c     for(i = 0; i < pTypeAttr->cFuncs && method == Qnil; i++) {
Qnil             2738 ext/win32ole/win32ole.c     VALUE method = Qnil;
Qnil             2744 ext/win32ole/win32ole.c     if (method != Qnil) {
Qnil             2747 ext/win32ole/win32ole.c     for(i=0; i < pTypeAttr->cImplTypes && method == Qnil; i++){
Qnil             2990 ext/win32ole/win32ole.c     VALUE type = Qnil;
Qnil             3052 ext/win32ole/win32ole.c     VALUE type = Qnil;
Qnil             3058 ext/win32ole/win32ole.c         return Qnil;
Qnil             3062 ext/win32ole/win32ole.c         return Qnil;
Qnil             3066 ext/win32ole/win32ole.c     if(typedetails != Qnil)
Qnil             3101 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3105 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3109 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3113 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3117 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3121 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3125 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3129 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3133 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3137 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3141 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3145 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3149 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3153 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3157 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3161 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3165 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3169 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3173 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3177 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3181 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3185 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3189 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3193 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3196 ext/win32ole/win32ole.c         if (str != Qnil) {
Qnil             3203 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3243 ext/win32ole/win32ole.c     if (obj == Qnil)
Qnil             3269 ext/win32ole/win32ole.c         if (file == Qnil) {
Qnil             3302 ext/win32ole/win32ole.c     VALUE v = Qnil;
Qnil             3311 ext/win32ole/win32ole.c         if (clsid == Qnil)
Qnil             3319 ext/win32ole/win32ole.c             if (ver == Qnil)
Qnil             3324 ext/win32ole/win32ole.c             if ( (v = reg_get_val(hclsid, StringValuePtr(ver))) != Qnil ) {
Qnil             3357 ext/win32ole/win32ole.c         if (clsid == Qnil)
Qnil             3362 ext/win32ole/win32ole.c         if ((v = reg_get_val(hclsid, "ProgID")) != Qnil)
Qnil             3364 ext/win32ole/win32ole.c         if ((v = reg_get_val(hclsid, "VersionIndependentProgID")) != Qnil)
Qnil             3464 ext/win32ole/win32ole.c     if (file == Qnil) {
Qnil             3502 ext/win32ole/win32ole.c     VALUE type = Qnil;
Qnil             3536 ext/win32ole/win32ole.c         type = Qnil;
Qnil             3568 ext/win32ole/win32ole.c     VALUE guid = Qnil;
Qnil             3604 ext/win32ole/win32ole.c     VALUE progid = Qnil;
Qnil             3774 ext/win32ole/win32ole.c         return Qnil;
Qnil             3802 ext/win32ole/win32ole.c     VALUE alias = Qnil;
Qnil             3810 ext/win32ole/win32ole.c     alias = ole_typedesc2val(pTypeInfo, &(pTypeAttr->tdescAlias), Qnil);
Qnil             3841 ext/win32ole/win32ole.c         return Qnil;
Qnil             3873 ext/win32ole/win32ole.c         return Qnil;
Qnil             4034 ext/win32ole/win32ole.c     type = ole_typedesc2val(pTypeInfo, &(pVarDesc->elemdescVar.tdesc), Qnil);
Qnil             4110 ext/win32ole/win32ole.c     VALUE val = Qnil;
Qnil             4113 ext/win32ole/win32ole.c         return Qnil;
Qnil             4264 ext/win32ole/win32ole.c     VALUE kind = Qnil;
Qnil             4360 ext/win32ole/win32ole.c     VALUE obj = Qnil;
Qnil             4365 ext/win32ole/win32ole.c         if (obj == Qnil) {
Qnil             4407 ext/win32ole/win32ole.c     type = ole_typedesc2val(pTypeInfo, &(pFuncDesc->elemdescFunc.tdesc), Qnil);
Qnil             4733 ext/win32ole/win32ole.c     return Qnil;
Qnil             4768 ext/win32ole/win32ole.c         return Qnil;
Qnil             4802 ext/win32ole/win32ole.c         return Qnil;
Qnil             4836 ext/win32ole/win32ole.c         return Qnil;
Qnil             4865 ext/win32ole/win32ole.c     VALUE dispid = Qnil;
Qnil             4899 ext/win32ole/win32ole.c     VALUE offset_vtbl = Qnil;
Qnil             4933 ext/win32ole/win32ole.c     VALUE size_params = Qnil;
Qnil             4968 ext/win32ole/win32ole.c     VALUE size_opt_params = Qnil;
Qnil             5095 ext/win32ole/win32ole.c                             &(pFuncDesc->lprgelemdescParam[index].tdesc), Qnil);
Qnil             5275 ext/win32ole/win32ole.c     VALUE defval = Qnil;
Qnil             5416 ext/win32ole/win32ole.c     def_event = Qnil;
Qnil             5446 ext/win32ole/win32ole.c     def_event = Qnil;
Qnil             6002 ext/win32ole/win32ole.c     return Qnil;
Qnil             6039 ext/win32ole/win32ole.c     return Qnil;
Qnil              412 ext/zlib/zlib.c     z->buf = Qnil;
Qnil              414 ext/zlib/zlib.c     z->input = Qnil;
Qnil              534 ext/zlib/zlib.c     z->buf = Qnil;
Qnil              611 ext/zlib/zlib.c 	z->input = Qnil;
Qnil              624 ext/zlib/zlib.c     z->input = Qnil;
Qnil              633 ext/zlib/zlib.c 	z->input = Qnil;
Qnil              650 ext/zlib/zlib.c     z->input = Qnil;
Qnil              665 ext/zlib/zlib.c     z->buf = Qnil;
Qnil              682 ext/zlib/zlib.c 	return Qnil;
Qnil              697 ext/zlib/zlib.c     return Qnil;
Qnil              762 ext/zlib/zlib.c         guard = Qnil; /* prevent tail call to make guard effective */
Qnil              928 ext/zlib/zlib.c     return Qnil;
Qnil              940 ext/zlib/zlib.c     return Qnil;
Qnil             1366 ext/zlib/zlib.c     return Qnil;
Qnil             1768 ext/zlib/zlib.c     gz->io = Qnil;
Qnil             1772 ext/zlib/zlib.c     gz->orig_name = Qnil;
Qnil             1773 ext/zlib/zlib.c     gz->comment = Qnil;
Qnil             1803 ext/zlib/zlib.c     gz->io = Qnil;
Qnil             1804 ext/zlib/zlib.c     gz->orig_name = Qnil;
Qnil             1805 ext/zlib/zlib.c     gz->comment = Qnil;
Qnil             2038 ext/zlib/zlib.c     if (gz->z.input != Qnil && RSTRING(gz->z.input)->len > 0) {
Qnil             2143 ext/zlib/zlib.c 	return Qnil;
Qnil             2191 ext/zlib/zlib.c     return Qnil;
Qnil             2266 ext/zlib/zlib.c     if (!ZSTREAM_IS_READY(&gz->z)) return Qnil;
Qnil             2267 ext/zlib/zlib.c     if (!GZFILE_IS_FINISHED(gz)) return Qnil;
Qnil             2271 ext/zlib/zlib.c     if (NIL_P(gz->z.input)) return Qnil;
Qnil             2315 ext/zlib/zlib.c     return Qnil;
Qnil             3020 ext/zlib/zlib.c     return Qnil;
Qnil             3032 ext/zlib/zlib.c     return Qnil;
Qnil              145 file.c             if (!fptr->path) return Qnil;
Qnil              207 file.c             return Qnil;
Qnil              260 file.c             return Qnil;
Qnil              283 file.c             return Qnil;
Qnil              407 file.c             return Qnil;
Qnil              430 file.c             return Qnil;
Qnil              453 file.c             return Qnil;
Qnil              491 file.c             return Qnil;
Qnil              513 file.c             return Qnil;
Qnil              808 file.c             if (!fptr->path) return Qnil;
Qnil             1269 file.c             if (rb_stat(fname, &st) < 0) return Qnil;
Qnil             1270 file.c             if (st.st_size == 0) return Qnil;
Qnil             1392 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             1758 file.c             if (!fptr->path) return Qnil;
Qnil             1810 file.c             return Qnil;		/* not reached */
Qnil             1899 file.c             if (!fptr->path) return Qnil;
Qnil             2096 file.c             return Qnil;		/* not reached */
Qnil             2126 file.c             return Qnil;		/* not reached */
Qnil             2171 file.c             return Qnil;		/* not reached */
Qnil             2528 file.c         		file_expand_path(dname, Qnil, result);
Qnil             2551 file.c         	    file_expand_path(dname, Qnil, result);
Qnil             2687 file.c         	return rb_file_expand_path(argv[0], Qnil);
Qnil             2895 file.c             return rb_assoc_new(rb_file_s_dirname(Qnil, path), rb_file_s_basename(1,&path));
Qnil             3420 file.c             return Qnil;		/* not reached */
Qnil             3475 file.c             return Qnil;
Qnil             3951 file.c             if (size == 0) return Qnil;
Qnil             4164 file.c         	fname = rb_file_expand_path(*filep, Qnil);
Qnil             4218 file.c         	path = rb_file_expand_path(path, Qnil);
Qnil             4403 file.c             rb_define_const(rb_cFile, "ALT_SEPARATOR", Qnil);
Qnil             1435 gc.c               return Qnil;
Qnil             1777 gc.c               return Qnil;
Qnil             1890 gc.c               if (ptr == Qnil) return Qnil;
Qnil              208 hash.c             return Qnil;
Qnil              234 hash.c             hash->ifnone = Qnil;
Qnil              330 hash.c         	RHASH(hash)->ifnone = Qnil;
Qnil              568 hash.c             return Qnil;
Qnil              602 hash.c             args[1] = Qnil;
Qnil              673 hash.c             return Qnil;
Qnil              722 hash.c         	return rb_funcall(RHASH(hash)->ifnone, id_call, 2, hash, Qnil);
Qnil              775 hash.c             if (n == RHASH(hash)->tbl->num_entries) return Qnil;
Qnil             1643 hash.c             if (!ptr) return Qnil;
Qnil             1674 hash.c             return Qnil;
Qnil             1714 hash.c             return Qnil;
Qnil             1892 hash.c         	return Qnil;
Qnil             2040 hash.c         	VALUE val = rb_f_getenv(Qnil, RARRAY(keys)->ptr[i]);
Qnil             2044 hash.c         		env_delete(Qnil, RARRAY(keys)->ptr[i]);
Qnil             2049 hash.c             if (del == 0) return Qnil;
Qnil             2069 hash.c         	rb_ary_push(result, rb_f_getenv(Qnil, argv[i]));
Qnil             2113 hash.c         	VALUE val = rb_f_getenv(Qnil, RARRAY(keys)->ptr[i]);
Qnil             2115 hash.c         	    env_delete(Qnil, RARRAY(keys)->ptr[i]);
Qnil             2179 hash.c             return Qnil;
Qnil             2267 hash.c             return Qnil;
Qnil             2283 hash.c         	    RARRAY(indexes)->ptr[i] = Qnil;
Qnil             2330 hash.c         	    env_delete(Qnil, key);
Qnil             2335 hash.c             return Qnil;
Qnil             2349 hash.c         	env_aset(Qnil, key, val);
Qnil             2380 hash.c         	    val = rb_yield_values(3, key, rb_f_getenv(Qnil, key), val);
Qnil             2382 hash.c         	env_aset(Qnil, key, val);
Qnil              912 io.c               return Qnil;		/* not reached */
Qnil              968 io.c           	return Qnil;
Qnil             1221 io.c                   return Qnil;
Qnil             1345 io.c               if (feof(fptr->f)) return Qnil;
Qnil             1356 io.c           	if (!fptr->f) return Qnil;
Qnil             1359 io.c           	    return Qnil;
Qnil             1520 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             1729 io.c               return Qnil;
Qnil             1925 io.c           	return Qnil;
Qnil             1998 io.c               return Qnil;
Qnil             2104 io.c               if (!fptr) return Qnil;
Qnil             2109 io.c           	if (!fptr->f) return Qnil;
Qnil             2123 io.c               return Qnil;
Qnil             2146 io.c               return Qnil;
Qnil             2155 io.c           	return Qnil;
Qnil             2230 io.c               return Qnil;
Qnil             2274 io.c               return Qnil;
Qnil             2990 io.c           	return Qnil;
Qnil             3097 io.c           	    rb_yield(Qnil);
Qnil             3102 io.c           	return Qnil;
Qnil             3603 io.c               return Qnil;
Qnil             3624 io.c               if (argc == 0) return Qnil;
Qnil             3635 io.c               return Qnil;
Qnil             3690 io.c               return Qnil;
Qnil             3722 io.c               return Qnil;
Qnil             3781 io.c               return Qnil;
Qnil             3816 io.c           	return Qnil;
Qnil             3837 io.c               return Qnil;
Qnil             3855 io.c               return Qnil;
Qnil             3896 io.c               return Qnil;
Qnil             3936 io.c               return Qnil;
Qnil             4192 io.c                if (!next_argv()) return Qnil;\
Qnil             4334 io.c               if (!next_argv()) return Qnil;
Qnil             4398 io.c               if (!next_argv()) return Qnil;
Qnil             4419 io.c               if (!next_argv()) return Qnil;
Qnil             4525 io.c               result = read_all(fptr, remain_size(fptr), Qnil);
Qnil             4633 io.c               if (!pending && n == 0) return Qnil; /* returns nil on timeout */
Qnil             4788 io.c               return Qnil;		/* not reached */
Qnil             4842 io.c               return Qnil;		/* not reached */
Qnil             4962 io.c               return Qnil;		/* not reached */
Qnil             5047 io.c               return Qnil;		/* not reached */
Qnil             5066 io.c               return Qnil;
Qnil             5104 io.c               if (NIL_P(arg.io)) return Qnil;
Qnil             5143 io.c               if (NIL_P(arg.io)) return Qnil;
Qnil             5181 io.c               if (NIL_P(arg.io)) return Qnil;
Qnil             5278 io.c           	argv[1] = Qnil;
Qnil             5316 io.c               if (!next_argv()) return Qnil;
Qnil             5352 io.c               if (!next_argv()) return Qnil;
Qnil             5440 io.c               if (!ruby_inplace_mode) return Qnil;
Qnil             5594 io.c               rb_output_fs = Qnil;
Qnil             5599 io.c               rb_output_rs = Qnil;
Qnil              474 marshal.c          if (obj == Qnil) {
Qnil              737 marshal.c          port = Qnil;
Qnil             1004 marshal.c          VALUE v = Qnil;
Qnil             1063 marshal.c      	v = Qnil;
Qnil             1202 marshal.c      	    if (mem == Qnil) {
Qnil             1209 marshal.c      		rb_ary_push(values, Qnil);
Qnil             1356 marshal.c          return r_object0(arg, arg->proc, 0, Qnil);
Qnil              126 numeric.c          return Qnil;		/* dummy */
Qnil              166 numeric.c          return Qnil;
Qnil              178 numeric.c      	return Qnil;		/* not reached */
Qnil              198 numeric.c          return Qnil;		/* not reached */
Qnil              208 numeric.c          return Qnil;		/* not reached */
Qnil              439 numeric.c      	return Qnil;
Qnil              798 numeric.c          return Qnil;
Qnil              875 numeric.c          if (isnan(a) || isnan(b)) return Qnil;
Qnil              879 numeric.c          return Qnil;
Qnil             1179 numeric.c          return Qnil;
Qnil             1685 numeric.c      	return Qnil;            /* not reached */
Qnil             1690 numeric.c      	return Qnil;		/* not reached */
Qnil             2587 numeric.c          return Qnil;
Qnil             2612 numeric.c          return Qnil;
Qnil              645 object.c           return Qnil;
Qnil             1358 object.c           return Qnil;
Qnil             1450 object.c       	return Qnil;
Qnil             1454 object.c           if (NIL_P(cmp)) return Qnil;
Qnil             1510 object.c           return Qnil;
Qnil             1640 object.c       	return Qnil;
Qnil             1724 object.c           return Qnil;
Qnil             1747 object.c           return Qnil;
Qnil             1769 object.c           return Qnil;
Qnil             1796 object.c           return Qnil;
Qnil             2130 object.c       	    return Qnil;
Qnil             2164 object.c           if (NIL_P(v)) return Qnil;
Qnil             2681 object.c           rb_define_global_const("NIL", Qnil);
Qnil             1149 pack.c         #define PACK_ITEM_ADJUST() while (tmp--) rb_ary_push(ary, Qnil)
Qnil             1904 pack.c         		    tmp = Qnil;
Qnil             1944 pack.c         			tmp = Qnil;
Qnil             6634 parse.c        	if (RSTRING(s)->len == lex_gets_ptr) return Qnil;
Qnil             8894 parse.c        	    rb_dvar_push(id, Qnil);
Qnil             10198 parse.c            return Qnil;
Qnil             10221 parse.c            return Qnil;
Qnil             2636 parse.y        	if (RSTRING(s)->len == lex_gets_ptr) return Qnil;
Qnil             4896 parse.y        	    rb_dvar_push(id, Qnil);
Qnil             6200 parse.y            return Qnil;
Qnil             6223 parse.y            return Qnil;
Qnil               94 prec.c             return Qnil;		/* not reached */
Qnil              191 process.c      VALUE rb_last_status = Qnil;
Qnil              414 process.c          return Qnil;
Qnil              456 process.c          return Qnil;
Qnil              509 process.c          return Qnil;
Qnil              528 process.c      	return Qnil;
Qnil              744 process.c      	return rb_last_status = Qnil;
Qnil              773 process.c          if (NIL_P(pid)) return Qnil;
Qnil              826 process.c          rb_last_status = Qnil;
Qnil              848 process.c      	if (cpid != 0) return Qnil;
Qnil             1239 process.c          return Qnil;		/* dummy */
Qnil             1290 process.c      	return Qnil;
Qnil             1294 process.c      	return Qnil;
Qnil             1344 process.c          return Qnil;		/* not reached */
Qnil             1425 process.c      	rb_last_status = Qnil;
Qnil             1446 process.c      	rb_last_status = Qnil;
Qnil             1476 process.c      	rb_last_status = Qnil;
Qnil             1499 process.c      	rb_last_status = Qnil;
Qnil             1873 process.c          return Qnil;
Qnil             1897 process.c          return Qnil;
Qnil             1920 process.c          return Qnil;
Qnil             1945 process.c          return Qnil;
Qnil             1970 process.c          return Qnil;
Qnil             2217 process.c          return Qnil;
Qnil             2240 process.c          return Qnil;
Qnil             2264 process.c          return Qnil;
Qnil             2289 process.c          return Qnil;
Qnil             2313 process.c          return Qnil;
Qnil             2342 process.c          return Qnil;		/* not reached */
Qnil             2439 process.c          return Qnil;
Qnil             2503 process.c          return Qnil;
Qnil             2536 process.c          return Qnil;
Qnil             3148 process.c      	    return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, SAVED_USER_ID);
Qnil             3156 process.c      	    return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, euid);
Qnil             3192 process.c      	return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, obj);
Qnil             3259 process.c      	    return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, SAVED_GROUP_ID);
Qnil             3267 process.c      	    return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, egid);
Qnil             3302 process.c      	return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, obj);
Qnil               25 range.c            return Qnil;		/* dummy */
Qnil               91 range.c            return Qnil;
Qnil              266 range.c            return Qnil;
Qnil              500 range.c            return Qnil;
Qnil              614 re.c               return Qnil;
Qnil              744 re.c           	return rb_assoc_new(Qnil, Qnil);
Qnil              773 re.c           	return Qnil;
Qnil              801 re.c           	return Qnil;
Qnil              897 re.c           	rb_backref_set(Qnil);
Qnil              927 re.c           	rb_backref_set(Qnil);
Qnil              956 re.c               if (NIL_P(match)) return Qnil;
Qnil              958 re.c           	return Qnil;
Qnil              962 re.c           	if (nth <= 0) return Qnil;
Qnil              976 re.c               if (NIL_P(match)) return Qnil;
Qnil              978 re.c           	return Qnil;
Qnil              982 re.c           	if (nth <= 0) return Qnil;
Qnil              985 re.c               if (start == -1) return Qnil;
Qnil             1018 re.c               if (NIL_P(match)) return Qnil;
Qnil             1019 re.c               if (RMATCH(match)->BEG(0) == -1) return Qnil;
Qnil             1044 re.c               if (NIL_P(match)) return Qnil;
Qnil             1045 re.c               if (RMATCH(match)->BEG(0) == -1) return Qnil;
Qnil             1059 re.c               if (NIL_P(match)) return Qnil;
Qnil             1060 re.c               if (RMATCH(match)->BEG(0) == -1) return Qnil;
Qnil             1064 re.c               if (i == 0) return Qnil;
Qnil             1105 re.c           	    rb_ary_push(ary, Qnil);
Qnil             1510 re.c           	rb_backref_set(Qnil);
Qnil             1511 re.c           	return Qnil;
Qnil             1516 re.c           	return Qnil;
Qnil             1549 re.c           	    rb_backref_set(Qnil);
Qnil             1581 re.c           	rb_backref_set(Qnil);
Qnil             1582 re.c           	return Qnil;
Qnil             1587 re.c           	return Qnil;
Qnil             1610 re.c               if (NIL_P(result)) return Qnil;
Qnil             1926 re.c                   VALUE kcode_re = Qnil;
Qnil             1957 re.c                   args[1] = Qnil;
Qnil             1960 re.c                       args[2] = Qnil;
Qnil             2165 re.c               if (NIL_P(match)) return Qnil;
Qnil              526 ruby.c         		    ruby_verbose = Qnil; break;
Qnil              665 ruby.c         		if (v > 0377) rb_rs = Qnil;
Qnil              178 ruby.h         #define RTEST(v) (((VALUE)(v) & ~Qnil) != 0)
Qnil              179 ruby.h         #define NIL_P(v) ((VALUE)(v) == Qnil)
Qnil              640 ruby.h             if (obj == Qnil) return rb_cNilClass;
Qnil              657 ruby.h             if (obj == Qnil) return T_NIL;
Qnil              631 signal.c       	else oldcmd = Qnil;
Qnil              596 string.c           if (len < 0) return Qnil;
Qnil              597 string.c           if (beg > RSTRING(str)->len) return Qnil;
Qnil              600 string.c       	if (beg < 0) return Qnil;
Qnil             1006 string.c       	    return Qnil;
Qnil             1009 string.c       	    return Qnil;
Qnil             1014 string.c       	    if (NIL_P(tmp)) return Qnil;
Qnil             1117 string.c       		rb_backref_set(Qnil);
Qnil             1119 string.c       	    return Qnil;
Qnil             1138 string.c       	  return Qnil;
Qnil             1157 string.c           if (pos == -1) return Qnil;
Qnil             1227 string.c       		    rb_backref_set(Qnil);
Qnil             1229 string.c       		return Qnil;
Qnil             1259 string.c       	      if (pos == 0) return Qnil;
Qnil             1266 string.c       	  return Qnil;
Qnil             1273 string.c           return Qnil;
Qnil             1508 string.c           return Qnil;
Qnil             1527 string.c       	    return Qnil;
Qnil             1537 string.c       	return Qnil;
Qnil             1548 string.c       	      case Qnil:
Qnil             1549 string.c       		return Qnil;
Qnil             1559 string.c           return Qnil;		/* not reached */
Qnil             2002 string.c           return Qnil;
Qnil             2078 string.c       	if (bang) return Qnil;	/* no match, no substitution */
Qnil             2759 string.c           return Qnil;
Qnil             2813 string.c           return Qnil;
Qnil             2859 string.c           if (RSTRING(str)->len == 0 || !RSTRING(str)->ptr) return Qnil;
Qnil             2875 string.c           return Qnil;
Qnil             2934 string.c           return Qnil;
Qnil             3014 string.c           if (RSTRING(str)->len == 0 || !RSTRING(str)->ptr) return Qnil;
Qnil             3093 string.c           return Qnil;
Qnil             3208 string.c           if (!s || RSTRING(str)->len == 0) return Qnil;
Qnil             3221 string.c           return Qnil;
Qnil             3288 string.c           if (!s || RSTRING(str)->len == 0) return Qnil;
Qnil             3304 string.c           return Qnil;
Qnil             3481 string.c       	if (lim <= 0) limit = Qnil;
Qnil             3769 string.c           return Qnil;
Qnil             3877 string.c       	if (len == 0) return Qnil;
Qnil             3894 string.c       		return Qnil;
Qnil             3900 string.c           if (NIL_P(rs)) return Qnil;
Qnil             3903 string.c           if (len == 0) return Qnil;
Qnil             3918 string.c       	return Qnil;
Qnil             3920 string.c           if (rslen > len) return Qnil;
Qnil             3933 string.c           return Qnil;
Qnil             4041 string.c           if (!s || RSTRING(str)->len == 0) return Qnil;
Qnil             4053 string.c           return Qnil;
Qnil             4097 string.c           if (!s || RSTRING(str)->len == 0) return Qnil;
Qnil             4112 string.c           return Qnil;
Qnil             4152 string.c           if (NIL_P(l) && NIL_P(r)) return Qnil;
Qnil             4210 string.c           return Qnil;
Qnil             4251 string.c           VALUE match = Qnil;
Qnil             4753 string.c           rb_fs = Qnil;
Qnil               33 struct.c       	    return Qnil;
Qnil              115 struct.c           return Qnil;		/* not reached */
Qnil              177 struct.c           return Qnil;		/* not reached */
Qnil              250 struct.c           if (!name) nm = Qnil;
Qnil              320 struct.c       	    name = Qnil;
Qnil              353 struct.c           return Qnil;
Qnil              583 struct.c           return Qnil;		/* not reached */
Qnil              315 time.c         	v[6] = Qnil;
Qnil              957 time.c             return Qnil;
Qnil              140 variable.c         return Qnil;
Qnil              147 variable.c         VALUE path = Qnil;
Qnil              371 variable.c         return Qnil;
Qnil              423 variable.c         if (!var) return Qnil;
Qnil              594 variable.c         return Qnil;
Qnil              670 variable.c         return Qnil;
Qnil              696 variable.c         return Qnil;		/* not reached */
Qnil              705 variable.c         return Qnil;		/* not reached */
Qnil              867 variable.c         return Qnil;
Qnil             1023 variable.c         return Qnil;
Qnil             1169 variable.c         VALUE val = Qnil;
Qnil             1196 variable.c         return Qnil;		/* not reached */
Qnil             1257 variable.c         return Qnil;		/* not reached */
Qnil             1359 variable.c     	return Qnil;
Qnil             1380 variable.c         return Qnil;
Qnil             1392 variable.c     	return Qnil;
Qnil             1482 variable.c     	    val = Qnil;
Qnil             1492 variable.c         return Qnil;		/* not reached */
Qnil             1783 variable.c         return Qnil;		/* not reached */
Qnil             1934 variable.c         return Qnil;		/* not reached */


Qtrue

Qtrue              93 array.c            if (OBJ_FROZEN(ary)) return Qtrue;
Qtrue              94 array.c            if (FL_TEST(ary, ARY_TMPLOCK)) return Qtrue;
Qtrue            1220 array.c        	return Qtrue;
Qtrue            1255 array.c            if (OBJ_TAINTED(ary) || OBJ_TAINTED(sep)) taint = Qtrue;
Qtrue            1289 array.c        	if (OBJ_TAINTED(tmp)) taint = Qtrue;
Qtrue            1398 array.c            inspect_tbl = get_inspect_tbl(Qtrue);
Qtrue            1433 array.c        	if (OBJ_TAINTED(s)) tainted = Qtrue;
Qtrue            2231 array.c        	block_p = Qtrue;
Qtrue            2472 array.c            if (ary1 == ary2) return Qtrue;
Qtrue            2484 array.c            return Qtrue;
Qtrue            2501 array.c            if (ary1 == ary2) return Qtrue;
Qtrue            2508 array.c            return Qtrue;
Qtrue            2557 array.c        	    return Qtrue;
Qtrue            2615 array.c        	rb_hash_aset(hash, RARRAY(ary1)->ptr[i], Qtrue);
Qtrue            2619 array.c        	    rb_hash_aset(hash, RARRAY(ary2)->ptr[i], Qtrue);
Qtrue             984 bignum.c       	    return (a == b)?Qtrue:Qfalse;
Qtrue             992 bignum.c           return Qtrue;
Qtrue            1014 bignum.c           return Qtrue;
Qtrue             408 class.c        		superclass_seen = Qtrue;
Qtrue             481 class.c        	    if (RBASIC(p)->klass == mod2) return Qtrue;
Qtrue             614 class.c        	recur = Qtrue;
Qtrue             777 class.c        	recur = Qtrue;
Qtrue             868 class.c        	SPECIAL_SINGLETON(Qtrue, rb_cTrueClass);
Qtrue              62 compar.c           if (rb_cmpint(c, a[0], a[1]) == 0) return Qtrue;
Qtrue              87 compar.c           if (x == y) return Qtrue;
Qtrue             108 compar.c           if (rb_cmpint(c, x, y) > 0) return Qtrue;
Qtrue             127 compar.c           if (rb_cmpint(c, x, y) >= 0) return Qtrue;
Qtrue             146 compar.c           if (rb_cmpint(c, x, y) < 0) return Qtrue;
Qtrue             166 compar.c           if (rb_cmpint(c, x, y) <= 0) return Qtrue;
Qtrue             191 compar.c           return Qtrue;
Qtrue             567 dir.c              args->done = Qtrue;
Qtrue             808 dir.c          	    return Qtrue;
Qtrue             815 dir.c          		return Qtrue;
Qtrue            1511 dir.c          	return Qtrue;
Qtrue             545 enum.c             VALUE result = Qtrue;
Qtrue             557 enum.c         	*memo = Qtrue;
Qtrue             569 enum.c         	*memo = Qtrue;
Qtrue             750 enum.c         	memo[1] = Qtrue;
Qtrue             589 error.c            if (NIL_P(status)) return Qtrue;
Qtrue             590 error.c            if (status == INT2FIX(EXIT_SUCCESS)) return Qtrue;
Qtrue             957 error.c            if (self == rb_eSystemCallError) return Qtrue;
Qtrue             970 error.c        	return Qtrue;
Qtrue             638 eval.c         	return Qtrue;
Qtrue             643 eval.c         	return Qtrue;
Qtrue             823 eval.c         	if (vars->id == id) return Qtrue;
Qtrue             837 eval.c         	if (vars->id == id) return Qtrue;
Qtrue             977 eval.c         #define PROT_THREAD Qtrue	/* 2 */
Qtrue            1818 eval.c         	    return Qtrue;
Qtrue            2454 eval.c         	return Qtrue;
Qtrue            2931 eval.c         	RETURN(Qtrue);
Qtrue            3273 eval.c         	else result = Qtrue;
Qtrue            3291 eval.c         		    *flip = RTEST(rb_eval(self, node->nd_end))?Qfalse:Qtrue;
Qtrue            3292 eval.c         		    result = Qtrue;
Qtrue            3302 eval.c         		result = Qtrue;
Qtrue            3312 eval.c         		result = RTEST(rb_eval(self, node->nd_beg)) ? Qtrue : Qfalse;
Qtrue            3319 eval.c         		result = Qtrue;
Qtrue            3593 eval.c         	rb_cvar_set(cvar_cbase(), node->nd_vid, result, Qtrue);
Qtrue            3949 eval.c         		gen = Qtrue;
Qtrue            4117 eval.c         	if (priv) args[n++] = Qtrue;
Qtrue            4151 eval.c         	return Qtrue;
Qtrue            4226 eval.c         	    return Qtrue;
Qtrue            4266 eval.c         	    return Qtrue;
Qtrue            4306 eval.c         	    return Qtrue;
Qtrue            4385 eval.c         	  case Qtrue:
Qtrue            4639 eval.c         	return Qtrue;
Qtrue            4675 eval.c         	return Qtrue;
Qtrue            4714 eval.c         	    yield = Qtrue;
Qtrue            4915 eval.c         		lambda = Qtrue;	/* just pass TAG_BREAK */
Qtrue            5003 eval.c             return rb_yield_0(ary, 0, 0, 0, Qtrue);
Qtrue            5017 eval.c         	    avalue = Qtrue;
Qtrue            5142 eval.c         	rb_cvar_set(cvar_cbase(), lhs->nd_vid, val, Qtrue);
Qtrue            5290 eval.c         		handle = Qtrue;
Qtrue            5384 eval.c         	rb_thread_critical = Qtrue;
Qtrue            6226 eval.c             rb_thread_critical = Qtrue;
Qtrue            6708 eval.c         	rb_thread_critical = Qtrue;
Qtrue            6784 eval.c             return Qtrue;
Qtrue            6850 eval.c         	return Qtrue;
Qtrue            6852 eval.c             if (st_lookup(loading_tbl, (st_data_t)feature, 0)) return Qtrue;
Qtrue            6858 eval.c         	if (st_lookup(loading_tbl, (st_data_t)buf, 0)) return Qtrue;
Qtrue            6886 eval.c         	if ((rb_thread_t)th == curr_thread) return Qtrue;
Qtrue            6889 eval.c             return Qtrue;
Qtrue            6934 eval.c         	    if (rb_feature_p(ftptr, ext, Qtrue)) return 'r';
Qtrue            7048 eval.c         		result = Qtrue;
Qtrue            8238 eval.c             data->iter = data->prev?Qtrue:Qfalse;
Qtrue            8305 eval.c             return proc_alloc(rb_cProc, Qtrue);
Qtrue            8320 eval.c             return proc_alloc(rb_cProc, Qtrue);
Qtrue            8348 eval.c             volatile int pcall, avalue = Qtrue;
Qtrue            8531 eval.c             if (self == other) return Qtrue;
Qtrue            8543 eval.c             return Qtrue;
Qtrue            8840 eval.c             return Qtrue;
Qtrue            9332 eval.c         	return Qtrue;
Qtrue            10336 eval.c         	    return Qtrue;
Qtrue            10374 eval.c         	    test = Qtrue;
Qtrue            10647 eval.c             if (rb_thread_critical) return Qtrue;
Qtrue            10648 eval.c             if (curr_thread == curr_thread->next) return Qtrue;
Qtrue            10649 eval.c             if (curr_thread->status == THREAD_TO_KILL) return Qtrue;
Qtrue            10678 eval.c         	    rb_thread_critical = Qtrue;
Qtrue            10856 eval.c             return Qtrue;
Qtrue            11220 eval.c         	rb_thread_critical = Qtrue;
Qtrue            11335 eval.c             return ruby_thread_abort?Qtrue:Qfalse;
Qtrue            11386 eval.c             return rb_thread_check(thread)->abort?Qtrue:Qfalse;
Qtrue            11730 eval.c             return rb_yield_0(arg, 0, 0, YIELD_LAMBDA_CALL, Qtrue);
Qtrue            11913 eval.c             return Qtrue;
Qtrue            11935 eval.c             if (rb_thread_dead(th)) return Qtrue;
Qtrue            11936 eval.c             if (th->status == THREAD_STOPPED) return Qtrue;
Qtrue            11998 eval.c             return rb_thread_critical?Qtrue:Qfalse;
Qtrue            12285 eval.c         	return Qtrue;
Qtrue            12623 eval.c             if (data->enclosed) return 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             572 ext/dbm/dbm.c      if (i == 0) return Qtrue;
Qtrue             683 ext/dbm/dbm.c      if (val.dptr) return Qtrue;
Qtrue             704 ext/dbm/dbm.c  	    return Qtrue;
Qtrue             273 ext/digest/digest.c 	return algo->equal_func(pctx1, pctx2) ? Qtrue : Qfalse;
Qtrue             286 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              37 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             280 ext/dl/ptr.c     return data->ptr ? Qfalse : Qtrue;
Qtrue             481 ext/dl/ptr.c     return ptr1 == ptr2 ? 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             671 ext/gdbm/gdbm.c         return Qtrue;
Qtrue             674 ext/gdbm/gdbm.c     if (dbmp->di_size == 0) return Qtrue;
Qtrue             787 ext/gdbm/gdbm.c         return Qtrue;
Qtrue             810 ext/gdbm/gdbm.c 	    return Qtrue;
Qtrue             901 ext/gdbm/gdbm.c     fgdbm_set_fastmode(obj, RTEST(val) ? Qfalse : Qtrue);
Qtrue              34 ext/io/wait/wait.c #define FIONREAD_POSSIBLE_P(fd) ((fd),Qtrue)
Qtrue              68 ext/io/wait/wait.c     if (rb_read_pending(fp)) return Qtrue;
Qtrue             108 ext/io/wait/wait.c     if (rb_read_pending(fp)) 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             164 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             197 ext/openssl/ossl_ssl.c     return Qtrue;
Qtrue             232 ext/openssl/ossl_ssl.c     return Qtrue;
Qtrue             406 ext/openssl/ossl_ssl.c     return Qtrue;
Qtrue             566 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             651 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             556 ext/sdbm/init.c     if (i == 0) return Qtrue;
Qtrue             665 ext/sdbm/init.c     if (val.dptr) return Qtrue;
Qtrue             686 ext/sdbm/init.c 	    return Qtrue;
Qtrue             618 ext/socket/socket.c     return do_not_reverse_lookup?Qtrue:Qfalse;
Qtrue            1527 ext/socket/socket.c 	    return Qtrue;
Qtrue             442 ext/stringio/stringio.c     return Qtrue;
Qtrue             457 ext/stringio/stringio.c     return Qtrue;
Qtrue             472 ext/stringio/stringio.c     return Qtrue;
Qtrue             489 ext/stringio/stringio.c     return Qtrue;
Qtrue             679 ext/stringio/stringio.c     return Qtrue;
Qtrue             824 ext/strscan/strscan.c     if (p->curr == 0) return Qtrue;
Qtrue             825 ext/strscan/strscan.c     return (*(CURPTR(p) - 1) == '\n') ? Qtrue : Qfalse;
Qtrue             846 ext/strscan/strscan.c         return Qtrue;
Qtrue             881 ext/strscan/strscan.c         return Qtrue;
Qtrue             901 ext/strscan/strscan.c         return Qtrue;
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              64 ext/win32ole/win32ole.c     if(gOLEInitialized == Qtrue) {\
Qtrue             612 ext/win32ole/win32ole.c         gOLEInitialized = Qtrue;
Qtrue            1033 ext/win32ole/win32ole.c             obj = (*V_BOOLREF(pvar) ? Qtrue : Qfalse);
Qtrue            1035 ext/win32ole/win32ole.c             obj = (V_BOOL(pvar) ? Qtrue : Qfalse);
Qtrue            3426 ext/win32ole/win32ole.c             found = Qtrue;
Qtrue            3642 ext/win32ole/win32ole.c         return Qtrue;
Qtrue            3646 ext/win32ole/win32ole.c         visible = Qtrue;
Qtrue            4163 ext/win32ole/win32ole.c         visible = Qtrue;
Qtrue            4598 ext/win32ole/win32ole.c         visible = Qtrue;
Qtrue            4679 ext/win32ole/win32ole.c                 event = Qtrue;
Qtrue            4728 ext/win32ole/win32ole.c     if(folemethod_event(self) == Qtrue) {
Qtrue            5172 ext/win32ole/win32ole.c         ret = Qtrue;
Qtrue            5603 ext/win32ole/win32ole.c     if (rb_ary_entry(event, 3) == Qtrue) {
Qtrue            6075 ext/win32ole/win32ole.c     return ev_on_event(argc, argv, self, Qtrue);
Qtrue             783 ext/zlib/zlib.c 	    return Qtrue;
Qtrue             799 ext/zlib/zlib.c 	return Qtrue;
Qtrue            1084 ext/zlib/zlib.c     return ZSTREAM_IS_FINISHED(get_zstream(obj)) ? Qtrue : Qfalse;
Qtrue            1096 ext/zlib/zlib.c     return ZSTREAM_IS_READY(z) ? Qfalse : Qtrue;
Qtrue            1626 ext/zlib/zlib.c 	return Qtrue;
Qtrue            1852 ext/zlib/zlib.c     return Qtrue;
Qtrue            2576 ext/zlib/zlib.c     return NIL_P(gz->io) ? Qtrue : Qfalse;
Qtrue            2587 ext/zlib/zlib.c     return GZFILE_IS_FINISHED(gz) ? Qtrue : Qfalse;
Qtrue            2597 ext/zlib/zlib.c     return (get_gzfile(obj)->z.flags & GZFILE_FLAG_SYNC) ? Qtrue : Qfalse;
Qtrue             824 file.c         	return Qtrue;
Qtrue             841 file.c         		return Qtrue;
Qtrue             924 file.c             if (S_ISDIR(st.st_mode)) return Qtrue;
Qtrue             947 file.c             if (S_ISFIFO(st.st_mode)) return Qtrue;
Qtrue             991 file.c             if (S_ISLNK(st.st_mode)) return Qtrue;
Qtrue            1034 file.c             if (S_ISSOCK(st.st_mode)) return Qtrue;
Qtrue            1063 file.c             if (S_ISBLK(st.st_mode)) return Qtrue;
Qtrue            1086 file.c             if (S_ISCHR(st.st_mode)) return Qtrue;
Qtrue            1107 file.c             return Qtrue;
Qtrue            1124 file.c             return Qtrue;
Qtrue            1141 file.c             return Qtrue;
Qtrue            1159 file.c             return Qtrue;
Qtrue            1176 file.c             return Qtrue;
Qtrue            1193 file.c             return Qtrue;
Qtrue            1210 file.c             return Qtrue;
Qtrue            1232 file.c             if (S_ISREG(st.st_mode)) return Qtrue;
Qtrue            1251 file.c             if (st.st_size == 0) return Qtrue;
Qtrue            1290 file.c             if (st.st_uid == geteuid()) return Qtrue;
Qtrue            1301 file.c             if (st.st_uid == getuid()) return Qtrue;
Qtrue            1322 file.c             if (st.st_gid == getegid()) return Qtrue;
Qtrue            1337 file.c             if (st.st_mode & mode) return Qtrue;
Qtrue            1442 file.c         	return Qtrue;
Qtrue            1458 file.c             return Qtrue;
Qtrue            3297 file.c         	return RTEST(argv[0]) ? Qtrue : Qfalse;
Qtrue            3406 file.c         	    if (st1.st_mtime == st2.st_mtime) return Qtrue;
Qtrue            3410 file.c         	    if (st1.st_mtime > st2.st_mtime) return Qtrue;
Qtrue            3414 file.c         	    if (st1.st_mtime < st2.st_mtime) return Qtrue;
Qtrue            3540 file.c             if (S_ISDIR(get_stat(obj)->st_mode)) return Qtrue;
Qtrue            3557 file.c             if (S_ISFIFO(get_stat(obj)->st_mode)) return Qtrue;
Qtrue            3585 file.c             if (S_ISLNK(get_stat(obj)->st_mode)) return Qtrue;
Qtrue            3607 file.c             if (S_ISSOCK(get_stat(obj)->st_mode)) return Qtrue;
Qtrue            3631 file.c             if (S_ISBLK(get_stat(obj)->st_mode)) return Qtrue;
Qtrue            3653 file.c             if (S_ISCHR(get_stat(obj)->st_mode)) return Qtrue;
Qtrue            3674 file.c             if (get_stat(obj)->st_uid == geteuid()) return Qtrue;
Qtrue            3682 file.c             if (get_stat(obj)->st_uid == getuid()) return Qtrue;
Qtrue            3703 file.c             if (get_stat(obj)->st_gid == getegid()) return Qtrue;
Qtrue            3727 file.c         	return st->st_mode & S_IRUSR ? Qtrue : Qfalse;
Qtrue            3731 file.c         	return st->st_mode & S_IRGRP ? Qtrue : Qfalse;
Qtrue            3736 file.c             return Qtrue;
Qtrue            3760 file.c         	return st->st_mode & S_IRUSR ? Qtrue : Qfalse;
Qtrue            3764 file.c         	return st->st_mode & S_IRGRP ? Qtrue : Qfalse;
Qtrue            3769 file.c             return Qtrue;
Qtrue            3791 file.c         	return st->st_mode & S_IWUSR ? Qtrue : Qfalse;
Qtrue            3795 file.c         	return st->st_mode & S_IWGRP ? Qtrue : Qfalse;
Qtrue            3800 file.c             return Qtrue;
Qtrue            3822 file.c         	return st->st_mode & S_IWUSR ? Qtrue : Qfalse;
Qtrue            3826 file.c         	return st->st_mode & S_IWGRP ? Qtrue : Qfalse;
Qtrue            3831 file.c             return Qtrue;
Qtrue            3855 file.c         	return st->st_mode & S_IXUSR ? Qtrue : Qfalse;
Qtrue            3859 file.c         	return st->st_mode & S_IXGRP ? Qtrue : Qfalse;
Qtrue            3864 file.c             return Qtrue;
Qtrue            3884 file.c         	return st->st_mode & S_IXUSR ? Qtrue : Qfalse;
Qtrue            3888 file.c         	return st->st_mode & S_IXGRP ? Qtrue : Qfalse;
Qtrue            3893 file.c             return Qtrue;
Qtrue            3911 file.c             if (S_ISREG(get_stat(obj)->st_mode)) return Qtrue;
Qtrue            3930 file.c             if (get_stat(obj)->st_size == 0) return Qtrue;
Qtrue            3971 file.c             if (get_stat(obj)->st_mode & S_ISUID) return Qtrue;
Qtrue            3993 file.c             if (get_stat(obj)->st_mode & S_ISGID) return Qtrue;
Qtrue            4015 file.c             if (get_stat(obj)->st_mode & S_ISVTX) return Qtrue;
Qtrue            4116 file.c         	if (!path_check_0(rb_str_new(p0, p - p0), Qtrue)) {
Qtrue             224 gc.c               dont_gc = Qtrue;
Qtrue             612 gc.c           	    return Qtrue;
Qtrue            1789 gc.c               rb_thread_critical = Qtrue;
Qtrue            1888 gc.c               if (ptr == Qtrue) return Qtrue;
Qtrue            1001 hash.c         	return Qtrue;
Qtrue            1379 hash.c         	return Qtrue;
Qtrue            1390 hash.c         	data[0] = Qtrue;
Qtrue            1453 hash.c             if (hash1 == hash2) return Qtrue;
Qtrue            1469 hash.c             data.result = Qtrue;
Qtrue            2026 hash.c             return env_each_i(ehash, Qtrue);
Qtrue            2203 hash.c         	return Qtrue;
Qtrue            2218 hash.c             if (getenv(s)) return Qtrue;
Qtrue            2236 hash.c         		return Qtrue;
Qtrue             361 io.c           	return Qtrue;
Qtrue             370 io.c           	return Qtrue;
Qtrue             389 io.c           	return Qtrue;
Qtrue             398 io.c           	return Qtrue;
Qtrue             812 io.c               if (feof(fptr->f)) return Qtrue;
Qtrue             826 io.c               return Qtrue;
Qtrue             849 io.c               return (fptr->mode & FMODE_SYNC) ? Qtrue : Qfalse;
Qtrue            1457 io.c           	update = Qtrue;
Qtrue            1492 io.c           	    if (*p != term) return Qtrue;
Qtrue            1509 io.c           	    return Qtrue;
Qtrue            2022 io.c               return Qtrue;
Qtrue            2093 io.c               rb_io_fptr_cleanup(fptr, Qtrue);
Qtrue            2186 io.c               return (fptr->f || fptr->f2)?Qfalse:Qtrue;
Qtrue            4323 io.c               return Qtrue;
Qtrue            4730 io.c               else if (arg == Qtrue) {
Qtrue            5254 io.c           	if (init_p == 0) return Qtrue;
Qtrue            5257 io.c           	    return Qtrue;
Qtrue             414 marshal.c          w_extended(klass, arg, Qtrue);
Qtrue             477 marshal.c          else if (obj == Qtrue) {
Qtrue             501 marshal.c      	if (OBJ_TAINTED(obj)) arg->taint = Qtrue;
Qtrue             631 marshal.c      	    w_class(TYPE_STRUCT, obj, arg, Qtrue);
Qtrue             647 marshal.c      	    w_class(TYPE_OBJECT, obj, arg, Qtrue);
Qtrue             655 marshal.c      		w_class(TYPE_DATA, obj, arg, Qtrue);
Qtrue             892 marshal.c      	if (OBJ_TAINTED(str)) arg->taint = Qtrue;
Qtrue            1019 marshal.c      	    int ivar = Qtrue;
Qtrue            1067 marshal.c      	v = Qtrue;
Qtrue            1285 marshal.c      	       static int warn = Qtrue;
Qtrue            1404 marshal.c      	arg.taint = Qtrue;
Qtrue             149 numeric.c          return Qtrue;
Qtrue             156 numeric.c          do_coerce(&x, &y, Qtrue);
Qtrue             239 numeric.c          do_coerce(&zero, &num, Qtrue);
Qtrue             416 numeric.c      	return Qtrue;
Qtrue             805 numeric.c          if (x == y) return Qtrue;
Qtrue             843 numeric.c          return (a == b)?Qtrue:Qfalse;
Qtrue             949 numeric.c          return (a > b)?Qtrue:Qfalse;
Qtrue             985 numeric.c          return (a >= b)?Qtrue:Qfalse;
Qtrue            1020 numeric.c          return (a < b)?Qtrue:Qfalse;
Qtrue            1056 numeric.c          return (a <= b)?Qtrue:Qfalse;
Qtrue            1079 numeric.c      	if (a == b) return Qtrue;
Qtrue            1130 numeric.c      	return Qtrue;
Qtrue            1154 numeric.c          return isnan(value) ? Qtrue : Qfalse;
Qtrue            1206 numeric.c          return Qtrue;
Qtrue            1751 numeric.c          return Qtrue;
Qtrue            2228 numeric.c      	return (FIX2LONG(x) == FIX2LONG(y))?Qtrue:Qfalse;
Qtrue            2275 numeric.c      	if (a > b) return Qtrue;
Qtrue            2298 numeric.c      	if (a >= b) return Qtrue;
Qtrue            2321 numeric.c      	if (a < b) return Qtrue;
Qtrue            2344 numeric.c      	if (a <= b) return Qtrue;
Qtrue            2765 numeric.c      	return Qtrue;
Qtrue              51 object.c           if (obj1 == obj2) return Qtrue;
Qtrue              53 object.c           if (RTEST(result)) return Qtrue;
Qtrue              97 object.c           if (obj1 == obj2) return Qtrue;
Qtrue             481 object.c           if (rb_obj_class(obj) == c) return Qtrue;
Qtrue             530 object.c       	    return Qtrue;
Qtrue             661 object.c       	return Qtrue;
Qtrue             765 object.c           if (OBJ_FROZEN(obj)) return Qtrue;
Qtrue             922 object.c           return RTEST(obj2)?Qtrue:Qfalse;
Qtrue             945 object.c           return Qtrue;
Qtrue             962 object.c           return RTEST(obj2)?Qfalse:Qtrue;
Qtrue            1021 object.c           return RTEST(obj2)?Qtrue:Qfalse;
Qtrue            1041 object.c           return RTEST(obj2)?Qtrue:Qfalse;
Qtrue            1055 object.c           return Qtrue;
Qtrue            1333 object.c           if (mod == arg) return Qtrue;
Qtrue            1344 object.c       	    return Qtrue;
Qtrue            1349 object.c       	    return Qtrue;
Qtrue            1723 object.c           rb_attr(klass, rb_to_id(name), 1, RTEST(pub), Qtrue);
Qtrue            1745 object.c       	rb_attr(klass, rb_to_id(argv[i]), 1, 0, Qtrue);
Qtrue            1767 object.c       	rb_attr(klass, rb_to_id(argv[i]), 0, 1, Qtrue);
Qtrue            1794 object.c       	rb_attr(klass, rb_to_id(argv[i]), 1, 1, Qtrue);
Qtrue            1897 object.c       	args[0] = Qtrue;
Qtrue            1930 object.c       	args[0] = Qtrue;
Qtrue            1954 object.c       	args[0] = Qtrue;
Qtrue            1978 object.c       	args[0] = Qtrue;
Qtrue            2124 object.c       		     val == Qtrue ? "true" :
Qtrue            2145 object.c           v = convert_type(val, tname, method, Qtrue);
Qtrue            2178 object.c           VALUE v = convert_type(val, "Integer", method, Qtrue);
Qtrue            2212 object.c       	return rb_str_to_inum(val, 0, Qtrue);
Qtrue            2358 object.c       	return rb_float_new(rb_str_to_dbl(val, Qtrue));
Qtrue            2767 object.c           rb_define_global_const("TRUE", Qtrue);
Qtrue            4623 parse.c        			    yyvsp[-2].node->nd_lit = rb_range_new(yyvsp[-2].node->nd_lit, yyvsp[0].node->nd_lit, Qtrue);
Qtrue            6551 parse.c        static int command_start = Qtrue;
Qtrue            7249 parse.c            if (strncmp(eos, p, len) == 0) return Qtrue;
Qtrue            7405 parse.c        	command_start = Qtrue;
Qtrue            8071 parse.c        	command_start = Qtrue;
Qtrue            8091 parse.c        	command_start = Qtrue;
Qtrue            9070 parse.c        	    return Qtrue;
Qtrue            9074 parse.c            return Qtrue;
Qtrue            9257 parse.c        	return Qtrue;
Qtrue            9466 parse.c            long state = Qtrue;
Qtrue            9475 parse.c                    state = Qtrue;
Qtrue            9667 parse.c        	if (lvtbl->tbl[i] == id) return Qtrue;
Qtrue            9775 parse.c            return Qtrue;
Qtrue            9925 parse.c        	if (is_special_global_name(++m)) return Qtrue;
Qtrue            9983 parse.c            return *m ? Qfalse : Qtrue;
Qtrue            10142 parse.c            if (is_const_id(id)) return Qtrue;
Qtrue            10150 parse.c            if (is_class_id(id)) return Qtrue;
Qtrue            10158 parse.c            if (is_instance_id(id)) return Qtrue;
Qtrue            10166 parse.c            if (is_local_id(id)) return Qtrue;
Qtrue            10174 parse.c            if (is_junk_id(id)) return Qtrue;
Qtrue            1092 parse.y        			    $1->nd_lit = rb_range_new($1->nd_lit, $3->nd_lit, Qtrue);
Qtrue            2553 parse.y        static int command_start = Qtrue;
Qtrue            3251 parse.y            if (strncmp(eos, p, len) == 0) return Qtrue;
Qtrue            3407 parse.y        	command_start = Qtrue;
Qtrue            4073 parse.y        	command_start = Qtrue;
Qtrue            4093 parse.y        	command_start = Qtrue;
Qtrue            5072 parse.y        	    return Qtrue;
Qtrue            5076 parse.y            return Qtrue;
Qtrue            5259 parse.y        	return Qtrue;
Qtrue            5468 parse.y            long state = Qtrue;
Qtrue            5477 parse.y                    state = Qtrue;
Qtrue            5669 parse.y        	if (lvtbl->tbl[i] == id) return Qtrue;
Qtrue            5777 parse.y            return Qtrue;
Qtrue            5927 parse.y        	if (is_special_global_name(++m)) return Qtrue;
Qtrue            5985 parse.y            return *m ? Qfalse : Qtrue;
Qtrue            6144 parse.y            if (is_const_id(id)) return Qtrue;
Qtrue            6152 parse.y            if (is_class_id(id)) return Qtrue;
Qtrue            6160 parse.y            if (is_instance_id(id)) return Qtrue;
Qtrue            6168 parse.y            if (is_local_id(id)) return Qtrue;
Qtrue            6176 parse.y            if (is_junk_id(id)) return Qtrue;
Qtrue             327 process.c          if (st1 == st2) return Qtrue;
Qtrue             392 process.c      	return Qtrue;
Qtrue             433 process.c      	return Qtrue;
Qtrue             476 process.c      	return Qtrue;
Qtrue             529 process.c          return WEXITSTATUS(status) == EXIT_SUCCESS ? Qtrue : Qfalse;
Qtrue             549 process.c      	return Qtrue;
Qtrue            1328 process.c      	  case Qtrue:
Qtrue            1374 process.c      	overriding = Qtrue;
Qtrue            1375 process.c      	hooked = Qtrue;
Qtrue            1544 process.c          if (status == EXIT_SUCCESS) return Qtrue;
Qtrue            2336 process.c      	return Qtrue;
Qtrue            2986 process.c          return Qtrue;
Qtrue            2988 process.c          return Qtrue;
Qtrue            3044 process.c          return Qtrue;
Qtrue            3046 process.c          return Qtrue;
Qtrue            3103 process.c          return Qtrue;
Qtrue            3215 process.c          return Qtrue;
Qtrue              19 range.c        #define SET_EXCL(r,v) rb_ivar_set((r), id_excl, (v) ? Qtrue : Qfalse)
Qtrue             106 range.c            return EXCL(range) ? Qtrue : Qfalse;
Qtrue             128 range.c            if (range == obj) return Qtrue;
Qtrue             139 range.c            return Qtrue;
Qtrue             149 range.c            if (rb_cmpint(r, a, b) < 0) return Qtrue;
Qtrue             163 range.c            if (c < 0) return Qtrue;
Qtrue             186 range.c            if (range == obj) return Qtrue;
Qtrue             197 range.c            return Qtrue;
Qtrue             493 range.c            return Qtrue;
Qtrue             584 range.c        	    if (r_lt(val, end)) return Qtrue;
Qtrue             587 range.c        	    if (r_le(val, end)) return Qtrue;
Qtrue             548 re.c               if (RREGEXP(re)->ptr->options & RE_OPTION_IGNORECASE) return Qtrue;
Qtrue             965 re.c               return Qtrue;
Qtrue            1479 re.c               if (re1 == re2) return Qtrue;
Qtrue            1486 re.c           	return Qtrue;
Qtrue            1558 re.c               return Qtrue;
Qtrue            2147 re.c               return ruby_ignorecase?Qtrue:Qfalse;
Qtrue             391 ruby.c         	    v = Qtrue;
Qtrue             400 ruby.c         		    hyphen = Qtrue;
Qtrue             479 ruby.c         	    do_split = Qtrue;
Qtrue             484 ruby.c         	    do_print = Qtrue;
Qtrue             487 ruby.c         	    do_loop = Qtrue;
Qtrue             492 ruby.c         	    ruby_debug = Qtrue;
Qtrue             493 ruby.c         	    ruby_verbose = Qtrue;
Qtrue             510 ruby.c         	    ruby_verbose = Qtrue;
Qtrue             530 ruby.c         		    ruby_verbose = Qtrue; break;
Qtrue             536 ruby.c         	    do_check = Qtrue;
Qtrue             551 ruby.c         	    do_line = Qtrue;
Qtrue             558 ruby.c         	    do_search = Qtrue;
Qtrue             598 ruby.c         	    xflag = Qtrue;
Qtrue             685 ruby.c         		ruby_debug = Qtrue;
Qtrue             686 ruby.c                         ruby_verbose = Qtrue;
Qtrue             692 ruby.c         		ruby_verbose = Qtrue;
Qtrue            1123 ruby.c             ruby_verbose = RTEST(val) ? Qtrue : val;
Qtrue             642 ruby.h             if (obj == Qtrue) return rb_cTrueClass;
Qtrue             659 ruby.h             if (obj == Qtrue) return T_TRUE;
Qtrue             673 ruby.h             if (SPECIAL_CONST_P(obj)) return Qtrue;
Qtrue             499 sprintf.c      		    val = rb_str_to_inum(val, 0, Qtrue);
Qtrue             368 string.c       	return Qtrue;
Qtrue             936 string.c           if (str1 == str2) return Qtrue;
Qtrue             945 string.c       	return Qtrue;
Qtrue             968 string.c       	return Qtrue;
Qtrue            2455 string.c       	    return Qtrue;
Qtrue            2463 string.c           return Qtrue;
Qtrue            3495 string.c       	awk_split = Qtrue;
Qtrue            3501 string.c       		awk_split = Qtrue;
Qtrue             794 struct.c           if (s == s2) return Qtrue;
Qtrue             804 struct.c           return Qtrue;
Qtrue             844 struct.c           if (s == s2) return Qtrue;
Qtrue             854 struct.c           return Qtrue;
Qtrue             219 time.c             return time_timeval(time, Qtrue);
Qtrue             831 time.c             return time_utc_or_local(argc, argv, Qtrue, klass);
Qtrue             979 time.c         	    if (tobj1->tv.tv_usec == tobj2->tv.tv_usec) return Qtrue;
Qtrue            1011 time.c             if (tobj->gmt) return Qtrue;
Qtrue            1604 time.c             return tobj->tm.tm_isdst?Qtrue:Qfalse;
Qtrue            1739 time.c         		    tobj->tm.tm_isdst?Qtrue:Qfalse,
Qtrue            1992 time.c         	sec = make_time_t(&tm, Qtrue);
Qtrue             755 variable.c         return Qtrue;
Qtrue             906 variable.c     	return Qtrue;
Qtrue            1031 variable.c         return ivar_get(obj, id, Qtrue);
Qtrue            1075 variable.c     	    return Qtrue;
Qtrue            1437 variable.c         return rb_const_get_0(klass, id, Qtrue, Qtrue);
Qtrue            1445 variable.c         return rb_const_get_0(klass, id, Qfalse, Qtrue);
Qtrue            1453 variable.c         return rb_const_get_0(klass, id, Qtrue, Qfalse);
Qtrue            1594 variable.c     	    return Qtrue;
Qtrue            1612 variable.c         return rb_const_defined_0(klass, id, Qtrue, Qtrue);
Qtrue            1620 variable.c         return rb_const_defined_0(klass, id, Qfalse, Qtrue);
Qtrue            1628 variable.c         return rb_const_defined_0(klass, id, Qtrue, Qfalse);
Qtrue            1673 variable.c         mod_av_set(klass, id, val, Qtrue);
Qtrue            1796 variable.c     	    return Qtrue;
Qtrue            1840 variable.c         rb_cvar_set(klass, id, val, Qtrue);


Qundef

Qundef            113 enum.c             VALUE memo = Qundef;
Qundef            118 enum.c             if (memo != Qundef) {
Qundef            261 enum.c             if (*memo == Qundef) {
Qundef            306 enum.c             VALUE memo = Qundef;
Qundef            309 enum.c         	memo = Qundef;
Qundef            311 enum.c             if (memo == Qundef) return Qnil;
Qundef            610 enum.c             if (*memo == Qundef) {
Qundef            629 enum.c             if (*memo == Qundef) {
Qundef            660 enum.c             VALUE result = Qundef;
Qundef            663 enum.c             if (result == Qundef) return Qnil;
Qundef            688 enum.c             if (*memo == Qundef) {
Qundef            707 enum.c             if (*memo == Qundef) {
Qundef            737 enum.c             VALUE result = Qundef;
Qundef            740 enum.c             if (result == Qundef) return Qnil;
Qundef            254 error.c            if (x == Qundef) {
Qundef           1721 eval.c             if (val == Qundef) val = prot_tag->retval;
Qundef           1815 eval.c         	    if (result == Qundef && NIL_P(rb_autoload_p((VALUE)klass, id))) {
Qundef           1839 eval.c         	    if (result == Qundef) {
Qundef           2645 eval.c         		    Qundef, 0);
Qundef           2668 eval.c         	return Qundef;
Qundef           2689 eval.c             if (v == Qundef) return rb_ary_new2(0);
Qundef           2711 eval.c             if (v == Qundef) return rb_ary_new2(0);
Qundef           2728 eval.c         	return Qundef;
Qundef           2804 eval.c           if ((prot_tag->retval = (v)) == Qundef) {\
Qundef           3173 eval.c         	if (result == Qundef) result = Qnil;
Qundef           3182 eval.c         	    result = Qundef;	/* no arg */
Qundef           4711 eval.c             if (retval == Qundef) retval = Qnil;
Qundef           4741 eval.c             if (retval == Qundef) retval = Qnil;
Qundef           4854 eval.c         		else if (val == Qundef) {
Qundef           4891 eval.c         		if (val == Qundef && node->nd_state != YIELD_FUNC_SVALUE)
Qundef           4995 eval.c         	return rb_yield_0(Qundef, 0, 0, 0, Qfalse);
Qundef           5014 eval.c         	    values = Qundef;
Qundef           5041 eval.c         	rb_yield_0(Qundef, 0, 0, 0, Qfalse);
Qundef           5102 eval.c             if (val == Qundef) {
Qundef           6043 eval.c         	return Qundef;
Qundef           6739 eval.c             if (state) jump_tag_but_local_jump(state, Qundef);
Qundef           7652 eval.c             proc_invoke(data, rb_ary_new2(0), Qundef, 0);
Qundef           8344 eval.c             volatile VALUE result = Qundef;
Qundef           8372 eval.c             if (self != Qundef) _block.frame.self = self;
Qundef           8386 eval.c         	result = rb_yield_0(args, self, (self!=Qundef)?CLASS_OF(self):0, pcall, avalue);
Qundef           8406 eval.c         	if (!pcall && result != Qundef) {
Qundef           8410 eval.c         	if (result != Qundef) {
Qundef           8458 eval.c             return proc_invoke(proc, args, Qundef, 0);
Qundef           8862 eval.c             data->recv = Qundef;
Qundef           8945 eval.c             return mnew(mod, Qundef, rb_to_id(vid), rb_cUnboundMethod);
Qundef           8991 eval.c             if (data->recv == Qundef) {
Qundef           9230 eval.c         	if (data->recv == 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             70 hash.c             if (a == Qundef || b == Qundef) return -1;
Qundef            130 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef            169 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef            176 hash.c          	st_delete_safe(tbl, (st_data_t*)&key, 0, Qundef);
Qundef            194 hash.c         	    st_cleanup_safe(RHASH(hash)->tbl, Qundef);
Qundef            360 hash.c             if (key != Qundef) st_insert(tbl, key, value);
Qundef            663 hash.c         	if (st_delete_safe(RHASH(hash)->tbl, (st_data_t*)&key, &val, Qundef)) {
Qundef            687 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef            733 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef            800 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef            927 hash.c             if (key != Qundef) {
Qundef           1009 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef           1042 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef           1074 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef           1108 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef           1145 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef           1204 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef           1296 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef           1329 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef           1388 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef           1434 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef           1506 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef           1538 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef           1548 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef           2348 hash.c             if (key != Qundef) {
Qundef           2378 hash.c             if (key != Qundef) {
Qundef           1287 process.c      	    rb_protect(rb_yield, Qundef, &status);
Qundef            660 ruby.h             if (obj == Qundef) return T_UNDEF;
Qundef             99 sprintf.c      #define GETARG() (nextvalue != Qundef ? nextvalue : \
Qundef            277 sprintf.c      	nextvalue = Qundef;
Qundef            326 sprintf.c      		if (nextvalue != Qundef) {
Qundef           1288 variable.c         if ((tbl = RCLASS(mod)->iv_tbl) && st_lookup(tbl, id, &av) && av != Qundef)
Qundef           1291 variable.c         rb_const_set(mod, id, Qundef);
Qundef           1391 variable.c         if (!tbl || !st_lookup(tbl, id, &val) || val != Qundef) {
Qundef           1410 variable.c     	    if (value == Qundef) {
Qundef           1480 variable.c     	if (val == Qundef) {
Qundef           1592 variable.c     	    if (value == Qundef && NIL_P(autoload_file(klass, id)))
Qundef           1657 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                3354 regex.c        #define IS_ACTIVE(R)  ((R).bits.is_active)
R                3355 regex.c        #define MATCHED_SOMETHING(R)  ((R).bits.matched_something)
R                 483 util.c           char *R = (char*)base + size*(nel-1); /* right end of current region */
R                 494 util.c           POP(L,R);
R                 498 util.c             if (L + size == R) {       /* 2 elements */
R                 499 util.c               if ((*cmp)(L,R,d) > 0) mmswap(L,R); goto nxt;
R                 502 util.c             l = L; r = R;
R                 617 util.c         	if (l-L < R-r) {PUSH(r,R); R = l;} /* sort left side first */
R                 619 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    3427 ext/nkf/nkf-utf8/nkf.c     static int range[RANGE_NUM_MAX][2] = {
RANGE_NUM_MAX    3459 ext/nkf/nkf-utf8/nkf.c     for (i = 0; i < RANGE_NUM_MAX; i++) {


RANY

RANY              387 gc.c               RANY(obj)->file = ruby_sourcefile;
RANY              388 gc.c               RANY(obj)->line = ruby_sourceline;
RANY              601 gc.c               register RVALUE *p = RANY(ptr);
RANY              713 gc.c               obj = RANY(ptr);
RANY              746 gc.c               register RVALUE *obj = RANY(ptr);
RANY              751 gc.c               obj = RANY(ptr);
RANY             1131 gc.c               RANY(p)->as.free.flags = 0;
RANY             1132 gc.c               RANY(p)->as.free.next = freelist;
RANY             1133 gc.c               freelist = RANY(p);
RANY             1140 gc.c               switch (RANY(obj)->as.basic.flags & T_MASK) {
RANY             1153 gc.c               switch (RANY(obj)->as.basic.flags & T_MASK) {
RANY             1155 gc.c           	if (RANY(obj)->as.object.iv_tbl) {
RANY             1156 gc.c           	    st_free_table(RANY(obj)->as.object.iv_tbl);
RANY             1162 gc.c           	st_free_table(RANY(obj)->as.klass.m_tbl);
RANY             1163 gc.c           	if (RANY(obj)->as.object.iv_tbl) {
RANY             1164 gc.c           	    st_free_table(RANY(obj)->as.object.iv_tbl);
RANY             1168 gc.c           	if (RANY(obj)->as.string.ptr && !FL_TEST(obj, ELTS_SHARED)) {
RANY             1169 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.string.ptr));
RANY             1173 gc.c           	if (RANY(obj)->as.array.ptr && !FL_TEST(obj, ELTS_SHARED)) {
RANY             1174 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.array.ptr));
RANY             1178 gc.c           	if (RANY(obj)->as.hash.tbl) {
RANY             1179 gc.c           	    st_free_table(RANY(obj)->as.hash.tbl);
RANY             1183 gc.c           	if (RANY(obj)->as.regexp.ptr) {
RANY             1184 gc.c           	    re_free_pattern(RANY(obj)->as.regexp.ptr);
RANY             1186 gc.c           	if (RANY(obj)->as.regexp.str) {
RANY             1187 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.regexp.str));
RANY             1192 gc.c           	    if ((long)RANY(obj)->as.data.dfree == -1) {
RANY             1195 gc.c           	    else if (RANY(obj)->as.data.dfree) {
RANY             1196 gc.c           		(*RANY(obj)->as.data.dfree)(DATA_PTR(obj));
RANY             1201 gc.c           	if (RANY(obj)->as.match.regs) {
RANY             1202 gc.c           	    re_free_registers(RANY(obj)->as.match.regs);
RANY             1203 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.match.regs));
RANY             1207 gc.c           	if (RANY(obj)->as.file.fptr) {
RANY             1208 gc.c           	    rb_io_fptr_finalize(RANY(obj)->as.file.fptr);
RANY             1209 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.file.fptr));
RANY             1222 gc.c           	if (RANY(obj)->as.bignum.digits) {
RANY             1223 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.bignum.digits));
RANY             1229 gc.c           	    if (RANY(obj)->as.node.u1.tbl) {
RANY             1230 gc.c           		RUBY_CRITICAL(free(RANY(obj)->as.node.u1.tbl));
RANY             1234 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.node.u1.node));
RANY             1240 gc.c           	if (RANY(obj)->as.scope.local_vars &&
RANY             1241 gc.c                       RANY(obj)->as.scope.flags != SCOPE_ALLOCA) {
RANY             1242 gc.c           	    VALUE *vars = RANY(obj)->as.scope.local_vars-1;
RANY             1244 gc.c           		RUBY_CRITICAL(free(RANY(obj)->as.scope.local_tbl));
RANY             1245 gc.c           	    if (RANY(obj)->as.scope.flags & SCOPE_MALLOC)
RANY             1251 gc.c           	if (RANY(obj)->as.rstruct.ptr) {
RANY             1252 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.rstruct.ptr));
RANY             1258 gc.c           	       RANY(obj)->as.basic.flags & T_MASK, obj);
RANY             1849 gc.c           		DATA_PTR(p) && RANY(p)->as.data.dfree) {
RANY             1851 gc.c           		if ((long)RANY(p)->as.data.dfree == -1) {
RANY             1854 gc.c           		else if (RANY(p)->as.data.dfree) {
RANY             1855 gc.c           		    (*RANY(p)->as.data.dfree)(DATA_PTR(p));
RANY             1860 gc.c           		rb_io_fptr_finalize(RANY(p)->as.file.fptr);


RARRAY

RARRAY             66 array.c        	ptr = ALLOC_N(VALUE, RARRAY(ary)->len);
RARRAY             68 array.c        	RARRAY(ary)->aux.capa = RARRAY(ary)->len;
RARRAY             69 array.c        	MEMCPY(ptr, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
RARRAY             70 array.c        	RARRAY(ary)->ptr = ptr;
RARRAY            127 array.c            RARRAY(ary)->ptr = ALLOC_N(VALUE, len);
RARRAY            128 array.c            RARRAY(ary)->aux.capa = len;
RARRAY            172 array.c        	RARRAY(ary)->ptr[i] = va_arg(ar, VALUE);
RARRAY            176 array.c            RARRAY(ary)->len = n;
RARRAY            189 array.c        	MEMCPY(RARRAY(ary)->ptr, elts, VALUE, n);
RARRAY            191 array.c            RARRAY(ary)->len = n;
RARRAY            203 array.c            RARRAY(ary)->ptr[0] = car;
RARRAY            204 array.c            RARRAY(ary)->ptr[1] = cdr;
RARRAY            205 array.c            RARRAY(ary)->len = 2;
RARRAY            274 array.c        	RARRAY(ary)->len = 0;
RARRAY            297 array.c            if (len > RARRAY(ary)->aux.capa) {
RARRAY            298 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, len);
RARRAY            299 array.c        	RARRAY(ary)->aux.capa = len;
RARRAY            309 array.c        	    RARRAY(ary)->len = i + 1;
RARRAY            313 array.c        	memfill(RARRAY(ary)->ptr, len, val);
RARRAY            314 array.c        	RARRAY(ary)->len = len;
RARRAY            338 array.c        	RARRAY(ary)->ptr = ALLOC_N(VALUE, argc);
RARRAY            339 array.c        	MEMCPY(RARRAY(ary)->ptr, argv, VALUE, argc);
RARRAY            341 array.c            RARRAY(ary)->len = RARRAY(ary)->aux.capa = argc;
RARRAY            353 array.c        	idx += RARRAY(ary)->len;
RARRAY            356 array.c        		    idx - RARRAY(ary)->len);
RARRAY            361 array.c            if (idx >= RARRAY(ary)->aux.capa) {
RARRAY            362 array.c        	long new_capa = RARRAY(ary)->aux.capa / 2;
RARRAY            371 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, new_capa);
RARRAY            372 array.c        	RARRAY(ary)->aux.capa = new_capa;
RARRAY            374 array.c            if (idx > RARRAY(ary)->len) {
RARRAY            375 array.c        	rb_mem_clear(RARRAY(ary)->ptr + RARRAY(ary)->len,
RARRAY            376 array.c        		     idx-RARRAY(ary)->len + 1);
RARRAY            379 array.c            if (idx >= RARRAY(ary)->len) {
RARRAY            380 array.c        	RARRAY(ary)->len = idx + 1;
RARRAY            382 array.c            RARRAY(ary)->ptr[idx] = val;
RARRAY            403 array.c            rb_ary_store(ary, RARRAY(ary)->len, item);
RARRAY            449 array.c            if (RARRAY(ary)->len == 0) return Qnil;
RARRAY            451 array.c        	    RARRAY(ary)->len * 2 < RARRAY(ary)->aux.capa &&
RARRAY            452 array.c        	    RARRAY(ary)->aux.capa > ARY_DEFAULT_SIZE) {
RARRAY            453 array.c        	RARRAY(ary)->aux.capa = RARRAY(ary)->len * 2;
RARRAY            454 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->aux.capa);
RARRAY            456 array.c            return RARRAY(ary)->ptr[--RARRAY(ary)->len];
RARRAY            467 array.c        	shared->len = RARRAY(ary)->len;
RARRAY            468 array.c        	shared->ptr = RARRAY(ary)->ptr;
RARRAY            469 array.c        	shared->aux.capa = RARRAY(ary)->aux.capa;
RARRAY            470 array.c        	RARRAY(ary)->aux.shared = (VALUE)shared;
RARRAY            476 array.c        	return RARRAY(ary)->aux.shared;
RARRAY            500 array.c            if (RARRAY(ary)->len == 0) return Qnil;
RARRAY            501 array.c            top = RARRAY(ary)->ptr[0];
RARRAY            503 array.c            RARRAY(ary)->ptr++;		/* shift ptr */
RARRAY            504 array.c            RARRAY(ary)->len--;
RARRAY            514 array.c            if (RARRAY(ary)->len == RARRAY(ary)->aux.capa) {
RARRAY            515 array.c        	long capa_inc = RARRAY(ary)->aux.capa / 2;
RARRAY            519 array.c        	RARRAY(ary)->aux.capa += capa_inc;
RARRAY            520 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->aux.capa);
RARRAY            524 array.c            MEMMOVE(RARRAY(ary)->ptr + 1, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
RARRAY            526 array.c            RARRAY(ary)->len++;
RARRAY            527 array.c            RARRAY(ary)->ptr[0] = item;
RARRAY            550 array.c            long len = RARRAY(ary)->len;
RARRAY            558 array.c            MEMMOVE(RARRAY(ary)->ptr + argc, RARRAY(ary)->ptr, VALUE, len);
RARRAY            559 array.c            MEMCPY(RARRAY(ary)->ptr, argv, VALUE, argc);
RARRAY            570 array.c            if (RARRAY(ary)->len == 0) return Qnil;
RARRAY            571 array.c            if (offset < 0 || RARRAY(ary)->len <= offset) {
RARRAY            574 array.c            return RARRAY(ary)->ptr[offset];
RARRAY            583 array.c        	offset += RARRAY(ary)->len;
RARRAY            596 array.c            if (beg > RARRAY(ary)->len) return Qnil;
RARRAY            599 array.c            if (beg + len > RARRAY(ary)->len) {
RARRAY            600 array.c        	len = RARRAY(ary)->len - beg;
RARRAY            608 array.c            ptr = RARRAY(ary)->ptr;
RARRAY            610 array.c            RARRAY(ary2)->ptr = ptr + beg;
RARRAY            611 array.c            RARRAY(ary2)->len = len;
RARRAY            612 array.c            RARRAY(ary2)->aux.shared = shared;
RARRAY            666 array.c        	    beg += RARRAY(ary)->len;
RARRAY            682 array.c            switch (rb_range_beg_len(arg, &beg, &len, RARRAY(ary)->len, 0)) {
RARRAY            737 array.c        	if (RARRAY(ary)->len == 0) return Qnil;
RARRAY            738 array.c        	return RARRAY(ary)->ptr[0];
RARRAY            746 array.c        	if (n > RARRAY(ary)->len) n = RARRAY(ary)->len;
RARRAY            749 array.c        	    rb_ary_push(result, RARRAY(ary)->ptr[i]);
RARRAY            773 array.c        	if (RARRAY(ary)->len == 0) return Qnil;
RARRAY            774 array.c        	return RARRAY(ary)->ptr[RARRAY(ary)->len-1];
RARRAY            782 array.c        	if (n > RARRAY(ary)->len) n = RARRAY(ary)->len;
RARRAY            784 array.c        	for (i=RARRAY(ary)->len-n; n--; i++) {
RARRAY            785 array.c        	    rb_ary_push(result, RARRAY(ary)->ptr[i]);
RARRAY            829 array.c        	idx +=  RARRAY(ary)->len;
RARRAY            831 array.c            if (idx < 0 || RARRAY(ary)->len <= idx) {
RARRAY            838 array.c            return RARRAY(ary)->ptr[idx];
RARRAY            861 array.c            for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY            862 array.c        	if (rb_equal(RARRAY(ary)->ptr[i], val))
RARRAY            886 array.c            long i = RARRAY(ary)->len;
RARRAY            889 array.c        	if (i > RARRAY(ary)->len) {
RARRAY            890 array.c        	    i = RARRAY(ary)->len;
RARRAY            893 array.c        	if (rb_equal(RARRAY(ary)->ptr[i], val))
RARRAY            948 array.c        	beg += RARRAY(ary)->len;
RARRAY            950 array.c        	    beg -= RARRAY(ary)->len;
RARRAY            954 array.c            if (beg + len > RARRAY(ary)->len) {
RARRAY            955 array.c        	len = RARRAY(ary)->len - beg;
RARRAY            963 array.c        	rlen = RARRAY(rpl)->len;
RARRAY            967 array.c            if (beg >= RARRAY(ary)->len) {
RARRAY            969 array.c        	if (len >= RARRAY(ary)->aux.capa) {
RARRAY            970 array.c        	    REALLOC_N(RARRAY(ary)->ptr, VALUE, len);
RARRAY            971 array.c        	    RARRAY(ary)->aux.capa = len;
RARRAY            973 array.c        	rb_mem_clear(RARRAY(ary)->ptr + RARRAY(ary)->len, beg - RARRAY(ary)->len);
RARRAY            975 array.c        	    MEMCPY(RARRAY(ary)->ptr + beg, RARRAY(rpl)->ptr, VALUE, rlen);
RARRAY            977 array.c        	RARRAY(ary)->len = len;
RARRAY            982 array.c        	if (beg + len > RARRAY(ary)->len) {
RARRAY            983 array.c        	    len = RARRAY(ary)->len - beg;
RARRAY            986 array.c        	alen = RARRAY(ary)->len + rlen - len;
RARRAY            987 array.c        	if (alen >= RARRAY(ary)->aux.capa) {
RARRAY            988 array.c        	    REALLOC_N(RARRAY(ary)->ptr, VALUE, alen);
RARRAY            989 array.c        	    RARRAY(ary)->aux.capa = alen;
RARRAY            993 array.c        	    MEMMOVE(RARRAY(ary)->ptr + beg + rlen, RARRAY(ary)->ptr + beg + len,
RARRAY            994 array.c        		    VALUE, RARRAY(ary)->len - (beg + len));
RARRAY            995 array.c        	    RARRAY(ary)->len = alen;
RARRAY            998 array.c        	    MEMMOVE(RARRAY(ary)->ptr + beg, RARRAY(rpl)->ptr, VALUE, rlen);
RARRAY           1059 array.c            if (rb_range_beg_len(argv[0], &beg, &len, RARRAY(ary)->len, 1)) {
RARRAY           1097 array.c        	pos = RARRAY(ary)->len;
RARRAY           1127 array.c            for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY           1128 array.c        	rb_yield(RARRAY(ary)->ptr[i]);
RARRAY           1154 array.c            for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY           1179 array.c            long len = RARRAY(ary)->len;
RARRAY           1182 array.c        	rb_yield(RARRAY(ary)->ptr[len]);
RARRAY           1183 array.c        	if (RARRAY(ary)->len < len) {
RARRAY           1184 array.c        	    len = RARRAY(ary)->len;
RARRAY           1203 array.c            return LONG2NUM(RARRAY(ary)->len);
RARRAY           1219 array.c            if (RARRAY(ary)->len == 0)
RARRAY           1228 array.c            VALUE dup = rb_ary_new2(RARRAY(ary)->len);
RARRAY           1231 array.c            MEMCPY(RARRAY(dup)->ptr, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
RARRAY           1232 array.c            RARRAY(dup)->len = RARRAY(ary)->len;
RARRAY           1254 array.c            if (RARRAY(ary)->len == 0) return rb_str_new(0, 0);
RARRAY           1257 array.c            for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY           1258 array.c        	tmp = rb_check_string_type(RARRAY(ary)->ptr[i]);
RARRAY           1263 array.c        	len += RSTRING(sep)->len * (RARRAY(ary)->len - 1);
RARRAY           1266 array.c            for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY           1267 array.c        	tmp = RARRAY(ary)->ptr[i];
RARRAY           1335 array.c            if (RARRAY(ary)->len == 0) return rb_str_new(0, 0);
RARRAY           1431 array.c            for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY           1432 array.c        	s = rb_inspect(RARRAY(ary)->ptr[i]);
RARRAY           1453 array.c            if (RARRAY(ary)->len == 0) return rb_str_new2("[]");
RARRAY           1471 array.c        	VALUE dup = rb_ary_new2(RARRAY(ary)->len);
RARRAY           1500 array.c            if (RARRAY(ary)->len > 1) {
RARRAY           1501 array.c        	p1 = RARRAY(ary)->ptr;
RARRAY           1502 array.c        	p2 = p1 + RARRAY(ary)->len - 1;	/* points last item */
RARRAY           1558 array.c            if (RARRAY(data->ary)->ptr != data->ptr || RARRAY(data->ary)->len != data->len) {
RARRAY           1608 array.c            data.ptr = RARRAY(ary)->ptr; data.len = RARRAY(ary)->len;
RARRAY           1609 array.c            qsort(RARRAY(ary)->ptr, RARRAY(ary)->len, sizeof(VALUE),
RARRAY           1643 array.c            if (RARRAY(ary)->len > 1) {
RARRAY           1697 array.c        	return rb_ary_new4(RARRAY(ary)->len, RARRAY(ary)->ptr);
RARRAY           1700 array.c            collect = rb_ary_new2(RARRAY(ary)->len);
RARRAY           1701 array.c            for (i = 0; i < RARRAY(ary)->len; i++) {
RARRAY           1702 array.c        	rb_ary_push(collect, rb_yield(RARRAY(ary)->ptr[i]));
RARRAY           1728 array.c            for (i = 0; i < RARRAY(ary)->len; i++) {
RARRAY           1729 array.c        	rb_ary_store(ary, i, rb_yield(RARRAY(ary)->ptr[i]));
RARRAY           1789 array.c            return rb_values_at(ary, RARRAY(ary)->len, argc, argv, rb_ary_entry);
RARRAY           1811 array.c            result = rb_ary_new2(RARRAY(ary)->len);
RARRAY           1812 array.c            for (i = 0; i < RARRAY(ary)->len; i++) {
RARRAY           1813 array.c        	if (RTEST(rb_yield(RARRAY(ary)->ptr[i]))) {
RARRAY           1844 array.c            for (i1 = i2 = 0; i1 < RARRAY(ary)->len; i1++) {
RARRAY           1845 array.c        	VALUE e = RARRAY(ary)->ptr[i1];
RARRAY           1853 array.c            if (RARRAY(ary)->len == i2) {
RARRAY           1861 array.c            if (RARRAY(ary)->len > i2) {
RARRAY           1862 array.c        	RARRAY(ary)->len = i2;
RARRAY           1863 array.c        	if (i2 * 2 < RARRAY(ary)->aux.capa &&
RARRAY           1864 array.c        	    RARRAY(ary)->aux.capa > ARY_DEFAULT_SIZE) {
RARRAY           1865 array.c        	    REALLOC_N(RARRAY(ary)->ptr, VALUE, i2 * 2);
RARRAY           1866 array.c        	    RARRAY(ary)->aux.capa = i2 * 2;
RARRAY           1878 array.c            long i, len = RARRAY(ary)->len;
RARRAY           1888 array.c            del = RARRAY(ary)->ptr[pos];
RARRAY           1890 array.c        	RARRAY(ary)->ptr[pos] = RARRAY(ary)->ptr[i];
RARRAY           1892 array.c            RARRAY(ary)->len = pos;
RARRAY           1957 array.c        	    pos = RARRAY(ary)->len + pos;
RARRAY           1964 array.c            if (!FIXNUM_P(arg1) && rb_range_beg_len(arg1, &pos, &len, RARRAY(ary)->len, 1)) {
RARRAY           1988 array.c            for (i1 = i2 = 0; i1 < RARRAY(ary)->len; i1++) {
RARRAY           1989 array.c        	VALUE v = RARRAY(ary)->ptr[i1];
RARRAY           1996 array.c            if (RARRAY(ary)->len == i2) return Qnil;
RARRAY           1997 array.c            if (i2 < RARRAY(ary)->len)
RARRAY           1998 array.c        	RARRAY(ary)->len = i2;
RARRAY           2075 array.c        	for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY           2086 array.c            len = RARRAY(ary)->len;
RARRAY           2118 array.c            alen = RARRAY(ary)->len;
RARRAY           2123 array.c        	    elen = RARRAY(tmp)->len;
RARRAY           2129 array.c        	else if (elen != RARRAY(tmp)->len) {
RARRAY           2131 array.c        		     RARRAY(tmp)->len, elen);
RARRAY           2162 array.c            if (RARRAY(copy)->ptr && !FL_TEST(copy, ELTS_SHARED))
RARRAY           2163 array.c        	free(RARRAY(copy)->ptr);
RARRAY           2164 array.c            RARRAY(copy)->ptr = RARRAY(orig)->ptr;
RARRAY           2165 array.c            RARRAY(copy)->len = RARRAY(orig)->len;
RARRAY           2166 array.c            RARRAY(copy)->aux.shared = shared;
RARRAY           2187 array.c            RARRAY(ary)->len = 0;
RARRAY           2188 array.c            if (ARY_DEFAULT_SIZE * 2 < RARRAY(ary)->aux.capa) {
RARRAY           2189 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, ARY_DEFAULT_SIZE * 2);
RARRAY           2190 array.c        	RARRAY(ary)->aux.capa = ARY_DEFAULT_SIZE * 2;
RARRAY           2241 array.c        	len = RARRAY(ary)->len;
RARRAY           2244 array.c        	if (rb_range_beg_len(arg1, &beg, &len, RARRAY(ary)->len, 1)) {
RARRAY           2251 array.c        	    beg = RARRAY(ary)->len + beg;
RARRAY           2254 array.c        	len = NIL_P(arg2) ? RARRAY(ary)->len - beg : NUM2LONG(arg2);
RARRAY           2259 array.c            if (end > RARRAY(ary)->len) {
RARRAY           2260 array.c        	if (end >= RARRAY(ary)->aux.capa) {
RARRAY           2261 array.c        	    REALLOC_N(RARRAY(ary)->ptr, VALUE, end);
RARRAY           2262 array.c        	    RARRAY(ary)->aux.capa = end;
RARRAY           2264 array.c        	rb_mem_clear(RARRAY(ary)->ptr + RARRAY(ary)->len, end - RARRAY(ary)->len);
RARRAY           2265 array.c        	RARRAY(ary)->len = end;
RARRAY           2274 array.c        	    if (i>=RARRAY(ary)->len) break;
RARRAY           2275 array.c        	    RARRAY(ary)->ptr[i] = v;
RARRAY           2279 array.c        	p = RARRAY(ary)->ptr + beg;
RARRAY           2306 array.c            len = RARRAY(x)->len + RARRAY(y)->len;
RARRAY           2308 array.c            MEMCPY(RARRAY(z)->ptr, RARRAY(x)->ptr, VALUE, RARRAY(x)->len);
RARRAY           2309 array.c            MEMCPY(RARRAY(z)->ptr + RARRAY(x)->len, RARRAY(y)->ptr, VALUE, RARRAY(y)->len);
RARRAY           2310 array.c            RARRAY(z)->len = len;
RARRAY           2329 array.c            if (RARRAY(y)->len > 0) {
RARRAY           2330 array.c        	rb_ary_splice(x, RARRAY(x)->len, 0, y);
RARRAY           2368 array.c            if (LONG_MAX/len < RARRAY(ary)->len) {
RARRAY           2371 array.c            len *= RARRAY(ary)->len;
RARRAY           2374 array.c            RARRAY(ary2)->len = len;
RARRAY           2376 array.c            for (i=0; i<len; i+=RARRAY(ary)->len) {
RARRAY           2377 array.c        	MEMCPY(RARRAY(ary2)->ptr+i, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
RARRAY           2411 array.c            for (i = 0; i < RARRAY(ary)->len; ++i) {
RARRAY           2412 array.c        	v = RARRAY(ary)->ptr[i];
RARRAY           2414 array.c        	    RARRAY(v)->len > 0 &&
RARRAY           2415 array.c        	    rb_equal(RARRAY(v)->ptr[0], key))
RARRAY           2442 array.c            for (i = 0; i < RARRAY(ary)->len; ++i) {
RARRAY           2443 array.c        	v = RARRAY(ary)->ptr[i];
RARRAY           2445 array.c        	    RARRAY(v)->len > 1 &&
RARRAY           2446 array.c        	    rb_equal(RARRAY(v)->ptr[1], value))
RARRAY           2479 array.c            if (RARRAY(ary1)->len != RARRAY(ary2)->len) return Qfalse;
RARRAY           2480 array.c            for (i=0; i<RARRAY(ary1)->len; i++) {
RARRAY           2503 array.c            if (RARRAY(ary1)->len != RARRAY(ary2)->len) return Qfalse;
RARRAY           2504 array.c            for (i=0; i<RARRAY(ary1)->len; i++) {
RARRAY           2526 array.c            h = RARRAY(ary)->len;
RARRAY           2527 array.c            for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY           2529 array.c        	n = rb_hash(RARRAY(ary)->ptr[i]);
RARRAY           2555 array.c            for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY           2556 array.c        	if (rb_equal(RARRAY(ary)->ptr[i], item)) {
RARRAY           2591 array.c            len = RARRAY(ary1)->len;
RARRAY           2592 array.c            if (len > RARRAY(ary2)->len) {
RARRAY           2593 array.c        	len = RARRAY(ary2)->len;
RARRAY           2601 array.c            len = RARRAY(ary1)->len - RARRAY(ary2)->len;
RARRAY           2614 array.c            for (i=0; i<RARRAY(ary1)->len; i++) {
RARRAY           2615 array.c        	rb_hash_aset(hash, RARRAY(ary1)->ptr[i], Qtrue);
RARRAY           2618 array.c        	for (i=0; i<RARRAY(ary2)->len; i++) {
RARRAY           2619 array.c        	    rb_hash_aset(hash, RARRAY(ary2)->ptr[i], Qtrue);
RARRAY           2648 array.c            for (i=0; i<RARRAY(ary1)->len; i++) {
RARRAY           2649 array.c        	if (st_lookup(RHASH(hash)->tbl, RARRAY(ary1)->ptr[i], 0)) continue;
RARRAY           2674 array.c            ary3 = rb_ary_new2(RARRAY(ary1)->len < RARRAY(ary2)->len ?
RARRAY           2675 array.c        	    RARRAY(ary1)->len : RARRAY(ary2)->len);
RARRAY           2678 array.c            for (i=0; i<RARRAY(ary1)->len; i++) {
RARRAY           2708 array.c            ary3 = rb_ary_new2(RARRAY(ary1)->len+RARRAY(ary2)->len);
RARRAY           2711 array.c            for (i=0; i<RARRAY(ary1)->len; i++) {
RARRAY           2717 array.c            for (i=0; i<RARRAY(ary2)->len; i++) {
RARRAY           2749 array.c            if (RARRAY(ary)->len == RHASH(hash)->tbl->num_entries) {
RARRAY           2752 array.c            for (i=j=0; i<RARRAY(ary)->len; i++) {
RARRAY           2758 array.c            RARRAY(ary)->len = j;
RARRAY           2800 array.c            p = t = RARRAY(ary)->ptr;
RARRAY           2801 array.c            end = p + RARRAY(ary)->len;
RARRAY           2807 array.c            if (RARRAY(ary)->len == (p - RARRAY(ary)->ptr)) {
RARRAY           2810 array.c            RARRAY(ary)->len = RARRAY(ary)->aux.capa = (p - RARRAY(ary)->ptr);
RARRAY           2811 array.c            REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
RARRAY           2852 array.c            p = RARRAY(ary)->ptr;
RARRAY           2853 array.c            pend = p + RARRAY(ary)->len;
RARRAY           2870 array.c            long n, lim = idx + RARRAY(ary2)->len;
RARRAY           2915 array.c            while (i<RARRAY(ary)->len) {
RARRAY           2916 array.c        	VALUE ary2 = RARRAY(ary)->ptr[i];
RARRAY            480 enum.c         	ary  = rb_ary_new2(RARRAY(obj)->len);
RARRAY            487 enum.c             if (RARRAY(ary)->len > 1) {
RARRAY            488 enum.c         	qsort(RARRAY(ary)->ptr, RARRAY(ary)->len, sizeof(VALUE), sort_by_cmp, 0);
RARRAY            493 enum.c             for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY            494 enum.c         	RARRAY(ary)->ptr[i] = RNODE(RARRAY(ary)->ptr[i])->u2.value;
RARRAY            828 enum.c             tmp = rb_ary_new2(RARRAY(args)->len + 1);
RARRAY            830 enum.c             for (i=0; i<RARRAY(args)->len; i++) {
RARRAY            831 enum.c         	rb_ary_push(tmp, rb_ary_entry(RARRAY(args)->ptr[i], idx));
RARRAY            511 error.c        	for (i=0;i<RARRAY(bt)->len;i++) {
RARRAY            512 error.c        	    if (TYPE(RARRAY(bt)->ptr[i]) != T_STRING) {
RARRAY           1193 eval.c             else if (RARRAY(errat)->len == 0) {
RARRAY           1197 eval.c         	VALUE mesg = RARRAY(errat)->ptr[0];
RARRAY           1253 eval.c         	struct RArray *ep = RARRAY(errat);
RARRAY           1259 eval.c         	ep = RARRAY(errat);
RARRAY           1764 eval.c         	    val = rb_funcall2(cmd, rb_intern("call"), RARRAY(arg)->len, RARRAY(arg)->ptr);
RARRAY           1892 eval.c             if (ruby_wrapper && RARRAY(ary)->len == 0) {
RARRAY           2193 eval.c         	argc = RARRAY(args)->len;\
RARRAY           2195 eval.c         	MEMCPY(argv, RARRAY(args)->ptr, VALUE, argc);\
RARRAY           2667 eval.c             if (RARRAY(tmp)->len == 0) {
RARRAY           2670 eval.c             if (RARRAY(tmp)->len == 1) {
RARRAY           2671 eval.c         	top = rb_check_array_type(RARRAY(tmp)->ptr[0]);
RARRAY           2673 eval.c         	    return RARRAY(tmp)->ptr[0];
RARRAY           2675 eval.c         	if (RARRAY(top)->len > 1) {
RARRAY           2694 eval.c             if (RARRAY(tmp)->len == 1) {
RARRAY           2695 eval.c         	top = rb_check_array_type(RARRAY(tmp)->ptr[0]);
RARRAY           2696 eval.c         	if (!NIL_P(top) && RARRAY(top)->len > 1) {
RARRAY           2727 eval.c             if (RARRAY(v)->len == 0) {
RARRAY           2730 eval.c             if (RARRAY(v)->len == 1) {
RARRAY           2731 eval.c         	return RARRAY(v)->ptr[0];
RARRAY           2963 eval.c         		    for (i=0; i<RARRAY(v)->len; i++) {
RARRAY           2964 eval.c         			if (RTEST(RARRAY(v)->ptr[i])) {
RARRAY           3004 eval.c         			for (i=0; i<RARRAY(v)->len; i++) {
RARRAY           3005 eval.c         			    if (RTEST(rb_funcall2(RARRAY(v)->ptr[i], eqq, 1, &val))){
RARRAY           3722 eval.c         		RARRAY(ary)->ptr[i++] = rb_eval(self, node->nd_head);
RARRAY           3723 eval.c         		RARRAY(ary)->len = i;
RARRAY           4823 eval.c         		if (lambda && RARRAY(val)->len != 0) {
RARRAY           4825 eval.c         			     RARRAY(val)->len);
RARRAY           4829 eval.c         		if (TYPE(val) == T_ARRAY && RARRAY(val)->len != 0) {
RARRAY           4831 eval.c         			     RARRAY(val)->len);
RARRAY           4843 eval.c         		    len = RARRAY(val)->len;
RARRAY           4848 eval.c         			val = RARRAY(val)->ptr[0];
RARRAY           5013 eval.c         	if (RARRAY(values)->len == 0) {
RARRAY           5057 eval.c             len = RARRAY(val)->len;
RARRAY           5060 eval.c         	assign(self, list->nd_head, RARRAY(val)->ptr[i], pcall);
RARRAY           5069 eval.c         	    assign(self, node->nd_args, rb_ary_new4(len-i, RARRAY(val)->ptr+i), pcall);
RARRAY           5181 eval.c         			RARRAY(args)->len, RARRAY(args)->ptr, scope);
RARRAY           5932 eval.c             argc = RARRAY(args)->len; /* Assigns LONG, but argc is INT */
RARRAY           5934 eval.c             MEMCPY(argv, RARRAY(args)->ptr, VALUE, argc);
RARRAY           6197 eval.c             for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY           6198 eval.c         	printf("\tfrom %s\n", RSTRING(RARRAY(ary)->ptr[i])->ptr);
RARRAY           6359 eval.c         			rb_str_update(mesg, 0, 0, RARRAY(errat)->ptr[0]);
RARRAY           6361 eval.c         		    RARRAY(errat)->ptr[0] = RARRAY(backtrace(-2))->ptr[0];
RARRAY           6815 eval.c             for (i = 0; i < RARRAY(rb_features)->len; ++i) {
RARRAY           6816 eval.c         	v = RARRAY(rb_features)->ptr[i];
RARRAY           8361 eval.c             if (!pcall && RARRAY(args)->len == 1) {
RARRAY           8363 eval.c         	args = RARRAY(args)->ptr[0];
RARRAY           8374 eval.c             _block.frame.argc = RARRAY(tmp)->len;
RARRAY           8375 eval.c             _block.frame.argv = ALLOCA_N(VALUE, RARRAY(tmp)->len);
RARRAY           8376 eval.c             MEMCPY(_block.frame.argv, RARRAY(tmp)->ptr, VALUE, RARRAY(tmp)->len);
RARRAY           9284 eval.c             ret = method_call(RARRAY(a)->len, RARRAY(a)->ptr, method);
RARRAY           10849 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            405 ext/dbm/dbm.c      for (i = 0; i < RARRAY(ary)->len; i++) {
RARRAY            406 ext/dbm/dbm.c  	keystr = RARRAY(ary)->ptr[i];
RARRAY            415 ext/dbm/dbm.c      if (n > 0) dbmp->di_size = n - RARRAY(ary)->len;
RARRAY            477 ext/dbm/dbm.c      if (RARRAY(pair)->len < 2) {
RARRAY            480 ext/dbm/dbm.c      fdbm_store(dbm, RARRAY(pair)->ptr[0], RARRAY(pair)->ptr[1]);
RARRAY            234 ext/dl/dl.c      len = RARRAY(v)->len;
RARRAY            262 ext/dl/dl.c      len = RARRAY(v)->len;
RARRAY            290 ext/dl/dl.c      len = RARRAY(v)->len;
RARRAY            319 ext/dl/dl.c      len = RARRAY(v)->len;
RARRAY            348 ext/dl/dl.c      len = RARRAY(v)->len;
RARRAY            377 ext/dl/dl.c      len = RARRAY(v)->len;
RARRAY            406 ext/dl/dl.c      len = RARRAY(v)->len;
RARRAY            467 ext/dl/dl.c      len = RARRAY(v)->len;
RARRAY            551 ext/dl/ptr.c     num = RARRAY(rest)->len;
RARRAY             79 ext/enumerator/enumerator.c     if (RARRAY(ary)->len == size) {
RARRAY            117 ext/enumerator/enumerator.c     if (RARRAY(ary)->len > 0) rb_yield(ary);
RARRAY            144 ext/enumerator/enumerator.c     if (RARRAY(ary)->len == size) {
RARRAY            148 ext/enumerator/enumerator.c     if (RARRAY(ary)->len == size) {
RARRAY            499 ext/gdbm/gdbm.c     for (i = 0; i < RARRAY(ary)->len; i++)
RARRAY            500 ext/gdbm/gdbm.c         rb_gdbm_delete(obj, RARRAY(ary)->ptr[i]);
RARRAY            502 ext/gdbm/gdbm.c     if (n > 0) dbmp->di_size = n - RARRAY(ary)->len;
RARRAY            580 ext/gdbm/gdbm.c     if (RARRAY(pair)->len < 2) {
RARRAY            583 ext/gdbm/gdbm.c     fgdbm_store(dbm, RARRAY(pair)->ptr[0], RARRAY(pair)->ptr[1]);
RARRAY            399 ext/iconv/iconv.c 		str = RARRAY(rescue)->len > 0 ? RARRAY(rescue)->ptr[0] : Qnil;
RARRAY            483 ext/iconv/iconv.c 		if ((len = RARRAY(rescue)->len) > 0)
RARRAY            484 ext/iconv/iconv.c 		    rb_str_concat(ret, RARRAY(rescue)->ptr[0]);
RARRAY            485 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            355 ext/openssl/ossl_ssl.c 	    for(i = 0; i < RARRAY(val)->len; i++){
RARRAY            356 ext/openssl/ossl_ssl.c 		client_ca = GetX509CertPtr(RARRAY(val)->ptr[i]);
RARRAY            465 ext/openssl/ossl_ssl.c         for (i = 0; i < RARRAY(v)->len; i++) {
RARRAY            470 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            161 ext/readline/readline.c     matches = RARRAY(ary)->len;
RARRAY            166 ext/readline/readline.c 	temp = rb_obj_as_string(RARRAY(ary)->ptr[i]);
RARRAY            689 ext/readline/readline.c 	if (RARRAY(result)->len >= 2)
RARRAY            716 ext/readline/readline.c 	if (RARRAY(result)->len >= 2)
RARRAY            384 ext/sdbm/init.c     for (i = 0; i < RARRAY(ary)->len; i++) {
RARRAY            385 ext/sdbm/init.c 	keystr = RARRAY(ary)->ptr[i];
RARRAY            394 ext/sdbm/init.c     if (n > 0) dbmp->di_size = n - RARRAY(ary)->len;
RARRAY            456 ext/sdbm/init.c     if (RARRAY(pair)->len < 2) {
RARRAY            459 ext/sdbm/init.c     fsdbm_store(dbm, RARRAY(pair)->ptr[0], RARRAY(pair)->ptr[1]);
RARRAY           2929 ext/socket/socket.c 	if (RARRAY(sa)->len == 3) {
RARRAY           2930 ext/socket/socket.c 	    af = RARRAY(sa)->ptr[0];
RARRAY           2931 ext/socket/socket.c 	    port = RARRAY(sa)->ptr[1];
RARRAY           2932 ext/socket/socket.c 	    host = RARRAY(sa)->ptr[2];
RARRAY           2934 ext/socket/socket.c 	else if (RARRAY(sa)->len >= 4) {
RARRAY           2935 ext/socket/socket.c 	    af = RARRAY(sa)->ptr[0];
RARRAY           2936 ext/socket/socket.c 	    port = RARRAY(sa)->ptr[1];
RARRAY           2937 ext/socket/socket.c 	    host = RARRAY(sa)->ptr[3];
RARRAY           2939 ext/socket/socket.c 		host = RARRAY(sa)->ptr[2];
RARRAY           2953 ext/socket/socket.c 		     RARRAY(sa)->len);
RARRAY           1065 ext/syck/rubyext.c     for ( i = 0; i < RARRAY(tparts)->len; i++ ) {
RARRAY           1102 ext/syck/rubyext.c             while ( RARRAY(parts)->len > 1 )
RARRAY           1120 ext/syck/rubyext.c                     if ( RARRAY(subclass_parts)->len > 0 && rb_respond_to( target_class, s_tag_subclasses ) &&
RARRAY           1550 ext/syck/rubyext.c         for ( i = 0; i < RARRAY( val )->len; i++ )
RARRAY           1639 ext/syck/rubyext.c         for ( i = 0; i < RARRAY(keys)->len; i++ )
RARRAY           1675 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            784 ext/win32ole/win32ole.c             psab[i].cElements = RARRAY(val1)->len;
RARRAY           2215 ext/win32ole/win32ole.c     dispParams.cArgs = RARRAY(args)->len;
RARRAY           2246 ext/win32ole/win32ole.c                 rgsabound[0].cElements = RARRAY(param)->len;
RARRAY           5417 ext/win32ole/win32ole.c     len = RARRAY(ary)->len;
RARRAY           5447 ext/win32ole/win32ole.c     len = RARRAY(ary)->len;
RARRAY           5541 ext/win32ole/win32ole.c     for(i = 0; i < RARRAY(ary)->len && (unsigned int) i < pdispparams->cArgs; i++) {
RARRAY            114 file.c             struct RArray *args = RARRAY(vargs);
RARRAY           2919 file.c             if (RARRAY(ary)->len == 0) return rb_str_new(0, 0);
RARRAY           2924 file.c             for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY           2925 file.c         	if (TYPE(RARRAY(ary)->ptr[i]) == T_STRING) {
RARRAY           2926 file.c         	    len += RSTRING(RARRAY(ary)->ptr[i])->len;
RARRAY           2933 file.c         	len += RSTRING(sep)->len * RARRAY(ary)->len - 1;
RARRAY           2936 file.c             for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY           2937 file.c         	tmp = RARRAY(ary)->ptr[i];
RARRAY           4189 file.c             for (i=0;i<RARRAY(rb_load_path)->len;i++) {
RARRAY           4190 file.c         	VALUE str = RARRAY(rb_load_path)->ptr[i];
RARRAY           4251 file.c         	for (i=0;i<RARRAY(rb_load_path)->len;i++) {
RARRAY           4252 file.c         	    VALUE str = RARRAY(rb_load_path)->ptr[i];
RARRAY           1792 gc.c               for (i=0; i<RARRAY(finalizers)->len; i++) {
RARRAY           1793 gc.c           	args[0] = RARRAY(finalizers)->ptr[i];
RARRAY           1798 gc.c           	for (i=0; i<RARRAY(table)->len; i++) {
RARRAY           1799 gc.c           	    VALUE final = RARRAY(table)->ptr[i];
RARRAY           1800 gc.c           	    args[0] = RARRAY(final)->ptr[1];
RARRAY           1802 gc.c           	    args[2] = FIX2INT(RARRAY(final)->ptr[0]);
RARRAY            631 hash.c         	RARRAY(indexes)->ptr[i] = rb_hash_aref(hash, argv[i]);
RARRAY            632 hash.c         	RARRAY(indexes)->len++;
RARRAY           1947 hash.c             for (i=0; i<RARRAY(keys)->len; i++) {
RARRAY           1948 hash.c         	rb_yield(RARRAY(keys)->ptr[i]);
RARRAY           1978 hash.c             for (i=0; i<RARRAY(values)->len; i++) {
RARRAY           1979 hash.c         	rb_yield(RARRAY(values)->ptr[i]);
RARRAY           2004 hash.c             for (i=0; i<RARRAY(ary)->len; i+=2) {
RARRAY           2006 hash.c         	    rb_yield_values(2, RARRAY(ary)->ptr[i], RARRAY(ary)->ptr[i+1]);
RARRAY           2009 hash.c         	    rb_yield(rb_assoc_new(RARRAY(ary)->ptr[i], RARRAY(ary)->ptr[i+1]));
RARRAY           2039 hash.c             for (i=0; i<RARRAY(keys)->len; i++) {
RARRAY           2040 hash.c         	VALUE val = rb_f_getenv(Qnil, RARRAY(keys)->ptr[i]);
RARRAY           2042 hash.c         	    if (RTEST(rb_yield_values(2, RARRAY(keys)->ptr[i], val))) {
RARRAY           2043 hash.c         		FL_UNSET(RARRAY(keys)->ptr[i], FL_TAINT);
RARRAY           2044 hash.c         		env_delete(Qnil, RARRAY(keys)->ptr[i]);
RARRAY           2112 hash.c             for (i=0; i<RARRAY(keys)->len; i++) {
RARRAY           2113 hash.c         	VALUE val = rb_f_getenv(Qnil, RARRAY(keys)->ptr[i]);
RARRAY           2115 hash.c         	    env_delete(Qnil, RARRAY(keys)->ptr[i]);
RARRAY           2283 hash.c         	    RARRAY(indexes)->ptr[i] = Qnil;
RARRAY           2286 hash.c         	    RARRAY(indexes)->ptr[i] = env_str_new2(getenv(RSTRING(tmp)->ptr));
RARRAY           2288 hash.c         	RARRAY(indexes)->len = i+1;
RARRAY           2368 hash.c             for (i=0; i<RARRAY(keys)->len; i++) {
RARRAY           2369 hash.c         	env_delete(env, RARRAY(keys)->ptr[i]);
RARRAY           3774 io.c               for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY           3775 io.c           	tmp = RARRAY(ary)->ptr[i];
RARRAY           4221 io.c           	if (RARRAY(rb_argv)->len > 0) {
RARRAY           4234 io.c           	if (RARRAY(rb_argv)->len > 0) {
RARRAY           4575 io.c           	for (i=0; i<RARRAY(read)->len; i++) {
RARRAY           4576 io.c           	    GetOpenFile(rb_io_get_io(RARRAY(read)->ptr[i]), fptr);
RARRAY           4596 io.c           	for (i=0; i<RARRAY(write)->len; i++) {
RARRAY           4597 io.c           	    GetOpenFile(rb_io_get_io(RARRAY(write)->ptr[i]), fptr);
RARRAY           4613 io.c           	for (i=0; i<RARRAY(except)->len; i++) {
RARRAY           4614 io.c           	    GetOpenFile(rb_io_get_io(RARRAY(except)->ptr[i]), fptr);
RARRAY           4642 io.c           	    list = RARRAY(res)->ptr[0];
RARRAY           4643 io.c           	    for (i=0; i< RARRAY(read)->len; i++) {
RARRAY           4644 io.c           		GetOpenFile(rb_io_get_io(RARRAY(read)->ptr[i]), fptr);
RARRAY           4653 io.c           	    list = RARRAY(res)->ptr[1];
RARRAY           4654 io.c           	    for (i=0; i< RARRAY(write)->len; i++) {
RARRAY           4655 io.c           		GetOpenFile(rb_io_get_io(RARRAY(write)->ptr[i]), fptr);
RARRAY           4666 io.c           	    list = RARRAY(res)->ptr[2];
RARRAY           4667 io.c           	    for (i=0; i< RARRAY(except)->len; i++) {
RARRAY           4668 io.c           		GetOpenFile(rb_io_get_io(RARRAY(except)->ptr[i]), fptr);
RARRAY            600 marshal.c      		long len = RARRAY(obj)->len;
RARRAY            601 marshal.c      		VALUE *ptr = RARRAY(obj)->ptr;
RARRAY            640 marshal.c      		    w_symbol(SYM2ID(RARRAY(mem)->ptr[i]), arg);
RARRAY           1034 marshal.c                  while (RARRAY(extmod)->len > 0) {
RARRAY           1216 marshal.c      		if (RARRAY(mem)->ptr[i] != ID2SYM(slot)) {
RARRAY           1220 marshal.c      			     rb_id2name(SYM2ID(RARRAY(mem)->ptr[i])));
RARRAY           1253 marshal.c                      while (RARRAY(extmod)->len > 0) {
RARRAY            140 numeric.c          if (TYPE(ary) != T_ARRAY || RARRAY(ary)->len != 2) {
RARRAY            147 numeric.c          *x = RARRAY(ary)->ptr[0];
RARRAY            148 numeric.c          *y = RARRAY(ary)->ptr[1];
RARRAY            460 pack.c             items = RARRAY(ary)->len;
RARRAY            463 pack.c         #define THISFROM RARRAY(ary)->ptr[idx]
RARRAY            464 pack.c         #define NEXTFROM (items-- > 0 ? RARRAY(ary)->ptr[idx++] : (rb_raise(rb_eArgError, toofew),0))
RARRAY            956 pack.c         			c = NUM2INT(RARRAY(from)->ptr[1]) | 0x80; /* mod */
RARRAY            958 pack.c         			from = RARRAY(from)->ptr[0]; /* div */
RARRAY           1887 pack.c         		    p = RARRAY(a)->ptr;
RARRAY           1888 pack.c         		    pend = p + RARRAY(a)->len;
RARRAY           1929 pack.c         			p = RARRAY(a)->ptr;
RARRAY           1930 pack.c         			pend = p + RARRAY(a)->len;
RARRAY           1222 process.c      	if (RARRAY(tmp)->len != 2) {
RARRAY           1225 process.c      	prog = RARRAY(tmp)->ptr[0];
RARRAY           1226 process.c      	argv[0] = RARRAY(tmp)->ptr[1];
RARRAY           1430 process.c      	if (RARRAY(argv[0])->len != 2) {
RARRAY           1433 process.c      	argv[0] = RARRAY(argv[0])->ptr[0];
RARRAY           1451 process.c      	if (RARRAY(argv[0])->len != 2) {
RARRAY           1454 process.c      	prog = RARRAY(argv[0])->ptr[0];
RARRAY           1455 process.c      	argv[0] = RARRAY(argv[0])->ptr[1];
RARRAY           1481 process.c      	if (RARRAY(argv[0])->len != 2) {
RARRAY           1484 process.c      	argv[0] = RARRAY(argv[0])->ptr[0];
RARRAY           1504 process.c      	if (RARRAY(argv[0])->len != 2) {
RARRAY           1507 process.c      	prog = RARRAY(argv[0])->ptr[0];
RARRAY           1508 process.c      	argv[0] = RARRAY(argv[0])->ptr[1];
RARRAY           2468 process.c          ngroups = RARRAY(ary)->len;
RARRAY           2474 process.c          for (i = 0; i < ngroups && i < RARRAY(ary)->len; i++) {
RARRAY           2475 process.c      	VALUE g = RARRAY(ary)->ptr[i];
RARRAY            379 ruby.c         	n = RARRAY(rb_argv)->len;
RARRAY            380 ruby.c         	args = RARRAY(rb_argv)->ptr;
RARRAY            423 ruby.c         	n = RARRAY(rb_argv)->len - n;
RARRAY            459 string.c       	argv = ALLOCA_N(VALUE, RARRAY(arg)->len + 1);
RARRAY            461 string.c       	MEMCPY(argv+1, RARRAY(arg)->ptr, VALUE, RARRAY(arg)->len);
RARRAY            462 string.c       	return rb_f_sprintf(RARRAY(arg)->len+1, argv);
RARRAY           3592 string.c       	while (RARRAY(result)->len > 0 &&
RARRAY           3593 string.c       	       RSTRING(RARRAY(result)->ptr[RARRAY(result)->len-1])->len == 0)
RARRAY             55 struct.c           if (RSTRUCT(s)->len != RARRAY(members)->len) {
RARRAY             57 struct.c       		 RARRAY(members)->len, RSTRUCT(s)->len);
RARRAY             70 struct.c           ary = rb_ary_new2(RARRAY(members)->len);
RARRAY             71 struct.c           p = RARRAY(members)->ptr; pend = p + RARRAY(members)->len;
RARRAY            109 struct.c           for (i=0; i<RARRAY(members)->len; i++) {
RARRAY            110 struct.c       	if (RARRAY(members)->ptr[i] == slot) {
RARRAY            169 struct.c           for (i=0; i<RARRAY(members)->len; i++) {
RARRAY            170 struct.c       	slot = RARRAY(members)->ptr[i];
RARRAY            206 struct.c           rb_iv_set(nstr, "__size__", LONG2NUM(RARRAY(members)->len));
RARRAY            213 struct.c           for (i=0; i< RARRAY(members)->len; i++) {
RARRAY            214 struct.c       	ID id = SYM2ID(RARRAY(members)->ptr[i]);
RARRAY            310 struct.c           for (i=0; i<RARRAY(rest)->len; i++) {
RARRAY            311 struct.c       	id = rb_to_id(RARRAY(rest)->ptr[i]);
RARRAY            312 struct.c       	RARRAY(rest)->ptr[i] = ID2SYM(id);
RARRAY            345 struct.c           if (n < RARRAY(values)->len) {
RARRAY            348 struct.c           MEMCPY(RSTRUCT(self)->ptr, RARRAY(values)->ptr, VALUE, RARRAY(values)->len);
RARRAY            349 struct.c           if (n > RARRAY(values)->len) {
RARRAY            350 struct.c       	rb_mem_clear(RSTRUCT(self)->ptr+RARRAY(values)->len,
RARRAY            351 struct.c       		     n-RARRAY(values)->len);
RARRAY            379 struct.c           return rb_class_new_instance(RARRAY(values)->len, RARRAY(values)->ptr, klass);
RARRAY            489 struct.c       	slot = RARRAY(members)->ptr[i];
RARRAY            576 struct.c           len = RARRAY(members)->len;
RARRAY            578 struct.c       	if (SYM2ID(RARRAY(members)->ptr[i]) == id) {
RARRAY            636 struct.c           len = RARRAY(members)->len;
RARRAY            637 struct.c           if (RSTRUCT(s)->len != RARRAY(members)->len) {
RARRAY            639 struct.c       		 RARRAY(members)->len, RSTRUCT(s)->len);
RARRAY            642 struct.c       	if (SYM2ID(RARRAY(members)->ptr[i]) == id) {


RBASIC

RBASIC             68 class.c        	RBASIC(clone)->klass = rb_singleton_class_clone(orig);
RBASIC            107 class.c            VALUE klass = RBASIC(obj)->klass;
RBASIC            114 class.c        	OBJSETUP(clone, 0, RBASIC(klass)->flags);
RBASIC            117 class.c        	    RBASIC(clone)->klass = (VALUE)clone;
RBASIC            120 class.c        	    RBASIC(clone)->klass = rb_singleton_class_clone(klass);
RBASIC            132 class.c        	rb_singleton_class_attached(RBASIC(clone)->klass, (VALUE)clone);
RBASIC            156 class.c            RBASIC(obj)->klass = klass;
RBASIC            159 class.c        	RBASIC(klass)->klass = klass;
RBASIC            160 class.c        	RCLASS(klass)->super = RBASIC(rb_class_real(RCLASS(obj)->super))->klass;
RBASIC            163 class.c        	VALUE metasuper = RBASIC(rb_class_real(super))->klass;
RBASIC            167 class.c        	    RBASIC(klass)->klass = metasuper;
RBASIC            183 class.c            rb_make_metaclass(klass, RBASIC(super)->klass);
RBASIC            196 class.c            if (RBASIC(super)->flags & FL_SINGLETON) {
RBASIC            350 class.c        	module = RBASIC(module)->klass;
RBASIC            359 class.c        	RBASIC(klass)->klass = RBASIC(module)->klass;
RBASIC            362 class.c        	RBASIC(klass)->klass = module;
RBASIC            446 class.c        	    rb_ary_push(ary, RBASIC(p)->klass);
RBASIC            481 class.c        	    if (RBASIC(p)->klass == mod2) return Qtrue;
RBASIC            513 class.c        	    rb_ary_push(ary, RBASIC(p)->klass);
RBASIC            873 class.c            if (FL_TEST(RBASIC(obj)->klass, FL_SINGLETON) &&
RBASIC            874 class.c        	rb_iv_get(RBASIC(obj)->klass, "__attached__") == obj) {
RBASIC            875 class.c        	klass = RBASIC(obj)->klass;
RBASIC            878 class.c        	klass = rb_make_metaclass(obj, RBASIC(obj)->klass);
RBASIC            385 enum.c             if (RBASIC(ary)->klass) {
RBASIC            485 enum.c             RBASIC(ary)->klass = 0;
RBASIC            490 enum.c             if (RBASIC(ary)->klass) {
RBASIC            496 enum.c             RBASIC(ary)->klass = rb_cArray;
RBASIC            899 error.c        	    RBASIC(self)->klass = klass;
RBASIC            793 eval.c         	if (RBASIC(_old)->flags) /* unless it's already recycled */ \
RBASIC           2628 eval.c         	    klass = RBASIC(klass)->klass;
RBASIC           5913 eval.c         		defined_class = RBASIC(defined_class)->klass;
RBASIC           6299 eval.c         	ruby_class = RBASIC(ruby_class)->klass;
RBASIC           8204 eval.c             return (RBASIC(data)->flags & PROC_TMASK) >> PROC_TSHIFT;
RBASIC           8774 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            442 ext/zlib/zlib.c 	RBASIC(z->buf)->klass = 0;
RBASIC            474 ext/zlib/zlib.c 	RBASIC(z->buf)->klass = 0;
RBASIC            495 ext/zlib/zlib.c 	RBASIC(z->buf)->klass = 0;
RBASIC            531 ext/zlib/zlib.c 	RBASIC(dst)->klass = rb_cString;
RBASIC            553 ext/zlib/zlib.c     RBASIC(dst)->klass = rb_cString;
RBASIC            595 ext/zlib/zlib.c 	RBASIC(z->input)->klass = 0;
RBASIC            648 ext/zlib/zlib.c 	RBASIC(dst)->klass = rb_cString;
RBASIC           1086 gc.c           	    else if (RBASIC(p)->flags == FL_MARK) {
RBASIC           1091 gc.c           		RBASIC(p)->flags &= ~FL_MARK;
RBASIC           1769 gc.c               RBASIC(dest)->flags |= FL_FINALIZE;
RBASIC           1900 gc.c               if (BUILTIN_TYPE(ptr) == 0 || RBASIC(ptr)->klass == 0) {
RBASIC             66 hash.c             if (TYPE(a) == T_STRING && RBASIC(a)->klass == rb_cString &&
RBASIC             67 hash.c         	TYPE(b) == T_STRING && RBASIC(b)->klass == rb_cString) {
RBASIC           3104 io.c               RBASIC(port)->klass = klass;
RBASIC           3444 io.c               RBASIC(io)->klass = RBASIC(nfile)->klass;
RBASIC            384 marshal.c      	path = rb_class2name(RBASIC(klass)->klass);
RBASIC           1053 marshal.c      	    if (TYPE(v) == T_MODULE || !RTEST(rb_class_inherited_p(c, RBASIC(v)->klass))) {
RBASIC           1058 marshal.c      	    RBASIC(v)->klass = c;
RBASIC            210 object.c           RBASIC(dest)->flags &= ~(T_MASK|FL_EXIVAR);
RBASIC            211 object.c           RBASIC(dest)->flags |= RBASIC(obj)->flags & (T_MASK|FL_EXIVAR|FL_TAINT);
RBASIC            265 object.c           RBASIC(clone)->klass = rb_singleton_class_clone(obj);
RBASIC            266 object.c           RBASIC(clone)->flags = (RBASIC(obj)->flags | FL_TEST(clone, FL_TAINT)) & ~(FL_FREEZE|FL_FINALIZE);
RBASIC            268 object.c           RBASIC(clone)->flags |= RBASIC(obj)->flags & FL_FREEZE;
RBASIC           1345 object.c       	mod = RBASIC(mod)->klass;
RBASIC           1468 object.c           RBASIC(mod)->klass = klass;
RBASIC           1541 object.c           rb_make_metaclass(klass, RBASIC(super)->klass);
RBASIC           1634 object.c       	super = RBASIC(klass)->klass;
RBASIC            207 re.c               curr_kcode = RBASIC(re)->flags & KCODE_MASK;
RBASIC            347 re.c           	    switch ((RBASIC(re)->flags & KCODE_MASK)) {
RBASIC            599 re.c           	switch (RBASIC(re)->flags & KCODE_MASK) {
RBASIC            840 re.c           	(RBASIC(re)->flags & KCODE_MASK) != reg_kcode) {
RBASIC            842 re.c           	RBASIC(re)->flags &= ~KCODE_MASK;
RBASIC            843 re.c           	RBASIC(re)->flags |= reg_kcode;
RBASIC           1429 re.c           	return RBASIC(re)->flags & KCODE_MASK;
RBASIC           1667 re.c           	    switch (RBASIC(argv[0])->flags & KCODE_MASK) {
RBASIC           1859 re.c               switch (RBASIC(re)->flags & KCODE_MASK) {
RBASIC           1938 re.c                                   kcode = RBASIC(v)->flags & KCODE_MASK;
RBASIC           1940 re.c                               else if ((RBASIC(v)->flags & KCODE_MASK) != kcode) {
RBASIC            292 ruby.h             RBASIC(obj)->flags = (t);\
RBASIC            293 ruby.h             RBASIC(obj)->klass = (c);\
RBASIC            297 ruby.h             OBJSETUP(clone,rb_singleton_class_clone((VALUE)obj),RBASIC(obj)->flags);\
RBASIC            298 ruby.h             rb_singleton_class_attached(RBASIC(clone)->klass, (VALUE)clone);\
RBASIC            302 ruby.h             OBJSETUP(dup,rb_obj_class(obj),(RBASIC(obj)->flags)&(T_MASK|FL_EXIVAR|FL_TAINT));\
RBASIC            450 ruby.h         #define FL_TEST(x,f) (FL_ABLE(x)?(RBASIC(x)->flags&(f)):0)
RBASIC            451 ruby.h         #define FL_SET(x,f) do {if (FL_ABLE(x)) RBASIC(x)->flags |= (f);} while (0)
RBASIC            452 ruby.h         #define FL_UNSET(x,f) do {if (FL_ABLE(x)) RBASIC(x)->flags &= ~(f);} while (0)
RBASIC            453 ruby.h         #define FL_REVERSE(x,f) do {if (FL_ABLE(x)) RBASIC(x)->flags ^= (f);} while (0)
RBASIC            457 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            645 ruby.h             return RBASIC(obj)->klass;
RBASIC            189 string.c           if (FL_TEST(orig, ELTS_SHARED) && (str = RSTRING(orig)->aux.shared) && klass == RBASIC(str)->klass) {
RBASIC            276 string.c       	FL_SET(str, RBASIC(str2)->flags & STR_NOCAPA);
RBASIC           2163 string.c       	RBASIC(dest)->klass = rb_obj_class(str);
RBASIC            191 struct.c       	rb_make_metaclass(nstr, RBASIC(klass)->klass);
RBASIC            206 variable.c     		s = rb_class2name(RBASIC(klass)->klass);
RBASIC           1706 variable.c     	return RBASIC(c)->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            62 bignum.c           VALUE z = bignew_1(CLASS_OF(x), RBIGNUM(x)->len, RBIGNUM(x)->sign);
RBIGNUM            64 bignum.c           MEMCPY(BDIGITS(z), BDIGITS(x), BDIGIT, RBIGNUM(x)->len);
RBIGNUM            73 bignum.c           long i = RBIGNUM(x)->len;
RBIGNUM            83 bignum.c           } while (i < RBIGNUM(x)->len);
RBIGNUM            85 bignum.c       	REALLOC_N(RBIGNUM(x)->digits, BDIGIT, ++RBIGNUM(x)->len);
RBIGNUM            87 bignum.c       	ds[RBIGNUM(x)->len-1] = RBIGNUM(x)->sign ? ~0 : 1;
RBIGNUM           103 bignum.c       	long len = RBIGNUM(x)->len;
RBIGNUM           107 bignum.c       	RBIGNUM(x)->len = ++len;
RBIGNUM           115 bignum.c       		if (RBIGNUM(x)->sign) {
RBIGNUM           150 bignum.c           RBIGNUM(big)->len = i+1;
RBIGNUM           167 bignum.c       	RBIGNUM(big)->sign = 0;
RBIGNUM           202 bignum.c       	long len = RBIGNUM(val)->len;
RBIGNUM           213 bignum.c       	if (!RBIGNUM(val)->sign) q = -q;
RBIGNUM           251 bignum.c           RBIGNUM(big)->len = i+1;
RBIGNUM           254 bignum.c       	RBIGNUM(big)->sign = 0;
RBIGNUM           275 bignum.c           len = RBIGNUM(val)->len * SIZEOF_BDIGITS;
RBIGNUM           280 bignum.c           if (!RBIGNUM(val)->sign) {
RBIGNUM           303 bignum.c       	RBIGNUM(big)->sign = 0;
RBIGNUM           446 bignum.c       	    RBIGNUM(big)->sign = sign;
RBIGNUM           559 bignum.c           RBIGNUM(big)->len = i+1;
RBIGNUM           576 bignum.c       	RBIGNUM(big)->sign = 0;
RBIGNUM           630 bignum.c           i = RBIGNUM(x)->len;
RBIGNUM           673 bignum.c           s[0] = RBIGNUM(x)->sign ? '+' : '-';
RBIGNUM           693 bignum.c           RSTRING(ss)->len -= RBIGNUM(x)->sign?j:j-1;
RBIGNUM           694 bignum.c           memmove(RBIGNUM(x)->sign?s:s+1, s+j, RSTRING(ss)->len);
RBIGNUM           734 bignum.c           long len = RBIGNUM(x)->len;
RBIGNUM           754 bignum.c           if (!RBIGNUM(x)->sign) {
RBIGNUM           766 bignum.c           if (!RBIGNUM(x)->sign) {
RBIGNUM           781 bignum.c           if ((long)num < 0 && (RBIGNUM(x)->sign || (long)num != LONG_MIN)) {
RBIGNUM           784 bignum.c           if (!RBIGNUM(x)->sign) return -(long)num;
RBIGNUM           795 bignum.c           long len = RBIGNUM(x)->len;
RBIGNUM           816 bignum.c           if (!RBIGNUM(x)->sign) return -num;
RBIGNUM           826 bignum.c           if ((LONG_LONG)num < 0 && (RBIGNUM(x)->sign
RBIGNUM           830 bignum.c           if (!RBIGNUM(x)->sign) return -(LONG_LONG)num;
RBIGNUM           881 bignum.c           long i = RBIGNUM(x)->len;
RBIGNUM           891 bignum.c           if (!RBIGNUM(x)->sign) d = -d;
RBIGNUM           925 bignum.c           long xlen = RBIGNUM(x)->len;
RBIGNUM           942 bignum.c           if (RBIGNUM(x)->sign > RBIGNUM(y)->sign) return INT2FIX(1);
RBIGNUM           943 bignum.c           if (RBIGNUM(x)->sign < RBIGNUM(y)->sign) return INT2FIX(-1);
RBIGNUM           944 bignum.c           if (xlen < RBIGNUM(y)->len)
RBIGNUM           945 bignum.c       	return (RBIGNUM(x)->sign) ? INT2FIX(-1) : INT2FIX(1);
RBIGNUM           946 bignum.c           if (xlen > RBIGNUM(y)->len)
RBIGNUM           947 bignum.c       	return (RBIGNUM(x)->sign) ? INT2FIX(1) : INT2FIX(-1);
RBIGNUM           952 bignum.c       	(RBIGNUM(x)->sign ? INT2FIX(1) : INT2FIX(-1)) :
RBIGNUM           953 bignum.c       	    (RBIGNUM(x)->sign ? INT2FIX(-1) : INT2FIX(1));
RBIGNUM           989 bignum.c           if (RBIGNUM(x)->sign != RBIGNUM(y)->sign) return Qfalse;
RBIGNUM           990 bignum.c           if (RBIGNUM(x)->len != RBIGNUM(y)->len) return Qfalse;
RBIGNUM           991 bignum.c           if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,RBIGNUM(y)->len) != 0) return Qfalse;
RBIGNUM          1011 bignum.c           if (RBIGNUM(x)->sign != RBIGNUM(y)->sign) return Qfalse;
RBIGNUM          1012 bignum.c           if (RBIGNUM(x)->len != RBIGNUM(y)->len) return Qfalse;
RBIGNUM          1013 bignum.c           if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,RBIGNUM(y)->len) != 0) return Qfalse;
RBIGNUM          1030 bignum.c           RBIGNUM(z)->sign = !RBIGNUM(x)->sign;
RBIGNUM          1055 bignum.c           if (!RBIGNUM(x)->sign) get2comp(z);
RBIGNUM          1057 bignum.c           i = RBIGNUM(x)->len;
RBIGNUM          1059 bignum.c           RBIGNUM(z)->sign = !RBIGNUM(z)->sign;
RBIGNUM          1060 bignum.c           if (RBIGNUM(x)->sign) get2comp(z);
RBIGNUM          1072 bignum.c           long i = RBIGNUM(x)->len;
RBIGNUM          1075 bignum.c           if (RBIGNUM(x)->len < RBIGNUM(y)->len) {
RBIGNUM          1078 bignum.c           else if (RBIGNUM(x)->len == RBIGNUM(y)->len) {
RBIGNUM          1091 bignum.c           z = bignew(RBIGNUM(x)->len, z==0);
RBIGNUM          1094 bignum.c           for (i = 0, num = 0; i < RBIGNUM(y)->len; i++) {
RBIGNUM          1099 bignum.c           while (num && i < RBIGNUM(x)->len) {
RBIGNUM          1104 bignum.c           while (i < RBIGNUM(x)->len) {
RBIGNUM          1121 bignum.c           sign = (sign == RBIGNUM(y)->sign);
RBIGNUM          1122 bignum.c           if (RBIGNUM(x)->sign != sign) {
RBIGNUM          1127 bignum.c           if (RBIGNUM(x)->len > RBIGNUM(y)->len) {
RBIGNUM          1128 bignum.c       	len = RBIGNUM(x)->len + 1;
RBIGNUM          1132 bignum.c       	len = RBIGNUM(y)->len + 1;
RBIGNUM          1136 bignum.c           len = RBIGNUM(x)->len;
RBIGNUM          1142 bignum.c           len = RBIGNUM(y)->len;
RBIGNUM          1241 bignum.c           j = RBIGNUM(x)->len + RBIGNUM(y)->len + 1;
RBIGNUM          1242 bignum.c           z = bignew(j, RBIGNUM(x)->sign==RBIGNUM(y)->sign);
RBIGNUM          1245 bignum.c           for (i = 0; i < RBIGNUM(x)->len; i++) {
RBIGNUM          1249 bignum.c       	for (j = 0; j < RBIGNUM(y)->len; j++) {
RBIGNUM          1268 bignum.c           long nx = RBIGNUM(x)->len, ny = RBIGNUM(y)->len;
RBIGNUM          1294 bignum.c       	RBIGNUM(z)->sign = RBIGNUM(x)->sign==RBIGNUM(y)->sign;
RBIGNUM          1297 bignum.c       	    RBIGNUM(*modp)->sign = RBIGNUM(x)->sign;
RBIGNUM          1302 bignum.c           z = bignew(nx==ny?nx+2:nx+1, RBIGNUM(x)->sign==RBIGNUM(y)->sign);
RBIGNUM          1373 bignum.c       	RBIGNUM(*divp)->len = i;
RBIGNUM          1388 bignum.c       	RBIGNUM(*modp)->len = ny;
RBIGNUM          1389 bignum.c       	RBIGNUM(*modp)->sign = RBIGNUM(x)->sign;
RBIGNUM          1401 bignum.c           if (RBIGNUM(x)->sign != RBIGNUM(y)->sign && !BIGZEROP(mod)) {
RBIGNUM          1650 bignum.c           if (!RBIGNUM(y)->sign) {
RBIGNUM          1654 bignum.c           if (!RBIGNUM(x)->sign) {
RBIGNUM          1658 bignum.c           if (RBIGNUM(x)->len > RBIGNUM(y)->len) {
RBIGNUM          1659 bignum.c       	l1 = RBIGNUM(y)->len;
RBIGNUM          1660 bignum.c       	l2 = RBIGNUM(x)->len;
RBIGNUM          1663 bignum.c       	sign = RBIGNUM(y)->sign;
RBIGNUM          1666 bignum.c       	l1 = RBIGNUM(x)->len;
RBIGNUM          1667 bignum.c       	l2 = RBIGNUM(y)->len;
RBIGNUM          1670 bignum.c       	sign = RBIGNUM(x)->sign;
RBIGNUM          1672 bignum.c           z = bignew(l2, RBIGNUM(x)->sign || RBIGNUM(y)->sign);
RBIGNUM          1681 bignum.c           if (!RBIGNUM(z)->sign) get2comp(z);
RBIGNUM          1706 bignum.c           if (!RBIGNUM(y)->sign) {
RBIGNUM          1710 bignum.c           if (!RBIGNUM(x)->sign) {
RBIGNUM          1714 bignum.c           if (RBIGNUM(x)->len > RBIGNUM(y)->len) {
RBIGNUM          1715 bignum.c       	l1 = RBIGNUM(y)->len;
RBIGNUM          1716 bignum.c       	l2 = RBIGNUM(x)->len;
RBIGNUM          1719 bignum.c       	sign = RBIGNUM(y)->sign;
RBIGNUM          1722 bignum.c       	l1 = RBIGNUM(x)->len;
RBIGNUM          1723 bignum.c       	l2 = RBIGNUM(y)->len;
RBIGNUM          1726 bignum.c       	sign = RBIGNUM(x)->sign;
RBIGNUM          1728 bignum.c           z = bignew(l2, RBIGNUM(x)->sign && RBIGNUM(y)->sign);
RBIGNUM          1737 bignum.c           if (!RBIGNUM(z)->sign) get2comp(z);
RBIGNUM          1764 bignum.c           if (!RBIGNUM(y)->sign) {
RBIGNUM          1768 bignum.c           if (!RBIGNUM(x)->sign) {
RBIGNUM          1772 bignum.c           if (RBIGNUM(x)->len > RBIGNUM(y)->len) {
RBIGNUM          1773 bignum.c       	l1 = RBIGNUM(y)->len;
RBIGNUM          1774 bignum.c       	l2 = RBIGNUM(x)->len;
RBIGNUM          1777 bignum.c       	sign = RBIGNUM(y)->sign;
RBIGNUM          1780 bignum.c       	l1 = RBIGNUM(x)->len;
RBIGNUM          1781 bignum.c       	l2 = RBIGNUM(y)->len;
RBIGNUM          1784 bignum.c       	sign = RBIGNUM(x)->sign;
RBIGNUM          1786 bignum.c           RBIGNUM(x)->sign = RBIGNUM(x)->sign?1:0;
RBIGNUM          1787 bignum.c           RBIGNUM(y)->sign = RBIGNUM(y)->sign?1:0;
RBIGNUM          1788 bignum.c           z = bignew(l2, !(RBIGNUM(x)->sign ^ RBIGNUM(y)->sign));
RBIGNUM          1797 bignum.c           if (!RBIGNUM(z)->sign) get2comp(z);
RBIGNUM          1824 bignum.c           len = RBIGNUM(x)->len;
RBIGNUM          1825 bignum.c           z = bignew(len+s1+1, RBIGNUM(x)->sign);
RBIGNUM          1862 bignum.c           if (s1 > RBIGNUM(x)->len) {
RBIGNUM          1863 bignum.c       	if (RBIGNUM(x)->sign)
RBIGNUM          1868 bignum.c           if (!RBIGNUM(x)->sign) {
RBIGNUM          1873 bignum.c           i = RBIGNUM(x)->len; j = i - s1;
RBIGNUM          1874 bignum.c           z = bignew(j, RBIGNUM(x)->sign);
RBIGNUM          1875 bignum.c           if (!RBIGNUM(x)->sign) {
RBIGNUM          1884 bignum.c           if (!RBIGNUM(x)->sign) {
RBIGNUM          1918 bignum.c       	if (!RBIGNUM(y)->sign || RBIGNUM(x)->sign)
RBIGNUM          1927 bignum.c           if (!RBIGNUM(x)->sign) {
RBIGNUM          1928 bignum.c       	if (s1 >= RBIGNUM(x)->len) return INT2FIX(1);
RBIGNUM          1933 bignum.c       	if (s1 >= RBIGNUM(x)->len) return INT2FIX(0);
RBIGNUM          1955 bignum.c           key = 0; digits = BDIGITS(x); len = RBIGNUM(x)->len;
RBIGNUM          1997 bignum.c           if (!RBIGNUM(x)->sign) {
RBIGNUM          1999 bignum.c       	RBIGNUM(x)->sign = 1;
RBIGNUM          2010 bignum.c           long len = RBIGNUM(max)->len;
RBIGNUM          2041 bignum.c           return LONG2FIX(RBIGNUM(big)->len*SIZEOF_BDIGITS);
RBIGNUM            28 compar.c       	if (RBIGNUM(val)->sign) return 1;
RBIGNUM           559 marshal.c      		char sign = RBIGNUM(obj)->sign ? '+' : '-';
RBIGNUM           560 marshal.c      		long len = RBIGNUM(obj)->len;
RBIGNUM           561 marshal.c      		BDIGIT *d = RBIGNUM(obj)->digits;
RBIGNUM          2508 numeric.c      	    if (!RBIGNUM(idx)->sign || val >= 0)
RBIGNUM           210 random.c                 len = RBIGNUM(seed)->len * SIZEOF_BDIGITS;
RBIGNUM           229 random.c               for (i = RBIGNUM(seed)->len-1; 0 <= i; i--) {
RBIGNUM           234 random.c                   buf[j] |= ((BDIGIT *)RBIGNUM(seed)->digits)[i];
RBIGNUM           602 sprintf.c      		if (!RBIGNUM(val)->sign) {
RBIGNUM           675 sprintf.c      		    if (bignum && !RBIGNUM(val)->sign)


RCLASS

RCLASS             70 class.c            RCLASS(clone)->super = RCLASS(orig)->super;
RCLASS             71 class.c            if (RCLASS(orig)->iv_tbl) {
RCLASS             74 class.c        	RCLASS(clone)->iv_tbl = st_copy(RCLASS(orig)->iv_tbl);
RCLASS             76 class.c        	st_delete(RCLASS(clone)->iv_tbl, (st_data_t*)&id, 0);
RCLASS             78 class.c        	st_delete(RCLASS(clone)->iv_tbl, (st_data_t*)&id, 0);
RCLASS             80 class.c            if (RCLASS(orig)->m_tbl) {
RCLASS             81 class.c        	RCLASS(clone)->m_tbl = st_init_numtable();
RCLASS             82 class.c        	st_foreach(RCLASS(orig)->m_tbl, clone_method,
RCLASS             83 class.c        	  (st_data_t)RCLASS(clone)->m_tbl);
RCLASS             94 class.c            if (RCLASS(clone)->super != 0) {
RCLASS            123 class.c        	clone->super = RCLASS(klass)->super;
RCLASS            126 class.c        	if (RCLASS(klass)->iv_tbl) {
RCLASS            127 class.c        	    clone->iv_tbl = st_copy(RCLASS(klass)->iv_tbl);
RCLASS            130 class.c        	st_foreach(RCLASS(klass)->m_tbl, clone_method,
RCLASS            143 class.c        	if (!RCLASS(klass)->iv_tbl) {
RCLASS            144 class.c        	    RCLASS(klass)->iv_tbl = st_init_numtable();
RCLASS            146 class.c        	st_insert(RCLASS(klass)->iv_tbl, rb_intern("__attached__"), obj);
RCLASS            160 class.c        	RCLASS(klass)->super = RBASIC(rb_class_real(RCLASS(obj)->super))->klass;
RCLASS            223 class.c        	if (rb_class_real(RCLASS(klass)->super) != super) {
RCLASS            255 class.c        	if (rb_class_real(RCLASS(klass)->super) != super) {
RCLASS            352 class.c            if (!RCLASS(module)->iv_tbl) {
RCLASS            353 class.c        	RCLASS(module)->iv_tbl = st_init_numtable();
RCLASS            355 class.c            klass->iv_tbl = RCLASS(module)->iv_tbl;
RCLASS            356 class.c            klass->m_tbl = RCLASS(module)->m_tbl;
RCLASS            394 class.c        	if (RCLASS(klass)->m_tbl == RCLASS(module)->m_tbl)
RCLASS            397 class.c        	for (p = RCLASS(klass)->super; p; p = RCLASS(p)->super) {
RCLASS            400 class.c        		if (RCLASS(p)->m_tbl == RCLASS(module)->m_tbl) {
RCLASS            412 class.c        	c = RCLASS(c)->super = include_class_new(module, RCLASS(c)->super);
RCLASS            415 class.c        	module = RCLASS(module)->super;
RCLASS            444 class.c            for (p = RCLASS(mod)->super; p; p = RCLASS(p)->super) {
RCLASS            479 class.c            for (p = RCLASS(mod)->super; p; p = RCLASS(p)->super) {
RCLASS            509 class.c            for (p = mod; p; p = RCLASS(p)->super) {
RCLASS            623 class.c            for (; mod; mod = RCLASS(mod)->super) {
RCLASS            624 class.c        	st_foreach(RCLASS(mod)->m_tbl, method_entry, (st_data_t)list);
RCLASS            782 class.c        	st_foreach(RCLASS(klass)->m_tbl, method_entry, (st_data_t)list);
RCLASS            783 class.c        	klass = RCLASS(klass)->super;
RCLASS            787 class.c        	    st_foreach(RCLASS(klass)->m_tbl, method_entry, (st_data_t)list);
RCLASS            788 class.c        	    klass = RCLASS(klass)->super;
RCLASS            964 error.c        	    klass = (VALUE)RCLASS(klass)->super;
RCLASS            398 eval.c             st_insert(RCLASS(klass)->m_tbl, mid, (st_data_t)body);
RCLASS            434 eval.c             while (!st_lookup(RCLASS(klass)->m_tbl, id, (st_data_t *)&body)) {
RCLASS            435 eval.c         	klass = RCLASS(klass)->super;
RCLASS            531 eval.c             if (!st_delete(RCLASS(klass)->m_tbl, &mid, (st_data_t *)&body) ||
RCLASS           1811 eval.c         	struct RClass *klass = RCLASS(cbase->nd_clss);
RCLASS           1838 eval.c         	while (RCLASS(klass)->iv_tbl && st_lookup(RCLASS(klass)->iv_tbl, id, &result)) {
RCLASS           2094 eval.c             if (RTEST(ruby_verbose) && st_lookup(RCLASS(klass)->m_tbl, name, (st_data_t *)&node)) {
RCLASS           2099 eval.c             st_insert(RCLASS(klass)->m_tbl, name,
RCLASS           2265 eval.c         	if (rb_method_boundp(RCLASS(val)->super, ruby_frame->orig_func, 0)) {
RCLASS           2749 eval.c         	    RCLASS(origin)->m_tbl != RCLASS(rb_mKernel)->m_tbl) { /* exclude Kernel#to_a */
RCLASS           3870 eval.c         	    if (st_lookup(RCLASS(klass)->m_tbl, node->nd_mid, (st_data_t *)&body)) {
RCLASS           3933 eval.c         		    tmp = rb_class_real(RCLASS(klass)->super);
RCLASS           6083 eval.c             if (RCLASS(klass)->super == 0) {
RCLASS           6088 eval.c             result = rb_call(RCLASS(klass)->super, self, ruby_frame->orig_func, argc, argv, 3);
RCLASS           7334 eval.c         	    m = RCLASS(m)->super;
RCLASS           8766 eval.c         	klass = RCLASS(klass)->super;
RCLASS           8772 eval.c         	rklass = RCLASS(rklass)->super;
RCLASS           9110 eval.c         	    st_table *m_tbl = RCLASS(data->rklass)->m_tbl;
RCLASS           9111 eval.c         	    while (RCLASS(rklass)->m_tbl != m_tbl) {
RCLASS           9112 eval.c         		rklass = RCLASS(rklass)->super;
RCLASS            377 marshal.c      	if (check && RCLASS(klass)->m_tbl->num_entries ||
RCLASS            378 marshal.c      	    (RCLASS(klass)->iv_tbl && RCLASS(klass)->iv_tbl->num_entries > 1)) {
RCLASS            381 marshal.c      	klass = RCLASS(klass)->super;
RCLASS            387 marshal.c      	klass = RCLASS(klass)->super;
RCLASS            161 object.c       	cl = RCLASS(cl)->super;
RCLASS            529 object.c       	if (cl == c || RCLASS(cl)->m_tbl == RCLASS(c)->m_tbl)
RCLASS            531 object.c       	cl = RCLASS(cl)->super;
RCLASS           1343 object.c       	if (RCLASS(mod)->m_tbl == RCLASS(arg)->m_tbl)
RCLASS           1348 object.c       	if (RCLASS(mod)->m_tbl == RCLASS(arg)->m_tbl)
RCLASS           1350 object.c       	mod = RCLASS(mod)->super;
RCLASS           1354 object.c       	if (RCLASS(arg)->m_tbl == RCLASS(start)->m_tbl)
RCLASS           1356 object.c       	arg = RCLASS(arg)->super;
RCLASS           1531 object.c           if (RCLASS(klass)->super != 0) {
RCLASS           1540 object.c           RCLASS(klass)->super = super;
RCLASS           1563 object.c           if (RCLASS(klass)->super == 0) {
RCLASS           1628 object.c           VALUE super = RCLASS(klass)->super;
RCLASS           1637 object.c       	super = RCLASS(super)->super;
RCLASS            416 ruby.h         #define RMODULE(obj) RCLASS(obj)
RCLASS             31 struct.c       	c = RCLASS(c)->super;
RCLASS             85 variable.c     	if (!RCLASS(value)->iv_tbl) return ST_CONTINUE;
RCLASS            101 variable.c     	    st_foreach_safe(RCLASS(value)->iv_tbl, fc_i, (st_data_t)&arg);
RCLASS            126 variable.c         if (RCLASS(rb_cObject)->iv_tbl) {
RCLASS            127 variable.c     	st_foreach_safe(RCLASS(rb_cObject)->iv_tbl, fc_i, (st_data_t)&arg);
RCLASS            137 variable.c     	st_delete(RCLASS(klass)->iv_tbl, &tmp_classpath, 0);
RCLASS            159 variable.c     	    st_delete(RCLASS(klass)->iv_tbl, (st_data_t*)&classid, 0);
RCLASS            193 variable.c         if (RCLASS(klass)->iv_tbl && st_lookup(RCLASS(klass)->iv_tbl,
RCLASS           1288 variable.c         if ((tbl = RCLASS(mod)->iv_tbl) && st_lookup(tbl, id, &av) && av != Qundef)
RCLASS           1292 variable.c         tbl = RCLASS(mod)->iv_tbl;
RCLASS           1315 variable.c         st_delete(RCLASS(mod)->iv_tbl, (st_data_t*)&id, 0);
RCLASS           1316 variable.c         if (st_lookup(RCLASS(mod)->iv_tbl, autoload, &val)) {
RCLASS           1325 variable.c     	    if (st_delete(RCLASS(mod)->iv_tbl, (st_data_t*)&id, &val)) {
RCLASS           1357 variable.c         if (!st_lookup(RCLASS(mod)->iv_tbl, autoload, &val) ||
RCLASS           1376 variable.c     	if (st_delete(RCLASS(mod)->iv_tbl, (st_data_t*)&id, &val)) {
RCLASS           1388 variable.c         struct st_table *tbl = RCLASS(mod)->iv_tbl;
RCLASS           1409 variable.c     	while (RCLASS(tmp)->iv_tbl && st_lookup(RCLASS(tmp)->iv_tbl,id,&value)) {
RCLASS           1421 variable.c     	tmp = RCLASS(tmp)->super;
RCLASS           1479 variable.c         if (RCLASS(mod)->iv_tbl && st_delete(ROBJECT(mod)->iv_tbl, (st_data_t*)&id, &val)) {
RCLASS           1518 variable.c         if (RCLASS(mod)->iv_tbl) {
RCLASS           1519 variable.c     	st_foreach_safe(RCLASS(mod)->iv_tbl, sv_i, (st_data_t)tbl);
RCLASS           1532 variable.c     	tmp = RCLASS(tmp)->super;
RCLASS           1591 variable.c     	if (RCLASS(tmp)->iv_tbl && st_lookup(RCLASS(tmp)->iv_tbl, id, &value)) {
RCLASS           1597 variable.c     	tmp = RCLASS(tmp)->super;
RCLASS           1650 variable.c         if (!RCLASS(klass)->iv_tbl) {
RCLASS           1651 variable.c     	RCLASS(klass)->iv_tbl = st_init_numtable();
RCLASS           1656 variable.c     	if (st_lookup(RCLASS(klass)->iv_tbl, id, &value)) {
RCLASS           1664 variable.c         st_insert(RCLASS(klass)->iv_tbl, id, val);
RCLASS           1717 variable.c         a = RCLASS(a)->super;
RCLASS           1719 variable.c     	if (RCLASS(a)->iv_tbl) {
RCLASS           1720 variable.c     	    if (st_lookup(RCLASS(a)->iv_tbl,id,0)) {
RCLASS           1726 variable.c     	a = RCLASS(a)->super;
RCLASS           1741 variable.c     	if (RCLASS(tmp)->iv_tbl && st_lookup(RCLASS(tmp)->iv_tbl,id,0)) {
RCLASS           1748 variable.c     	    st_insert(RCLASS(tmp)->iv_tbl,id,val);
RCLASS           1754 variable.c     	tmp = RCLASS(tmp)->super;
RCLASS           1770 variable.c     	if (RCLASS(tmp)->iv_tbl) {
RCLASS           1771 variable.c     	    if (st_lookup(RCLASS(tmp)->iv_tbl,id,&value)) {
RCLASS           1778 variable.c     	tmp = RCLASS(tmp)->super;
RCLASS           1795 variable.c     	if (RCLASS(tmp)->iv_tbl && st_lookup(RCLASS(tmp)->iv_tbl,id,0)) {
RCLASS           1798 variable.c     	tmp = RCLASS(tmp)->super;
RCLASS           1882 variable.c     	if (RCLASS(obj)->iv_tbl) {
RCLASS           1883 variable.c     	    st_foreach_safe(RCLASS(obj)->iv_tbl, cv_i, ary);
RCLASS           1885 variable.c     	obj = RCLASS(obj)->super;
RCLASS           1925 variable.c         if (RCLASS(mod)->iv_tbl && st_delete(ROBJECT(mod)->iv_tbl, (st_data_t*)&id, &val)) {


RDATA

RDATA            1377 dir.c          	RDATA(dir)->dfree != (RUBY_DATA_FUNC)free_dir) {
RDATA            2453 eval.c             if (TYPE(proc) == T_DATA && RDATA(proc)->dfree == (RUBY_DATA_FUNC)blk_free) {
RDATA            8533 eval.c             if (RDATA(other)->dmark != (RUBY_DATA_FUNC)blk_mark) return Qfalse;
RDATA            8828 eval.c             if (TYPE(other) != T_DATA || RDATA(other)->dmark != (RUBY_DATA_FUNC)bm_mark)
RDATA            9331 eval.c             if (TYPE(m) == T_DATA && RDATA(m)->dmark == (RUBY_DATA_FUNC)bm_mark) {
RDATA            9400 eval.c             if (RDATA(body)->dmark == (RUBY_DATA_FUNC)bm_mark) {
RDATA            9403 eval.c             else if (RDATA(body)->dmark == (RUBY_DATA_FUNC)blk_mark) {
RDATA            10009 eval.c             if (TYPE(data) != T_DATA || RDATA(data)->dmark != (RUBY_DATA_FUNC)thread_mark) {
RDATA            10013 eval.c             return (rb_thread_t)RDATA(data)->data;
RDATA            11978 eval.c         		RDATA(th->thread)->dfree = NULL;
RDATA              98 ext/bigdecimal/bigdecimal.c         if(RDATA(v)->dfree ==(void *) BigDecimal_delete) {
RDATA             228 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              42 ext/stringio/stringio.c #define IS_STRIO(obj) (RDATA(obj)->dmark == (RUBY_DATA_FUNC)strio_mark)
RDATA             376 ruby.h         #define DATA_PTR(dta) (RDATA(dta)->data)
RDATA             229 time.c             if (TYPE(time) == T_DATA && RDATA(time)->dfree == time_free) {
RDATA             269 time.c             if (TYPE(time) == T_DATA && RDATA(time)->dfree == time_free) {
RDATA             946 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
RDATA             976 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
RDATA            1043 time.c             if (TYPE(time) != T_DATA || RDATA(time)->dfree != time_free) {
RDATA            1329 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
RDATA            1357 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
RDATA            1265 variable.c         if (RDATA(av)->dmark != (RUBY_DATA_FUNC)rb_mark_tbl ||
RDATA            1266 variable.c     	RDATA(av)->dfree != (RUBY_DATA_FUNC)st_free_table) {


RDLPTR

RDLPTR            500 ext/dl/ptr.c     size = RDLPTR(self)->size;
RDLPTR            512 ext/dl/ptr.c     size = RDLPTR(self)->size;
RDLPTR           1002 ext/dl/ptr.c       return DLLONG2NUM(RDLPTR(self)->size);
RDLPTR           1005 ext/dl/ptr.c       RDLPTR(self)->size = DLNUM2LONG(size);


READABLE

READABLE          109 ext/stringio/stringio.c     if (!READABLE(ptr)) {
READABLE          404 ext/stringio/stringio.c     if (!READABLE(ptr)) {
READABLE          456 ext/stringio/stringio.c     if (READABLE(ptr)) return Qfalse;


READ_CHECK

READ_CHECK        814 io.c               READ_CHECK(fptr->f);
READ_CHECK       1151 io.c           	READ_CHECK(fptr->f);
READ_CHECK       1200 io.c               READ_CHECK(fptr->f);
READ_CHECK       1349 io.c               READ_CHECK(fptr->f);
READ_CHECK       1423 io.c           	READ_CHECK(f);
READ_CHECK       1501 io.c           	READ_CHECK(f);
READ_CHECK       1867 io.c           	READ_CHECK(f);
READ_CHECK       1912 io.c               READ_CHECK(f);


READ_DATA_BUFFERED

READ_DATA_BUFFERED  165 io.c           #ifndef READ_DATA_BUFFERED
READ_DATA_BUFFERED 2306 io.c               if ((fptr->mode & FMODE_READABLE) && READ_DATA_BUFFERED(fptr->f)) {
READ_DATA_BUFFERED 2403 io.c               if (READ_DATA_BUFFERED(fptr->f)) {


READ_DATA_PENDING

READ_DATA_PENDING  166 io.c           #  define READ_DATA_BUFFERED(fp) READ_DATA_PENDING(fp)
READ_DATA_PENDING  181 io.c               if (!READ_DATA_PENDING(fp)) {\
READ_DATA_PENDING  284 io.c               return READ_DATA_PENDING(fp);
READ_DATA_PENDING  291 io.c               if (!READ_DATA_PENDING(fp)) {
READ_DATA_PENDING  813 io.c               if (READ_DATA_PENDING(fptr->f)) return Qfalse;
READ_DATA_PENDING 1031 io.c               for (n = 0; n < len && READ_DATA_PENDING(f) && (c = getc(f)) != EOF; ++n) {
READ_DATA_PENDING 1936 io.c               if (!READ_DATA_PENDING(f)) {
READ_DATA_PENDING 4578 io.c           	    if (READ_DATA_PENDING(fptr->f)) { /* check for buffered data */


READ_DATA_PENDING_COUNT

READ_DATA_PENDING_COUNT 1023 io.c           #ifdef READ_DATA_PENDING_COUNT
READ_DATA_PENDING_COUNT 1024 io.c               n = READ_DATA_PENDING_COUNT(f);
READ_DATA_PENDING_COUNT 1388 io.c           	long pending = READ_DATA_PENDING_COUNT(f);
READ_DATA_PENDING_COUNT 1487 io.c           	while ((cnt = READ_DATA_PENDING_COUNT(f)) > 0) {


READ_DATA_PENDING_PTR

READ_DATA_PENDING_PTR  169 io.c           #ifndef READ_DATA_PENDING_PTR
READ_DATA_PENDING_PTR 1380 io.c           #ifndef READ_DATA_PENDING_PTR
READ_DATA_PENDING_PTR 1387 io.c           #ifdef READ_DATA_PENDING_PTR
READ_DATA_PENDING_PTR 1390 io.c           	    const char *p = READ_DATA_PENDING_PTR(f);
READ_DATA_PENDING_PTR 1436 io.c           #ifdef READ_DATA_PENDING_PTR
READ_DATA_PENDING_PTR 1440 io.c           #ifndef READ_DATA_PENDING_PTR
READ_DATA_PENDING_PTR 1461 io.c           #ifdef READ_DATA_PENDING_PTR
READ_DATA_PENDING_PTR 1485 io.c           #ifdef READ_DATA_PENDING_PTR
READ_DATA_PENDING_PTR 1489 io.c           	    const char *p = READ_DATA_PENDING_PTR(f);


REALLOC_N

REALLOC_N         298 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, len);
REALLOC_N         371 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, new_capa);
REALLOC_N         454 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->aux.capa);
REALLOC_N         520 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->aux.capa);
REALLOC_N         970 array.c        	    REALLOC_N(RARRAY(ary)->ptr, VALUE, len);
REALLOC_N         988 array.c        	    REALLOC_N(RARRAY(ary)->ptr, VALUE, alen);
REALLOC_N        1865 array.c        	    REALLOC_N(RARRAY(ary)->ptr, VALUE, i2 * 2);
REALLOC_N        2189 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, ARY_DEFAULT_SIZE * 2);
REALLOC_N        2261 array.c        	    REALLOC_N(RARRAY(ary)->ptr, VALUE, end);
REALLOC_N        2811 array.c            REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
REALLOC_N          85 bignum.c       	REALLOC_N(RBIGNUM(x)->digits, BDIGIT, ++RBIGNUM(x)->len);
REALLOC_N         983 dir.c          		    REALLOC_N(buf, char, n+strlen(m)+3);
REALLOC_N        1014 dir.c          		    REALLOC_N(buf, char, strlen(base)+NAMLEN(dp)+strlen(m)+6);
REALLOC_N        1032 dir.c          		    REALLOC_N(buf, char, strlen(base)+NAMLEN(dp)+2);
REALLOC_N        1059 dir.c          				REALLOC_N(buf, char, len+mlen+1);
REALLOC_N        1215 dir.c          	    REALLOC_N(buf, char, len+1);
REALLOC_N        10067 eval.c         	REALLOC_N(th->bstr_ptr, VALUE, th->bstr_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         293 ext/readline/readline.c 	REALLOC_N(basic_word_break_characters, char, RSTRING(str)->len + 1);
REALLOC_N         335 ext/readline/readline.c 	REALLOC_N(completer_word_break_characters, char, RSTRING(str)->len + 1);
REALLOC_N         377 ext/readline/readline.c 	REALLOC_N(basic_quote_characters, char, RSTRING(str)->len + 1);
REALLOC_N         420 ext/readline/readline.c 	REALLOC_N(completer_quote_characters, char, RSTRING(str)->len + 1);
REALLOC_N         463 ext/readline/readline.c 	REALLOC_N(filename_quote_characters, char, RSTRING(str)->len + 1);
REALLOC_N        1853 hash.c         	REALLOC_N(environ, char*, i+2);	/* just expand it a bit */
REALLOC_N        6753 parse.c        	REALLOC_N(tokenbuf, char, 60);
REALLOC_N        6765 parse.c        	REALLOC_N(tokenbuf, char, toksiz);
REALLOC_N        9638 parse.c        	REALLOC_N(lvtbl->tbl, ID, lvtbl->cnt+2);
REALLOC_N        9716 parse.c        		REALLOC_N(vars, VALUE, len+1);
REALLOC_N        2755 parse.y        	REALLOC_N(tokenbuf, char, 60);
REALLOC_N        2767 parse.y        	REALLOC_N(tokenbuf, char, toksiz);
REALLOC_N        5640 parse.y        	REALLOC_N(lvtbl->tbl, ID, lvtbl->cnt+2);
REALLOC_N        5718 parse.y        		REALLOC_N(vars, VALUE, len+1);
REALLOC_N          35 string.c           REALLOC_N(RSTRING(str)->ptr, char, (capacity)+1);\
REALLOC_N         683 string.c       	    REALLOC_N(RSTRING(str)->ptr, char, len+1);
REALLOC_N         747 string.c       	REALLOC_N(RSTRING(str)->ptr, char, RSTRING(str)->len+len);
REALLOC_N         804 string.c       	    REALLOC_N(RSTRING(str)->ptr, char, len+1);
REALLOC_N        2728 win32/win32.c  	    REALLOC_N(curitem, char, needlen);


REDUCE

REDUCE            519 ext/racc/cparse/cparse.c             REDUCE(v, act);
REDUCE            626 ext/racc/cparse/cparse.c         REDUCE(v, act);


REG_CASESTATE

REG_CASESTATE     826 re.c               state = FL_TEST(re, REG_CASESTATE);
REG_CASESTATE     829 re.c           	FL_SET(re, REG_CASESTATE);
REG_CASESTATE     834 re.c           	FL_UNSET(re, REG_CASESTATE);
REG_CASESTATE    1364 re.c           	FL_SET(re, REG_CASESTATE);


REG_UNSET

REG_UNSET        3398 regex.c              if (!REG_UNSET(regstart[last_used_reg]))				\
REG_UNSET        3703 regex.c        	  if (REG_UNSET(regend[mcnt])) {
REG_UNSET        3759 regex.c        	  if (REG_UNSET(d2)) goto fail;
REG_UNSET        3767 regex.c        	  if (REG_UNSET(dend2)) goto fail;


REG_UNSET_VALUE

REG_UNSET_VALUE  3448 regex.c        #define REG_UNSET(e) ((e) == REG_UNSET_VALUE)
REG_UNSET_VALUE  3626 regex.c              = best_regstart[mcnt] = best_regend[mcnt] = REG_UNSET_VALUE;
REG_UNSET_VALUE  4321 regex.c        	regend[this_reg] = REG_UNSET_VALUE;
REG_UNSET_VALUE  4322 regex.c        	regstart[this_reg] = REG_UNSET_VALUE;


RESIZE_CAPA

RESIZE_CAPA       522 string.c       	    RESIZE_CAPA(str, RSTRING(str)->len);
RESIZE_CAPA       719 string.c       	RESIZE_CAPA(str, capa);
RESIZE_CAPA       784 string.c       	RESIZE_CAPA(str, capa);
RESIZE_CAPA      1414 string.c       	RESIZE_CAPA(str, RSTRING(str)->len + 1);
RESIZE_CAPA      1655 string.c       	RESIZE_CAPA(str, RSTRING(str)->len + RSTRING(val)->len - len + 1);
RESIZE_CAPA      1742 string.c       		RESIZE_CAPA(str, RSTRING(str)->len);
RESIZE_CAPA      1987 string.c       	    RESIZE_CAPA(str, RSTRING(str)->len + RSTRING(repl)->len - plen);
RESIZE_CAPA      2112 string.c       	    RESIZE_CAPA(dest, blen);
RESIZE_CAPA      2142 string.c       	    RESIZE_CAPA(dest, blen);


RESTORE_EXIT

RESTORE_EXIT     10125 eval.c               case RESTORE_EXIT:
RESTORE_EXIT     11688 eval.c         	    rb_thread_main_jump(ruby_errinfo, RESTORE_EXIT);
RESTORE_EXIT     12103 eval.c         			RESTORE_EXIT);


RESTORE_FATAL

RESTORE_FATAL    10108 eval.c               case RESTORE_FATAL:
RESTORE_FATAL    10622 eval.c         	    rb_thread_restore_context(next, RESTORE_FATAL);


RESTORE_INTERRUPT

RESTORE_INTERRUPT 10111 eval.c               case RESTORE_INTERRUPT:
RESTORE_INTERRUPT 12038 eval.c             rb_thread_restore_context(curr_thread, RESTORE_INTERRUPT);


RESTORE_NORMAL

RESTORE_NORMAL   10133 eval.c               case RESTORE_NORMAL:
RESTORE_NORMAL   10625 eval.c             rb_thread_restore_context(next, RESTORE_NORMAL);
RESTORE_NORMAL   12507 eval.c             rb_thread_restore_context(th, RESTORE_NORMAL);


RESTORE_RAISE

RESTORE_RAISE    10117 eval.c               case RESTORE_RAISE:
RESTORE_RAISE    10308 eval.c             rb_thread_main_jump(e, RESTORE_RAISE);
RESTORE_RAISE    11682 eval.c         		rb_thread_main_jump(ruby_errinfo, RESTORE_RAISE);
RESTORE_RAISE    12135 eval.c             rb_thread_restore_context(curr_thread, RESTORE_RAISE);


RESTORE_SIGNAL

RESTORE_SIGNAL   10122 eval.c               case RESTORE_SIGNAL:
RESTORE_SIGNAL   12059 eval.c             rb_thread_restore_context(curr_thread, RESTORE_SIGNAL);


RESTORE_TRAP

RESTORE_TRAP     10114 eval.c               case RESTORE_TRAP:
RESTORE_TRAP     12081 eval.c             rb_thread_restore_context(curr_thread, RESTORE_TRAP);


RETSIGTYPE

RETSIGTYPE        388 intern.h       void posix_signal _((int, RETSIGTYPE (*)(int)));
RETSIGTYPE       1357 process.c          RETSIGTYPE (*hfunc)_((int));
RETSIGTYPE       1360 process.c          RETSIGTYPE (*qfunc)_((int));
RETSIGTYPE       1362 process.c          RETSIGTYPE (*ifunc)_((int));
RETSIGTYPE        328 signal.c       typedef RETSIGTYPE (*sighandler_t)_((int));
RETSIGTYPE        402 signal.c       static RETSIGTYPE sighandler _((int));
RETSIGTYPE        403 signal.c       static RETSIGTYPE
RETSIGTYPE        432 signal.c       static RETSIGTYPE sigbus _((int));
RETSIGTYPE        433 signal.c       static RETSIGTYPE
RETSIGTYPE        442 signal.c       static RETSIGTYPE sigsegv _((int));
RETSIGTYPE        443 signal.c       static RETSIGTYPE
RETSIGTYPE        452 signal.c       static RETSIGTYPE sigpipe _((int));
RETSIGTYPE        453 signal.c       static RETSIGTYPE
RETSIGTYPE        507 signal.c       static RETSIGTYPE sigexit _((int));
RETSIGTYPE        508 signal.c       static RETSIGTYPE


RETURN

RETURN           2845 eval.c             if (!node) RETURN(Qnil);
RETURN           2922 eval.c         	RETURN(Qnil);
RETURN           2925 eval.c         	RETURN(self);
RETURN           2928 eval.c         	RETURN(Qnil);
RETURN           2931 eval.c         	RETURN(Qtrue);
RETURN           2934 eval.c         	RETURN(Qfalse);
RETURN           2980 eval.c         	RETURN(Qnil);
RETURN           3022 eval.c         	RETURN(Qnil);
RETURN           3057 eval.c         	RETURN(result);
RETURN           3092 eval.c         	RETURN(result);
RETURN           3488 eval.c         		if (RTEST(val)) RETURN(val);
RETURN           3492 eval.c         		if (!RTEST(val)) RETURN(val);
RETURN           3513 eval.c         		if (RTEST(val)) RETURN(val);
RETURN           3517 eval.c         		if (!RTEST(val)) RETURN(val);


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_DUP_MAX

RE_DUP_MAX       2032 regex.c              if (lower_bound >= RE_DUP_MAX || upper_bound >= RE_DUP_MAX)
RE_DUP_MAX       2034 regex.c              if (upper_bound < 0) upper_bound = RE_DUP_MAX;
RE_DUP_MAX       2050 regex.c        	if (upper_bound == RE_DUP_MAX) {
RE_DUP_MAX       2064 regex.c        	if (upper_bound == RE_DUP_MAX) {
RE_DUP_MAX       3796 regex.c        	if (stackp - stackb > RE_DUP_MAX) {
RE_DUP_MAX         57 regex.h        #ifndef RE_DUP_MAX


RE_MAY_IGNORECASE

RE_MAY_IGNORECASE  433 regex.c        #define MAY_TRANSLATE() ((bufp->options&(RE_OPTION_IGNORECASE|RE_MAY_IGNORECASE)) && translate)
RE_MAY_IGNORECASE 2834 regex.c        	bufp->options |= RE_MAY_IGNORECASE;
RE_MAY_IGNORECASE   80 regex.h        #define RE_OPTIMIZE_ANCHOR   (RE_MAY_IGNORECASE<<1)


RE_NREGS

RE_NREGS          658 ext/strscan/strscan.c         p->regs.beg = ALLOC_N(int, RE_NREGS);
RE_NREGS          659 ext/strscan/strscan.c         p->regs.end = ALLOC_N(int, RE_NREGS);
RE_NREGS          660 ext/strscan/strscan.c         p->regs.allocated = RE_NREGS;
RE_NREGS         3487 regex.c          if (num_regs < RE_NREGS)
RE_NREGS         3488 regex.c            num_regs = RE_NREGS;
RE_NREGS           48 regex.h        #ifndef RE_NREGS


RE_OPTIMIZE_ANCHOR

RE_OPTIMIZE_ANCHOR 2420 regex.c              bufp->options |= RE_OPTIMIZE_ANCHOR;
RE_OPTIMIZE_ANCHOR 3204 regex.c          if (bufp->options & RE_OPTIMIZE_ANCHOR) {
RE_OPTIMIZE_ANCHOR   81 regex.h        #define RE_OPTIMIZE_EXACTN   (RE_OPTIMIZE_ANCHOR<<1)


RE_OPTIMIZE_BMATCH

RE_OPTIMIZE_BMATCH 2810 regex.c        	  bufp->options |= RE_OPTIMIZE_BMATCH;
RE_OPTIMIZE_BMATCH 3017 regex.c        		bufp->options |= RE_OPTIMIZE_BMATCH;
RE_OPTIMIZE_BMATCH 3120 regex.c          if (current_mbctype && startpos>0 && !(bufp->options&RE_OPTIMIZE_BMATCH)) {


RE_OPTIMIZE_EXACTN

RE_OPTIMIZE_EXACTN 2430 regex.c              bufp->options |= RE_OPTIMIZE_EXACTN;
RE_OPTIMIZE_EXACTN 3233 regex.c            if (range > 0 && (bufp->options & RE_OPTIMIZE_EXACTN)) {
RE_OPTIMIZE_EXACTN   82 regex.h        #define RE_OPTIMIZE_NO_BM    (RE_OPTIMIZE_EXACTN<<1)


RE_OPTIMIZE_NO_BM

RE_OPTIMIZE_NO_BM 2437 regex.c          if (current_mbctype == MBCTYPE_SJIS) bufp->options |= RE_OPTIMIZE_NO_BM;
RE_OPTIMIZE_NO_BM 2445 regex.c        	bufp->options |= RE_OPTIMIZE_NO_BM;
RE_OPTIMIZE_NO_BM 2449 regex.c            if (!(bufp->options & RE_OPTIMIZE_NO_BM)) {
RE_OPTIMIZE_NO_BM 3221 regex.c            if (bufp->options & RE_OPTIMIZE_NO_BM) {
RE_OPTIMIZE_NO_BM   83 regex.h        #define RE_OPTIMIZE_BMATCH   (RE_OPTIMIZE_NO_BM<<1)


RE_OPTION_EXTENDED

RE_OPTION_EXTENDED 6968 parse.c        	    options |= RE_OPTION_EXTENDED;
RE_OPTION_EXTENDED 2970 parse.y        	    options |= RE_OPTION_EXTENDED;
RE_OPTION_EXTENDED  343 re.c           	if (RREGEXP(re)->ptr->options & RE_OPTION_EXTENDED)
RE_OPTION_EXTENDED  434 re.c               const int embeddable = RE_OPTION_MULTILINE|RE_OPTION_IGNORECASE|RE_OPTION_EXTENDED;
RE_OPTION_EXTENDED  457 re.c           		    options |= RE_OPTION_EXTENDED;
RE_OPTION_EXTENDED  474 re.c           		    options &= ~RE_OPTION_EXTENDED;
RE_OPTION_EXTENDED  503 re.c               if (options & RE_OPTION_EXTENDED) rb_str_buf_cat2(str, "x");
RE_OPTION_EXTENDED  509 re.c           	if (!(options & RE_OPTION_EXTENDED)) rb_str_buf_cat2(str, "x");
RE_OPTION_EXTENDED 1881 re.c           	(RE_OPTION_IGNORECASE|RE_OPTION_MULTILINE|RE_OPTION_EXTENDED);
RE_OPTION_EXTENDED 2276 re.c               rb_define_const(rb_cRegexp, "EXTENDED", INT2FIX(RE_OPTION_EXTENDED));
RE_OPTION_EXTENDED 1756 regex.c        		  options &= ~RE_OPTION_EXTENDED;
RE_OPTION_EXTENDED 1758 regex.c        		  options |= RE_OPTION_EXTENDED;
RE_OPTION_EXTENDED 2349 regex.c              if (options & RE_OPTION_EXTENDED) {
RE_OPTION_EXTENDED 2363 regex.c              if (options & RE_OPTION_EXTENDED)
RE_OPTION_EXTENDED   73 regex.h        #define RE_OPTION_MULTILINE  (RE_OPTION_EXTENDED<<1)


RE_OPTION_IGNORECASE

RE_OPTION_IGNORECASE 6965 parse.c        	    options |= RE_OPTION_IGNORECASE;
RE_OPTION_IGNORECASE 2967 parse.y        	    options |= RE_OPTION_IGNORECASE;
RE_OPTION_IGNORECASE  341 re.c           	if (RREGEXP(re)->ptr->options & RE_OPTION_IGNORECASE)
RE_OPTION_IGNORECASE  434 re.c               const int embeddable = RE_OPTION_MULTILINE|RE_OPTION_IGNORECASE|RE_OPTION_EXTENDED;
RE_OPTION_IGNORECASE  454 re.c           		    options |= RE_OPTION_IGNORECASE;
RE_OPTION_IGNORECASE  471 re.c           		    options &= ~RE_OPTION_IGNORECASE;
RE_OPTION_IGNORECASE  502 re.c               if (options & RE_OPTION_IGNORECASE) rb_str_buf_cat2(str, "i");
RE_OPTION_IGNORECASE  508 re.c           	if (!(options & RE_OPTION_IGNORECASE)) rb_str_buf_cat2(str, "i");
RE_OPTION_IGNORECASE  548 re.c               if (RREGEXP(re)->ptr->options & RE_OPTION_IGNORECASE) return Qtrue;
RE_OPTION_IGNORECASE  830 re.c           	RREGEXP(re)->ptr->options |= RE_OPTION_IGNORECASE;
RE_OPTION_IGNORECASE  835 re.c           	RREGEXP(re)->ptr->options &= ~RE_OPTION_IGNORECASE;
RE_OPTION_IGNORECASE 1363 re.c           	options |= RE_OPTION_IGNORECASE;
RE_OPTION_IGNORECASE 1690 re.c           	    else if (RTEST(argv[1])) flags = RE_OPTION_IGNORECASE;
RE_OPTION_IGNORECASE 1881 re.c           	(RE_OPTION_IGNORECASE|RE_OPTION_MULTILINE|RE_OPTION_EXTENDED);
RE_OPTION_IGNORECASE 2275 re.c               rb_define_const(rb_cRegexp, "IGNORECASE", INT2FIX(RE_OPTION_IGNORECASE));
RE_OPTION_IGNORECASE  432 regex.c        #define TRANSLATE_P() ((options&RE_OPTION_IGNORECASE) && translate)
RE_OPTION_IGNORECASE  433 regex.c        #define MAY_TRANSLATE() ((bufp->options&(RE_OPTION_IGNORECASE|RE_MAY_IGNORECASE)) && translate)
RE_OPTION_IGNORECASE 1775 regex.c        		  if (options&RE_OPTION_IGNORECASE) {
RE_OPTION_IGNORECASE 1776 regex.c        		    options &= ~RE_OPTION_IGNORECASE;
RE_OPTION_IGNORECASE 1779 regex.c        		else if (!(options&RE_OPTION_IGNORECASE)) {
RE_OPTION_IGNORECASE 1780 regex.c        		  options |= RE_OPTION_IGNORECASE;
RE_OPTION_IGNORECASE 1825 regex.c        	    if (options & RE_OPTION_IGNORECASE)
RE_OPTION_IGNORECASE 1879 regex.c        	  if (options & RE_OPTION_IGNORECASE)
RE_OPTION_IGNORECASE 1909 regex.c        	if ((options ^ stackp[-1]) & RE_OPTION_IGNORECASE) {
RE_OPTION_IGNORECASE 1910 regex.c        	  BUFPUSH((options&RE_OPTION_IGNORECASE)?casefold_off:casefold_on);
RE_OPTION_IGNORECASE 1912 regex.c        	if ((options ^ stackp[-1]) != RE_OPTION_IGNORECASE) {
RE_OPTION_IGNORECASE 2835 regex.c        	options |= RE_OPTION_IGNORECASE;
RE_OPTION_IGNORECASE 2839 regex.c        	options &= ~RE_OPTION_IGNORECASE;
RE_OPTION_IGNORECASE 3785 regex.c        	    if ((options & RE_OPTION_IGNORECASE)
RE_OPTION_IGNORECASE 4176 regex.c        	options |= RE_OPTION_IGNORECASE;
RE_OPTION_IGNORECASE 4180 regex.c        	options &= ~RE_OPTION_IGNORECASE;
RE_OPTION_IGNORECASE   71 regex.h        #define RE_OPTION_EXTENDED   (RE_OPTION_IGNORECASE<<1)


RE_OPTION_LONGEST

RE_OPTION_LONGEST 3661 regex.c              if ((bufp->options & RE_OPTION_LONGEST) && d != dend) {
RE_OPTION_LONGEST   79 regex.h        #define RE_MAY_IGNORECASE    (RE_OPTION_LONGEST<<1)


RE_OPTION_MULTILINE

RE_OPTION_MULTILINE 6971 parse.c        	    options |= RE_OPTION_MULTILINE;
RE_OPTION_MULTILINE 2973 parse.y        	    options |= RE_OPTION_MULTILINE;
RE_OPTION_MULTILINE  339 re.c           	if (RREGEXP(re)->ptr->options & RE_OPTION_MULTILINE)
RE_OPTION_MULTILINE  434 re.c               const int embeddable = RE_OPTION_MULTILINE|RE_OPTION_IGNORECASE|RE_OPTION_EXTENDED;
RE_OPTION_MULTILINE  451 re.c           		    options |= RE_OPTION_MULTILINE;
RE_OPTION_MULTILINE  468 re.c           		    options &= ~RE_OPTION_MULTILINE;
RE_OPTION_MULTILINE  501 re.c               if (options & RE_OPTION_MULTILINE) rb_str_buf_cat2(str, "m");
RE_OPTION_MULTILINE  507 re.c           	if (!(options & RE_OPTION_MULTILINE)) rb_str_buf_cat2(str, "m");
RE_OPTION_MULTILINE 1881 re.c           	(RE_OPTION_IGNORECASE|RE_OPTION_MULTILINE|RE_OPTION_EXTENDED);
RE_OPTION_MULTILINE 2277 re.c               rb_define_const(rb_cRegexp, "MULTILINE", INT2FIX(RE_OPTION_MULTILINE));
RE_OPTION_MULTILINE 1763 regex.c        		  if (options&RE_OPTION_MULTILINE) {
RE_OPTION_MULTILINE 1764 regex.c        		    options &= ~RE_OPTION_MULTILINE;
RE_OPTION_MULTILINE 1767 regex.c        		else if (!(options&RE_OPTION_MULTILINE)) {
RE_OPTION_MULTILINE 1768 regex.c        		  options |= RE_OPTION_MULTILINE;
RE_OPTION_MULTILINE 2934 regex.c        	  if (j != '\n' || (options & RE_OPTION_MULTILINE))
RE_OPTION_MULTILINE 3205 regex.c            if (bufp->options&RE_OPTION_MULTILINE && range > 0) {
RE_OPTION_MULTILINE 3831 regex.c        	if (!(options&RE_OPTION_MULTILINE)
RE_OPTION_MULTILINE 3849 regex.c        	  if (!(options&RE_OPTION_MULTILINE) &&
RE_OPTION_MULTILINE   75 regex.h        #define RE_OPTION_SINGLELINE (RE_OPTION_MULTILINE<<1)


RE_OPTION_ONCE

RE_OPTION_ONCE   5732 parse.c        			    node = NEW_LIT(rb_reg_new("", 0, options & ~RE_OPTION_ONCE));
RE_OPTION_ONCE   5741 parse.c        							  options & ~RE_OPTION_ONCE);
RE_OPTION_ONCE   5747 parse.c        			    if (options & RE_OPTION_ONCE) {
RE_OPTION_ONCE   5753 parse.c        			    node->nd_cflag = options & ~RE_OPTION_ONCE;
RE_OPTION_ONCE   6974 parse.c        	    options |= RE_OPTION_ONCE;
RE_OPTION_ONCE   1992 parse.y        			    node = NEW_LIT(rb_reg_new("", 0, options & ~RE_OPTION_ONCE));
RE_OPTION_ONCE   2001 parse.y        							  options & ~RE_OPTION_ONCE);
RE_OPTION_ONCE   2007 parse.y        			    if (options & RE_OPTION_ONCE) {
RE_OPTION_ONCE   2013 parse.y        			    node->nd_cflag = options & ~RE_OPTION_ONCE;
RE_OPTION_ONCE   2976 parse.y        	    options |= RE_OPTION_ONCE;


RE_OPTION_SINGLELINE

RE_OPTION_SINGLELINE 1314 regex.c              if (bufp->options & RE_OPTION_SINGLELINE) {
RE_OPTION_SINGLELINE 1334 regex.c              if (bufp->options & RE_OPTION_SINGLELINE)
RE_OPTION_SINGLELINE 2276 regex.c        	if ((bufp->options & RE_OPTION_SINGLELINE) == 0) {
RE_OPTION_SINGLELINE 2851 regex.c        	if ((options & RE_OPTION_SINGLELINE) == 0 && bufp->can_be_null == 0)
RE_OPTION_SINGLELINE   77 regex.h        #define RE_OPTION_LONGEST    (RE_OPTION_SINGLELINE<<1)


RFILE

RFILE              63 ext/openssl/ossl.h #if defined(RFILE) /*&& !defined(OSSL_DEBUG)*/
RFILE             143 file.c             fptr = RFILE(rb_io_taint_check(obj))->fptr;
RFILE             987 io.c               fptr = RFILE(rb_io_taint_check(obj))->fptr;
RFILE            2103 io.c               fptr = RFILE(io)->fptr;
RFILE            2144 io.c               rb_io_check_closed(RFILE(io)->fptr);
RFILE            2184 io.c               fptr = RFILE(io)->fptr;
RFILE            2988 io.c           	rb_io_synchronized(RFILE(orig_stdout)->fptr);
RFILE            2989 io.c           	rb_io_synchronized(RFILE(orig_stderr)->fptr);
RFILE            3484 io.c               fptr = RFILE(file)->fptr;
RFILE            3486 io.c           	fptr = RFILE(file)->fptr = ALLOC(OpenFile);
RFILE            4113 io.c               if (RFILE(io)->fptr) {
RFILE            5042 io.c               rb_io_synchronized(RFILE(w)->fptr);
RFILE              45 rubyio.h       #define GetOpenFile(obj,fp) rb_io_check_closed((fp) = RFILE(rb_io_taint_check(obj))->fptr)
RFILE              48 rubyio.h           if (RFILE(obj)->fptr) {\
RFILE              50 rubyio.h       	free(RFILE(obj)->fptr);\
RFILE              51 rubyio.h       	RFILE(obj)->fptr = 0;\
RFILE              54 rubyio.h           fp = RFILE(obj)->fptr = ALLOC(OpenFile);\


RFLOAT

RFLOAT            936 bignum.c       	return rb_dbl_cmp(rb_big2dbl(x), RFLOAT(y)->value);
RFLOAT            981 bignum.c       	    a = RFLOAT(y)->value;
RFLOAT           1176 bignum.c       	return rb_float_new(rb_big2dbl(x) + RFLOAT(y)->value);
RFLOAT           1202 bignum.c       	return rb_float_new(rb_big2dbl(x) - RFLOAT(y)->value);
RFLOAT           1235 bignum.c       	return rb_float_new(rb_big2dbl(x) * RFLOAT(y)->value);
RFLOAT           1434 bignum.c       	return rb_float_new(rb_big2dbl(x) / RFLOAT(y)->value);
RFLOAT           1564 bignum.c       	dy = RFLOAT(y)->value;
RFLOAT           1596 bignum.c       	d = RFLOAT(y)->value;
RFLOAT            241 ext/dl/dl.c          ary[i] = (float)(RFLOAT(e)->value);
RFLOAT            269 ext/dl/dl.c          ary[i] = (double)(RFLOAT(e)->value);
RFLOAT            554 ext/dl/sym.c         ANY2F(args[i]) = DLFLOAT(RFLOAT(argv[i])->value);
RFLOAT            559 ext/dl/sym.c         ANY2F(dargs[i]) = DLFLOAT(RFLOAT(argv[i])->value);
RFLOAT            566 ext/dl/sym.c         ANY2D(args[i]) = RFLOAT(argv[i])->value;
RFLOAT            571 ext/dl/sym.c         ANY2D(dargs[i]) = RFLOAT(argv[i])->value;
RFLOAT            553 marshal.c      	    w_float(RFLOAT(obj)->value, arg);
RFLOAT             40 math.c             return rb_float_new(atan2(RFLOAT(y)->value, RFLOAT(x)->value));
RFLOAT             58 math.c             return rb_float_new(cos(RFLOAT(x)->value));
RFLOAT             75 math.c             return rb_float_new(sin(RFLOAT(x)->value));
RFLOAT             92 math.c             return rb_float_new(tan(RFLOAT(x)->value));
RFLOAT            110 math.c             d = acos(RFLOAT(x)->value);
RFLOAT            132 math.c             d = asin(RFLOAT(x)->value);
RFLOAT            151 math.c             return rb_float_new(atan(RFLOAT(x)->value));
RFLOAT            176 math.c             return rb_float_new(cosh(RFLOAT(x)->value));
RFLOAT            201 math.c             return rb_float_new(sinh(RFLOAT(x)->value));
RFLOAT            226 math.c             return rb_float_new(tanh(RFLOAT(x)->value));
RFLOAT            244 math.c             d = acosh(RFLOAT(x)->value);
RFLOAT            263 math.c             return rb_float_new(asinh(RFLOAT(x)->value));
RFLOAT            281 math.c             d = atanh(RFLOAT(x)->value);
RFLOAT            300 math.c             return rb_float_new(exp(RFLOAT(x)->value));
RFLOAT            327 math.c             d = log(RFLOAT(x)->value);
RFLOAT            349 math.c             d = log10(RFLOAT(x)->value);
RFLOAT            372 math.c             d = sqrt(RFLOAT(x)->value);
RFLOAT            400 math.c             d = frexp(RFLOAT(x)->value, &exp);
RFLOAT            419 math.c             return rb_float_new(ldexp(RFLOAT(x)->value, NUM2INT(n)));
RFLOAT            437 math.c             return rb_float_new(hypot(RFLOAT(x)->value, RFLOAT(y)->value));
RFLOAT            452 math.c             return rb_float_new(erf(RFLOAT(x)->value));
RFLOAT            467 math.c             return rb_float_new(erfc(RFLOAT(x)->value));
RFLOAT            494 numeric.c          double value = RFLOAT(flt)->value;
RFLOAT            541 numeric.c          return rb_float_new(-RFLOAT(flt)->value);
RFLOAT            558 numeric.c      	return rb_float_new(RFLOAT(x)->value + (double)FIX2LONG(y));
RFLOAT            560 numeric.c      	return rb_float_new(RFLOAT(x)->value + rb_big2dbl(y));
RFLOAT            562 numeric.c      	return rb_float_new(RFLOAT(x)->value + RFLOAT(y)->value);
RFLOAT            582 numeric.c      	return rb_float_new(RFLOAT(x)->value - (double)FIX2LONG(y));
RFLOAT            584 numeric.c      	return rb_float_new(RFLOAT(x)->value - rb_big2dbl(y));
RFLOAT            586 numeric.c      	return rb_float_new(RFLOAT(x)->value - RFLOAT(y)->value);
RFLOAT            606 numeric.c      	return rb_float_new(RFLOAT(x)->value * (double)FIX2LONG(y));
RFLOAT            608 numeric.c      	return rb_float_new(RFLOAT(x)->value * rb_big2dbl(y));
RFLOAT            610 numeric.c      	return rb_float_new(RFLOAT(x)->value * RFLOAT(y)->value);
RFLOAT            634 numeric.c      	return rb_float_new(RFLOAT(x)->value / (double)f_y);
RFLOAT            637 numeric.c      	return rb_float_new(RFLOAT(x)->value / d);
RFLOAT            639 numeric.c      	return rb_float_new(RFLOAT(x)->value / RFLOAT(y)->value);
RFLOAT            698 numeric.c      	fy = RFLOAT(y)->value;
RFLOAT            703 numeric.c          flodivmod(RFLOAT(x)->value, fy, 0, &mod);
RFLOAT            729 numeric.c      	fy = RFLOAT(y)->value;
RFLOAT            734 numeric.c          flodivmod(RFLOAT(x)->value, fy, &div, &mod);
RFLOAT            754 numeric.c              return rb_float_new(pow(RFLOAT(x)->value, (double)FIX2LONG(y)));
RFLOAT            756 numeric.c      	return rb_float_new(pow(RFLOAT(x)->value, rb_big2dbl(y)));
RFLOAT            758 numeric.c              return rb_float_new(pow(RFLOAT(x)->value, RFLOAT(y)->value));
RFLOAT            835 numeric.c      	b = RFLOAT(y)->value;
RFLOAT            841 numeric.c          a = RFLOAT(x)->value;
RFLOAT            861 numeric.c          d = RFLOAT(num)->value;
RFLOAT            897 numeric.c          a = RFLOAT(x)->value;
RFLOAT            908 numeric.c      	b = RFLOAT(y)->value;
RFLOAT            930 numeric.c          a = RFLOAT(x)->value;
RFLOAT            941 numeric.c      	b = RFLOAT(y)->value;
RFLOAT            966 numeric.c          a = RFLOAT(x)->value;
RFLOAT            977 numeric.c      	b = RFLOAT(y)->value;
RFLOAT           1001 numeric.c          a = RFLOAT(x)->value;
RFLOAT           1012 numeric.c      	b = RFLOAT(y)->value;
RFLOAT           1037 numeric.c          a = RFLOAT(x)->value;
RFLOAT           1048 numeric.c      	b = RFLOAT(y)->value;
RFLOAT           1075 numeric.c      	double a = RFLOAT(x)->value;
RFLOAT           1076 numeric.c      	double b = RFLOAT(y)->value;
RFLOAT           1113 numeric.c          double val = fabs(RFLOAT(flt)->value);
RFLOAT           1129 numeric.c          if (RFLOAT(num)->value == 0.0) {
RFLOAT           1152 numeric.c          double value = RFLOAT(num)->value;
RFLOAT           1173 numeric.c          double value = RFLOAT(num)->value;
RFLOAT           1196 numeric.c          double value = RFLOAT(num)->value;
RFLOAT           1225 numeric.c          double f = floor(RFLOAT(num)->value);
RFLOAT           1252 numeric.c          double f = ceil(RFLOAT(num)->value);
RFLOAT           1283 numeric.c          double f = RFLOAT(num)->value;
RFLOAT           1309 numeric.c          double f = RFLOAT(num)->value;
RFLOAT           1516 numeric.c      	if (RFLOAT(val)->value <= (double)LONG_MAX
RFLOAT           1517 numeric.c      	    && RFLOAT(val)->value >= (double)LONG_MIN) {
RFLOAT           1518 numeric.c      	    return (long)(RFLOAT(val)->value);
RFLOAT           1524 numeric.c      	    sprintf(buf, "%-.10g", RFLOAT(val)->value);
RFLOAT           1667 numeric.c      	if (RFLOAT(val)->value <= (double)LLONG_MAX
RFLOAT           1668 numeric.c      	    && RFLOAT(val)->value >= (double)LLONG_MIN) {
RFLOAT           1669 numeric.c      	    return (LONG_LONG)(RFLOAT(val)->value);
RFLOAT           1675 numeric.c      	    sprintf(buf, "%-.10g", RFLOAT(val)->value);
RFLOAT           1989 numeric.c      	return rb_float_new((double)FIX2LONG(x) + RFLOAT(y)->value);
RFLOAT           2022 numeric.c      	return rb_float_new((double)FIX2LONG(x) - RFLOAT(y)->value);
RFLOAT           2057 numeric.c      	return rb_float_new((double)FIX2LONG(x) * RFLOAT(y)->value);
RFLOAT           2207 numeric.c              return rb_float_new(pow((double)a, RFLOAT(y)->value));
RFLOAT           2201 object.c       	if (RFLOAT(val)->value <= (double)FIXNUM_MAX
RFLOAT           2202 object.c       	    && RFLOAT(val)->value >= (double)FIXNUM_MIN) {
RFLOAT           2205 object.c       	return rb_dbl2big(RFLOAT(val)->value);
RFLOAT           2367 object.c       	  if (isnan(RFLOAT(f)->value)) {
RFLOAT           2400 object.c       	return RFLOAT(val)->value;
RFLOAT           2414 object.c           return RFLOAT(rb_Float(val))->value;
RFLOAT            775 pack.c         		f = RFLOAT(rb_Float(from))->value;
RFLOAT            786 pack.c         		f = RFLOAT(rb_Float(from))->value;
RFLOAT            798 pack.c         		d = RFLOAT(rb_Float(from))->value;
RFLOAT            810 pack.c         		d = RFLOAT(rb_Float(from))->value;
RFLOAT            821 pack.c         		f = RFLOAT(rb_Float(from))->value;
RFLOAT            833 pack.c         		d = RFLOAT(rb_Float(from))->value;
RFLOAT           9496 parse.c        	RFLOAT(node->nd_lit)->value = -RFLOAT(node->nd_lit)->value;
RFLOAT           5498 parse.y        	RFLOAT(node->nd_lit)->value = -RFLOAT(node->nd_lit)->value;
RFLOAT            453 random.c       	if (RFLOAT(vmax)->value <= LONG_MAX && RFLOAT(vmax)->value >= LONG_MIN) {
RFLOAT            454 random.c       	    max = (long)RFLOAT(vmax)->value;
RFLOAT            457 random.c               if (RFLOAT(vmax)->value < 0)
RFLOAT            458 random.c                   vmax = rb_dbl2big(-RFLOAT(vmax)->value);
RFLOAT            460 random.c                   vmax = rb_dbl2big(RFLOAT(vmax)->value);
RFLOAT            494 sprintf.c      		    val = rb_dbl2big(RFLOAT(val)->value);
RFLOAT            702 sprintf.c      		fval = RFLOAT(rb_Float(val))->value;
RFLOAT            186 time.c         	if (interval && RFLOAT(time)->value < 0.0)
RFLOAT            191 time.c         	    d = modf(RFLOAT(time)->value, &f);
RFLOAT            194 time.c         		rb_raise(rb_eRangeError, "%f out of Time range", RFLOAT(time)->value);


RHASH

RHASH            2649 array.c        	if (st_lookup(RHASH(hash)->tbl, RARRAY(ary1)->ptr[i], 0)) continue;
RHASH            2680 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
RHASH            2713 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
RHASH            2719 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
RHASH            2749 array.c            if (RARRAY(ary)->len == RHASH(hash)->tbl->num_entries) {
RHASH            2754 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
RHASH             138 ext/iconv/iconv.c     if (RHASH(charset_map)->tbl && RHASH(charset_map)->tbl->num_entries) {
RHASH             141 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              31 hash.c             if (!RHASH(hash)->tbl) rb_raise(rb_eTypeError, "uninitialized Hash");
RHASH             168 hash.c             tbl = RHASH(arg->hash)->tbl;
RHASH             171 hash.c             if (RHASH(arg->hash)->tbl != tbl) {
RHASH             190 hash.c             RHASH(hash)->iter_lev--;
RHASH             192 hash.c             if (RHASH(hash)->iter_lev == 0) {
RHASH             194 hash.c         	    st_cleanup_safe(RHASH(hash)->tbl, Qundef);
RHASH             205 hash.c             if (st_foreach(RHASH(arg->hash)->tbl, hash_foreach_iter, (st_data_t)arg)) {
RHASH             219 hash.c             RHASH(hash)->iter_lev++;
RHASH             294 hash.c         	RHASH(hash)->ifnone = rb_block_proc();
RHASH             299 hash.c         	RHASH(hash)->ifnone = ifnone;
RHASH             330 hash.c         	RHASH(hash)->ifnone = Qnil;
RHASH             331 hash.c         	RHASH(hash)->tbl = st_copy(RHASH(argv[0])->tbl);
RHASH             391 hash.c             tbl = st_init_table_with_size(&objhash, RHASH(hash)->tbl->num_entries);
RHASH             393 hash.c             st_free_table(RHASH(hash)->tbl);
RHASH             394 hash.c             RHASH(hash)->tbl = tbl;
RHASH             419 hash.c             if (!st_lookup(RHASH(hash)->tbl, key, &val)) {
RHASH             470 hash.c             if (!st_lookup(RHASH(hash)->tbl, key, &val)) {
RHASH             511 hash.c         	return rb_funcall(RHASH(hash)->ifnone, id_call, 2, hash, key);
RHASH             513 hash.c             return RHASH(hash)->ifnone;
RHASH             541 hash.c             RHASH(hash)->ifnone = ifnone;
RHASH             566 hash.c         	return RHASH(hash)->ifnone;
RHASH             662 hash.c             if (RHASH(hash)->iter_lev > 0) {
RHASH             663 hash.c         	if (st_delete_safe(RHASH(hash)->tbl, (st_data_t*)&key, &val, Qundef)) {
RHASH             668 hash.c             else if (st_delete(RHASH(hash)->tbl, (st_data_t*)&key, &val))
RHASH             722 hash.c         	return rb_funcall(RHASH(hash)->ifnone, id_call, 2, hash, Qnil);
RHASH             725 hash.c         	return RHASH(hash)->ifnone;
RHASH             773 hash.c             int n = RHASH(hash)->tbl->num_entries;
RHASH             775 hash.c             if (n == RHASH(hash)->tbl->num_entries) return Qnil;
RHASH             884 hash.c             if (RHASH(hash)->tbl->num_entries > 0) {
RHASH             914 hash.c             if (TYPE(key) != T_STRING || st_lookup(RHASH(hash)->tbl, key, 0)) {
RHASH             915 hash.c         	st_insert(RHASH(hash)->tbl, key, val);
RHASH             918 hash.c         	st_add_direct(RHASH(hash)->tbl, rb_str_new4(key), val);
RHASH             954 hash.c             RHASH(hash)->ifnone = RHASH(hash2)->ifnone;
RHASH             982 hash.c             return INT2FIX(RHASH(hash)->tbl->num_entries);
RHASH            1000 hash.c             if (RHASH(hash)->tbl->num_entries == 0)
RHASH            1244 hash.c             if (RHASH(hash)->tbl == 0 || RHASH(hash)->tbl->num_entries == 0)
RHASH            1378 hash.c             if (st_lookup(RHASH(hash)->tbl, key, 0)) {
RHASH            1460 hash.c             if (RHASH(hash1)->tbl->num_entries != RHASH(hash2)->tbl->num_entries)
RHASH            1463 hash.c         	if (!(rb_equal(RHASH(hash1)->ifnone, RHASH(hash2)->ifnone) &&
RHASH            1468 hash.c             data.tbl = RHASH(hash2)->tbl;
RHASH             613 marshal.c      	    if (NIL_P(RHASH(obj)->ifnone)) {
RHASH             623 marshal.c      	    w_long(RHASH(obj)->tbl->num_entries, arg);
RHASH             625 marshal.c      	    if (!NIL_P(RHASH(obj)->ifnone)) {
RHASH             626 marshal.c      		w_object(RHASH(obj)->ifnone, arg, limit);
RHASH             951 marshal.c          rb_hash_aset(arg->data, INT2FIX(RHASH(arg->data)->tbl->num_entries), v);
RHASH            1188 marshal.c      		RHASH(v)->ifnone = r_object(arg);


RMATCH

RMATCH            693 re.c               RMATCH(obj)->str = RMATCH(orig)->str;
RMATCH            694 re.c               re_free_registers(RMATCH(obj)->regs);
RMATCH            695 re.c               RMATCH(obj)->regs->allocated = 0;
RMATCH            696 re.c               re_copy_registers(RMATCH(obj)->regs, RMATCH(orig)->regs);
RMATCH            718 re.c               return INT2FIX(RMATCH(match)->regs->num_regs);
RMATCH            740 re.c               if (i < 0 || RMATCH(match)->regs->num_regs <= i)
RMATCH            743 re.c               if (RMATCH(match)->regs->beg[i] < 0)
RMATCH            746 re.c               return rb_assoc_new(INT2FIX(RMATCH(match)->regs->beg[i]),
RMATCH            747 re.c           			INT2FIX(RMATCH(match)->regs->end[i]));
RMATCH            769 re.c               if (i < 0 || RMATCH(match)->regs->num_regs <= i)
RMATCH            772 re.c               if (RMATCH(match)->regs->beg[i] < 0)
RMATCH            775 re.c               return INT2FIX(RMATCH(match)->regs->beg[i]);
RMATCH            797 re.c               if (i < 0 || RMATCH(match)->regs->num_regs <= i)
RMATCH            800 re.c               if (RMATCH(match)->regs->beg[i] < 0)
RMATCH            803 re.c               return INT2FIX(RMATCH(match)->regs->end[i]);
RMATCH            942 re.c               re_copy_registers(RMATCH(match)->regs, &regs);
RMATCH            943 re.c               RMATCH(match)->str = rb_str_new4(str);
RMATCH            957 re.c               if (nth >= RMATCH(match)->regs->num_regs) {
RMATCH            961 re.c           	nth += RMATCH(match)->regs->num_regs;
RMATCH            964 re.c               if (RMATCH(match)->BEG(nth) == -1) return Qfalse;
RMATCH            977 re.c               if (nth >= RMATCH(match)->regs->num_regs) {
RMATCH            981 re.c           	nth += RMATCH(match)->regs->num_regs;
RMATCH            984 re.c               start = RMATCH(match)->BEG(nth);
RMATCH            986 re.c               end = RMATCH(match)->END(nth);
RMATCH            988 re.c               str = rb_str_substr(RMATCH(match)->str, start, len);
RMATCH           1019 re.c               if (RMATCH(match)->BEG(0) == -1) return Qnil;
RMATCH           1020 re.c               str = rb_str_substr(RMATCH(match)->str, 0, RMATCH(match)->BEG(0));
RMATCH           1045 re.c               if (RMATCH(match)->BEG(0) == -1) return Qnil;
RMATCH           1046 re.c               str = RMATCH(match)->str;
RMATCH           1047 re.c               pos = RMATCH(match)->END(0);
RMATCH           1060 re.c               if (RMATCH(match)->BEG(0) == -1) return Qnil;
RMATCH           1062 re.c               for (i=RMATCH(match)->regs->num_regs-1; RMATCH(match)->BEG(i) == -1 && i > 0; i--)
RMATCH           1097 re.c               struct re_registers *regs = RMATCH(match)->regs;
RMATCH           1099 re.c               VALUE target = RMATCH(match)->str;
RMATCH           1234 re.c               return rb_values_at(match, RMATCH(match)->regs->num_regs, argc, argv, match_entry);
RMATCH           1260 re.c           	struct re_registers *regs = RMATCH(match)->regs;
RMATCH           1261 re.c           	VALUE target = RMATCH(match)->str;
RMATCH           1296 re.c               if (OBJ_TAINTED(RMATCH(match)->str)) OBJ_TAINT(str);
RMATCH           1315 re.c               return RMATCH(match)->str;	/* str is frozen */
RMATCH           1698 string.c           if (nth >= RMATCH(match)->regs->num_regs) {
RMATCH           1703 string.c       	if (-nth >= RMATCH(match)->regs->num_regs) {
RMATCH           1706 string.c       	nth += RMATCH(match)->regs->num_regs;
RMATCH           1709 string.c           start = RMATCH(match)->BEG(nth);
RMATCH           1713 string.c           end = RMATCH(match)->END(nth);
RMATCH           1970 string.c       	regs = RMATCH(match)->regs;
RMATCH           2093 string.c       	regs = RMATCH(match)->regs;
RMATCH           3551 string.c       	    regs = RMATCH(rb_backref_get())->regs;
RMATCH           4187 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             494 enum.c         	RARRAY(ary)->ptr[i] = RNODE(RARRAY(ary)->ptr[i])->u2.value;
RNODE             156 node.h         #define nd_type(n) ((int)(((RNODE(n))->flags>>FL_USHIFT)&0xff))
RNODE             158 node.h             RNODE(n)->flags=((RNODE(n)->flags&~FL_UMASK)|(((t)<<FL_USHIFT)&FL_UMASK))
RNODE             162 node.h         #define nd_line(n) ((unsigned int)(((RNODE(n))->flags>>NODE_LSHIFT)&NODE_LMASK))
RNODE             164 node.h             RNODE(n)->flags=((RNODE(n)->flags&~(-1<<NODE_LSHIFT))|(((l)&NODE_LMASK)<<NODE_LSHIFT))


ROBJECT

ROBJECT           648 marshal.c      	    w_ivar(ROBJECT(obj)->iv_tbl, &c_arg);
ROBJECT           220 object.c       	if (ROBJECT(dest)->iv_tbl) {
ROBJECT           221 object.c       	    st_free_table(ROBJECT(dest)->iv_tbl);
ROBJECT           222 object.c       	    ROBJECT(dest)->iv_tbl = 0;
ROBJECT           224 object.c       	if (ROBJECT(obj)->iv_tbl) {
ROBJECT           225 object.c       	    ROBJECT(dest)->iv_tbl = st_copy(ROBJECT(obj)->iv_tbl);
ROBJECT           410 object.c           st_foreach_safe(ROBJECT(obj)->iv_tbl, inspect_i, str);
ROBJECT           436 object.c       	&& ROBJECT(obj)->iv_tbl
ROBJECT           437 object.c       	&& ROBJECT(obj)->iv_tbl->num_entries > 0) {
ROBJECT            53 variable.c     	if (ROBJECT(fc->track)->iv_tbl &&
ROBJECT            54 variable.c     	    st_lookup(ROBJECT(fc->track)->iv_tbl, classpath, &tmp)) {
ROBJECT           133 variable.c     	if (!ROBJECT(klass)->iv_tbl) {
ROBJECT           134 variable.c     	    ROBJECT(klass)->iv_tbl = st_init_numtable();
ROBJECT           136 variable.c     	st_insert(ROBJECT(klass)->iv_tbl, classpath, arg.path);
ROBJECT           150 variable.c         if (ROBJECT(klass)->iv_tbl) {
ROBJECT           151 variable.c     	if (!st_lookup(ROBJECT(klass)->iv_tbl, classpath, &path)) {
ROBJECT           154 variable.c     	    if (!st_lookup(ROBJECT(klass)->iv_tbl, classid, &path)) {
ROBJECT           158 variable.c     	    st_insert(ROBJECT(klass)->iv_tbl, classpath, path);
ROBJECT          1012 variable.c     	if (ROBJECT(obj)->iv_tbl && st_lookup(ROBJECT(obj)->iv_tbl, id, &val))
ROBJECT          1055 variable.c     	if (!ROBJECT(obj)->iv_tbl) ROBJECT(obj)->iv_tbl = st_init_numtable();
ROBJECT          1056 variable.c     	st_insert(ROBJECT(obj)->iv_tbl, id, val);
ROBJECT          1074 variable.c     	if (ROBJECT(obj)->iv_tbl && st_lookup(ROBJECT(obj)->iv_tbl, id, 0))
ROBJECT          1125 variable.c     	if (ROBJECT(obj)->iv_tbl) {
ROBJECT          1126 variable.c     	    st_foreach_safe(ROBJECT(obj)->iv_tbl, ivar_i, ary);
ROBJECT          1183 variable.c     	if (ROBJECT(obj)->iv_tbl && st_delete(ROBJECT(obj)->iv_tbl, (st_data_t*)&id, &val)) {
ROBJECT          1479 variable.c         if (RCLASS(mod)->iv_tbl && st_delete(ROBJECT(mod)->iv_tbl, (st_data_t*)&id, &val)) {
ROBJECT          1925 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         1751 win32/win32.c  	return ROOT_GID;
ROOT_GID         1757 win32/win32.c      return ROOT_GID;
ROOT_GID         1769 win32/win32.c      return (gid == ROOT_GID ? 0 : -1);


ROOT_UID

ROOT_UID         1739 win32/win32.c  	return ROOT_UID;
ROOT_UID         1745 win32/win32.c  	return ROOT_UID;
ROOT_UID         1763 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);


RREGEXP

RREGEXP           412 ext/strscan/strscan.c         ret = re_match(RREGEXP(regex)->ptr,
RREGEXP           418 ext/strscan/strscan.c         ret = re_search(RREGEXP(regex)->ptr,
RREGEXP           592 marshal.c      	    w_bytes(RREGEXP(obj)->str, RREGEXP(obj)->len, arg);
RREGEXP           264 re.c               if (!RREGEXP(re)->ptr || !RREGEXP(re)->str) {
RREGEXP           339 re.c           	if (RREGEXP(re)->ptr->options & RE_OPTION_MULTILINE)
RREGEXP           341 re.c           	if (RREGEXP(re)->ptr->options & RE_OPTION_IGNORECASE)
RREGEXP           343 re.c           	if (RREGEXP(re)->ptr->options & RE_OPTION_EXTENDED)
RREGEXP           384 re.c               str = rb_str_new(RREGEXP(re)->str,RREGEXP(re)->len);
RREGEXP           405 re.c               return rb_reg_desc(RREGEXP(re)->str, RREGEXP(re)->len, re);
RREGEXP           441 re.c               options = RREGEXP(re)->ptr->options;
RREGEXP           442 re.c               ptr = RREGEXP(re)->str;
RREGEXP           443 re.c               len = RREGEXP(re)->len;
RREGEXP           495 re.c           	    options = RREGEXP(re)->ptr->options;
RREGEXP           496 re.c           	    ptr = RREGEXP(re)->str;
RREGEXP           497 re.c           	    len = RREGEXP(re)->len;
RREGEXP           548 re.c               if (RREGEXP(re)->ptr->options & RE_OPTION_IGNORECASE) return Qtrue;
RREGEXP           830 re.c           	RREGEXP(re)->ptr->options |= RE_OPTION_IGNORECASE;
RREGEXP           835 re.c           	RREGEXP(re)->ptr->options &= ~RE_OPTION_IGNORECASE;
RREGEXP           852 re.c           	RREGEXP(re)->ptr->fastmap_accurate = 0;
RREGEXP           853 re.c           	err = re_compile_pattern(RREGEXP(re)->str, RREGEXP(re)->len, RREGEXP(re)->ptr);
RREGEXP           855 re.c           	    rb_reg_raise(RREGEXP(re)->str, RREGEXP(re)->len, err, re);
RREGEXP           881 re.c               return re_adjust_startpos(RREGEXP(re)->ptr,
RREGEXP           915 re.c               result = re_search(RREGEXP(re)->ptr,RSTRING(str)->ptr,RSTRING(str)->len,
RREGEXP           922 re.c           	rb_reg_raise(RREGEXP(re)->str, RREGEXP(re)->len,
RREGEXP          1333 re.c               struct RRegexp *re = RREGEXP(obj);
RREGEXP          1412 re.c               if (reg_cache && RREGEXP(reg_cache)->len == RSTRING(str)->len
RREGEXP          1415 re.c           	&& memcmp(RREGEXP(reg_cache)->str, RSTRING(str)->ptr, RSTRING(str)->len) == 0)
RREGEXP          1449 re.c               hashval = RREGEXP(re)->ptr->options;
RREGEXP          1450 re.c               len = RREGEXP(re)->len;
RREGEXP          1451 re.c               p  = RREGEXP(re)->str;
RREGEXP          1482 re.c               if (RREGEXP(re1)->len != RREGEXP(re2)->len) return Qfalse;
RREGEXP          1483 re.c               if (memcmp(RREGEXP(re1)->str, RREGEXP(re2)->str, RREGEXP(re1)->len) == 0 &&
RREGEXP          1485 re.c           	RREGEXP(re1)->ptr->options == RREGEXP(re2)->ptr->options) {
RREGEXP          1665 re.c           	flags = RREGEXP(argv[0])->ptr->options & 0xf;
RREGEXP          1684 re.c           	s = RREGEXP(argv[0])->str;
RREGEXP          1685 re.c           	len = RREGEXP(argv[0])->len;
RREGEXP          1880 re.c               options = RREGEXP(re)->ptr->options &
RREGEXP          1991 re.c               rb_reg_initialize(copy, RREGEXP(re)->str, RREGEXP(re)->len,
RREGEXP          1240 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            289 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            172 marshal.c          if (!(RSHIFT(x, 31) == 0 || RSHIFT(x, 31) == -1)) {
RSHIFT            192 marshal.c      	x = RSHIFT(x,8);
RSHIFT            488 marshal.c      	if (RSHIFT((long)obj, 31) == 0 || RSHIFT((long)obj, 31) == -1) {
RSHIFT           2478 numeric.c          val = RSHIFT(val, i);
RSHIFT            129 ruby.h         #define FIXNUM_MIN RSHIFT((long)LONG_MIN,1)
RSHIFT            157 ruby.h         #define FIX2LONG(x) RSHIFT((long)x,1)
RSHIFT            170 ruby.h         #define SYM2ID(x) RSHIFT((long)x,8)
RSHIFT           1913 time.c         	p = RSHIFT(p, 8);
RSHIFT           1917 time.c         	s = RSHIFT(s, 8);


RSTRING

RSTRING          1259 array.c        	len += NIL_P(tmp) ? 10 : RSTRING(tmp)->len;
RSTRING          1263 array.c        	len += RSTRING(sep)->len * (RARRAY(ary)->len - 1);
RSTRING           524 bignum.c       	s = RSTRING(str)->ptr;
RSTRING           527 bignum.c       	len = RSTRING(str)->len;
RSTRING           671 bignum.c           s = RSTRING(ss)->ptr;
RSTRING           693 bignum.c           RSTRING(ss)->len -= RBIGNUM(x)->sign?j:j-1;
RSTRING           694 bignum.c           memmove(RBIGNUM(x)->sign?s:s+1, s+j, RSTRING(ss)->len);
RSTRING           695 bignum.c           s[RSTRING(ss)->len] = '\0';
RSTRING           280 dir.c              dp->dir = opendir(RSTRING(dirname)->ptr);
RSTRING           284 dir.c          	    dp->dir = opendir(RSTRING(dirname)->ptr);
RSTRING           287 dir.c          	    rb_sys_fail(RSTRING(dirname)->ptr);
RSTRING           290 dir.c              dp->path = strdup(RSTRING(dirname)->ptr);
RSTRING           550 dir.c              if (chdir(RSTRING(path)->ptr) < 0)
RSTRING           551 dir.c          	rb_sys_fail(RSTRING(path)->ptr);
RSTRING           701 dir.c              path = RSTRING(*dir)->ptr;
RSTRING           723 dir.c              if (chroot(RSTRING(path)->ptr) == -1)
RSTRING           724 dir.c          	rb_sys_fail(RSTRING(path)->ptr);
RSTRING           763 dir.c              if (mkdir(RSTRING(path)->ptr, mode) == -1)
RSTRING           764 dir.c          	rb_sys_fail(RSTRING(path)->ptr);
RSTRING           783 dir.c              if (rmdir(RSTRING(dir)->ptr) < 0)
RSTRING           784 dir.c          	rb_sys_fail(RSTRING(dir)->ptr);
RSTRING          1247 dir.c              p = RSTRING(str)->ptr;
RSTRING          1248 dir.c              pend = p + RSTRING(str)->len;
RSTRING          1510 dir.c              if (fnmatch(RSTRING(pattern)->ptr, RSTRING(path)->ptr, flags) == 0)
RSTRING           273 error.c        		    etype = RSTRING(rb_obj_as_string(x))->ptr;
RSTRING           337 error.c            return rb_exc_new(etype, RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING           444 error.c            if (RSTRING(exc)->len == 0) {
RSTRING           747 error.c        	    if (NIL_P(d) || RSTRING(d)->len > 65) {
RSTRING           750 error.c        	    desc = RSTRING(d)->ptr;
RSTRING           796 error.c            rb_raise(rb_eArgError, "invalid value for %s: %s", type, RSTRING(s)->ptr);
RSTRING           913 error.c        	len = strlen(err)+RSTRING(str)->len+3;
RSTRING           915 error.c        	snprintf(RSTRING(mesg)->ptr, len+1, "%s - %.*s", err,
RSTRING           916 error.c        		(int)RSTRING(str)->len, RSTRING(str)->ptr);
RSTRING           917 error.c        	rb_str_resize(mesg, strlen(RSTRING(mesg)->ptr));
RSTRING          1201 eval.c         	    warn_print2(RSTRING(mesg)->ptr, RSTRING(mesg)->len);
RSTRING          1209 eval.c         	einfo = RSTRING(e)->ptr;
RSTRING          1210 eval.c         	elen = RSTRING(e)->len;
RSTRING          1226 eval.c         	    warn_print2(RSTRING(epath)->ptr, RSTRING(epath)->len);
RSTRING          1233 eval.c         	    if (RSTRING(epath)->ptr[0] == '#') epath = 0;
RSTRING          1242 eval.c         		warn_print2(RSTRING(epath)->ptr, RSTRING(epath)->len);
RSTRING          1262 eval.c         		warn_printf("\tfrom %s\n", RSTRING(ep->ptr[i])->ptr);
RSTRING          2788 eval.c         		     RSTRING(rb_obj_as_string(c))->ptr);
RSTRING          3653 eval.c         			     RSTRING(rb_obj_as_string(klass))->ptr);
RSTRING          3765 eval.c         		result = rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len,
RSTRING          3769 eval.c         		result = rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len,
RSTRING          4489 eval.c         			RSTRING(e)->ptr);
RSTRING          6198 eval.c         	printf("\tfrom %s\n", RSTRING(RARRAY(ary)->ptr[i])->ptr);
RSTRING          6418 eval.c             if (!NIL_P(vfile)) file = RSTRING(vfile)->ptr;
RSTRING          6709 eval.c         	rb_load_file(RSTRING(fname)->ptr);
RSTRING          6931 eval.c             ext = strrchr(ftptr = RSTRING(fname)->ptr, '.');
RSTRING          6940 eval.c         	    tmp = rb_str_new(RSTRING(fname)->ptr, ext-RSTRING(fname)->ptr);
RSTRING          6973 eval.c         	ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
RSTRING          6984 eval.c             rb_raise(rb_eLoadError, "no such file to load -- %s", RSTRING(fname)->ptr);
RSTRING          7020 eval.c         	    if (!path || load_wait(RSTRING(path)->ptr)) {
RSTRING          7033 eval.c         		    ftptr = ruby_strdup(RSTRING(feature)->ptr);
RSTRING          7040 eval.c         		    ruby_sourcefile = rb_source_filename(RSTRING(path)->ptr);
RSTRING          7044 eval.c         		    handle = (long)dln_load(RSTRING(path)->ptr);
RSTRING          7871 eval.c             rb_autoload(mod, id, RSTRING(file)->ptr);
RSTRING          8569 eval.c         	snprintf(RSTRING(str)->ptr, len+1,
RSTRING          8575 eval.c         	snprintf(RSTRING(str)->ptr, len+1,
RSTRING          8578 eval.c             RSTRING(str)->len = strlen(RSTRING(str)->ptr);
RSTRING          12344 eval.c             snprintf(RSTRING(str)->ptr, len, "#<%s:0x%lx %s>", cname, thread, status);
RSTRING          12345 eval.c             RSTRING(str)->len = strlen(RSTRING(str)->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           333 ext/dbm/dbm.c      key.dptr = RSTRING(keystr)->ptr;
RSTRING           334 ext/dbm/dbm.c      key.dsize = RSTRING(keystr)->len;
RSTRING           408 ext/dbm/dbm.c  	key.dptr = RSTRING(keystr)->ptr;
RSTRING           409 ext/dbm/dbm.c  	key.dsize = RSTRING(keystr)->len;
RSTRING           513 ext/dbm/dbm.c      key.dptr = RSTRING(keystr)->ptr;
RSTRING           514 ext/dbm/dbm.c      key.dsize = RSTRING(keystr)->len;
RSTRING           516 ext/dbm/dbm.c      val.dptr = RSTRING(valstr)->ptr;
RSTRING           517 ext/dbm/dbm.c      val.dsize = RSTRING(valstr)->len;
RSTRING           678 ext/dbm/dbm.c      key.dptr = RSTRING(keystr)->ptr;
RSTRING           679 ext/dbm/dbm.c      key.dsize = RSTRING(keystr)->len;
RSTRING           696 ext/dbm/dbm.c      val.dptr = RSTRING(valstr)->ptr;
RSTRING           697 ext/dbm/dbm.c      val.dsize = RSTRING(valstr)->len;
RSTRING           702 ext/dbm/dbm.c  	if (val.dsize == RSTRING(valstr)->len &&
RSTRING           703 ext/dbm/dbm.c  	    memcmp(val.dptr, RSTRING(valstr)->ptr, val.dsize) == 0)
RSTRING           100 ext/digest/digest.c     algo->update_func(pctx, RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING           129 ext/digest/digest.c     algo->update_func(pctx, RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING           174 ext/digest/digest.c     algo->update_func(pctx, RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING           279 ext/digest/digest.c     if (RSTRING(str2)->len == algo->digest_len)
RSTRING           284 ext/digest/digest.c     if (RSTRING(str1)->len == RSTRING(str2)->len
RSTRING           423 ext/dl/dl.c    	src = RSTRING(e)->ptr;
RSTRING           526 ext/dl/dl.c      len = RSTRING(self)->len;
RSTRING           528 ext/dl/dl.c      memcpy(ptr, RSTRING(self)->ptr, len);
RSTRING           581 ext/dl/dl.c      return rb_dlptr_new(strdup(RSTRING(str)->ptr), RSTRING(str)->len, dlfree);
RSTRING           612 ext/dl/dl.c      switch (RSTRING(type)->ptr[0]) {
RSTRING           638 ext/dl/dl.c        rb_raise(rb_eDLTypeError, "unsupported type `%c'", RSTRING(type)->ptr[0]);
RSTRING           657 ext/dl/dl.c    		      fname, RSTRING(type)->ptr);
RSTRING            40 ext/dl/dl.h    # define StringValuePtr(v) RSTRING((TYPE(v) == T_STRING) ? (v) : rb_str_to_str(v))->ptr
RSTRING           591 ext/dl/ptr.c       data->size = dlsizeof(RSTRING(type)->ptr);
RSTRING           867 ext/dl/ptr.c       src = RSTRING(val)->ptr;
RSTRING           868 ext/dl/ptr.c       len = RSTRING(val)->len;
RSTRING           159 ext/dl/sym.c     sname = NIL_P(name) ? NULL : RSTRING(name)->ptr;
RSTRING           268 ext/dl/sym.c     str_size = RSTRING(proto)->len + 100;
RSTRING           272 ext/dl/sym.c   	   sym, sym->func, RSTRING(proto)->ptr);
RSTRING           583 ext/dl/sym.c   	ANY2S(args[i]) = DLSTR(RSTRING(str)->ptr);
RSTRING           591 ext/dl/sym.c   	ANY2S(args[i]) = DLSTR(dlmalloc(RSTRING(str)->len + 1));
RSTRING           592 ext/dl/sym.c   	memcpy((char*)(ANY2S(args[i])), RSTRING(str)->ptr, RSTRING(str)->len + 1);
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           427 ext/gdbm/gdbm.c     key.dptr = RSTRING(keystr)->ptr;
RSTRING           428 ext/gdbm/gdbm.c     key.dsize = RSTRING(keystr)->len;
RSTRING           616 ext/gdbm/gdbm.c     key.dptr = RSTRING(keystr)->ptr;
RSTRING           617 ext/gdbm/gdbm.c     key.dsize = RSTRING(keystr)->len;
RSTRING           619 ext/gdbm/gdbm.c     val.dptr = RSTRING(valstr)->ptr;
RSTRING           620 ext/gdbm/gdbm.c     val.dsize = RSTRING(valstr)->len;
RSTRING           782 ext/gdbm/gdbm.c     key.dptr = RSTRING(keystr)->ptr;
RSTRING           783 ext/gdbm/gdbm.c     key.dsize = RSTRING(keystr)->len;
RSTRING           807 ext/gdbm/gdbm.c             RSTRING(valstr)->len == RSTRING(valstr2)->len &&
RSTRING           808 ext/gdbm/gdbm.c             memcmp(RSTRING(valstr)->ptr, RSTRING(valstr2)->ptr,
RSTRING           809 ext/gdbm/gdbm.c                    RSTRING(valstr)->len) == 0) {
RSTRING           174 ext/iconv/iconv.c 	    volatile VALUE msg = rb_str_new(0, strlen(s) + RSTRING(to)->len +
RSTRING           175 ext/iconv/iconv.c 					    RSTRING(from)->len + 8);
RSTRING           177 ext/iconv/iconv.c 	    sprintf(RSTRING(msg)->ptr, "%s(\"%s\", \"%s\")",
RSTRING           178 ext/iconv/iconv.c 		    s, RSTRING(to)->ptr, RSTRING(from)->ptr);
RSTRING           179 ext/iconv/iconv.c 	    s = RSTRING(msg)->ptr;
RSTRING           180 ext/iconv/iconv.c 	    RSTRING(msg)->len = strlen(s);
RSTRING           315 ext/iconv/iconv.c     else if (TYPE(failed) != T_STRING || RSTRING(failed)->len < FAILED_MAXLEN) {
RSTRING           352 ext/iconv/iconv.c     if (RSTRING(str)->ptr == ptr && RSTRING(str)->len == len)
RSTRING           354 ext/iconv/iconv.c     if (RSTRING(str)->ptr + RSTRING(str)->len == ptr + len)
RSTRING           355 ext/iconv/iconv.c 	ret = rb_str_substr(str, ptr - RSTRING(str)->ptr, len);
RSTRING           417 ext/iconv/iconv.c 	slen = RSTRING(str)->len;
RSTRING           418 ext/iconv/iconv.c 	inptr = RSTRING(str)->ptr;
RSTRING           487 ext/iconv/iconv.c 		    inlen = length = RSTRING(str)->len;
RSTRING           488 ext/iconv/iconv.c 		    instart = inptr = RSTRING(str)->ptr;
RSTRING           601 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           118 ext/openssl/ossl.h     int len = RSTRING(str)->len;\
RSTRING           119 ext/openssl/ossl.h     int newlen = (p) - (unsigned char*)RSTRING(str)->ptr;\
RSTRING           121 ext/openssl/ossl.h     RSTRING(str)->len = newlen;\
RSTRING           122 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            29 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           259 ext/openssl/ossl_cipher.c     if (!EVP_CipherFinal_ex(ctx, RSTRING(str)->ptr, &out_len))
RSTRING           261 ext/openssl/ossl_cipher.c     assert(out_len <= RSTRING(str)->len);
RSTRING           262 ext/openssl/ossl_cipher.c     RSTRING(str)->len = out_len;
RSTRING           263 ext/openssl/ossl_cipher.c     RSTRING(str)->ptr[out_len] = 0;
RSTRING           286 ext/openssl/ossl_cipher.c     if (RSTRING(key)->len < EVP_CIPHER_CTX_key_length(ctx))
RSTRING           289 ext/openssl/ossl_cipher.c     if (EVP_CipherInit_ex(ctx, NULL, NULL, RSTRING(key)->ptr, NULL, -1) != 1)
RSTRING           303 ext/openssl/ossl_cipher.c     if (RSTRING(iv)->len < EVP_CIPHER_CTX_iv_length(ctx))
RSTRING           306 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           400 ext/openssl/ossl_ssl.c 	if (!SSL_CTX_set_session_id_context(ctx, RSTRING(val)->ptr,
RSTRING           401 ext/openssl/ossl_ssl.c 					    RSTRING(val)->len)){
RSTRING           482 ext/openssl/ossl_ssl.c     if (!SSL_CTX_set_cipher_list(ctx, RSTRING(str)->ptr)) {
RSTRING           642 ext/openssl/ossl_ssl.c 	    nread = SSL_read(ssl, RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING           669 ext/openssl/ossl_ssl.c     RSTRING(str)->len = nread;
RSTRING           670 ext/openssl/ossl_ssl.c     RSTRING(str)->ptr[nread] = 0;
RSTRING           689 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            67 ext/readline/readline.c 	prompt = RSTRING(tmp)->ptr;
RSTRING           167 ext/readline/readline.c 	result[i + 1] = ALLOC_N(char, RSTRING(temp)->len + 1);
RSTRING           168 ext/readline/readline.c 	strcpy(result[i + 1], RSTRING(temp)->ptr);
RSTRING           246 ext/readline/readline.c 	if (RSTRING(str)->len == 0) {
RSTRING           249 ext/readline/readline.c 	    rl_completion_append_character = RSTRING(str)->ptr[0];
RSTRING           271 ext/readline/readline.c     RSTRING(str)->ptr[0] = rl_completion_append_character;
RSTRING           290 ext/readline/readline.c 	    ALLOC_N(char, RSTRING(str)->len + 1);
RSTRING           293 ext/readline/readline.c 	REALLOC_N(basic_word_break_characters, char, RSTRING(str)->len + 1);
RSTRING           296 ext/readline/readline.c 	    RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING           297 ext/readline/readline.c     basic_word_break_characters[RSTRING(str)->len] = '\0';
RSTRING           332 ext/readline/readline.c 	    ALLOC_N(char, RSTRING(str)->len + 1);
RSTRING           335 ext/readline/readline.c 	REALLOC_N(completer_word_break_characters, char, RSTRING(str)->len + 1);
RSTRING           338 ext/readline/readline.c 	    RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING           339 ext/readline/readline.c     completer_word_break_characters[RSTRING(str)->len] = '\0';
RSTRING           374 ext/readline/readline.c 	    ALLOC_N(char, RSTRING(str)->len + 1);
RSTRING           377 ext/readline/readline.c 	REALLOC_N(basic_quote_characters, char, RSTRING(str)->len + 1);
RSTRING           380 ext/readline/readline.c 	    RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING           381 ext/readline/readline.c     basic_quote_characters[RSTRING(str)->len] = '\0';
RSTRING           417 ext/readline/readline.c 	    ALLOC_N(char, RSTRING(str)->len + 1);
RSTRING           420 ext/readline/readline.c 	REALLOC_N(completer_quote_characters, char, RSTRING(str)->len + 1);
RSTRING           423 ext/readline/readline.c 	    RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING           424 ext/readline/readline.c     completer_quote_characters[RSTRING(str)->len] = '\0';
RSTRING           460 ext/readline/readline.c 	    ALLOC_N(char, RSTRING(str)->len + 1);
RSTRING           463 ext/readline/readline.c 	REALLOC_N(filename_quote_characters, char, RSTRING(str)->len + 1);
RSTRING           466 ext/readline/readline.c 	    RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING           467 ext/readline/readline.c     filename_quote_characters[RSTRING(str)->len] = '\0';
RSTRING           535 ext/readline/readline.c     entry = replace_history_entry(i, RSTRING(str)->ptr, NULL);
RSTRING           553 ext/readline/readline.c     add_history(RSTRING(str)->ptr);
RSTRING           569 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           310 ext/sdbm/init.c     key.dptr = RSTRING(keystr)->ptr;
RSTRING           311 ext/sdbm/init.c     key.dsize = RSTRING(keystr)->len;
RSTRING           387 ext/sdbm/init.c 	key.dptr = RSTRING(keystr)->ptr;
RSTRING           388 ext/sdbm/init.c 	key.dsize = RSTRING(keystr)->len;
RSTRING           497 ext/sdbm/init.c     key.dptr = RSTRING(keystr)->ptr;
RSTRING           498 ext/sdbm/init.c     key.dsize = RSTRING(keystr)->len;
RSTRING           500 ext/sdbm/init.c     val.dptr = RSTRING(valstr)->ptr;
RSTRING           501 ext/sdbm/init.c     val.dsize = RSTRING(valstr)->len;
RSTRING           660 ext/sdbm/init.c     key.dptr = RSTRING(keystr)->ptr;
RSTRING           661 ext/sdbm/init.c     key.dsize = RSTRING(keystr)->len;
RSTRING           678 ext/sdbm/init.c     val.dptr = RSTRING(valstr)->ptr;
RSTRING           679 ext/sdbm/init.c     val.dsize = RSTRING(valstr)->len;
RSTRING           684 ext/sdbm/init.c 	if (val.dsize == RSTRING(valstr)->len &&
RSTRING           685 ext/sdbm/init.c 	    memcmp(val.dptr, RSTRING(valstr)->ptr, val.dsize) == 0)
RSTRING           373 ext/socket/socket.c 	v = RSTRING(val)->ptr;
RSTRING           374 ext/socket/socket.c 	vlen = RSTRING(val)->len;
RSTRING           503 ext/socket/socket.c 	n = sendto(fd, RSTRING(mesg)->ptr, RSTRING(mesg)->len, NUM2INT(flags),
RSTRING           504 ext/socket/socket.c 		   (struct sockaddr*)RSTRING(to)->ptr, RSTRING(to)->len);
RSTRING           509 ext/socket/socket.c 	n = send(fd, RSTRING(mesg)->ptr, RSTRING(mesg)->len, NUM2INT(flags));
RSTRING           567 ext/socket/socket.c     slen = recvfrom(fd, RSTRING(str)->ptr, buflen, flags, (struct sockaddr*)buf, &alen);
RSTRING           577 ext/socket/socket.c     if (slen < RSTRING(str)->len) {
RSTRING           578 ext/socket/socket.c 	RSTRING(str)->len = slen;
RSTRING           579 ext/socket/socket.c 	RSTRING(str)->ptr[slen] = '\0';
RSTRING           704 ext/socket/socket.c 	name = RSTRING(host)->ptr;
RSTRING           738 ext/socket/socket.c 	serv = RSTRING(port)->ptr;
RSTRING          1404 ext/socket/socket.c     strncpy(sockaddr.sun_path, RSTRING(path)->ptr, sizeof(sockaddr.sun_path)-1);
RSTRING          1431 ext/socket/socket.c     fptr->path = strdup(RSTRING(path)->ptr);
RSTRING          1597 ext/socket/socket.c 	n = sendto(fileno(f), RSTRING(mesg)->ptr, RSTRING(mesg)->len, NUM2INT(flags),
RSTRING          1933 ext/socket/socket.c 	ptr = RSTRING(domain)->ptr;
RSTRING          1984 ext/socket/socket.c 	ptr = RSTRING(type)->ptr;
RSTRING          2194 ext/socket/socket.c     if (ruby_connect(fd, (struct sockaddr*)RSTRING(addr)->ptr, RSTRING(addr)->len, 0) < 0) {
RSTRING          2288 ext/socket/socket.c     if (bind(fileno(fptr->f), (struct sockaddr*)RSTRING(addr)->ptr, RSTRING(addr)->len) < 0)
RSTRING          2755 ext/socket/socket.c     else if (RSTRING(addr)->len == 16) {
RSTRING          2759 ext/socket/socket.c     h = gethostbyaddr(RSTRING(addr)->ptr, RSTRING(addr)->len, t);
RSTRING          2808 ext/socket/socket.c 	char *s = RSTRING(service)->ptr;
RSTRING          2813 ext/socket/socket.c 	    rb_raise(rb_eSocket, "no such service %s/%s", s, RSTRING(proto)->ptr);
RSTRING          2915 ext/socket/socket.c 	if (sizeof(ss) < RSTRING(sa)->len) {
RSTRING          2918 ext/socket/socket.c 	memcpy(&ss, RSTRING(sa)->ptr, RSTRING(sa)->len);
RSTRING          2919 ext/socket/socket.c 	if (RSTRING(sa)->len != SA_LEN((struct sockaddr*)&ss)) {
RSTRING          3086 ext/socket/socket.c     if (RSTRING(addr)->len != sizeof(struct sockaddr_un)) {
RSTRING          3088 ext/socket/socket.c 		 RSTRING(addr)->len, sizeof(struct sockaddr_un));
RSTRING           488 ext/stringio/stringio.c     if (ptr->pos < RSTRING(ptr->string)->len) return Qfalse;
RSTRING           655 ext/stringio/stringio.c 	offset += RSTRING(ptr->string)->len;
RSTRING           698 ext/stringio/stringio.c     while (ptr->pos < RSTRING(ptr->string)->len) {
RSTRING           699 ext/stringio/stringio.c 	char c = RSTRING(ptr->string)->ptr[ptr->pos++];
RSTRING           717 ext/stringio/stringio.c     if (ptr->pos >= RSTRING(ptr->string)->len) {
RSTRING           721 ext/stringio/stringio.c     c = RSTRING(ptr->string)->ptr[ptr->pos++];
RSTRING           733 ext/stringio/stringio.c     olen = RSTRING(ptr->string)->len;
RSTRING           737 ext/stringio/stringio.c 	    MEMZERO(RSTRING(ptr->string)->ptr + olen, char, pos - olen);
RSTRING           763 ext/stringio/stringio.c 	if ((len = RSTRING(ptr->string)->len) < pos-- ||
RSTRING           764 ext/stringio/stringio.c 	    (unsigned char)RSTRING(ptr->string)->ptr[pos] !=
RSTRING           767 ext/stringio/stringio.c 	    RSTRING(ptr->string)->ptr[pos] = cc;
RSTRING           849 ext/stringio/stringio.c     if (ptr->pos >= (n = RSTRING(ptr->string)->len)) {
RSTRING           853 ext/stringio/stringio.c     s = RSTRING(ptr->string)->ptr;
RSTRING           854 ext/stringio/stringio.c     e = s + RSTRING(ptr->string)->len;
RSTRING           859 ext/stringio/stringio.c     else if ((n = RSTRING(str)->len) == 0) {
RSTRING           874 ext/stringio/stringio.c 	str = rb_str_substr(ptr->string, s - RSTRING(ptr->string)->ptr, e - s);
RSTRING           877 ext/stringio/stringio.c 	if ((p = memchr(s, RSTRING(str)->ptr[0], e - s)) != 0) {
RSTRING           886 ext/stringio/stringio.c 		    if (MEMCMP(p, RSTRING(str)->ptr, char, n) == 0) {
RSTRING           894 ext/stringio/stringio.c 		p = RSTRING(str)->ptr;
RSTRING           903 ext/stringio/stringio.c     ptr->pos = e - RSTRING(ptr->string)->ptr;
RSTRING          1004 ext/stringio/stringio.c     len = RSTRING(str)->len;
RSTRING          1007 ext/stringio/stringio.c     olen = RSTRING(ptr->string)->len;
RSTRING          1012 ext/stringio/stringio.c 	rb_str_cat(ptr->string, RSTRING(str)->ptr, len);
RSTRING          1063 ext/stringio/stringio.c     olen = RSTRING(ptr->string)->len;
RSTRING          1068 ext/stringio/stringio.c     RSTRING(ptr->string)->ptr[ptr->pos++] = c;
RSTRING          1108 ext/stringio/stringio.c 	    if (len > 0 && ptr->pos >= RSTRING(ptr->string)->len) {
RSTRING          1122 ext/stringio/stringio.c 	len = RSTRING(ptr->string)->len;
RSTRING          1144 ext/stringio/stringio.c 	long rest = RSTRING(ptr->string)->len - ptr->pos;
RSTRING          1147 ext/stringio/stringio.c 	MEMCPY(RSTRING(str)->ptr, RSTRING(ptr->string)->ptr + ptr->pos, char, len);
RSTRING          1154 ext/stringio/stringio.c 	ptr->pos += len = RSTRING(str)->len;
RSTRING          1174 ext/stringio/stringio.c     if (NIL_P(val) || RSTRING(val)->len == 0) {
RSTRING          1213 ext/stringio/stringio.c     return ULONG2NUM(RSTRING(string)->len);
RSTRING          1229 ext/stringio/stringio.c     long plen = RSTRING(string)->len;
RSTRING          1235 ext/stringio/stringio.c 	MEMZERO(RSTRING(string)->ptr + plen, char, l - plen);
RSTRING            55 ext/strscan/strscan.c #define S_PBEG(s)  (RSTRING((s)->str)->ptr)
RSTRING            56 ext/strscan/strscan.c #define S_LEN(s)  (RSTRING((s)->str)->len)
RSTRING            61 ext/strscan/strscan.c #define EOS_P(s) ((s)->curr >= RSTRING(p->str)->len)
RSTRING          1124 ext/strscan/strscan.c                        RSTRING(b)->ptr);
RSTRING          1132 ext/strscan/strscan.c                    RSTRING(a)->ptr,
RSTRING          1133 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_ALLOC_N( char, RSTRING(ivname)->len + 2 );
RSTRING          1049 ext/syck/rubyext.c     strncat( ivn, RSTRING(ivname)->ptr, RSTRING(ivname)->len );
RSTRING          1080 ext/syck/rubyext.c     if (NIL_P(type) || RSTRING(StringValue(type))->len == 0)
RSTRING          1085 ext/syck/rubyext.c     if ( ! (NIL_P(type) || RSTRING(StringValue(type))->len == 0) )
RSTRING          1204 ext/syck/rubyext.c         char *taguri = syck_type_id_to_uri( RSTRING(tmp)->ptr );
RSTRING          1225 ext/syck/rubyext.c         type_id = syck_match_implicit( RSTRING(val)->ptr, RSTRING(val)->len );
RSTRING          1496 ext/syck/rubyext.c     node->data.str->ptr = syck_strndup( RSTRING(val)->ptr, RSTRING(val)->len );
RSTRING          1497 ext/syck/rubyext.c     node->data.str->len = RSTRING(val)->len;
RSTRING          1768 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           285 ext/zlib/zlib.c 	sum = func(sum, RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING           440 ext/zlib/zlib.c 	z->stream.next_out = RSTRING(z->buf)->ptr;
RSTRING           446 ext/zlib/zlib.c     if (RSTRING(z->buf)->len - z->buf_filled >= ZSTREAM_AVAIL_OUT_STEP_MAX) {
RSTRING           459 ext/zlib/zlib.c     z->stream.next_out = RSTRING(z->buf)->ptr + z->buf_filled;
RSTRING           472 ext/zlib/zlib.c 	z->stream.next_out = RSTRING(z->buf)->ptr;
RSTRING           478 ext/zlib/zlib.c 	z->stream.next_out = RSTRING(z->buf)->ptr + z->buf_filled;
RSTRING           493 ext/zlib/zlib.c 	z->stream.next_out = RSTRING(z->buf)->ptr;
RSTRING           499 ext/zlib/zlib.c     if (RSTRING(z->buf)->len < z->buf_filled + len) {
RSTRING           511 ext/zlib/zlib.c     memcpy(RSTRING(z->buf)->ptr + z->buf_filled, src, len);
RSTRING           513 ext/zlib/zlib.c     z->stream.next_out = RSTRING(z->buf)->ptr + z->buf_filled;
RSTRING           517 ext/zlib/zlib.c     zstream_append_buffer((z),RSTRING(v)->ptr,RSTRING(v)->len)
RSTRING           555 ext/zlib/zlib.c     memmove(RSTRING(z->buf)->ptr, RSTRING(z->buf)->ptr + len,
RSTRING           557 ext/zlib/zlib.c     z->stream.next_out = RSTRING(z->buf)->ptr + z->buf_filled;
RSTRING           558 ext/zlib/zlib.c     z->stream.avail_out = RSTRING(z->buf)->len - z->buf_filled;
RSTRING           571 ext/zlib/zlib.c     if (NIL_P(z->buf) || RSTRING(z->buf)->len - z->buf_filled == 0) {
RSTRING           575 ext/zlib/zlib.c     memmove(RSTRING(z->buf)->ptr + 1, RSTRING(z->buf)->ptr, z->buf_filled);
RSTRING           576 ext/zlib/zlib.c     RSTRING(z->buf)->ptr[0] = (char)c;
RSTRING           603 ext/zlib/zlib.c     zstream_append_input((z), RSTRING(v)->ptr, RSTRING(v)->len)
RSTRING           610 ext/zlib/zlib.c     if (NIL_P(z->input) || RSTRING(z->input)->len <= len) {
RSTRING           614 ext/zlib/zlib.c 	memmove(RSTRING(z->input)->ptr, RSTRING(z->input)->ptr + len,
RSTRING           615 ext/zlib/zlib.c 		RSTRING(z->input)->len - len);
RSTRING           616 ext/zlib/zlib.c 	rb_str_resize(z->input, RSTRING(z->input)->len - len);
RSTRING           717 ext/zlib/zlib.c 	z->stream.next_in = RSTRING(z->input)->ptr;
RSTRING           718 ext/zlib/zlib.c 	z->stream.avail_in = RSTRING(z->input)->len;
RSTRING           776 ext/zlib/zlib.c 	z->stream.next_in = RSTRING(z->input)->ptr;
RSTRING           777 ext/zlib/zlib.c 	z->stream.avail_in = RSTRING(z->input)->len;
RSTRING           781 ext/zlib/zlib.c 				  RSTRING(z->input)->len - z->stream.avail_in);
RSTRING          1032 ext/zlib/zlib.c     return INT2FIX(NIL_P(z->input) ? 0 : (int)(RSTRING(z->input)->len));
RSTRING          1187 ext/zlib/zlib.c     zstream_run(z, RSTRING(src)->ptr, RSTRING(src)->len, Z_FINISH);
RSTRING          1251 ext/zlib/zlib.c     if (flush != Z_NO_FLUSH || RSTRING(src)->len > 0) { /* prevent BUF_ERROR */
RSTRING          1252 ext/zlib/zlib.c 	zstream_run(z, RSTRING(src)->ptr, RSTRING(src)->len, flush);
RSTRING          1389 ext/zlib/zlib.c 			       RSTRING(src)->ptr, RSTRING(src)->len);
RSTRING          1454 ext/zlib/zlib.c     zstream_run(z, RSTRING(src)->ptr, RSTRING(src)->len, Z_SYNC_FLUSH);
RSTRING          1510 ext/zlib/zlib.c     if (RSTRING(src)->len > 0) { /* prevent Z_BUF_ERROR */
RSTRING          1511 ext/zlib/zlib.c 	zstream_run(z, RSTRING(src)->ptr, RSTRING(src)->len, Z_SYNC_FLUSH);
RSTRING          1607 ext/zlib/zlib.c     return zstream_sync(z, RSTRING(src)->ptr, RSTRING(src)->len);
RSTRING          1651 ext/zlib/zlib.c 			       RSTRING(src)->ptr, RSTRING(src)->len);
RSTRING          1847 ext/zlib/zlib.c     while (NIL_P(gz->z.input) || RSTRING(gz->z.input)->len < size) {
RSTRING          1864 ext/zlib/zlib.c 	p = memchr(RSTRING(gz->z.input)->ptr + offset, '\0',
RSTRING          1865 ext/zlib/zlib.c 		   RSTRING(gz->z.input)->len - offset);
RSTRING          1871 ext/zlib/zlib.c 	offset = RSTRING(gz->z.input)->len;
RSTRING          1979 ext/zlib/zlib.c     head = RSTRING(gz->z.input)->ptr;
RSTRING          2017 ext/zlib/zlib.c 	len = gzfile_get16(RSTRING(gz->z.input)->ptr);
RSTRING          2025 ext/zlib/zlib.c 	len = p - RSTRING(gz->z.input)->ptr;
RSTRING          2026 ext/zlib/zlib.c 	gz->orig_name = rb_str_new(RSTRING(gz->z.input)->ptr, len);
RSTRING          2032 ext/zlib/zlib.c 	len = p - RSTRING(gz->z.input)->ptr;
RSTRING          2033 ext/zlib/zlib.c 	gz->comment = rb_str_new(RSTRING(gz->z.input)->ptr, len);
RSTRING          2038 ext/zlib/zlib.c     if (gz->z.input != Qnil && RSTRING(gz->z.input)->len > 0) {
RSTRING          2055 ext/zlib/zlib.c     crc = gzfile_get32(RSTRING(gz->z.input)->ptr);
RSTRING          2056 ext/zlib/zlib.c     length = gzfile_get32(RSTRING(gz->z.input)->ptr + 4);
RSTRING          2101 ext/zlib/zlib.c 	if (RSTRING(str)->len > 0) { /* prevent Z_BUF_ERROR */
RSTRING          2102 ext/zlib/zlib.c 	    zstream_run(&gz->z, RSTRING(str)->ptr, RSTRING(str)->len,
RSTRING          2115 ext/zlib/zlib.c     if (RSTRING(str)->len <= gz->ungetc) {
RSTRING          2116 ext/zlib/zlib.c 	gz->ungetc -= RSTRING(str)->len;
RSTRING          2119 ext/zlib/zlib.c 	gz->crc = crc32(gz->crc, RSTRING(str)->ptr + gz->ungetc,
RSTRING          2120 ext/zlib/zlib.c 			RSTRING(str)->len - gz->ungetc);
RSTRING          2253 ext/zlib/zlib.c 	n += RSTRING(gz->z.input)->len;
RSTRING          2354 ext/zlib/zlib.c     io = rb_file_open(RSTRING(filename)->ptr, mode);
RSTRING          2503 ext/zlib/zlib.c     p = memchr(RSTRING(s)->ptr, '\0', RSTRING(s)->len);
RSTRING          2505 ext/zlib/zlib.c 	rb_str_resize(s, p - RSTRING(s)->ptr);
RSTRING          2526 ext/zlib/zlib.c     p = memchr(RSTRING(s)->ptr, '\0', RSTRING(s)->len);
RSTRING          2528 ext/zlib/zlib.c 	rb_str_resize(s, p - RSTRING(s)->ptr);
RSTRING          2773 ext/zlib/zlib.c     gzfile_write(gz, RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING          2774 ext/zlib/zlib.c     return INT2FIX(RSTRING(str)->len);
RSTRING          2989 ext/zlib/zlib.c 	dst = INT2FIX((unsigned int)(RSTRING(dst)->ptr[0]) & 0xff);
RSTRING          3048 ext/zlib/zlib.c     p = RSTRING(gz->z.buf)->ptr;
RSTRING          3059 ext/zlib/zlib.c 	    p = RSTRING(gz->z.buf)->ptr;
RSTRING          3073 ext/zlib/zlib.c     if (RSTRING(rs)->ptr != rsptr && RSTRING(rs)->len != rslen)
RSTRING          3102 ext/zlib/zlib.c 	if (RSTRING(dst)->len != 0) gz->lineno++;
RSTRING          3106 ext/zlib/zlib.c     if (RSTRING(rs)->len == 0) {
RSTRING          3111 ext/zlib/zlib.c 	rsptr = RSTRING(rs)->ptr;
RSTRING          3112 ext/zlib/zlib.c 	rslen = RSTRING(rs)->len;
RSTRING          3128 ext/zlib/zlib.c     p = RSTRING(gz->z.buf)->ptr;
RSTRING          3134 ext/zlib/zlib.c 	    p = RSTRING(gz->z.buf)->ptr + n - rslen;
RSTRING           775 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          1544 file.c         	rb_sys_fail(RSTRING(fname)->ptr);
RSTRING          1613 file.c         	rb_sys_fail(RSTRING(fname)->ptr);
RSTRING          1660 file.c         	rb_sys_fail(RSTRING(fname)->ptr);
RSTRING          2064 file.c             len = RSTRING(s1)->len + RSTRING(s2)->len + 5;
RSTRING          2066 file.c             snprintf(buf, len, "%s or %s", RSTRING(s1)->ptr, RSTRING(s2)->ptr);
RSTRING          2153 file.c             while ((rv = readlink(RSTRING(path)->ptr, buf, size)) == size
RSTRING          2163 file.c         	rb_sys_fail(RSTRING(path)->ptr);
RSTRING          2439 file.c             buf = RSTRING(result)->ptr;\
RSTRING          2445 file.c             p = buf = RSTRING(result)->ptr,\
RSTRING          2446 file.c             buflen = RSTRING(result)->len,\
RSTRING          2650 file.c             RSTRING(result)->len = p - buf;
RSTRING          2747 file.c             if (RSTRING(fname)->len == 0 || !*(name = RSTRING(fname)->ptr))
RSTRING          2778 file.c         	    if (f == RSTRING(fname)->len) return fname;
RSTRING          2926 file.c         	    len += RSTRING(RARRAY(ary)->ptr[i])->len;
RSTRING          2933 file.c         	len += RSTRING(sep)->len * RARRAY(ary)->len - 1;
RSTRING          2959 file.c         	    if (RSTRING(tmp)->ptr && isdirsep(RSTRING(tmp)->ptr[0])) {
RSTRING          2960 file.c         		RSTRING(result)->len = tail - name;
RSTRING          3019 file.c         	rb_sys_fail(RSTRING(path)->ptr);
RSTRING          3027 file.c         	    rb_sys_fail(RSTRING(path)->ptr);
RSTRING          3031 file.c         	    rb_sys_fail(RSTRING(path)->ptr);
RSTRING          3036 file.c         	    rb_sys_fail(RSTRING(path)->ptr);
RSTRING          3379 file.c         	    rb_sys_fail(RSTRING(argv[1])->ptr);
RSTRING          3465 file.c         	rb_sys_fail(RSTRING(fname)->ptr);
RSTRING          4159 file.c             char *f = RSTRING(*filep)->ptr;
RSTRING          4193 file.c         	if (RSTRING(str)->len == 0) continue;
RSTRING          4194 file.c         	path = RSTRING(str)->ptr;
RSTRING          4254 file.c         	    if (RSTRING(str)->len > 0) {
RSTRING          4259 file.c         	if (RSTRING(tmp)->len == 0) {
RSTRING          4263 file.c         	    lpath = RSTRING(tmp)->ptr;
RSTRING          1205 hash.c             if (RSTRING(str)->len > 1) {
RSTRING          1655 hash.c             nam = RSTRING(name)->ptr;
RSTRING          1656 hash.c             if (strlen(nam) != RSTRING(name)->len) {
RSTRING          1695 hash.c             nam = RSTRING(name)->ptr;
RSTRING          1696 hash.c             if (strlen(nam) != RSTRING(name)->len) {
RSTRING          1732 hash.c             nam = RSTRING(key)->ptr;
RSTRING          1733 hash.c             if (strlen(nam) != RSTRING(key)->len) {
RSTRING          1897 hash.c             name = RSTRING(nm)->ptr;
RSTRING          1898 hash.c             value = RSTRING(val)->ptr;
RSTRING          1899 hash.c             if (strlen(name) != RSTRING(nm)->len)
RSTRING          1901 hash.c             if (strlen(value) != RSTRING(val)->len)
RSTRING          2216 hash.c             if (strlen(s) != RSTRING(key)->len)
RSTRING          2234 hash.c         	    if (RSTRING(value)->len == len && strncmp(s, RSTRING(value)->ptr, len) == 0) {
RSTRING          2258 hash.c         	    if (RSTRING(value)->len == len && strncmp(s, RSTRING(value)->ptr, len) == 0) {
RSTRING          2286 hash.c         	    RARRAY(indexes)->ptr[i] = env_str_new2(getenv(RSTRING(tmp)->ptr));
RSTRING          2329 hash.c         	    VALUE val = env_str_new2(getenv(RSTRING(key)->ptr));
RSTRING           439 io.c               len = RSTRING(str)->len;
RSTRING           455 io.c           	r = write(fileno(f), RSTRING(str)->ptr+offset, l);
RSTRING           465 io.c           	    if (offset < RSTRING(str)->len)
RSTRING           472 io.c           	if (fputc(RSTRING(str)->ptr[offset++], f) == EOF) {
RSTRING           478 io.c               while (errno = 0, offset += (r = fwrite(RSTRING(str)->ptr+offset, 1, n, f)), (n -= r) > 0) {
RSTRING           498 io.c           		if (offset < RSTRING(str)->len)
RSTRING           556 io.c               if (RSTRING(str)->len == 0) return INT2FIX(0);
RSTRING          1152 io.c           	n = io_fread(RSTRING(str)->ptr+bytes, siz-bytes, fptr);
RSTRING          1201 io.c               if (RSTRING(str)->len != len) {
RSTRING          1205 io.c               n = read_buffered_data(RSTRING(str)->ptr, len, fptr->f);
RSTRING          1208 io.c                   if (RSTRING(str)->len != len) goto modified;
RSTRING          1210 io.c                   n = read(fileno(fptr->f), RSTRING(str)->ptr, len);
RSTRING          1350 io.c               if (RSTRING(str)->len != len) {
RSTRING          1353 io.c               n = io_fread(RSTRING(str)->ptr, len, fptr);
RSTRING          1364 io.c               RSTRING(str)->len = n;
RSTRING          1365 io.c               RSTRING(str)->ptr[n] = '\0';
RSTRING          1396 io.c           		last = RSTRING(str)->len;
RSTRING          1401 io.c           		RSTRING(str)->len = len;
RSTRING          1402 io.c           		RSTRING(str)->ptr[len] = '\0';
RSTRING          1405 io.c           		RSTRING(str)->ptr[last++] = c;
RSTRING          1407 io.c           	    fread(RSTRING(str)->ptr + last, 1, pending, f); /* must not fail */
RSTRING          1417 io.c           		RSTRING(str)->ptr[RSTRING(str)->len++] = c;
RSTRING          1452 io.c           		    return (int)RSTRING(str)->ptr[RSTRING(str)->len-1];
RSTRING          1540 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          1585 io.c           	       (c != newline || RSTRING(str)->len < rslen ||
RSTRING          1587 io.c           		memcmp(RSTRING(str)->ptr+RSTRING(str)->len-rslen,rsptr,rslen)));
RSTRING          2355 io.c               n = write(fileno(f), RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING          2411 io.c               if (RSTRING(str)->len != ilen) {
RSTRING          2415 io.c               n = read(fileno(fptr->f), RSTRING(str)->ptr, ilen);
RSTRING          2426 io.c               RSTRING(str)->len = n;
RSTRING          2427 io.c               RSTRING(str)->ptr[n] = '\0';
RSTRING          3130 io.c           	    flags = rb_io_mode_modenum(RSTRING(vmode)->ptr);
RSTRING          3134 io.c           	rb_file_sysopen_internal(io, RSTRING(fname)->ptr, flags, fmode);
RSTRING          3138 io.c           	rb_file_open_internal(io, RSTRING(fname)->ptr, mode);
RSTRING          3198 io.c           	flags = rb_io_mode_modenum(RSTRING(vmode)->ptr);
RSTRING          3203 io.c               path = ALLOCA_N(char, strlen(RSTRING(fname)->ptr)+1);
RSTRING          3204 io.c               strcpy(path, RSTRING(fname)->ptr);
RSTRING          3300 io.c           	    VALUE tmp = rb_str_new(str+1, RSTRING(argv[0])->len-1);
RSTRING          3499 io.c               fptr->path = strdup(RSTRING(fname)->ptr);
RSTRING          3510 io.c               if (freopen(RSTRING(fname)->ptr, mode, fptr->f) == 0) {
RSTRING          3515 io.c           	rb_warn("setvbuf() can't be honoured for %s", RSTRING(fname)->ptr);
RSTRING          3519 io.c           	if (freopen(RSTRING(fname)->ptr, "w", fptr->f2) == 0) {
RSTRING          3831 io.c           	if (RSTRING(line)->len == 0 ||
RSTRING          3832 io.c                       RSTRING(line)->ptr[RSTRING(line)->len-1] != '\n') {
RSTRING          4068 io.c           	    flags = rb_io_mode_modenum(RSTRING(mode)->ptr);
RSTRING          4265 io.c           			(void)unlink(RSTRING(str)->ptr);
RSTRING          4266 io.c           			(void)rename(fn, RSTRING(str)->ptr);
RSTRING          4267 io.c           			fr = rb_fopen(RSTRING(str)->ptr, "r");
RSTRING          4269 io.c           			if (rename(fn, RSTRING(str)->ptr) < 0) {
RSTRING          4271 io.c           				    fn, RSTRING(str)->ptr, strerror(errno));
RSTRING          4753 io.c           	    if (len <= RSTRING(arg)->len) {
RSTRING          4754 io.c           		len = RSTRING(arg)->len;
RSTRING          4756 io.c           	    if (RSTRING(arg)->len < len) {
RSTRING          4759 io.c           	    RSTRING(arg)->ptr[len] = 17;	/* a little sanity check here */
RSTRING          4760 io.c           	    narg = (long)RSTRING(arg)->ptr;
RSTRING          4766 io.c               if (TYPE(arg) == T_STRING && RSTRING(arg)->ptr[len] != 17) {
RSTRING          4895 io.c           	    arg[i] = (unsigned long)RSTRING(v)->ptr;
RSTRING          5103 io.c               arg.io = rb_io_open(RSTRING(fname)->ptr, "r");
RSTRING          5142 io.c               arg.io = rb_io_open(RSTRING(fname)->ptr, "r");
RSTRING          5180 io.c               arg.io = rb_io_open(RSTRING(fname)->ptr, "r");
RSTRING          5301 io.c           	if (RSTRING(str)->len < len) {
RSTRING          5302 io.c           	    len -= RSTRING(str)->len;
RSTRING          5456 io.c               ruby_inplace_mode = strdup(RSTRING(val)->ptr);
RSTRING           106 marshal.c          char *n = RSTRING(path)->ptr;
RSTRING           129 marshal.c          if (arg->dest && RSTRING(buf)->len >= BUFSIZ) {
RSTRING           403 marshal.c          path = RSTRING(class2path(rb_class_real(klass)))->ptr;
RSTRING           418 marshal.c      	w_unique(RSTRING(class2path(klass))->ptr, arg);
RSTRING           524 marshal.c      	    w_bytes(RSTRING(v)->ptr, RSTRING(v)->len, arg);
RSTRING           539 marshal.c      		w_bytes(RSTRING(path)->ptr, RSTRING(path)->len, arg);
RSTRING           547 marshal.c      		w_bytes(RSTRING(path)->ptr, RSTRING(path)->len, arg);
RSTRING           586 marshal.c      	    w_bytes(RSTRING(obj)->ptr, RSTRING(obj)->len, arg);
RSTRING           799 marshal.c      	if (RSTRING(arg->src)->len > arg->offset) {
RSTRING           800 marshal.c      	    c = (unsigned char)RSTRING(arg->src)->ptr[arg->offset++];
RSTRING           876 marshal.c      	if (RSTRING(arg->src)->len > arg->offset) {
RSTRING           877 marshal.c      	    str = rb_str_new(RSTRING(arg->src)->ptr+arg->offset, len);
RSTRING           891 marshal.c      	if (RSTRING(str)->len != len) goto too_short;
RSTRING           916 marshal.c          id = rb_intern(RSTRING(r_bytes(arg))->ptr);
RSTRING          1085 marshal.c      	    const char *ptr = RSTRING(str)->ptr;
RSTRING          1099 marshal.c      		d = load_mantissa(d, e, RSTRING(str)->len - (e - ptr));
RSTRING          1123 marshal.c      	    MEMCPY(digits, RSTRING(data)->ptr, char, len * 2);
RSTRING          1159 marshal.c      	    v = r_entry(rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len, options), arg);
RSTRING          1312 marshal.c      	    v = rb_path2class(RSTRING(str)->ptr);
RSTRING          1321 marshal.c      	    v = path2class(RSTRING(str)->ptr);
RSTRING          1330 marshal.c      	    v = path2module(RSTRING(str)->ptr);
RSTRING           123 numeric.c      	     RSTRING(v)->ptr:
RSTRING           363 object.c           snprintf(RSTRING(str)->ptr, len+1, "#<%s:0x%lx>", cname, obj);
RSTRING           364 object.c           RSTRING(str)->len = strlen(RSTRING(str)->ptr);
RSTRING           389 object.c           if (RSTRING(str)->ptr[0] == '-') { /* first element */
RSTRING           390 object.c       	RSTRING(str)->ptr[0] = '#';
RSTRING           412 object.c           RSTRING(str)->ptr[0] = '#';
RSTRING           446 object.c       	    snprintf(RSTRING(str)->ptr, len, "#<%s:0x%lx ...>", c, obj);
RSTRING           447 object.c       	    RSTRING(str)->len = strlen(RSTRING(str)->ptr);
RSTRING           452 object.c       	snprintf(RSTRING(str)->ptr, len, "-<%s:0x%lx", c, obj);
RSTRING           453 object.c       	RSTRING(str)->len = strlen(RSTRING(str)->ptr);
RSTRING           870 object.c       		 RSTRING(rb_inspect(y))->ptr,
RSTRING          1175 object.c           RSTRING(str)->ptr[0] = ':';
RSTRING          1176 object.c           strcpy(RSTRING(str)->ptr+1, name);
RSTRING          1179 object.c       	strncpy(RSTRING(str)->ptr, ":\"", 2);
RSTRING          1649 object.c           if (!RSTRING(str)->ptr || RSTRING(str)->len == 0) {
RSTRING          1652 object.c           if (RSTRING(str)->len != strlen(RSTRING(str)->ptr)) {
RSTRING          1655 object.c           return rb_intern(RSTRING(str)->ptr);
RSTRING          1683 object.c       	rb_raise(rb_eTypeError, "%s is not a symbol", RSTRING(rb_inspect(name))->ptr);
RSTRING          2326 object.c           s = RSTRING(str)->ptr;
RSTRING          2327 object.c           len = RSTRING(str)->len;
RSTRING          2423 object.c           if (len) *len = RSTRING(str)->len;
RSTRING          2424 object.c           else if (RTEST(ruby_verbose) && RSTRING(str)->len != strlen(RSTRING(str)->ptr)) {
RSTRING          2427 object.c           return RSTRING(str)->ptr;
RSTRING           456 pack.c             p = RSTRING(fmt)->ptr;
RSTRING           457 pack.c             pend = p + RSTRING(fmt)->len;
RSTRING           467 pack.c         	if (RSTRING(fmt)->ptr + RSTRING(fmt)->len != pend) {
RSTRING           517 pack.c         		ptr = RSTRING(from)->ptr;
RSTRING           518 pack.c         		plen = RSTRING(from)->len;
RSTRING           850 pack.c         	    plen = RSTRING(res)->len;
RSTRING           853 pack.c         	    RSTRING(res)->len = plen - len;
RSTRING           854 pack.c         	    RSTRING(res)->ptr[plen - len] = '\0';
RSTRING           858 pack.c         	    len -= RSTRING(res)->len;
RSTRING           889 pack.c         	    ptr = RSTRING(from)->ptr;
RSTRING           890 pack.c         	    plen = RSTRING(from)->len;
RSTRING           920 pack.c         		if (RSTRING(from)->len < len) {
RSTRING           922 pack.c         			     RSTRING(from)->len, len);
RSTRING           976 pack.c         		if (RSTRING(buf)->len) {
RSTRING           977 pack.c         		    bufs = RSTRING(buf)->ptr;
RSTRING           978 pack.c         		    bufe = bufs + RSTRING(buf)->len - 1;
RSTRING           985 pack.c         		    rb_str_buf_cat(res, RSTRING(buf)->ptr, RSTRING(buf)->len);
RSTRING          1062 pack.c             unsigned char *s = (unsigned char*)RSTRING(from)->ptr;
RSTRING          1063 pack.c             unsigned char *send = s + RSTRING(from)->len;
RSTRING          1318 pack.c             s = RSTRING(str)->ptr;
RSTRING          1319 pack.c             send = s + RSTRING(str)->len;
RSTRING          1320 pack.c             p = RSTRING(fmt)->ptr;
RSTRING          1321 pack.c             pend = p + RSTRING(fmt)->len;
RSTRING          1415 pack.c         		t = RSTRING(bitstr)->ptr;
RSTRING          1435 pack.c         		t = RSTRING(bitstr)->ptr;
RSTRING          1455 pack.c         		t = RSTRING(bitstr)->ptr;
RSTRING          1477 pack.c         		t = RSTRING(bitstr)->ptr;
RSTRING          1731 pack.c         		char *ptr = RSTRING(buf)->ptr;
RSTRING          1741 pack.c         		    if (total > RSTRING(buf)->len) {
RSTRING          1742 pack.c         			len -= total - RSTRING(buf)->len;
RSTRING          1743 pack.c         			total = RSTRING(buf)->len;
RSTRING          1778 pack.c         		RSTRING(buf)->ptr[total] = '\0';
RSTRING          1779 pack.c         		RSTRING(buf)->len = total;
RSTRING          1787 pack.c         		char *ptr = RSTRING(buf)->ptr;
RSTRING          1823 pack.c         		RSTRING(buf)->len = ptr - RSTRING(buf)->ptr;
RSTRING          1831 pack.c         		char *ptr = RSTRING(buf)->ptr;
RSTRING          1850 pack.c         		RSTRING(buf)->len = ptr - RSTRING(buf)->ptr;
RSTRING          1856 pack.c         	    if (len > RSTRING(str)->len)
RSTRING          1858 pack.c         	    s = RSTRING(str)->ptr + len;
RSTRING          1862 pack.c         	    if (len > s - RSTRING(str)->ptr)
RSTRING          1890 pack.c         			if (TYPE(*p) == T_STRING && RSTRING(*p)->ptr == t) {
RSTRING          1891 pack.c         			    if (len > RSTRING(*p)->len) {
RSTRING          1892 pack.c         				len = RSTRING(*p)->len;
RSTRING          1932 pack.c         			    if (TYPE(*p) == T_STRING && RSTRING(*p)->ptr == t) {
RSTRING          5739 parse.c        				node->nd_lit = rb_reg_new(RSTRING(src)->ptr,
RSTRING          5740 parse.c        							  RSTRING(src)->len,
RSTRING          5910 parse.c        				if (RSTRING(lit)->len == 0) {
RSTRING          5914 parse.c        				if (strlen(RSTRING(lit)->ptr) == RSTRING(lit)->len) {
RSTRING          5915 parse.c        				    yyval.node->nd_lit = ID2SYM(rb_intern(RSTRING(yyval.node->nd_lit)->ptr));
RSTRING          6632 parse.c            beg = RSTRING(s)->ptr;
RSTRING          6634 parse.c        	if (RSTRING(s)->len == lex_gets_ptr) return Qnil;
RSTRING          6637 parse.c            pend = RSTRING(s)->ptr + RSTRING(s)->len;
RSTRING          6642 parse.c            lex_gets_ptr = end - RSTRING(s)->ptr;
RSTRING          6709 parse.c        	    lex_pbeg = lex_p = RSTRING(v)->ptr;
RSTRING          6710 parse.c        	    lex_pend = lex_p + RSTRING(v)->len;
RSTRING          7024 parse.c            xfree(RSTRING(str)->ptr);
RSTRING          7227 parse.c            lex_pbeg = RSTRING(line)->ptr;
RSTRING          7228 parse.c            lex_pend = lex_pbeg + RSTRING(line)->len;
RSTRING          7262 parse.c            eos = RSTRING(here->nd_lit)->ptr;
RSTRING          7263 parse.c            len = RSTRING(here->nd_lit)->len - 1;
RSTRING          7280 parse.c        	    p = RSTRING(lex_lastline)->ptr;
RSTRING          1999 parse.y        				node->nd_lit = rb_reg_new(RSTRING(src)->ptr,
RSTRING          2000 parse.y        							  RSTRING(src)->len,
RSTRING          2154 parse.y        				if (RSTRING(lit)->len == 0) {
RSTRING          2158 parse.y        				if (strlen(RSTRING(lit)->ptr) == RSTRING(lit)->len) {
RSTRING          2159 parse.y        				    $$->nd_lit = ID2SYM(rb_intern(RSTRING($$->nd_lit)->ptr));
RSTRING          2634 parse.y            beg = RSTRING(s)->ptr;
RSTRING          2636 parse.y        	if (RSTRING(s)->len == lex_gets_ptr) return Qnil;
RSTRING          2639 parse.y            pend = RSTRING(s)->ptr + RSTRING(s)->len;
RSTRING          2644 parse.y            lex_gets_ptr = end - RSTRING(s)->ptr;
RSTRING          2711 parse.y        	    lex_pbeg = lex_p = RSTRING(v)->ptr;
RSTRING          2712 parse.y        	    lex_pend = lex_p + RSTRING(v)->len;
RSTRING          3026 parse.y            xfree(RSTRING(str)->ptr);
RSTRING          3229 parse.y            lex_pbeg = RSTRING(line)->ptr;
RSTRING          3230 parse.y            lex_pend = lex_pbeg + RSTRING(line)->len;
RSTRING          3264 parse.y            eos = RSTRING(here->nd_lit)->ptr;
RSTRING          3265 parse.y            len = RSTRING(here->nd_lit)->len - 1;
RSTRING          3282 parse.y        	    p = RSTRING(lex_lastline)->ptr;
RSTRING          1000 process.c      	prog = RSTRING(progv)->ptr;
RSTRING          1005 process.c      	args[i] = RSTRING(argv[i])->ptr;
RSTRING          1139 process.c      	args[i] = RSTRING(argv[i])->ptr;
RSTRING          1145 process.c      	return proc_spawn_v(args, prog ? RSTRING(prog)->ptr : 0);
RSTRING          1160 process.c          str = s = RSTRING(sv)->ptr;
RSTRING          1233 process.c      	rb_proc_exec(RSTRING(cmd)->ptr);
RSTRING          1238 process.c          rb_sys_fail(RSTRING(argv[0])->ptr);
RSTRING          1438 process.c          status = do_spawn(RSTRING(cmd)->ptr);
RSTRING          1461 process.c      	status = do_spawn(P_WAIT, RSTRING(argv[0])->ptr);
RSTRING          1489 process.c          status = system(RSTRING(cmd)->ptr);
RSTRING          1521 process.c      	    rb_proc_exec(RSTRING(argv[0])->ptr);
RSTRING          2487 process.c      		gr = getgrnam(RSTRING(tmp)->ptr);
RSTRING          2490 process.c      			     "can't find group for %s", RSTRING(tmp)->ptr);
RSTRING           530 re.c           	rb_compile_error("%s: %s", err, RSTRING(desc)->ptr);
RSTRING           532 re.c           	rb_raise(rb_eRegexpError, "%s: %s", err, RSTRING(desc)->ptr);
RSTRING           879 re.c           	range = RSTRING(str)->len - pos;
RSTRING           882 re.c           			      RSTRING(str)->ptr, RSTRING(str)->len,
RSTRING           896 re.c               if (pos > RSTRING(str)->len || pos < 0) {
RSTRING           913 re.c           	range = RSTRING(str)->len - pos;
RSTRING           915 re.c               result = re_search(RREGEXP(re)->ptr,RSTRING(str)->ptr,RSTRING(str)->len,
RSTRING          1048 re.c               str = rb_str_substr(str, pos, RSTRING(str)->len - pos);
RSTRING          1412 re.c               if (reg_cache && RREGEXP(reg_cache)->len == RSTRING(str)->len
RSTRING          1415 re.c           	&& memcmp(RREGEXP(reg_cache)->str, RSTRING(str)->ptr, RSTRING(str)->len) == 0)
RSTRING          1420 re.c               return reg_cache = rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len,
RSTRING          1714 re.c           	len = RSTRING(argv[0])->len;
RSTRING          1728 re.c               s = RSTRING(str)->ptr;
RSTRING          1729 re.c               send = s + RSTRING(str)->len;
RSTRING          1753 re.c               tmp = rb_str_new(0, RSTRING(str)->len*2);
RSTRING          1754 re.c               t = RSTRING(tmp)->ptr;
RSTRING          1756 re.c               memcpy(t, RSTRING(str)->ptr, s - RSTRING(str)->ptr);
RSTRING          1757 re.c               t += s - RSTRING(str)->ptr;
RSTRING          1800 re.c               rb_str_resize(tmp, t - RSTRING(tmp)->ptr);
RSTRING          1945 re.c                                       RSTRING(str1)->ptr, RSTRING(str2)->ptr);
RSTRING          2005 re.c               p = s = RSTRING(str)->ptr;
RSTRING          2006 re.c               e = s + RSTRING(str)->len;
RSTRING          2038 re.c           	    rb_str_buf_cat(val, RSTRING(src)->ptr, BEG(0));
RSTRING          2042 re.c           	    rb_str_buf_cat(val, RSTRING(src)->ptr+END(0), RSTRING(src)->len-END(0));
RSTRING          2063 re.c           	    rb_str_buf_cat(val, RSTRING(src)->ptr+BEG(no), END(no)-BEG(no));
RSTRING           874 ruby.c         		if (RSTRING(line)->len > 2
RSTRING           875 ruby.c         		    && RSTRING(line)->ptr[0] == '#'
RSTRING           876 ruby.c         		    && RSTRING(line)->ptr[1] == '!') {
RSTRING           877 ruby.c         		    if ((p = strstr(RSTRING(line)->ptr, "ruby")) != 0) {
RSTRING           891 ruby.c         	    if (RSTRING(line)->len > 2 && RSTRING(line)->ptr[0] == '!') {
RSTRING           892 ruby.c         		if ((p = strstr(RSTRING(line)->ptr, "ruby")) == 0) {
RSTRING           896 ruby.c         		    char *pend = RSTRING(line)->ptr + RSTRING(line)->len;
RSTRING           898 ruby.c         		    p = RSTRING(line)->ptr + 1;	/* skip `#!' */
RSTRING           926 ruby.c         		RSTRING(line)->ptr[RSTRING(line)->len-1] = '\0';
RSTRING           927 ruby.c         		if (RSTRING(line)->ptr[RSTRING(line)->len-2] == '\r')
RSTRING           928 ruby.c         		    RSTRING(line)->ptr[RSTRING(line)->len-2] = '\0';
RSTRING          1014 ruby.c             s = RSTRING(val)->ptr;
RSTRING          1015 ruby.c             i = RSTRING(val)->len;
RSTRING          1021 ruby.c         	RSTRING(val)->len = i;
RSTRING           285 ruby.h         #define NUM2CHR(x) (((TYPE(x) == T_STRING)&&(RSTRING(x)->len>=1))?\
RSTRING           286 ruby.h                              RSTRING(x)->ptr[0]:(char)(NUM2INT(x)&0xff))
RSTRING           250 signal.c       	s = RSTRING(argv[0])->ptr;
RSTRING           271 signal.c       		s = RSTRING(str)->ptr;
RSTRING           531 signal.c       	if (RSTRING(command)->len == 0) {
RSTRING           534 signal.c       	else if (RSTRING(command)->len == 7) {
RSTRING           535 signal.c       	    if (strncmp(RSTRING(command)->ptr, "SIG_IGN", 7) == 0) {
RSTRING           538 signal.c       	    else if (strncmp(RSTRING(command)->ptr, "SIG_DFL", 7) == 0) {
RSTRING           541 signal.c       	    else if (strncmp(RSTRING(command)->ptr, "DEFAULT", 7) == 0) {
RSTRING           545 signal.c       	else if (RSTRING(command)->len == 6) {
RSTRING           546 signal.c       	    if (strncmp(RSTRING(command)->ptr, "IGNORE", 6) == 0) {
RSTRING           550 signal.c       	else if (RSTRING(command)->len == 4) {
RSTRING           551 signal.c       	    if (strncmp(RSTRING(command)->ptr, "EXIT", 4) == 0) {
RSTRING           571 signal.c       	s = RSTRING(arg->sig)->ptr;
RSTRING            90 sprintf.c          buf = RSTRING(result)->ptr;\
RSTRING           257 sprintf.c          p = RSTRING(fmt)->ptr;
RSTRING           258 sprintf.c          end = p + RSTRING(fmt)->len;
RSTRING           262 sprintf.c          buf = RSTRING(result)->ptr;
RSTRING           410 sprintf.c      		len = RSTRING(str)->len;
RSTRING           425 sprintf.c      			memcpy(&buf[blen], RSTRING(str)->ptr, len);
RSTRING           435 sprintf.c      		PUSH(RSTRING(str)->ptr, len);
RSTRING           586 sprintf.c      		    s = RSTRING(tmp)->ptr;
RSTRING           607 sprintf.c      		s = RSTRING(tmp)->ptr;
RSTRING           616 sprintf.c      			t = RSTRING(tmp)->ptr;
RSTRING           633 sprintf.c      		s = RSTRING(tmp)->ptr;
RSTRING            35 string.c           REALLOC_N(RSTRING(str)->ptr, char, (capacity)+1);\
RSTRING            37 string.c               RSTRING(str)->aux.capa = (capacity);\
RSTRING            48 string.c           if (RSTRING(s)->ptr != p || RSTRING(s)->len != len) {
RSTRING            90 string.c           RSTRING(str)->len = len;
RSTRING            91 string.c           RSTRING(str)->aux.capa = len;
RSTRING            92 string.c           RSTRING(str)->ptr = ALLOC_N(char,len+1);
RSTRING            94 string.c       	memcpy(RSTRING(str)->ptr, ptr, len);
RSTRING            96 string.c           RSTRING(str)->ptr[len] = '\0';
RSTRING           145 string.c           RSTRING(str2)->len = RSTRING(str)->len;
RSTRING           146 string.c           RSTRING(str2)->ptr = RSTRING(str)->ptr;
RSTRING           147 string.c           RSTRING(str2)->aux.shared = str;
RSTRING           167 string.c           RSTRING(str2)->len = RSTRING(str)->len;
RSTRING           168 string.c           RSTRING(str2)->ptr = RSTRING(str)->ptr;
RSTRING           171 string.c       	RSTRING(str2)->aux.shared = RSTRING(str)->aux.shared;
RSTRING           175 string.c       	RSTRING(str)->aux.shared = str2;
RSTRING           189 string.c           if (FL_TEST(orig, ELTS_SHARED) && (str = RSTRING(orig)->aux.shared) && klass == RBASIC(str)->klass) {
RSTRING           191 string.c       	ofs = RSTRING(str)->len - RSTRING(orig)->len;
RSTRING           194 string.c       	    RSTRING(str)->ptr += ofs;
RSTRING           195 string.c       	    RSTRING(str)->len -= ofs;
RSTRING           199 string.c       	str = str_new(klass, RSTRING(orig)->ptr, RSTRING(orig)->len);
RSTRING           229 string.c           RSTRING(str)->ptr = 0;
RSTRING           230 string.c           RSTRING(str)->len = 0;
RSTRING           231 string.c           RSTRING(str)->aux.capa = capa;
RSTRING           232 string.c           RSTRING(str)->ptr = ALLOC_N(char, capa+1);
RSTRING           233 string.c           RSTRING(str)->ptr[0] = '\0';
RSTRING           264 string.c           if (!FL_TEST(str, ELTS_SHARED)) free(RSTRING(str)->ptr);
RSTRING           266 string.c       	RSTRING(str)->ptr = 0;
RSTRING           267 string.c       	RSTRING(str)->len = 0;
RSTRING           268 string.c       	RSTRING(str)->aux.capa = 0;
RSTRING           272 string.c           RSTRING(str)->ptr = RSTRING(str2)->ptr;
RSTRING           273 string.c           RSTRING(str)->len = RSTRING(str2)->len;
RSTRING           277 string.c       	RSTRING(str)->aux.shared = RSTRING(str2)->aux.shared;
RSTRING           280 string.c       	RSTRING(str)->aux.capa = RSTRING(str2)->aux.capa;
RSTRING           282 string.c           RSTRING(str2)->ptr = 0;	/* abandon str2 */
RSTRING           283 string.c           RSTRING(str2)->len = 0;
RSTRING           284 string.c           RSTRING(str2)->aux.capa = 0;
RSTRING           350 string.c           return LONG2NUM(RSTRING(str)->len);
RSTRING           367 string.c           if (RSTRING(str)->len == 0)
RSTRING           389 string.c           str3 = rb_str_new(0, RSTRING(str1)->len+RSTRING(str2)->len);
RSTRING           390 string.c           memcpy(RSTRING(str3)->ptr, RSTRING(str1)->ptr, RSTRING(str1)->len);
RSTRING           391 string.c           memcpy(RSTRING(str3)->ptr + RSTRING(str1)->len,
RSTRING           392 string.c       	   RSTRING(str2)->ptr, RSTRING(str2)->len);
RSTRING           393 string.c           RSTRING(str3)->ptr[RSTRING(str3)->len] = '\0';
RSTRING           422 string.c           if (len && LONG_MAX/len <  RSTRING(str)->len) {
RSTRING           426 string.c           str2 = rb_str_new5(str,0, len *= RSTRING(str)->len);
RSTRING           427 string.c           for (i = 0; i < len; i += RSTRING(str)->len) {
RSTRING           428 string.c       	memcpy(RSTRING(str2)->ptr + i,
RSTRING           429 string.c       	       RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING           431 string.c           RSTRING(str2)->ptr[RSTRING(str2)->len] = '\0';
RSTRING           491 string.c           ptr = ALLOC_N(char, RSTRING(str)->len+1);
RSTRING           492 string.c           if (RSTRING(str)->ptr) {
RSTRING           493 string.c       	memcpy(ptr, RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING           495 string.c           ptr[RSTRING(str)->len] = 0;
RSTRING           496 string.c           RSTRING(str)->ptr = ptr;
RSTRING           497 string.c           RSTRING(str)->aux.capa = RSTRING(str)->len;
RSTRING           515 string.c       	rb_ary_concat(RSTRING(str)->aux.shared, add);
RSTRING           521 string.c       	else if (RSTRING(str)->aux.capa != RSTRING(str)->len) {
RSTRING           522 string.c       	    RESIZE_CAPA(str, RSTRING(str)->len);
RSTRING           524 string.c       	RSTRING(str)->aux.shared = add;
RSTRING           534 string.c       	return RSTRING(str)->aux.shared;
RSTRING           550 string.c           if (!RSTRING(s)->ptr) {
RSTRING           552 string.c       	RSTRING(s)->ptr = null_str;
RSTRING           561 string.c           return RSTRING(rb_string_value(ptr))->ptr;
RSTRING           569 string.c           char *s = RSTRING(str)->ptr;
RSTRING           571 string.c           if (!s || RSTRING(str)->len != strlen(s)) {
RSTRING           582 string.c           if (!NIL_P(str) && !RSTRING(str)->ptr) {
RSTRING           584 string.c       	RSTRING(str)->ptr = null_str;
RSTRING           597 string.c           if (beg > RSTRING(str)->len) return Qnil;
RSTRING           599 string.c       	beg += RSTRING(str)->len;
RSTRING           602 string.c           if (beg + len > RSTRING(str)->len) {
RSTRING           603 string.c       	len = RSTRING(str)->len - beg;
RSTRING           612 string.c       	beg + len == RSTRING(str)->len && !FL_TEST(str, STR_ASSOC)) {
RSTRING           614 string.c       	RSTRING(str2)->ptr += RSTRING(str2)->len - len;
RSTRING           615 string.c       	RSTRING(str2)->len = len;
RSTRING           618 string.c       	str2 = rb_str_new5(str, RSTRING(str)->ptr+beg, len);
RSTRING           636 string.c           if (FL_TEST(str, ELTS_SHARED) && RSTRING(str)->aux.shared) {
RSTRING           637 string.c       	VALUE shared = RSTRING(str)->aux.shared;
RSTRING           638 string.c       	if (RSTRING(shared)->len == RSTRING(str)->len) {
RSTRING           681 string.c           if (len != RSTRING(str)->len) {
RSTRING           682 string.c       	if (RSTRING(str)->len < len || RSTRING(str)->len - len > 1024) {
RSTRING           683 string.c       	    REALLOC_N(RSTRING(str)->ptr, char, len+1);
RSTRING           685 string.c       		RSTRING(str)->aux.capa = len;
RSTRING           688 string.c       	RSTRING(str)->len = len;
RSTRING           689 string.c       	RSTRING(str)->ptr[len] = '\0';	/* sentinel */
RSTRING           709 string.c       	capa = RSTRING(str)->aux.capa = RSTRING(str)->len;
RSTRING           712 string.c       	capa = RSTRING(str)->aux.capa;
RSTRING           714 string.c           total = RSTRING(str)->len+len;
RSTRING           721 string.c           memcpy(RSTRING(str)->ptr + RSTRING(str)->len, ptr, len);
RSTRING           722 string.c           RSTRING(str)->len = total;
RSTRING           723 string.c           RSTRING(str)->ptr[total] = '\0'; /* sentinel */
RSTRING           747 string.c       	REALLOC_N(RSTRING(str)->ptr, char, RSTRING(str)->len+len);
RSTRING           748 string.c       	memcpy(RSTRING(str)->ptr + RSTRING(str)->len, ptr, len);
RSTRING           749 string.c       	RSTRING(str)->len += len;
RSTRING           750 string.c       	RSTRING(str)->ptr[RSTRING(str)->len] = '\0'; /* sentinel */
RSTRING           774 string.c       	capa = RSTRING(str)->aux.capa = RSTRING(str)->len;
RSTRING           777 string.c       	capa = RSTRING(str)->aux.capa;
RSTRING           779 string.c           len = RSTRING(str)->len+RSTRING(str2)->len;
RSTRING           786 string.c           memcpy(RSTRING(str)->ptr + RSTRING(str)->len,
RSTRING           787 string.c       	   RSTRING(str2)->ptr, RSTRING(str2)->len);
RSTRING           788 string.c           RSTRING(str)->len += RSTRING(str2)->len;
RSTRING           789 string.c           RSTRING(str)->ptr[RSTRING(str)->len] = '\0'; /* sentinel */
RSTRING           801 string.c           if (RSTRING(str2)->len > 0) {
RSTRING           803 string.c       	    long len = RSTRING(str)->len+RSTRING(str2)->len;
RSTRING           804 string.c       	    REALLOC_N(RSTRING(str)->ptr, char, len+1);
RSTRING           805 string.c       	    memcpy(RSTRING(str)->ptr + RSTRING(str)->len,
RSTRING           806 string.c       		   RSTRING(str2)->ptr, RSTRING(str2)->len);
RSTRING           807 string.c       	    RSTRING(str)->ptr[len] = '\0'; /* sentinel */
RSTRING           808 string.c       	    RSTRING(str)->len = len;
RSTRING           855 string.c           register long len = RSTRING(str)->len;
RSTRING           856 string.c           register char *p = RSTRING(str)->ptr;
RSTRING           911 string.c           len = lesser(RSTRING(str1)->len, RSTRING(str2)->len);
RSTRING           912 string.c           retval = rb_memcmp(RSTRING(str1)->ptr, RSTRING(str2)->ptr, len);
RSTRING           914 string.c       	if (RSTRING(str1)->len == RSTRING(str2)->len) return 0;
RSTRING           915 string.c       	if (RSTRING(str1)->len > RSTRING(str2)->len) return 1;
RSTRING           943 string.c           if (RSTRING(str1)->len == RSTRING(str2)->len &&
RSTRING           963 string.c           if (TYPE(str2) != T_STRING || RSTRING(str1)->len != RSTRING(str2)->len)
RSTRING           966 string.c           if (memcmp(RSTRING(str1)->ptr, RSTRING(str2)->ptr,
RSTRING           967 string.c       	       lesser(RSTRING(str1)->len, RSTRING(str2)->len)) == 0)
RSTRING          1047 string.c           len = lesser(RSTRING(str1)->len, RSTRING(str2)->len);
RSTRING          1048 string.c           retval = rb_memcicmp(RSTRING(str1)->ptr, RSTRING(str2)->ptr, len);
RSTRING          1050 string.c       	if (RSTRING(str1)->len == RSTRING(str2)->len) return INT2FIX(0);
RSTRING          1051 string.c       	if (RSTRING(str1)->len > RSTRING(str2)->len) return INT2FIX(1);
RSTRING          1067 string.c       	offset += RSTRING(str)->len;
RSTRING          1070 string.c           if (RSTRING(str)->len - offset < RSTRING(sub)->len) return -1;
RSTRING          1071 string.c           if (RSTRING(sub)->len == 0) return offset;
RSTRING          1072 string.c           pos = rb_memsearch(RSTRING(sub)->ptr, RSTRING(sub)->len,
RSTRING          1073 string.c       		       RSTRING(str)->ptr+offset, RSTRING(str)->len-offset);
RSTRING          1114 string.c       	pos += RSTRING(str)->len;
RSTRING          1132 string.c       	  long len = RSTRING(str)->len;
RSTRING          1133 string.c       	  unsigned char *p = RSTRING(str)->ptr;
RSTRING          1166 string.c           long len = RSTRING(sub)->len;
RSTRING          1170 string.c           if (RSTRING(str)->len < len) return -1;
RSTRING          1171 string.c           if (RSTRING(str)->len - pos < len) {
RSTRING          1172 string.c       	pos = RSTRING(str)->len - len;
RSTRING          1174 string.c           sbeg = RSTRING(str)->ptr;
RSTRING          1175 string.c           s = RSTRING(str)->ptr + pos;
RSTRING          1176 string.c           t = RSTRING(sub)->ptr;
RSTRING          1180 string.c       		return s - RSTRING(str)->ptr;
RSTRING          1224 string.c       	    pos += RSTRING(str)->len;
RSTRING          1232 string.c       	if (pos > RSTRING(str)->len) pos = RSTRING(str)->len;
RSTRING          1235 string.c       	pos = RSTRING(str)->len;
RSTRING          1255 string.c       	  unsigned char *p = RSTRING(str)->ptr + pos;
RSTRING          1256 string.c       	  unsigned char *pbeg = RSTRING(str)->ptr;
RSTRING          1258 string.c       	  if (pos == RSTRING(str)->len) {
RSTRING          1263 string.c       	      if (*p == c) return LONG2NUM((char*)p - RSTRING(str)->ptr);
RSTRING          1392 string.c           str = rb_str_new5(orig, RSTRING(orig)->ptr, RSTRING(orig)->len);
RSTRING          1394 string.c           if (RSTRING(str)->len == 0) return str;
RSTRING          1396 string.c           sbeg = RSTRING(str)->ptr; s = sbeg + RSTRING(str)->len - 1;
RSTRING          1406 string.c       	sbeg = RSTRING(str)->ptr; s = sbeg + RSTRING(str)->len - 1;
RSTRING          1414 string.c       	RESIZE_CAPA(str, RSTRING(str)->len + 1);
RSTRING          1415 string.c       	s = RSTRING(str)->ptr + n;
RSTRING          1416 string.c       	memmove(s+1, s, RSTRING(str)->len - n);
RSTRING          1418 string.c       	RSTRING(str)->len += 1;
RSTRING          1419 string.c       	RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
RSTRING          1465 string.c       	if (RSTRING(current)->len > RSTRING(end)->len)
RSTRING          1524 string.c       	    idx = RSTRING(str)->len + idx;
RSTRING          1526 string.c       	if (idx < 0 || RSTRING(str)->len <= idx) {
RSTRING          1529 string.c       	return INT2FIX(RSTRING(str)->ptr[idx] & 0xff);
RSTRING          1545 string.c       	    switch (rb_range_beg_len(indx, &beg, &len, RSTRING(str)->len, 0)) {
RSTRING          1639 string.c           if (RSTRING(str)->len < beg) {
RSTRING          1644 string.c       	if (-beg > RSTRING(str)->len) {
RSTRING          1647 string.c       	beg += RSTRING(str)->len;
RSTRING          1649 string.c           if (RSTRING(str)->len < beg + len) {
RSTRING          1650 string.c       	len = RSTRING(str)->len - beg;
RSTRING          1653 string.c           if (len < RSTRING(val)->len) {
RSTRING          1655 string.c       	RESIZE_CAPA(str, RSTRING(str)->len + RSTRING(val)->len - len + 1);
RSTRING          1658 string.c           if (RSTRING(val)->len != len) {
RSTRING          1659 string.c       	memmove(RSTRING(str)->ptr + beg + RSTRING(val)->len,
RSTRING          1660 string.c       		RSTRING(str)->ptr + beg + len,
RSTRING          1661 string.c       		RSTRING(str)->len - (beg + len));
RSTRING          1663 string.c           if (RSTRING(str)->len < beg && len < 0) {
RSTRING          1664 string.c       	MEMZERO(RSTRING(str)->ptr + RSTRING(str)->len, char, -len);
RSTRING          1666 string.c           if (RSTRING(val)->len > 0) {
RSTRING          1667 string.c       	memmove(RSTRING(str)->ptr+beg, RSTRING(val)->ptr, RSTRING(val)->len);
RSTRING          1669 string.c           RSTRING(str)->len += RSTRING(val)->len - len;
RSTRING          1670 string.c           if (RSTRING(str)->ptr) {
RSTRING          1671 string.c       	RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
RSTRING          1729 string.c       	if (RSTRING(str)->len <= idx) {
RSTRING          1734 string.c       	    if (-idx > RSTRING(str)->len)
RSTRING          1736 string.c       	    idx += RSTRING(str)->len;
RSTRING          1740 string.c       	    if (RSTRING(str)->len == idx) {
RSTRING          1741 string.c       		RSTRING(str)->len += 1;
RSTRING          1742 string.c       		RESIZE_CAPA(str, RSTRING(str)->len);
RSTRING          1744 string.c       	    RSTRING(str)->ptr[idx] = FIX2INT(val) & 0xff;
RSTRING          1760 string.c       	rb_str_splice(str, beg, RSTRING(indx)->len, val);
RSTRING          1767 string.c       	    if (rb_range_beg_len(indx, &beg, &len, RSTRING(str)->len, 2)) {
RSTRING          1847 string.c       	pos = RSTRING(str)->len;
RSTRING          1973 string.c       	    char *p = RSTRING(str)->ptr; long len = RSTRING(str)->len;
RSTRING          1986 string.c       	if (RSTRING(repl)->len > plen) {
RSTRING          1987 string.c       	    RESIZE_CAPA(str, RSTRING(str)->len + RSTRING(repl)->len - plen);
RSTRING          1989 string.c       	if (RSTRING(repl)->len != plen) {
RSTRING          1990 string.c       	    memmove(RSTRING(str)->ptr + BEG(0) + RSTRING(repl)->len,
RSTRING          1991 string.c       		    RSTRING(str)->ptr + BEG(0) + plen,
RSTRING          1992 string.c       		    RSTRING(str)->len - BEG(0) - plen);
RSTRING          1994 string.c       	memcpy(RSTRING(str)->ptr + BEG(0),
RSTRING          1995 string.c       	       RSTRING(repl)->ptr, RSTRING(repl)->len);
RSTRING          1996 string.c       	RSTRING(str)->len += RSTRING(repl)->len - plen;
RSTRING          1997 string.c       	RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
RSTRING          2082 string.c           blen = RSTRING(str)->len + 30; /* len + margin */
RSTRING          2084 string.c           buf = RSTRING(dest)->ptr;
RSTRING          2086 string.c           sp = cp = RSTRING(str)->ptr;
RSTRING          2087 string.c           slen = RSTRING(str)->len;
RSTRING          2108 string.c       	len = (bp - buf) + (beg - offset) + RSTRING(val)->len + 3;
RSTRING          2113 string.c       	    RSTRING(dest)->len = blen;
RSTRING          2114 string.c       	    buf = RSTRING(dest)->ptr;
RSTRING          2120 string.c       	memcpy(bp, RSTRING(val)->ptr, RSTRING(val)->len);
RSTRING          2121 string.c       	bp += RSTRING(val)->len;
RSTRING          2128 string.c       	    if (RSTRING(str)->len <= END(0)) break;
RSTRING          2129 string.c       	    len = mbclen2(RSTRING(str)->ptr[END(0)], pat);
RSTRING          2130 string.c       	    memcpy(bp, RSTRING(str)->ptr+END(0), len);
RSTRING          2134 string.c       	cp = RSTRING(str)->ptr + offset;
RSTRING          2135 string.c       	if (offset > RSTRING(str)->len) break;
RSTRING          2138 string.c           if (RSTRING(str)->len > offset) {
RSTRING          2140 string.c       	if (blen - len < RSTRING(str)->len - offset) {
RSTRING          2141 string.c       	    blen = len + RSTRING(str)->len - offset;
RSTRING          2143 string.c       	    buf = RSTRING(dest)->ptr;
RSTRING          2146 string.c       	memcpy(bp, cp, RSTRING(str)->len - offset);
RSTRING          2147 string.c       	bp += RSTRING(str)->len - offset;
RSTRING          2154 string.c       	    free(RSTRING(str)->ptr);
RSTRING          2157 string.c       	RSTRING(str)->ptr = buf;
RSTRING          2158 string.c       	RSTRING(str)->aux.capa = blen;
RSTRING          2159 string.c       	RSTRING(dest)->ptr = 0;
RSTRING          2160 string.c       	RSTRING(dest)->len = 0;
RSTRING          2167 string.c           RSTRING(str)->len = bp - buf;
RSTRING          2254 string.c       	    free(RSTRING(str)->ptr);
RSTRING          2256 string.c       	RSTRING(str)->len = RSTRING(str2)->len;
RSTRING          2257 string.c       	RSTRING(str)->ptr = RSTRING(str2)->ptr;
RSTRING          2260 string.c       	RSTRING(str)->aux.shared = RSTRING(str2)->aux.shared;
RSTRING          2264 string.c       	rb_str_resize(str, RSTRING(str2)->len);
RSTRING          2265 string.c       	memcpy(RSTRING(str)->ptr, RSTRING(str2)->ptr, RSTRING(str2)->len);
RSTRING          2268 string.c       	    RSTRING(str)->aux.shared = RSTRING(str2)->aux.shared;
RSTRING          2389 string.c           if (RSTRING(str)->len > 1) {
RSTRING          2391 string.c       	s = RSTRING(str)->ptr;
RSTRING          2392 string.c       	e = s + RSTRING(str)->len - 1;
RSTRING          2419 string.c           if (RSTRING(str)->len <= 1) return rb_str_dup(str);
RSTRING          2421 string.c           obj = rb_str_new5(str, 0, RSTRING(str)->len);
RSTRING          2422 string.c           s = RSTRING(str)->ptr; e = s + RSTRING(str)->len - 1;
RSTRING          2423 string.c           p = RSTRING(obj)->ptr;
RSTRING          2454 string.c       	if (memchr(RSTRING(str)->ptr, FIX2INT(arg), RSTRING(str)->len))
RSTRING          2570 string.c           p = RSTRING(str)->ptr; pend = p + RSTRING(str)->len;
RSTRING          2644 string.c           p = RSTRING(str)->ptr; pend = p + RSTRING(str)->len;
RSTRING          2671 string.c           p = RSTRING(str)->ptr; pend = p + RSTRING(str)->len;
RSTRING          2672 string.c           q = RSTRING(result)->ptr; qend = q + len;
RSTRING          2746 string.c           s = RSTRING(str)->ptr; send = s + RSTRING(str)->len;
RSTRING          2800 string.c           s = RSTRING(str)->ptr; send = s + RSTRING(str)->len;
RSTRING          2859 string.c           if (RSTRING(str)->len == 0 || !RSTRING(str)->ptr) return Qnil;
RSTRING          2860 string.c           s = RSTRING(str)->ptr; send = s + RSTRING(str)->len;
RSTRING          2917 string.c           s = RSTRING(str)->ptr; send = s + RSTRING(str)->len;
RSTRING          3014 string.c           if (RSTRING(str)->len == 0 || !RSTRING(str)->ptr) return Qnil;
RSTRING          3015 string.c           trsrc.p = RSTRING(src)->ptr; trsrc.pend = trsrc.p + RSTRING(src)->len;
RSTRING          3016 string.c           if (RSTRING(src)->len >= 2 && RSTRING(src)->ptr[0] == '^') {
RSTRING          3020 string.c           if (RSTRING(repl)->len == 0) {
RSTRING          3023 string.c           trrepl.p = RSTRING(repl)->ptr;
RSTRING          3024 string.c           trrepl.pend = trrepl.p + RSTRING(repl)->len;
RSTRING          3058 string.c           s = RSTRING(str)->ptr; send = s + RSTRING(str)->len;
RSTRING          3076 string.c       	if (RSTRING(str)->len > (t - RSTRING(str)->ptr)) {
RSTRING          3077 string.c       	    RSTRING(str)->len = (t - RSTRING(str)->ptr);
RSTRING          3151 string.c           tr.p = RSTRING(str)->ptr; tr.pend = tr.p + RSTRING(str)->len;
RSTRING          3153 string.c           if (RSTRING(str)->len > 1 && RSTRING(str)->ptr[0] == '^') {
RSTRING          3207 string.c           s = t = RSTRING(str)->ptr;
RSTRING          3208 string.c           if (!s || RSTRING(str)->len == 0) return Qnil;
RSTRING          3209 string.c           send = s + RSTRING(str)->len;
RSTRING          3218 string.c           RSTRING(str)->len = t - RSTRING(str)->ptr;
RSTRING          3287 string.c           s = t = RSTRING(str)->ptr;
RSTRING          3288 string.c           if (!s || RSTRING(str)->len == 0) return Qnil;
RSTRING          3289 string.c           send = s + RSTRING(str)->len;
RSTRING          3298 string.c           if (t - RSTRING(str)->ptr != RSTRING(str)->len) {
RSTRING          3299 string.c       	RSTRING(str)->len = t - RSTRING(str)->ptr;
RSTRING          3412 string.c           s = RSTRING(str)->ptr;
RSTRING          3413 string.c           if (!s || RSTRING(str)->len == 0) return INT2FIX(0);
RSTRING          3414 string.c           send = s + RSTRING(str)->len;
RSTRING          3483 string.c       	    if (RSTRING(str)->len == 0)
RSTRING          3499 string.c       	if (TYPE(spat) == T_STRING && RSTRING(spat)->len == 1) {
RSTRING          3500 string.c       	    if (RSTRING(spat)->ptr[0] == ' ') {
RSTRING          3515 string.c       	char *ptr = RSTRING(str)->ptr;
RSTRING          3516 string.c       	long len = RSTRING(str)->len;
RSTRING          3553 string.c       		if (!RSTRING(str)->ptr) {
RSTRING          3558 string.c       		    rb_ary_push(result, rb_str_substr(str, beg, mbclen2(RSTRING(str)->ptr[beg],spat)));
RSTRING          3562 string.c       		    start += mbclen2(RSTRING(str)->ptr[start],spat);
RSTRING          3584 string.c           if (RSTRING(str)->len > 0 && (!NIL_P(limit) || RSTRING(str)->len > beg || lim < 0)) {
RSTRING          3585 string.c       	if (RSTRING(str)->len == beg)
RSTRING          3588 string.c       	    tmp = rb_str_substr(str, beg, RSTRING(str)->len-beg);
RSTRING          3593 string.c       	       RSTRING(RARRAY(result)->ptr[RARRAY(result)->len-1])->len == 0)
RSTRING          3669 string.c           char *p = RSTRING(str)->ptr, *pend = p + RSTRING(str)->len, *s;
RSTRING          3671 string.c           long len = RSTRING(str)->len, rslen;
RSTRING          3683 string.c           rslen = RSTRING(rs)->len;
RSTRING          3688 string.c       	newline = RSTRING(rs)->ptr[rslen-1];
RSTRING          3696 string.c       	if (RSTRING(str)->ptr < p && p[-1] == newline &&
RSTRING          3698 string.c       	     rb_memcmp(RSTRING(rs)->ptr, p-rslen, rslen) == 0)) {
RSTRING          3737 string.c           for (i=0; i<RSTRING(str)->len; i++) {
RSTRING          3738 string.c       	rb_yield(INT2FIX(RSTRING(str)->ptr[i] & 0xff));
RSTRING          3757 string.c           if (RSTRING(str)->len > 0) {
RSTRING          3759 string.c       	RSTRING(str)->len--;
RSTRING          3760 string.c       	if (RSTRING(str)->ptr[RSTRING(str)->len] == '\n') {
RSTRING          3761 string.c       	    if (RSTRING(str)->len > 0 &&
RSTRING          3762 string.c       		RSTRING(str)->ptr[RSTRING(str)->len-1] == '\r') {
RSTRING          3763 string.c       		RSTRING(str)->len--;
RSTRING          3766 string.c       	RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
RSTRING          3847 string.c           if (RSTRING(str)->len > 0) {
RSTRING          3876 string.c       	len = RSTRING(str)->len;
RSTRING          3878 string.c       	p = RSTRING(str)->ptr;
RSTRING          3883 string.c       	    if (RSTRING(str)->ptr[len-1] == '\n') {
RSTRING          3884 string.c       		RSTRING(str)->len--;
RSTRING          3885 string.c       		if (RSTRING(str)->len > 0 &&
RSTRING          3886 string.c       		    RSTRING(str)->ptr[RSTRING(str)->len-1] == '\r') {
RSTRING          3887 string.c       		    RSTRING(str)->len--;
RSTRING          3890 string.c       	    else if (RSTRING(str)->ptr[len-1] == '\r') {
RSTRING          3891 string.c       		RSTRING(str)->len--;
RSTRING          3896 string.c       	    RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
RSTRING          3902 string.c           len = RSTRING(str)->len;
RSTRING          3904 string.c           p = RSTRING(str)->ptr;
RSTRING          3905 string.c           rslen = RSTRING(rs)->len;
RSTRING          3912 string.c       	if (len < RSTRING(str)->len) {
RSTRING          3914 string.c       	    RSTRING(str)->len = len;
RSTRING          3915 string.c       	    RSTRING(str)->ptr[len] = '\0';
RSTRING          3921 string.c           newline = RSTRING(rs)->ptr[rslen-1];
RSTRING          3927 string.c       	 rb_memcmp(RSTRING(rs)->ptr, p+len-rslen, rslen) == 0)) {
RSTRING          3929 string.c       	RSTRING(str)->len -= rslen;
RSTRING          3930 string.c       	RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
RSTRING          4040 string.c           s = RSTRING(str)->ptr;
RSTRING          4041 string.c           if (!s || RSTRING(str)->len == 0) return Qnil;
RSTRING          4042 string.c           e = t = s + RSTRING(str)->len;
RSTRING          4046 string.c           if (s > RSTRING(str)->ptr) {
RSTRING          4048 string.c       	RSTRING(str)->len = t-s;
RSTRING          4049 string.c       	memmove(RSTRING(str)->ptr, s, RSTRING(str)->len);
RSTRING          4050 string.c       	RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
RSTRING          4096 string.c           s = RSTRING(str)->ptr;
RSTRING          4097 string.c           if (!s || RSTRING(str)->len == 0) return Qnil;
RSTRING          4098 string.c           e = t = s + RSTRING(str)->len;
RSTRING          4108 string.c       	RSTRING(str)->len = t-s;
RSTRING          4109 string.c       	RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
RSTRING          4192 string.c       	    if (RSTRING(str)->len > END(0))
RSTRING          4193 string.c       		*start = END(0)+mbclen2(RSTRING(str)->ptr[END(0)],pat);
RSTRING          4355 string.c           if (RSTRING(salt)->len < 2)
RSTRING          4358 string.c           if (RSTRING(str)->ptr) s = RSTRING(str)->ptr;
RSTRING          4360 string.c           result = rb_str_new2(crypt(s, RSTRING(salt)->ptr));
RSTRING          4394 string.c           if (!RSTRING(str)->ptr || RSTRING(str)->len == 0) {
RSTRING          4397 string.c           if (strlen(RSTRING(str)->ptr) != RSTRING(str)->len)
RSTRING          4399 string.c           id = rb_intern(RSTRING(str)->ptr);
RSTRING          4431 string.c           ptr = p = RSTRING(str)->ptr;
RSTRING          4432 string.c           len = RSTRING(str)->len;
RSTRING          4484 string.c       	f = RSTRING(pad)->ptr;
RSTRING          4485 string.c       	flen = RSTRING(pad)->len;
RSTRING          4490 string.c           if (width < 0 || RSTRING(str)->len >= width) return rb_str_dup(str);
RSTRING          4492 string.c           p = RSTRING(res)->ptr;
RSTRING          4494 string.c       	n = width - RSTRING(str)->len;
RSTRING          4512 string.c           memcpy(p, RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING          4514 string.c       	p += RSTRING(str)->len; pend = RSTRING(res)->ptr + width;
RSTRING           524 struct.c       	snprintf(RSTRING(str)->ptr, len+1, "#<struct %s:...>", cname);
RSTRING           525 struct.c       	RSTRING(str)->len = strlen(RSTRING(str)->ptr);
RSTRING           349 time.c         		if (RSTRING(s)->len == 3 &&
RSTRING           350 time.c         		    strcasecmp(months[i], RSTRING(v[1])->ptr) == 0) {
RSTRING           356 time.c         		char c = RSTRING(s)->ptr[0];
RSTRING          1833 time.c             fmt = RSTRING(format)->ptr;
RSTRING          1834 time.c             len = RSTRING(format)->len;
RSTRING          1857 time.c         	len = rb_strftime(&buf, RSTRING(format)->ptr, &tobj->tm);
RSTRING          1965 time.c             buf = (unsigned char *)RSTRING(str)->ptr;
RSTRING          1966 time.c             if (RSTRING(str)->len != 8) {
RSTRING           168 util.c             if (RSTRING(str)->len > 1000)
RSTRING           170 util.c         		 RSTRING(str)->len);
RSTRING           174 util.c             slen = RSTRING(str)->len;
RSTRING           179 util.c             if (valid_filename(RSTRING(str)->ptr)) return;
RSTRING           183 util.c             RSTRING(str)->ptr[RSTRING(str)->len = slen] = '\0';
RSTRING           187 util.c             t = buf; baselen = 0; s = RSTRING(str)->ptr;
RSTRING           225 util.c             memcpy(RSTRING(str)->ptr, buf, RSTRING(str)->len);
RSTRING           211 variable.c     	snprintf(RSTRING(path)->ptr, len+1, "#<%s:0x%lx>", s, klass);
RSTRING           212 variable.c     	RSTRING(path)->len = strlen(RSTRING(path)->ptr);
RSTRING           254 variable.c     	id = rb_intern(RSTRING(str)->ptr);
RSTRING           296 variable.c         return RSTRING(rb_class_name(klass))->ptr;
RSTRING          1267 variable.c     	rb_raise(rb_eTypeError, "wrong autoload table: %s", RSTRING(rb_inspect(av))->ptr);
RSTRING          1342 variable.c         if (!load || !(file = load->nd_lit) || rb_provided(RSTRING(file)->ptr)) {
RSTRING          1363 variable.c         if (!RSTRING(file)->ptr || !*RSTRING(file)->ptr) {
RSTRING          1366 variable.c         if (!rb_provided(RSTRING(file)->ptr)) {


RSTRUCT

RSTRUCT           633 marshal.c      		long len = RSTRUCT(obj)->len;
RSTRUCT           641 marshal.c      		    w_object(RSTRUCT(obj)->ptr[i], arg, limit);
RSTRUCT            55 struct.c           if (RSTRUCT(s)->len != RARRAY(members)->len) {
RSTRUCT            57 struct.c       		 RARRAY(members)->len, RSTRUCT(s)->len);
RSTRUCT           111 struct.c       	    return RSTRUCT(obj)->ptr[i];
RSTRUCT           125 struct.c       static VALUE rb_struct_ref0(obj) VALUE obj; {return RSTRUCT(obj)->ptr[0];}
RSTRUCT           126 struct.c       static VALUE rb_struct_ref1(obj) VALUE obj; {return RSTRUCT(obj)->ptr[1];}
RSTRUCT           127 struct.c       static VALUE rb_struct_ref2(obj) VALUE obj; {return RSTRUCT(obj)->ptr[2];}
RSTRUCT           128 struct.c       static VALUE rb_struct_ref3(obj) VALUE obj; {return RSTRUCT(obj)->ptr[3];}
RSTRUCT           129 struct.c       static VALUE rb_struct_ref4(obj) VALUE obj; {return RSTRUCT(obj)->ptr[4];}
RSTRUCT           130 struct.c       static VALUE rb_struct_ref5(obj) VALUE obj; {return RSTRUCT(obj)->ptr[5];}
RSTRUCT           131 struct.c       static VALUE rb_struct_ref6(obj) VALUE obj; {return RSTRUCT(obj)->ptr[6];}
RSTRUCT           132 struct.c       static VALUE rb_struct_ref7(obj) VALUE obj; {return RSTRUCT(obj)->ptr[7];}
RSTRUCT           133 struct.c       static VALUE rb_struct_ref8(obj) VALUE obj; {return RSTRUCT(obj)->ptr[8];}
RSTRUCT           134 struct.c       static VALUE rb_struct_ref9(obj) VALUE obj; {return RSTRUCT(obj)->ptr[9];}
RSTRUCT           172 struct.c       	    return RSTRUCT(obj)->ptr[i] = val;
RSTRUCT           348 struct.c           MEMCPY(RSTRUCT(self)->ptr, RARRAY(values)->ptr, VALUE, RARRAY(values)->len);
RSTRUCT           350 struct.c       	rb_mem_clear(RSTRUCT(self)->ptr+RARRAY(values)->len,
RSTRUCT           431 struct.c           for (i=0; i<RSTRUCT(s)->len; i++) {
RSTRUCT           432 struct.c       	rb_yield(RSTRUCT(s)->ptr[i]);
RSTRUCT           463 struct.c           for (i=0; i<RSTRUCT(s)->len; i++) {
RSTRUCT           464 struct.c       	rb_yield_values(2, rb_ary_entry(members, i), RSTRUCT(s)->ptr[i]);
RSTRUCT           481 struct.c           for (i=0; i<RSTRUCT(s)->len; i++) {
RSTRUCT           499 struct.c       	rb_str_append(str, rb_inspect(RSTRUCT(s)->ptr[i]));
RSTRUCT           547 struct.c           return rb_ary_new4(RSTRUCT(s)->len, RSTRUCT(s)->ptr);
RSTRUCT           560 struct.c           RSTRUCT(copy)->ptr = ALLOC_N(VALUE, RSTRUCT(s)->len);
RSTRUCT           561 struct.c           RSTRUCT(copy)->len = RSTRUCT(s)->len;
RSTRUCT           562 struct.c           MEMCPY(RSTRUCT(copy)->ptr, RSTRUCT(s)->ptr, VALUE, RSTRUCT(copy)->len);
RSTRUCT           579 struct.c       	    return RSTRUCT(s)->ptr[i];
RSTRUCT           616 struct.c           if (i < 0) i = RSTRUCT(s)->len + i;
RSTRUCT           619 struct.c       		 i, RSTRUCT(s)->len);
RSTRUCT           620 struct.c           if (RSTRUCT(s)->len <= i)
RSTRUCT           622 struct.c       		 i, RSTRUCT(s)->len);
RSTRUCT           623 struct.c           return RSTRUCT(s)->ptr[i];
RSTRUCT           637 struct.c           if (RSTRUCT(s)->len != RARRAY(members)->len) {
RSTRUCT           639 struct.c       		 RARRAY(members)->len, RSTRUCT(s)->len);
RSTRUCT           643 struct.c       	    RSTRUCT(s)->ptr[i] = val;
RSTRUCT           682 struct.c           if (i < 0) i = RSTRUCT(s)->len + i;
RSTRUCT           685 struct.c       		 i, RSTRUCT(s)->len);
RSTRUCT           687 struct.c           if (RSTRUCT(s)->len <= i) {
RSTRUCT           689 struct.c       		 i, RSTRUCT(s)->len);
RSTRUCT           692 struct.c           return RSTRUCT(s)->ptr[i] = val;
RSTRUCT           726 struct.c           return rb_values_at(s, RSTRUCT(s)->len, argc, argv, struct_entry);
RSTRUCT           762 struct.c           for (i = 0; i < RSTRUCT(s)->len; i++) {
RSTRUCT           763 struct.c       	if (RTEST(rb_yield(RSTRUCT(s)->ptr[i]))) {
RSTRUCT           764 struct.c       	    rb_ary_push(result, RSTRUCT(s)->ptr[i]);
RSTRUCT           797 struct.c           if (RSTRUCT(s)->len != RSTRUCT(s2)->len) {
RSTRUCT           801 struct.c           for (i=0; i<RSTRUCT(s)->len; i++) {
RSTRUCT           802 struct.c       	if (!rb_equal(RSTRUCT(s)->ptr[i], RSTRUCT(s2)->ptr[i])) return Qfalse;
RSTRUCT           822 struct.c           for (i = 0; i < RSTRUCT(s)->len; i++) {
RSTRUCT           824 struct.c       	n = rb_hash(RSTRUCT(s)->ptr[i]);
RSTRUCT           847 struct.c           if (RSTRUCT(s)->len != RSTRUCT(s2)->len) {
RSTRUCT           851 struct.c           for (i=0; i<RSTRUCT(s)->len; i++) {
RSTRUCT           852 struct.c       	if (!rb_eql(RSTRUCT(s)->ptr[i], RSTRUCT(s2)->ptr[i])) return Qfalse;
RSTRUCT           873 struct.c           return LONG2FIX(RSTRUCT(s)->len);


RTEST

RTEST            1813 array.c        	if (RTEST(rb_yield(RARRAY(ary)->ptr[i]))) {
RTEST            1990 array.c        	if (RTEST(rb_yield(v))) continue;
RTEST             619 class.c        	recur = RTEST(r);
RTEST             785 class.c            if (RTEST(recur)) {
RTEST              31 compar.c           if (RTEST(rb_funcall(val, '>', 1, INT2FIX(0)))) return 1;
RTEST              32 compar.c           if (RTEST(rb_funcall(val, '<', 1, INT2FIX(0)))) return -1;
RTEST             189 compar.c           if (RTEST(cmp_lt(x, min))) return Qfalse;
RTEST             190 compar.c           if (RTEST(cmp_gt(x, max))) return Qfalse;
RTEST              31 enum.c             if (RTEST(rb_funcall(arg[0], id_eqq, 1, i))) {
RTEST              41 enum.c             if (RTEST(rb_funcall(arg[0], id_eqq, 1, i))) {
RTEST              85 enum.c             if (RTEST(rb_yield(i))) {
RTEST             131 enum.c             if (RTEST(rb_yield(i))) {
RTEST             165 enum.c             if (!RTEST(rb_yield(i))) {
RTEST             319 enum.c             if (RTEST(rb_yield(i))) {
RTEST             505 enum.c             if (!RTEST(rb_yield(i))) {
RTEST             517 enum.c             if (!RTEST(i)) {
RTEST             556 enum.c             if (RTEST(rb_yield(i))) {
RTEST             568 enum.c             if (RTEST(i)) {
RTEST             163 error.c            if (!RTEST(ruby_verbose)) return;
RTEST            1141 error.c             if (!RTEST(ruby_verbose)) return;
RTEST            1840 eval.c         		if (!RTEST(rb_autoload_load(klass, id))) break;
RTEST            2094 eval.c             if (RTEST(ruby_verbose) && st_lookup(RCLASS(klass)->m_tbl, name, (st_data_t *)&node)) {
RTEST            2413 eval.c         	if (RTEST(rb_reg_nth_defined(node->nd_nth, MATCH_DATA))) {
RTEST            2420 eval.c         	if (RTEST(rb_reg_nth_defined(0, MATCH_DATA))) {
RTEST            2940 eval.c         	if (RTEST(rb_eval(self, node->nd_cond))) {
RTEST            2964 eval.c         			if (RTEST(RARRAY(v)->ptr[i])) {
RTEST            2972 eval.c         		if (RTEST(rb_eval(self, tag->nd_head))) {
RTEST            3005 eval.c         			    if (RTEST(rb_funcall2(RARRAY(v)->ptr[i], eqq, 1, &val))){
RTEST            3013 eval.c         		    if (RTEST(rb_funcall2(rb_eval(self, tag->nd_head), eqq, 1, &val))) {
RTEST            3029 eval.c         	    if (node->nd_state && !RTEST(rb_eval(self, node->nd_cond)))
RTEST            3036 eval.c         	    } while (RTEST(rb_eval(self, node->nd_cond)));
RTEST            3064 eval.c         	    if (node->nd_state && RTEST(rb_eval(self, node->nd_cond)))
RTEST            3071 eval.c         	    } while (!RTEST(rb_eval(self, node->nd_cond)));
RTEST            3261 eval.c         	if (!RTEST(result)) break;
RTEST            3267 eval.c         	if (RTEST(result)) break;
RTEST            3272 eval.c         	if (RTEST(rb_eval(self, node->nd_body))) result = Qfalse;
RTEST            3289 eval.c         	    if (!RTEST(*flip)) {
RTEST            3290 eval.c         		if (RTEST(rb_eval(self, node->nd_beg))) {
RTEST            3291 eval.c         		    *flip = RTEST(rb_eval(self, node->nd_end))?Qfalse:Qtrue;
RTEST            3299 eval.c         		if (RTEST(rb_eval(self, node->nd_end))) {
RTEST            3311 eval.c         	    if (!RTEST(*flip)) {
RTEST            3312 eval.c         		result = RTEST(rb_eval(self, node->nd_beg)) ? Qtrue : Qfalse;
RTEST            3316 eval.c         		if (RTEST(rb_eval(self, node->nd_end))) {
RTEST            3488 eval.c         		if (RTEST(val)) RETURN(val);
RTEST            3492 eval.c         		if (!RTEST(val)) RETURN(val);
RTEST            3513 eval.c         		if (RTEST(val)) RETURN(val);
RTEST            3517 eval.c         		if (!RTEST(val)) RETURN(val);
RTEST            3532 eval.c         	if (!RTEST(result)) break;
RTEST            3538 eval.c         	    !RTEST(result = rb_eval(self, node->nd_head))) {
RTEST            3824 eval.c         		if (RTEST(ruby_verbose) && ruby_class == origin && body->nd_cnt == 0 && body->nd_body) {
RTEST            3874 eval.c         		if (RTEST(ruby_verbose)) {
RTEST            4150 eval.c             if (rb_method_boundp(CLASS_OF(obj), id, !RTEST(priv))) {
RTEST            4478 eval.c             if (RTEST(ruby_debug) && !NIL_P(ruby_errinfo)
RTEST            5139 eval.c         	if (RTEST(ruby_verbose) && FL_TEST(ruby_cbase, FL_SINGLETON)) {
RTEST            5251 eval.c         	if (RTEST(rb_funcall(*argv, eqq, 1, ruby_errinfo))) return 1;
RTEST            6783 eval.c             rb_load(fname, RTEST(wrap));
RTEST            11368 eval.c             ruby_thread_abort = RTEST(val);
RTEST            11404 eval.c             rb_thread_check(thread)->abort = RTEST(val);
RTEST            11685 eval.c         	else if (th->safe < 4 && (ruby_thread_abort || th->abort || RTEST(ruby_debug))) {
RTEST            12020 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             281 ext/dbm/dbm.c  	    if (RTEST(v)) {
RTEST             401 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             371 ext/gdbm/gdbm.c         for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
RTEST             376 ext/gdbm/gdbm.c 	    if (RTEST(v)) {
RTEST             489 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
RTEST             495 ext/gdbm/gdbm.c 	if (RTEST(ret)) rb_ary_push(ary, keystr);
RTEST             555 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
RTEST             687 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
RTEST             705 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
RTEST             723 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
RTEST             743 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
RTEST             801 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
RTEST             826 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
RTEST             887 ext/gdbm/gdbm.c     if (RTEST(val))
RTEST             901 ext/gdbm/gdbm.c     fgdbm_set_fastmode(obj, RTEST(val) ? Qfalse : Qtrue);
RTEST             910 ext/gdbm/gdbm.c     if (RTEST(val))
RTEST             930 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
RTEST             395 ext/iconv/iconv.c 	if (RTEST(error)) {
RTEST             473 ext/iconv/iconv.c 	if (RTEST(error)) {
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             306 ext/openssl/ossl_ssl.c     if (RTEST(ossl_sslctx_get_tmp_dh_cb(self))){
RTEST             384 ext/openssl/ossl_ssl.c     if (RTEST(ossl_sslctx_get_client_cert_cb(self)))
RTEST             723 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              93 ext/readline/readline.c     if (RTEST(add_hist) && buff) {
RTEST             157 ext/readline/readline.c     case_fold = RTEST(rb_attr_get(mReadline, completion_case_fold));
RTEST             258 ext/sdbm/init.c 	    if (RTEST(v)) {
RTEST             380 ext/sdbm/init.c 	if (RTEST(ret)) rb_ary_push(ary, keystr);
RTEST             626 ext/socket/socket.c     do_not_reverse_lookup = RTEST(val);
RTEST             550 ext/strscan/strscan.c     return strscan_do_scan(self, re, RTEST(s), RTEST(f), 1);
RTEST             649 ext/strscan/strscan.c     return strscan_do_scan(self, re, RTEST(s), RTEST(f), 0);
RTEST            1121 ext/syck/rubyext.c                          RTEST( rb_funcall( target_class, s_tag_subclasses, 0 ) ) )
RTEST            2029 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             679 ext/zlib/zlib.c 	if (RTEST(ruby_debug)) {
RTEST             685 ext/zlib/zlib.c 	if (RTEST(ruby_debug)) {
RTEST            1356 ext/zlib/zlib.c 	if (RTEST(ruby_debug)) {
RTEST            2613 ext/zlib/zlib.c     if (RTEST(mode)) {
RTEST            3297 file.c         	return RTEST(argv[0]) ? Qtrue : Qfalse;
RTEST             734 hash.c             if (RTEST(rb_yield_values(2, key, value))) {
RTEST             801 hash.c             if (RTEST(rb_yield_values(2, key, value)))
RTEST            2042 hash.c         	    if (RTEST(rb_yield_values(2, RARRAY(keys)->ptr[i], val))) {
RTEST            2092 hash.c         	    if (RTEST(rb_yield_values(2, k, v))) {
RTEST             874 io.c               if (RTEST(mode)) {
RTEST            5448 io.c               if (!RTEST(val)) {
RTEST            1053 marshal.c      	    if (TYPE(v) == T_MODULE || !RTEST(rb_class_inherited_p(c, RBASIC(v)->klass))) {
RTEST            1419 marshal.c          if (RTEST(ruby_verbose) && minor != MARSHAL_MINOR) {
RTEST             358 numeric.c      	((RTEST(rb_funcall(x, '<', 1, INT2FIX(0))) &&
RTEST             359 numeric.c      	  RTEST(rb_funcall(y, '>', 1, INT2FIX(0)))) ||
RTEST             360 numeric.c      	 (RTEST(rb_funcall(x, '>', 1, INT2FIX(0))) &&
RTEST             361 numeric.c      	  RTEST(rb_funcall(y, '<', 1, INT2FIX(0)))))) {
RTEST             397 numeric.c          if (RTEST(rb_funcall(num, '<', 1, INT2FIX(0)))) {
RTEST             438 numeric.c          if (RTEST(rb_funcall(num, rb_intern("zero?"), 0, 0))) {
RTEST            1489 numeric.c      	if (RTEST(rb_funcall(step, '>', 1, INT2FIX(0)))) {
RTEST            1496 numeric.c      	    if (RTEST(rb_funcall(i, cmp, 1, to))) break;
RTEST            1602 numeric.c          if (RTEST(rb_funcall(INT2FIX(0), '<', 1, val))) {
RTEST            2744 numeric.c      	    if (!RTEST(rb_funcall(i, '<', 1, num))) break;
RTEST              53 object.c           if (RTEST(result)) return Qtrue;
RTEST              61 object.c           return RTEST(rb_funcall(obj1, id_eql, 1, obj2));
RTEST             922 object.c           return RTEST(obj2)?Qtrue:Qfalse;
RTEST             962 object.c           return RTEST(obj2)?Qfalse:Qtrue;
RTEST            1021 object.c           return RTEST(obj2)?Qtrue:Qfalse;
RTEST            1041 object.c           return RTEST(obj2)?Qtrue:Qfalse;
RTEST            1723 object.c           rb_attr(klass, rb_to_id(name), 1, RTEST(pub), Qtrue);
RTEST            1904 object.c       	if (RTEST(recur)) {
RTEST            2424 object.c           else if (RTEST(ruby_verbose) && RSTRING(str)->len != strlen(RSTRING(str)->ptr)) {
RTEST            8597 parse.c            if (RTEST(ruby_verbose)) {
RTEST            9083 parse.c            if (!RTEST(ruby_verbose)) return;
RTEST            9177 parse.c            if (!RTEST(ruby_verbose)) return;
RTEST            9361 parse.c        	    if ((b == 1 && e == 1) || (b + e >= 2 && RTEST(ruby_verbose))) {
RTEST            4599 parse.y            if (RTEST(ruby_verbose)) {
RTEST            5085 parse.y            if (!RTEST(ruby_verbose)) return;
RTEST            5179 parse.y            if (!RTEST(ruby_verbose)) return;
RTEST            5363 parse.y        	    if ((b == 1 && e == 1) || (b + e >= 2 && RTEST(ruby_verbose))) {
RTEST              18 range.c        #define EXCL(r) RTEST(rb_ivar_get((r), id_excl))
RTEST              90 range.c            range_init(range, beg, end, RTEST(flags));
RTEST             248 range.c        	while (RTEST(c = r_le(v, e))) {
RTEST             344 range.c        	    while (RTEST(rb_funcall(b, c, 1, e))) {
RTEST            1269 re.c           	    if (RTEST(rb_yield(str))) {
RTEST            1690 re.c           	    else if (RTEST(argv[1])) flags = RE_OPTION_IGNORECASE;
RTEST            2157 re.c               ruby_ignorecase = RTEST(val);
RTEST            1123 ruby.c             ruby_verbose = RTEST(val) ? Qtrue : val;
RTEST             447 ruby.h         #define SPECIAL_CONST_P(x) (IMMEDIATE_P(x) || !RTEST(x))
RTEST             787 sprintf.c      	if (RTEST(ruby_debug)) rb_raise(rb_eArgError, mesg);
RTEST             788 sprintf.c      	if (RTEST(ruby_verbose)) rb_warn(mesg);
RTEST             763 struct.c       	if (RTEST(rb_yield(RSTRUCT(s)->ptr[i]))) {
RTEST             316 time.c         	tm->tm_isdst = RTEST(argv[8]) ? 1 : 0;
RTEST            1411 variable.c     		if (!RTEST(rb_autoload_load(tmp, id))) break;
RTEST            1745 variable.c     	    if (warn && RTEST(ruby_verbose) && klass != tmp) {
RTEST            1749 variable.c     	    if (RTEST(ruby_verbose)) {
RTEST            1772 variable.c     		if (RTEST(ruby_verbose)) {


RTLD_GLOBAL

RTLD_GLOBAL      1346 dln.c          #ifndef RTLD_GLOBAL
RTLD_GLOBAL      1351 dln.c          	if ((handle = (void*)dlopen(file, RTLD_LAZY|RTLD_GLOBAL)) == NULL) {
RTLD_GLOBAL       697 ext/dl/dl.c      rb_define_const(rb_mDL, "RTLD_GLOBAL", INT2NUM(RTLD_GLOBAL));
RTLD_GLOBAL        17 ext/dl/dl.h    #ifndef RTLD_GLOBAL
RTLD_GLOBAL        56 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        1340 dln.c          #ifndef RTLD_LAZY
RTLD_LAZY        1351 dln.c          	if ((handle = (void*)dlopen(file, RTLD_LAZY|RTLD_GLOBAL)) == NULL) {
RTLD_LAZY         698 ext/dl/dl.c      rb_define_const(rb_mDL, "RTLD_LAZY",   INT2NUM(RTLD_LAZY));
RTLD_LAZY          14 ext/dl/dl.h    #ifndef RTLD_LAZY
RTLD_LAZY          56 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          699 ext/dl/dl.c      rb_define_const(rb_mDL, "RTLD_NOW",    INT2NUM(RTLD_NOW));
RTLD_NOW           20 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              186 regex.c        #ifdef RUBY
RUBY             2253 regex.c        #ifndef RUBY
RUBY             4295 regex.c        #ifdef RUBY
RUBY               30 regex.h        #ifdef RUBY
RUBY              200 regex.h        #ifndef RUBY


RUBY_CRITICAL

RUBY_CRITICAL     121 gc.c               RUBY_CRITICAL(mem = malloc(size));
RUBY_CRITICAL     124 gc.c           	RUBY_CRITICAL(mem = malloc(size));
RUBY_CRITICAL     158 gc.c               RUBY_CRITICAL(mem = realloc(ptr, size));
RUBY_CRITICAL     161 gc.c           	RUBY_CRITICAL(mem = realloc(ptr, size));
RUBY_CRITICAL     175 gc.c           	RUBY_CRITICAL(free(x));
RUBY_CRITICAL     255 gc.c           	RUBY_CRITICAL(free(tmp));
RUBY_CRITICAL     263 gc.c           	    RUBY_CRITICAL(free(t));
RUBY_CRITICAL     338 gc.c           	RUBY_CRITICAL(
RUBY_CRITICAL     350 gc.c           	RUBY_CRITICAL(p = heaps[heaps_used].slot = (RVALUE*)malloc(sizeof(RVALUE)*heap_slots));
RUBY_CRITICAL    1169 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.string.ptr));
RUBY_CRITICAL    1174 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.array.ptr));
RUBY_CRITICAL    1187 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.regexp.str));
RUBY_CRITICAL    1193 gc.c           		RUBY_CRITICAL(free(DATA_PTR(obj)));
RUBY_CRITICAL    1203 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.match.regs));
RUBY_CRITICAL    1209 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.file.fptr));
RUBY_CRITICAL    1223 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.bignum.digits));
RUBY_CRITICAL    1230 gc.c           		RUBY_CRITICAL(free(RANY(obj)->as.node.u1.tbl));
RUBY_CRITICAL    1234 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.node.u1.node));
RUBY_CRITICAL    1244 gc.c           		RUBY_CRITICAL(free(RANY(obj)->as.scope.local_tbl));
RUBY_CRITICAL    1246 gc.c           		RUBY_CRITICAL(free(vars));
RUBY_CRITICAL    1252 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.rstruct.ptr));
RUBY_CRITICAL    1852 gc.c           		    RUBY_CRITICAL(free(DATA_PTR(p)));
RUBY_CRITICAL     614 win32/win32.c      RUBY_CRITICAL(do {
RUBY_CRITICAL     974 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    1657 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    1838 win32/win32.c      RUBY_CRITICAL(ret = __WSAFDIsSet(s, set));
RUBY_CRITICAL    1928 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    1994 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2017 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2034 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2060 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2077 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2092 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2109 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2126 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2143 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2161 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2178 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2196 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2213 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2230 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2249 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2271 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2288 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2305 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2322 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2339 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2356 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2373 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2435 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2612 win32/win32.c  	RUBY_CRITICAL({
RUBY_CRITICAL    2631 win32/win32.c  	RUBY_CRITICAL({
RUBY_CRITICAL    2643 win32/win32.c  	RUBY_CRITICAL({
RUBY_CRITICAL    2755 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    3077 win32/win32.c      RUBY_CRITICAL(rb_protect((VALUE (*)(VALUE))h->handler, (VALUE)h->arg, &h->status);
RUBY_CRITICAL    3128 win32/win32.c      RUBY_CRITICAL({		/* the main thread must be in user state */
RUBY_CRITICAL    3160 win32/win32.c  	RUBY_CRITICAL({
RUBY_CRITICAL    3181 win32/win32.c      RUBY_CRITICAL(ret = wait_events(NULL, msec));
RUBY_CRITICAL    3191 win32/win32.c      RUBY_CRITICAL(wait_events(NULL, 0));
RUBY_CRITICAL    3271 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    3468 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    3511 win32/win32.c      RUBY_CRITICAL(do {
RUBY_CRITICAL    3529 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    3549 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   808 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "READER",  INT2FIX(O_RDONLY|RUBY_DBM_RW_BIT));
RUBY_DBM_RW_BIT   809 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "WRITER",  INT2FIX(O_RDWR|RUBY_DBM_RW_BIT));
RUBY_DBM_RW_BIT   810 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "WRCREAT", INT2FIX(O_RDWR|O_CREAT|RUBY_DBM_RW_BIT));
RUBY_DBM_RW_BIT   811 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  2576 eval.c             case RUBY_EVENT_CALL:
RUBY_EVENT_CALL  5824 eval.c         		    EXEC_EVENT_HOOK(RUBY_EVENT_CALL, b2, recv, id, klass);


RUBY_EVENT_CLASS

RUBY_EVENT_CLASS 2572 eval.c             case RUBY_EVENT_CLASS:
RUBY_EVENT_CLASS 4082 eval.c         	EXEC_EVENT_HOOK(RUBY_EVENT_CLASS, n, ruby_cbase,


RUBY_EVENT_C_CALL

RUBY_EVENT_C_CALL 2580 eval.c             case RUBY_EVENT_C_CALL:
RUBY_EVENT_C_CALL 5679 eval.c         		EXEC_EVENT_HOOK(RUBY_EVENT_C_CALL, ruby_current_node,


RUBY_EVENT_C_RETURN

RUBY_EVENT_C_RETURN 2582 eval.c             case RUBY_EVENT_C_RETURN:
RUBY_EVENT_C_RETURN 5687 eval.c         		EXEC_EVENT_HOOK(RUBY_EVENT_C_RETURN, ruby_current_node,


RUBY_EVENT_END

RUBY_EVENT_END   2574 eval.c             case RUBY_EVENT_END:
RUBY_EVENT_END   4093 eval.c             EXEC_EVENT_HOOK(RUBY_EVENT_END, n, 0,


RUBY_EVENT_LINE

RUBY_EVENT_LINE  2570 eval.c             case RUBY_EVENT_LINE:
RUBY_EVENT_LINE  2937 eval.c         	EXEC_EVENT_HOOK(RUBY_EVENT_LINE, node, self,
RUBY_EVENT_LINE  2955 eval.c         		EXEC_EVENT_HOOK(RUBY_EVENT_LINE, tag, self,
RUBY_EVENT_LINE  2996 eval.c         		    EXEC_EVENT_HOOK(RUBY_EVENT_LINE, tag, self,
RUBY_EVENT_LINE  4029 eval.c         	EXEC_EVENT_HOOK(RUBY_EVENT_LINE, node, self,


RUBY_EVENT_RAISE

RUBY_EVENT_RAISE 2584 eval.c             case RUBY_EVENT_RAISE:
RUBY_EVENT_RAISE 4503 eval.c         	EXEC_EVENT_HOOK(RUBY_EVENT_RAISE, ruby_current_node,


RUBY_EVENT_RETURN

RUBY_EVENT_RETURN 2578 eval.c             case RUBY_EVENT_RETURN:
RUBY_EVENT_RETURN 5839 eval.c         		EXEC_EVENT_HOOK(RUBY_EVENT_RETURN, body, recv, id, klass);


RUBY_EXTERN

RUBY_EXTERN       198 defines.h      #ifndef RUBY_EXTERN
RUBY_EXTERN       203 defines.h      #define EXTERN RUBY_EXTERN	/* deprecated */
RUBY_EXTERN       130 intern.h       RUBY_EXTERN int ruby_nerrs;
RUBY_EXTERN       143 intern.h       RUBY_EXTERN struct RNode *ruby_current_node;
RUBY_EXTERN       266 intern.h       RUBY_EXTERN VALUE rb_fs;
RUBY_EXTERN       267 intern.h       RUBY_EXTERN VALUE rb_output_fs;
RUBY_EXTERN       268 intern.h       RUBY_EXTERN VALUE rb_rs;
RUBY_EXTERN       269 intern.h       RUBY_EXTERN VALUE rb_default_rs;
RUBY_EXTERN       270 intern.h       RUBY_EXTERN VALUE rb_output_rs;
RUBY_EXTERN       326 intern.h       RUBY_EXTERN int   ruby_sourceline;
RUBY_EXTERN       327 intern.h       RUBY_EXTERN char *ruby_sourcefile;
RUBY_EXTERN       373 intern.h       RUBY_EXTERN VALUE rb_argv;
RUBY_EXTERN       374 intern.h       RUBY_EXTERN VALUE rb_argv0;
RUBY_EXTERN        38 re.h           RUBY_EXTERN int ruby_ignorecase;
RUBY_EXTERN       240 ruby.h         RUBY_EXTERN int ruby_safe_level;
RUBY_EXTERN       533 ruby.h         RUBY_EXTERN VALUE ruby_verbose, ruby_debug;
RUBY_EXTERN       566 ruby.h         RUBY_EXTERN VALUE rb_mKernel;
RUBY_EXTERN       567 ruby.h         RUBY_EXTERN VALUE rb_mComparable;
RUBY_EXTERN       568 ruby.h         RUBY_EXTERN VALUE rb_mEnumerable;
RUBY_EXTERN       569 ruby.h         RUBY_EXTERN VALUE rb_mPrecision;
RUBY_EXTERN       570 ruby.h         RUBY_EXTERN VALUE rb_mErrno;
RUBY_EXTERN       571 ruby.h         RUBY_EXTERN VALUE rb_mFileTest;
RUBY_EXTERN       572 ruby.h         RUBY_EXTERN VALUE rb_mGC;
RUBY_EXTERN       573 ruby.h         RUBY_EXTERN VALUE rb_mMath;
RUBY_EXTERN       574 ruby.h         RUBY_EXTERN VALUE rb_mProcess;
RUBY_EXTERN       576 ruby.h         RUBY_EXTERN VALUE rb_cObject;
RUBY_EXTERN       577 ruby.h         RUBY_EXTERN VALUE rb_cArray;
RUBY_EXTERN       578 ruby.h         RUBY_EXTERN VALUE rb_cBignum;
RUBY_EXTERN       579 ruby.h         RUBY_EXTERN VALUE rb_cClass;
RUBY_EXTERN       580 ruby.h         RUBY_EXTERN VALUE rb_cDir;
RUBY_EXTERN       581 ruby.h         RUBY_EXTERN VALUE rb_cData;
RUBY_EXTERN       582 ruby.h         RUBY_EXTERN VALUE rb_cFalseClass;
RUBY_EXTERN       583 ruby.h         RUBY_EXTERN VALUE rb_cFile;
RUBY_EXTERN       584 ruby.h         RUBY_EXTERN VALUE rb_cFixnum;
RUBY_EXTERN       585 ruby.h         RUBY_EXTERN VALUE rb_cFloat;
RUBY_EXTERN       586 ruby.h         RUBY_EXTERN VALUE rb_cHash;
RUBY_EXTERN       587 ruby.h         RUBY_EXTERN VALUE rb_cInteger;
RUBY_EXTERN       588 ruby.h         RUBY_EXTERN VALUE rb_cIO;
RUBY_EXTERN       589 ruby.h         RUBY_EXTERN VALUE rb_cModule;
RUBY_EXTERN       590 ruby.h         RUBY_EXTERN VALUE rb_cNilClass;
RUBY_EXTERN       591 ruby.h         RUBY_EXTERN VALUE rb_cNumeric;
RUBY_EXTERN       592 ruby.h         RUBY_EXTERN VALUE rb_cProc;
RUBY_EXTERN       593 ruby.h         RUBY_EXTERN VALUE rb_cRange;
RUBY_EXTERN       594 ruby.h         RUBY_EXTERN VALUE rb_cRegexp;
RUBY_EXTERN       595 ruby.h         RUBY_EXTERN VALUE rb_cString;
RUBY_EXTERN       596 ruby.h         RUBY_EXTERN VALUE rb_cSymbol;
RUBY_EXTERN       597 ruby.h         RUBY_EXTERN VALUE rb_cThread;
RUBY_EXTERN       598 ruby.h         RUBY_EXTERN VALUE rb_cTime;
RUBY_EXTERN       599 ruby.h         RUBY_EXTERN VALUE rb_cTrueClass;
RUBY_EXTERN       600 ruby.h         RUBY_EXTERN VALUE rb_cStruct;
RUBY_EXTERN       602 ruby.h         RUBY_EXTERN VALUE rb_eException;
RUBY_EXTERN       603 ruby.h         RUBY_EXTERN VALUE rb_eStandardError;
RUBY_EXTERN       604 ruby.h         RUBY_EXTERN VALUE rb_eSystemExit;
RUBY_EXTERN       605 ruby.h         RUBY_EXTERN VALUE rb_eInterrupt;
RUBY_EXTERN       606 ruby.h         RUBY_EXTERN VALUE rb_eSignal;
RUBY_EXTERN       607 ruby.h         RUBY_EXTERN VALUE rb_eFatal;
RUBY_EXTERN       608 ruby.h         RUBY_EXTERN VALUE rb_eArgError;
RUBY_EXTERN       609 ruby.h         RUBY_EXTERN VALUE rb_eEOFError;
RUBY_EXTERN       610 ruby.h         RUBY_EXTERN VALUE rb_eIndexError;
RUBY_EXTERN       611 ruby.h         RUBY_EXTERN VALUE rb_eRangeError;
RUBY_EXTERN       612 ruby.h         RUBY_EXTERN VALUE rb_eIOError;
RUBY_EXTERN       613 ruby.h         RUBY_EXTERN VALUE rb_eRuntimeError;
RUBY_EXTERN       614 ruby.h         RUBY_EXTERN VALUE rb_eSecurityError;
RUBY_EXTERN       615 ruby.h         RUBY_EXTERN VALUE rb_eSystemCallError;
RUBY_EXTERN       616 ruby.h         RUBY_EXTERN VALUE rb_eTypeError;
RUBY_EXTERN       617 ruby.h         RUBY_EXTERN VALUE rb_eZeroDivError;
RUBY_EXTERN       618 ruby.h         RUBY_EXTERN VALUE rb_eNotImpError;
RUBY_EXTERN       619 ruby.h         RUBY_EXTERN VALUE rb_eNoMemError;
RUBY_EXTERN       620 ruby.h         RUBY_EXTERN VALUE rb_eNoMethodError;
RUBY_EXTERN       621 ruby.h         RUBY_EXTERN VALUE rb_eFloatDomainError;
RUBY_EXTERN       623 ruby.h         RUBY_EXTERN VALUE rb_eScriptError;
RUBY_EXTERN       624 ruby.h         RUBY_EXTERN VALUE rb_eNameError;
RUBY_EXTERN       625 ruby.h         RUBY_EXTERN VALUE rb_eSyntaxError;
RUBY_EXTERN       626 ruby.h         RUBY_EXTERN VALUE rb_eLoadError;
RUBY_EXTERN       628 ruby.h         RUBY_EXTERN VALUE rb_stdin, rb_stdout, rb_stderr;
RUBY_EXTERN       629 ruby.h         RUBY_EXTERN VALUE ruby_errinfo;
RUBY_EXTERN       700 ruby.h         RUBY_EXTERN int is_ruby_native_thread();
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 1005 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "READER",  INT2FIX(GDBM_READER|RUBY_GDBM_RW_BIT));
RUBY_GDBM_RW_BIT 1006 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "WRITER",  INT2FIX(GDBM_WRITER|RUBY_GDBM_RW_BIT));
RUBY_GDBM_RW_BIT 1007 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "WRCREAT", INT2FIX(GDBM_WRCREAT|RUBY_GDBM_RW_BIT));
RUBY_GDBM_RW_BIT 1008 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          301 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_LIB));


RUBY_METHOD_FUNC

RUBY_METHOD_FUNC 1271 ext/socket/socket.c 		     RUBY_METHOD_FUNC(freeaddrinfo), (VALUE)addr);
RUBY_METHOD_FUNC 1546 ext/socket/socket.c 		    RUBY_METHOD_FUNC(freeaddrinfo), (VALUE)arg.res);


RUBY_PLATFORM

RUBY_PLATFORM     254 defines.h      #ifndef RUBY_PLATFORM
RUBY_PLATFORM      64 regex.c        #ifdef RUBY_PLATFORM
RUBY_PLATFORM      19 version.c      const char ruby_platform[] = RUBY_PLATFORM;
RUBY_PLATFORM      41 version.c          printf("ruby %s (%s) [%s]\n", RUBY_VERSION, RUBY_RELEASE_DATE, RUBY_PLATFORM);
RUBY_PLATFORM      69 vms/config.h   #define RUBY_SITE_LIB2    "/RUBY_LIBROOT/site_ruby/" RUBY_PLATFORM
RUBY_PLATFORM      70 vms/config.h   #define RUBY_SITE_ARCHLIB "/RUBY_LIBROOT/site_ruby/" VMS_RUBY_STREAM "/" RUBY_PLATFORM
RUBY_PLATFORM      73 vms/config.h   #define RUBY_ARCHLIB      "/RUBY_LIBROOT/" VMS_RUBY_STREAM "/" RUBY_PLATFORM


RUBY_RELATIVE

RUBY_RELATIVE     291 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_SEARCH_PATH));
RUBY_RELATIVE     294 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_SITE_LIB2));
RUBY_RELATIVE     296 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_SITE_THIN_ARCHLIB));
RUBY_RELATIVE     298 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_SITE_ARCHLIB));
RUBY_RELATIVE     299 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_SITE_LIB));
RUBY_RELATIVE     301 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_LIB));
RUBY_RELATIVE     303 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_THIN_ARCHLIB));
RUBY_RELATIVE     305 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   41 version.c          printf("ruby %s (%s) [%s]\n", RUBY_VERSION, RUBY_RELEASE_DATE, RUBY_PLATFORM);


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       41 version.c          printf("ruby %s (%s) [%s]\n", RUBY_VERSION, RUBY_RELEASE_DATE, RUBY_PLATFORM);


RUBY_VERSION_CODE

RUBY_VERSION_CODE   18 ext/dl/ptr.c   #if RUBY_VERSION_CODE < 171
RUBY_VERSION_CODE   20 ext/strscan/strscan.c #if (RUBY_VERSION_CODE < 150)


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            283 gc.c           	    struct RVALUE *next;
RVALUE            308 gc.c           static RVALUE *freelist = 0;
RVALUE            309 gc.c           static RVALUE *deferred_final_list = 0;
RVALUE            313 gc.c               RVALUE *slot;
RVALUE            324 gc.c           static RVALUE *himem, *lomem;
RVALUE            329 gc.c               RVALUE *p, *pend;
RVALUE            350 gc.c           	RUBY_CRITICAL(p = heaps[heaps_used].slot = (RVALUE*)malloc(sizeof(RVALUE)*heap_slots));
RVALUE            374 gc.c           #define RANY(o) ((RVALUE*)(o))
RVALUE            385 gc.c               MEMZERO((void*)obj, RVALUE, 1);
RVALUE            565 gc.c               RVALUE *p, *pend;
RVALUE            601 gc.c               register RVALUE *p = RANY(ptr);
RVALUE            602 gc.c               register RVALUE *heap_org;
RVALUE            611 gc.c           	    ((((char*)p)-((char*)heap_org))%sizeof(RVALUE)) == 0)
RVALUE            711 gc.c               register RVALUE *obj;
RVALUE            746 gc.c               register RVALUE *obj = RANY(ptr);
RVALUE           1001 gc.c               RVALUE *p;
RVALUE           1004 gc.c           	RVALUE *tmp = p->as.free.next;
RVALUE           1037 gc.c               RVALUE *p, *pend, *final_list;
RVALUE           1065 gc.c           	RVALUE *free = freelist;
RVALUE           1066 gc.c           	RVALUE *final = final_list;
RVALUE           1097 gc.c           	    RVALUE *pp;
RVALUE           1535 gc.c           	RVALUE *p, *pend;
RVALUE           1568 gc.c           	RVALUE *p, *pend;
RVALUE           1812 gc.c               RVALUE *p = deferred_final_list;
RVALUE           1824 gc.c               RVALUE *p, *pend;


R_BITSIZE

R_BITSIZE         564 dln.c              mask = (1 << R_BITSIZE(&(undef->reloc))) - 1;
R_BITSIZE         831 dln.c          	    mask = (1 << R_BITSIZE(rel)) - 1;


R_CAST

R_CAST            154 node.h         #define RNODE(obj)  (R_CAST(RNode)(obj))
R_CAST             29 re.h           #define RMATCH(obj)  (R_CAST(RMatch)(obj))
R_CAST            413 ruby.h         #define RBASIC(obj)  (R_CAST(RBasic)(obj))
R_CAST            414 ruby.h         #define ROBJECT(obj) (R_CAST(RObject)(obj))
R_CAST            415 ruby.h         #define RCLASS(obj)  (R_CAST(RClass)(obj))
R_CAST            417 ruby.h         #define RFLOAT(obj)  (R_CAST(RFloat)(obj))
R_CAST            418 ruby.h         #define RSTRING(obj) (R_CAST(RString)(obj))
R_CAST            419 ruby.h         #define RREGEXP(obj) (R_CAST(RRegexp)(obj))
R_CAST            420 ruby.h         #define RARRAY(obj)  (R_CAST(RArray)(obj))
R_CAST            421 ruby.h         #define RHASH(obj)   (R_CAST(RHash)(obj))
R_CAST            422 ruby.h         #define RDATA(obj)   (R_CAST(RData)(obj))
R_CAST            423 ruby.h         #define RSTRUCT(obj) (R_CAST(RStruct)(obj))
R_CAST            424 ruby.h         #define RBIGNUM(obj) (R_CAST(RBignum)(obj))
R_CAST            425 ruby.h         #define RFILE(obj)   (R_CAST(RFile)(obj))


R_LENGTH

R_LENGTH          522 dln.c              switch (R_LENGTH(reloc)) {
R_LENGTH          567 dln.c              switch (R_LENGTH(&(undef->reloc))) {
R_LENGTH          585 dln.c              switch (R_LENGTH(&(undef->reloc))) {
R_LENGTH          835 dln.c          	    switch (R_LENGTH(rel)) {
R_LENGTH          850 dln.c          	    switch (R_LENGTH(rel)) {


R_MEMORY_SUB

R_MEMORY_SUB      587 dln.c          	if (R_MEMORY_SUB(&(undef->reloc)))
R_MEMORY_SUB      592 dln.c          	if (R_MEMORY_SUB(&(undef->reloc)))
R_MEMORY_SUB      597 dln.c          	if (R_MEMORY_SUB(&(undef->reloc)))


R_OK

R_OK             1123 file.c             if (eaccess(StringValueCStr(fname), R_OK) < 0) return Qfalse;
R_OK             1140 file.c             if (access(StringValueCStr(fname), R_OK) < 0) return Qfalse;
R_OK               15 missing/file.h #ifndef R_OK


R_PCREL

R_PCREL           560 dln.c              if (R_PCREL(&(undef->reloc))) datum -= undef->base;
R_PCREL           826 dln.c          	    if (R_PCREL(rel)) datum -= block;


R_RIGHTSHIFT

R_RIGHTSHIFT      563 dln.c              datum >>= R_RIGHTSHIFT(&(undef->reloc));
R_RIGHTSHIFT      830 dln.c          	    datum >>= R_RIGHTSHIFT(rel);


R_SYMBOL

R_SYMBOL          258 dln.c          #ifndef R_SYMBOL
R_SYMBOL          801 dln.c          		sym = &(syms[R_SYMBOL(rel)]);
R_SYMBOL          814 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            486 re.c           	    Regexp *rp;
Regexp            488 re.c           	    rp = ALLOC(Regexp);
Regexp            489 re.c           	    MEMZERO((char *)rp, Regexp, 1);
Regexp            617 re.c           static Regexp*
Regexp            623 re.c               Regexp *rp;
Regexp            633 re.c               rp = ALLOC(Regexp);
Regexp            634 re.c               MEMZERO((char *)rp, Regexp, 1);


ResetSignal

ResetSignal      2505 win32/win32.c  	    ResetSignal(interrupted_event);
ResetSignal      3008 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   9853 eval.c         	if (level > SAFE_LEVEL_MAX) level = SAFE_LEVEL_MAX;
SAFE_LEVEL_MAX   9875 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 9619 eval.c         #if !defined SAVE_WIN32_EXCEPTION_LIST && !defined _WIN32_WCE
SAVE_WIN32_EXCEPTION_LIST 9659 eval.c         #ifdef SAVE_WIN32_EXCEPTION_LIST
SAVE_WIN32_EXCEPTION_LIST 10071 eval.c         #ifdef SAVE_WIN32_EXCEPTION_LIST
SAVE_WIN32_EXCEPTION_LIST 10205 eval.c         #ifdef SAVE_WIN32_EXCEPTION_LIST


SA_LEN

SA_LEN            165 ext/socket/getnameinfo.c 	len = SA_LEN(sa);
SA_LEN            638 ext/socket/socket.c     error = getnameinfo(addr, SA_LEN(addr), buf, len, NULL, 0, NI_NUMERICHOST);
SA_LEN            841 ext/socket/socket.c 	error = getnameinfo(sockaddr, SA_LEN(sockaddr), hbuf, sizeof(hbuf),
SA_LEN            847 ext/socket/socket.c     error = getnameinfo(sockaddr, SA_LEN(sockaddr), hbuf, sizeof(hbuf),
SA_LEN           2919 ext/socket/socket.c 	if (RSTRING(sa)->len != SA_LEN((struct sockaddr*)&ss)) {
SA_LEN           3005 ext/socket/socket.c     error = getnameinfo(sap, SA_LEN(sap), hbuf, sizeof(hbuf),
SA_LEN           3013 ext/socket/socket.c 	    error = getnameinfo(sap, SA_LEN(sap), hbuf2, sizeof(hbuf2),
SA_LEN             14 ext/socket/sockport.h #ifndef SA_LEN


SA_RESTART

SA_RESTART        341 signal.c       #if defined(SA_RESTART)
SA_RESTART        346 signal.c               sigact.sa_flags |= SA_RESTART; /* SVR4, 4.3+BSD */


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     6722 eval.c             if (ruby_scope->flags == SCOPE_ALLOCA && ruby_class == rb_cObject) {
SCOPE_ALLOCA     1241 gc.c                       RANY(obj)->as.scope.flags != SCOPE_ALLOCA) {


SCOPE_DONT_RECYCLE

SCOPE_DONT_RECYCLE  792 eval.c             if (_old && (ruby_scope->flags & SCOPE_DONT_RECYCLE)) {\
SCOPE_DONT_RECYCLE 1040 eval.c             if (ruby_scope->flags & SCOPE_DONT_RECYCLE) {\
SCOPE_DONT_RECYCLE 1046 eval.c         	if (!(ruby_scope->flags & SCOPE_DONT_RECYCLE) && \
SCOPE_DONT_RECYCLE 1788 eval.c             if (ruby_scope->flags & SCOPE_DONT_RECYCLE)
SCOPE_DONT_RECYCLE 4945 eval.c             if (ruby_scope->flags & SCOPE_DONT_RECYCLE)
SCOPE_DONT_RECYCLE 6321 eval.c         	int dont_recycle = ruby_scope->flags & SCOPE_DONT_RECYCLE;
SCOPE_DONT_RECYCLE 7966 eval.c             scope->flags |= SCOPE_DONT_RECYCLE;


SCOPE_MALLOC

SCOPE_MALLOC     1043 eval.c             if (!(ruby_scope->flags & SCOPE_MALLOC)) {\
SCOPE_MALLOC     7967 eval.c             if (scope->flags & SCOPE_MALLOC) return;
SCOPE_MALLOC     7975 eval.c         	scope->flags |= SCOPE_MALLOC;
SCOPE_MALLOC      969 gc.c           	if (obj->as.scope.local_vars && (obj->as.scope.flags & SCOPE_MALLOC)) {
SCOPE_MALLOC     1245 gc.c           	    if (RANY(obj)->as.scope.flags & SCOPE_MALLOC)
SCOPE_MALLOC     9700 parse.c        	    if (i == 0 || (ruby_scope->flags & SCOPE_MALLOC) == 0) {
SCOPE_MALLOC     9712 parse.c        		ruby_scope->flags |= SCOPE_MALLOC;
SCOPE_MALLOC     5702 parse.y        	    if (i == 0 || (ruby_scope->flags & SCOPE_MALLOC) == 0) {
SCOPE_MALLOC     5714 parse.y        		ruby_scope->flags |= SCOPE_MALLOC;


SCOPE_MODFUNC

SCOPE_MODFUNC     664 eval.c         	    rb_warning((scope_vmode == SCOPE_MODFUNC) ?
SCOPE_MODFUNC    3844 eval.c         	    if (scope_vmode == SCOPE_MODFUNC) {
SCOPE_MODFUNC    7314 eval.c         	SCOPE_SET(SCOPE_MODFUNC);


SCOPE_NOSTACK

SCOPE_NOSTACK    1051 eval.c             ruby_scope->flags |= SCOPE_NOSTACK;	\
SCOPE_NOSTACK    1351 eval.c             top_scope->flags &= ~SCOPE_NOSTACK;
SCOPE_NOSTACK    8327 eval.c             if (data->scope->flags & SCOPE_NOSTACK) {


SCOPE_PRIVATE

SCOPE_PRIVATE     662 eval.c         	if (SCOPE_TEST(SCOPE_PRIVATE)) {
SCOPE_PRIVATE    1326 eval.c             SCOPE_SET(SCOPE_PRIVATE);
SCOPE_PRIVATE    1541 eval.c             SCOPE_SET(SCOPE_PRIVATE);
SCOPE_PRIVATE    3829 eval.c         	    if (SCOPE_TEST(SCOPE_PRIVATE) || node->nd_mid == init) {
SCOPE_PRIVATE    6692 eval.c             SCOPE_SET(SCOPE_PRIVATE);
SCOPE_PRIVATE    7185 eval.c         	SCOPE_SET(SCOPE_PRIVATE);
SCOPE_PRIVATE    9418 eval.c             if (SCOPE_TEST(SCOPE_PRIVATE)) {


SCOPE_PROTECTED

SCOPE_PROTECTED   668 eval.c         	else if (SCOPE_TEST(SCOPE_PROTECTED)) {
SCOPE_PROTECTED  3832 eval.c         	    else if (SCOPE_TEST(SCOPE_PROTECTED)) {
SCOPE_PROTECTED  7150 eval.c         	SCOPE_SET(SCOPE_PROTECTED);
SCOPE_PROTECTED  9421 eval.c             else if (SCOPE_TEST(SCOPE_PROTECTED)) {


SCOPE_PUBLIC

SCOPE_PUBLIC     1032 eval.c             scope_vmode = SCOPE_PUBLIC
SCOPE_PUBLIC     4803 eval.c             scope_vmode = (flags & YIELD_PUBLIC_DEF) ? SCOPE_PUBLIC : block->vmode;
SCOPE_PUBLIC     6460 eval.c             SCOPE_SET(SCOPE_PUBLIC);
SCOPE_PUBLIC     7043 eval.c         		    SCOPE_SET(SCOPE_PUBLIC);
SCOPE_PUBLIC     7124 eval.c         	SCOPE_SET(SCOPE_PUBLIC);


SCOPE_SET

SCOPE_SET        1326 eval.c             SCOPE_SET(SCOPE_PRIVATE);
SCOPE_SET        1541 eval.c             SCOPE_SET(SCOPE_PRIVATE);
SCOPE_SET        6460 eval.c             SCOPE_SET(SCOPE_PUBLIC);
SCOPE_SET        6467 eval.c             SCOPE_SET(mode);
SCOPE_SET        6692 eval.c             SCOPE_SET(SCOPE_PRIVATE);
SCOPE_SET        7043 eval.c         		    SCOPE_SET(SCOPE_PUBLIC);
SCOPE_SET        7056 eval.c             SCOPE_SET(saved.vmode);
SCOPE_SET        7124 eval.c         	SCOPE_SET(SCOPE_PUBLIC);
SCOPE_SET        7150 eval.c         	SCOPE_SET(SCOPE_PROTECTED);
SCOPE_SET        7185 eval.c         	SCOPE_SET(SCOPE_PRIVATE);
SCOPE_SET        7314 eval.c         	SCOPE_SET(SCOPE_MODFUNC);


SCOPE_TEST

SCOPE_TEST        662 eval.c         	if (SCOPE_TEST(SCOPE_PRIVATE)) {
SCOPE_TEST        668 eval.c         	else if (SCOPE_TEST(SCOPE_PROTECTED)) {
SCOPE_TEST       3829 eval.c         	    if (SCOPE_TEST(SCOPE_PRIVATE) || node->nd_mid == init) {
SCOPE_TEST       3832 eval.c         	    else if (SCOPE_TEST(SCOPE_PROTECTED)) {
SCOPE_TEST       9418 eval.c             if (SCOPE_TEST(SCOPE_PRIVATE)) {
SCOPE_TEST       9421 eval.c             else if (SCOPE_TEST(SCOPE_PROTECTED)) {


SCORE_CP932

SCORE_CP932      1395 ext/nkf/nkf-utf8/nkf.c #define SCORE_NO_EXIST (SCORE_CP932 << 1)    /* $BB8:_$7$J$$J8;z(B */
SCORE_CP932      1557 ext/nkf/nkf-utf8/nkf.c                   set_code_score(ptr, SCORE_CP932);


SCORE_DEPEND

SCORE_DEPEND     1394 ext/nkf/nkf-utf8/nkf.c #define SCORE_CP932    (SCORE_DEPEND << 1)   /* CP932 $B$K$h$kFI$_49$((B */
SCORE_DEPEND     1397 ext/nkf/nkf-utf8/nkf.c #define SCORE_NO_EXIST (SCORE_DEPEND << 1)   /* $BB8:_$7$J$$J8;z(B */
SCORE_DEPEND     1407 ext/nkf/nkf-utf8/nkf.c     0, SCORE_DEPEND, SCORE_DEPEND, SCORE_DEPEND,
SCORE_DEPEND     1408 ext/nkf/nkf-utf8/nkf.c     SCORE_DEPEND, SCORE_DEPEND, SCORE_DEPEND, SCORE_NO_EXIST,
SCORE_DEPEND     1413 ext/nkf/nkf-utf8/nkf.c     SCORE_L2, SCORE_DEPEND, SCORE_NO_EXIST, SCORE_NO_EXIST,
SCORE_DEPEND     1414 ext/nkf/nkf-utf8/nkf.c     SCORE_DEPEND, SCORE_DEPEND, SCORE_DEPEND, SCORE_DEPEND,
SCORE_DEPEND     1415 ext/nkf/nkf-utf8/nkf.c     SCORE_DEPEND, SCORE_NO_EXIST, SCORE_NO_EXIST, SCORE_ERROR,


SCORE_ERROR

SCORE_ERROR      1415 ext/nkf/nkf-utf8/nkf.c     SCORE_DEPEND, SCORE_NO_EXIST, SCORE_NO_EXIST, SCORE_ERROR,
SCORE_ERROR      1442 ext/nkf/nkf-utf8/nkf.c         set_code_score(ptr, SCORE_ERROR);


SCORE_KANA

SCORE_KANA       1392 ext/nkf/nkf-utf8/nkf.c #define SCORE_DEPEND   (SCORE_KANA << 1)     /* $B5!<o0MB8J8;z(B */
SCORE_KANA       1444 ext/nkf/nkf-utf8/nkf.c         set_code_score(ptr, SCORE_KANA);


SCORE_L2

SCORE_L2         1391 ext/nkf/nkf-utf8/nkf.c #define SCORE_KANA     (SCORE_L2 << 1)       /* $B$$$o$f$kH>3Q%+%J(B */
SCORE_L2         1412 ext/nkf/nkf-utf8/nkf.c     SCORE_L2, SCORE_L2, SCORE_L2, SCORE_L2,
SCORE_L2         1413 ext/nkf/nkf-utf8/nkf.c     SCORE_L2, SCORE_DEPEND, SCORE_NO_EXIST, SCORE_NO_EXIST,
SCORE_L2         1454 ext/nkf/nkf-utf8/nkf.c         set_code_score(ptr, SCORE_L2);


SCORE_NO_EXIST

SCORE_NO_EXIST   1399 ext/nkf/nkf-utf8/nkf.c #define SCORE_iMIME    (SCORE_NO_EXIST << 1) /* MIME $B$K$h$k;XDj(B */
SCORE_NO_EXIST   1408 ext/nkf/nkf-utf8/nkf.c     SCORE_DEPEND, SCORE_DEPEND, SCORE_DEPEND, SCORE_NO_EXIST,
SCORE_NO_EXIST   1413 ext/nkf/nkf-utf8/nkf.c     SCORE_L2, SCORE_DEPEND, SCORE_NO_EXIST, SCORE_NO_EXIST,
SCORE_NO_EXIST   1415 ext/nkf/nkf-utf8/nkf.c     SCORE_DEPEND, SCORE_NO_EXIST, SCORE_NO_EXIST, SCORE_ERROR,
SCORE_NO_EXIST   1447 ext/nkf/nkf-utf8/nkf.c         set_code_score(ptr, SCORE_NO_EXIST);


SCORE_iMIME

SCORE_iMIME      1400 ext/nkf/nkf-utf8/nkf.c #define SCORE_ERROR    (SCORE_iMIME << 1) /* $B%(%i!<(B */
SCORE_iMIME      1402 ext/nkf/nkf-utf8/nkf.c #define SCORE_INIT (SCORE_iMIME)
SCORE_iMIME      3589 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         3077 file.c             fseeko(f, (off_t)0, SEEK_CUR);
SEEK_CUR          237 io.c           #ifndef SEEK_CUR
SEEK_CUR          258 io.c           	io_seek(fptr, 0, SEEK_CUR);
SEEK_CUR          273 io.c           	io_seek(fptr, 0, SEEK_CUR);
SEEK_CUR         3543 io.c           	fseeko(orig->f, 0L, SEEK_CUR);
SEEK_CUR         3549 io.c           	fseeko(orig->f, 0L, SEEK_CUR);
SEEK_CUR         5649 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         5650 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          703 io.c               int whence = SEEK_SET;
SEEK_SET          732 io.c               pos = io_seek(fptr, pos, SEEK_SET);
SEEK_SET         2297 io.c               int whence = SEEK_SET;
SEEK_SET         3419 io.c           	    io_seek(fptr, pos, SEEK_SET);
SEEK_SET         3420 io.c           	    io_seek(orig, pos, SEEK_SET);
SEEK_SET         3572 io.c               fseeko(fptr->f, ftello(orig->f), SEEK_SET);
SEEK_SET         3578 io.c           	fseeko(fptr->f2, ftello(orig->f2), SEEK_SET);
SEEK_SET         5183 io.c           	rb_io_seek(arg.io, offset, SEEK_SET);
SEEK_SET         5648 io.c               rb_define_const(rb_cIO, "SEEK_SET", INT2FIX(SEEK_SET));
SEEK_SET           46 missing/flock.c     lock.l_whence = SEEK_SET;
SEEK_SET          106 wince/io_wce.c 	case SEEK_SET: flag = FILE_BEGIN;   break;


SEND

SEND             1933 ext/nkf/nkf-utf8/nkf.c                         SEND;
SEND             1942 ext/nkf/nkf-utf8/nkf.c                     SEND;
SEND             1954 ext/nkf/nkf-utf8/nkf.c 		SEND;
SEND             1957 ext/nkf/nkf-utf8/nkf.c                 SEND;
SEND             1970 ext/nkf/nkf-utf8/nkf.c                         SEND;
SEND             1979 ext/nkf/nkf-utf8/nkf.c 			    SEND;
SEND             1992 ext/nkf/nkf-utf8/nkf.c 				SEND;
SEND             2009 ext/nkf/nkf-utf8/nkf.c                         SEND;
SEND             2017 ext/nkf/nkf-utf8/nkf.c 			    SEND;
SEND             2051 ext/nkf/nkf-utf8/nkf.c                     SEND;
SEND             2136 ext/nkf/nkf-utf8/nkf.c                             SEND;
SEND             2145 ext/nkf/nkf-utf8/nkf.c                        SEND;
SEND             2150 ext/nkf/nkf-utf8/nkf.c                        SEND;
SEND             2155 ext/nkf/nkf-utf8/nkf.c                     SEND;
SEND             2159 ext/nkf/nkf-utf8/nkf.c                 SEND;
SEND             2168 ext/nkf/nkf-utf8/nkf.c 		SEND;
SEND             2185 ext/nkf/nkf-utf8/nkf.c 		SEND;
SEND             2187 ext/nkf/nkf-utf8/nkf.c                 SEND;


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       3358 eval.c         	    SETUP_ARGS(node->nd_args);
SETUP_ARGS       3376 eval.c         	    SETUP_ARGS(node->nd_args);
SETUP_ARGS       3391 eval.c         	    SETUP_ARGS(node->nd_args);
SETUP_ARGS       3427 eval.c         		SETUP_ARGS(node->nd_args);
SETUP_ARGS       5244 eval.c             SETUP_ARGS(node->nd_args);


SETUP_ARGS0

SETUP_ARGS0      2199 eval.c         #define SETUP_ARGS(anode) SETUP_ARGS0(anode, anode->nd_alen)
SETUP_ARGS0      3484 eval.c         	    SETUP_ARGS0(node->nd_args->nd_next, node->nd_args->nd_alen - 1);


SET_CURRENT_SOURCE

SET_CURRENT_SOURCE 2653 eval.c             SET_CURRENT_SOURCE();
SET_CURRENT_SOURCE 3119 eval.c         		    SET_CURRENT_SOURCE();
SET_CURRENT_SOURCE 3184 eval.c         	SET_CURRENT_SOURCE();
SET_CURRENT_SOURCE 3362 eval.c         	    SET_CURRENT_SOURCE();
SET_CURRENT_SOURCE 3380 eval.c         	    SET_CURRENT_SOURCE();
SET_CURRENT_SOURCE 3395 eval.c         	    SET_CURRENT_SOURCE();
SET_CURRENT_SOURCE 3401 eval.c         	SET_CURRENT_SOURCE();
SET_CURRENT_SOURCE 3432 eval.c         	    SET_CURRENT_SOURCE();
SET_CURRENT_SOURCE 5169 eval.c         		SET_CURRENT_SOURCE();
SET_CURRENT_SOURCE 5179 eval.c         		SET_CURRENT_SOURCE();


SET_LIST_BIT

SET_LIST_BIT     1507 regex.c        		SET_LIST_BIT(c);
SET_LIST_BIT     1521 regex.c        		SET_LIST_BIT(c);
SET_LIST_BIT     1530 regex.c        		SET_LIST_BIT(c);
SET_LIST_BIT     1538 regex.c        		SET_LIST_BIT(c);
SET_LIST_BIT     1547 regex.c        	      SET_LIST_BIT(c);
SET_LIST_BIT     1555 regex.c        		SET_LIST_BIT(c);
SET_LIST_BIT     1663 regex.c        		SET_LIST_BIT(ch);
SET_LIST_BIT     1686 regex.c        		SET_LIST_BIT(translate[last]);
SET_LIST_BIT     1690 regex.c        		SET_LIST_BIT(last);
SET_LIST_BIT     1710 regex.c        	    SET_LIST_BIT(c);
SET_LIST_BIT     2221 regex.c        	  SET_LIST_BIT(' ');
SET_LIST_BIT     2222 regex.c        	  SET_LIST_BIT('\t');
SET_LIST_BIT     2223 regex.c        	  SET_LIST_BIT('\n');
SET_LIST_BIT     2224 regex.c        	  SET_LIST_BIT('\r');
SET_LIST_BIT     2225 regex.c        	  SET_LIST_BIT('\f');
SET_LIST_BIT     2231 regex.c        	    SET_LIST_BIT(cc);


SET_REGS_MATCHED

SET_REGS_MATCHED 3827 regex.c        	  SET_REGS_MATCHED;
SET_REGS_MATCHED 3834 regex.c        	SET_REGS_MATCHED;
SET_REGS_MATCHED 3845 regex.c        	    SET_REGS_MATCHED;
SET_REGS_MATCHED 3852 regex.c        	  SET_REGS_MATCHED;
SET_REGS_MATCHED 3891 regex.c        	  SET_REGS_MATCHED;
SET_REGS_MATCHED 4232 regex.c        	SET_REGS_MATCHED;
SET_REGS_MATCHED 4242 regex.c        	SET_REGS_MATCHED;
SET_REGS_MATCHED 4292 regex.c        	SET_REGS_MATCHED;


SET_STACK_END

SET_STACK_END     469 gc.c               SET_STACK_END;
SET_STACK_END     481 gc.c               SET_STACK_END;\
SET_STACK_END     489 gc.c               SET_STACK_END;
SET_STACK_END    1314 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    442 ext/nkf/nkf-utf8/nkf.c #ifdef SHIFTJIS_CP932
SHIFTJIS_CP932    952 ext/nkf/nkf-utf8/nkf.c #ifdef SHIFTJIS_CP932
SHIFTJIS_CP932   1033 ext/nkf/nkf-utf8/nkf.c #ifdef SHIFTJIS_CP932
SHIFTJIS_CP932   1043 ext/nkf/nkf-utf8/nkf.c #ifdef SHIFTJIS_CP932
SHIFTJIS_CP932   1052 ext/nkf/nkf-utf8/nkf.c #ifdef SHIFTJIS_CP932
SHIFTJIS_CP932   1393 ext/nkf/nkf-utf8/nkf.c #ifdef SHIFTJIS_CP932
SHIFTJIS_CP932   1527 ext/nkf/nkf-utf8/nkf.c #ifdef SHIFTJIS_CP932
SHIFTJIS_CP932   1553 ext/nkf/nkf-utf8/nkf.c #ifdef SHIFTJIS_CP932
SHIFTJIS_CP932   2343 ext/nkf/nkf-utf8/nkf.c #ifdef SHIFTJIS_CP932
SHIFTJIS_CP932   2420 ext/nkf/nkf-utf8/nkf.c #ifdef SHIFTJIS_CP932
SHIFTJIS_CP932   2793 ext/nkf/nkf-utf8/nkf.c #ifdef SHIFTJIS_CP932
SHIFTJIS_CP932   2930 ext/nkf/nkf-utf8/nkf.c #ifdef SHIFTJIS_CP932
SHIFTJIS_CP932   4624 ext/nkf/nkf-utf8/nkf.c #ifdef SHIFTJIS_CP932
SHIFTJIS_CP932   5237 ext/nkf/nkf-utf8/utf8tbl.c #ifdef SHIFTJIS_CP932


SHIFT_JIS

SHIFT_JIS        2908 ext/nkf/nkf-utf8/nkf.c 	output_mode = SHIFT_JIS;
SHIFT_JIS        2915 ext/nkf/nkf-utf8/nkf.c 	output_mode = SHIFT_JIS;
SHIFT_JIS        2927 ext/nkf/nkf-utf8/nkf.c 	output_mode = SHIFT_JIS;
SHIFT_JIS        3500 ext/nkf/nkf-utf8/nkf.c     JAPANESE_EUC, SHIFT_JIS,ISO8859_1, ISO8859_1, X0208, X0201,


SHORTDN

SHORTDN            43 marshal.c      	num = SHORTDN(num);
SHORTDN           572 marshal.c      			num = SHORTDN(num);


SHORTINT

SHORTINT          544 missing/vsnprintf.c 	    flags&SHORTINT ? (long)(short)va_arg(ap, int) : \
SHORTINT          548 missing/vsnprintf.c 	    flags&SHORTINT ? (u_long)(u_short)va_arg(ap, int) : \
SHORTINT          649 missing/vsnprintf.c 			flags |= SHORTINT;
SHORTINT          759 missing/vsnprintf.c 			else if (flags & SHORTINT)


SHORT_ALIGN

SHORT_ALIGN       206 ext/dl/dl.c          DLALIGN(0,size,SHORT_ALIGN);
SHORT_ALIGN       777 ext/dl/ptr.c   	  DLALIGN(data->ptr,offset,SHORT_ALIGN);
SHORT_ALIGN       907 ext/dl/ptr.c   	  DLALIGN(data->ptr,offset,SHORT_ALIGN);


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            431 signal.c       #ifdef SIGBUS
SIGBUS            609 signal.c       #ifdef SIGBUS
SIGBUS            610 signal.c       	  case SIGBUS:
SIGBUS            881 signal.c       #ifdef SIGBUS
SIGBUS            882 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           350 signal.c           if (signum == SIGCHLD && handler == SIG_IGN)
SIGCHLD           894 signal.c       #ifdef SIGCHLD
SIGCHLD           895 signal.c           init_sigchld(SIGCHLD);


SIGFPE

SIGFPE             59 signal.c       #ifdef SIGFPE
SIGFPE             60 signal.c           {"FPE", SIGFPE},


SIGHUP

SIGHUP           1356 process.c      #ifdef SIGHUP
SIGHUP           1367 process.c      #ifdef SIGHUP
SIGHUP           1368 process.c      	hfunc = signal(SIGHUP, SIG_IGN);
SIGHUP           1383 process.c      #ifdef SIGHUP
SIGHUP           1384 process.c      	signal(SIGHUP, hfunc);
SIGHUP             37 signal.c       #ifdef SIGHUP
SIGHUP             38 signal.c           {"HUP", SIGHUP},
SIGHUP            378 signal.c       #ifdef SIGHUP
SIGHUP            379 signal.c       	  case SIGHUP:
SIGHUP            592 signal.c       #ifdef SIGHUP
SIGHUP            593 signal.c       	  case SIGHUP:
SIGHUP            865 signal.c       #ifdef SIGHUP
SIGHUP            866 signal.c           install_sighandler(SIGHUP, sighandler);


SIGILL

SIGILL             44 signal.c       #ifdef SIGILL
SIGILL             45 signal.c           {"ILL", SIGILL},


SIGINT

SIGINT           1486 eval.c             signal(SIGINT, SIG_DFL);
SIGINT           1373 process.c      	ifunc = signal(SIGINT, SIG_IGN);
SIGINT           1389 process.c      	signal(SIGINT, ifunc);
SIGINT             40 signal.c           {"INT", SIGINT},
SIGINT            375 signal.c       	  case SIGINT:
SIGINT            591 signal.c       	  case SIGINT:
SIGINT            864 signal.c           install_sighandler(SIGINT, sighandler);
SIGINT           2630 win32/win32.c        case SIGINT:
SIGINT            319 win32/win32.h  #ifndef SIGINT


SIGKILL

SIGKILL            62 signal.c       #ifdef SIGKILL
SIGKILL            63 signal.c           {"KILL", SIGKILL},
SIGKILL          2602 win32/win32.c  	(sig != 0 && sig != SIGKILL)) {
SIGKILL          2642 win32/win32.c        case SIGKILL:
SIGKILL           322 win32/win32.h  #ifndef SIGKILL


SIGN_EXTEND

SIGN_EXTEND       289 parse.c        #define nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2)
SIGN_EXTEND       192 parse.y        #define nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2)


SIGN_EXTEND_CHAR

SIGN_EXTEND_CHAR  836 marshal.c          int c = SIGN_EXTEND_CHAR(r_byte(arg));
SIGN_EXTEND_CHAR 6493 parse.c        #define is_identchar(c) (SIGN_EXTEND_CHAR(c)!=-1&&(ISALNUM(c) || (c) == '_' || ismbchar(c)))
SIGN_EXTEND_CHAR 2495 parse.y        #define is_identchar(c) (SIGN_EXTEND_CHAR(c)!=-1&&(ISALNUM(c) || (c) == '_' || ismbchar(c)))
SIGN_EXTEND_CHAR  405 regex.c            (destination) += SIGN_EXTEND_CHAR(*(char*)((source) + 1)) << 8; } while (0)


SIGPIPE

SIGPIPE            74 signal.c       #ifdef SIGPIPE
SIGPIPE            75 signal.c           {"PIPE", SIGPIPE},
SIGPIPE           451 signal.c       #ifdef SIGPIPE
SIGPIPE           619 signal.c       #ifdef SIGPIPE
SIGPIPE           620 signal.c       	  case SIGPIPE:
SIGPIPE           887 signal.c       #ifdef SIGPIPE
SIGPIPE           888 signal.c           install_sighandler(SIGPIPE, sigpipe);


SIGQUIT

SIGQUIT          1359 process.c      #ifdef SIGQUIT
SIGQUIT          1370 process.c      #ifdef SIGQUIT
SIGQUIT          1371 process.c      	qfunc = signal(SIGQUIT, SIG_IGN);
SIGQUIT          1386 process.c      #ifdef SIGQUIT
SIGQUIT          1387 process.c      	signal(SIGQUIT, qfunc);
SIGQUIT            41 signal.c       #ifdef SIGQUIT
SIGQUIT            42 signal.c           {"QUIT", SIGQUIT},
SIGQUIT           381 signal.c       #ifdef SIGQUIT
SIGQUIT           382 signal.c       	  case SIGQUIT:
SIGQUIT           595 signal.c       #ifdef SIGQUIT
SIGQUIT           596 signal.c       	  case SIGQUIT:
SIGQUIT           868 signal.c       #ifdef SIGQUIT
SIGQUIT           869 signal.c           install_sighandler(SIGQUIT, sighandler);


SIGSEGV

SIGSEGV            68 signal.c       #ifdef SIGSEGV
SIGSEGV            69 signal.c           {"SEGV", SIGSEGV},
SIGSEGV           441 signal.c       #ifdef SIGSEGV
SIGSEGV           614 signal.c       #ifdef SIGSEGV
SIGSEGV           615 signal.c       	  case SIGSEGV:
SIGSEGV           884 signal.c       #ifdef SIGSEGV
SIGSEGV           885 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           387 signal.c       #ifdef SIGUSR1
SIGUSR1           388 signal.c       	  case SIGUSR1:
SIGUSR1           601 signal.c       #ifdef SIGUSR1
SIGUSR1           602 signal.c       	  case SIGUSR1:
SIGUSR1           874 signal.c       #ifdef SIGUSR1
SIGUSR1           875 signal.c           install_sighandler(SIGUSR1, sighandler);


SIGUSR2

SIGUSR2           132 signal.c       #ifdef SIGUSR2
SIGUSR2           133 signal.c           {"USR2", SIGUSR2},
SIGUSR2           390 signal.c       #ifdef SIGUSR2
SIGUSR2           391 signal.c       	  case SIGUSR2:
SIGUSR2           604 signal.c       #ifdef SIGUSR2
SIGUSR2           605 signal.c       	  case SIGUSR2:
SIGUSR2           877 signal.c       #ifdef SIGUSR2
SIGUSR2           878 signal.c           install_sighandler(SIGUSR2, sighandler);


SIG_BLOCK

SIG_BLOCK         730 signal.c           sigprocmask(SIG_BLOCK, &arg.mask, &arg.mask);
SIG_BLOCK         792 signal.c           sigprocmask(SIG_BLOCK, &mask, &mask);


SIG_DFL

SIG_DFL          1486 eval.c             signal(SIGINT, SIG_DFL);
SIG_DFL           352 ext/pty/pty.c  	s = signal(SIGCHLD, SIG_DFL);
SIG_DFL           539 signal.c       		func = SIG_DFL;
SIG_DFL           542 signal.c       		func = SIG_DFL;
SIG_DFL           556 signal.c           if (func == SIG_IGN || func == SIG_DFL) {
SIG_DFL           589 signal.c           if (func == SIG_DFL) {
SIG_DFL           770 signal.c           if (old != SIG_DFL) {
SIG_DFL           798 signal.c           oldfunc = ruby_signal(sig, SIG_DFL);
SIG_DFL           799 signal.c           if (oldfunc != SIG_DFL && oldfunc != SIG_IGN) {


SIG_IGN

SIG_IGN          1368 process.c      	hfunc = signal(SIGHUP, SIG_IGN);
SIG_IGN          1371 process.c      	qfunc = signal(SIGQUIT, SIG_IGN);
SIG_IGN          1373 process.c      	ifunc = signal(SIGINT, SIG_IGN);
SIG_IGN           350 signal.c           if (signum == SIGCHLD && handler == SIG_IGN)
SIG_IGN           527 signal.c       	func = SIG_IGN;
SIG_IGN           532 signal.c       	    func = SIG_IGN;
SIG_IGN           536 signal.c       		func = SIG_IGN;
SIG_IGN           547 signal.c       		func = SIG_IGN;
SIG_IGN           556 signal.c           if (func == SIG_IGN || func == SIG_DFL) {
SIG_IGN           629 signal.c       	if (oldfunc == SIG_IGN) oldcmd = rb_str_new2("IGNORE");
SIG_IGN           799 signal.c           if (oldfunc != SIG_DFL && oldfunc != SIG_IGN) {


SIG_SETMASK

SIG_SETMASK       654 signal.c           sigprocmask(SIG_SETMASK, &arg->mask, NULL);
SIG_SETMASK       668 signal.c           sigprocmask(SIG_SETMASK, &trap_last_mask, NULL);
SIG_SETMASK       808 signal.c           sigprocmask(SIG_SETMASK, &mask, NULL);


SIZE16

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


SIZE32

SIZE32             26 pack.c         # define OFF32B(p) ((char*)(p) + (natint?0:(sizeof(long) - SIZE32)))
SIZE32            350 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    109 bignum.c       	if (len*SIZEOF_BDIGITS <= sizeof(VALUE)) {
SIZEOF_BDIGITS    205 bignum.c       	if (len > SIZEOF_LONG_LONG/SIZEOF_BDIGITS)
SIZEOF_BDIGITS    275 bignum.c           len = RBIGNUM(val)->len * SIZEOF_BDIGITS;
SIZEOF_BDIGITS    289 bignum.c       #define BNEG(b) (RSHIFT(((BDIGIT*)b)[QUAD_SIZE/SIZEOF_BDIGITS-1],BITSPERDIG-1) != 0)
SIZEOF_BDIGITS    296 bignum.c           VALUE big = bignew(QUAD_SIZE/SIZEOF_BDIGITS, 1);
SIZEOF_BDIGITS    634 bignum.c           j = SIZEOF_BDIGITS*CHAR_BIT*i;
SIZEOF_BDIGITS    664 bignum.c       #if SIZEOF_BDIGITS > 2
SIZEOF_BDIGITS    684 bignum.c       	k = SIZEOF_BDIGITS;
SIZEOF_BDIGITS    738 bignum.c           if (len > SIZEOF_LONG/SIZEOF_BDIGITS)
SIZEOF_BDIGITS    799 bignum.c           if (len > SIZEOF_LONG_LONG/SIZEOF_BDIGITS)
SIZEOF_BDIGITS   2041 bignum.c           return LONG2FIX(RBIGNUM(big)->len*SIZEOF_BDIGITS);
SIZEOF_BDIGITS     30 marshal.c      #if SIZEOF_SHORT == SIZEOF_BDIGITS
SIZEOF_BDIGITS    566 marshal.c      #if SIZEOF_BDIGITS > SIZEOF_SHORT
SIZEOF_BDIGITS    570 marshal.c      		    for (i=0; i<SIZEOF_BDIGITS; i+=SIZEOF_SHORT) {
SIZEOF_BDIGITS   1117 marshal.c      #if SIZEOF_BDIGITS == SIZEOF_SHORT
SIZEOF_BDIGITS   1124 marshal.c      #if SIZEOF_BDIGITS > SIZEOF_SHORT
SIZEOF_BDIGITS   1132 marshal.c      #if SIZEOF_BDIGITS > SIZEOF_SHORT
SIZEOF_BDIGITS   1136 marshal.c      		for (i=0; i<SIZEOF_BDIGITS; i++) {
SIZEOF_BDIGITS    210 random.c                 len = RBIGNUM(seed)->len * SIZEOF_BDIGITS;
SIZEOF_BDIGITS    230 random.c                   j = i * SIZEOF_BDIGITS / 4;
SIZEOF_BDIGITS    231 random.c       #if SIZEOF_BDIGITS < 4
SIZEOF_BDIGITS    232 random.c                   buf[j] <<= SIZEOF_BDIGITS * 8;
SIZEOF_BDIGITS    271 random.c           big->len = seed_len / SIZEOF_BDIGITS + 1;
SIZEOF_BDIGITS    275 random.c           memset(digits, 0, big->len * SIZEOF_BDIGITS);
SIZEOF_BDIGITS    380 random.c           len = (limit->len * SIZEOF_BDIGITS + 3) / 4;
SIZEOF_BDIGITS    383 random.c       #if SIZEOF_BDIGITS == 2


SIZEOF_DOUBLE

SIZEOF_DOUBLE      78 ext/dl/dl.h    # if SIZEOF_FLOAT == SIZEOF_DOUBLE
SIZEOF_DOUBLE     131 pack.c         #if SIZEOF_DOUBLE == 8


SIZEOF_FLOAT

SIZEOF_FLOAT       78 ext/dl/dl.h    # if SIZEOF_FLOAT == SIZEOF_DOUBLE
SIZEOF_FLOAT      115 pack.c         #if SIZEOF_FLOAT == 4


SIZEOF_INT

SIZEOF_INT         63 defines.h      #if SIZEOF_INT*2 <= SIZEOF_LONG_LONG
SIZEOF_INT         65 defines.h      # define SIZEOF_BDIGITS SIZEOF_INT
SIZEOF_INT         68 defines.h      #elif SIZEOF_INT*2 <= SIZEOF_LONG
SIZEOF_INT         70 defines.h      # define SIZEOF_BDIGITS SIZEOF_INT
SIZEOF_INT         64 ext/dl/dl.h    #if SIZEOF_INT == SIZEOF_LONG
SIZEOF_INT         96 ext/dl/dl.h    #if SIZEOF_INT == SIZEOF_VOIDP && SIZEOF_INT != SIZEOF_LONG
SIZEOF_INT       1548 numeric.c      #if SIZEOF_INT < SIZEOF_LONG
SIZEOF_INT        350 pack.c         #if SIZEOF_LONG == SIZE32 || SIZEOF_INT == SIZE32
SIZEOF_INT        501 regex.c        #if SIZEOF_INT > 4
SIZEOF_INT        249 ruby.h         #if SIZEOF_INT < SIZEOF_LONG
SIZEOF_INT       1260 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       738 bignum.c           if (len > SIZEOF_LONG/SIZEOF_BDIGITS)
SIZEOF_LONG        68 defines.h      #elif SIZEOF_INT*2 <= SIZEOF_LONG
SIZEOF_LONG        73 defines.h      #elif SIZEOF_SHORT*2 <= SIZEOF_LONG
SIZEOF_LONG        80 defines.h      # define SIZEOF_BDIGITS (SIZEOF_LONG/2)
SIZEOF_LONG      8567 eval.c         	len += strlen(node->nd_file) + 2 + (SIZEOF_LONG*CHAR_BIT-NODE_LSHIFT)/3;
SIZEOF_LONG      10300 eval.c             char msg[21+SIZEOF_LONG*2];
SIZEOF_LONG        24 ext/digest/defs.h # if SIZEOF_LONG == 8
SIZEOF_LONG        64 ext/dl/dl.h    #if SIZEOF_INT == SIZEOF_LONG
SIZEOF_LONG        96 ext/dl/dl.h    #if SIZEOF_INT == SIZEOF_VOIDP && SIZEOF_INT != SIZEOF_LONG
SIZEOF_LONG       100 ext/dl/dl.h    #elif SIZEOF_LONG == SIZEOF_VOIDP
SIZEOF_LONG       205 ext/dl/dl.h    #if defined(LONG2NUM) && (SIZEOF_LONG == SIZEOF_VOIDP)
SIZEOF_LONG        99 io.c           #if SIZEOF_OFF_T > SIZEOF_LONG && !defined(HAVE_LONG_LONG)
SIZEOF_LONG       171 marshal.c      #if SIZEOF_LONG > 4
SIZEOF_LONG       484 marshal.c      #if SIZEOF_LONG <= 4
SIZEOF_LONG      1548 numeric.c      #if SIZEOF_INT < SIZEOF_LONG
SIZEOF_LONG      1901 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       350 pack.c         #if SIZEOF_LONG == SIZE32 || SIZEOF_INT == SIZE32
SIZEOF_LONG       223 random.c       #if SIZEOF_LONG > 4
SIZEOF_LONG       347 random.c       #if 4 < SIZEOF_LONG
SIZEOF_LONG       362 random.c           for (i = SIZEOF_LONG/4-1; 0 <= i; i--) {
SIZEOF_LONG        76 ruby.h         #if SIZEOF_LONG != SIZEOF_VOIDP
SIZEOF_LONG       151 ruby.h         #if SIZEOF_OFF_T > SIZEOF_LONG && defined(HAVE_LONG_LONG)
SIZEOF_LONG       249 ruby.h         #if SIZEOF_INT < SIZEOF_LONG
SIZEOF_LONG       271 ruby.h         #if HAVE_LONG_LONG && SIZEOF_OFF_T > SIZEOF_LONG
SIZEOF_LONG      1258 time.c         #if SIZEOF_TIME_T == SIZEOF_LONG
SIZEOF_LONG       209 variable.c     	len = 2 + strlen(s) + 3 + 2 * SIZEOF_LONG + 1;


SIZEOF_LONG_LONG

SIZEOF_LONG_LONG   32 bignum.c       # define DIGSPERLL ((unsigned int)(SIZEOF_LONG_LONG/SIZEOF_BDIGITS))
SIZEOF_LONG_LONG  205 bignum.c       	if (len > SIZEOF_LONG_LONG/SIZEOF_BDIGITS)
SIZEOF_LONG_LONG  215 bignum.c           memcpy(buf, (char*)&q, SIZEOF_LONG_LONG);
SIZEOF_LONG_LONG  229 bignum.c           memcpy(&q, buf, SIZEOF_LONG_LONG);
SIZEOF_LONG_LONG  799 bignum.c           if (len > SIZEOF_LONG_LONG/SIZEOF_BDIGITS)
SIZEOF_LONG_LONG   54 defines.h      #if SIZEOF_LONG_LONG > 0
SIZEOF_LONG_LONG   63 defines.h      #if SIZEOF_INT*2 <= SIZEOF_LONG_LONG
SIZEOF_LONG_LONG 1262 time.c         #elif SIZEOF_TIME_T == SIZEOF_LONG_LONG


SIZEOF_SHORT

SIZEOF_SHORT       73 defines.h      #elif SIZEOF_SHORT*2 <= SIZEOF_LONG
SIZEOF_SHORT       75 defines.h      # define SIZEOF_BDIGITS SIZEOF_SHORT
SIZEOF_SHORT       30 marshal.c      #if SIZEOF_SHORT == SIZEOF_BDIGITS
SIZEOF_SHORT      566 marshal.c      #if SIZEOF_BDIGITS > SIZEOF_SHORT
SIZEOF_SHORT      570 marshal.c      		    for (i=0; i<SIZEOF_BDIGITS; i+=SIZEOF_SHORT) {
SIZEOF_SHORT     1117 marshal.c      #if SIZEOF_BDIGITS == SIZEOF_SHORT
SIZEOF_SHORT     1124 marshal.c      #if SIZEOF_BDIGITS > SIZEOF_SHORT
SIZEOF_SHORT     1132 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      154 pack.c         #if SIZEOF_SHORT == 4	/* SIZEOF_DOUBLE == 8 && 4 == SIZEOF_SHORT */
SIZEOF_SHORT      356 pack.c         #if SIZEOF_SHORT == SIZE16
SIZEOF_SHORT      286 parse.c        #if SIZEOF_SHORT == 2
SIZEOF_SHORT      189 parse.y        #if SIZEOF_SHORT == 2


SIZEOF_VOIDP

SIZEOF_VOIDP       96 ext/dl/dl.h    #if SIZEOF_INT == SIZEOF_VOIDP && SIZEOF_INT != SIZEOF_LONG
SIZEOF_VOIDP      100 ext/dl/dl.h    #elif SIZEOF_LONG == SIZEOF_VOIDP
SIZEOF_VOIDP      205 ext/dl/dl.h    #if defined(LONG2NUM) && (SIZEOF_LONG == SIZEOF_VOIDP)
SIZEOF_VOIDP       76 ruby.h         #if SIZEOF_LONG != SIZEOF_VOIDP


SJIS_INPUT

SJIS_INPUT       1205 ext/nkf/nkf-utf8/nkf.c             input_f = SJIS_INPUT;
SJIS_INPUT       1866 ext/nkf/nkf-utf8/nkf.c     } else if (input_f == SJIS_INPUT) {


SMALLBUF

SMALLBUF         1757 time.c             len = strftime(*buf, SMALLBUF, format, time);
SMALLBUF         1822 time.c             char buffer[SMALLBUF], *buf = buffer;


SMALL_CRITERIA

SMALL_CRITERIA     59 missing/acosh.c     if (z < SMALL_CRITERIA) return x;
SMALL_CRITERIA     83 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               2056 ext/nkf/nkf-utf8/nkf.c             } else if (c1 == SO) {
SO               2624 ext/nkf/nkf-utf8/nkf.c     if (c2 == SO) c2 = X0201;


SO_OPENTYPE

SO_OPENTYPE      1968 win32/win32.c  #ifndef SO_OPENTYPE
SO_OPENTYPE      1972 win32/win32.c      setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE,


SO_SYNCHRONOUS_NONALERT

SO_SYNCHRONOUS_NONALERT 1960 win32/win32.c  #ifndef SO_SYNCHRONOUS_NONALERT
SO_SYNCHRONOUS_NONALERT 1964 win32/win32.c      iSockOpt = SO_SYNCHRONOUS_NONALERT;


SPACE

SPACE            1937 ext/nkf/nkf-utf8/nkf.c                 if ((c1 == DEL) || (c1 <= SPACE)) {
SPACE            2003 ext/nkf/nkf-utf8/nkf.c             } else if ((c1 > SPACE) && (c1 != DEL)) {
SPACE            2010 ext/nkf/nkf-utf8/nkf.c                     } else if (SPACE<=c1 && c1<(0xe0&0x7f) ){
SPACE            2142 ext/nkf/nkf-utf8/nkf.c                    if ( (SPACE<=c3 && c3 < 0x60) || (0xa0<=c3 && c3 < 0xe0)){
SPACE            2161 ext/nkf/nkf-utf8/nkf.c 		if ((c1=(*i_getc)(f))!=EOF && c1 == SPACE) {
SPACE            2162 ext/nkf/nkf-utf8/nkf.c 		    i_ungetc(SPACE,f);
SPACE            2171 ext/nkf/nkf-utf8/nkf.c 		    if (c1==SPACE) {
SPACE            2172 ext/nkf/nkf-utf8/nkf.c 			i_ungetc(SPACE,f);
SPACE            2174 ext/nkf/nkf-utf8/nkf.c 		    } else if (c1 == NL && (c1=(*i_getc)(f))!=EOF && c1 == SPACE) {
SPACE            2175 ext/nkf/nkf-utf8/nkf.c 			i_ungetc(SPACE,f);
SPACE            2373 ext/nkf/nkf-utf8/nkf.c         c1 = c1 - ((c1 > DEL) ? SPACE : 0x1f);
SPACE            2396 ext/nkf/nkf-utf8/nkf.c     } else if ((c2 == EOF) || (c2 == 0) || c2 < SPACE) {
SPACE            2436 ext/nkf/nkf-utf8/nkf.c     } else if ((c2 == EOF) || (c2 == 0) || c2 < SPACE) {
SPACE            3224 ext/nkf/nkf-utf8/nkf.c                 else if (SPACE<=c1 && c1<=(0xdf&0x7f)) {      /* X0201 */
SPACE            3316 ext/nkf/nkf-utf8/nkf.c             (*o_zconv)(dv[(z_prev1-SPACE)*2],dv[(z_prev1-SPACE)*2+1]);
SPACE            3318 ext/nkf/nkf-utf8/nkf.c         } else if (c1==(0xdf&0x7f)&&ev[(z_prev1-SPACE)*2]) {  /* $BH>ByE@(B */
SPACE            3320 ext/nkf/nkf-utf8/nkf.c             (*o_zconv)(ev[(z_prev1-SPACE)*2],ev[(z_prev1-SPACE)*2+1]);
SPACE            3324 ext/nkf/nkf-utf8/nkf.c             (*o_zconv)(cv[(z_prev1-SPACE)*2],cv[(z_prev1-SPACE)*2+1]);
SPACE            3334 ext/nkf/nkf-utf8/nkf.c         if (dv[(c1-SPACE)*2]||ev[(c1-SPACE)*2]) {
SPACE            3339 ext/nkf/nkf-utf8/nkf.c             (*o_zconv)(cv[(c1-SPACE)*2],cv[(c1-SPACE)*2+1]);
SPACE            3524 ext/nkf/nkf-utf8/nkf.c #define nkf_isblank(c) (c == SPACE || c == TAB)
SPACE            3919 ext/nkf/nkf-utf8/nkf.c 			if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
SPACE            3920 ext/nkf/nkf-utf8/nkf.c 			    i_ungetc(SPACE,f);
SPACE            3928 ext/nkf/nkf-utf8/nkf.c 			    if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
SPACE            3929 ext/nkf/nkf-utf8/nkf.c 				i_ungetc(SPACE,f);
SPACE            3941 ext/nkf/nkf-utf8/nkf.c 		case SPACE:
SPACE            3960 ext/nkf/nkf-utf8/nkf.c 		if (c1=='=' && (lwsp_buf[lwsp_count-1]==SPACE||lwsp_buf[lwsp_count-1]==TAB)) {
SPACE            4035 ext/nkf/nkf-utf8/nkf.c 		    if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
SPACE            4036 ext/nkf/nkf-utf8/nkf.c 			i_ungetc(SPACE,f);
SPACE            4044 ext/nkf/nkf-utf8/nkf.c 			if (c1==SPACE) {
SPACE            4045 ext/nkf/nkf-utf8/nkf.c 			    i_ungetc(SPACE,f);
SPACE            4047 ext/nkf/nkf-utf8/nkf.c 			} else if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
SPACE            4048 ext/nkf/nkf-utf8/nkf.c 			    i_ungetc(SPACE,f);
SPACE            4060 ext/nkf/nkf-utf8/nkf.c 	    case SPACE:
SPACE            4079 ext/nkf/nkf-utf8/nkf.c 	    if (c1=='=' && (lwsp_buf[lwsp_count-1]==SPACE||lwsp_buf[lwsp_count-1]==TAB)) {
SPACE            4236 ext/nkf/nkf-utf8/nkf.c 	(*o_mputc)(SPACE);
SPACE            4239 ext/nkf/nkf-utf8/nkf.c 	    && (mimeout_buf[i]==SPACE || mimeout_buf[i]==TAB
SPACE            4246 ext/nkf/nkf-utf8/nkf.c 	    if (mimeout_buf[i]==SPACE || mimeout_buf[i]==TAB
SPACE            4310 ext/nkf/nkf-utf8/nkf.c 	if(c==SPACE){
SPACE            4316 ext/nkf/nkf-utf8/nkf.c 	} else if(c<SPACE||c=='='||c=='?'||c=='_'||DEL<=c) {
SPACE            4361 ext/nkf/nkf-utf8/nkf.c                 (*o_base64conv)(0,SPACE);
SPACE            4433 ext/nkf/nkf-utf8/nkf.c             if (c <= SPACE) {
SPACE            4435 ext/nkf/nkf-utf8/nkf.c                 (*o_mputc)(SPACE);
SPACE            4472 ext/nkf/nkf-utf8/nkf.c                         (*o_mputc)(SPACE);
SPACE            4490 ext/nkf/nkf-utf8/nkf.c             if (lastchar==SPACE) {
SPACE            4495 ext/nkf/nkf-utf8/nkf.c                 mimeout_buf[0] = SPACE;
SPACE            4509 ext/nkf/nkf-utf8/nkf.c                 } else if (SPACE<c && c<DEL) {
SPACE            4518 ext/nkf/nkf-utf8/nkf.c             if (c==SPACE || c==TAB || c==CR || c==NL) {
SPACE            4520 ext/nkf/nkf-utf8/nkf.c                     if (SPACE<mimeout_buf[i] && mimeout_buf[i]<DEL) {
SPACE            4540 ext/nkf/nkf-utf8/nkf.c             if (mimeout_buf_count>0 && SPACE<c && c!='=') {


SPECIAL_CONST_P

SPECIAL_CONST_P    42 compar.c           if (SPECIAL_CONST_P(y)) {
SPECIAL_CONST_P  2213 ext/zlib/zlib.c 	if (!SPECIAL_CONST_P(gz->io) && OBJ_IS_FREED(gz->io)) {
SPECIAL_CONST_P   135 object.c           if (SPECIAL_CONST_P(obj)) {
SPECIAL_CONST_P   449 ruby.h         #define FL_ABLE(x) (!SPECIAL_CONST_P(x))
SPECIAL_CONST_P   673 ruby.h             if (SPECIAL_CONST_P(obj)) return Qtrue;


SPECIAL_SINGLETON

SPECIAL_SINGLETON  866 class.c        	SPECIAL_SINGLETON(Qnil, rb_cNilClass);
SPECIAL_SINGLETON  867 class.c        	SPECIAL_SINGLETON(Qfalse, rb_cFalseClass);
SPECIAL_SINGLETON  868 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              1443 ext/nkf/nkf-utf8/nkf.c     }else if (c2 == SSO){
SSO              1520 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, SSO);
SSO              1585 ext/nkf/nkf-utf8/nkf.c           }else if (SSO == c || (0xa1 <= c && c <= 0xfe)){
SSO              1981 ext/nkf/nkf-utf8/nkf.c                     } else if (c1==SSO && iconv != s_iconv) {
SSO              2433 ext/nkf/nkf-utf8/nkf.c     } else if (c2 == SSO){
SSO              2786 ext/nkf/nkf-utf8/nkf.c         (*o_putc)(SSO); (*o_putc)(c1|0x80);


SSP

SSP              1971 ext/nkf/nkf-utf8/nkf.c                     } else if (SSP<=c1 && c1<0xe0 && iconv == s_iconv) {
SSP              1985 ext/nkf/nkf-utf8/nkf.c                         if (SSP<=c1 && c1<0xe0) {


STACK

STACK            9890 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             444 ext/openssl/ossl_ssl.c     num = sk_num((STACK*)ciphers);
STACK             447 ext/openssl/ossl_ssl.c         cipher = (SSL_CIPHER*)sk_value((STACK*)ciphers, i);


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         450 gc.c           # define STACK_LENGTH  (rb_gc_stack_start - STACK_END + 0x80)
STACK_END         452 gc.c           # define STACK_LENGTH  (rb_gc_stack_start - STACK_END)
STACK_END         454 gc.c           # define STACK_LENGTH  (STACK_END - rb_gc_stack_start + 1)
STACK_END         456 gc.c           # define STACK_LENGTH  ((STACK_END < rb_gc_stack_start) ? rb_gc_stack_start - STACK_END\
STACK_END         457 gc.c                                                      : STACK_END - rb_gc_stack_start + 1)
STACK_END         471 gc.c               if (STACK_END > addr) return grow_direction = 1;
STACK_END         490 gc.c               if (p) *p = STACK_UPPER(STACK_END, rb_gc_stack_start, STACK_END);
STACK_END        1354 gc.c               rb_gc_mark_locations((VALUE*)STACK_END, rb_gc_stack_start);
STACK_END        1356 gc.c               rb_gc_mark_locations(rb_gc_stack_start, (VALUE*)STACK_END + 1);
STACK_END        1358 gc.c               if ((VALUE*)STACK_END < rb_gc_stack_start)
STACK_END        1359 gc.c           	rb_gc_mark_locations((VALUE*)STACK_END, rb_gc_stack_start);
STACK_END        1361 gc.c           	rb_gc_mark_locations(rb_gc_stack_start, (VALUE*)STACK_END + 1);
STACK_END        1382 gc.c               rb_gc_mark_locations((VALUE*)((char*)STACK_END + 2),


STACK_LENGTH

STACK_LENGTH      482 gc.c               (ret) = (STACK_LENGTH > STACK_LEVEL_MAX + GC_WATER_MARK);\
STACK_LENGTH      491 gc.c               return STACK_LENGTH;


STACK_LEVEL_MAX

STACK_LEVEL_MAX   419 gc.c           static unsigned int STACK_LEVEL_MAX = 65535;
STACK_LEVEL_MAX   425 gc.c           static unsigned int STACK_LEVEL_MAX = 655300;
STACK_LEVEL_MAX   482 gc.c               (ret) = (STACK_LENGTH > STACK_LEVEL_MAX + GC_WATER_MARK);\
STACK_LEVEL_MAX  1442 gc.c           #ifndef STACK_LEVEL_MAX
STACK_LEVEL_MAX  1443 gc.c               STACK_LEVEL_MAX = size / sizeof(VALUE);
STACK_LEVEL_MAX  1481 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          110 ext/openssl/ossl.h STACK_OF(X509) *ossl_x509_ary2sk0(VALUE);
STACK_OF          111 ext/openssl/ossl.h STACK_OF(X509) *ossl_x509_ary2sk(VALUE);
STACK_OF          112 ext/openssl/ossl.h STACK_OF(X509) *ossl_protect_x509_ary2sk(VALUE,int*);
STACK_OF          113 ext/openssl/ossl.h VALUE ossl_x509_sk2ary(STACK_OF(X509) *certs);
STACK_OF          114 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          429 ext/openssl/ossl_ssl.c     STACK_OF(SSL_CIPHER) *ciphers;
STACK_OF          782 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_UPPER

STACK_UPPER       490 gc.c               if (p) *p = STACK_UPPER(STACK_END, rb_gc_stack_start, STACK_END);
STACK_UPPER      1456 gc.c           	STACK_UPPER((VALUE *)&m, (VALUE *)m.BaseAddress,
STACK_UPPER      1463 gc.c               STACK_UPPER(&addr, addr, ++addr);
STACK_UPPER      1465 gc.c           	if (STACK_UPPER(&addr,


STATIC

STATIC            287 ext/nkf/nkf-utf8/nkf.c STATIC char *input_codename = "";
STATIC            289 ext/nkf/nkf-utf8/nkf.c STATIC  int     noconvert PROTO((FILE *f));
STATIC            290 ext/nkf/nkf-utf8/nkf.c STATIC  int     kanji_convert PROTO((FILE *f));
STATIC            291 ext/nkf/nkf-utf8/nkf.c STATIC  int     h_conv PROTO((FILE *f,int c2,int c1));
STATIC            292 ext/nkf/nkf-utf8/nkf.c STATIC  int     push_hold_buf PROTO((int c2));
STATIC            293 ext/nkf/nkf-utf8/nkf.c STATIC  void    set_iconv PROTO((int f, int (*iconv_func)(int c2,int c1,int c0)));
STATIC            294 ext/nkf/nkf-utf8/nkf.c STATIC  int     s_iconv PROTO((int c2,int c1,int c0));
STATIC            295 ext/nkf/nkf-utf8/nkf.c STATIC  int     s2e_conv PROTO((int c2, int c1, int *p2, int *p1));
STATIC            296 ext/nkf/nkf-utf8/nkf.c STATIC  int     e_iconv PROTO((int c2,int c1,int c0));
STATIC            298 ext/nkf/nkf-utf8/nkf.c STATIC  int     w2e_conv PROTO((int c2,int c1,int c0,int *p2,int *p1));
STATIC            299 ext/nkf/nkf-utf8/nkf.c STATIC  int     w_iconv PROTO((int c2,int c1,int c0));
STATIC            300 ext/nkf/nkf-utf8/nkf.c STATIC  int     w_iconv16 PROTO((int c2,int c1,int c0));
STATIC            301 ext/nkf/nkf-utf8/nkf.c STATIC  int	w_iconv_common PROTO((int c1,int c0,unsigned short **pp,int psize,int *p2,int *p1));
STATIC            302 ext/nkf/nkf-utf8/nkf.c STATIC  int     ww16_conv PROTO((int c2, int c1, int c0));
STATIC            305 ext/nkf/nkf-utf8/nkf.c STATIC  int     e2w_conv PROTO((int c2,int c1));
STATIC            306 ext/nkf/nkf-utf8/nkf.c STATIC  void    w_oconv PROTO((int c2,int c1));
STATIC            307 ext/nkf/nkf-utf8/nkf.c STATIC  void    w_oconv16 PROTO((int c2,int c1));
STATIC            309 ext/nkf/nkf-utf8/nkf.c STATIC  void    e_oconv PROTO((int c2,int c1));
STATIC            310 ext/nkf/nkf-utf8/nkf.c STATIC  int     e2s_conv PROTO((int c2, int c1, int *p2, int *p1));
STATIC            311 ext/nkf/nkf-utf8/nkf.c STATIC  void    s_oconv PROTO((int c2,int c1));
STATIC            312 ext/nkf/nkf-utf8/nkf.c STATIC  void    j_oconv PROTO((int c2,int c1));
STATIC            313 ext/nkf/nkf-utf8/nkf.c STATIC  void    fold_conv PROTO((int c2,int c1));
STATIC            314 ext/nkf/nkf-utf8/nkf.c STATIC  void    cr_conv PROTO((int c2,int c1));
STATIC            315 ext/nkf/nkf-utf8/nkf.c STATIC  void    z_conv PROTO((int c2,int c1));
STATIC            316 ext/nkf/nkf-utf8/nkf.c STATIC  void    rot_conv PROTO((int c2,int c1));
STATIC            317 ext/nkf/nkf-utf8/nkf.c STATIC  void    hira_conv PROTO((int c2,int c1));
STATIC            318 ext/nkf/nkf-utf8/nkf.c STATIC  void    base64_conv PROTO((int c2,int c1));
STATIC            319 ext/nkf/nkf-utf8/nkf.c STATIC  void    iso2022jp_check_conv PROTO((int c2,int c1));
STATIC            320 ext/nkf/nkf-utf8/nkf.c STATIC  void    no_connection PROTO((int c2,int c1));
STATIC            321 ext/nkf/nkf-utf8/nkf.c STATIC  int     no_connection2 PROTO((int c2,int c1,int c0));
STATIC            323 ext/nkf/nkf-utf8/nkf.c STATIC  void    code_score PROTO((struct input_code *ptr));
STATIC            324 ext/nkf/nkf-utf8/nkf.c STATIC  void    code_status PROTO((int c));
STATIC            326 ext/nkf/nkf-utf8/nkf.c STATIC  void    std_putc PROTO((int c));
STATIC            327 ext/nkf/nkf-utf8/nkf.c STATIC  int     std_getc PROTO((FILE *f));
STATIC            328 ext/nkf/nkf-utf8/nkf.c STATIC  int     std_ungetc PROTO((int c,FILE *f));
STATIC            330 ext/nkf/nkf-utf8/nkf.c STATIC  int     broken_getc PROTO((FILE *f));
STATIC            331 ext/nkf/nkf-utf8/nkf.c STATIC  int     broken_ungetc PROTO((int c,FILE *f));
STATIC            333 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_begin PROTO((FILE *f));
STATIC            334 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_getc PROTO((FILE *f));
STATIC            335 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_ungetc PROTO((int c,FILE *f));
STATIC            337 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_begin_strict PROTO((FILE *f));
STATIC            338 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_getc_buf PROTO((FILE *f));
STATIC            339 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_ungetc_buf  PROTO((int c,FILE *f));
STATIC            340 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_integrity PROTO((FILE *f,unsigned char *p));
STATIC            342 ext/nkf/nkf-utf8/nkf.c STATIC  int     base64decode PROTO((int c));
STATIC            343 ext/nkf/nkf-utf8/nkf.c STATIC  void    mime_prechar PROTO((int c2, int c1));
STATIC            344 ext/nkf/nkf-utf8/nkf.c STATIC  void    mime_putc PROTO((int c));
STATIC            345 ext/nkf/nkf-utf8/nkf.c STATIC  void    open_mime PROTO((int c));
STATIC            346 ext/nkf/nkf-utf8/nkf.c STATIC  void    close_mime PROTO(());
STATIC            347 ext/nkf/nkf-utf8/nkf.c STATIC  void    usage PROTO(());
STATIC            348 ext/nkf/nkf-utf8/nkf.c STATIC  void    version PROTO(());
STATIC            349 ext/nkf/nkf-utf8/nkf.c STATIC  void    options PROTO((unsigned char *c));
STATIC            351 ext/nkf/nkf-utf8/nkf.c STATIC  void    reinit PROTO(());
STATIC            409 ext/nkf/nkf-utf8/nkf.c STATIC int cap_getc PROTO((FILE *f));
STATIC            410 ext/nkf/nkf-utf8/nkf.c STATIC int cap_ungetc PROTO((int c,FILE *f));
STATIC            415 ext/nkf/nkf-utf8/nkf.c STATIC int url_getc PROTO((FILE *f));
STATIC            416 ext/nkf/nkf-utf8/nkf.c STATIC int url_ungetc PROTO((int c,FILE *f));
STATIC            421 ext/nkf/nkf-utf8/nkf.c STATIC int numchar_getc PROTO((FILE *f));
STATIC            422 ext/nkf/nkf-utf8/nkf.c STATIC int numchar_ungetc PROTO((int c,FILE *f));
STATIC            427 ext/nkf/nkf-utf8/nkf.c STATIC void no_putc PROTO((int c));
STATIC            429 ext/nkf/nkf-utf8/nkf.c STATIC void debug PROTO((char *str));
STATIC            433 ext/nkf/nkf-utf8/nkf.c STATIC  void    print_guessed_code PROTO((char *filename));
STATIC            434 ext/nkf/nkf-utf8/nkf.c STATIC  void    set_input_codename PROTO((char *codename));
STATIC            443 ext/nkf/nkf-utf8/nkf.c STATIC int cp932_f = TRUE;
STATIC            447 ext/nkf/nkf-utf8/nkf.c STATIC int cp932inv_f = TRUE;
STATIC            455 ext/nkf/nkf-utf8/nkf.c STATIC int x0212_f = FALSE;
STATIC            460 ext/nkf/nkf-utf8/nkf.c STATIC unsigned char prefix_table[256];
STATIC            462 ext/nkf/nkf-utf8/nkf.c STATIC void e_status PROTO((struct input_code *, int));
STATIC            463 ext/nkf/nkf-utf8/nkf.c STATIC void s_status PROTO((struct input_code *, int));
STATIC            466 ext/nkf/nkf-utf8/nkf.c STATIC void w_status PROTO((struct input_code *, int));
STATIC            467 ext/nkf/nkf-utf8/nkf.c STATIC void w16_status PROTO((struct input_code *, int));
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  122 ruby.c             static char newsub[STATIC_FILE_LENGTH+1];
STATIC_FILE_LENGTH  137 ruby.c         	    if (newl == 0 || oldl == 0 || newl > STATIC_FILE_LENGTH) {
STATIC_FILE_LENGTH  155 ruby.c         	static char ret[STATIC_FILE_LENGTH+1];
STATIC_FILE_LENGTH  160 ruby.c             if (l + newl - oldl > STATIC_FILE_LENGTH || newl > STATIC_FILE_LENGTH) {


STD_GC_BUFSIZE

STD_GC_BUFSIZE    660 ext/nkf/nkf-utf8/nkf.c int std_gc_buf[STD_GC_BUFSIZE];
STD_GC_BUFSIZE   1765 ext/nkf/nkf-utf8/nkf.c     if (std_gc_ndx == STD_GC_BUFSIZE){


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);


STORE_MBC

STORE_MBC         700 regex.c          STORE_MBC(&b[beg*8 + 0], c1);
STORE_MBC         701 regex.c          STORE_MBC(&b[beg*8 + 4], c2);


STORE_NUMBER

STORE_NUMBER      397 regex.c          do { STORE_NUMBER(destination, number);				\
STORE_NUMBER      703 regex.c          STORE_NUMBER(&b[-2], mbc_size);
STORE_NUMBER     1934 regex.c        	STORE_NUMBER(bufp->buffer+stackp[-1], b - bufp->buffer - stackp[-1] - 2);
STORE_NUMBER     1940 regex.c        	STORE_NUMBER(bufp->buffer+stackp[-1], b - bufp->buffer - stackp[-1] - 2);
STORE_NUMBER     1949 regex.c        	STORE_NUMBER(bufp->buffer+stackp[-1], b - bufp->buffer - stackp[-1] - 2);
STORE_NUMBER     2513 regex.c          STORE_NUMBER(from + 1, to - (from + 3));
STORE_NUMBER     2552 regex.c          STORE_NUMBER(from + 1, to - (from + 3));
STORE_NUMBER     2553 regex.c          STORE_NUMBER(from + 3, n);
STORE_NUMBER     2620 regex.c          STORE_NUMBER(there + 1, num_1);
STORE_NUMBER     2621 regex.c          STORE_NUMBER(there + 3, num_2);
STORE_NUMBER     3427 regex.c            STORE_NUMBER(ptr, count);						\
STORE_NUMBER     3800 regex.c        	STORE_NUMBER(p+mcnt, stackp - stackb);
STORE_NUMBER     4114 regex.c        	  STORE_NUMBER(p + 2, mcnt);
STORE_NUMBER     4127 regex.c        	STORE_NUMBER(p1, mcnt);
STORE_NUMBER     4155 regex.c        	  STORE_NUMBER(p + 2, mcnt);


STR2CSTR

STR2CSTR          410 ext/curses/curses.c 	addstr(STR2CSTR(str));
STR2CSTR         1127 ext/curses/curses.c 	waddstr(winp->window, STR2CSTR(str));


STREQ

STREQ             604 regex.c           (STREQ(string, "alpha") || STREQ(string, "upper")			\
STREQ             605 regex.c            || STREQ(string, "lower") || STREQ(string, "digit")			\
STREQ             606 regex.c            || STREQ(string, "alnum") || STREQ(string, "xdigit")		\
STREQ             607 regex.c            || STREQ(string, "space") || STREQ(string, "print")			\
STREQ             608 regex.c            || STREQ(string, "punct") || STREQ(string, "graph")			\
STREQ             609 regex.c            || STREQ(string, "cntrl") || STREQ(string, "blank"))
STREQ            1625 regex.c        	    char is_alnum = STREQ(str, "alnum");
STREQ            1626 regex.c        	    char is_alpha = STREQ(str, "alpha");
STREQ            1627 regex.c        	    char is_blank = STREQ(str, "blank");
STREQ            1628 regex.c        	    char is_cntrl = STREQ(str, "cntrl");
STREQ            1629 regex.c        	    char is_digit = STREQ(str, "digit");
STREQ            1630 regex.c        	    char is_graph = STREQ(str, "graph");
STREQ            1631 regex.c        	    char is_lower = STREQ(str, "lower");
STREQ            1632 regex.c        	    char is_print = STREQ(str, "print");
STREQ            1633 regex.c        	    char is_punct = STREQ(str, "punct");
STREQ            1634 regex.c        	    char is_space = STREQ(str, "space");
STREQ            1635 regex.c        	    char is_upper = STREQ(str, "upper");
STREQ            1636 regex.c        	    char is_xdigit = STREQ(str, "xdigit");


STRICT_MIME

STRICT_MIME       380 ext/nkf/nkf-utf8/nkf.c static int             mime_f = STRICT_MIME;   /* convert MIME B base64 or Q */
STRICT_MIME      1264 ext/nkf/nkf-utf8/nkf.c                 mime_f = STRICT_MIME; cp++;
STRICT_MIME      2034 ext/nkf/nkf-utf8/nkf.c 			if(mime_f == STRICT_MIME) {
STRICT_MIME      3535 ext/nkf/nkf-utf8/nkf.c 	if(mime_f==STRICT_MIME) {
STRICT_MIME      3545 ext/nkf/nkf-utf8/nkf.c     if(mime_f==STRICT_MIME) {
STRICT_MIME      4018 ext/nkf/nkf-utf8/nkf.c 	if (mime_f != STRICT_MIME) goto mime_c2_retry;
STRICT_MIME      4096 ext/nkf/nkf-utf8/nkf.c 	if (mime_f != STRICT_MIME) goto mime_c3_retry;
STRICT_MIME      4104 ext/nkf/nkf-utf8/nkf.c 	if (mime_f != STRICT_MIME) goto mime_c4_retry;
STRICT_MIME      4592 ext/nkf/nkf-utf8/nkf.c     mime_f = STRICT_MIME;


STRIO_EOF

STRIO_EOF         607 ext/stringio/stringio.c     ptr->flags &= ~STRIO_EOF;
STRIO_EOF         625 ext/stringio/stringio.c     ptr->flags &= ~STRIO_EOF;
STRIO_EOF         664 ext/stringio/stringio.c     ptr->flags &= ~STRIO_EOF;
STRIO_EOF         718 ext/stringio/stringio.c 	ptr->flags |= STRIO_EOF;
STRIO_EOF         771 ext/stringio/stringio.c 	ptr->flags &= ~STRIO_EOF;
STRIO_EOF         850 ext/stringio/stringio.c 	ptr->flags |= STRIO_EOF;
STRIO_EOF         863 ext/stringio/stringio.c 		ptr->flags |= STRIO_EOF;
STRIO_EOF        1109 ext/stringio/stringio.c 		ptr->flags |= STRIO_EOF;
STRIO_EOF        1113 ext/stringio/stringio.c 	    else if (ptr->flags & STRIO_EOF) {
STRIO_EOF        1124 ext/stringio/stringio.c 	    ptr->flags |= STRIO_EOF;
STRIO_EOF        1150 ext/stringio/stringio.c 	if (!(ptr->flags & STRIO_EOF)) str = rb_str_new(0, 0);
STRIO_EOF        1156 ext/stringio/stringio.c     if (olen < 0 || olen > len) ptr->flags |= STRIO_EOF;


STR_ASSOC

STR_ASSOC         935 gc.c           	if (FL_TEST(obj, ELTS_SHARED|STR_ASSOC)) {
STR_ASSOC          32 string.c       #define STR_NOCAPA  (ELTS_SHARED|STR_ASSOC)
STR_ASSOC         198 string.c           else if (FL_TEST(orig, STR_ASSOC)) {
STR_ASSOC         513 string.c           if (FL_TEST(str, STR_ASSOC)) {
STR_ASSOC         525 string.c       	FL_SET(str, STR_ASSOC);
STR_ASSOC         533 string.c           if (FL_TEST(str, STR_ASSOC)) {
STR_ASSOC         612 string.c       	beg + len == RSTRING(str)->len && !FL_TEST(str, STR_ASSOC)) {
STR_ASSOC         707 string.c           if (FL_TEST(str, STR_ASSOC)) {
STR_ASSOC         708 string.c       	FL_UNSET(str, STR_ASSOC);
STR_ASSOC         745 string.c           if (FL_TEST(str, STR_ASSOC)) {
STR_ASSOC         772 string.c           if (FL_TEST(str, STR_ASSOC)) {
STR_ASSOC         773 string.c       	FL_UNSET(str, STR_ASSOC);
STR_ASSOC         802 string.c       	if (FL_TEST(str, STR_ASSOC)) {
STR_ASSOC        2259 string.c       	FL_UNSET(str, STR_ASSOC);
STR_ASSOC        2266 string.c       	if (FL_TEST(str2, STR_ASSOC)) {
STR_ASSOC        2267 string.c       	    FL_SET(str, STR_ASSOC);


STR_BUF_MIN_SIZE

STR_BUF_MIN_SIZE  226 string.c           if (capa < STR_BUF_MIN_SIZE) {
STR_BUF_MIN_SIZE  227 string.c       	capa = STR_BUF_MIN_SIZE;


STR_FUNC_ESCAPE

STR_FUNC_ESCAPE  7013 parse.c            str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
STR_FUNC_ESCAPE  7062 parse.c        		if (func & STR_FUNC_ESCAPE) tokadd(c);
STR_FUNC_ESCAPE  7074 parse.c        		    if (func & STR_FUNC_ESCAPE) tokadd('\\');
STR_FUNC_ESCAPE  3015 parse.y            str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
STR_FUNC_ESCAPE  3064 parse.y        		if (func & STR_FUNC_ESCAPE) tokadd(c);
STR_FUNC_ESCAPE  3076 parse.y        		    if (func & STR_FUNC_ESCAPE) tokadd('\\');


STR_FUNC_EXPAND

STR_FUNC_EXPAND  7011 parse.c            str_dquote = (STR_FUNC_EXPAND),
STR_FUNC_EXPAND  7012 parse.c            str_xquote = (STR_FUNC_EXPAND),
STR_FUNC_EXPAND  7013 parse.c            str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
STR_FUNC_EXPAND  7015 parse.c            str_dword  = (STR_FUNC_QWORDS|STR_FUNC_EXPAND),
STR_FUNC_EXPAND  7017 parse.c            str_dsym   = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND),
STR_FUNC_EXPAND  7045 parse.c        	else if ((func & STR_FUNC_EXPAND) && c == '#' && lex_p < lex_pend) {
STR_FUNC_EXPAND  7057 parse.c        		if (func & STR_FUNC_EXPAND) continue;
STR_FUNC_EXPAND  7072 parse.c        		else if (func & STR_FUNC_EXPAND) {
STR_FUNC_EXPAND  7139 parse.c            if ((func & STR_FUNC_EXPAND) && c == '#') {
STR_FUNC_EXPAND  7278 parse.c            if (!(func & STR_FUNC_EXPAND)) {
STR_FUNC_EXPAND  3013 parse.y            str_dquote = (STR_FUNC_EXPAND),
STR_FUNC_EXPAND  3014 parse.y            str_xquote = (STR_FUNC_EXPAND),
STR_FUNC_EXPAND  3015 parse.y            str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
STR_FUNC_EXPAND  3017 parse.y            str_dword  = (STR_FUNC_QWORDS|STR_FUNC_EXPAND),
STR_FUNC_EXPAND  3019 parse.y            str_dsym   = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND),
STR_FUNC_EXPAND  3047 parse.y        	else if ((func & STR_FUNC_EXPAND) && c == '#' && lex_p < lex_pend) {
STR_FUNC_EXPAND  3059 parse.y        		if (func & STR_FUNC_EXPAND) continue;
STR_FUNC_EXPAND  3074 parse.y        		else if (func & STR_FUNC_EXPAND) {
STR_FUNC_EXPAND  3141 parse.y            if ((func & STR_FUNC_EXPAND) && c == '#') {
STR_FUNC_EXPAND  3280 parse.y            if (!(func & STR_FUNC_EXPAND)) {


STR_FUNC_INDENT

STR_FUNC_INDENT  7169 parse.c        	func = STR_FUNC_INDENT;
STR_FUNC_INDENT  7195 parse.c        	    if (func & STR_FUNC_INDENT) {
STR_FUNC_INDENT  7264 parse.c            indent = (func = *eos++) & STR_FUNC_INDENT;
STR_FUNC_INDENT  3171 parse.y        	func = STR_FUNC_INDENT;
STR_FUNC_INDENT  3197 parse.y        	    if (func & STR_FUNC_INDENT) {
STR_FUNC_INDENT  3266 parse.y            indent = (func = *eos++) & STR_FUNC_INDENT;


STR_FUNC_QWORDS

STR_FUNC_QWORDS  7014 parse.c            str_sword  = (STR_FUNC_QWORDS),
STR_FUNC_QWORDS  7015 parse.c            str_dword  = (STR_FUNC_QWORDS|STR_FUNC_EXPAND),
STR_FUNC_QWORDS  7056 parse.c        		if (func & STR_FUNC_QWORDS) break;
STR_FUNC_QWORDS  7077 parse.c        		else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
STR_FUNC_QWORDS  7093 parse.c        	else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
STR_FUNC_QWORDS  7121 parse.c            if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
STR_FUNC_QWORDS  7126 parse.c        	if (func & STR_FUNC_QWORDS) {
STR_FUNC_QWORDS  8193 parse.c        		lex_strterm = NEW_STRTERM(str_dquote | STR_FUNC_QWORDS, term, paren);
STR_FUNC_QWORDS  8199 parse.c        		lex_strterm = NEW_STRTERM(str_squote | STR_FUNC_QWORDS, term, paren);
STR_FUNC_QWORDS  3016 parse.y            str_sword  = (STR_FUNC_QWORDS),
STR_FUNC_QWORDS  3017 parse.y            str_dword  = (STR_FUNC_QWORDS|STR_FUNC_EXPAND),
STR_FUNC_QWORDS  3058 parse.y        		if (func & STR_FUNC_QWORDS) break;
STR_FUNC_QWORDS  3079 parse.y        		else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
STR_FUNC_QWORDS  3095 parse.y        	else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
STR_FUNC_QWORDS  3123 parse.y            if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
STR_FUNC_QWORDS  3128 parse.y        	if (func & STR_FUNC_QWORDS) {
STR_FUNC_QWORDS  4195 parse.y        		lex_strterm = NEW_STRTERM(str_dquote | STR_FUNC_QWORDS, term, paren);
STR_FUNC_QWORDS  4201 parse.y        		lex_strterm = NEW_STRTERM(str_squote | STR_FUNC_QWORDS, term, paren);


STR_FUNC_REGEXP

STR_FUNC_REGEXP  7013 parse.c            str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
STR_FUNC_REGEXP  7066 parse.c        		if (func & STR_FUNC_REGEXP) {
STR_FUNC_REGEXP  7130 parse.c        	if (!(func & STR_FUNC_REGEXP)) return tSTRING_END;
STR_FUNC_REGEXP  3015 parse.y            str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
STR_FUNC_REGEXP  3068 parse.y        		if (func & STR_FUNC_REGEXP) {
STR_FUNC_REGEXP  3132 parse.y        	if (!(func & STR_FUNC_REGEXP)) return tSTRING_END;


STR_FUNC_SYMBOL

STR_FUNC_SYMBOL  7016 parse.c            str_ssym   = (STR_FUNC_SYMBOL),
STR_FUNC_SYMBOL  7017 parse.c            str_dsym   = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND),
STR_FUNC_SYMBOL  7097 parse.c        	if (!c && (func & STR_FUNC_SYMBOL)) {
STR_FUNC_SYMBOL  7098 parse.c        	    func &= ~STR_FUNC_SYMBOL;
STR_FUNC_SYMBOL  3018 parse.y            str_ssym   = (STR_FUNC_SYMBOL),
STR_FUNC_SYMBOL  3019 parse.y            str_dsym   = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND),
STR_FUNC_SYMBOL  3099 parse.y        	if (!c && (func & STR_FUNC_SYMBOL)) {
STR_FUNC_SYMBOL  3100 parse.y        	    func &= ~STR_FUNC_SYMBOL;


STR_NOCAPA

STR_NOCAPA         36 string.c           if (!FL_TEST(str, STR_NOCAPA))\
STR_NOCAPA        269 string.c       	FL_UNSET(str, STR_NOCAPA);
STR_NOCAPA        274 string.c           FL_UNSET(str, STR_NOCAPA);
STR_NOCAPA        275 string.c           if (FL_TEST(str2, STR_NOCAPA)) {
STR_NOCAPA        276 string.c       	FL_SET(str, RBASIC(str2)->flags & STR_NOCAPA);
STR_NOCAPA        285 string.c           FL_UNSET(str2, STR_NOCAPA);
STR_NOCAPA        498 string.c           FL_UNSET(str, STR_NOCAPA);
STR_NOCAPA        684 string.c       	    if (!FL_TEST(str, STR_NOCAPA)) {
STR_NOCAPA       2156 string.c       	FL_UNSET(str, STR_NOCAPA);


STR_TMPLOCK

STR_TMPLOCK       475 string.c           if (FL_TEST(str, STR_TMPLOCK)) {
STR_TMPLOCK       653 string.c           if (FL_TEST(str, STR_TMPLOCK)) {
STR_TMPLOCK       656 string.c           FL_SET(str, STR_TMPLOCK);
STR_TMPLOCK       664 string.c           if (!FL_TEST(str, STR_TMPLOCK)) {
STR_TMPLOCK       667 string.c           FL_UNSET(str, STR_TMPLOCK);


SUCCESS

SUCCESS           533 ext/socket/getaddrinfo.c 			return SUCCESS;
SUCCESS           578 ext/socket/getaddrinfo.c 	return SUCCESS;
SUCCESS           687 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


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           5470 eval.c             id = SYM2ID(argv[0]);
SYM2ID           12879 eval.c         		     rb_id2name(SYM2ID(tag)),
SYM2ID           12885 eval.c         	rb_name_error(SYM2ID(tag), "uncaught throw `%s'", rb_id2name(SYM2ID(tag)));
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            161 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           1892 gc.c               if (SYMBOL_P(ptr) && rb_id2name(SYM2ID((VALUE)ptr)) != 0) {
SYM2ID            498 marshal.c      	w_symbol(SYM2ID(obj), arg);
SYM2ID            640 marshal.c      		    w_symbol(SYM2ID(RARRAY(mem)->ptr[i]), arg);
SYM2ID           1220 marshal.c      			     rb_id2name(SYM2ID(RARRAY(mem)->ptr[i])));
SYM2ID           1139 object.c           ID id = SYM2ID(sym);
SYM2ID           1171 object.c           ID id = SYM2ID(sym);
SYM2ID           1200 object.c           return rb_str_new2(rb_id2name(SYM2ID(sym)));
SYM2ID           1676 object.c       	id = SYM2ID(name);
SYM2ID            245 signal.c       	s = rb_id2name(SYM2ID(argv[0]));
SYM2ID            566 signal.c       	s = rb_id2name(SYM2ID(arg->sig));
SYM2ID             73 struct.c       	rb_ary_push(ary, rb_str_new2(rb_id2name(SYM2ID(*p))));
SYM2ID            171 struct.c       	if (rb_id_attrset(SYM2ID(slot)) == id) {
SYM2ID            214 struct.c       	ID id = SYM2ID(RARRAY(members)->ptr[i]);
SYM2ID            490 struct.c       	id = SYM2ID(slot);
SYM2ID            578 struct.c       	if (SYM2ID(RARRAY(members)->ptr[i]) == id) {
SYM2ID            642 struct.c       	if (SYM2ID(RARRAY(members)->ptr[i]) == id) {
SYM2ID            157 variable.c     	    path = rb_str_new2(rb_id2name(SYM2ID(path)));


SYMBOL_FLAG

SYMBOL_FLAG       168 ruby.h         #define SYMBOL_P(x) (((VALUE)(x)&0xff)==SYMBOL_FLAG)
SYMBOL_FLAG       169 ruby.h         #define ID2SYM(x) ((VALUE)(((long)(x))<<8|SYMBOL_FLAG))


SYMBOL_P

SYMBOL_P          660 array.c        	if (SYMBOL_P(argv[0])) {
SYMBOL_P          678 array.c            if (SYMBOL_P(arg)) {
SYMBOL_P         1040 array.c        	if (SYMBOL_P(argv[0])) {
SYMBOL_P         1043 array.c        	if (SYMBOL_P(argv[1])) {
SYMBOL_P         1056 array.c            if (SYMBOL_P(argv[0])) {
SYMBOL_P          862 class.c            if (FIXNUM_P(obj) || SYMBOL_P(obj)) {
SYMBOL_P          269 error.c        		else if (SYMBOL_P(x)) {
SYMBOL_P         3861 eval.c         	    if (FIXNUM_P(recv) || SYMBOL_P(recv)) {
SYMBOL_P         4001 eval.c         	    if (FIXNUM_P(result) || SYMBOL_P(result)) {
SYMBOL_P         5464 eval.c             if (argc == 0 || !SYMBOL_P(argv[0])) {
SYMBOL_P         6595 eval.c             if (FIXNUM_P(self) || SYMBOL_P(self)) {
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         1892 gc.c               if (SYMBOL_P(ptr) && rb_id2name(SYM2ID((VALUE)ptr)) != 0) {
SYMBOL_P           71 hash.c             if (SYMBOL_P(a) && SYMBOL_P(b)) {
SYMBOL_P          497 marshal.c          else if (SYMBOL_P(obj)) {
SYMBOL_P          643 ruby.h             if (SYMBOL_P(obj)) return rb_cSymbol;
SYMBOL_P          661 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            2019 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;


SYNTAX

SYNTAX           1505 regex.c        	      if (SYNTAX(c) == Sword ||
SYNTAX           1506 regex.c        		  (!current_mbctype && SYNTAX(c) == Sword2))
SYNTAX           1518 regex.c        	      if (SYNTAX(c) != Sword &&
SYNTAX           1520 regex.c        		  (!current_mbctype && SYNTAX(c) != Sword2)))
SYNTAX           2949 regex.c        	  if (SYNTAX(j) == Sword)
SYNTAX           2955 regex.c        	    if (SYNTAX(j) == Sword2)
SYNTAX           2972 regex.c        	  if (SYNTAX(j) != Sword)
SYNTAX           2977 regex.c        	    if (SYNTAX(j) != Sword2)
SYNTAX           3468 regex.c        #define IS_A_LETTER(d) (SYNTAX(*(d)) == Sword ||			\
SYNTAX           3471 regex.c        			 SYNTAX(*(d)) == Sword2))


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          1950 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_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         118 ext/syck/rubyext.c     ret = S_ALLOC_N( char, strlen( sav->buffer ) + 3 );
S_ALLOC_N        1046 ext/syck/rubyext.c     ivn = S_ALLOC_N( char, RSTRING(ivname)->len + 2 );
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            125 ext/syck/rubyext.c     bc = rb_str_new2( ret );  S_FREE( ret );
S_FREE            746 ext/syck/rubyext.c     S_FREE( p->bonus );
S_FREE           1051 ext/syck/rubyext.c     S_FREE( ivn );
S_FREE           1206 ext/syck/rubyext.c         S_FREE( taguri );
S_FREE           1764 ext/syck/rubyext.c     S_FREE( node->type_id );
S_FREE           1935 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          2850 win32/win32.c  	mode |= S_IFDIR | S_IEXEC;
S_IEXEC          2865 win32/win32.c  		    mode |= S_IEXEC;


S_IFCHR

S_IFCHR          1080 file.c         #   define S_ISCHR(m) ((m & S_IFMT) == S_IFCHR)
S_IFCHR           254 win32/win32.h  #define S_ISCHR(m)  (((unsigned short)(m) & S_IFMT) == S_IFCHR)


S_IFDIR

S_IFDIR           881 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           918 file.c         #   define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
S_IFDIR            75 util.c         #   define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
S_IFDIR          1375 win32/win32.c      if (!(sbuf.st_mode & S_IFDIR) &&
S_IFDIR          2850 win32/win32.c  	mode |= S_IFDIR | S_IEXEC;
S_IFDIR           251 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           939 file.c         #ifdef S_IFIFO
S_IFIFO           941 file.c         #    define S_ISFIFO(m) ((m & S_IFMT) == S_IFIFO)
S_IFIFO          3556 file.c         #ifdef S_IFIFO
S_IFIFO           241 win32/win32.h  #if !defined S_IFIFO && defined _S_IFIFO
S_IFIFO           252 win32/win32.h  #define S_ISFIFO(m) (((unsigned short)(m) & S_IFMT) == S_IFIFO)


S_IFMT

S_IFMT            881 dir.c          #   define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
S_IFMT             58 dln.c          #   define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
S_IFMT            918 file.c         #   define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
S_IFMT            941 file.c         #    define S_ISFIFO(m) ((m & S_IFMT) == S_IFIFO)
S_IFMT            969 file.c         #      define S_ISLNK(m) (((unsigned short)(m) & S_IFMT) == _S_IFLNK)
S_IFMT            972 file.c         #        define S_ISLNK(m) (((unsigned short)(m) & S_IFMT) == S_IFLNK)
S_IFMT            977 file.c         #      define S_ISLNK(m) ((m & S_IFMT) == _S_IFLNK)
S_IFMT            980 file.c         #	 define S_ISLNK(m) ((m & S_IFMT) == S_IFLNK)
S_IFMT           1013 file.c         #      define S_ISSOCK(m) (((unsigned short)(m) & S_IFMT) == _S_IFSOCK)
S_IFMT           1016 file.c         #        define S_ISSOCK(m) (((unsigned short)(m) & S_IFMT) == S_IFSOCK)
S_IFMT           1021 file.c         #      define S_ISSOCK(m) ((m & S_IFMT) == _S_IFSOCK)
S_IFMT           1024 file.c         #	 define S_ISSOCK(m) ((m & S_IFMT) == S_IFSOCK)
S_IFMT           1053 file.c         #	define S_ISBLK(m) ((m & S_IFMT) == S_IFBLK)
S_IFMT           1080 file.c         #   define S_ISCHR(m) ((m & S_IFMT) == S_IFCHR)
S_IFMT           1214 file.c         #   define S_ISREG(m) ((m & S_IFMT) == S_IFREG)
S_IFMT            406 io.c           #   define S_ISREG(m) ((m & S_IFMT) == S_IFREG)
S_IFMT             75 util.c         #   define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
S_IFMT            251 win32/win32.h  #define S_ISDIR(m)  (((unsigned short)(m) & S_IFMT) == S_IFDIR)
S_IFMT            252 win32/win32.h  #define S_ISFIFO(m) (((unsigned short)(m) & S_IFMT) == S_IFIFO)
S_IFMT            253 win32/win32.h  #define S_ISBLK(m)  (((unsigned short)(m) & S_IFMT) == S_IFBLK)
S_IFMT            254 win32/win32.h  #define S_ISCHR(m)  (((unsigned short)(m) & S_IFMT) == S_IFCHR)
S_IFMT            255 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          1214 file.c         #   define S_ISREG(m) ((m & S_IFMT) == S_IFREG)
S_IFREG           406 io.c           #   define S_ISREG(m) ((m & S_IFMT) == S_IFREG)
S_IFREG          2853 win32/win32.c  	mode |= S_IFREG;
S_IFREG          2856 win32/win32.c      if (path && (mode & S_IFREG)) {
S_IFREG           255 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           784 ext/nkf/nkf-utf8/nkf.c                                 S_IREAD | S_IWRITE);
S_IREAD          2843 win32/win32.c  	mode |= S_IREAD;
S_IREAD          2846 win32/win32.c  	mode |= S_IREAD | S_IWRITE | S_IWUSR;


S_IRGRP

S_IRGRP           110 defines.h      #ifndef S_IRGRP
S_IRGRP          3729 file.c         #ifdef S_IRGRP
S_IRGRP          3731 file.c         	return st->st_mode & S_IRGRP ? Qtrue : Qfalse;
S_IRGRP          3762 file.c         #ifdef S_IRGRP
S_IRGRP          3764 file.c         	return st->st_mode & S_IRGRP ? Qtrue : Qfalse;
S_IRGRP           261 win32/win32.h  #ifndef S_IRGRP


S_IROTH

S_IROTH           113 defines.h      #ifndef S_IROTH
S_IROTH          3733 file.c         #ifdef S_IROTH
S_IROTH          3734 file.c             if (!(st->st_mode & S_IROTH)) return Qfalse;
S_IROTH          3766 file.c         #ifdef S_IROTH
S_IROTH          3767 file.c             if (!(st->st_mode & S_IROTH)) return Qfalse;
S_IROTH           264 win32/win32.h  #ifndef S_IROTH


S_IRUSR

S_IRUSR           107 defines.h      #ifndef S_IRUSR
S_IRUSR          3725 file.c         #ifdef S_IRUSR
S_IRUSR          3727 file.c         	return st->st_mode & S_IRUSR ? Qtrue : Qfalse;
S_IRUSR          3758 file.c         #ifdef S_IRUSR
S_IRUSR          3760 file.c         	return st->st_mode & S_IRUSR ? Qtrue : Qfalse;
S_IRUSR           258 win32/win32.h  #if !defined S_IRUSR && !defined __MINGW32__


S_ISBLK

S_ISBLK           143 defines.h      #ifndef S_ISBLK
S_ISBLK          1051 file.c         #ifndef S_ISBLK
S_ISBLK          1059 file.c         #ifdef S_ISBLK
S_ISBLK          1063 file.c             if (S_ISBLK(st.st_mode)) return Qtrue;
S_ISBLK          1494 file.c         #ifdef S_ISBLK
S_ISBLK          1495 file.c             else if (S_ISBLK(st->st_mode)) {
S_ISBLK          3630 file.c         #ifdef S_ISBLK
S_ISBLK          3631 file.c             if (S_ISBLK(get_stat(obj)->st_mode)) return Qtrue;


S_ISCHR

S_ISCHR           146 defines.h      #ifndef S_ISCHR
S_ISCHR          1079 file.c         #ifndef S_ISCHR
S_ISCHR          1086 file.c             if (S_ISCHR(st.st_mode)) return Qtrue;
S_ISCHR          1491 file.c             else if (S_ISCHR(st->st_mode)) {
S_ISCHR          3653 file.c             if (S_ISCHR(get_stat(obj)->st_mode)) return Qtrue;
S_ISCHR           277 random.c       #ifdef S_ISCHR
S_ISCHR           289 random.c               if (fstat(fd, &statbuf) == 0 && S_ISCHR(statbuf.st_mode)) {


S_ISDIR

S_ISDIR           149 defines.h      #ifndef S_ISDIR
S_ISDIR           880 dir.c          #ifndef S_ISDIR
S_ISDIR           979 dir.c          	    if (S_ISDIR(st.st_mode)) {
S_ISDIR          1021 dir.c          		    if (S_ISDIR(st.st_mode)) {
S_ISDIR          1055 dir.c          			    if (S_ISDIR(st.st_mode)) {
S_ISDIR            57 dln.c          #ifndef S_ISDIR
S_ISDIR          1814 dln.c          	    if (!S_ISDIR(st.st_mode) && eaccess(fbuf, X_OK) == 0)
S_ISDIR          1822 dln.c          		if (!S_ISDIR(st.st_mode) && eaccess(mac_fullpath, X_OK) == 0)
S_ISDIR           917 file.c         #ifndef S_ISDIR
S_ISDIR           924 file.c             if (S_ISDIR(st.st_mode)) return Qtrue;
S_ISDIR          1488 file.c             else if (S_ISDIR(st->st_mode)) {
S_ISDIR          3540 file.c             if (S_ISDIR(get_stat(obj)->st_mode)) return Qtrue;
S_ISDIR          4071 file.c         	if (stat(p0, &st) == 0 && S_ISDIR(st.st_mode) && (st.st_mode & S_IWOTH)
S_ISDIR            74 util.c         #ifndef S_ISDIR
S_ISDIR            23 wince/sys/stat.h #ifndef S_ISDIR


S_ISFIFO

S_ISFIFO          152 defines.h      #ifndef S_ISFIFO
S_ISFIFO          940 file.c         #  ifndef S_ISFIFO
S_ISFIFO          947 file.c             if (S_ISFIFO(st.st_mode)) return Qtrue;
S_ISFIFO         1499 file.c         #ifdef S_ISFIFO
S_ISFIFO         1500 file.c             else if (S_ISFIFO(st->st_mode)) {
S_ISFIFO         3557 file.c             if (S_ISFIFO(get_stat(obj)->st_mode)) return Qtrue;


S_ISLNK

S_ISLNK           964 file.c         #ifndef S_ISLNK
S_ISLNK           986 file.c         #ifdef S_ISLNK
S_ISLNK           991 file.c             if (S_ISLNK(st.st_mode)) return Qtrue;
S_ISLNK          1504 file.c         #ifdef S_ISLNK
S_ISLNK          1505 file.c             else if (S_ISLNK(st->st_mode)) {
S_ISLNK          3584 file.c         #ifdef S_ISLNK
S_ISLNK          3585 file.c             if (S_ISLNK(get_stat(obj)->st_mode)) return Qtrue;


S_ISREG

S_ISREG           155 defines.h      #ifndef S_ISREG
S_ISREG          1213 file.c         #ifndef S_ISREG
S_ISREG          1232 file.c             if (S_ISREG(st.st_mode)) return Qtrue;
S_ISREG          1485 file.c             if (S_ISREG(st->st_mode)) {
S_ISREG          3911 file.c             if (S_ISREG(get_stat(obj)->st_mode)) return Qtrue;
S_ISREG           405 io.c           #ifndef S_ISREG
S_ISREG           417 io.c                       !S_ISREG(buf.st_mode)
S_ISREG          1116 io.c               if (fstat(fileno(fptr->f), &st) == 0  && S_ISREG(st.st_mode)
S_ISREG            26 wince/sys/stat.h #ifndef S_ISREG


S_ISSOCK

S_ISSOCK         1008 file.c         #ifndef S_ISSOCK
S_ISSOCK         1030 file.c         #ifdef S_ISSOCK
S_ISSOCK         1034 file.c             if (S_ISSOCK(st.st_mode)) return Qtrue;
S_ISSOCK         1509 file.c         #ifdef S_ISSOCK
S_ISSOCK         1510 file.c             else if (S_ISSOCK(st->st_mode)) {
S_ISSOCK         3606 file.c         #ifdef S_ISSOCK
S_ISSOCK         3607 file.c             if (S_ISSOCK(get_stat(obj)->st_mode)) return Qtrue;


S_IWGRP

S_IWGRP           119 defines.h      #ifndef S_IWGRP
S_IWGRP          3793 file.c         #ifdef S_IWGRP
S_IWGRP          3795 file.c         	return st->st_mode & S_IWGRP ? Qtrue : Qfalse;
S_IWGRP          3824 file.c         #ifdef S_IWGRP
S_IWGRP          3826 file.c         	return st->st_mode & S_IWGRP ? Qtrue : Qfalse;
S_IWGRP          2954 win32/win32.c  	st->st_mode &= ~(S_IWGRP | S_IWOTH);
S_IWGRP           271 win32/win32.h  #ifndef S_IWGRP


S_IWOTH

S_IWOTH           122 defines.h      #ifndef S_IWOTH
S_IWOTH          3797 file.c         #ifdef S_IWOTH
S_IWOTH          3798 file.c             if (!(st->st_mode & S_IWOTH)) return Qfalse;
S_IWOTH          3828 file.c         #ifdef S_IWOTH
S_IWOTH          3829 file.c             if (!(st->st_mode & S_IWOTH)) return Qfalse;
S_IWOTH          4068 file.c         #ifndef S_IWOTH
S_IWOTH          4071 file.c         	if (stat(p0, &st) == 0 && S_ISDIR(st.st_mode) && (st.st_mode & S_IWOTH)
S_IWOTH          2954 win32/win32.c  	st->st_mode &= ~(S_IWGRP | S_IWOTH);
S_IWOTH           274 win32/win32.h  #ifndef S_IWOTH


S_IWRITE

S_IWRITE          784 ext/nkf/nkf-utf8/nkf.c                                 S_IREAD | S_IWRITE);
S_IWRITE         2846 win32/win32.c  	mode |= S_IREAD | S_IWRITE | S_IWUSR;


S_IWUSR

S_IWUSR           116 defines.h      #ifndef S_IWUSR
S_IWUSR          3789 file.c         #ifdef S_IWUSR
S_IWUSR          3791 file.c         	return st->st_mode & S_IWUSR ? Qtrue : Qfalse;
S_IWUSR          3820 file.c         #ifdef S_IWUSR
S_IWUSR          3822 file.c         	return st->st_mode & S_IWUSR ? Qtrue : Qfalse;
S_IWUSR          2846 win32/win32.c  	mode |= S_IREAD | S_IWRITE | S_IWUSR;
S_IWUSR           268 win32/win32.h  #if !defined S_IWUSR && !defined __MINGW32__


S_IXGRP

S_IXGRP           128 defines.h      #ifndef S_IXGRP
S_IXGRP           849 file.c         #  define S_IXUGO		(S_IXUSR | S_IXGRP | S_IXOTH)
S_IXGRP           857 file.c         #if defined(S_IXGRP) && !defined(_WIN32) && !defined(__CYGWIN__)
S_IXGRP          3857 file.c         #ifdef S_IXGRP
S_IXGRP          3859 file.c         	return st->st_mode & S_IXGRP ? Qtrue : Qfalse;
S_IXGRP          3886 file.c         #ifdef S_IXGRP
S_IXGRP          3888 file.c         	return st->st_mode & S_IXGRP ? Qtrue : Qfalse;
S_IXGRP           281 win32/win32.h  #ifndef S_IXGRP


S_IXOTH

S_IXOTH           131 defines.h      #ifndef S_IXOTH
S_IXOTH           849 file.c         #  define S_IXUGO		(S_IXUSR | S_IXGRP | S_IXOTH)
S_IXOTH          3861 file.c         #ifdef S_IXOTH
S_IXOTH          3862 file.c             if (!(st->st_mode & S_IXOTH)) return Qfalse;
S_IXOTH          3890 file.c         #ifdef S_IXOTH
S_IXOTH          3891 file.c             if (!(st->st_mode & S_IXOTH)) return Qfalse;
S_IXOTH           284 win32/win32.h  #ifndef S_IXOTH


S_IXUGO

S_IXUGO           848 file.c         #ifndef S_IXUGO
S_IXUGO           872 file.c         	if (st.st_mode & S_IXUGO)


S_IXUSR

S_IXUSR           125 defines.h      #ifndef S_IXUSR
S_IXUSR           849 file.c         #  define S_IXUGO		(S_IXUSR | S_IXGRP | S_IXOTH)
S_IXUSR          3853 file.c         #ifdef S_IXUSR
S_IXUSR          3855 file.c         	return st->st_mode & S_IXUSR ? Qtrue : Qfalse;
S_IXUSR          3882 file.c         #ifdef S_IXUSR
S_IXUSR          3884 file.c         	return st->st_mode & S_IXUSR ? Qtrue : Qfalse;
S_IXUSR           278 win32/win32.h  #if !defined S_IXUSR && !defined __MINGW32__


S_LEN

S_LEN              57 ext/strscan/strscan.c #define S_PEND(s)  (S_PBEG(s) + S_LEN(s))
S_LEN              59 ext/strscan/strscan.c #define S_RESTLEN(s) (S_LEN(s) - (s)->curr)
S_LEN             144 ext/strscan/strscan.c     if (beg_i > S_LEN(p)) return Qnil;
S_LEN             145 ext/strscan/strscan.c     if (end_i > S_LEN(p))
S_LEN             146 ext/strscan/strscan.c         end_i = S_LEN(p);
S_LEN             155 ext/strscan/strscan.c     if (beg_i > S_LEN(p)) return Qnil;
S_LEN             156 ext/strscan/strscan.c     if (beg_i + len > S_LEN(p))
S_LEN             157 ext/strscan/strscan.c         len = S_LEN(p) - beg_i;
S_LEN             265 ext/strscan/strscan.c     p->curr = S_LEN(p);
S_LEN             384 ext/strscan/strscan.c     if (i < 0) i += S_LEN(p);
S_LEN             386 ext/strscan/strscan.c     if (i > S_LEN(p)) rb_raise(rb_eRangeError, "index out of range");
S_LEN             688 ext/strscan/strscan.c     if (p->curr + len > S_LEN(p))
S_LEN             689 ext/strscan/strscan.c         len = S_LEN(p) - p->curr;
S_LEN             761 ext/strscan/strscan.c     if (p->curr + len > S_LEN(p))
S_LEN             762 ext/strscan/strscan.c         len = S_LEN(p) - p->curr;
S_LEN            1034 ext/strscan/strscan.c     return extract_range(p, p->prev + p->regs.end[0], S_LEN(p));
S_LEN            1051 ext/strscan/strscan.c     return extract_range(p, p->curr, S_LEN(p));
S_LEN            1069 ext/strscan/strscan.c     i = S_LEN(p) - p->curr;
S_LEN            1123 ext/strscan/strscan.c                        p->curr, S_LEN(p),
S_LEN            1131 ext/strscan/strscan.c                    p->curr, S_LEN(p),
S_LEN            1166 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        1951 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             57 ext/strscan/strscan.c #define S_PEND(s)  (S_PBEG(s) + S_LEN(s))
S_PBEG             58 ext/strscan/strscan.c #define CURPTR(s) (S_PBEG(s) + (s)->curr)
S_PBEG            147 ext/strscan/strscan.c     return infect(rb_str_new(S_PBEG(p) + beg_i, end_i - beg_i), p);
S_PBEG            158 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         413 ext/strscan/strscan.c                        CURPTR(p), S_RESTLEN(p),
S_RESTLEN         419 ext/strscan/strscan.c                         CURPTR(p), S_RESTLEN(p),
S_RESTLEN         421 ext/strscan/strscan.c                         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   274 dir.c              SafeStringValue(dirname);
SafeStringValue   636 dir.c          	SafeStringValue(path);
SafeStringValue   699 dir.c              SafeStringValue(*dir);
SafeStringValue  1246 dir.c              SafeStringValue(str);
SafeStringValue  6409 eval.c         	SafeStringValue(src);
SafeStringValue  6500 eval.c         	SafeStringValue(src);
SafeStringValue  6548 eval.c         		SafeStringValue(argv[0]);
SafeStringValue  6660 eval.c         	SafeStringValue(fname);
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   580 ext/dl/dl.c      SafeStringValue(str);
SafeStringValue   143 ext/dl/handle.c     SafeStringValue(type);
SafeStringValue   158 ext/dl/handle.c     SafeStringValue(sym);
SafeStringValue   582 ext/dl/sym.c   	SafeStringValue(str);
SafeStringValue   590 ext/dl/sym.c   	SafeStringValue(str);
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    66 ext/readline/readline.c 	SafeStringValue(tmp);
SafeStringValue   245 ext/readline/readline.c 	SafeStringValue(str);
SafeStringValue   287 ext/readline/readline.c     SafeStringValue(str);
SafeStringValue   329 ext/readline/readline.c     SafeStringValue(str);
SafeStringValue   371 ext/readline/readline.c     SafeStringValue(str);
SafeStringValue   414 ext/readline/readline.c     SafeStringValue(str);
SafeStringValue   457 ext/readline/readline.c     SafeStringValue(str);
SafeStringValue   531 ext/readline/readline.c     SafeStringValue(str);
SafeStringValue   552 ext/readline/readline.c     SafeStringValue(str);
SafeStringValue   568 ext/readline/readline.c 	SafeStringValue(str);
SafeStringValue   108 ext/sdbm/init.c     SafeStringValue(file);
SafeStringValue   703 ext/socket/socket.c 	SafeStringValue(host);
SafeStringValue   737 ext/socket/socket.c 	SafeStringValue(port);
SafeStringValue  1396 ext/socket/socket.c     SafeStringValue(path);
SafeStringValue    68 ext/syslog/syslog.c #ifdef SafeStringValue
SafeStringValue    69 ext/syslog/syslog.c     SafeStringValue(ident);
SafeStringValue  2353 ext/zlib/zlib.c     SafeStringValue(filename);
SafeStringValue   118 file.c         	SafeStringValue(path);
SafeStringValue   661 file.c             SafeStringValue(file);
SafeStringValue   683 file.c         	SafeStringValue(*file);
SafeStringValue   716 file.c             SafeStringValue(fname);
SafeStringValue   773 file.c             SafeStringValue(fname);
SafeStringValue   989 file.c             SafeStringValue(fname);
SafeStringValue  1122 file.c             SafeStringValue(fname);
SafeStringValue  1139 file.c             SafeStringValue(fname);
SafeStringValue  1157 file.c             SafeStringValue(fname);
SafeStringValue  1174 file.c             SafeStringValue(fname);
SafeStringValue  1191 file.c             SafeStringValue(fname);
SafeStringValue  1208 file.c             SafeStringValue(fname);
SafeStringValue  1335 file.c             SafeStringValue(fname);
SafeStringValue  1446 file.c             SafeStringValue(fname1);
SafeStringValue  1448 file.c             SafeStringValue(fname2);
SafeStringValue  1542 file.c             SafeStringValue(fname);
SafeStringValue  2087 file.c             SafeStringValue(from);
SafeStringValue  2088 file.c             SafeStringValue(to);
SafeStringValue  2117 file.c             SafeStringValue(from);
SafeStringValue  2118 file.c             SafeStringValue(to);
SafeStringValue  2151 file.c             SafeStringValue(path);
SafeStringValue  2221 file.c             SafeStringValue(from);
SafeStringValue  2222 file.c             SafeStringValue(to);
SafeStringValue  3015 file.c             SafeStringValue(path);
SafeStringValue  3218 file.c         	    SafeStringValue(argv[i]);
SafeStringValue  3462 file.c             SafeStringValue(fname);
SafeStringValue  4192 file.c         	SafeStringValue(str);
SafeStringValue  4253 file.c         	    SafeStringValue(str);
SafeStringValue  1654 hash.c             SafeStringValue(name);
SafeStringValue  3092 io.c               SafeStringValue(pname);
SafeStringValue  3122 io.c               SafeStringValue(fname);
SafeStringValue  3129 io.c           	    SafeStringValue(vmode);
SafeStringValue  3192 io.c               SafeStringValue(fname);
SafeStringValue  3197 io.c           	SafeStringValue(vmode);
SafeStringValue  3482 io.c               SafeStringValue(fname);
SafeStringValue  4067 io.c           	    SafeStringValue(mode);
SafeStringValue  4520 io.c               SafeStringValue(str);
SafeStringValue  5095 io.c               SafeStringValue(fname);
SafeStringValue  5139 io.c               SafeStringValue(fname);
SafeStringValue  5177 io.c               SafeStringValue(fname);
SafeStringValue  1004 process.c      	SafeStringValue(argv[i]);
SafeStringValue  1138 process.c      	SafeStringValue(argv[i]);
SafeStringValue  1142 process.c      	SafeStringValue(prog);
SafeStringValue  1159 process.c          SafeStringValue(sv);
SafeStringValue  1227 process.c      	SafeStringValue(prog);
SafeStringValue  1232 process.c      	SafeStringValue(cmd);
SafeStringValue  1437 process.c          SafeStringValue(cmd);
SafeStringValue  1460 process.c      	SafeStringValue(argv[0]);
SafeStringValue  1488 process.c          SafeStringValue(cmd);
SafeStringValue  1512 process.c      	SafeStringValue(prog);
SafeStringValue  1515 process.c      	SafeStringValue(argv[i]);
SafeStringValue   530 signal.c       	SafeStringValue(command);	/* taint check */


SetFileAttributes

SetFileAttributes 2785 win32/win32.c  	    SetFileAttributes(newpath, oldatts);
SetFileAttributes 3532 win32/win32.c  	    SetFileAttributes(path, attr & ~FILE_ATTRIBUTE_READONLY);
SetFileAttributes 3538 win32/win32.c  		SetFileAttributes(path, attr);
SetFileAttributes 3552 win32/win32.c  	    SetFileAttributes(path, attr & ~FILE_ATTRIBUTE_READONLY);
SetFileAttributes 3558 win32/win32.c  		SetFileAttributes(path, attr);


SetFileAttributesA

SetFileAttributesA 2757 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            9648 eval.c         #  define pause() Sleep(INFINITE)
Sleep            1903 win32/win32.c  	Sleep(timeout->tv_sec * 1000 + timeout->tv_usec / 1000);
Sleep            2990 win32/win32.c  #define yield_once() Sleep(0)
Sleep            3047 win32/win32.c  	    Sleep(1);


StartSockets

StartSockets       88 win32/win32.c  static void StartSockets ();
StartSockets      366 win32/win32.c      StartSockets();
StartSockets     1895 win32/win32.c  	StartSockets();
StartSockets     1992 win32/win32.c  	StartSockets();
StartSockets     2015 win32/win32.c  	StartSockets();
StartSockets     2032 win32/win32.c  	StartSockets();
StartSockets     2058 win32/win32.c  	StartSockets();
StartSockets     2075 win32/win32.c  	StartSockets();
StartSockets     2090 win32/win32.c  	StartSockets();
StartSockets     2107 win32/win32.c  	StartSockets();
StartSockets     2124 win32/win32.c  	StartSockets();
StartSockets     2141 win32/win32.c  	StartSockets();
StartSockets     2159 win32/win32.c  	StartSockets();
StartSockets     2176 win32/win32.c  	StartSockets();
StartSockets     2194 win32/win32.c  	StartSockets();
StartSockets     2211 win32/win32.c  	StartSockets();
StartSockets     2228 win32/win32.c  	StartSockets();
StartSockets     2247 win32/win32.c  	StartSockets();
StartSockets     2269 win32/win32.c  	StartSockets();
StartSockets     2286 win32/win32.c  	StartSockets();
StartSockets     2303 win32/win32.c  	StartSockets();
StartSockets     2320 win32/win32.c  	StartSockets();
StartSockets     2337 win32/win32.c  	StartSockets();
StartSockets     2354 win32/win32.c  	StartSockets();
StartSockets     2371 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) {


StringIO

StringIO          265 ext/stringio/stringio.c     struct StringIO *ptr = StringIO(self);
StringIO          278 ext/stringio/stringio.c     StringIO(self);
StringIO          289 ext/stringio/stringio.c     StringIO(self);
StringIO          300 ext/stringio/stringio.c     StringIO(self);
StringIO          311 ext/stringio/stringio.c     StringIO(self);
StringIO          322 ext/stringio/stringio.c     StringIO(self);
StringIO          335 ext/stringio/stringio.c     StringIO(self);
StringIO          349 ext/stringio/stringio.c     return StringIO(self)->string;
StringIO          362 ext/stringio/stringio.c     struct StringIO *ptr = StringIO(self);
StringIO          384 ext/stringio/stringio.c     struct StringIO *ptr = StringIO(self);
StringIO          403 ext/stringio/stringio.c     struct StringIO *ptr = StringIO(self);
StringIO          422 ext/stringio/stringio.c     struct StringIO *ptr = StringIO(self);
StringIO          440 ext/stringio/stringio.c     struct StringIO *ptr = StringIO(self);
StringIO          455 ext/stringio/stringio.c     struct StringIO *ptr = StringIO(self);
StringIO          470 ext/stringio/stringio.c     struct StringIO *ptr = StringIO(self);
StringIO          487 ext/stringio/stringio.c     struct StringIO *ptr = readable(StringIO(self));
StringIO          501 ext/stringio/stringio.c     ptr = StringIO(orig);
StringIO          525 ext/stringio/stringio.c     return LONG2NUM(StringIO(self)->lineno);
StringIO          539 ext/stringio/stringio.c     StringIO(self)->lineno = NUM2LONG(lineno);
StringIO          587 ext/stringio/stringio.c     return LONG2NUM(StringIO(self)->pos);
StringIO          601 ext/stringio/stringio.c     struct StringIO *ptr = StringIO(self);
StringIO          622 ext/stringio/stringio.c     struct StringIO *ptr = StringIO(self);
StringIO          643 ext/stringio/stringio.c     struct StringIO *ptr = StringIO(self);
StringIO          678 ext/stringio/stringio.c     StringIO(self);
StringIO          697 ext/stringio/stringio.c     struct StringIO *ptr = readable(StringIO(self));
StringIO          715 ext/stringio/stringio.c     struct StringIO *ptr = readable(StringIO(self));
StringIO          758 ext/stringio/stringio.c     struct StringIO *ptr = readable(StringIO(self));
StringIO          920 ext/stringio/stringio.c     VALUE str = strio_getline(argc, argv, readable(StringIO(self)));
StringIO          938 ext/stringio/stringio.c     VALUE line = strio_getline(argc, argv, readable(StringIO(self)));
StringIO          956 ext/stringio/stringio.c     struct StringIO *ptr = StringIO(self);
StringIO          977 ext/stringio/stringio.c     struct StringIO *ptr = StringIO(self);
StringIO          999 ext/stringio/stringio.c     struct StringIO *ptr = writable(StringIO(self));
StringIO         1058 ext/stringio/stringio.c     struct StringIO *ptr = writable(StringIO(self));
StringIO         1093 ext/stringio/stringio.c     struct StringIO *ptr = readable(StringIO(self));
StringIO         1209 ext/stringio/stringio.c     VALUE string = StringIO(self)->string;
StringIO         1227 ext/stringio/stringio.c     VALUE string = writable(StringIO(self))->string;
StringIO         1246 ext/stringio/stringio.c     VALUE StringIO = rb_define_class("StringIO", rb_cData);
StringIO         1248 ext/stringio/stringio.c     rb_include_module(StringIO, rb_mEnumerable);
StringIO         1249 ext/stringio/stringio.c     rb_define_alloc_func(StringIO, strio_s_allocate);
StringIO         1250 ext/stringio/stringio.c     rb_define_singleton_method(StringIO, "open", strio_s_open, -1);
StringIO         1251 ext/stringio/stringio.c     rb_define_method(StringIO, "initialize", strio_initialize, -1);
StringIO         1252 ext/stringio/stringio.c     rb_define_method(StringIO, "initialize_copy", strio_copy, 1);
StringIO         1253 ext/stringio/stringio.c     rb_define_method(StringIO, "reopen", strio_reopen, -1);
StringIO         1255 ext/stringio/stringio.c     rb_define_method(StringIO, "string", strio_get_string, 0);
StringIO         1256 ext/stringio/stringio.c     rb_define_method(StringIO, "string=", strio_set_string, 1);
StringIO         1257 ext/stringio/stringio.c     rb_define_method(StringIO, "lineno", strio_get_lineno, 0);
StringIO         1258 ext/stringio/stringio.c     rb_define_method(StringIO, "lineno=", strio_set_lineno, 1);
StringIO         1260 ext/stringio/stringio.c     rb_define_method(StringIO, "binmode", strio_binmode, 0);
StringIO         1261 ext/stringio/stringio.c     rb_define_method(StringIO, "close", strio_close, 0);
StringIO         1262 ext/stringio/stringio.c     rb_define_method(StringIO, "close_read", strio_close_read, 0);
StringIO         1263 ext/stringio/stringio.c     rb_define_method(StringIO, "close_write", strio_close_write, 0);
StringIO         1264 ext/stringio/stringio.c     rb_define_method(StringIO, "closed?", strio_closed, 0);
StringIO         1265 ext/stringio/stringio.c     rb_define_method(StringIO, "closed_read?", strio_closed_read, 0);
StringIO         1266 ext/stringio/stringio.c     rb_define_method(StringIO, "closed_write?", strio_closed_write, 0);
StringIO         1267 ext/stringio/stringio.c     rb_define_method(StringIO, "eof", strio_eof, 0);
StringIO         1268 ext/stringio/stringio.c     rb_define_method(StringIO, "eof?", strio_eof, 0);
StringIO         1269 ext/stringio/stringio.c     rb_define_method(StringIO, "fcntl", strio_fcntl, -1);
StringIO         1270 ext/stringio/stringio.c     rb_define_method(StringIO, "flush", strio_flush, 0);
StringIO         1271 ext/stringio/stringio.c     rb_define_method(StringIO, "fsync", strio_fsync, 0);
StringIO         1272 ext/stringio/stringio.c     rb_define_method(StringIO, "pos", strio_get_pos, 0);
StringIO         1273 ext/stringio/stringio.c     rb_define_method(StringIO, "pos=", strio_set_pos, 1);
StringIO         1274 ext/stringio/stringio.c     rb_define_method(StringIO, "rewind", strio_rewind, 0);
StringIO         1275 ext/stringio/stringio.c     rb_define_method(StringIO, "seek", strio_seek, -1);
StringIO         1276 ext/stringio/stringio.c     rb_define_method(StringIO, "sync", strio_get_sync, 0);
StringIO         1277 ext/stringio/stringio.c     rb_define_method(StringIO, "sync=", strio_set_sync, 1);
StringIO         1278 ext/stringio/stringio.c     rb_define_method(StringIO, "tell", strio_tell, 0);
StringIO         1279 ext/stringio/stringio.c     rb_define_method(StringIO, "path", strio_path, 0);
StringIO         1281 ext/stringio/stringio.c     rb_define_method(StringIO, "each", strio_each, -1);
StringIO         1282 ext/stringio/stringio.c     rb_define_method(StringIO, "each_byte", strio_each_byte, 0);
StringIO         1283 ext/stringio/stringio.c     rb_define_method(StringIO, "each_line", strio_each, -1);
StringIO         1284 ext/stringio/stringio.c     rb_define_method(StringIO, "getc", strio_getc, 0);
StringIO         1285 ext/stringio/stringio.c     rb_define_method(StringIO, "ungetc", strio_ungetc, 1);
StringIO         1286 ext/stringio/stringio.c     rb_define_method(StringIO, "readchar", strio_readchar, 0);
StringIO         1287 ext/stringio/stringio.c     rb_define_method(StringIO, "gets", strio_gets, -1);
StringIO         1288 ext/stringio/stringio.c     rb_define_method(StringIO, "readline", strio_readline, -1);
StringIO         1289 ext/stringio/stringio.c     rb_define_method(StringIO, "readlines", strio_readlines, -1);
StringIO         1290 ext/stringio/stringio.c     rb_define_method(StringIO, "read", strio_read, -1);
StringIO         1291 ext/stringio/stringio.c     rb_define_method(StringIO, "sysread", strio_sysread, -1);
StringIO         1293 ext/stringio/stringio.c     rb_define_method(StringIO, "write", strio_write, 1);
StringIO         1294 ext/stringio/stringio.c     rb_define_method(StringIO, "<<", strio_addstr, 1);
StringIO         1295 ext/stringio/stringio.c     rb_define_method(StringIO, "print", strio_print, -1);
StringIO         1296 ext/stringio/stringio.c     rb_define_method(StringIO, "printf", strio_printf, -1);
StringIO         1297 ext/stringio/stringio.c     rb_define_method(StringIO, "putc", strio_putc, 1);
StringIO         1298 ext/stringio/stringio.c     rb_define_method(StringIO, "puts", strio_puts, -1);
StringIO         1299 ext/stringio/stringio.c     rb_define_method(StringIO, "syswrite", strio_syswrite, 1);
StringIO         1301 ext/stringio/stringio.c     rb_define_method(StringIO, "isatty", strio_isatty, 0);
StringIO         1302 ext/stringio/stringio.c     rb_define_method(StringIO, "tty?", strio_isatty, 0);
StringIO         1303 ext/stringio/stringio.c     rb_define_method(StringIO, "pid", strio_pid, 0);
StringIO         1304 ext/stringio/stringio.c     rb_define_method(StringIO, "fileno", strio_fileno, 0);
StringIO         1305 ext/stringio/stringio.c     rb_define_method(StringIO, "size", strio_size, 0);
StringIO         1306 ext/stringio/stringio.c     rb_define_method(StringIO, "length", strio_size, 0);
StringIO         1307 ext/stringio/stringio.c     rb_define_method(StringIO, "truncate", strio_truncate, 1);


StringValue

StringValue      1262 array.c        	StringValue(sep);
StringValue       519 bignum.c           StringValue(str);
StringValue      1507 dir.c              StringValue(pattern);
StringValue      1508 dir.c              StringValue(path);
StringValue       336 error.c            StringValue(str);
StringValue       669 error.c            StringValue(str);
StringValue       912 error.c        	StringValue(str);
StringValue      1208 eval.c          	StringValue(e);
StringValue      4434 eval.c         	StringValue(mesg);
StringValue      4485 eval.c         	    StringValue(e);
StringValue      6224 eval.c             StringValue(src);
StringValue      6403 eval.c         	StringValue(src);
StringValue      6412 eval.c         	StringValue(vfile);
StringValue      6497 eval.c         	StringValue(src);
StringValue      6545 eval.c         		StringValue(argv[0]);
StringValue      6657 eval.c         	StringValue(fname);
StringValue      7005 eval.c             StringValue(fname);
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       332 ext/dbm/dbm.c      StringValue(keystr);
StringValue       407 ext/dbm/dbm.c  	StringValue(keystr);
StringValue       677 ext/dbm/dbm.c      StringValue(keystr);
StringValue       695 ext/dbm/dbm.c      StringValue(valstr);
StringValue        99 ext/digest/digest.c     StringValue(str);
StringValue       128 ext/digest/digest.c     StringValue(str);
StringValue       170 ext/digest/digest.c     StringValue(str);
StringValue       276 ext/digest/digest.c     StringValue(other);
StringValue       611 ext/dl/dl.c      StringValue(type);
StringValue        36 ext/dl/dl.h    #if !defined(StringValue)
StringValue       549 ext/dl/ptr.c     StringValue(type);
StringValue       864 ext/dl/ptr.c       StringValue(val);
StringValue       157 ext/dl/sym.c     if (!NIL_P(name)) StringValue(name);
StringValue       211 ext/gdbm/gdbm.c     StringValue(keystr);
StringValue       320 ext/gdbm/gdbm.c     StringValue(valstr);
StringValue       426 ext/gdbm/gdbm.c     StringValue(keystr);
StringValue       613 ext/gdbm/gdbm.c     StringValue(keystr);
StringValue       614 ext/gdbm/gdbm.c     StringValue(valstr);
StringValue       781 ext/gdbm/gdbm.c     StringValue(keystr);
StringValue       799 ext/gdbm/gdbm.c     StringValue(valstr);
StringValue       406 ext/iconv/iconv.c 		StringValue(str);
StringValue       416 ext/iconv/iconv.c 	StringValue(str);
StringValue       486 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        28 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       283 ext/openssl/ossl_cipher.c     StringValue(key);
StringValue       300 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       399 ext/openssl/ossl_ssl.c 	StringValue(val);
StringValue       474 ext/openssl/ossl_ssl.c         StringValue(str);
StringValue       630 ext/openssl/ossl_ssl.c         StringValue(str);
StringValue       683 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       309 ext/sdbm/init.c     StringValue(keystr);
StringValue       386 ext/sdbm/init.c 	StringValue(keystr);
StringValue       494 ext/sdbm/init.c     StringValue(keystr);
StringValue       495 ext/sdbm/init.c     StringValue(valstr);
StringValue       659 ext/sdbm/init.c     StringValue(keystr);
StringValue       677 ext/sdbm/init.c     StringValue(valstr);
StringValue       372 ext/socket/socket.c 	StringValue(val);
StringValue       494 ext/socket/socket.c     StringValue(mesg);
StringValue       495 ext/socket/socket.c     if (!NIL_P(to)) StringValue(to);
StringValue      1591 ext/socket/socket.c     StringValue(mesg);
StringValue      2190 ext/socket/socket.c     StringValue(addr);
StringValue      2286 ext/socket/socket.c     StringValue(addr);
StringValue      2800 ext/socket/socket.c     StringValue(service);
StringValue      2801 ext/socket/socket.c     StringValue(proto);
StringValue       239 ext/stringio/stringio.c 	StringValue(string);
StringValue       249 ext/stringio/stringio.c 	StringValue(string);
StringValue       366 ext/stringio/stringio.c     StringValue(string);
StringValue       846 ext/stringio/stringio.c 	if (!NIL_P(str)) StringValue(str);
StringValue      1100 ext/stringio/stringio.c 	StringValue(str);
StringValue       213 ext/strscan/strscan.c     StringValue(str);
StringValue       308 ext/strscan/strscan.c     StringValue(str);
StringValue       337 ext/strscan/strscan.c     StringValue(str);
StringValue       152 ext/syck/rubyext.c             StringValue(str2);
StringValue      1045 ext/syck/rubyext.c     StringValue( ivname );
StringValue      1080 ext/syck/rubyext.c     if (NIL_P(type) || RSTRING(StringValue(type))->len == 0)
StringValue      1085 ext/syck/rubyext.c     if ( ! (NIL_P(type) || RSTRING(StringValue(type))->len == 0) )
StringValue      1495 ext/syck/rubyext.c     StringValue( val );
StringValue      1767 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       284 ext/zlib/zlib.c 	StringValue(str);
StringValue      1224 ext/zlib/zlib.c     StringValue(src);
StringValue      1250 ext/zlib/zlib.c     StringValue(src);
StringValue      1387 ext/zlib/zlib.c     StringValue(src);
StringValue      1484 ext/zlib/zlib.c     StringValue(src);
StringValue      1509 ext/zlib/zlib.c     StringValue(src);
StringValue      1543 ext/zlib/zlib.c 	    StringValue(src);
StringValue      1577 ext/zlib/zlib.c 	    StringValue(src);
StringValue      1606 ext/zlib/zlib.c     StringValue(src);
StringValue      1649 ext/zlib/zlib.c     StringValue(src);
StringValue      2744 file.c         	StringValue(fext);
StringValue      2746 file.c             StringValue(fname);
StringValue      2894 file.c             StringValue(path);		/* get rid of converting twice */
StringValue      1694 hash.c             StringValue(name);
StringValue      1731 hash.c             StringValue(key);
StringValue      1895 hash.c             StringValue(nm);
StringValue      1896 hash.c             StringValue(val);
StringValue      2252 hash.c             StringValue(value);
StringValue      1188 io.c                   StringValue(str);
StringValue      1324 io.c           	if (!NIL_P(str)) StringValue(str);
StringValue      1338 io.c           	StringValue(str);
StringValue      1646 io.c           	if (!NIL_P(rs)) StringValue(rs);
StringValue      1789 io.c           	if (!NIL_P(rs)) StringValue(rs);
StringValue      1832 io.c           	if (!NIL_P(rs)) StringValue(rs);
StringValue      2394 io.c           	StringValue(str);
StringValue      4346 io.c           	    if (!NIL_P(rs)) StringValue(rs);
StringValue      4893 io.c           	    StringValue(v);
StringValue      5101 io.c           	StringValue(arg.sep);
StringValue      5276 io.c           	StringValue(str);
StringValue      5453 io.c               StringValue(val);
StringValue       890 marshal.c      	StringValue(str);
StringValue      1398 marshal.c      	StringValue(port);	       /* possible conversion */
StringValue      2325 object.c           StringValue(str);
StringValue      2422 object.c           StringValue(str);
StringValue       455 pack.c             StringValue(fmt);
StringValue       516 pack.c         		StringValue(from);
StringValue       888 pack.c         	    StringValue(from);
StringValue       919 pack.c         		StringValue(from);
StringValue      1316 pack.c             StringValue(str);
StringValue      1317 pack.c             StringValue(fmt);
StringValue      1513 re.c               StringValue(str);
StringValue      1553 re.c               StringValue(str);
StringValue      1833 re.c               StringValue(str);
StringValue      1013 ruby.c             StringValue(val);
StringValue       233 ruby.h             StringValue(v);\
StringValue       255 sprintf.c          StringValue(fmt);
StringValue       388 string.c           StringValue(str2);
StringValue       799 string.c           StringValue(str2);
StringValue      1046 string.c           StringValue(str2);
StringValue      1453 string.c           StringValue(end);
StringValue      1462 string.c       	StringValue(current);
StringValue      1464 string.c       	StringValue(current);
StringValue      1636 string.c           StringValue(val);
StringValue      1959 string.c       	StringValue(repl);
StringValue      2067 string.c       	StringValue(repl);
StringValue      2251 string.c           StringValue(str2);
StringValue      2459 string.c           StringValue(arg);
StringValue      3012 string.c           StringValue(src);
StringValue      3013 string.c           StringValue(repl);
StringValue      3201 string.c       	StringValue(s);
StringValue      3280 string.c       	    StringValue(s);
StringValue      3407 string.c       	StringValue(s);
StringValue      3607 string.c           StringValue(str);
StringValue      3682 string.c           StringValue(rs);
StringValue      3901 string.c           StringValue(rs);
StringValue      4354 string.c           StringValue(salt);
StringValue      4483 string.c       	StringValue(pad);
StringValue      1831 time.c             StringValue(format);
StringValue      1964 time.c             StringValue(str);


StringValueCStr

StringValueCStr   521 bignum.c       	s = StringValueCStr(str);
StringValueCStr  2803 ext/socket/socket.c     sp = getservbyname(StringValueCStr(service),  StringValueCStr(proto));
StringValueCStr   235 ext/stringio/stringio.c 	    const char *m = StringValueCStr(mode);
StringValueCStr   119 file.c         	(*func)(StringValueCStr(path), arg);
StringValueCStr   662 file.c             return stat(StringValueCStr(file), st);
StringValueCStr   684 file.c         	f = CreateFile(StringValueCStr(*file), 0,
StringValueCStr   718 file.c         	rb_sys_fail(StringValueCStr(fname));
StringValueCStr   774 file.c             if (lstat(StringValueCStr(fname), &st) == -1) {
StringValueCStr   990 file.c             if (lstat(StringValueCStr(fname), &st) < 0) return Qfalse;
StringValueCStr  1123 file.c             if (eaccess(StringValueCStr(fname), R_OK) < 0) return Qfalse;
StringValueCStr  1140 file.c             if (access(StringValueCStr(fname), R_OK) < 0) return Qfalse;
StringValueCStr  1158 file.c             if (eaccess(StringValueCStr(fname), W_OK) < 0) return Qfalse;
StringValueCStr  1175 file.c             if (access(StringValueCStr(fname), W_OK) < 0) return Qfalse;
StringValueCStr  1192 file.c             if (eaccess(StringValueCStr(fname), X_OK) < 0) return Qfalse;
StringValueCStr  1209 file.c             if (access(StringValueCStr(fname), X_OK) < 0) return Qfalse;
StringValueCStr  1336 file.c             if (stat(StringValueCStr(fname), &st) < 0) return Qfalse;
StringValueCStr  1475 file.c         	rb_sys_fail(StringValueCStr(fname));
StringValueCStr  1543 file.c             if (lstat(StringValueCStr(fname), &st) == -1) {
StringValueCStr  1567 file.c         	rb_sys_fail(StringValueCStr(fname));
StringValueCStr  2090 file.c             if (link(StringValueCStr(from), StringValueCStr(to)) < 0) {
StringValueCStr  2120 file.c             if (symlink(StringValueCStr(from), StringValueCStr(to)) < 0) {
StringValueCStr  2224 file.c             src = StringValueCStr(from);
StringValueCStr  2225 file.c             dst = StringValueCStr(to);
StringValueCStr  2776 file.c         	if (NIL_P(fext) || !(f = rmext(name, StringValueCStr(fext)))) {
StringValueCStr  2784 file.c         	if (NIL_P(fext) || !(f = rmext(p, StringValueCStr(fext)))) {
StringValueCStr  2812 file.c             name = StringValueCStr(fname);
StringValueCStr  2864 file.c             name = StringValueCStr(fname);
StringValueCStr  2954 file.c         	    StringValueCStr(tmp);
StringValueCStr  2956 file.c         	name = StringValueCStr(result);
StringValueCStr  3018 file.c             if (truncate(StringValueCStr(path), pos) < 0)
StringValueCStr  3026 file.c         	if ((tmpfd = open(StringValueCStr(path), O_RDWR)) < 0) {
StringValueCStr  3030 file.c         	if ((tmpfd = open(StringValueCStr(path), 0)) < 0) {
StringValueCStr  3464 file.c             if (stat(StringValueCStr(fname), &st) == -1) {
StringValueCStr  4053 file.c             char *p0 = StringValueCStr(fpath);
StringValueCStr  4169 file.c         	f = StringValueCStr(fname);
StringValueCStr  4178 file.c         	    if (file_load_ok(StringValueCStr(fname))) {
StringValueCStr  4199 file.c         	    found = dln_find_file(StringValueCStr(fname), path);
StringValueCStr  4214 file.c             char *f = StringValueCStr(path);
StringValueCStr  4223 file.c         	f = StringValueCStr(path);


StringValuePtr

StringValuePtr     44 compar.c       	classname = StringValuePtr(y);
StringValuePtr   6557 eval.c         		file = StringValuePtr(argv[1]);
StringValuePtr   6817 eval.c         	f = StringValuePtr(v);
StringValuePtr    187 ext/Win32API/Win32API.c 		lParam = (unsigned long)StringValuePtr(str);
StringValuePtr    542 ext/dl/dl.c        ptr = rb_ary2cary(StringValuePtr(t)[0], self, &size);
StringValuePtr    587 ext/dl/dl.c      return INT2NUM(dlsizeof(StringValuePtr(str)));
StringValuePtr     39 ext/dl/dl.h    #if !defined(StringValuePtr)
StringValuePtr     55 ext/dl/handle.c     clib = NIL_P(lib) ? NULL : StringValuePtr(lib);
StringValuePtr     59 ext/dl/handle.c     clib = NIL_P(lib) ? NULL : StringValuePtr(lib);
StringValuePtr    144 ext/dl/handle.c     stype = StringValuePtr(type);
StringValuePtr    159 ext/dl/handle.c     name = StringValuePtr(sym);
StringValuePtr    319 ext/dl/ptr.c       t = StringValuePtr(type)[0];
StringValuePtr    323 ext/dl/ptr.c       t = StringValuePtr(type)[0];
StringValuePtr    566 ext/dl/ptr.c     ctype = StringValuePtr(type);
StringValuePtr    158 ext/dl/sym.c     stype = NIL_P(type) ? NULL : StringValuePtr(type);
StringValuePtr    179 ext/dl/sym.c     type = char2type(StringValuePtr(ch)[0]);
StringValuePtr    140 ext/iconv/iconv.c 	StringValuePtr(key);
StringValuePtr    145 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    163 ext/openssl/ossl_ssl.c 	s =  StringValuePtr(ssl_method);
StringValuePtr    373 ext/openssl/ossl_ssl.c     ca_file = NIL_P(val) ? NULL : StringValuePtr(val);
StringValuePtr    375 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    680 ext/readline/readline.c     matches = rl_completion_matches(StringValuePtr(str),
StringValuePtr    707 ext/readline/readline.c     matches = rl_completion_matches(StringValuePtr(str),
StringValuePtr   2750 ext/socket/socket.c     sa = (struct sockaddr*)StringValuePtr(addr);
StringValuePtr   2836 ext/socket/socket.c 	strncpy(hbuf, StringValuePtr(host), sizeof(hbuf));
StringValuePtr   2848 ext/socket/socket.c 	strncpy(pbuf, StringValuePtr(port), sizeof(pbuf));
StringValuePtr   2860 ext/socket/socket.c     else if ((ap = StringValuePtr(family)) != 0) {
StringValuePtr   2960 ext/socket/socket.c 	    strncpy(hbuf, StringValuePtr(host), sizeof(hbuf));
StringValuePtr   2974 ext/socket/socket.c 	    strncpy(pbuf, StringValuePtr(port), sizeof(pbuf));
StringValuePtr   2986 ext/socket/socket.c 	else if ((ap = StringValuePtr(af)) != 0) {
StringValuePtr   3055 ext/socket/socket.c     sockaddr = (struct sockaddr_in*)StringValuePtr(addr);
StringValuePtr   3071 ext/socket/socket.c     strncpy(sockaddr.sun_path, StringValuePtr(path), sizeof(sockaddr.sun_path)-1);
StringValuePtr   3085 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    588 ext/win32ole/win32ole.c         rb_raise(ecs, "%s\n%s", buf, StringValuePtr(err_msg));
StringValuePtr    815 ext/win32ole/win32ole.c         V_BSTR(var) = ole_mb2wc(StringValuePtr(val), -1);
StringValuePtr   1122 ext/win32ole/win32ole.c     return reg_open_key(hkey, StringValuePtr(key), phkey);
StringValuePtr   1168 ext/win32ole/win32ole.c     pbuf  = ole_mb2wc(StringValuePtr(ole), -1);
StringValuePtr   1180 ext/win32ole/win32ole.c     err = reg_open_key(hroot, StringValuePtr(vclsid), &hclsid);
StringValuePtr   1223 ext/win32ole/win32ole.c             if (err != ERROR_SUCCESS || fver > atof(StringValuePtr(ver)))
StringValuePtr   1225 ext/win32ole/win32ole.c             fver = atof(StringValuePtr(ver));
StringValuePtr   1342 ext/win32ole/win32ole.c     err = RegConnectRegistry(StringValuePtr(host), HKEY_LOCAL_MACHINE, &hlm);
StringValuePtr   1348 ext/win32ole/win32ole.c     err = RegOpenKeyEx(hlm, StringValuePtr(subkey), 0, KEY_READ, &hpid);
StringValuePtr   1394 ext/win32ole/win32ole.c     pbuf  = ole_mb2wc(StringValuePtr(ole), -1);
StringValuePtr   1404 ext/win32ole/win32ole.c                   StringValuePtr(ole));
StringValuePtr   1406 ext/win32ole/win32ole.c     serverinfo.pwszName = ole_mb2wc(StringValuePtr(host), -1);
StringValuePtr   1414 ext/win32ole/win32ole.c                   StringValuePtr(ole),
StringValuePtr   1415 ext/win32ole/win32ole.c                   StringValuePtr(host));
StringValuePtr   1443 ext/win32ole/win32ole.c     pbuf  = ole_mb2wc(StringValuePtr(moniker), -1);
StringValuePtr   1450 ext/win32ole/win32ole.c                   StringValuePtr(moniker));
StringValuePtr   1461 ext/win32ole/win32ole.c                   StringValuePtr(moniker));
StringValuePtr   1496 ext/win32ole/win32ole.c                  StringValuePtr(svr_name));
StringValuePtr   1500 ext/win32ole/win32ole.c     pBuf  = ole_mb2wc(StringValuePtr(svr_name), -1);
StringValuePtr   1513 ext/win32ole/win32ole.c                   "OLE server `%s' not running", StringValuePtr(svr_name));
StringValuePtr   1521 ext/win32ole/win32ole.c                   StringValuePtr(svr_name));
StringValuePtr   1608 ext/win32ole/win32ole.c         pBuf = ole_mb2wc(StringValuePtr(file), -1);
StringValuePtr   1731 ext/win32ole/win32ole.c     hwnd = pfnHtmlHelp(GetDesktopWindow(), StringValuePtr(helpfile),
StringValuePtr   1734 ext/win32ole/win32ole.c         hwnd = pfnHtmlHelp(GetDesktopWindow(), StringValuePtr(helpfile),
StringValuePtr   1765 ext/win32ole/win32ole.c         if(strlen(StringValuePtr(helpfile)) == 0) {
StringValuePtr   1768 ext/win32ole/win32ole.c                      StringValuePtr(name));
StringValuePtr   1780 ext/win32ole/win32ole.c                  StringValuePtr(helpfile));
StringValuePtr   1873 ext/win32ole/win32ole.c                  StringValuePtr(svr_name));
StringValuePtr   1878 ext/win32ole/win32ole.c                      StringValuePtr(svr_name));
StringValuePtr   1884 ext/win32ole/win32ole.c     pBuf  = ole_mb2wc(StringValuePtr(svr_name), -1);
StringValuePtr   1893 ext/win32ole/win32ole.c                   StringValuePtr(svr_name));
StringValuePtr   1902 ext/win32ole/win32ole.c                   StringValuePtr(svr_name));
StringValuePtr   1936 ext/win32ole/win32ole.c     pOp->pNamedArgs[index + 1] = ole_mb2wc(StringValuePtr(key), -1);
StringValuePtr   2004 ext/win32ole/win32ole.c     wcmdname = ole_mb2wc(StringValuePtr(cmd), -1);
StringValuePtr   2011 ext/win32ole/win32ole.c                   StringValuePtr(cmd));
StringValuePtr   2031 ext/win32ole/win32ole.c         op.pNamedArgs[0] = ole_mb2wc(StringValuePtr(cmd), -1);
StringValuePtr   2048 ext/win32ole/win32ole.c                       StringValuePtr(cmd));
StringValuePtr   2157 ext/win32ole/win32ole.c                   StringValuePtr(cmd), StringValuePtr(v));
StringValuePtr   2367 ext/win32ole/win32ole.c                   StringValuePtr(v));
StringValuePtr   2514 ext/win32ole/win32ole.c     pBuf[0]  = ole_mb2wc(StringValuePtr(property), -1);
StringValuePtr   2523 ext/win32ole/win32ole.c                   StringValuePtr(property));
StringValuePtr   2536 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, StringValuePtr(v));
StringValuePtr   2716 ext/win32ole/win32ole.c         if (strcasecmp(StringValuePtr(name), StringValuePtr(fname)) == 0) {
StringValuePtr   3082 ext/win32ole/win32ole.c         if(strlen(StringValuePtr(type)) == 0) {
StringValuePtr   3245 ext/win32ole/win32ole.c                  StringValuePtr(cmdname));
StringValuePtr   3272 ext/win32ole/win32ole.c         pbuf = ole_mb2wc(StringValuePtr(file), -1);
StringValuePtr   3321 ext/win32ole/win32ole.c             if (fversion > atof(StringValuePtr(ver)))
StringValuePtr   3323 ext/win32ole/win32ole.c             fversion = atof(StringValuePtr(ver));
StringValuePtr   3324 ext/win32ole/win32ole.c             if ( (v = reg_get_val(hclsid, StringValuePtr(ver))) != Qnil ) {
StringValuePtr   3467 ext/win32ole/win32ole.c     pbuf = ole_mb2wc(StringValuePtr(file), -1);
StringValuePtr   3475 ext/win32ole/win32ole.c                  StringValuePtr(oleclass), StringValuePtr(typelib));
StringValuePtr   4367 ext/win32ole/win32ole.c                      StringValuePtr(method));
StringValuePtr   5471 ext/win32ole/win32ole.c             *V_BSTRREF(var) = ole_mb2wc(StringValuePtr(val), -1);
StringValuePtr   5937 ext/win32ole/win32ole.c                      StringValuePtr(itf));
StringValuePtr   5940 ext/win32ole/win32ole.c         pitf = StringValuePtr(itf);
StringValuePtr   2463 file.c             s = StringValuePtr(fname);
StringValuePtr   2215 hash.c             s = StringValuePtr(key);
StringValuePtr   2888 io.c               if (!pname) pname = StringValuePtr(pstr);
StringValuePtr   2913 io.c               if (!pname) pname = StringValuePtr(pstr);
StringValuePtr   2947 io.c               if (!pname) pname = StringValuePtr(pstr);
StringValuePtr   3090 io.c           	mode = rb_io_flags_mode(rb_io_mode_flags(StringValuePtr(pmode)));
StringValuePtr   3137 io.c           	mode = NIL_P(vmode) ? "r" : StringValuePtr(vmode);
StringValuePtr   3297 io.c           	char *str = StringValuePtr(argv[0]);
StringValuePtr   3491 io.c           	fptr->mode = rb_io_mode_flags(StringValuePtr(nmode));
StringValuePtr   4236 io.c           	    fn = StringValuePtr(filename);
StringValuePtr    935 pack.c         		    t = StringValuePtr(from);
StringValuePtr   2530 process.c          if (initgroups(StringValuePtr(uname), (rb_gid_t)NUM2INT(base_grp)) != 0) {
StringValuePtr   1693 re.c           	    char *kcode = StringValuePtr(argv[2]);
StringValuePtr   1713 re.c           	s = StringValuePtr(argv[0]);
StringValuePtr   1829 re.c           	rb_set_kcode(StringValuePtr(kcode));
StringValuePtr   2141 re.c               rb_set_kcode(StringValuePtr(val));
StringValuePtr    383 ruby.c         	    char *s = StringValuePtr(v);
StringValuePtr    195 struct.c       	char *cname = StringValuePtr(name);


Sword

Sword             209 regex.c               re_syntax_table[c] = Sword;
Sword             210 regex.c           re_syntax_table['_'] = Sword;
Sword            1505 regex.c        	      if (SYNTAX(c) == Sword ||
Sword            1518 regex.c        	      if (SYNTAX(c) != Sword &&
Sword            2949 regex.c        	  if (SYNTAX(j) == Sword)
Sword            2972 regex.c        	  if (SYNTAX(j) != Sword)
Sword            3468 regex.c        #define IS_A_LETTER(d) (SYNTAX(*(d)) == Sword ||			\


Sword2

Sword2            214 regex.c               re_syntax_table[c] = Sword2;
Sword2           1506 regex.c        		  (!current_mbctype && SYNTAX(c) == Sword2))
Sword2           1520 regex.c        		  (!current_mbctype && SYNTAX(c) != Sword2)))
Sword2           2955 regex.c        	    if (SYNTAX(j) == Sword2)
Sword2           2977 regex.c        	    if (SYNTAX(j) != Sword2)
Sword2           3471 regex.c        			 SYNTAX(*(d)) == Sword2))


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      1904 ext/syck/rubyext.c     SyckEmitter *emitterPtr;
SyckEmitter      1906 ext/syck/rubyext.c     Data_Get_Struct(emitter, SyckEmitter, emitterPtr);
SyckEmitter      1948 ext/syck/rubyext.c     SyckEmitter *emitter = syck_new_emitter();
SyckEmitter      1971 ext/syck/rubyext.c     SyckEmitter *emitter;
SyckEmitter      1974 ext/syck/rubyext.c     Data_Get_Struct(self, SyckEmitter, emitter);
SyckEmitter      2017 ext/syck/rubyext.c     SyckEmitter *emitter;
SyckEmitter      2024 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         1239 ext/syck/rubyext.c     SyckNode *n;
SyckNode         1241 ext/syck/rubyext.c     Data_Get_Struct( node, SyckNode, n );
SyckNode         1256 ext/syck/rubyext.c     SyckNode *n;
SyckNode         1259 ext/syck/rubyext.c     Data_Get_Struct(node, SyckNode, n);
SyckNode         1426 ext/syck/rubyext.c     SyckNode *node = syck_alloc_str();
SyckNode         1453 ext/syck/rubyext.c     SyckNode *node;
SyckNode         1454 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
SyckNode         1492 ext/syck/rubyext.c     SyckNode *node;
SyckNode         1493 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
SyckNode         1511 ext/syck/rubyext.c     SyckNode *node;
SyckNode         1526 ext/syck/rubyext.c     SyckNode *node;
SyckNode         1527 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
SyckNode         1543 ext/syck/rubyext.c     SyckNode *node;
SyckNode         1544 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
SyckNode         1567 ext/syck/rubyext.c     SyckNode *node;
SyckNode         1569 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
SyckNode         1587 ext/syck/rubyext.c     SyckNode *node;
SyckNode         1588 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
SyckNode         1610 ext/syck/rubyext.c     SyckNode *node;
SyckNode         1625 ext/syck/rubyext.c     SyckNode *node;
SyckNode         1626 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
SyckNode         1660 ext/syck/rubyext.c     SyckNode *node;
SyckNode         1661 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
SyckNode         1693 ext/syck/rubyext.c     SyckNode *node;
SyckNode         1695 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
SyckNode         1714 ext/syck/rubyext.c     SyckNode *node;
SyckNode         1715 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
SyckNode         1737 ext/syck/rubyext.c     SyckNode *copy_n;
SyckNode         1738 ext/syck/rubyext.c     SyckNode *orig_n;
SyckNode         1748 ext/syck/rubyext.c     Data_Get_Struct( orig, SyckNode, orig_n );
SyckNode         1749 ext/syck/rubyext.c     Data_Get_Struct( copy, SyckNode, copy_n );
SyckNode         1750 ext/syck/rubyext.c     MEMCPY( copy_n, orig_n, SyckNode, 1 );
SyckNode         1761 ext/syck/rubyext.c     SyckNode *node;
SyckNode         1762 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
SyckNode         1783 ext/syck/rubyext.c     SyckNode *n;
SyckNode         1784 ext/syck/rubyext.c     SyckNode *orig_n;
SyckNode         1785 ext/syck/rubyext.c     Data_Get_Struct(self, SyckNode, orig_n);
SyckNode         1840 ext/syck/rubyext.c     SyckNode *n;
SyckNode         1841 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              3524 ext/nkf/nkf-utf8/nkf.c #define nkf_isblank(c) (c == SPACE || c == TAB)
TAB              3919 ext/nkf/nkf-utf8/nkf.c 			if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
TAB              3928 ext/nkf/nkf-utf8/nkf.c 			    if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
TAB              3942 ext/nkf/nkf-utf8/nkf.c 		case TAB:
TAB              3960 ext/nkf/nkf-utf8/nkf.c 		if (c1=='=' && (lwsp_buf[lwsp_count-1]==SPACE||lwsp_buf[lwsp_count-1]==TAB)) {
TAB              4035 ext/nkf/nkf-utf8/nkf.c 		    if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
TAB              4047 ext/nkf/nkf-utf8/nkf.c 			} else if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
TAB              4061 ext/nkf/nkf-utf8/nkf.c 	    case TAB:
TAB              4079 ext/nkf/nkf-utf8/nkf.c 	    if (c1=='=' && (lwsp_buf[lwsp_count-1]==SPACE||lwsp_buf[lwsp_count-1]==TAB)) {
TAB              4239 ext/nkf/nkf-utf8/nkf.c 	    && (mimeout_buf[i]==SPACE || mimeout_buf[i]==TAB
TAB              4246 ext/nkf/nkf-utf8/nkf.c 	    if (mimeout_buf[i]==SPACE || mimeout_buf[i]==TAB
TAB              4518 ext/nkf/nkf-utf8/nkf.c             if (c==SPACE || c==TAB || c==CR || c==NL) {


TAG_BREAK

TAG_BREAK        1410 eval.c               case TAG_BREAK:
TAG_BREAK        1669 eval.c               case TAG_BREAK:
TAG_BREAK        1728 eval.c               case TAG_BREAK:
TAG_BREAK        2915 eval.c         	  case TAG_BREAK:
TAG_BREAK        3045 eval.c         	  case TAG_BREAK:
TAG_BREAK        3080 eval.c         	  case TAG_BREAK:
TAG_BREAK        3124 eval.c         	    else if (state == TAG_BREAK && TAG_DST()) {
TAG_BREAK        4691 eval.c               case TAG_BREAK:
TAG_BREAK        4750 eval.c         	    JUMP_TAG(TAG_BREAK);
TAG_BREAK        4760 eval.c             localjump_error("unexpected break", retval, TAG_BREAK);
TAG_BREAK        4910 eval.c         	  case TAG_BREAK:
TAG_BREAK        4952 eval.c               case TAG_BREAK:
TAG_BREAK        4960 eval.c         		    JUMP_TAG(TAG_BREAK);
TAG_BREAK        4964 eval.c         	    proc_jump_error(TAG_BREAK, result);
TAG_BREAK        5210 eval.c             else if (state == TAG_BREAK && TAG_DST()) {
TAG_BREAK        5845 eval.c         	      case TAG_BREAK:
TAG_BREAK        8405 eval.c               case TAG_BREAK:
TAG_BREAK        8703 eval.c             else if (state == TAG_BREAK && TAG_DST()) {
TAG_BREAK        2223 ext/tk/tcltklib.c         case TAG_BREAK:


TAG_DST

TAG_DST          3046 eval.c         	    if (TAG_DST()) {
TAG_DST          3081 eval.c         	    if (TAG_DST()) {
TAG_DST          3124 eval.c         	    else if (state == TAG_BREAK && TAG_DST()) {
TAG_DST          4911 eval.c         	    if (TAG_DST()) {
TAG_DST          5210 eval.c             else if (state == TAG_BREAK && TAG_DST()) {
TAG_DST          5828 eval.c         	    else if (state == TAG_RETURN && TAG_DST()) {
TAG_DST          8388 eval.c             else if (TAG_DST()) {
TAG_DST          8703 eval.c             else if (state == TAG_BREAK && TAG_DST()) {
TAG_DST          11652 eval.c             else if (TAG_DST()) {


TAG_FATAL

TAG_FATAL        1434 eval.c               case TAG_FATAL:
TAG_FATAL        4459 eval.c         	JUMP_TAG(TAG_FATAL);
TAG_FATAL        4492 eval.c         	if (status == TAG_FATAL && ruby_errinfo == exception_error) {
TAG_FATAL        4502 eval.c             if (tag != TAG_FATAL) {
TAG_FATAL        4526 eval.c             rb_longjmp(TAG_FATAL, mesg);
TAG_FATAL        10109 eval.c         	JUMP_TAG(TAG_FATAL);
TAG_FATAL        11668 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         1406 eval.c               case TAG_NEXT:
TAG_NEXT         1675 eval.c               case TAG_NEXT:
TAG_NEXT         1731 eval.c               case TAG_NEXT:
TAG_NEXT         2912 eval.c         	  case TAG_NEXT:
TAG_NEXT         3042 eval.c         	  case TAG_NEXT:
TAG_NEXT         3077 eval.c         	  case TAG_NEXT:
TAG_NEXT         3150 eval.c         	JUMP_TAG(TAG_NEXT);
TAG_NEXT         3232 eval.c         		if (state == TAG_NEXT) prot_tag->retval = result;
TAG_NEXT         4906 eval.c         	  case TAG_NEXT:
TAG_NEXT         2226 ext/tk/tcltklib.c         case TAG_NEXT:


TAG_RAISE

TAG_RAISE        1433 eval.c               case TAG_RAISE:
TAG_RAISE        3207 eval.c         		else if (state != TAG_RAISE) {
TAG_RAISE        3211 eval.c         	    else if (state == TAG_RAISE) {
TAG_RAISE        3230 eval.c         	    if (state != TAG_RAISE) ruby_errinfo = e_info;
TAG_RAISE        4519 eval.c             rb_longjmp(TAG_RAISE, mesg);
TAG_RAISE        4622 eval.c         	rb_longjmp(TAG_RAISE, mesg);
TAG_RAISE        4625 eval.c             rb_longjmp(TAG_RAISE, mesg);
TAG_RAISE        5284 eval.c               case TAG_RAISE:
TAG_RAISE        6042 eval.c               case TAG_RAISE:
TAG_RAISE        6350 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         1414 eval.c               case TAG_REDO:
TAG_REDO         1671 eval.c               case TAG_REDO:
TAG_REDO         1734 eval.c               case TAG_REDO:
TAG_REDO         2909 eval.c         	  case TAG_REDO:
TAG_REDO         3039 eval.c         	  case TAG_REDO:
TAG_REDO         3074 eval.c         	  case TAG_REDO:
TAG_REDO         3155 eval.c         	JUMP_TAG(TAG_REDO);
TAG_REDO         4902 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        1418 eval.c               case TAG_RETRY:
TAG_RETRY        1673 eval.c               case TAG_RETRY:
TAG_RETRY        1737 eval.c               case TAG_RETRY:
TAG_RETRY        3128 eval.c         	    else if (state == TAG_RETRY) {
TAG_RETRY        3160 eval.c         	JUMP_TAG(TAG_RETRY);
TAG_RETRY        3202 eval.c         		else if (state == TAG_RETRY) {
TAG_RETRY        4695 eval.c               case TAG_RETRY:
TAG_RETRY        5214 eval.c             else if (state == TAG_RETRY) {
TAG_RETRY        5276 eval.c               case TAG_RETRY:
TAG_RETRY        5850 eval.c         	      case TAG_RETRY:
TAG_RETRY        8401 eval.c               case TAG_RETRY:
TAG_RETRY        8402 eval.c         	proc_jump_error(TAG_RETRY, Qnil); /* xxx */
TAG_RETRY        8707 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       1402 eval.c               case TAG_RETURN:
TAG_RETURN       1677 eval.c               case TAG_RETURN:
TAG_RETURN       1725 eval.c               case TAG_RETURN:
TAG_RETURN       4693 eval.c               case TAG_RETURN:
TAG_RETURN       4720 eval.c         	    JUMP_TAG(TAG_RETURN);
TAG_RETURN       4725 eval.c         	    JUMP_TAG(TAG_RETURN);
TAG_RETURN       4732 eval.c             localjump_error("unexpected return", retval, TAG_RETURN);
TAG_RETURN       5828 eval.c         	    else if (state == TAG_RETURN && TAG_DST()) {
TAG_RETURN       5846 eval.c         	      case TAG_RETURN:
TAG_RETURN       8409 eval.c               case TAG_RETURN:
TAG_RETURN       8719 eval.c               case TAG_RETURN:
TAG_RETURN       2220 ext/tk/tcltklib.c         case TAG_RETURN:


TAG_THROW

TAG_THROW        1422 eval.c               case TAG_THROW:
TAG_THROW        12822 eval.c             else if (state == TAG_THROW && tag == prot_tag->dst) {
TAG_THROW        12888 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     11486 eval.c             THREAD_ALLOC(th);
THREAD_ALLOC     12442 eval.c             THREAD_ALLOC(th);


THREAD_COPY_STATUS

THREAD_COPY_STATUS 9809 eval.c             THREAD_COPY_STATUS(curr_thread, &save);
THREAD_COPY_STATUS 9814 eval.c             THREAD_COPY_STATUS(&save, curr_thread);


THREAD_RAISED

THREAD_RAISED    9772 eval.c             if (curr_thread->flags & THREAD_RAISED) return 1;
THREAD_RAISED    9773 eval.c             curr_thread->flags |= THREAD_RAISED;
THREAD_RAISED    9780 eval.c             if (!(curr_thread->flags & THREAD_RAISED)) return 0;
THREAD_RAISED    9781 eval.c             curr_thread->flags &= ~THREAD_RAISED;
THREAD_RAISED    10844 eval.c             if (!NIL_P(th->errinfo) && (th->flags & THREAD_RAISED)) {
THREAD_RAISED    11667 eval.c         	th->flags |= THREAD_RAISED;
THREAD_RAISED    11885 eval.c         	if (!NIL_P(th->errinfo) && (th->flags & THREAD_RAISED))


THREAD_SAVE_CONTEXT

THREAD_SAVE_CONTEXT 10612 eval.c         	if (THREAD_SAVE_CONTEXT(curr)) {
THREAD_SAVE_CONTEXT 11621 eval.c             if (THREAD_SAVE_CONTEXT(curr_thread)) {
THREAD_SAVE_CONTEXT 11646 eval.c         	if (THREAD_SAVE_CONTEXT(th) == 0) {
THREAD_SAVE_CONTEXT 12033 eval.c         	if (THREAD_SAVE_CONTEXT(curr_thread)) {
THREAD_SAVE_CONTEXT 12053 eval.c         	if (THREAD_SAVE_CONTEXT(curr_thread)) {
THREAD_SAVE_CONTEXT 12073 eval.c         	if (THREAD_SAVE_CONTEXT(curr_thread)) {
THREAD_SAVE_CONTEXT 12098 eval.c         	if (THREAD_SAVE_CONTEXT(curr_thread)) {
THREAD_SAVE_CONTEXT 12125 eval.c         	if (THREAD_SAVE_CONTEXT(curr_thread)) {
THREAD_SAVE_CONTEXT 12457 eval.c             if (THREAD_SAVE_CONTEXT(th)) {


THREAD_TERMINATING

THREAD_TERMINATING 10619 eval.c         	if (!(next->flags & THREAD_TERMINATING)) {
THREAD_TERMINATING 10620 eval.c         	    next->flags |= THREAD_TERMINATING;


THREAD_TICK

THREAD_TICK      11584 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) {


TMALLOC

TMALLOC          2457 regex.c          bufp->regstart = TMALLOC(regnum, unsigned char*);
TMALLOC          2458 regex.c          bufp->regend = TMALLOC(regnum, unsigned char*);
TMALLOC          2459 regex.c          bufp->old_regstart = TMALLOC(regnum, unsigned char*);
TMALLOC          2460 regex.c          bufp->old_regend = TMALLOC(regnum, unsigned char*);
TMALLOC          2461 regex.c          bufp->reg_info = TMALLOC(regnum, register_info_type);
TMALLOC          2462 regex.c          bufp->best_regstart = TMALLOC(regnum, unsigned char*);
TMALLOC          2463 regex.c          bufp->best_regend = TMALLOC(regnum, unsigned char*);
TMALLOC          3491 regex.c            regs->beg = TMALLOC(num_regs, int);
TMALLOC          3492 regex.c            regs->end = TMALLOC(num_regs, int);
TMALLOC          4416 regex.c            regs1->beg = TMALLOC(regs2->num_regs, int);
TMALLOC          4417 regex.c            regs1->end = TMALLOC(regs2->num_regs, int);


TMP_ALLOC

TMP_ALLOC        2178 eval.c         	    argv = TMP_ALLOC(argc);\
TMP_ALLOC        4068 eval.c         	VALUE *vars = TMP_ALLOC(node->nd_tbl[0]+1);
TMP_ALLOC        5732 eval.c         		local_vars = TMP_ALLOC(body->nd_tbl[0]+1);


TMP_PROTECT

TMP_PROTECT      3347 eval.c         	    TMP_PROTECT;
TMP_PROTECT      3372 eval.c         	    TMP_PROTECT;
TMP_PROTECT      3388 eval.c         	    TMP_PROTECT;
TMP_PROTECT      3409 eval.c         	    TMP_PROTECT;
TMP_PROTECT      3480 eval.c         	    TMP_PROTECT;
TMP_PROTECT      4057 eval.c             TMP_PROTECT;
TMP_PROTECT      5237 eval.c             TMP_PROTECT;
TMP_PROTECT      5638 eval.c             TMP_PROTECT;
TMP_PROTECT      6654 eval.c             TMP_PROTECT;


TOLOWER

TOLOWER           184 ext/readline/readline.c 		     (c1 = TOLOWER(result[i][si])) &&
TOLOWER           185 ext/readline/readline.c 			 (c2 = TOLOWER(result[i + 1][si]));
TOLOWER          2449 file.c         #if !defined(TOLOWER)
TOLOWER          2530 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         556 ext/openssl/ossl_ssl.c         SSL_set_fd(ssl, TO_SOCKET(fileno(fptr->f)));
TO_SOCKET        1794 win32/win32.c      SOCKET s = TO_SOCKET(fd);
TO_SOCKET        1815 win32/win32.c      SOCKET s = TO_SOCKET(fd);
TO_SOCKET        1835 win32/win32.c      SOCKET s = TO_SOCKET(fd);
TO_SOCKET        1995 win32/win32.c  	r = accept(TO_SOCKET(s), addr, addrlen);
TO_SOCKET        2018 win32/win32.c  	r = bind(TO_SOCKET(s), addr, addrlen);
TO_SOCKET        2035 win32/win32.c  	r = connect(TO_SOCKET(s), addr, addrlen);
TO_SOCKET        2061 win32/win32.c  	r = getpeername(TO_SOCKET(s), addr, addrlen);
TO_SOCKET        2078 win32/win32.c  	r = getsockname(TO_SOCKET(s), addr, addrlen);
TO_SOCKET        2093 win32/win32.c  	r = getsockopt(TO_SOCKET(s), level, optname, optval, optlen);
TO_SOCKET        2110 win32/win32.c  	r = ioctlsocket(TO_SOCKET(s), cmd, argp);
TO_SOCKET        2127 win32/win32.c  	r = listen(TO_SOCKET(s), backlog);
TO_SOCKET        2144 win32/win32.c  	r = recv(TO_SOCKET(s), buf, len, flags);
TO_SOCKET        2162 win32/win32.c  	r = recvfrom(TO_SOCKET(s), buf, len, flags, from, fromlen);
TO_SOCKET        2179 win32/win32.c  	r = send(TO_SOCKET(s), buf, len, flags);
TO_SOCKET        2197 win32/win32.c  	r = sendto(TO_SOCKET(s), buf, len, flags, to, tolen);
TO_SOCKET        2214 win32/win32.c  	r = setsockopt(TO_SOCKET(s), level, optname, optval, optlen);
TO_SOCKET        2231 win32/win32.c  	r = shutdown(TO_SOCKET(s), how);
TO_SOCKET        2411 win32/win32.c      SOCKET sock = TO_SOCKET(fd);
TO_SOCKET        3389 win32/win32.c      SOCKET sock = TO_SOCKET(fd);
TO_SOCKET        3408 win32/win32.c      SOCKET sock = TO_SOCKET(fd);


TRACE_HEAD

TRACE_HEAD       1255 eval.c         #define TRACE_MAX (TRACE_HEAD+TRACE_TAIL+5)
TRACE_HEAD       1264 eval.c         	    if (i == TRACE_HEAD && ep->len > TRACE_MAX) {
TRACE_HEAD       1266 eval.c         			ep->len - TRACE_HEAD - TRACE_TAIL);


TRACE_TAIL

TRACE_TAIL       1255 eval.c         #define TRACE_MAX (TRACE_HEAD+TRACE_TAIL+5)
TRACE_TAIL       1266 eval.c         			ep->len - TRACE_HEAD - TRACE_TAIL);
TRACE_TAIL       1267 eval.c         		i = ep->len - TRACE_TAIL;


TRANSLATE_P

TRANSLATE_P       441 regex.c            if (TRANSLATE_P()) c = (unsigned char)translate[c];	\
TRANSLATE_P      1684 regex.c        	    if (TRANSLATE_P()) {
TRANSLATE_P      1708 regex.c        	  if (TRANSLATE_P()) c = (unsigned char)translate[c];
TRANSLATE_P      2806 regex.c        	  if (TRANSLATE_P())
TRANSLATE_P      2812 regex.c        	else if (TRANSLATE_P())
TRANSLATE_P      2847 regex.c        	if (TRANSLATE_P())
TRANSLATE_P      2997 regex.c        	    int tmp = TRANSLATE_P()?translate[j]:j;
TRANSLATE_P      3832 regex.c        	    && (TRANSLATE_P() ? translate[*d] : *d) == '\n')
TRANSLATE_P      3850 regex.c        	      (TRANSLATE_P() ? translate[*d] : *d) == '\n')
TRANSLATE_P      3880 regex.c        	    if (TRANSLATE_P())
TRANSLATE_P      4251 regex.c        	if (TRANSLATE_P()) {


TRAP_BEG

TRAP_BEG         10578 eval.c         	    TRAP_BEG;
TRAP_BEG         10679 eval.c         	    TRAP_BEG;
TRAP_BEG         10765 eval.c         	    TRAP_BEG;
TRAP_BEG         11206 eval.c         	TRAP_BEG;
TRAP_BEG         11221 eval.c         	TRAP_BEG;
TRAP_BEG          502 ext/socket/socket.c         TRAP_BEG;
TRAP_BEG          508 ext/socket/socket.c         TRAP_BEG;
TRAP_BEG          566 ext/socket/socket.c     TRAP_BEG;
TRAP_BEG         1320 ext/socket/socket.c     TRAP_BEG;
TRAP_BEG         3113 file.c         	TRAP_BEG;
TRAP_BEG          339 io.c           	TRAP_BEG;
TRAP_BEG          454 io.c                   TRAP_BEG;
TRAP_BEG          816 io.c               TRAP_BEG;
TRAP_BEG         1058 io.c           	TRAP_BEG;
TRAP_BEG         1209 io.c                   TRAP_BEG;
TRAP_BEG         1426 io.c           	TRAP_BEG;
TRAP_BEG         1504 io.c           	TRAP_BEG;
TRAP_BEG         1869 io.c           	TRAP_BEG;
TRAP_BEG         1914 io.c               TRAP_BEG;
TRAP_BEG         1940 io.c               TRAP_BEG;
TRAP_BEG         2354 io.c               TRAP_BEG;
TRAP_BEG         2414 io.c               TRAP_BEG;
TRAP_BEG         4691 io.c               TRAP_BEG;
TRAP_BEG         4702 io.c               TRAP_BEG;
TRAP_BEG         4903 io.c               TRAP_BEG;
TRAP_BEG          576 process.c          TRAP_BEG;
TRAP_BEG          608 process.c      	TRAP_BEG;


TRAP_END

TRAP_END         10580 eval.c         	    TRAP_END;
TRAP_END         10682 eval.c         	    TRAP_END;
TRAP_END         10767 eval.c         	    TRAP_END;
TRAP_END         11208 eval.c         	TRAP_END;
TRAP_END         11224 eval.c         	TRAP_END;
TRAP_END          505 ext/socket/socket.c         TRAP_END;
TRAP_END          510 ext/socket/socket.c         TRAP_END;
TRAP_END          568 ext/socket/socket.c     TRAP_END;
TRAP_END         1322 ext/socket/socket.c     TRAP_END;
TRAP_END         3115 file.c         	TRAP_END;
TRAP_END          341 io.c           	TRAP_END;
TRAP_END          456 io.c                   TRAP_END;
TRAP_END          818 io.c               TRAP_END;
TRAP_END         1060 io.c           	TRAP_END;
TRAP_END         1211 io.c                   TRAP_END;
TRAP_END         1428 io.c           	TRAP_END;
TRAP_END         1506 io.c           	TRAP_END;
TRAP_END         1871 io.c           	TRAP_END;
TRAP_END         1916 io.c               TRAP_END;
TRAP_END         1942 io.c               TRAP_END;
TRAP_END         2356 io.c               TRAP_END;
TRAP_END         2416 io.c               TRAP_END;
TRAP_END         4697 io.c               TRAP_END;
TRAP_END         4704 io.c               TRAP_END;
TRAP_END         4957 io.c               TRAP_END;
TRAP_END          582 process.c          TRAP_END;
TRAP_END          610 process.c      	TRAP_END;


TREALLOC

TREALLOC         3496 regex.c            TREALLOC(regs->beg, num_regs, int);
TREALLOC         3497 regex.c            TREALLOC(regs->end, num_regs, int);
TREALLOC         4421 regex.c            TREALLOC(regs1->beg, regs2->num_regs, int);
TREALLOC         4422 regex.c            TREALLOC(regs1->end, regs2->num_regs, int);


TRUE

TRUE              924 dir.c          	    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              375 ext/nkf/nkf-utf8/nkf.c static int             binmode_f = TRUE;       /* binary mode */
TRUE              387 ext/nkf/nkf-utf8/nkf.c static int             x0201_f = TRUE;         /* Assume JISX0201 kana */
TRUE              443 ext/nkf/nkf-utf8/nkf.c STATIC int cp932_f = TRUE;
TRUE              447 ext/nkf/nkf-utf8/nkf.c STATIC int cp932inv_f = TRUE;
TRUE              714 ext/nkf/nkf-utf8/nkf.c          x0201_f = ((!iso2022jp_f)? TRUE : NO_X0201);
TRUE              716 ext/nkf/nkf-utf8/nkf.c     if (binmode_f == TRUE)
TRUE              730 ext/nkf/nkf-utf8/nkf.c       if (binmode_f == TRUE)
TRUE              759 ext/nkf/nkf-utf8/nkf.c               if (file_out == TRUE) {
TRUE              809 ext/nkf/nkf-utf8/nkf.c                   if (binmode_f == TRUE) {
TRUE              818 ext/nkf/nkf-utf8/nkf.c               if (binmode_f == TRUE)
TRUE              892 ext/nkf/nkf-utf8/nkf.c     if (file_out == TRUE)
TRUE             1001 ext/nkf/nkf-utf8/nkf.c                     file_out = TRUE;
TRUE             1002 ext/nkf/nkf-utf8/nkf.c                     overwrite = TRUE;
TRUE             1008 ext/nkf/nkf-utf8/nkf.c                     cap_f = TRUE;
TRUE             1012 ext/nkf/nkf-utf8/nkf.c                     url_f = TRUE;
TRUE             1018 ext/nkf/nkf-utf8/nkf.c                     numchar_f = TRUE;
TRUE             1024 ext/nkf/nkf-utf8/nkf.c                     noout_f = TRUE;
TRUE             1028 ext/nkf/nkf-utf8/nkf.c                     debug_f = TRUE;
TRUE             1034 ext/nkf/nkf-utf8/nkf.c                     cp932_f = TRUE;
TRUE             1035 ext/nkf/nkf-utf8/nkf.c                     cp932inv_f = TRUE;
TRUE             1038 ext/nkf/nkf-utf8/nkf.c                     ms_ucs_map_f = TRUE;
TRUE             1054 ext/nkf/nkf-utf8/nkf.c                     cp932inv_f = TRUE;
TRUE             1061 ext/nkf/nkf-utf8/nkf.c                     x0212_f = TRUE;
TRUE             1078 ext/nkf/nkf-utf8/nkf.c                     ms_ucs_map_f = TRUE;
TRUE             1096 ext/nkf/nkf-utf8/nkf.c             unbuf_f = TRUE;
TRUE             1099 ext/nkf/nkf-utf8/nkf.c             nop_f = TRUE;
TRUE             1112 ext/nkf/nkf-utf8/nkf.c             iso8859_f = TRUE;  /* Only compatible with ISO-2022-JP */
TRUE             1134 ext/nkf/nkf-utf8/nkf.c             rot_f = TRUE;
TRUE             1206 ext/nkf/nkf-utf8/nkf.c             if (x0201_f==NO_X0201) x0201_f=TRUE;
TRUE             1217 ext/nkf/nkf-utf8/nkf.c                 alpha_f |= TRUE;
TRUE             1234 ext/nkf/nkf-utf8/nkf.c             x0201_f = TRUE;
TRUE             1237 ext/nkf/nkf-utf8/nkf.c 	    fold_preserve_f = TRUE;
TRUE             1239 ext/nkf/nkf-utf8/nkf.c             fold_f = TRUE;
TRUE             1262 ext/nkf/nkf-utf8/nkf.c                 mime_f = TRUE; cp++;
TRUE             1278 ext/nkf/nkf-utf8/nkf.c 		mimeout_f = TRUE;
TRUE             1289 ext/nkf/nkf-utf8/nkf.c                 broken_f |= TRUE;
TRUE             1293 ext/nkf/nkf-utf8/nkf.c             file_out = TRUE;
TRUE             1303 ext/nkf/nkf-utf8/nkf.c             iso2022jp_f = TRUE;
TRUE             1318 ext/nkf/nkf-utf8/nkf.c             guess_f = TRUE;
TRUE             1373 ext/nkf/nkf-utf8/nkf.c         && (f == -TRUE || !input_f) /* -TRUE means "FORCE" */
TRUE             1737 ext/nkf/nkf-utf8/nkf.c             set_iconv(TRUE, result->iconv_func);
TRUE             1811 ext/nkf/nkf-utf8/nkf.c 	if (mimeout_f == TRUE) {
TRUE             1865 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, e_iconv);
TRUE             1867 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, s_iconv);
TRUE             1870 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, w_iconv);
TRUE             1872 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, w_iconv16);
TRUE             1874 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, w_iconv16);
TRUE             1963 ext/nkf/nkf-utf8/nkf.c 		    if (!is_8bit) is_8bit = TRUE;
TRUE             2057 ext/nkf/nkf-utf8/nkf.c                 shift_mode = TRUE;
TRUE             3599 ext/nkf/nkf-utf8/nkf.c     mimebuf_f = TRUE;
TRUE             3709 ext/nkf/nkf-utf8/nkf.c         is_inputcode_mixed = TRUE;
TRUE             3712 ext/nkf/nkf-utf8/nkf.c     is_inputcode_set = TRUE;
TRUE             4587 ext/nkf/nkf-utf8/nkf.c     binmode_f = TRUE;
TRUE             4599 ext/nkf/nkf-utf8/nkf.c      x0201_f = TRUE;
TRUE             4625 ext/nkf/nkf-utf8/nkf.c     cp932_f = TRUE;
TRUE             4626 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               79 ext/win32ole/win32ole.c #define WC2VSTR(x) ole_wc2vstr((x), TRUE)
TRUE             1237 ext/win32ole/win32ole.c                             found = TRUE;
TRUE             5452 ext/win32ole/win32ole.c             *is_default = TRUE;
TRUE             5632 ext/win32ole/win32ole.c         g_IsEventSinkVtblInitialized = TRUE;
TRUE             5742 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              770 util.c         	sign = TRUE;
TRUE              790 util.c         	    hasPoint = TRUE;
TRUE              803 util.c         	    hasDigit = TRUE;
TRUE              857 util.c         		expSign = TRUE;
TRUE              896 util.c         	    expSign = TRUE;
TRUE              916 util.c         	    expSign = TRUE;
TRUE               84 win32/win32.c  bool NtSyncProcess = TRUE;
TRUE              596 win32/win32.c      writing = (mode & (O_WRONLY | O_RDWR)) ? TRUE : FALSE;
TRUE              597 win32/win32.c      reading = ((mode & O_RDWR) || !writing) ? TRUE : FALSE;
TRUE              610 win32/win32.c      sa.bInheritHandle       = TRUE;
TRUE              873 win32/win32.c  	sa.bInheritHandle       = TRUE;
TRUE             1096 win32/win32.c  		return TRUE;
TRUE             1654 win32/win32.c      int result = TRUE;
TRUE             2502 win32/win32.c  	ret = WaitForMultipleEvents(count + 1, events, FALSE, timeout, TRUE);
TRUE             3005 win32/win32.c      ret = WaitForMultipleEvents(count, events, FALSE, timeout, TRUE);
TRUE             3174 win32/win32.c      return TRUE;
TRUE             3287 win32/win32.c  		interrupted = TRUE;
TRUE               88 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             140 random.c               *p = p[M] ^ TWIST(p[0], p[1]);
TWIST             143 random.c               *p = p[M-N] ^ TWIST(p[0], p[1]);
TWIST             145 random.c           *p = p[M-N] ^ TWIST(p[0], state[0]);


TYPE

TYPE              929 array.c            if (TYPE(obj) == T_ARRAY) {
TYPE             1268 array.c        	switch (TYPE(tmp)) {
TYPE             1367 array.c            else if (TYPE(inspect_tbl) != T_ARRAY) {
TYPE             1590 array.c            if (TYPE(a) == T_STRING) {
TYPE             1591 array.c        	if (TYPE(b) == T_STRING) return rb_str_cmp(a, b);
TYPE             2413 array.c        	if (TYPE(v) == T_ARRAY &&
TYPE             2444 array.c        	if (TYPE(v) == T_ARRAY &&
TYPE             2473 array.c            if (TYPE(ary2) != T_ARRAY) {
TYPE             2502 array.c            if (TYPE(ary2) != T_ARRAY) return Qfalse;
TYPE              927 bignum.c           switch (TYPE(y)) {
TYPE              971 bignum.c           switch (TYPE(y)) {
TYPE             1010 bignum.c           if (TYPE(y) != T_BIGNUM) return Qfalse;
TYPE             1168 bignum.c           switch (TYPE(y)) {
TYPE             1194 bignum.c           switch (TYPE(y)) {
TYPE             1226 bignum.c           switch (TYPE(y)) {
TYPE             1425 bignum.c           switch (TYPE(y)) {
TYPE             1459 bignum.c           switch (TYPE(y)) {
TYPE             1490 bignum.c           switch (TYPE(y)) {
TYPE             1519 bignum.c           switch (TYPE(y)) {
TYPE             1554 bignum.c           switch (TYPE(y)) {
TYPE             1594 bignum.c           switch (TYPE(y)) {
TYPE             1917 bignum.c           if (TYPE(y) == T_BIGNUM) {
TYPE             1973 bignum.c           else if (TYPE(y) == T_BIGNUM) {
TYPE              192 class.c            if (TYPE(super) != T_CLASS) {
TYPE              220 class.c        	if (TYPE(klass) != T_CLASS) {
TYPE              252 class.c        	if (TYPE(klass) != T_CLASS) {
TYPE              308 class.c        	if (TYPE(module) == T_MODULE)
TYPE              330 class.c        	if (TYPE(module) == T_MODULE)
TYPE              358 class.c            if (TYPE(module) == T_ICLASS) {
TYPE              385 class.c            if (TYPE(module) != T_MODULE) {
TYPE              786 class.c        	while (klass && (FL_TEST(klass, FL_SINGLETON) || TYPE(klass) == T_ICLASS)) {
TYPE               27 compar.c           if (TYPE(val) == T_BIGNUM) {
TYPE             1376 dir.c              if (TYPE(dir) != T_DATA ||
TYPE              479 enum.c             if (TYPE(obj) == T_ARRAY) {
TYPE              258 error.c            if (TYPE(x) != t) {
TYPE              505 error.c        	int t = TYPE(bt);
TYPE              512 error.c        	    if (TYPE(RARRAY(bt)->ptr[i]) != T_STRING) {
TYPE              735 error.c        	switch (TYPE(obj)) {
TYPE              896 error.c        	    if (TYPE(self) != T_OBJECT) { /* insurance to avoid type crash */
TYPE              963 error.c        	while (TYPE(klass) == T_ICLASS || FL_TEST(klass, FL_SINGLETON)) {
TYPE              264 eval.c             if (TYPE(x)!= T_STRING) {
TYPE              278 eval.c         		  (TYPE(klass) == T_MODULE) ? "module" : "class",
TYPE              607 eval.c             if (!body && TYPE(klass) == T_MODULE) {
TYPE             1261 eval.c         	    if (TYPE(ep->ptr[i]) == T_STRING) {
TYPE             1759 eval.c             if (TYPE(cmd) != T_STRING) {
TYPE             1941 eval.c         	    switch (TYPE(klass)) {
TYPE             1979 eval.c         	    switch (TYPE(obj)) {
TYPE             1986 eval.c         	else if (TYPE(c) == T_MODULE) {
TYPE             2075 eval.c         	if (TYPE(klass) == T_MODULE) {
TYPE             2191 eval.c         	if (TYPE(args) != T_ARRAY)\
TYPE             2392 eval.c         	    switch (TYPE(val)) {
TYPE             2453 eval.c             if (TYPE(proc) == T_DATA && RDATA(proc)->dfree == (RUBY_DATA_FUNC)blk_free) {
TYPE             2627 eval.c         	if (TYPE(klass) == T_ICLASS) {
TYPE             2751 eval.c         	    if (TYPE(val) != T_ARRAY) {
TYPE             2782 eval.c         	switch (TYPE(c)) {
TYPE             2888 eval.c         	    if (TYPE(l) == T_STRING) {
TYPE             2962 eval.c         		    if (TYPE(v) != T_ARRAY) v = rb_ary_to_ary(v);
TYPE             3003 eval.c         			if (TYPE(v) != T_ARRAY) v = rb_ary_to_ary(v);
TYPE             3646 eval.c         		switch (TYPE(klass)) {
TYPE             3928 eval.c         		if (TYPE(klass) != T_CLASS) {
TYPE             3974 eval.c         		if (TYPE(module) != T_MODULE) {
TYPE             4584 eval.c         	if (TYPE(argv[0]) == T_STRING) {
TYPE             4829 eval.c         		if (TYPE(val) == T_ARRAY && RARRAY(val)->len != 0) {
TYPE             5012 eval.c             if (TYPE(values) == T_ARRAY) {
TYPE             5912 eval.c         	    if (TYPE(defined_class) == T_ICLASS) {
TYPE             6298 eval.c             if (TYPE(ruby_class) == T_ICLASS) {
TYPE             6356 eval.c         		if (!NIL_P(errat) && TYPE(errat) == T_ARRAY) {
TYPE             6357 eval.c         		    if (!NIL_P(mesg) && TYPE(mesg) == T_STRING) {
TYPE             7308 eval.c             if (TYPE(module) != T_MODULE) {
TYPE             7358 eval.c             switch (TYPE(include)) {
TYPE             8532 eval.c             if (TYPE(other) != T_DATA) return Qfalse;
TYPE             8771 eval.c         	   (FL_TEST(rklass, FL_SINGLETON) || TYPE(rklass) == T_ICLASS)) {
TYPE             8774 eval.c             if (TYPE(klass) == T_ICLASS) klass = RBASIC(klass)->klass;
TYPE             8828 eval.c             if (TYPE(other) != T_DATA || RDATA(other)->dmark != (RUBY_DATA_FUNC)bm_mark)
TYPE             9109 eval.c         	if (TYPE(data->rklass) == T_MODULE) {
TYPE             9331 eval.c             if (TYPE(m) == T_DATA && RDATA(m)->dmark == (RUBY_DATA_FUNC)bm_mark) {
TYPE             10009 eval.c             if (TYPE(data) != T_DATA || RDATA(data)->dmark != (RUBY_DATA_FUNC)thread_mark) {
TYPE             10849 eval.c         	if (TYPE(oldbt) == T_ARRAY && RARRAY(oldbt)->len > 0) {
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              239 ext/dl/dl.c        switch (TYPE(e)) {
TYPE              267 ext/dl/dl.c        switch (TYPE(e)) {
TYPE              295 ext/dl/dl.c        switch (TYPE(e)) {
TYPE              324 ext/dl/dl.c        switch (TYPE(e)) {
TYPE              353 ext/dl/dl.c        switch (TYPE(e)) {
TYPE              382 ext/dl/dl.c        switch (TYPE(e)) {
TYPE              411 ext/dl/dl.c        switch (TYPE(e)) {
TYPE              462 ext/dl/dl.c      if(NIL_P(TYPE(val0))) {
TYPE              477 ext/dl/dl.c      switch (TYPE(val0)) {
TYPE               37 ext/dl/dl.h    # define StringValue(v) if(TYPE(v) != T_STRING) v = rb_str_to_str(v)
TYPE               40 ext/dl/dl.h    # define StringValuePtr(v) RSTRING((TYPE(v) == T_STRING) ? (v) : rb_str_to_str(v))->ptr
TYPE              740 ext/dl/ptr.c     if (TYPE(key) == T_FIXNUM || TYPE(key) == T_BIGNUM) {
TYPE              746 ext/dl/ptr.c     if (! (TYPE(key) == T_STRING || TYPE(key) == T_SYMBOL)) {
TYPE              832 ext/dl/ptr.c     if (TYPE(val) == T_ARRAY) {
TYPE              860 ext/dl/ptr.c     if (TYPE(key) == T_FIXNUM || TYPE(key) == T_BIGNUM) {
TYPE              315 ext/iconv/iconv.c     else if (TYPE(failed) != T_STRING || RSTRING(failed)->len < FAILED_MAXLEN) {
TYPE              398 ext/iconv/iconv.c 	    if (TYPE(rescue) == T_ARRAY) {
TYPE              482 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              160 ext/openssl/ossl_ssl.c     if(TYPE(ssl_method) == T_SYMBOL)
TYPE              354 ext/openssl/ossl_ssl.c 	if(TYPE(val) == T_ARRAY){
TYPE              463 ext/openssl/ossl_ssl.c     else if (TYPE(v) == T_ARRAY) {
TYPE              467 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              159 ext/readline/readline.c     if (TYPE(ary) != T_ARRAY)
TYPE              359 ext/socket/socket.c     switch (TYPE(val)) {
TYPE              570 ext/stringio/stringio.c     if (argc == 1 && TYPE(*argv) != T_STRING) {
TYPE             1002 ext/stringio/stringio.c     if (TYPE(str) != T_STRING)
TYPE             1743 ext/syck/rubyext.c     if ( TYPE( orig ) != T_DATA )
TYPE             1889 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              701 ext/win32ole/win32ole.c     while(TYPE(obj) == T_ARRAY) {
TYPE              754 ext/win32ole/win32ole.c     switch (TYPE(val)) {
TYPE              767 ext/win32ole/win32ole.c         while(TYPE(val1) == T_ARRAY) {
TYPE              783 ext/win32ole/win32ole.c         while(TYPE(val1) == T_ARRAY) {
TYPE             1577 ext/win32ole/win32ole.c     if (TYPE(klass) != T_CLASS &&
TYPE             1578 ext/win32ole/win32ole.c         TYPE(klass) != T_MODULE &&
TYPE             1579 ext/win32ole/win32ole.c         TYPE(klass) != T_NIL) {
TYPE             1595 ext/win32ole/win32ole.c         if(TYPE(klass) != T_NIL) {
TYPE             1603 ext/win32ole/win32ole.c     else if(TYPE(ole) == T_STRING) {
TYPE             1613 ext/win32ole/win32ole.c         if(TYPE(klass) != T_NIL) {
TYPE             1774 ext/win32ole/win32ole.c     if (TYPE(helpfile) != T_STRING) {
TYPE             1922 ext/win32ole/win32ole.c     if(TYPE(key) != T_STRING) {
TYPE             2020 ext/win32ole/win32ole.c     if(TYPE(param) == T_HASH) {
TYPE             3267 ext/win32ole/win32ole.c     if(TYPE(typelib) == T_STRING) {
TYPE             5425 ext/win32ole/win32ole.c         else if (TYPE(ev) == T_STRING &&
TYPE             5426 ext/win32ole/win32ole.c                  TYPE(event_name) == T_STRING &&
TYPE             5468 ext/win32ole/win32ole.c     switch (TYPE(val)) {
TYPE             5578 ext/win32ole/win32ole.c     if (NIL_P(ary) || TYPE(ary) != T_ARRAY) {
TYPE             5934 ext/win32ole/win32ole.c     if(TYPE(itf) != T_NIL) {
TYPE             6014 ext/win32ole/win32ole.c     if (NIL_P(events) || TYPE(events) != T_ARRAY) {
TYPE             2770 ext/zlib/zlib.c     if (TYPE(str) != T_STRING) {
TYPE             2925 file.c         	if (TYPE(RARRAY(ary)->ptr[i]) == T_STRING) {
TYPE             2932 file.c             if (!NIL_P(sep) && TYPE(sep) == T_STRING) {
TYPE             2938 file.c         	switch (TYPE(tmp)) {
TYPE             3215 file.c         	switch (TYPE(argv[i])) {
TYPE             1540 gc.c           		switch (TYPE(p)) {
TYPE             1573 gc.c           		switch (TYPE(p)) {
TYPE               66 hash.c             if (TYPE(a) == T_STRING && RBASIC(a)->klass == rb_cString &&
TYPE               67 hash.c         	TYPE(b) == T_STRING && RBASIC(b)->klass == rb_cString) {
TYPE               93 hash.c             switch (TYPE(a)) {
TYPE              327 hash.c             if (argc == 1 && TYPE(argv[0]) == T_HASH) {
TYPE              914 hash.c             if (TYPE(key) != T_STRING || st_lookup(RHASH(hash)->tbl, key, 0)) {
TYPE             1454 hash.c             if (TYPE(hash2) != T_HASH) {
TYPE             2228 hash.c             if (TYPE(value) != T_STRING) return Qfalse;
TYPE              549 io.c               if (TYPE(str) != T_STRING)
TYPE              552 io.c               if (TYPE(io) != T_FILE) {
TYPE             2153 io.c               if (TYPE(io) == T_FILE) {
TYPE             2341 io.c               if (TYPE(str) != T_STRING)
TYPE             3625 io.c               if (TYPE(argv[0]) == T_STRING) {
TYPE             3677 io.c           	switch (TYPE(argv[i])) {
TYPE             3893 io.c               if (TYPE(rb_stdout) == T_FILE) {
TYPE             4190 io.c           #define ARGF_FORWARD() do { if (TYPE(current_file) != T_FILE) return argf_forward(); } while (0)
TYPE             4200 io.c               if (TYPE(file) == T_FILE)
TYPE             4214 io.c               if (TYPE(rb_stdout) == T_FILE) {
TYPE             4252 io.c           		    if (TYPE(rb_stdout) == T_FILE && rb_stdout != orig_stdout) {
TYPE             4399 io.c               if (TYPE(current_file) != T_FILE) {
TYPE             4468 io.c               if (TYPE(rb_stdin) != T_FILE) {
TYPE             4766 io.c               if (TYPE(arg) == T_STRING && RSTRING(arg)->ptr[len] != 17) {
TYPE             5285 io.c               if (TYPE(current_file) != T_FILE) {
TYPE             5317 io.c               if (TYPE(current_file) != T_FILE) {
TYPE             5353 io.c               if (TYPE(current_file) != T_FILE) {
TYPE              110 marshal.c      		 (TYPE(klass) == T_CLASS ? "class" : "module"),
TYPE              517 marshal.c      	    if (TYPE(v) != T_STRING) {
TYPE              798 marshal.c          if (TYPE(arg->src) == T_STRING) {
TYPE              875 marshal.c          if (TYPE(arg->src) == T_STRING) {
TYPE              979 marshal.c          if (TYPE(v) != T_CLASS) {
TYPE              991 marshal.c          if (TYPE(v) != T_MODULE) {
TYPE             1049 marshal.c      	    if (rb_special_const_p(v) || TYPE(v) == T_OBJECT || TYPE(v) == T_CLASS) {
TYPE             1053 marshal.c      	    if (TYPE(v) == T_MODULE || !RTEST(rb_class_inherited_p(c, RBASIC(v)->klass))) {
TYPE             1056 marshal.c      		if (TYPE(v) != TYPE(tmp)) goto format_error;
TYPE             1273 marshal.c      	    if (TYPE(v) != T_OBJECT) {
TYPE             1295 marshal.c                 if (TYPE(v) != T_DATA) {
TYPE              140 numeric.c          if (TYPE(ary) != T_ARRAY || RARRAY(ary)->len != 2) {
TYPE              556 numeric.c          switch (TYPE(y)) {
TYPE              580 numeric.c          switch (TYPE(y)) {
TYPE              604 numeric.c          switch (TYPE(y)) {
TYPE              631 numeric.c          switch (TYPE(y)) {
TYPE              690 numeric.c          switch (TYPE(y)) {
TYPE              721 numeric.c          switch (TYPE(y)) {
TYPE              752 numeric.c          switch (TYPE(y)) {
TYPE              780 numeric.c          if (TYPE(x) != TYPE(y)) return Qfalse;
TYPE              827 numeric.c          switch (TYPE(y)) {
TYPE              898 numeric.c          switch (TYPE(y)) {
TYPE              931 numeric.c          switch (TYPE(y)) {
TYPE              967 numeric.c          switch (TYPE(y)) {
TYPE             1002 numeric.c          switch (TYPE(y)) {
TYPE             1038 numeric.c          switch (TYPE(y)) {
TYPE             1074 numeric.c          if (TYPE(y) == T_FLOAT) {
TYPE             1470 numeric.c          else if (TYPE(from) == T_FLOAT || TYPE(to) == T_FLOAT || TYPE(step) == T_FLOAT) {
TYPE             1514 numeric.c          switch (TYPE(val)) {
TYPE             1542 numeric.c          if (TYPE(val) == T_BIGNUM) {
TYPE             1665 numeric.c          switch (TYPE(val)) {
TYPE             1702 numeric.c          if (TYPE(val) == T_BIGNUM) {
TYPE             1846 numeric.c          switch (TYPE(x)) {
TYPE             1869 numeric.c          switch (TYPE(x)) {
TYPE             1988 numeric.c          if (TYPE(y) == T_FLOAT) {
TYPE             2021 numeric.c          if (TYPE(y) == T_FLOAT) {
TYPE             2056 numeric.c          if (TYPE(y) == T_FLOAT) {
TYPE             2205 numeric.c          } else if (TYPE(y) == T_FLOAT) {
TYPE             2382 numeric.c          if (TYPE(y) == T_BIGNUM) {
TYPE             2402 numeric.c          if (TYPE(y) == T_BIGNUM) {
TYPE             2422 numeric.c          if (TYPE(y) == T_BIGNUM) {
TYPE             2505 numeric.c          if (TYPE(idx) == T_BIGNUM) {
TYPE              160 object.c           while (FL_TEST(cl, FL_SINGLETON) || TYPE(cl) == T_ICLASS) {
TYPE              216 object.c           switch (TYPE(obj)) {
TYPE              313 object.c           if (TYPE(obj) != TYPE(orig) || rb_obj_class(obj) != rb_obj_class(orig)) {
TYPE              435 object.c           if (TYPE(obj) == T_OBJECT
TYPE              472 object.c           switch (TYPE(c)) {
TYPE              518 object.c           switch (TYPE(c)) {
TYPE              860 object.c           switch (TYPE(y)) {
TYPE             1268 object.c       	switch (TYPE(v)) {
TYPE             1334 object.c           switch (TYPE(arg)) {
TYPE             1397 object.c           switch (TYPE(arg)) {
TYPE             1445 object.c           switch (TYPE(arg)) {
TYPE             1636 object.c           while (TYPE(super) == T_ICLASS) {
TYPE             1665 object.c           switch (TYPE(name)) {
TYPE             2144 object.c           if (TYPE(val) == type) return val;
TYPE             2146 object.c           if (TYPE(v) != type) {
TYPE             2162 object.c           if (TYPE(val) == type && type != T_DATA) return val;
TYPE             2165 object.c           if (TYPE(v) != type) {
TYPE             2199 object.c           switch (TYPE(val)) {
TYPE             2347 object.c           switch (TYPE(val)) {
TYPE             2398 object.c           switch (TYPE(val)) {
TYPE              343 pack.c             if (TYPE(x) == T_BIGNUM) {
TYPE              952 pack.c         		if (TYPE(from) == T_BIGNUM) {
TYPE              954 pack.c         		    while (TYPE(from) == T_BIGNUM) {
TYPE             1890 pack.c         			if (TYPE(*p) == T_STRING && RSTRING(*p)->ptr == t) {
TYPE             1932 pack.c         			    if (TYPE(*p) == T_STRING && RSTRING(*p)->ptr == t) {
TYPE             6576 parse.c        	if (TYPE(hash) == T_HASH) {
TYPE             8788 parse.c        	    if (TYPE(node1->nd_lit) == T_REGEXP) {
TYPE             8801 parse.c        	    if (TYPE(node2->nd_lit) == T_REGEXP) {
TYPE             9372 parse.c        	if (TYPE(node->nd_lit) == T_REGEXP) {
TYPE             9488 parse.c            switch (TYPE(node->nd_lit)) {
TYPE             2578 parse.y        	if (TYPE(hash) == T_HASH) {
TYPE             4790 parse.y        	    if (TYPE(node1->nd_lit) == T_REGEXP) {
TYPE             4803 parse.y        	    if (TYPE(node2->nd_lit) == T_REGEXP) {
TYPE             5374 parse.y        	if (TYPE(node->nd_lit) == T_REGEXP) {
TYPE             5490 parse.y            switch (TYPE(node->nd_lit)) {
TYPE              110 prec.c             switch (TYPE(include)) {
TYPE             1429 process.c          if (TYPE(argv[0]) == T_ARRAY) {
TYPE             1450 process.c          if (TYPE(argv[0]) == T_ARRAY) {
TYPE             1480 process.c          if (TYPE(argv[0]) == T_ARRAY) {
TYPE             1503 process.c          if (TYPE(argv[0]) == T_ARRAY) {
TYPE              205 random.c           switch (TYPE(seed)) {
TYPE              451 random.c           switch (TYPE(vmax)) {
TYPE              483 random.c       	if (TYPE(vmax) == T_BIGNUM) goto bignum;
TYPE              414 range.c            else if (TYPE(beg) == T_STRING) {
TYPE             1480 re.c               if (TYPE(re2) != T_REGEXP) return Qfalse;
TYPE             1546 re.c               if (TYPE(str) != T_STRING) {
TYPE             1580 re.c               if (TYPE(line) != T_STRING) {
TYPE             1660 re.c               if (TYPE(argv[0]) == T_REGEXP) {
TYPE              285 ruby.h         #define NUM2CHR(x) (((TYPE(x) == T_STRING)&&(RSTRING(x)->len>=1))?\
TYPE              239 signal.c           switch (TYPE(argv[0])) {
TYPE              529 signal.c           else if (TYPE(command) == T_STRING) {
TYPE              560 signal.c           switch (TYPE(arg->sig)) {
TYPE              492 sprintf.c      		switch (TYPE(val)) {
TYPE              297 string.c           if (TYPE(obj) == T_STRING) {
TYPE              301 string.c           if (TYPE(str) != T_STRING)
TYPE              458 string.c           if (TYPE(arg) == T_ARRAY) {
TYPE              546 string.c           if (TYPE(s) != T_STRING) {
TYPE              937 string.c           if (TYPE(str2) != T_STRING) {
TYPE              963 string.c           if (TYPE(str2) != T_STRING || RSTRING(str1)->len != RSTRING(str2)->len)
TYPE             1004 string.c           if (TYPE(str2) != T_STRING) {
TYPE             1116 string.c       	    if (TYPE(sub) == T_REGEXP) {
TYPE             1123 string.c           switch (TYPE(sub)) {
TYPE             1226 string.c       		if (TYPE(sub) == T_REGEXP) {
TYPE             1238 string.c           switch (TYPE(sub)) {
TYPE             1296 string.c           switch (TYPE(y)) {
TYPE             1518 string.c           switch (TYPE(indx)) {
TYPE             1617 string.c       	if (TYPE(argv[0]) == T_REGEXP) {
TYPE             1725 string.c           switch (TYPE(indx)) {
TYPE             1809 string.c       	if (TYPE(argv[0]) == T_REGEXP) {
TYPE             1909 string.c           switch (TYPE(pat)) {
TYPE             2282 string.c           if (TYPE(line) != T_STRING) {
TYPE             3499 string.c       	if (TYPE(spat) == T_STRING && RSTRING(spat)->len == 1) {
TYPE             4610 string.c           if (!NIL_P(val) && TYPE(val) != T_STRING) {
TYPE              611 struct.c           if (TYPE(idx) == T_STRING || TYPE(idx) == T_SYMBOL) {
TYPE              677 struct.c           if (TYPE(idx) == T_STRING || TYPE(idx) == T_SYMBOL) {
TYPE              795 struct.c           if (TYPE(s2) != T_STRUCT) return Qfalse;
TYPE              845 struct.c           if (TYPE(s2) != T_STRUCT) return Qfalse;
TYPE              177 time.c             switch (TYPE(time)) {
TYPE              229 time.c             if (TYPE(time) == T_DATA && RDATA(time)->dfree == time_free) {
TYPE              269 time.c             if (TYPE(time) == T_DATA && RDATA(time)->dfree == time_free) {
TYPE              288 time.c             if (TYPE(obj) == T_STRING) {
TYPE              946 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
TYPE              976 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
TYPE             1043 time.c             if (TYPE(time) != T_DATA || RDATA(time)->dfree != time_free) {
TYPE             1329 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
TYPE             1357 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
TYPE               82 variable.c         switch (TYPE(value)) {
TYPE              161 variable.c     	if (TYPE(path) != T_STRING) {
TYPE              201 variable.c     	if (TYPE(klass) == T_MODULE) {
TYPE              265 variable.c     	switch (TYPE(c)) {
TYPE             1008 variable.c         switch (TYPE(obj)) {
TYPE             1051 variable.c         switch (TYPE(obj)) {
TYPE             1070 variable.c         switch (TYPE(obj)) {
TYPE             1121 variable.c         switch (TYPE(obj)) {
TYPE             1179 variable.c         switch (TYPE(obj)) {
TYPE             1705 variable.c         if (TYPE(c) == T_ICLASS)


TYPE_ARRAY

TYPE_ARRAY        598 marshal.c      	    w_byte(TYPE_ARRAY, arg);
TYPE_ARRAY       1163 marshal.c            case TYPE_ARRAY:


TYPE_BIGNUM

TYPE_BIGNUM       557 marshal.c      	    w_byte(TYPE_BIGNUM, arg);
TYPE_BIGNUM      1106 marshal.c            case TYPE_BIGNUM:


TYPE_CLASS

TYPE_CLASS        536 marshal.c      	    w_byte(TYPE_CLASS, arg);
TYPE_CLASS       1317 marshal.c            case TYPE_CLASS:


TYPE_DATA

TYPE_DATA         655 marshal.c      		w_class(TYPE_DATA, obj, arg, Qtrue);
TYPE_DATA        1281 marshal.c            case TYPE_DATA:


TYPE_EXTENDED

TYPE_EXTENDED     385 marshal.c      	w_byte(TYPE_EXTENDED, arg);
TYPE_EXTENDED    1026 marshal.c            case TYPE_EXTENDED:


TYPE_FALSE

TYPE_FALSE        481 marshal.c      	w_byte(TYPE_FALSE, arg);
TYPE_FALSE       1070 marshal.c            case TYPE_FALSE:


TYPE_FIXNUM

TYPE_FIXNUM       485 marshal.c      	w_byte(TYPE_FIXNUM, arg);
TYPE_FIXNUM       489 marshal.c      	    w_byte(TYPE_FIXNUM, arg);
TYPE_FIXNUM      1074 marshal.c            case TYPE_FIXNUM:


TYPE_FLOAT

TYPE_FLOAT        552 marshal.c      	    w_byte(TYPE_FLOAT, arg);
TYPE_FLOAT       1081 marshal.c            case TYPE_FLOAT:


TYPE_HASH

TYPE_HASH         614 marshal.c      		w_byte(TYPE_HASH, arg);
TYPE_HASH        1175 marshal.c            case TYPE_HASH:


TYPE_HASH_DEF

TYPE_HASH_DEF     621 marshal.c      		w_byte(TYPE_HASH_DEF, arg);
TYPE_HASH_DEF    1176 marshal.c            case TYPE_HASH_DEF:
TYPE_HASH_DEF    1187 marshal.c      	    if (type == TYPE_HASH_DEF) {


TYPE_IVAR

TYPE_IVAR         472 marshal.c      	w_byte(TYPE_IVAR, arg);
TYPE_IVAR         521 marshal.c      		w_byte(TYPE_IVAR, arg);
TYPE_IVAR        1017 marshal.c            case TYPE_IVAR:


TYPE_LINK

TYPE_LINK         466 marshal.c      	w_byte(TYPE_LINK, arg);
TYPE_LINK        1009 marshal.c            case TYPE_LINK:


TYPE_MODULE

TYPE_MODULE       544 marshal.c      	    w_byte(TYPE_MODULE, arg);
TYPE_MODULE      1326 marshal.c            case TYPE_MODULE:


TYPE_NIL

TYPE_NIL          475 marshal.c      	w_byte(TYPE_NIL, arg);
TYPE_NIL         1062 marshal.c            case TYPE_NIL:


TYPE_OBJECT

TYPE_OBJECT       647 marshal.c      	    w_class(TYPE_OBJECT, obj, arg, Qtrue);
TYPE_OBJECT      1268 marshal.c            case TYPE_OBJECT:


TYPE_REGEXP

TYPE_REGEXP       591 marshal.c      	    w_byte(TYPE_REGEXP, arg);
TYPE_REGEXP      1155 marshal.c            case TYPE_REGEXP:


TYPE_STRING

TYPE_STRING       585 marshal.c      	    w_byte(TYPE_STRING, arg);
TYPE_STRING      1151 marshal.c            case TYPE_STRING:


TYPE_STRUCT

TYPE_STRUCT       631 marshal.c      	    w_class(TYPE_STRUCT, obj, arg, Qtrue);
TYPE_STRUCT      1193 marshal.c            case TYPE_STRUCT:


TYPE_SYMBOL

TYPE_SYMBOL       339 marshal.c      	w_byte(TYPE_SYMBOL, arg);
TYPE_SYMBOL      1335 marshal.c            case TYPE_SYMBOL:


TYPE_SYMLINK

TYPE_SYMLINK      335 marshal.c      	w_byte(TYPE_SYMLINK, arg);
TYPE_SYMLINK      926 marshal.c          if (r_byte(arg) == TYPE_SYMLINK) {
TYPE_SYMLINK     1339 marshal.c            case TYPE_SYMLINK:


TYPE_TRUE

TYPE_TRUE         478 marshal.c      	w_byte(TYPE_TRUE, arg);
TYPE_TRUE        1066 marshal.c            case TYPE_TRUE:


TYPE_UCLASS

TYPE_UCLASS       417 marshal.c      	w_byte(TYPE_UCLASS, arg);
TYPE_UCLASS      1041 marshal.c            case TYPE_UCLASS:


TYPE_USERDEF

TYPE_USERDEF      523 marshal.c      	    w_class(TYPE_USERDEF, obj, arg, Qfalse);
TYPE_USERDEF     1227 marshal.c            case TYPE_USERDEF:


TYPE_USRMARSHAL

TYPE_USRMARSHAL   508 marshal.c      	    w_class(TYPE_USRMARSHAL, obj, arg, Qfalse);
TYPE_USRMARSHAL  1246 marshal.c            case TYPE_USRMARSHAL:


T_ARRAY

T_ARRAY           104 array.c            OBJSETUP(ary, klass, T_ARRAY);
T_ARRAY           214 array.c            return rb_convert_type(ary, T_ARRAY, "Array", "to_ary");
T_ARRAY           221 array.c            return rb_check_convert_type(ary, T_ARRAY, "Array", "to_ary");
T_ARRAY           465 array.c        	OBJSETUP(shared, rb_cArray, T_ARRAY);
T_ARRAY           929 array.c            if (TYPE(obj) == T_ARRAY) {
T_ARRAY           933 array.c        	return rb_convert_type(obj, T_ARRAY, "Array", "to_ary");
T_ARRAY          1271 array.c        	  case T_ARRAY:
T_ARRAY          1367 array.c            else if (TYPE(inspect_tbl) != T_ARRAY) {
T_ARRAY          2413 array.c        	if (TYPE(v) == T_ARRAY &&
T_ARRAY          2444 array.c        	if (TYPE(v) == T_ARRAY &&
T_ARRAY          2473 array.c            if (TYPE(ary2) != T_ARRAY) {
T_ARRAY          2502 array.c            if (TYPE(ary2) != T_ARRAY) return Qfalse;
T_ARRAY           479 enum.c             if (TYPE(obj) == T_ARRAY) {
T_ARRAY           876 enum.c         	argv[i] = rb_convert_type(argv[i], T_ARRAY, "Array", "to_a");
T_ARRAY           229 error.c            {T_ARRAY,	"Array"},
T_ARRAY           508 error.c        	if (t != T_ARRAY) {
T_ARRAY          2191 eval.c         	if (TYPE(args) != T_ARRAY)\
T_ARRAY          2751 eval.c         	    if (TYPE(val) != T_ARRAY) {
T_ARRAY          2962 eval.c         		    if (TYPE(v) != T_ARRAY) v = rb_ary_to_ary(v);
T_ARRAY          3003 eval.c         			if (TYPE(v) != T_ARRAY) v = rb_ary_to_ary(v);
T_ARRAY          4829 eval.c         		if (TYPE(val) == T_ARRAY && RARRAY(val)->len != 0) {
T_ARRAY          5012 eval.c             if (TYPE(values) == T_ARRAY) {
T_ARRAY          6356 eval.c         		if (!NIL_P(errat) && TYPE(errat) == T_ARRAY) {
T_ARRAY          10849 eval.c         	if (TYPE(oldbt) == T_ARRAY && RARRAY(oldbt)->len > 0) {
T_ARRAY            74 ext/Win32API/Win32API.c     case T_ARRAY:
T_ARRAY           476 ext/dbm/dbm.c      Check_Type(pair, T_ARRAY);
T_ARRAY           550 ext/dl/ptr.c     Check_Type(rest, T_ARRAY);
T_ARRAY           832 ext/dl/ptr.c     if (TYPE(val) == T_ARRAY) {
T_ARRAY           579 ext/gdbm/gdbm.c     Check_Type(pair, T_ARRAY);
T_ARRAY           398 ext/iconv/iconv.c 	    if (TYPE(rescue) == T_ARRAY) {
T_ARRAY           482 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           191 ext/openssl/ossl_ssl.c     Check_Type(ary, T_ARRAY);
T_ARRAY           354 ext/openssl/ossl_ssl.c 	if(TYPE(val) == T_ARRAY){
T_ARRAY           463 ext/openssl/ossl_ssl.c     else if (TYPE(v) == T_ARRAY) {
T_ARRAY           467 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           159 ext/readline/readline.c     if (TYPE(ary) != T_ARRAY)
T_ARRAY           455 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           701 ext/win32ole/win32ole.c     while(TYPE(obj) == T_ARRAY) {
T_ARRAY           755 ext/win32ole/win32ole.c     case T_ARRAY:
T_ARRAY           767 ext/win32ole/win32ole.c         while(TYPE(val1) == T_ARRAY) {
T_ARRAY           783 ext/win32ole/win32ole.c         while(TYPE(val1) == T_ARRAY) {
T_ARRAY          1953 ext/win32ole/win32ole.c     Check_Type(argv, T_ARRAY);
T_ARRAY          2207 ext/win32ole/win32ole.c     Check_Type(args, T_ARRAY);
T_ARRAY          2208 ext/win32ole/win32ole.c     Check_Type(types, T_ARRAY);
T_ARRAY          2244 ext/win32ole/win32ole.c                 Check_Type(param, T_ARRAY);
T_ARRAY          5578 ext/win32ole/win32ole.c     if (NIL_P(ary) || TYPE(ary) != T_ARRAY) {
T_ARRAY          6014 ext/win32ole/win32ole.c     if (NIL_P(events) || TYPE(events) != T_ARRAY) {
T_ARRAY          2941 file.c         	  case T_ARRAY:
T_ARRAY          4188 file.c             Check_Type(rb_load_path, T_ARRAY);
T_ARRAY          4249 file.c         	Check_Type(rb_load_path, T_ARRAY);
T_ARRAY           913 gc.c                 case T_ARRAY:
T_ARRAY          1172 gc.c                 case T_ARRAY:
T_ARRAY          4572 io.c           	Check_Type(read, T_ARRAY);
T_ARRAY          4593 io.c           	Check_Type(write, T_ARRAY);
T_ARRAY          4610 io.c           	Check_Type(except, T_ARRAY);
T_ARRAY           596 marshal.c      	  case T_ARRAY:
T_ARRAY           140 numeric.c          if (TYPE(ary) != T_ARRAY || RARRAY(ary)->len != 2) {
T_ARRAY           866 object.c             case T_ARRAY:
T_ARRAY          2465 object.c       	tmp = rb_check_convert_type(val, T_ARRAY, "Array", "to_a");
T_ARRAY          1429 process.c          if (TYPE(argv[0]) == T_ARRAY) {
T_ARRAY          1450 process.c          if (TYPE(argv[0]) == T_ARRAY) {
T_ARRAY          1480 process.c          if (TYPE(argv[0]) == T_ARRAY) {
T_ARRAY          1503 process.c          if (TYPE(argv[0]) == T_ARRAY) {
T_ARRAY          2466 process.c          Check_Type(ary, T_ARRAY);
T_ARRAY           458 string.c           if (TYPE(arg) == T_ARRAY) {


T_BIGNUM

T_BIGNUM           48 bignum.c           OBJSETUP(big, klass, T_BIGNUM);
T_BIGNUM          932 bignum.c             case T_BIGNUM:
T_BIGNUM          975 bignum.c             case T_BIGNUM:
T_BIGNUM         1010 bignum.c           if (TYPE(y) != T_BIGNUM) return Qfalse;
T_BIGNUM         1172 bignum.c             case T_BIGNUM:
T_BIGNUM         1198 bignum.c             case T_BIGNUM:
T_BIGNUM         1231 bignum.c             case T_BIGNUM:
T_BIGNUM         1430 bignum.c             case T_BIGNUM:
T_BIGNUM         1464 bignum.c             case T_BIGNUM:
T_BIGNUM         1495 bignum.c             case T_BIGNUM:
T_BIGNUM         1524 bignum.c             case T_BIGNUM:
T_BIGNUM         1559 bignum.c             case T_BIGNUM:
T_BIGNUM         1599 bignum.c             case T_BIGNUM:
T_BIGNUM         1917 bignum.c           if (TYPE(y) == T_BIGNUM) {
T_BIGNUM         1973 bignum.c           else if (TYPE(y) == T_BIGNUM) {
T_BIGNUM           27 compar.c           if (TYPE(val) == T_BIGNUM) {
T_BIGNUM          233 error.c            {T_BIGNUM,	"Bignum"},
T_BIGNUM          116 ext/bigdecimal/bigdecimal.c     case T_BIGNUM:
T_BIGNUM          297 ext/dl/dl.c        case T_BIGNUM:
T_BIGNUM          326 ext/dl/dl.c        case T_BIGNUM:
T_BIGNUM          355 ext/dl/dl.c        case T_BIGNUM:
T_BIGNUM          384 ext/dl/dl.c        case T_BIGNUM:
T_BIGNUM          479 ext/dl/dl.c      case T_BIGNUM:
T_BIGNUM          740 ext/dl/ptr.c     if (TYPE(key) == T_FIXNUM || TYPE(key) == T_BIGNUM) {
T_BIGNUM          860 ext/dl/ptr.c     if (TYPE(key) == T_FIXNUM || TYPE(key) == 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          821 ext/win32ole/win32ole.c     case T_BIGNUM:
T_BIGNUM         5513 ext/win32ole/win32ole.c     case T_BIGNUM:
T_BIGNUM          952 gc.c                 case T_BIGNUM:
T_BIGNUM         1221 gc.c                 case T_BIGNUM:
T_BIGNUM          556 marshal.c      	  case T_BIGNUM:
T_BIGNUM         1113 marshal.c      	    OBJSETUP(big, rb_cBignum, T_BIGNUM);
T_BIGNUM          559 numeric.c            case T_BIGNUM:
T_BIGNUM          583 numeric.c            case T_BIGNUM:
T_BIGNUM          607 numeric.c            case T_BIGNUM:
T_BIGNUM          635 numeric.c            case T_BIGNUM:
T_BIGNUM          694 numeric.c            case T_BIGNUM:
T_BIGNUM          725 numeric.c            case T_BIGNUM:
T_BIGNUM          755 numeric.c            case T_BIGNUM:
T_BIGNUM          831 numeric.c            case T_BIGNUM:
T_BIGNUM          903 numeric.c            case T_BIGNUM:
T_BIGNUM          936 numeric.c            case T_BIGNUM:
T_BIGNUM          972 numeric.c            case T_BIGNUM:
T_BIGNUM         1007 numeric.c            case T_BIGNUM:
T_BIGNUM         1043 numeric.c            case T_BIGNUM:
T_BIGNUM         1529 numeric.c            case T_BIGNUM:
T_BIGNUM         1542 numeric.c          if (TYPE(val) == T_BIGNUM) {
T_BIGNUM         1680 numeric.c          case T_BIGNUM:
T_BIGNUM         1702 numeric.c          if (TYPE(val) == T_BIGNUM) {
T_BIGNUM         1848 numeric.c          case T_BIGNUM:
T_BIGNUM         1871 numeric.c          case T_BIGNUM:
T_BIGNUM         2382 numeric.c          if (TYPE(y) == T_BIGNUM) {
T_BIGNUM         2402 numeric.c          if (TYPE(y) == T_BIGNUM) {
T_BIGNUM         2422 numeric.c          if (TYPE(y) == T_BIGNUM) {
T_BIGNUM         2505 numeric.c          if (TYPE(idx) == T_BIGNUM) {
T_BIGNUM          864 object.c             case T_BIGNUM:
T_BIGNUM         2208 object.c             case T_BIGNUM:
T_BIGNUM         2354 object.c             case T_BIGNUM:
T_BIGNUM          343 pack.c             if (TYPE(x) == T_BIGNUM) {
T_BIGNUM          952 pack.c         		if (TYPE(from) == T_BIGNUM) {
T_BIGNUM          954 pack.c         		    while (TYPE(from) == T_BIGNUM) {
T_BIGNUM         9492 parse.c              case T_BIGNUM:
T_BIGNUM         5494 parse.y              case T_BIGNUM:
T_BIGNUM          209 random.c             case T_BIGNUM:
T_BIGNUM          267 random.c           OBJSETUP(big, rb_cBignum, T_BIGNUM);
T_BIGNUM          462 random.c             case T_BIGNUM:
T_BIGNUM          483 random.c       	if (TYPE(vmax) == T_BIGNUM) goto bignum;
T_BIGNUM          501 sprintf.c      		  case T_BIGNUM:
T_BIGNUM          200 time.c               case T_BIGNUM:


T_BLKTAG

T_BLKTAG          953 gc.c                 case T_BLKTAG:
T_BLKTAG         1218 gc.c                 case T_BLKTAG:
T_BLKTAG         1897 gc.c               if (!is_pointer_to_heap((void *)ptr)|| BUILTIN_TYPE(ptr) >= T_BLKTAG) {


T_CLASS

T_CLASS            26 class.c            OBJSETUP(klass, rb_cClass, T_CLASS);
T_CLASS            41 class.c            Check_Type(super, T_CLASS);
T_CLASS           116 class.c        	if (BUILTIN_TYPE(obj) == T_CLASS) {
T_CLASS           158 class.c            if (BUILTIN_TYPE(obj) == T_CLASS && FL_TEST(obj, FL_SINGLETON)) {
T_CLASS           192 class.c            if (TYPE(super) != T_CLASS) {
T_CLASS           220 class.c        	if (TYPE(klass) != T_CLASS) {
T_CLASS           252 class.c        	if (TYPE(klass) != T_CLASS) {
T_CLASS           407 class.c        	      case T_CLASS:
T_CLASS           223 error.c            {T_CLASS,	"Class"},
T_CLASS           414 eval.c             Check_Type(klass, T_CLASS);
T_CLASS           422 eval.c             Check_Type(klass, T_CLASS);
T_CLASS          1945 eval.c         	      case T_CLASS:
T_CLASS          1981 eval.c         	      case T_CLASS:
T_CLASS          2393 eval.c         	      case T_CLASS:
T_CLASS          2783 eval.c         	  case T_CLASS:
T_CLASS          3647 eval.c         		  case T_CLASS:
T_CLASS          3928 eval.c         		if (TYPE(klass) != T_CLASS) {
T_CLASS          7359 eval.c               case T_CLASS:
T_CLASS          7363 eval.c         	Check_Type(include, T_CLASS);
T_CLASS          1577 ext/win32ole/win32ole.c     if (TYPE(klass) != T_CLASS &&
T_CLASS           401 gc.c               if (klass) Check_Type(klass, T_CLASS);
T_CLASS           906 gc.c                 case T_CLASS:
T_CLASS          1160 gc.c                 case T_CLASS:
T_CLASS          1546 gc.c           		  case T_CLASS:
T_CLASS          1579 gc.c           		  case T_CLASS:
T_CLASS           110 marshal.c      		 (TYPE(klass) == T_CLASS ? "class" : "module"),
T_CLASS           532 marshal.c      	  case T_CLASS:
T_CLASS           979 marshal.c          if (TYPE(v) != T_CLASS) {
T_CLASS          1049 marshal.c      	    if (rb_special_const_p(v) || TYPE(v) == T_OBJECT || TYPE(v) == T_CLASS) {
T_CLASS           218 object.c             case T_CLASS:
T_CLASS           474 object.c             case T_CLASS:
T_CLASS           520 object.c             case T_CLASS:
T_CLASS          1269 object.c       	  case T_CLASS: case T_MODULE:
T_CLASS          1336 object.c             case T_CLASS:
T_CLASS          1399 object.c             case T_CLASS:
T_CLASS          1447 object.c             case T_CLASS:
T_CLASS           111 prec.c               case T_CLASS:
T_CLASS           115 prec.c                Check_Type(include, T_CLASS);
T_CLASS            84 variable.c           case T_CLASS:
T_CLASS           267 variable.c     	  case T_CLASS:
T_CLASS          1010 variable.c           case T_CLASS:
T_CLASS          1053 variable.c           case T_CLASS:
T_CLASS          1072 variable.c           case T_CLASS:
T_CLASS          1123 variable.c           case T_CLASS:
T_CLASS          1181 variable.c           case T_CLASS:


T_DATA

T_DATA           1376 dir.c              if (TYPE(dir) != T_DATA ||
T_DATA            238 error.c            {T_DATA,	"Data"},	/* internal use: wrapped C pointers */
T_DATA           2453 eval.c             if (TYPE(proc) == T_DATA && RDATA(proc)->dfree == (RUBY_DATA_FUNC)blk_free) {
T_DATA           8532 eval.c             if (TYPE(other) != T_DATA) return Qfalse;
T_DATA           8661 eval.c         	b = rb_check_convert_type(proc, T_DATA, "Proc", "to_proc");
T_DATA           8828 eval.c             if (TYPE(other) != T_DATA || RDATA(other)->dmark != (RUBY_DATA_FUNC)bm_mark)
T_DATA           9331 eval.c             if (TYPE(m) == T_DATA && RDATA(m)->dmark == (RUBY_DATA_FUNC)bm_mark) {
T_DATA           10009 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            431 ext/dl/dl.c        case T_DATA:
T_DATA            502 ext/dl/dl.c      case T_DATA:
T_DATA            227 ext/iconv/iconv.c     Check_Type(obj, T_DATA);
T_DATA             79 ext/stringio/stringio.c     Check_Type(self, T_DATA);
T_DATA            499 ext/stringio/stringio.c     orig = rb_convert_type(orig, T_DATA, "StringIO", "to_strio");
T_DATA           1743 ext/syck/rubyext.c     if ( TYPE( orig ) != T_DATA )
T_DATA            402 gc.c               OBJSETUP(data, klass, T_DATA);
T_DATA            941 gc.c                 case T_DATA:
T_DATA           1190 gc.c                 case T_DATA:
T_DATA           1848 gc.c           	    if (BUILTIN_TYPE(p) == T_DATA &&
T_DATA            651 marshal.c      	  case T_DATA:
T_DATA           1295 marshal.c                 if (TYPE(v) != T_DATA) {
T_DATA           2162 object.c           if (TYPE(val) == type && type != T_DATA) return val;
T_DATA            395 ruby.h             Check_Type(obj, T_DATA); \
T_DATA            229 time.c             if (TYPE(time) == T_DATA && RDATA(time)->dfree == time_free) {
T_DATA            269 time.c             if (TYPE(time) == T_DATA && RDATA(time)->dfree == time_free) {
T_DATA            946 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
T_DATA            976 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
T_DATA           1043 time.c             if (TYPE(time) != T_DATA || RDATA(time)->dfree != time_free) {
T_DATA           1329 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
T_DATA           1357 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
T_DATA           1264 variable.c         Check_Type(av, T_DATA);


T_FALSE

T_FALSE           236 error.c            {T_FALSE,	"false"},
T_FALSE           742 error.c        	  case T_FALSE:
T_FALSE           363 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           833 ext/win32ole/win32ole.c     case T_FALSE:
T_FALSE          5523 ext/win32ole/win32ole.c     case T_FALSE:
T_FALSE          1144 gc.c                 case T_FALSE:
T_FALSE          1688 numeric.c          case T_FALSE:
T_FALSE           658 ruby.h             if (obj == Qfalse) return T_FALSE;


T_FILE

T_FILE            234 error.c            {T_FILE,	"File"},
T_FILE             21 ext/openssl/ossl_bio.c     if (TYPE(obj) == T_FILE) {
T_FILE            523 ext/openssl/ossl_ssl.c     Check_Type(io, T_FILE);
T_FILE             72 ext/readline/readline.c     Check_Type(rb_stdout, T_FILE);
T_FILE             75 ext/readline/readline.c     Check_Type(rb_stdin, T_FILE);
T_FILE            653 file.c             tmp = rb_check_convert_type(file, T_FILE, "IO", "to_io");
T_FILE            674 file.c             tmp = rb_check_convert_type(*file, T_FILE, "IO", "to_io");
T_FILE           3220 file.c         	  case T_FILE:
T_FILE            949 gc.c                 case T_FILE:
T_FILE           1206 gc.c                 case T_FILE:
T_FILE           1858 gc.c           	    else if (BUILTIN_TYPE(p) == T_FILE) {
T_FILE            321 io.c               OBJSETUP(io, klass, T_FILE);
T_FILE            552 io.c               if (TYPE(io) != T_FILE) {
T_FILE           2153 io.c               if (TYPE(io) == T_FILE) {
T_FILE           3325 io.c               return rb_convert_type(io, T_FILE, "IO", "to_io");
T_FILE           3332 io.c               return rb_check_convert_type(io, T_FILE, "IO", "to_io");
T_FILE           3893 io.c               if (TYPE(rb_stdout) == T_FILE) {
T_FILE           4190 io.c           #define ARGF_FORWARD() do { if (TYPE(current_file) != T_FILE) return argf_forward(); } while (0)
T_FILE           4200 io.c               if (TYPE(file) == T_FILE)
T_FILE           4214 io.c               if (TYPE(rb_stdout) == T_FILE) {
T_FILE           4252 io.c           		    if (TYPE(rb_stdout) == T_FILE && rb_stdout != orig_stdout) {
T_FILE           4399 io.c               if (TYPE(current_file) != T_FILE) {
T_FILE           4468 io.c               if (TYPE(rb_stdin) != T_FILE) {
T_FILE           5285 io.c               if (TYPE(current_file) != T_FILE) {
T_FILE           5317 io.c               if (TYPE(current_file) != T_FILE) {
T_FILE           5353 io.c               if (TYPE(current_file) != T_FILE) {


T_FIXNUM

T_FIXNUM          928 bignum.c             case T_FIXNUM:
T_FIXNUM          972 bignum.c             case T_FIXNUM:
T_FIXNUM         1169 bignum.c             case T_FIXNUM:
T_FIXNUM         1195 bignum.c             case T_FIXNUM:
T_FIXNUM         1227 bignum.c             case T_FIXNUM:
T_FIXNUM         1426 bignum.c             case T_FIXNUM:
T_FIXNUM         1460 bignum.c             case T_FIXNUM:
T_FIXNUM         1491 bignum.c             case T_FIXNUM:
T_FIXNUM         1520 bignum.c             case T_FIXNUM:
T_FIXNUM         1555 bignum.c             case T_FIXNUM:
T_FIXNUM         1604 bignum.c             case T_FIXNUM:
T_FIXNUM          230 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          296 ext/dl/dl.c        case T_FIXNUM:
T_FIXNUM          325 ext/dl/dl.c        case T_FIXNUM:
T_FIXNUM          354 ext/dl/dl.c        case T_FIXNUM:
T_FIXNUM          383 ext/dl/dl.c        case T_FIXNUM:
T_FIXNUM          478 ext/dl/dl.c      case T_FIXNUM:
T_FIXNUM           15 ext/dl/ptr.c   # define T_SYMBOL T_FIXNUM
T_FIXNUM          740 ext/dl/ptr.c     if (TYPE(key) == T_FIXNUM || TYPE(key) == T_BIGNUM) {
T_FIXNUM          860 ext/dl/ptr.c     if (TYPE(key) == T_FIXNUM || TYPE(key) == T_BIGNUM) {
T_FIXNUM           65 ext/openssl/ossl_bn.c     case T_FIXNUM:
T_FIXNUM          223 ext/openssl/ossl_bn.c     case T_FIXNUM:
T_FIXNUM          360 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          817 ext/win32ole/win32ole.c     case T_FIXNUM:
T_FIXNUM         5474 ext/win32ole/win32ole.c     case T_FIXNUM:
T_FIXNUM         1018 ext/zlib/zlib.c     Check_Type(size, T_FIXNUM);
T_FIXNUM         1111 ext/zlib/zlib.c     : ((void)Check_Type((val), T_FIXNUM), FIX2INT((val))))
T_FIXNUM          764 gc.c                 case T_FIXNUM:
T_FIXNUM         1142 gc.c                 case T_FIXNUM:
T_FIXNUM           94 hash.c               case T_FIXNUM:
T_FIXNUM         4117 io.c           	VALUE fd = rb_check_convert_type(argv[0], T_FIXNUM, "Fixnum", "to_int");
T_FIXNUM          557 numeric.c            case T_FIXNUM:
T_FIXNUM          581 numeric.c            case T_FIXNUM:
T_FIXNUM          605 numeric.c            case T_FIXNUM:
T_FIXNUM          632 numeric.c            case T_FIXNUM:
T_FIXNUM          691 numeric.c            case T_FIXNUM:
T_FIXNUM          722 numeric.c            case T_FIXNUM:
T_FIXNUM          753 numeric.c            case T_FIXNUM:
T_FIXNUM          828 numeric.c            case T_FIXNUM:
T_FIXNUM          899 numeric.c            case T_FIXNUM:
T_FIXNUM          932 numeric.c            case T_FIXNUM:
T_FIXNUM          968 numeric.c            case T_FIXNUM:
T_FIXNUM         1003 numeric.c            case T_FIXNUM:
T_FIXNUM         1039 numeric.c            case T_FIXNUM:
T_FIXNUM         1847 numeric.c          case T_FIXNUM:
T_FIXNUM         1870 numeric.c          case T_FIXNUM:
T_FIXNUM          862 object.c             case T_FIXNUM:
T_FIXNUM         1668 object.c             case T_FIXNUM:
T_FIXNUM         2207 object.c             case T_FIXNUM:
T_FIXNUM         2348 object.c             case T_FIXNUM:
T_FIXNUM         9489 parse.c              case T_FIXNUM:
T_FIXNUM         5491 parse.y              case T_FIXNUM:
T_FIXNUM          206 random.c             case T_FIXNUM:
T_FIXNUM          484 random.c             case T_FIXNUM:
T_FIXNUM          656 ruby.h             if (FIXNUM_P(obj)) return T_FIXNUM;
T_FIXNUM          240 signal.c             case T_FIXNUM:
T_FIXNUM          294 signal.c       	    Check_Type(argv[i], T_FIXNUM);
T_FIXNUM          561 signal.c             case T_FIXNUM:
T_FIXNUM          504 sprintf.c      		  case T_FIXNUM:
T_FIXNUM         1129 string.c             case T_FIXNUM:
T_FIXNUM         1252 string.c             case T_FIXNUM:
T_FIXNUM         1519 string.c             case T_FIXNUM:
T_FIXNUM         1726 string.c             case T_FIXNUM:
T_FIXNUM          178 time.c               case T_FIXNUM:


T_FLOAT

T_FLOAT           935 bignum.c             case T_FLOAT:
T_FLOAT           977 bignum.c             case T_FLOAT:
T_FLOAT          1175 bignum.c             case T_FLOAT:
T_FLOAT          1201 bignum.c             case T_FLOAT:
T_FLOAT          1234 bignum.c             case T_FLOAT:
T_FLOAT          1433 bignum.c             case T_FLOAT:
T_FLOAT          1563 bignum.c             case T_FLOAT:
T_FLOAT          1595 bignum.c             case T_FLOAT:
T_FLOAT           226 error.c            {T_FLOAT,	"Float"},
T_FLOAT           428 ext/bigdecimal/bigdecimal.c     if(TYPE(other) == T_FLOAT) {
T_FLOAT           240 ext/dl/dl.c        case T_FLOAT:
T_FLOAT           268 ext/dl/dl.c        case T_FLOAT:
T_FLOAT           494 ext/dl/dl.c      case T_FLOAT:
T_FLOAT           553 ext/dl/sym.c         Check_Type(argv[i], T_FLOAT);
T_FLOAT           558 ext/dl/sym.c         Check_Type(argv[i], T_FLOAT);
T_FLOAT           565 ext/dl/sym.c         Check_Type(argv[i], T_FLOAT);
T_FLOAT           570 ext/dl/sym.c         Check_Type(argv[i], 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           825 ext/win32ole/win32ole.c     case T_FLOAT:
T_FLOAT          5495 ext/win32ole/win32ole.c     case T_FLOAT:
T_FLOAT           951 gc.c                 case T_FLOAT:
T_FLOAT          1216 gc.c                 case T_FLOAT:
T_FLOAT           551 marshal.c      	  case T_FLOAT:
T_FLOAT           473 numeric.c          OBJSETUP(flt, rb_cFloat, T_FLOAT);
T_FLOAT           561 numeric.c            case T_FLOAT:
T_FLOAT           585 numeric.c            case T_FLOAT:
T_FLOAT           609 numeric.c            case T_FLOAT:
T_FLOAT           638 numeric.c            case T_FLOAT:
T_FLOAT           697 numeric.c            case T_FLOAT:
T_FLOAT           728 numeric.c            case T_FLOAT:
T_FLOAT           757 numeric.c            case T_FLOAT:
T_FLOAT           834 numeric.c            case T_FLOAT:
T_FLOAT           907 numeric.c            case T_FLOAT:
T_FLOAT           940 numeric.c            case T_FLOAT:
T_FLOAT           976 numeric.c            case T_FLOAT:
T_FLOAT          1011 numeric.c            case T_FLOAT:
T_FLOAT          1047 numeric.c            case T_FLOAT:
T_FLOAT          1074 numeric.c          if (TYPE(y) == T_FLOAT) {
T_FLOAT          1470 numeric.c          else if (TYPE(from) == T_FLOAT || TYPE(to) == T_FLOAT || TYPE(step) == T_FLOAT) {
T_FLOAT          1515 numeric.c            case T_FLOAT:
T_FLOAT          1666 numeric.c          case T_FLOAT:
T_FLOAT          1850 numeric.c          case T_FLOAT:
T_FLOAT          1873 numeric.c          case T_FLOAT:
T_FLOAT          1988 numeric.c          if (TYPE(y) == T_FLOAT) {
T_FLOAT          2021 numeric.c          if (TYPE(y) == T_FLOAT) {
T_FLOAT          2056 numeric.c          if (TYPE(y) == T_FLOAT) {
T_FLOAT          2205 numeric.c          } else if (TYPE(y) == T_FLOAT) {
T_FLOAT           863 object.c             case T_FLOAT:
T_FLOAT          2200 object.c             case T_FLOAT:
T_FLOAT          2351 object.c             case T_FLOAT:
T_FLOAT          2366 object.c       	  VALUE f = rb_convert_type(val, T_FLOAT, "Float", "to_f");
T_FLOAT          2399 object.c             case T_FLOAT:
T_FLOAT          9495 parse.c              case T_FLOAT:
T_FLOAT          5497 parse.y              case T_FLOAT:
T_FLOAT           452 random.c             case T_FLOAT:
T_FLOAT           493 sprintf.c      		  case T_FLOAT:
T_FLOAT           185 time.c               case T_FLOAT:


T_HASH

T_HASH            231 error.c            {T_HASH,	"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           1630 ext/syck/rubyext.c         VALUE hsh = rb_check_convert_type(val, T_HASH, "Hash", "to_hash");
T_HASH           1665 ext/syck/rubyext.c         VALUE hsh = rb_check_convert_type(val, T_HASH, "Hash", "to_hash");
T_HASH           1996 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           2020 ext/win32ole/win32ole.c     if(TYPE(param) == T_HASH) {
T_HASH            928 gc.c                 case T_HASH:
T_HASH           1177 gc.c                 case T_HASH:
T_HASH            232 hash.c             OBJSETUP(hash, klass, T_HASH);
T_HASH            327 hash.c             if (argc == 1 && TYPE(argv[0]) == T_HASH) {
T_HASH            352 hash.c             return rb_convert_type(hash, T_HASH, "Hash", "to_hash");
T_HASH           1454 hash.c             if (TYPE(hash2) != T_HASH) {
T_HASH            611 marshal.c      	  case T_HASH:
T_HASH           6576 parse.c        	if (TYPE(hash) == T_HASH) {
T_HASH           2578 parse.y        	if (TYPE(hash) == T_HASH) {


T_ICLASS

T_ICLASS          347 class.c            OBJSETUP(klass, rb_cClass, T_ICLASS);
T_ICLASS          349 class.c            if (BUILTIN_TYPE(module) == T_ICLASS) {
T_ICLASS          358 class.c            if (TYPE(module) == T_ICLASS) {
T_ICLASS          399 class.c        	      case T_ICLASS:
T_ICLASS          445 class.c        	if (BUILTIN_TYPE(p) == T_ICLASS) {
T_ICLASS          480 class.c        	if (BUILTIN_TYPE(p) == T_ICLASS) {
T_ICLASS          512 class.c        	if (BUILTIN_TYPE(p) == T_ICLASS) {
T_ICLASS          625 class.c        	if (BUILTIN_TYPE(mod) == T_ICLASS) continue;
T_ICLASS          786 class.c        	while (klass && (FL_TEST(klass, FL_SINGLETON) || TYPE(klass) == T_ICLASS)) {
T_ICLASS          224 error.c            {T_ICLASS,	"iClass"},	/* internal use: mixed-in module holder */
T_ICLASS          963 error.c        	while (TYPE(klass) == T_ICLASS || FL_TEST(klass, FL_SINGLETON)) {
T_ICLASS         1943 eval.c         	      case T_ICLASS:
T_ICLASS         2627 eval.c         	if (TYPE(klass) == T_ICLASS) {
T_ICLASS         5912 eval.c         	    if (TYPE(defined_class) == T_ICLASS) {
T_ICLASS         6298 eval.c             if (TYPE(ruby_class) == T_ICLASS) {
T_ICLASS         8771 eval.c         	   (FL_TEST(rklass, FL_SINGLETON) || TYPE(rklass) == T_ICLASS)) {
T_ICLASS         8774 eval.c             if (TYPE(klass) == T_ICLASS) klass = RBASIC(klass)->klass;
T_ICLASS          905 gc.c                 case T_ICLASS:
T_ICLASS         1212 gc.c                 case T_ICLASS:
T_ICLASS         1541 gc.c           		  case T_ICLASS:
T_ICLASS         1574 gc.c           		  case T_ICLASS:
T_ICLASS          383 marshal.c          while (BUILTIN_TYPE(klass) == T_ICLASS) {
T_ICLASS          160 object.c           while (FL_TEST(cl, FL_SINGLETON) || TYPE(cl) == T_ICLASS) {
T_ICLASS          475 object.c             case T_ICLASS:
T_ICLASS          521 object.c             case T_ICLASS:
T_ICLASS         1636 object.c           while (TYPE(super) == T_ICLASS) {
T_ICLASS         1705 variable.c         if (TYPE(c) == 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            762 gc.c               switch (obj->as.basic.flags & T_MASK) {
T_MASK            904 gc.c               switch (obj->as.basic.flags & T_MASK) {
T_MASK            992 gc.c           	       obj->as.basic.flags & T_MASK, obj,
T_MASK           1140 gc.c               switch (RANY(obj)->as.basic.flags & T_MASK) {
T_MASK           1153 gc.c               switch (RANY(obj)->as.basic.flags & T_MASK) {
T_MASK           1258 gc.c           	       RANY(obj)->as.basic.flags & T_MASK, obj);
T_MASK            210 object.c           RBASIC(dest)->flags &= ~(T_MASK|FL_EXIVAR);
T_MASK            211 object.c           RBASIC(dest)->flags |= RBASIC(obj)->flags & (T_MASK|FL_EXIVAR|FL_TAINT);
T_MASK            214 ruby.h         #define BUILTIN_TYPE(x) (((struct RBasic*)(x))->flags & T_MASK)
T_MASK            302 ruby.h             OBJSETUP(dup,rb_obj_class(obj),(RBASIC(obj)->flags)&(T_MASK|FL_EXIVAR|FL_TAINT));\


T_MATCH

T_MATCH           239 error.c            {T_MATCH,	"MatchData"},	/* data of $~ */
T_MATCH           956 gc.c                 case T_MATCH:
T_MATCH          1200 gc.c                 case T_MATCH:
T_MATCH           673 re.c               OBJSETUP(match, klass, T_MATCH);
T_MATCH          2175 re.c           	Check_Type(val, T_MATCH);


T_MODULE

T_MODULE          276 class.c            OBJSETUP(mdl, rb_cModule, T_MODULE);
T_MODULE          308 class.c        	if (TYPE(module) == T_MODULE)
T_MODULE          330 class.c        	if (TYPE(module) == T_MODULE)
T_MODULE          385 class.c            if (TYPE(module) != T_MODULE) {
T_MODULE          386 class.c        	Check_Type(module, T_MODULE);
T_MODULE          478 class.c            Check_Type(mod2, T_MODULE);
T_MODULE          225 error.c            {T_MODULE,	"Module"},
T_MODULE          278 eval.c         		  (TYPE(klass) == T_MODULE) ? "module" : "class",
T_MODULE          607 eval.c             if (!body && TYPE(klass) == T_MODULE) {
T_MODULE         1942 eval.c         	      case T_MODULE:
T_MODULE         1980 eval.c         	      case T_MODULE:
T_MODULE         1986 eval.c         	else if (TYPE(c) == T_MODULE) {
T_MODULE         2075 eval.c         	if (TYPE(klass) == T_MODULE) {
T_MODULE         2394 eval.c         	      case T_MODULE:
T_MODULE         2784 eval.c         	  case T_MODULE:
T_MODULE         3648 eval.c         		  case T_MODULE:
T_MODULE         3974 eval.c         		if (TYPE(module) != T_MODULE) {
T_MODULE         7308 eval.c             if (TYPE(module) != T_MODULE) {
T_MODULE         7360 eval.c               case T_MODULE:
T_MODULE         7386 eval.c             for (i=0; i<argc; i++) Check_Type(argv[i], T_MODULE);
T_MODULE         7483 eval.c             for (i=0; i<argc; i++) Check_Type(argv[i], T_MODULE);
T_MODULE         9109 eval.c         	if (TYPE(data->rklass) == T_MODULE) {
T_MODULE         1578 ext/win32ole/win32ole.c         TYPE(klass) != T_MODULE &&
T_MODULE          907 gc.c                 case T_MODULE:
T_MODULE         1159 gc.c                 case T_MODULE:
T_MODULE          543 marshal.c      	  case T_MODULE:
T_MODULE          991 marshal.c          if (TYPE(v) != T_MODULE) {
T_MODULE         1053 marshal.c      	    if (TYPE(v) == T_MODULE || !RTEST(rb_class_inherited_p(c, RBASIC(v)->klass))) {
T_MODULE          219 object.c             case T_MODULE:
T_MODULE          473 object.c             case T_MODULE:
T_MODULE          519 object.c             case T_MODULE:
T_MODULE         1269 object.c       	  case T_CLASS: case T_MODULE:
T_MODULE         1335 object.c             case T_MODULE:
T_MODULE         1398 object.c             case T_MODULE:
T_MODULE         1446 object.c             case T_MODULE:
T_MODULE          112 prec.c               case T_MODULE:
T_MODULE           83 variable.c           case T_MODULE:
T_MODULE          201 variable.c     	if (TYPE(klass) == T_MODULE) {
T_MODULE          266 variable.c     	  case T_MODULE:
T_MODULE         1011 variable.c           case T_MODULE:
T_MODULE         1054 variable.c           case T_MODULE:
T_MODULE         1073 variable.c           case T_MODULE:
T_MODULE         1124 variable.c           case T_MODULE:
T_MODULE         1182 variable.c           case T_MODULE:
T_MODULE         1423 variable.c         if (!exclude && !mod_retry && BUILTIN_TYPE(klass) == T_MODULE) {
T_MODULE         1599 variable.c         if (!exclude && !mod_retry && BUILTIN_TYPE(klass) == T_MODULE) {
T_MODULE         1643 variable.c     	if (BUILTIN_TYPE(klass) == T_MODULE) {


T_NIL

T_NIL             221 error.c            {T_NIL,	"nil"},
T_NIL             736 error.c        	  case T_NIL:
T_NIL              72 ext/Win32API/Win32API.c     case T_NIL:
T_NIL             243 ext/dl/dl.c        case T_NIL:
T_NIL             271 ext/dl/dl.c        case T_NIL:
T_NIL             300 ext/dl/dl.c        case T_NIL:
T_NIL             329 ext/dl/dl.c        case T_NIL:
T_NIL             358 ext/dl/dl.c        case T_NIL:
T_NIL             387 ext/dl/dl.c        case T_NIL:
T_NIL             428 ext/dl/dl.c        case T_NIL:
T_NIL             513 ext/dl/dl.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             837 ext/win32ole/win32ole.c     case T_NIL:
T_NIL            1579 ext/win32ole/win32ole.c         TYPE(klass) != T_NIL) {
T_NIL            1595 ext/win32ole/win32ole.c         if(TYPE(klass) != T_NIL) {
T_NIL            1613 ext/win32ole/win32ole.c         if(TYPE(klass) != T_NIL) {
T_NIL            5934 ext/win32ole/win32ole.c     if(TYPE(itf) != T_NIL) {
T_NIL             763 gc.c                 case T_NIL:
T_NIL            1141 gc.c                 case T_NIL:
T_NIL            3678 io.c           	  case T_NIL:
T_NIL             861 object.c             case T_NIL:
T_NIL            2360 object.c             case T_NIL:
T_NIL            2406 object.c             case T_NIL:
T_NIL             478 random.c             case T_NIL:
T_NIL             657 ruby.h             if (obj == Qnil) return T_NIL;


T_NODE

T_NODE            242 error.c            {T_NODE,	"Node"},	/* internal use: syntax tree node */
T_NODE           2821 eval.c             else if (BUILTIN_TYPE(node) != T_NODE) {
T_NODE            768 gc.c                 case T_NODE:
T_NODE           1048 gc.c           		if (!(p->as.basic.flags&FL_MARK) && BUILTIN_TYPE(p) == T_NODE)
T_NODE           1226 gc.c                 case T_NODE:
T_NODE           1544 gc.c           		  case T_NODE:
T_NODE           1577 gc.c           		  case T_NODE:
T_NODE           8495 parse.c            n->flags |= T_NODE;
T_NODE           4497 parse.y            n->flags |= T_NODE;


T_OBJECT

T_OBJECT          222 error.c            {T_OBJECT,	"Object"},
T_OBJECT          896 error.c        	    if (TYPE(self) != T_OBJECT) { /* insurance to avoid type crash */
T_OBJECT          945 gc.c                 case T_OBJECT:
T_OBJECT         1154 gc.c                 case T_OBJECT:
T_OBJECT          646 marshal.c      	  case T_OBJECT:
T_OBJECT         1049 marshal.c      	    if (rb_special_const_p(v) || TYPE(v) == T_OBJECT || TYPE(v) == T_CLASS) {
T_OBJECT         1273 marshal.c      	    if (TYPE(v) != T_OBJECT) {
T_OBJECT          217 object.c             case T_OBJECT:
T_OBJECT          435 object.c           if (TYPE(obj) == T_OBJECT
T_OBJECT         1582 object.c           OBJSETUP(obj, klass, T_OBJECT);
T_OBJECT         1009 variable.c           case T_OBJECT:
T_OBJECT         1052 variable.c           case T_OBJECT:
T_OBJECT         1071 variable.c           case T_OBJECT:
T_OBJECT         1122 variable.c           case T_OBJECT:
T_OBJECT         1180 variable.c           case T_OBJECT:


T_REGEXP

T_REGEXP          228 error.c            {T_REGEXP,	"Regexp"},
T_REGEXP          403 ext/strscan/strscan.c     Check_Type(regex, T_REGEXP);
T_REGEXP          822 ext/tk/tkutil/tkutil.c     case T_REGEXP:
T_REGEXP          950 gc.c                 case T_REGEXP:
T_REGEXP         1182 gc.c                 case T_REGEXP:
T_REGEXP          589 marshal.c      	  case T_REGEXP:
T_REGEXP         8788 parse.c        	    if (TYPE(node1->nd_lit) == T_REGEXP) {
T_REGEXP         8801 parse.c        	    if (TYPE(node2->nd_lit) == T_REGEXP) {
T_REGEXP         9372 parse.c        	if (TYPE(node->nd_lit) == T_REGEXP) {
T_REGEXP         4790 parse.y        	    if (TYPE(node1->nd_lit) == T_REGEXP) {
T_REGEXP         4803 parse.y        	    if (TYPE(node2->nd_lit) == T_REGEXP) {
T_REGEXP         5374 parse.y        	if (TYPE(node->nd_lit) == T_REGEXP) {
T_REGEXP         1382 re.c               OBJSETUP(re, klass, T_REGEXP);
T_REGEXP         1480 re.c               if (TYPE(re2) != T_REGEXP) return Qfalse;
T_REGEXP         1660 re.c               if (TYPE(argv[0]) == T_REGEXP) {
T_REGEXP         1915 re.c                   v = rb_check_convert_type(argv[0], T_REGEXP, "Regexp", "to_regexp");
T_REGEXP         1933 re.c                       v = rb_check_convert_type(argv[i], T_REGEXP, "Regexp", "to_regexp");
T_REGEXP         1116 string.c       	    if (TYPE(sub) == T_REGEXP) {
T_REGEXP         1124 string.c             case T_REGEXP:
T_REGEXP         1226 string.c       		if (TYPE(sub) == T_REGEXP) {
T_REGEXP         1239 string.c             case T_REGEXP:
T_REGEXP         1300 string.c             case T_REGEXP:
T_REGEXP         1531 string.c             case T_REGEXP:
T_REGEXP         1617 string.c       	if (TYPE(argv[0]) == T_REGEXP) {
T_REGEXP         1751 string.c             case T_REGEXP:
T_REGEXP         1809 string.c       	if (TYPE(argv[0]) == T_REGEXP) {
T_REGEXP         1910 string.c             case T_REGEXP:
T_REGEXP         1919 string.c       	    Check_Type(pat, T_REGEXP);


T_SCOPE

T_SCOPE           241 error.c            {T_SCOPE,	"Scope"},	/* internal use: variable scope */
T_SCOPE          1026 eval.c             OBJSETUP(_scope, 0, T_SCOPE);	\
T_SCOPE           968 gc.c                 case T_SCOPE:
T_SCOPE          1239 gc.c                 case T_SCOPE:
T_SCOPE          1543 gc.c           		  case T_SCOPE:
T_SCOPE          1576 gc.c           		  case T_SCOPE:


T_STRING

T_STRING         1269 array.c        	  case T_STRING:
T_STRING         1590 array.c            if (TYPE(a) == T_STRING) {
T_STRING         1591 array.c        	if (TYPE(b) == T_STRING) return rb_str_cmp(a, b);
T_STRING          227 error.c            {T_STRING,	"String"},
T_STRING          507 error.c        	if (t == T_STRING) return rb_ary_new3(1, bt);
T_STRING          512 error.c        	    if (TYPE(RARRAY(bt)->ptr[i]) != T_STRING) {
T_STRING          264 eval.c             if (TYPE(x)!= T_STRING) {
T_STRING         1261 eval.c         	    if (TYPE(ep->ptr[i]) == T_STRING) {
T_STRING         1759 eval.c             if (TYPE(cmd) != T_STRING) {
T_STRING         2888 eval.c         	    if (TYPE(l) == T_STRING) {
T_STRING         4584 eval.c         	if (TYPE(argv[0]) == T_STRING) {
T_STRING         6357 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          419 ext/dl/dl.c        case T_STRING:
T_STRING          492 ext/dl/dl.c      case T_STRING:
T_STRING           37 ext/dl/dl.h    # define StringValue(v) if(TYPE(v) != T_STRING) v = rb_str_to_str(v)
T_STRING           40 ext/dl/dl.h    # define StringValuePtr(v) RSTRING((TYPE(v) == T_STRING) ? (v) : rb_str_to_str(v))->ptr
T_STRING          746 ext/dl/ptr.c     if (! (TYPE(key) == T_STRING || TYPE(key) == T_SYMBOL)) {
T_STRING          315 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          570 ext/stringio/stringio.c     if (argc == 1 && TYPE(*argv) != T_STRING) {
T_STRING         1002 ext/stringio/stringio.c     if (TYPE(str) != T_STRING)
T_STRING         1889 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          813 ext/win32ole/win32ole.c     case T_STRING:
T_STRING         1603 ext/win32ole/win32ole.c     else if(TYPE(ole) == T_STRING) {
T_STRING         1774 ext/win32ole/win32ole.c     if (TYPE(helpfile) != T_STRING) {
T_STRING         1922 ext/win32ole/win32ole.c     if(TYPE(key) != T_STRING) {
T_STRING         1932 ext/win32ole/win32ole.c         Check_Type(key, T_STRING);
T_STRING         3267 ext/win32ole/win32ole.c     if(TYPE(typelib) == T_STRING) {
T_STRING         5425 ext/win32ole/win32ole.c         else if (TYPE(ev) == T_STRING &&
T_STRING         5426 ext/win32ole/win32ole.c                  TYPE(event_name) == T_STRING &&
T_STRING         5469 ext/win32ole/win32ole.c     case T_STRING:
T_STRING         1835 ext/zlib/zlib.c 	Check_Type(str, T_STRING);
T_STRING         2770 ext/zlib/zlib.c     if (TYPE(str) != T_STRING) {
T_STRING         3096 ext/zlib/zlib.c 	    Check_Type(rs, T_STRING);
T_STRING         2925 file.c         	if (TYPE(RARRAY(ary)->ptr[i]) == T_STRING) {
T_STRING         2932 file.c             if (!NIL_P(sep) && TYPE(sep) == T_STRING) {
T_STRING         2939 file.c         	  case T_STRING:
T_STRING         3216 file.c         	  case T_STRING:
T_STRING          933 gc.c                 case T_STRING:
T_STRING         1167 gc.c                 case T_STRING:
T_STRING           66 hash.c             if (TYPE(a) == T_STRING && RBASIC(a)->klass == rb_cString &&
T_STRING           67 hash.c         	TYPE(b) == T_STRING && RBASIC(b)->klass == rb_cString) {
T_STRING           99 hash.c               case T_STRING:
T_STRING          914 hash.c             if (TYPE(key) != T_STRING || st_lookup(RHASH(hash)->tbl, key, 0)) {
T_STRING         2228 hash.c             if (TYPE(value) != T_STRING) return Qfalse;
T_STRING          549 io.c               if (TYPE(str) != T_STRING)
T_STRING         2341 io.c               if (TYPE(str) != T_STRING)
T_STRING         3625 io.c               if (TYPE(argv[0]) == T_STRING) {
T_STRING         4766 io.c               if (TYPE(arg) == T_STRING && RSTRING(arg)->ptr[len] != 17) {
T_STRING          517 marshal.c      	    if (TYPE(v) != T_STRING) {
T_STRING          583 marshal.c      	  case T_STRING:
T_STRING          798 marshal.c          if (TYPE(arg->src) == T_STRING) {
T_STRING          875 marshal.c          if (TYPE(arg->src) == T_STRING) {
T_STRING         1683 numeric.c          case T_STRING:
T_STRING          865 object.c             case T_STRING:
T_STRING         1666 object.c             case T_STRING:
T_STRING         2211 object.c             case T_STRING:
T_STRING         2357 object.c             case T_STRING:
T_STRING         2402 object.c             case T_STRING:
T_STRING         2434 object.c           return rb_convert_type(val, T_STRING, "String", "to_s");
T_STRING         1890 pack.c         			if (TYPE(*p) == T_STRING && RSTRING(*p)->ptr == t) {
T_STRING         1932 pack.c         			    if (TYPE(*p) == T_STRING && RSTRING(*p)->ptr == t) {
T_STRING          414 range.c            else if (TYPE(beg) == T_STRING) {
T_STRING         1546 re.c               if (TYPE(str) != T_STRING) {
T_STRING         1580 re.c               if (TYPE(line) != T_STRING) {
T_STRING          285 ruby.h         #define NUM2CHR(x) (((TYPE(x) == T_STRING)&&(RSTRING(x)->len>=1))?\
T_STRING          249 signal.c             case T_STRING:
T_STRING          529 signal.c           else if (TYPE(command) == T_STRING) {
T_STRING          570 signal.c             case T_STRING:
T_STRING          498 sprintf.c      		  case T_STRING:
T_STRING           68 string.c           OBJSETUP(str, klass, T_STRING);
T_STRING          255 string.c           return rb_convert_type(str, T_STRING, "String", "to_str");
T_STRING          297 string.c           if (TYPE(obj) == T_STRING) {
T_STRING          301 string.c           if (TYPE(str) != T_STRING)
T_STRING          546 string.c           if (TYPE(s) != T_STRING) {
T_STRING          581 string.c           str = rb_check_convert_type(str, T_STRING, "String", "to_str");
T_STRING          937 string.c           if (TYPE(str2) != T_STRING) {
T_STRING          963 string.c           if (TYPE(str2) != T_STRING || RSTRING(str1)->len != RSTRING(str2)->len)
T_STRING         1004 string.c           if (TYPE(str2) != T_STRING) {
T_STRING         1152 string.c             case T_STRING:
T_STRING         1247 string.c             case T_STRING:
T_STRING         1297 string.c             case T_STRING:
T_STRING         1534 string.c             case T_STRING:
T_STRING         1755 string.c             case T_STRING:
T_STRING         1913 string.c             case T_STRING:
T_STRING         2282 string.c           if (TYPE(line) != T_STRING) {
T_STRING         3499 string.c       	if (TYPE(spat) == T_STRING && RSTRING(spat)->len == 1) {
T_STRING         4610 string.c           if (!NIL_P(val) && TYPE(val) != T_STRING) {
T_STRING          611 struct.c           if (TYPE(idx) == T_STRING || TYPE(idx) == T_SYMBOL) {
T_STRING          677 struct.c           if (TYPE(idx) == T_STRING || TYPE(idx) == T_SYMBOL) {
T_STRING          288 time.c             if (TYPE(obj) == T_STRING) {
T_STRING          161 variable.c     	if (TYPE(path) != T_STRING) {
T_STRING         1362 variable.c         Check_Type(file, T_STRING);


T_STRUCT

T_STRUCT          232 error.c            {T_STRUCT,	"Struct"},
T_STRUCT          979 gc.c                 case T_STRUCT:
T_STRUCT         1250 gc.c                 case T_STRUCT:
T_STRUCT          630 marshal.c      	  case T_STRUCT:
T_STRUCT          363 struct.c           OBJSETUP(st, klass, T_STRUCT);
T_STRUCT          795 struct.c           if (TYPE(s2) != T_STRUCT) return Qfalse;
T_STRUCT          845 struct.c           if (TYPE(s2) != T_STRUCT) return Qfalse;


T_SYMBOL

T_SYMBOL          237 error.c            {T_SYMBOL,	"Symbol"},	/* :symbol */
T_SYMBOL           14 ext/dl/ptr.c   #ifndef T_SYMBOL
T_SYMBOL          746 ext/dl/ptr.c     if (! (TYPE(key) == T_STRING || TYPE(key) == T_SYMBOL)) {
T_SYMBOL          353 ext/openssl/ossl_pkcs7.c     if(TYPE(sym) == T_SYMBOL) s = rb_id2name(SYM2ID(sym));
T_SYMBOL          160 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           95 hash.c               case T_SYMBOL:
T_SYMBOL         1675 object.c             case T_SYMBOL:
T_SYMBOL          661 ruby.h             if (SYMBOL_P(obj)) return T_SYMBOL;
T_SYMBOL          244 signal.c             case T_SYMBOL:
T_SYMBOL          565 signal.c             case T_SYMBOL:
T_SYMBOL          611 struct.c           if (TYPE(idx) == T_STRING || TYPE(idx) == T_SYMBOL) {
T_SYMBOL          677 struct.c           if (TYPE(idx) == T_STRING || TYPE(idx) == T_SYMBOL) {


T_TRUE

T_TRUE            235 error.c            {T_TRUE,	"true"},
T_TRUE            739 error.c        	  case T_TRUE:
T_TRUE            366 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            829 ext/win32ole/win32ole.c     case T_TRUE:
T_TRUE           5518 ext/win32ole/win32ole.c     case T_TRUE:
T_TRUE           1143 gc.c                 case T_TRUE:
T_TRUE           1687 numeric.c          case T_TRUE:
T_TRUE            659 ruby.h             if (obj == Qtrue) return T_TRUE;


T_UNDEF

T_UNDEF           243 error.c            {T_UNDEF,	"undef"},	/* internal use: #undef; should not happen */
T_UNDEF           660 ruby.h             if (obj == Qundef) return T_UNDEF;


T_VARMAP

T_VARMAP          240 error.c            {T_VARMAP,	"Varmap"},	/* internal use: dynamic variables */
T_VARMAP          808 eval.c             OBJSETUP(vars, 0, T_VARMAP);
T_VARMAP          963 gc.c                 case T_VARMAP:
T_VARMAP         1217 gc.c                 case T_VARMAP:
T_VARMAP         1542 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);


UARG

UARG              773 missing/vsnprintf.c 				ulval = UARG();
UARG              829 missing/vsnprintf.c 				ulval = UARG();
UARG              843 missing/vsnprintf.c 				ulval = UARG();


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          327 file.c             return UINT2NUM((unsigned short)(get_stat(self)->st_mode));
UINT2NUM          329 file.c             return UINT2NUM(get_stat(self)->st_mode);
UINT2NUM          349 file.c             return UINT2NUM(get_stat(self)->st_nlink);
UINT2NUM          367 file.c             return UINT2NUM(get_stat(self)->st_uid);
UINT2NUM          384 file.c             return UINT2NUM(get_stat(self)->st_gid);
UINT2NUM         1547 pack.c         		rb_ary_push(ary, UINT2NUM(tmp));
UINT2NUM         1598 pack.c         		rb_ary_push(ary, UINT2NUM(ntohs(tmp)));
UINT2NUM         1620 pack.c         		rb_ary_push(ary, UINT2NUM(vtohs(tmp)));
UINT2NUM          141 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)


ULONG

ULONG              99 ext/win32ole/win32ole.c     STDMETHOD_(ULONG, AddRef)(PEVENTSINK);
ULONG             100 ext/win32ole/win32ole.c     STDMETHOD_(ULONG, Release)(PEVENTSINK);
ULONG             208 ext/win32ole/win32ole.c     ULONG refcount;
ULONG             239 ext/win32ole/win32ole.c     ULONG u = --(p->refcount);
ULONG            1433 ext/win32ole/win32ole.c     ULONG eaten = 0;
ULONG            1661 ext/win32ole/win32ole.c static ULONG
ULONG            1665 ext/win32ole/win32ole.c     ULONG n = 0;
ULONG            1705 ext/win32ole/win32ole.c     ULONG n = 0;
ULONG            5358 ext/win32ole/win32ole.c STDMETHODIMP_(ULONG)
ULONG            5366 ext/win32ole/win32ole.c STDMETHODIMP_(ULONG) EVENTSINK_Release(


ULONG2NUM

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        1213 ext/stringio/stringio.c     return ULONG2NUM(RSTRING(string)->len);
ULONG2NUM         113 ext/tk/tkutil/tkutil.c     id_num = ULONG2NUM(CALLBACK_ID_NUM++);
ULONG2NUM         258 file.c             return ULONG2NUM(major(dev));
ULONG2NUM         281 file.c             return ULONG2NUM(minor(dev));
ULONG2NUM         305 file.c             return ULONG2NUM(get_stat(self)->st_ino);
ULONG2NUM         405 file.c             return ULONG2NUM(get_stat(self)->st_rdev);
ULONG2NUM         428 file.c             return ULONG2NUM(major(rdev));
ULONG2NUM         451 file.c             return ULONG2NUM(minor(rdev));
ULONG2NUM         489 file.c             return ULONG2NUM(get_stat(self)->st_blksize);
ULONG2NUM         511 file.c             return ULONG2NUM(get_stat(self)->st_blocks);
ULONG2NUM        1569 pack.c         		rb_ary_push(ary, ULONG2NUM(tmp));
ULONG2NUM        1609 pack.c         		rb_ary_push(ary, ULONG2NUM(ntohl(tmp)));
ULONG2NUM        1631 pack.c         		rb_ary_push(ary, ULONG2NUM(vtohl(tmp)));
ULONG2NUM        1724 pack.c         		rb_ary_push(ary, ULONG2NUM(l));
ULONG2NUM        1960 pack.c         			rb_ary_push(ary, ULONG2NUM(ul));


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     149 dln.c          #ifdef USE_DLN_A_OUT
USE_DLN_A_OUT    1171 dln.c          #ifdef USE_DLN_A_OUT
USE_DLN_A_OUT    1322 dln.c          #ifdef USE_DLN_A_OUT
USE_DLN_A_OUT      35 dln.h          #ifdef USE_DLN_A_OUT
USE_DLN_A_OUT    1166 ruby.c         #if defined(USE_DLN_A_OUT)
USE_DLN_A_OUT    1188 ruby.c         #if defined(USE_DLN_A_OUT)
USE_DLN_A_OUT     680 ruby.h         #if defined(EXTLIB) && defined(USE_DLN_A_OUT)


USE_DLN_DLOPEN

USE_DLN_DLOPEN   1120 dln.c          #ifdef USE_DLN_DLOPEN
USE_DLN_DLOPEN   1192 dln.c          #ifdef USE_DLN_DLOPEN
USE_DLN_DLOPEN   1334 dln.c          #ifdef USE_DLN_DLOPEN


USE_INTERRUPT_WINSOCK

USE_INTERRUPT_WINSOCK   64 win32/win32.c  #if USE_INTERRUPT_WINSOCK
USE_INTERRUPT_WINSOCK 1889 win32/win32.c  #ifdef USE_INTERRUPT_WINSOCK
USE_INTERRUPT_WINSOCK 1917 win32/win32.c  #if USE_INTERRUPT_WINSOCK


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_SETVBUF

USE_SETVBUF      2675 io.c           #ifdef USE_SETVBUF
USE_SETVBUF      2719 io.c           #ifdef USE_SETVBUF
USE_SETVBUF      3513 io.c           #ifdef USE_SETVBUF


USHORT

USHORT           1967 ext/win32ole/win32ole.c     USHORT wFlags;
USHORT           2192 ext/win32ole/win32ole.c     USHORT dispkind;
USHORT           2496 ext/win32ole/win32ole.c     USHORT wFlags = DISPATCH_PROPERTYPUT;
USHORT           5163 ext/win32ole/win32ole.c     USHORT mask;
USHORT           5273 ext/win32ole/win32ole.c     USHORT wParamFlags;
USHORT           5274 ext/win32ole/win32ole.c     USHORT mask = PARAMFLAG_FOPT|PARAMFLAG_FHASDEFAULT;


USTR

USTR             2975 string.c       	    t->now = *(USTR)t->p++;
USTR             2979 string.c       		    if (t->now > *(USTR)t->p) {
USTR             2984 string.c       		    t->max = *(USTR)t->p++;


UTF16BE_INPUT

UTF16BE_INPUT     468 ext/nkf/nkf-utf8/nkf.c static int             utf16_mode = UTF16BE_INPUT;
UTF16BE_INPUT    1180 ext/nkf/nkf-utf8/nkf.c 		input_f = UTF16BE_INPUT;
UTF16BE_INPUT    1181 ext/nkf/nkf-utf8/nkf.c 		utf16_mode = UTF16BE_INPUT;
UTF16BE_INPUT    1189 ext/nkf/nkf-utf8/nkf.c 		    input_f = UTF16BE_INPUT;
UTF16BE_INPUT    1190 ext/nkf/nkf-utf8/nkf.c 		    utf16_mode = UTF16BE_INPUT;
UTF16BE_INPUT    1871 ext/nkf/nkf-utf8/nkf.c     } else if (input_f == UTF16BE_INPUT) {
UTF16BE_INPUT    2576 ext/nkf/nkf-utf8/nkf.c 	utf16_mode = UTF16BE_INPUT;
UTF16BE_INPUT    4635 ext/nkf/nkf-utf8/nkf.c     utf16_mode = UTF16BE_INPUT;


UTF16LE_INPUT

UTF16LE_INPUT    1185 ext/nkf/nkf-utf8/nkf.c 		    input_f = UTF16LE_INPUT;
UTF16LE_INPUT    1186 ext/nkf/nkf-utf8/nkf.c 		    utf16_mode = UTF16LE_INPUT;
UTF16LE_INPUT    1873 ext/nkf/nkf-utf8/nkf.c     } else if (input_f == UTF16LE_INPUT) {
UTF16LE_INPUT    2579 ext/nkf/nkf-utf8/nkf.c 	utf16_mode = UTF16LE_INPUT;
UTF16LE_INPUT    2582 ext/nkf/nkf-utf8/nkf.c     if (c2 != EOF && utf16_mode == UTF16LE_INPUT) {


UTF8

UTF8             2707 ext/nkf/nkf-utf8/nkf.c         output_mode = UTF8;
UTF8             3502 ext/nkf/nkf-utf8/nkf.c     UTF8, UTF8,


UTF8_INPUT

UTF8_INPUT       1194 ext/nkf/nkf-utf8/nkf.c 		input_f = UTF8_INPUT;
UTF8_INPUT       1196 ext/nkf/nkf-utf8/nkf.c                 input_f = UTF8_INPUT;
UTF8_INPUT       1869 ext/nkf/nkf-utf8/nkf.c     } else if (input_f == UTF8_INPUT) {


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  297 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_INPUT_ENABLE
UTF8_INPUT_ENABLE  465 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_INPUT_ENABLE
UTF8_INPUT_ENABLE  934 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_INPUT_ENABLE
UTF8_INPUT_ENABLE 1177 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_INPUT_ENABLE
UTF8_INPUT_ENABLE 1618 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_INPUT_ENABLE
UTF8_INPUT_ENABLE 1868 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_INPUT_ENABLE
UTF8_INPUT_ENABLE 1946 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_INPUT_ENABLE
UTF8_INPUT_ENABLE 2446 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_INPUT_ENABLE
UTF8_INPUT_ENABLE 3481 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
UTF8_INPUT_ENABLE 3493 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
UTF8_INPUT_ENABLE 3501 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
UTF8_INPUT_ENABLE 3510 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
UTF8_INPUT_ENABLE 4634 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_INPUT_ENABLE
UTF8_INPUT_ENABLE 4729 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_INPUT_ENABLE
UTF8_INPUT_ENABLE 1352 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  304 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_OUTPUT_ENABLE
UTF8_OUTPUT_ENABLE  392 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_OUTPUT_ENABLE
UTF8_OUTPUT_ENABLE  929 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_OUTPUT_ENABLE
UTF8_OUTPUT_ENABLE 1037 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_OUTPUT_ENABLE
UTF8_OUTPUT_ENABLE 1047 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_OUTPUT_ENABLE
UTF8_OUTPUT_ENABLE 1076 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_OUTPUT_ENABLE
UTF8_OUTPUT_ENABLE 1151 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_OUTPUT_ENABLE
UTF8_OUTPUT_ENABLE 1445 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_OUTPUT_ENABLE
UTF8_OUTPUT_ENABLE 2633 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_OUTPUT_ENABLE
UTF8_OUTPUT_ENABLE 3481 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
UTF8_OUTPUT_ENABLE 3493 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
UTF8_OUTPUT_ENABLE 3501 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
UTF8_OUTPUT_ENABLE 3510 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
UTF8_OUTPUT_ENABLE 4604 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_OUTPUT_ENABLE
UTF8_OUTPUT_ENABLE 4725 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_OUTPUT_ENABLE
UTF8_OUTPUT_ENABLE 4764 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_OUTPUT_ENABLE
UTF8_OUTPUT_ENABLE    3 ext/nkf/nkf-utf8/utf8tbl.c #ifdef UTF8_OUTPUT_ENABLE


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        311 win32/win32.c  	LK_ERR(UnlockFile(fh, 0, 0, LK_LEN, LK_LEN), i);
UnlockFile       3393 win32/win32.c  	UnlockFile((HANDLE)sock, 0, 0, LK_LEN, LK_LEN);
UnlockFile       3411 win32/win32.c  	UnlockFile((HANDLE)sock, 0, 0, LK_LEN, LK_LEN);
UnlockFile        134 wince/wince.h  BOOL UnlockFile( HFILE hFile,


UnlockFileEx

UnlockFileEx      283 win32/win32.c  	LK_ERR(UnlockFileEx(fh, 0, LK_LEN, LK_LEN, &o), i);
UnlockFileEx      137 wince/wince.h  BOOL UnlockFileEx(HANDLE hFile,


VALUE

VALUE              19 array.c        VALUE rb_cArray;
VALUE              26 array.c            register VALUE *mem;
VALUE              36 array.c            register VALUE *mem;
VALUE              38 array.c            register VALUE val;
VALUE              49 array.c            VALUE ary;
VALUE              60 array.c            VALUE ary;
VALUE              62 array.c            VALUE *ptr;
VALUE              66 array.c        	ptr = ALLOC_N(VALUE, RARRAY(ary)->len);
VALUE              69 array.c        	MEMCPY(ptr, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
VALUE              74 array.c        VALUE
VALUE              76 array.c            VALUE ary;
VALUE              89 array.c        static VALUE
VALUE              91 array.c            VALUE ary;
VALUE              98 array.c        static VALUE ary_alloc _((VALUE));
VALUE              99 array.c        static VALUE
VALUE             101 array.c            VALUE klass;
VALUE             110 array.c            return (VALUE)ary;
VALUE             113 array.c        static VALUE
VALUE             115 array.c            VALUE klass;
VALUE             118 array.c            VALUE ary = ary_alloc(klass);
VALUE             123 array.c            if (len > 0 && len * sizeof(VALUE) <= len) {
VALUE             127 array.c            RARRAY(ary)->ptr = ALLOC_N(VALUE, len);
VALUE             133 array.c        VALUE
VALUE             141 array.c        VALUE
VALUE             155 array.c        VALUE
VALUE             165 array.c            VALUE ary;
VALUE             172 array.c        	RARRAY(ary)->ptr[i] = va_arg(ar, VALUE);
VALUE             180 array.c        VALUE
VALUE             183 array.c            const VALUE *elts;
VALUE             185 array.c            VALUE ary;
VALUE             189 array.c        	MEMCPY(RARRAY(ary)->ptr, elts, VALUE, n);
VALUE             196 array.c        VALUE
VALUE             198 array.c            VALUE car, cdr;
VALUE             200 array.c            VALUE ary;
VALUE             210 array.c        static VALUE
VALUE             212 array.c            VALUE ary;
VALUE             217 array.c        VALUE
VALUE             219 array.c            VALUE ary;
VALUE             224 array.c        static VALUE rb_ary_replace _((VALUE, VALUE));
VALUE             264 array.c        static VALUE
VALUE             267 array.c            VALUE *argv;
VALUE             268 array.c            VALUE ary;
VALUE             271 array.c            VALUE size, val;
VALUE             293 array.c            if (len > 0 && len * (long)sizeof(VALUE) <= len) {
VALUE             298 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, len);
VALUE             329 array.c        static VALUE
VALUE             332 array.c            VALUE *argv;
VALUE             333 array.c            VALUE klass;
VALUE             335 array.c            VALUE ary = ary_alloc(klass);
VALUE             338 array.c        	RARRAY(ary)->ptr = ALLOC_N(VALUE, argc);
VALUE             339 array.c        	MEMCPY(RARRAY(ary)->ptr, argv, VALUE, argc);
VALUE             348 array.c            VALUE ary;
VALUE             350 array.c            VALUE val;
VALUE             368 array.c        	if (new_capa * (long)sizeof(VALUE) <= new_capa) {
VALUE             371 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, new_capa);
VALUE             398 array.c        VALUE
VALUE             400 array.c            VALUE ary;
VALUE             401 array.c            VALUE item;
VALUE             420 array.c        static VALUE
VALUE             423 array.c            VALUE *argv;
VALUE             424 array.c            VALUE ary;
VALUE             444 array.c        VALUE
VALUE             446 array.c            VALUE ary;
VALUE             454 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->aux.capa);
VALUE             459 array.c        static VALUE
VALUE             461 array.c            VALUE ary;
VALUE             470 array.c        	RARRAY(ary)->aux.shared = (VALUE)shared;
VALUE             473 array.c        	return (VALUE)shared;
VALUE             493 array.c        VALUE
VALUE             495 array.c            VALUE ary;
VALUE             497 array.c            VALUE top;
VALUE             509 array.c        VALUE
VALUE             511 array.c            VALUE ary, item;
VALUE             520 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->aux.capa);
VALUE             524 array.c            MEMMOVE(RARRAY(ary)->ptr + 1, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
VALUE             544 array.c        static VALUE
VALUE             547 array.c            VALUE *argv;
VALUE             548 array.c            VALUE ary;
VALUE             558 array.c            MEMMOVE(RARRAY(ary)->ptr + argc, RARRAY(ary)->ptr, VALUE, len);
VALUE             559 array.c            MEMCPY(RARRAY(ary)->ptr, argv, VALUE, argc);
VALUE             565 array.c        static inline VALUE
VALUE             567 array.c            VALUE ary;
VALUE             577 array.c        VALUE
VALUE             579 array.c            VALUE ary;
VALUE             588 array.c        static VALUE
VALUE             590 array.c            VALUE ary;
VALUE             593 array.c            VALUE klass, ary2, shared;
VALUE             594 array.c            VALUE *ptr;
VALUE             650 array.c        VALUE
VALUE             653 array.c            VALUE *argv;
VALUE             654 array.c            VALUE ary;
VALUE             656 array.c            VALUE arg;
VALUE             708 array.c        static VALUE
VALUE             710 array.c            VALUE ary, pos;
VALUE             730 array.c        static VALUE
VALUE             733 array.c            VALUE *argv;
VALUE             734 array.c            VALUE ary;
VALUE             741 array.c        	VALUE nv, result;
VALUE             766 array.c        static VALUE
VALUE             769 array.c            VALUE *argv;
VALUE             770 array.c            VALUE ary;
VALUE             777 array.c        	VALUE nv, result;
VALUE             811 array.c        static VALUE
VALUE             814 array.c            VALUE *argv;
VALUE             815 array.c            VALUE ary;
VALUE             817 array.c            VALUE pos, ifnone;
VALUE             854 array.c        static VALUE
VALUE             856 array.c            VALUE ary;
VALUE             857 array.c            VALUE val;
VALUE             881 array.c        static VALUE
VALUE             883 array.c            VALUE ary;
VALUE             884 array.c            VALUE val;
VALUE             907 array.c        static VALUE
VALUE             910 array.c            VALUE *argv;
VALUE             911 array.c            VALUE ary;
VALUE             913 array.c            VALUE new_ary;
VALUE             925 array.c        VALUE
VALUE             927 array.c            VALUE obj;
VALUE             940 array.c            VALUE ary;
VALUE             942 array.c            VALUE rpl;
VALUE             970 array.c        	    REALLOC_N(RARRAY(ary)->ptr, VALUE, len);
VALUE             975 array.c        	    MEMCPY(RARRAY(ary)->ptr + beg, RARRAY(rpl)->ptr, VALUE, rlen);
VALUE             988 array.c        	    REALLOC_N(RARRAY(ary)->ptr, VALUE, alen);
VALUE             994 array.c        		    VALUE, RARRAY(ary)->len - (beg + len));
VALUE             998 array.c        	    MEMMOVE(RARRAY(ary)->ptr + beg, RARRAY(rpl)->ptr, VALUE, rlen);
VALUE            1031 array.c        static VALUE
VALUE            1034 array.c            VALUE *argv;
VALUE            1035 array.c            VALUE ary;
VALUE            1083 array.c        static VALUE
VALUE            1086 array.c            VALUE *argv;
VALUE            1087 array.c            VALUE ary;
VALUE            1121 array.c        VALUE
VALUE            1123 array.c            VALUE ary;
VALUE            1148 array.c        static VALUE
VALUE            1150 array.c            VALUE ary;
VALUE            1175 array.c        static VALUE
VALUE            1177 array.c            VALUE ary;
VALUE            1199 array.c        static VALUE
VALUE            1201 array.c            VALUE ary;
VALUE            1215 array.c        static VALUE
VALUE            1217 array.c            VALUE ary;
VALUE            1224 array.c        VALUE
VALUE            1226 array.c            VALUE ary;
VALUE            1228 array.c            VALUE dup = rb_ary_new2(RARRAY(ary)->len);
VALUE            1231 array.c            MEMCPY(RARRAY(dup)->ptr, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
VALUE            1236 array.c        extern VALUE rb_output_fs;
VALUE            1238 array.c        static VALUE
VALUE            1240 array.c            VALUE ary;
VALUE            1241 array.c            VALUE *arg;
VALUE            1246 array.c        VALUE
VALUE            1248 array.c            VALUE ary, sep;
VALUE            1252 array.c            VALUE result, tmp;
VALUE            1276 array.c        		VALUE args[2];
VALUE            1280 array.c        		tmp = rb_protect_inspect(inspect_join, ary, (VALUE)args);
VALUE            1307 array.c        static VALUE
VALUE            1310 array.c            VALUE *argv;
VALUE            1311 array.c            VALUE ary;
VALUE            1313 array.c            VALUE sep;
VALUE            1331 array.c        VALUE
VALUE            1333 array.c            VALUE ary;
VALUE            1343 array.c            VALUE (*func)();
VALUE            1344 array.c            VALUE arg1, arg2;
VALUE            1347 array.c        static VALUE
VALUE            1354 array.c        static VALUE
VALUE            1358 array.c            VALUE inspect_tbl = rb_thread_local_aref(rb_thread_current(), inspect_key);
VALUE            1376 array.c        static VALUE
VALUE            1378 array.c            VALUE obj;
VALUE            1380 array.c            VALUE inspect_tbl;
VALUE            1389 array.c        VALUE
VALUE            1391 array.c            VALUE (*func)(ANYARGS);
VALUE            1392 array.c            VALUE obj, arg;
VALUE            1395 array.c            VALUE inspect_tbl;
VALUE            1396 array.c            VALUE id;
VALUE            1408 array.c            return rb_ensure(inspect_call, (VALUE)&iarg, inspect_ensure, obj);
VALUE            1411 array.c        VALUE
VALUE            1413 array.c            VALUE obj;
VALUE            1415 array.c            VALUE inspect_tbl;
VALUE            1422 array.c        static VALUE
VALUE            1424 array.c            VALUE ary;
VALUE            1428 array.c            VALUE s, str;
VALUE            1449 array.c        static VALUE
VALUE            1451 array.c            VALUE ary;
VALUE            1466 array.c        static VALUE
VALUE            1468 array.c            VALUE ary;
VALUE            1471 array.c        	VALUE dup = rb_ary_new2(RARRAY(ary)->len);
VALUE            1485 array.c        static VALUE
VALUE            1487 array.c            VALUE ary;
VALUE            1492 array.c        VALUE
VALUE            1494 array.c            VALUE ary;
VALUE            1496 array.c            VALUE *p1, *p2;
VALUE            1497 array.c            VALUE tmp;
VALUE            1524 array.c        static VALUE
VALUE            1526 array.c            VALUE ary;
VALUE            1541 array.c        static VALUE
VALUE            1543 array.c            VALUE ary;
VALUE            1549 array.c            VALUE ary;
VALUE            1550 array.c            VALUE *ptr;
VALUE            1565 array.c            VALUE *a, *b;
VALUE            1568 array.c            VALUE retval = rb_yield_values(2, *a, *b);
VALUE            1578 array.c            VALUE *ap, *bp;
VALUE            1581 array.c            VALUE retval;
VALUE            1582 array.c            VALUE a = *ap, b = *bp;
VALUE            1601 array.c        static VALUE
VALUE            1603 array.c            VALUE ary;
VALUE            1609 array.c            qsort(RARRAY(ary)->ptr, RARRAY(ary)->len, sizeof(VALUE),
VALUE            1614 array.c        static VALUE
VALUE            1616 array.c            VALUE ary;
VALUE            1638 array.c        VALUE
VALUE            1640 array.c            VALUE ary;
VALUE            1666 array.c        VALUE
VALUE            1668 array.c            VALUE ary;
VALUE            1689 array.c        static VALUE
VALUE            1691 array.c            VALUE ary;
VALUE            1694 array.c            VALUE collect;
VALUE            1721 array.c        static VALUE
VALUE            1723 array.c            VALUE ary;
VALUE            1734 array.c        VALUE
VALUE            1736 array.c            VALUE obj;
VALUE            1739 array.c            VALUE *argv;
VALUE            1740 array.c            VALUE (*func) _((VALUE,long));
VALUE            1742 array.c            VALUE result = rb_ary_new2(argc);
VALUE            1783 array.c        static VALUE
VALUE            1786 array.c            VALUE *argv;
VALUE            1787 array.c            VALUE ary;
VALUE            1804 array.c        static VALUE
VALUE            1806 array.c            VALUE ary;
VALUE            1808 array.c            VALUE result;
VALUE            1837 array.c        VALUE
VALUE            1839 array.c            VALUE ary;
VALUE            1840 array.c            VALUE item;
VALUE            1845 array.c        	VALUE e = RARRAY(ary)->ptr[i1];
VALUE            1865 array.c        	    REALLOC_N(RARRAY(ary)->ptr, VALUE, i2 * 2);
VALUE            1873 array.c        VALUE
VALUE            1875 array.c            VALUE ary;
VALUE            1879 array.c            VALUE del;
VALUE            1911 array.c        static VALUE
VALUE            1913 array.c            VALUE ary, pos;
VALUE            1943 array.c        static VALUE
VALUE            1946 array.c            VALUE *argv;
VALUE            1947 array.c            VALUE ary;
VALUE            1949 array.c            VALUE arg1, arg2;
VALUE            1981 array.c        static VALUE
VALUE            1983 array.c            VALUE ary;
VALUE            1989 array.c        	VALUE v = RARRAY(ary)->ptr[i1];
VALUE            2011 array.c        static VALUE
VALUE            2013 array.c            VALUE ary;
VALUE            2031 array.c        static VALUE
VALUE            2033 array.c            VALUE ary;
VALUE            2061 array.c        static VALUE
VALUE            2064 array.c            VALUE *argv;
VALUE            2065 array.c            VALUE ary;
VALUE            2069 array.c            VALUE result;
VALUE            2076 array.c        	    VALUE tmp = rb_ary_new2(argc+1);
VALUE            2089 array.c        	VALUE tmp = rb_ary_new2(argc+1);
VALUE            2111 array.c        static VALUE
VALUE            2113 array.c            VALUE ary;
VALUE            2116 array.c            VALUE tmp, result = 0;
VALUE            2152 array.c        static VALUE
VALUE            2154 array.c            VALUE copy, orig;
VALUE            2156 array.c            VALUE shared;
VALUE            2182 array.c        VALUE
VALUE            2184 array.c            VALUE ary;
VALUE            2189 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, ARY_DEFAULT_SIZE * 2);
VALUE            2219 array.c        static VALUE
VALUE            2222 array.c            VALUE *argv;
VALUE            2223 array.c            VALUE ary;
VALUE            2225 array.c            VALUE item, arg1, arg2;
VALUE            2227 array.c            VALUE *p, *pend;
VALUE            2261 array.c        	    REALLOC_N(RARRAY(ary)->ptr, VALUE, end);
VALUE            2269 array.c        	VALUE v;
VALUE            2298 array.c        VALUE
VALUE            2300 array.c            VALUE x, y;
VALUE            2302 array.c            VALUE z;
VALUE            2308 array.c            MEMCPY(RARRAY(z)->ptr, RARRAY(x)->ptr, VALUE, RARRAY(x)->len);
VALUE            2309 array.c            MEMCPY(RARRAY(z)->ptr + RARRAY(x)->len, RARRAY(y)->ptr, VALUE, RARRAY(y)->len);
VALUE            2324 array.c        VALUE
VALUE            2326 array.c            VALUE x, y;
VALUE            2351 array.c        static VALUE
VALUE            2353 array.c            VALUE ary, times;
VALUE            2355 array.c            VALUE ary2, tmp;
VALUE            2377 array.c        	MEMCPY(RARRAY(ary2)->ptr+i, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
VALUE            2404 array.c        VALUE
VALUE            2406 array.c            VALUE ary, key;
VALUE            2409 array.c            VALUE v;
VALUE            2435 array.c        VALUE
VALUE            2437 array.c            VALUE ary, value;
VALUE            2440 array.c            VALUE v;
VALUE            2466 array.c        static VALUE
VALUE            2468 array.c            VALUE ary1, ary2;
VALUE            2495 array.c        static VALUE
VALUE            2497 array.c            VALUE ary1, ary2;
VALUE            2519 array.c        static VALUE
VALUE            2521 array.c            VALUE ary;
VALUE            2524 array.c            VALUE n;
VALUE            2548 array.c        VALUE
VALUE            2550 array.c            VALUE ary;
VALUE            2551 array.c            VALUE item;
VALUE            2584 array.c        VALUE
VALUE            2586 array.c            VALUE ary1, ary2;
VALUE            2596 array.c        	VALUE v = rb_funcall(rb_ary_elt(ary1, i), id_cmp, 1, rb_ary_elt(ary2, i));
VALUE            2607 array.c        static VALUE
VALUE            2609 array.c            VALUE ary1, ary2;
VALUE            2611 array.c            VALUE hash = rb_hash_new();
VALUE            2637 array.c        static VALUE
VALUE            2639 array.c            VALUE ary1, ary2;
VALUE            2641 array.c            VALUE ary3;
VALUE            2642 array.c            volatile VALUE hash;
VALUE            2666 array.c        static VALUE
VALUE            2668 array.c            VALUE ary1, ary2;
VALUE            2670 array.c            VALUE hash, ary3, v, vv;
VALUE            2699 array.c        static VALUE
VALUE            2701 array.c            VALUE ary1, ary2;
VALUE            2703 array.c            VALUE hash, ary3;
VALUE            2704 array.c            VALUE v, vv;
VALUE            2740 array.c        static VALUE
VALUE            2742 array.c            VALUE ary;
VALUE            2744 array.c            VALUE hash, v, vv;
VALUE            2773 array.c        static VALUE
VALUE            2775 array.c            VALUE ary;
VALUE            2793 array.c        static VALUE
VALUE            2795 array.c            VALUE ary;
VALUE            2797 array.c            VALUE *p, *t, *end;
VALUE            2811 array.c            REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
VALUE            2826 array.c        static VALUE
VALUE            2828 array.c            VALUE ary;
VALUE            2845 array.c        static VALUE
VALUE            2847 array.c            VALUE ary;
VALUE            2850 array.c            VALUE *p, *pend;
VALUE            2864 array.c            VALUE ary;
VALUE            2866 array.c            VALUE ary2, memo;
VALUE            2868 array.c            VALUE id;
VALUE            2879 array.c        	VALUE tmp;
VALUE            2907 array.c        static VALUE
VALUE            2909 array.c            VALUE ary;
VALUE            2913 array.c            VALUE memo = Qnil;
VALUE            2916 array.c        	VALUE ary2 = RARRAY(ary)->ptr[i];
VALUE            2917 array.c        	VALUE tmp;
VALUE            2947 array.c        static VALUE
VALUE            2949 array.c            VALUE ary;
VALUE              21 bignum.c       VALUE rb_cBignum;
VALUE              41 bignum.c       static VALUE
VALUE              43 bignum.c           VALUE klass;
VALUE              53 bignum.c           return (VALUE)big;
VALUE              58 bignum.c       VALUE
VALUE              60 bignum.c           VALUE x;
VALUE              62 bignum.c           VALUE z = bignew_1(CLASS_OF(x), RBIGNUM(x)->len, RBIGNUM(x)->sign);
VALUE              71 bignum.c           VALUE x;
VALUE              93 bignum.c           VALUE x;
VALUE              98 bignum.c       static VALUE
VALUE             100 bignum.c           VALUE x;
VALUE             109 bignum.c       	if (len*SIZEOF_BDIGITS <= sizeof(VALUE)) {
VALUE             125 bignum.c       VALUE
VALUE             127 bignum.c           VALUE x;
VALUE             132 bignum.c       VALUE
VALUE             139 bignum.c           VALUE big;
VALUE             154 bignum.c       VALUE
VALUE             159 bignum.c           VALUE big;
VALUE             172 bignum.c       VALUE
VALUE             180 bignum.c       VALUE
VALUE             193 bignum.c           VALUE val;
VALUE             218 bignum.c       VALUE
VALUE             227 bignum.c           VALUE big;
VALUE             266 bignum.c           VALUE val;
VALUE             291 bignum.c       VALUE
VALUE             296 bignum.c           VALUE big = bignew(QUAD_SIZE/SIZEOF_BDIGITS, 1);
VALUE             315 bignum.c       VALUE
VALUE             328 bignum.c           VALUE z;
VALUE             427 bignum.c           if (len <= (sizeof(VALUE)*CHAR_BIT)) {
VALUE             445 bignum.c       	    VALUE big = rb_uint2big(val);
VALUE             510 bignum.c       VALUE
VALUE             512 bignum.c           VALUE str;
VALUE             541 bignum.c       VALUE
VALUE             548 bignum.c           VALUE big;
VALUE             563 bignum.c       VALUE
VALUE             568 bignum.c           VALUE big;
VALUE             581 bignum.c       VALUE
VALUE             589 bignum.c       VALUE
VALUE             599 bignum.c       VALUE
VALUE             607 bignum.c       VALUE
VALUE             609 bignum.c           VALUE str;
VALUE             616 bignum.c       VALUE
VALUE             618 bignum.c           VALUE x;
VALUE             621 bignum.c           volatile VALUE t;
VALUE             624 bignum.c           VALUE ss;
VALUE             714 bignum.c       static VALUE
VALUE             717 bignum.c           VALUE *argv;
VALUE             718 bignum.c           VALUE x;
VALUE             720 bignum.c           VALUE b;
VALUE             731 bignum.c           VALUE x;
VALUE             751 bignum.c           VALUE x;
VALUE             762 bignum.c           VALUE x;
VALUE             777 bignum.c           VALUE x;
VALUE             792 bignum.c           VALUE x;
VALUE             812 bignum.c           VALUE x;
VALUE             822 bignum.c           VALUE x;
VALUE             836 bignum.c       static VALUE
VALUE             843 bignum.c           VALUE z;
VALUE             869 bignum.c       VALUE
VALUE             878 bignum.c           VALUE x;
VALUE             904 bignum.c       static VALUE
VALUE             906 bignum.c           VALUE x;
VALUE             921 bignum.c       static VALUE
VALUE             923 bignum.c           VALUE x, y;
VALUE             967 bignum.c       static VALUE
VALUE             969 bignum.c           VALUE x, y;
VALUE            1006 bignum.c       static VALUE
VALUE            1008 bignum.c           VALUE x, y;
VALUE            1024 bignum.c       static VALUE
VALUE            1026 bignum.c           VALUE x;
VALUE            1028 bignum.c           VALUE z = rb_big_clone(x);
VALUE            1047 bignum.c       static VALUE
VALUE            1049 bignum.c           VALUE x;
VALUE            1051 bignum.c           VALUE z = rb_big_clone(x);
VALUE            1065 bignum.c       static VALUE
VALUE            1067 bignum.c           VALUE x, y;
VALUE            1069 bignum.c           VALUE z = 0;
VALUE            1112 bignum.c       static VALUE
VALUE            1114 bignum.c           VALUE x, y;
VALUE            1117 bignum.c           VALUE z;
VALUE            1164 bignum.c       VALUE
VALUE            1166 bignum.c           VALUE x, y;
VALUE            1190 bignum.c       VALUE
VALUE            1192 bignum.c           VALUE x, y;
VALUE            1216 bignum.c       VALUE
VALUE            1218 bignum.c           VALUE x, y;
VALUE            1222 bignum.c           VALUE z;
VALUE            1265 bignum.c           VALUE x, y;
VALUE            1266 bignum.c           VALUE *divp, *modp;
VALUE            1270 bignum.c           VALUE yy, z;
VALUE            1395 bignum.c           VALUE x, y;
VALUE            1396 bignum.c           VALUE *divp, *modp;
VALUE            1398 bignum.c           VALUE mod;
VALUE            1419 bignum.c       static VALUE
VALUE            1421 bignum.c           VALUE x, y;
VALUE            1423 bignum.c           VALUE z;
VALUE            1453 bignum.c       static VALUE
VALUE            1455 bignum.c           VALUE x, y;
VALUE            1457 bignum.c           VALUE z;
VALUE            1484 bignum.c       static VALUE
VALUE            1486 bignum.c           VALUE x, y;
VALUE            1488 bignum.c           VALUE z;
VALUE            1513 bignum.c       VALUE
VALUE            1515 bignum.c           VALUE x, y;
VALUE            1517 bignum.c           VALUE div, mod;
VALUE            1547 bignum.c       static VALUE
VALUE            1549 bignum.c           VALUE x, y;
VALUE            1586 bignum.c       VALUE
VALUE            1588 bignum.c           VALUE x, y;
VALUE            1607 bignum.c       	    VALUE z = x;
VALUE            1636 bignum.c       VALUE
VALUE            1638 bignum.c           VALUE xx, yy;
VALUE            1640 bignum.c           volatile VALUE x, y, z;
VALUE            1692 bignum.c       VALUE
VALUE            1694 bignum.c           VALUE xx, yy;
VALUE            1696 bignum.c           volatile VALUE x, y, z;
VALUE            1749 bignum.c       VALUE
VALUE            1751 bignum.c           VALUE xx, yy;
VALUE            1753 bignum.c           volatile VALUE x, y;
VALUE            1754 bignum.c           VALUE z;
VALUE            1802 bignum.c       static VALUE rb_big_rshift _((VALUE,VALUE));
VALUE            1811 bignum.c       VALUE
VALUE            1813 bignum.c           VALUE x, y;
VALUE            1819 bignum.c           VALUE z;
VALUE            1847 bignum.c       static VALUE
VALUE            1849 bignum.c           VALUE x, y;
VALUE            1855 bignum.c           VALUE z;
VALUE            1858 bignum.c           volatile VALUE save_x;
VALUE            1909 bignum.c       static VALUE
VALUE            1911 bignum.c           VALUE x, y;
VALUE            1948 bignum.c       static VALUE
VALUE            1950 bignum.c           VALUE x;
VALUE            1966 bignum.c       static VALUE
VALUE            1968 bignum.c           VALUE x, y;
VALUE            1993 bignum.c       static VALUE
VALUE            1995 bignum.c           VALUE x;
VALUE            2004 bignum.c       VALUE
VALUE            2006 bignum.c           VALUE max;
VALUE            2009 bignum.c           VALUE v;
VALUE            2037 bignum.c       static VALUE
VALUE            2039 bignum.c           VALUE big;
VALUE              21 class.c        VALUE
VALUE              23 class.c            VALUE super;
VALUE              34 class.c            return (VALUE)klass;
VALUE              37 class.c        VALUE
VALUE              39 class.c            VALUE super;
VALUE              62 class.c        VALUE
VALUE              64 class.c            VALUE clone, orig;
VALUE              90 class.c        VALUE
VALUE              92 class.c            VALUE clone, orig;
VALUE             103 class.c        VALUE
VALUE             105 class.c            VALUE obj;
VALUE             107 class.c            VALUE klass = RBASIC(obj)->klass;
VALUE             117 class.c        	    RBASIC(clone)->klass = (VALUE)clone;
VALUE             132 class.c        	rb_singleton_class_attached(RBASIC(clone)->klass, (VALUE)clone);
VALUE             134 class.c        	return (VALUE)clone;
VALUE             140 class.c            VALUE klass, obj;
VALUE             150 class.c        VALUE
VALUE             152 class.c            VALUE obj, super;
VALUE             154 class.c            VALUE klass = rb_class_boot(super);
VALUE             163 class.c        	VALUE metasuper = RBASIC(rb_class_real(super))->klass;
VALUE             174 class.c        VALUE
VALUE             177 class.c            VALUE super;
VALUE             179 class.c            VALUE klass;
VALUE             190 class.c            VALUE super;
VALUE             201 class.c        VALUE
VALUE             203 class.c            VALUE super, klass;
VALUE             209 class.c        VALUE
VALUE             212 class.c            VALUE super;
VALUE             214 class.c            VALUE klass;
VALUE             240 class.c        VALUE
VALUE             242 class.c            VALUE outer;
VALUE             244 class.c            VALUE super;
VALUE             246 class.c            VALUE klass;
VALUE             272 class.c        VALUE
VALUE             283 class.c            return (VALUE)mdl;
VALUE             286 class.c        VALUE
VALUE             290 class.c            VALUE mdl;
VALUE             298 class.c        VALUE
VALUE             302 class.c            VALUE module;
VALUE             319 class.c        VALUE
VALUE             321 class.c            VALUE outer;
VALUE             324 class.c            VALUE module;
VALUE             342 class.c        static VALUE
VALUE             344 class.c            VALUE module, super;
VALUE             367 class.c            return (VALUE)klass;
VALUE             372 class.c            VALUE klass, module;
VALUE             374 class.c            VALUE p, c;
VALUE             437 class.c        VALUE
VALUE             439 class.c            VALUE mod;
VALUE             441 class.c            VALUE ary = rb_ary_new();
VALUE             442 class.c            VALUE p;
VALUE             471 class.c        VALUE
VALUE             473 class.c            VALUE mod;
VALUE             474 class.c            VALUE mod2;
VALUE             476 class.c            VALUE p;
VALUE             503 class.c        VALUE
VALUE             505 class.c            VALUE mod;
VALUE             507 class.c            VALUE p, ary = rb_ary_new();
VALUE             529 class.c            VALUE ary;
VALUE             553 class.c            VALUE ary;
VALUE             562 class.c            VALUE ary;
VALUE             571 class.c            VALUE ary;
VALUE             580 class.c            VALUE ary;
VALUE             602 class.c        static VALUE
VALUE             605 class.c            VALUE *argv;
VALUE             606 class.c            VALUE mod;
VALUE             607 class.c            int (*func) _((ID, long, VALUE));
VALUE             609 class.c            VALUE ary;
VALUE             617 class.c        	VALUE r;
VALUE             663 class.c        VALUE
VALUE             666 class.c            VALUE *argv;
VALUE             667 class.c            VALUE mod;
VALUE             681 class.c        VALUE
VALUE             684 class.c            VALUE *argv;
VALUE             685 class.c            VALUE mod;
VALUE             707 class.c        VALUE
VALUE             710 class.c            VALUE *argv;
VALUE             711 class.c            VALUE mod;
VALUE             725 class.c        VALUE
VALUE             728 class.c            VALUE *argv;
VALUE             729 class.c            VALUE mod;
VALUE             766 class.c        VALUE
VALUE             769 class.c            VALUE *argv;
VALUE             770 class.c            VALUE obj;
VALUE             772 class.c            VALUE recur, ary, klass;
VALUE             800 class.c            VALUE klass;
VALUE             802 class.c            VALUE (*func)();
VALUE             810 class.c            VALUE klass;
VALUE             812 class.c            VALUE (*func)();
VALUE             824 class.c            VALUE klass;
VALUE             826 class.c            VALUE (*func)();
VALUE             834 class.c            VALUE klass;
VALUE             836 class.c            VALUE (*func)();
VALUE             844 class.c            VALUE klass;
VALUE             856 class.c        VALUE
VALUE             858 class.c            VALUE obj;
VALUE             860 class.c            VALUE klass;
VALUE             894 class.c            VALUE obj;
VALUE             896 class.c            VALUE (*func)();
VALUE             904 class.c            VALUE module;
VALUE             906 class.c            VALUE (*func)();
VALUE             916 class.c            VALUE (*func)();
VALUE             924 class.c            VALUE klass;
VALUE             932 class.c            VALUE klass;
VALUE             949 class.c        rb_scan_args(int argc, const VALUE *argv, const char *fmt, ...)
VALUE             953 class.c            const VALUE *argv;
VALUE             960 class.c            VALUE *var;
VALUE             972 class.c        	    var = va_arg(vargs, VALUE*);
VALUE             984 class.c        	    var = va_arg(vargs, VALUE*);
VALUE             997 class.c        	var = va_arg(vargs, VALUE*);
VALUE            1009 class.c        	var = va_arg(vargs, VALUE*);
VALUE              15 compar.c       VALUE rb_mComparable;
VALUE              21 compar.c           VALUE val, a, b;
VALUE              38 compar.c           VALUE x, y;
VALUE              55 compar.c       static VALUE
VALUE              57 compar.c           VALUE *a;
VALUE              59 compar.c           VALUE c = rb_funcall(a[0], cmp, 1, a[1]);
VALUE              66 compar.c       static VALUE
VALUE              81 compar.c       static VALUE
VALUE              83 compar.c           VALUE x, y;
VALUE              85 compar.c           VALUE a[2];
VALUE              90 compar.c           return rb_rescue(cmp_eq, (VALUE)a, cmp_failed, 0);
VALUE             101 compar.c       static VALUE
VALUE             103 compar.c           VALUE x, y;
VALUE             105 compar.c           VALUE c = rb_funcall(x, cmp, 1, y);
VALUE             120 compar.c       static VALUE
VALUE             122 compar.c           VALUE x, y;
VALUE             124 compar.c           VALUE c = rb_funcall(x, cmp, 1, y);
VALUE             139 compar.c       static VALUE
VALUE             141 compar.c           VALUE x, y;
VALUE             143 compar.c           VALUE c = rb_funcall(x, cmp, 1, y);
VALUE             159 compar.c       static VALUE
VALUE             161 compar.c           VALUE x, y;
VALUE             163 compar.c           VALUE c = rb_funcall(x, cmp, 1, y);
VALUE             185 compar.c       static VALUE
VALUE             187 compar.c           VALUE x, min, max;
VALUE             228 dir.c          VALUE rb_cDir;
VALUE             246 dir.c          static VALUE dir_close _((VALUE));
VALUE             248 dir.c          static VALUE dir_s_alloc _((VALUE));
VALUE             249 dir.c          static VALUE
VALUE             251 dir.c              VALUE klass;
VALUE             254 dir.c              VALUE obj = Data_Make_Struct(klass, struct dir_data, 0, free_dir, dirp);
VALUE             268 dir.c          static VALUE
VALUE             270 dir.c              VALUE dir, dirname;
VALUE             307 dir.c          static VALUE
VALUE             309 dir.c              VALUE klass, dirname;
VALUE             312 dir.c              VALUE dir = Data_Make_Struct(klass, struct dir_data, 0, free_dir, dp);
VALUE             342 dir.c          static VALUE
VALUE             344 dir.c              VALUE dir;
VALUE             365 dir.c          static VALUE
VALUE             367 dir.c              VALUE dir;
VALUE             404 dir.c          static VALUE
VALUE             406 dir.c              VALUE dir;
VALUE             433 dir.c          static VALUE
VALUE             435 dir.c              VALUE dir;
VALUE             463 dir.c          static VALUE
VALUE             465 dir.c              VALUE dir, pos;
VALUE             493 dir.c          static VALUE
VALUE             495 dir.c              VALUE dir, pos;
VALUE             512 dir.c          static VALUE
VALUE             514 dir.c              VALUE dir;
VALUE             533 dir.c          static VALUE
VALUE             535 dir.c              VALUE dir;
VALUE             548 dir.c              VALUE path;
VALUE             555 dir.c          static VALUE chdir_thread = Qnil;
VALUE             558 dir.c              VALUE old_path, new_path;
VALUE             562 dir.c          static VALUE
VALUE             574 dir.c          static VALUE
VALUE             626 dir.c          static VALUE
VALUE             629 dir.c              VALUE *argv;
VALUE             630 dir.c              VALUE obj;
VALUE             632 dir.c              VALUE path = Qnil;
VALUE             659 dir.c          	return rb_ensure(chdir_yield, (VALUE)&args, chdir_restore, (VALUE)&args);
VALUE             677 dir.c          static VALUE
VALUE             679 dir.c              VALUE dir;
VALUE             682 dir.c              VALUE cwd;
VALUE             692 dir.c          static void check_dirname _((volatile VALUE *));
VALUE             695 dir.c              volatile VALUE *dir;
VALUE             716 dir.c          static VALUE
VALUE             718 dir.c              VALUE dir, path;
VALUE             746 dir.c          static VALUE
VALUE             749 dir.c              VALUE *argv;
VALUE             750 dir.c              VALUE obj;
VALUE             752 dir.c              VALUE path, vmode;
VALUE             778 dir.c          static VALUE
VALUE             780 dir.c              VALUE obj, dir;
VALUE             791 dir.c              ((flags & GLOB_VERBOSE) && rb_protect((VALUE (*)_((VALUE)))rb_sys_warning, (VALUE)(val), 0))
VALUE             885 dir.c              void (*func) _((const char*, VALUE));
VALUE             887 dir.c              VALUE v;
VALUE             890 dir.c          static VALUE glob_func_caller _((VALUE));
VALUE             892 dir.c          static VALUE
VALUE             894 dir.c              VALUE val;
VALUE             904 dir.c          static int glob_helper _((const char *path, const char *sub, int flags, int (*func)(const char *,VALUE), VALUE arg));
VALUE             911 dir.c              int (*func) _((const char *, VALUE));
VALUE             912 dir.c              VALUE arg;
VALUE            1087 dir.c              int (*func) _((const char *, VALUE));
VALUE            1088 dir.c              VALUE arg;
VALUE            1097 dir.c              int (*func) _((const char *, VALUE));
VALUE            1098 dir.c              VALUE arg;
VALUE            1103 dir.c          static int rb_glob_caller _((const char *, VALUE));
VALUE            1108 dir.c              VALUE a;
VALUE            1122 dir.c              void (*func) _((const char *, VALUE));
VALUE            1123 dir.c              VALUE arg;
VALUE            1130 dir.c              return glob_helper(path, 0, flags | GLOB_VERBOSE, rb_glob_caller, (VALUE)&args);
VALUE            1136 dir.c              void (*func) _((const char*, VALUE));
VALUE            1137 dir.c              VALUE arg;
VALUE            1146 dir.c              void (*func) _((const char*, VALUE));
VALUE            1147 dir.c              VALUE arg;
VALUE            1156 dir.c              VALUE ary;
VALUE            1163 dir.c              VALUE ary;
VALUE            1172 dir.c              VALUE ary;
VALUE            1234 dir.c          static VALUE
VALUE            1236 dir.c              VALUE str;
VALUE            1243 dir.c              VALUE ary;
VALUE            1288 dir.c          static VALUE
VALUE            1290 dir.c              VALUE obj, str;
VALUE            1353 dir.c          static VALUE
VALUE            1356 dir.c              VALUE *argv;
VALUE            1357 dir.c              VALUE obj;
VALUE            1359 dir.c              VALUE str, rflags;
VALUE            1370 dir.c          static VALUE
VALUE            1372 dir.c              VALUE path;
VALUE            1374 dir.c              VALUE dir = rb_funcall(rb_cDir, rb_intern("open"), 1, path);
VALUE            1402 dir.c          static VALUE
VALUE            1404 dir.c              VALUE io, dirname;
VALUE            1406 dir.c              VALUE dir;
VALUE            1424 dir.c          static VALUE
VALUE            1426 dir.c              VALUE io, dirname;
VALUE            1428 dir.c              VALUE dir;
VALUE            1492 dir.c          static VALUE
VALUE            1495 dir.c              VALUE *argv;
VALUE            1496 dir.c              VALUE obj;
VALUE            1498 dir.c              VALUE pattern, path;
VALUE            1499 dir.c              VALUE rflags;
VALUE              17 enum.c         VALUE rb_mEnumerable;
VALUE              20 enum.c         VALUE
VALUE              22 enum.c             VALUE obj;
VALUE              27 enum.c         static VALUE
VALUE              29 enum.c             VALUE i, *arg;
VALUE              37 enum.c         static VALUE
VALUE              39 enum.c             VALUE i, *arg;
VALUE              65 enum.c         static VALUE
VALUE              67 enum.c             VALUE obj, pat;
VALUE              69 enum.c             VALUE ary = rb_ary_new();
VALUE              70 enum.c             VALUE arg[2];
VALUE              75 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? grep_iter_i : grep_i, (VALUE)arg);
VALUE              80 enum.c         static VALUE
VALUE              82 enum.c             VALUE i;
VALUE              83 enum.c             VALUE *memo;
VALUE             107 enum.c         static VALUE
VALUE             110 enum.c             VALUE* argv;
VALUE             111 enum.c             VALUE obj;
VALUE             113 enum.c             VALUE memo = Qundef;
VALUE             114 enum.c             VALUE if_none;
VALUE             117 enum.c             rb_iterate(rb_each, obj, find_i, (VALUE)&memo);
VALUE             127 enum.c         static VALUE
VALUE             129 enum.c             VALUE i, ary;
VALUE             150 enum.c         static VALUE
VALUE             152 enum.c             VALUE obj;
VALUE             154 enum.c             VALUE ary = rb_ary_new();
VALUE             161 enum.c         static VALUE
VALUE             163 enum.c             VALUE i, ary;
VALUE             182 enum.c         static VALUE
VALUE             184 enum.c             VALUE obj;
VALUE             186 enum.c             VALUE ary = rb_ary_new();
VALUE             193 enum.c         static VALUE
VALUE             195 enum.c             VALUE i, ary;
VALUE             202 enum.c         static VALUE
VALUE             204 enum.c             VALUE i, ary;
VALUE             224 enum.c         static VALUE
VALUE             226 enum.c             VALUE obj;
VALUE             228 enum.c             VALUE ary = rb_ary_new();
VALUE             245 enum.c         static VALUE
VALUE             247 enum.c             VALUE obj;
VALUE             249 enum.c             VALUE ary = rb_ary_new();
VALUE             256 enum.c         static VALUE
VALUE             258 enum.c             VALUE i;
VALUE             259 enum.c             VALUE *memo;
VALUE             301 enum.c         static VALUE
VALUE             304 enum.c             VALUE *argv, obj;
VALUE             306 enum.c             VALUE memo = Qundef;
VALUE             310 enum.c             rb_iterate(rb_each, obj, inject_i, (VALUE)&memo);
VALUE             315 enum.c         static VALUE
VALUE             317 enum.c             VALUE i, *ary;
VALUE             340 enum.c         static VALUE
VALUE             342 enum.c             VALUE obj;
VALUE             344 enum.c             VALUE ary[2];
VALUE             348 enum.c             rb_iterate(rb_each, obj, partition_i, (VALUE)ary);
VALUE             370 enum.c         static VALUE
VALUE             372 enum.c             VALUE obj;
VALUE             377 enum.c         static VALUE
VALUE             379 enum.c             VALUE i, ary;
VALUE             381 enum.c             VALUE v;
VALUE             389 enum.c             rb_ary_push(ary, (VALUE)memo);
VALUE             397 enum.c             VALUE a = aa[0]->u1.value;
VALUE             398 enum.c             VALUE b = bb[0]->u1.value;
VALUE             472 enum.c         static VALUE
VALUE             474 enum.c             VALUE obj;
VALUE             476 enum.c             VALUE ary;
VALUE             488 enum.c         	qsort(RARRAY(ary)->ptr, RARRAY(ary)->len, sizeof(VALUE), sort_by_cmp, 0);
VALUE             500 enum.c         static VALUE
VALUE             502 enum.c             VALUE i;
VALUE             503 enum.c             VALUE *memo;
VALUE             512 enum.c         static VALUE
VALUE             514 enum.c             VALUE i;
VALUE             515 enum.c             VALUE *memo;
VALUE             541 enum.c         static VALUE
VALUE             543 enum.c             VALUE obj;
VALUE             545 enum.c             VALUE result = Qtrue;
VALUE             547 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? all_iter_i : all_i, (VALUE)&result);
VALUE             551 enum.c         static VALUE
VALUE             553 enum.c             VALUE i;
VALUE             554 enum.c             VALUE *memo;
VALUE             563 enum.c         static VALUE
VALUE             565 enum.c             VALUE i;
VALUE             566 enum.c             VALUE *memo;
VALUE             593 enum.c         static VALUE
VALUE             595 enum.c             VALUE obj;
VALUE             597 enum.c             VALUE result = Qfalse;
VALUE             599 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? any_iter_i : any_i, (VALUE)&result);
VALUE             603 enum.c         static VALUE
VALUE             605 enum.c             VALUE i;
VALUE             606 enum.c             VALUE *memo;
VALUE             608 enum.c             VALUE cmp;
VALUE             622 enum.c         static VALUE
VALUE             624 enum.c             VALUE i;
VALUE             625 enum.c             VALUE *memo;
VALUE             627 enum.c             VALUE cmp;
VALUE             656 enum.c         static VALUE
VALUE             658 enum.c             VALUE obj;
VALUE             660 enum.c             VALUE result = Qundef;
VALUE             662 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? min_ii : min_i, (VALUE)&result);
VALUE             681 enum.c         static VALUE
VALUE             683 enum.c             VALUE i;
VALUE             684 enum.c             VALUE *memo;
VALUE             686 enum.c             VALUE cmp;
VALUE             700 enum.c         static VALUE
VALUE             702 enum.c             VALUE i;
VALUE             703 enum.c             VALUE *memo;
VALUE             705 enum.c             VALUE cmp;
VALUE             733 enum.c         static VALUE
VALUE             735 enum.c             VALUE obj;
VALUE             737 enum.c             VALUE result = Qundef;
VALUE             739 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? max_ii : max_i, (VALUE)&result);
VALUE             744 enum.c         static VALUE
VALUE             746 enum.c             VALUE item;
VALUE             747 enum.c             VALUE *memo;
VALUE             769 enum.c         static VALUE
VALUE             771 enum.c             VALUE obj, val;
VALUE             773 enum.c             VALUE memo[2];
VALUE             777 enum.c             rb_iterate(rb_each, obj, member_i, (VALUE)memo);
VALUE             781 enum.c         static VALUE
VALUE             783 enum.c             VALUE val;
VALUE             784 enum.c             VALUE *memo;
VALUE             806 enum.c         static VALUE
VALUE             808 enum.c             VALUE obj;
VALUE             810 enum.c             VALUE memo = 0;
VALUE             813 enum.c             rb_iterate(rb_each, obj, each_with_index_i, (VALUE)&memo);
VALUE             817 enum.c         static VALUE
VALUE             819 enum.c             VALUE val;
VALUE             820 enum.c             VALUE *memo;
VALUE             822 enum.c             VALUE result = memo[0];
VALUE             823 enum.c             VALUE args = memo[1];
VALUE             825 enum.c             VALUE tmp;
VALUE             865 enum.c         static VALUE
VALUE             868 enum.c             VALUE *argv;
VALUE             869 enum.c             VALUE obj;
VALUE             872 enum.c             VALUE result;
VALUE             873 enum.c             VALUE memo[3];
VALUE             882 enum.c             rb_iterate(rb_each, obj, zip_i, (VALUE)memo);
VALUE              17 env.h              VALUE self;
VALUE              19 env.h              VALUE *argv;
VALUE              22 env.h              VALUE last_class;
VALUE              39 env.h              VALUE *local_vars;
VALUE              50 env.h          extern VALUE ruby_class;
VALUE              55 env.h              VALUE val;
VALUE             180 error.c        static VALUE
VALUE             182 error.c            VALUE self, mesg;
VALUE             249 error.c            VALUE x;
VALUE             290 error.c        VALUE rb_eException;
VALUE             291 error.c        VALUE rb_eSystemExit;
VALUE             292 error.c        VALUE rb_eInterrupt;
VALUE             293 error.c        VALUE rb_eSignal;
VALUE             294 error.c        VALUE rb_eFatal;
VALUE             295 error.c        VALUE rb_eStandardError;
VALUE             296 error.c        VALUE rb_eRuntimeError;
VALUE             297 error.c        VALUE rb_eTypeError;
VALUE             298 error.c        VALUE rb_eArgError;
VALUE             299 error.c        VALUE rb_eIndexError;
VALUE             300 error.c        VALUE rb_eRangeError;
VALUE             301 error.c        VALUE rb_eNameError;
VALUE             302 error.c        VALUE rb_eNoMethodError;
VALUE             303 error.c        VALUE rb_eSecurityError;
VALUE             304 error.c        VALUE rb_eNotImpError;
VALUE             305 error.c        VALUE rb_eNoMemError;
VALUE             306 error.c        static VALUE rb_cNameErrorMesg;
VALUE             308 error.c        VALUE rb_eScriptError;
VALUE             309 error.c        VALUE rb_eSyntaxError;
VALUE             310 error.c        VALUE rb_eLoadError;
VALUE             312 error.c        VALUE rb_eSystemCallError;
VALUE             313 error.c        VALUE rb_mErrno;
VALUE             315 error.c        VALUE
VALUE             317 error.c            VALUE etype;
VALUE             324 error.c        VALUE
VALUE             326 error.c            VALUE etype;
VALUE             332 error.c        VALUE
VALUE             334 error.c            VALUE etype, str;
VALUE             348 error.c        static VALUE
VALUE             351 error.c            VALUE *argv;
VALUE             352 error.c            VALUE exc;
VALUE             354 error.c            VALUE arg;
VALUE             376 error.c        static VALUE
VALUE             379 error.c            VALUE *argv;
VALUE             380 error.c            VALUE self;
VALUE             382 error.c            VALUE exc;
VALUE             400 error.c        static VALUE
VALUE             402 error.c            VALUE exc;
VALUE             404 error.c            VALUE mesg = rb_attr_get(exc, rb_intern("mesg"));
VALUE             422 error.c        static VALUE
VALUE             424 error.c            VALUE exc;
VALUE             436 error.c        static VALUE
VALUE             438 error.c            VALUE exc;
VALUE             440 error.c            VALUE str, klass;
VALUE             487 error.c        static VALUE
VALUE             489 error.c            VALUE exc;
VALUE             497 error.c        static VALUE
VALUE             499 error.c            VALUE bt;
VALUE             530 error.c        static VALUE
VALUE             532 error.c            VALUE exc;
VALUE             533 error.c            VALUE bt;
VALUE             545 error.c        static VALUE
VALUE             548 error.c            VALUE *argv;
VALUE             549 error.c            VALUE exc;
VALUE             551 error.c            VALUE status = INT2FIX(EXIT_SUCCESS);
VALUE             569 error.c        static VALUE
VALUE             571 error.c            VALUE exc;
VALUE             584 error.c        static VALUE
VALUE             586 error.c            VALUE exc;
VALUE             588 error.c            VALUE status = rb_attr_get(exc, rb_intern("status"));
VALUE             604 error.c            VALUE exc, argv[2];
VALUE             627 error.c        static VALUE
VALUE             630 error.c            VALUE *argv;
VALUE             631 error.c            VALUE self;
VALUE             633 error.c            VALUE name;
VALUE             648 error.c        static VALUE
VALUE             650 error.c            VALUE self;
VALUE             662 error.c        static VALUE
VALUE             664 error.c            VALUE exc;
VALUE             666 error.c            VALUE mesg = rb_attr_get(exc, rb_intern("mesg")), str = mesg;
VALUE             687 error.c        static VALUE
VALUE             690 error.c            VALUE *argv;
VALUE             691 error.c            VALUE self;
VALUE             693 error.c            VALUE args = (argc > 2) ? argv[--argc] : Qnil;
VALUE             702 error.c            VALUE *ptr;
VALUE             708 error.c        static VALUE
VALUE             710 error.c            VALUE obj, mesg, recv, method;
VALUE             712 error.c            VALUE *ptr = ALLOC_N(VALUE, 3);
VALUE             721 error.c        static VALUE
VALUE             723 error.c            VALUE obj;
VALUE             725 error.c            VALUE *ptr, mesg;
VALUE             726 error.c            Data_Get_Struct(obj, VALUE, ptr);
VALUE             732 error.c        	VALUE d = 0, args[3];
VALUE             768 error.c        static VALUE
VALUE             770 error.c            VALUE klass, str;
VALUE             783 error.c        static VALUE
VALUE             785 error.c            VALUE self;
VALUE             794 error.c            VALUE s = rb_str_inspect(rb_str_new2(str));
VALUE             832 error.c        static VALUE
VALUE             837 error.c            VALUE error;
VALUE             850 error.c        static VALUE
VALUE             854 error.c            VALUE error;
VALUE             876 error.c        static VALUE
VALUE             879 error.c            VALUE *argv;
VALUE             880 error.c            VALUE self;
VALUE             886 error.c            VALUE mesg, error;
VALUE             887 error.c            VALUE klass = rb_obj_class(self);
VALUE             909 error.c        	VALUE str = mesg;
VALUE             934 error.c        static VALUE
VALUE             936 error.c            VALUE self;
VALUE             950 error.c        static VALUE
VALUE             952 error.c            VALUE self, exc;
VALUE             954 error.c            VALUE num, e;
VALUE             961 error.c        	VALUE klass = CLASS_OF(exc);
VALUE             964 error.c        	    klass = (VALUE)RCLASS(klass)->super;
VALUE            1047 error.c        rb_raise(VALUE exc, const char *fmt, ...)
VALUE            1050 error.c            VALUE exc;
VALUE            1115 error.c            VALUE arg;
VALUE            1168 error.c            VALUE obj;
VALUE            1548 error.c            extern VALUE ruby_errinfo;
VALUE            1555 error.c        	    VALUE str = rb_obj_as_string(ruby_errinfo);
VALUE             184 eval.c         VALUE rb_cProc;
VALUE             185 eval.c         static VALUE rb_cBinding;
VALUE             186 eval.c         static VALUE proc_invoke _((VALUE,VALUE,VALUE,VALUE));
VALUE             187 eval.c         static VALUE rb_f_binding _((VALUE));
VALUE             189 eval.c         static VALUE rb_f_block_given_p _((void));
VALUE             190 eval.c         static VALUE block_pass _((VALUE,NODE*));
VALUE             191 eval.c         static VALUE rb_cMethod;
VALUE             192 eval.c         static VALUE method_call _((int, VALUE*, VALUE));
VALUE             193 eval.c         static VALUE rb_cUnboundMethod;
VALUE             194 eval.c         static VALUE umethod_bind _((VALUE, VALUE));
VALUE             195 eval.c         static VALUE rb_mod_define_method _((int, VALUE*, VALUE));
VALUE             196 eval.c         NORETURN(static void rb_raise_jump _((VALUE)));
VALUE             197 eval.c         static VALUE rb_make_exception _((int argc, VALUE *argv));
VALUE             218 eval.c         static VALUE safe_getter _((void));
VALUE             219 eval.c         static void safe_setter _((VALUE val));
VALUE             238 eval.c             VALUE obj;
VALUE             245 eval.c             VALUE x;
VALUE             261 eval.c             VALUE x;
VALUE             270 eval.c         NORETURN(static void print_undef _((VALUE, ID)));
VALUE             273 eval.c             VALUE klass;
VALUE             291 eval.c             VALUE klass;		/* receiver's class */
VALUE             292 eval.c             VALUE origin;		/* where method defined  */
VALUE             315 eval.c             VALUE klass;
VALUE             348 eval.c             VALUE klass;
VALUE             373 eval.c             VALUE klass;
VALUE             411 eval.c             VALUE klass;
VALUE             412 eval.c             VALUE (*func) _((VALUE));
VALUE             420 eval.c             VALUE klass;
VALUE             428 eval.c             VALUE klass, *origin;
VALUE             445 eval.c             VALUE *klassp;
VALUE             450 eval.c             VALUE klass = *klassp;
VALUE             451 eval.c             VALUE origin;
VALUE             506 eval.c             VALUE klass;
VALUE             516 eval.c             VALUE klass;
VALUE             547 eval.c             VALUE klass;
VALUE             561 eval.c         static VALUE
VALUE             564 eval.c             VALUE *argv;
VALUE             565 eval.c             VALUE mod;
VALUE             580 eval.c             VALUE klass;
VALUE             588 eval.c             VALUE klass;
VALUE             596 eval.c             VALUE klass;
VALUE             601 eval.c             VALUE origin;
VALUE             625 eval.c             VALUE klass;
VALUE             650 eval.c             VALUE klass;
VALUE             697 eval.c         VALUE ruby_errinfo = Qnil;
VALUE             702 eval.c         static VALUE rb_eLocalJumpError;
VALUE             703 eval.c         static VALUE rb_eSysStackError;
VALUE             705 eval.c         extern VALUE ruby_top_self;
VALUE             734 eval.c             VALUE self;
VALUE             737 eval.c             VALUE klass;
VALUE             744 eval.c             VALUE orig_thread;
VALUE             745 eval.c             VALUE wrapper;
VALUE             746 eval.c             VALUE block_obj;
VALUE             804 eval.c             VALUE value;
VALUE             816 eval.c         VALUE
VALUE             829 eval.c         VALUE
VALUE             843 eval.c         VALUE
VALUE             861 eval.c             VALUE value;
VALUE             869 eval.c             VALUE value;
VALUE             899 eval.c             VALUE value;
VALUE             907 eval.c             VALUE value;
VALUE             912 eval.c         VALUE *
VALUE             955 eval.c             VALUE tag;
VALUE             956 eval.c             VALUE retval;
VALUE             958 eval.c             VALUE dst;
VALUE             995 eval.c         #define TAG_DST() (_tag.dst == (VALUE)ruby_frame->uniq)
VALUE            1007 eval.c         VALUE ruby_class;
VALUE            1008 eval.c         static VALUE ruby_wrapper;	/* security wrapper */
VALUE            1011 eval.c             VALUE _class = ruby_class;		\
VALUE            1048 eval.c         	    rb_gc_force_recycle((VALUE)ruby_scope);\
VALUE            1056 eval.c         static VALUE rb_eval _((VALUE,NODE*));
VALUE            1057 eval.c         static VALUE eval _((VALUE,VALUE,VALUE,char*,int));
VALUE            1058 eval.c         static NODE *compile _((VALUE, char*, int));
VALUE            1060 eval.c         static VALUE rb_yield_0 _((VALUE, VALUE, VALUE, int, int));
VALUE            1068 eval.c         static VALUE rb_call _((VALUE,VALUE,ID,int,const VALUE*,int));
VALUE            1069 eval.c         static VALUE module_setup _((VALUE,NODE*));
VALUE            1071 eval.c         static VALUE massign _((VALUE,NODE*,VALUE,int));
VALUE            1072 eval.c         static void assign _((VALUE,NODE*,VALUE,int));
VALUE            1092 eval.c         static VALUE trace_func = 0;
VALUE            1094 eval.c         static void call_trace_func _((rb_event_t,NODE*,VALUE,ID,VALUE));
VALUE            1151 eval.c         static VALUE
VALUE            1153 eval.c             VALUE info;
VALUE            1163 eval.c             VALUE info, bt;
VALUE            1171 eval.c             VALUE errat = Qnil;		/* OK */
VALUE            1172 eval.c             volatile VALUE eclass, e;
VALUE            1197 eval.c         	VALUE mesg = RARRAY(errat)->ptr[0];
VALUE            1221 eval.c         	VALUE epath;
VALUE            1283 eval.c         void Init_stack _((VALUE*));
VALUE            1355 eval.c         static VALUE
VALUE            1357 eval.c             VALUE self;
VALUE            1379 eval.c         static VALUE exception_error;
VALUE            1380 eval.c         static VALUE sysstack_error;
VALUE            1384 eval.c             VALUE err;
VALUE            1386 eval.c             VALUE st = rb_iv_get(err, "status");
VALUE            1505 eval.c             volatile VALUE err = ruby_errinfo;
VALUE            1527 eval.c         	VALUE st = rb_iv_get(err, "status");
VALUE            1582 eval.c             VALUE str;
VALUE            1597 eval.c         VALUE
VALUE            1601 eval.c             VALUE v;
VALUE            1612 eval.c         VALUE
VALUE            1617 eval.c             return rb_protect((VALUE (*)_((VALUE)))rb_eval_string, (VALUE)str, state);
VALUE            1620 eval.c         VALUE
VALUE            1626 eval.c             VALUE self = ruby_top_self;
VALUE            1627 eval.c             VALUE wrapper = ruby_wrapper;
VALUE            1628 eval.c             VALUE val;
VALUE            1657 eval.c         NORETURN(static void localjump_error(const char*, VALUE, int));
VALUE            1661 eval.c             VALUE value;
VALUE            1664 eval.c             VALUE exc = rb_exc_new2(rb_eLocalJumpError, mesg);
VALUE            1692 eval.c         static VALUE
VALUE            1694 eval.c             VALUE exc;
VALUE            1707 eval.c         static VALUE
VALUE            1709 eval.c             VALUE exc;
VALUE            1714 eval.c         NORETURN(static void jump_tag_but_local_jump _((int,VALUE)));
VALUE            1718 eval.c             VALUE val;
VALUE            1746 eval.c         VALUE
VALUE            1748 eval.c             VALUE cmd, arg;
VALUE            1752 eval.c             VALUE val = Qnil;		/* OK */
VALUE            1801 eval.c         static VALUE
VALUE            1805 eval.c             VALUE self;
VALUE            1808 eval.c             VALUE result;
VALUE            1815 eval.c         	    if (result == Qundef && NIL_P(rb_autoload_p((VALUE)klass, id))) {
VALUE            1825 eval.c         static VALUE
VALUE            1829 eval.c             VALUE self;
VALUE            1832 eval.c             VALUE result;
VALUE            1835 eval.c         	VALUE klass = cbase->nd_clss;
VALUE            1850 eval.c         static VALUE
VALUE            1882 eval.c         static VALUE
VALUE            1886 eval.c             VALUE ary = rb_ary_new();
VALUE            1912 eval.c         static VALUE
VALUE            1933 eval.c             VALUE klass;
VALUE            1955 eval.c             VALUE klass;
VALUE            1958 eval.c             VALUE origin;
VALUE            1974 eval.c         	VALUE c = klass;
VALUE            1977 eval.c         	    VALUE obj = rb_iv_get(klass, "__attached__");
VALUE            2045 eval.c         static VALUE
VALUE            2048 eval.c             VALUE *argv;
VALUE            2049 eval.c             VALUE mod;
VALUE            2061 eval.c             VALUE klass;
VALUE            2064 eval.c             VALUE origin;
VALUE            2066 eval.c             VALUE singleton = 0;
VALUE            2131 eval.c         static VALUE
VALUE            2133 eval.c             VALUE mod, newname, oldname;
VALUE            2160 eval.c         				 ALLOC_N(VALUE,n),tmp__protect_tmp,n),	\
VALUE            2190 eval.c         	VALUE args = rb_eval(self,n);\
VALUE            2194 eval.c         	argv = ALLOCA_N(VALUE, argc);\
VALUE            2195 eval.c         	MEMCPY(argv, RARRAY(args)->ptr, VALUE, argc);\
VALUE            2219 eval.c         static char* is_defined _((VALUE, NODE*, char*));
VALUE            2223 eval.c             VALUE self;
VALUE            2250 eval.c             VALUE self;
VALUE            2254 eval.c             VALUE val;			/* OK */
VALUE            2445 eval.c         static int handle_rescue _((VALUE,NODE*));
VALUE            2449 eval.c         static VALUE
VALUE            2451 eval.c             VALUE proc;
VALUE            2542 eval.c         static VALUE
VALUE            2544 eval.c             VALUE obj, trace;
VALUE            2595 eval.c             VALUE self;
VALUE            2597 eval.c             VALUE klass;		/* OK */
VALUE            2602 eval.c             VALUE srcfile;
VALUE            2657 eval.c         static VALUE
VALUE            2659 eval.c             VALUE v;
VALUE            2661 eval.c             VALUE tmp, top;
VALUE            2683 eval.c         static VALUE
VALUE            2685 eval.c             VALUE v;
VALUE            2687 eval.c             VALUE tmp, top;
VALUE            2704 eval.c         static VALUE
VALUE            2706 eval.c             VALUE v;
VALUE            2709 eval.c             VALUE tmp;
VALUE            2723 eval.c         static VALUE
VALUE            2725 eval.c             VALUE v;
VALUE            2737 eval.c         VALUE
VALUE            2739 eval.c             VALUE val;
VALUE            2741 eval.c             VALUE tmp = rb_check_array_type(val);
VALUE            2745 eval.c         	VALUE origin;
VALUE            2764 eval.c         static VALUE
VALUE            2766 eval.c             VALUE v;
VALUE            2772 eval.c         static VALUE
VALUE            2774 eval.c             VALUE self;
VALUE            2781 eval.c         	VALUE c = rb_eval(self, cpath->nd_head);
VALUE            2809 eval.c         NORETURN(static void return_jump _((VALUE)));
VALUE            2810 eval.c         NORETURN(static void break_jump _((VALUE)));
VALUE            2829 eval.c         static VALUE
VALUE            2831 eval.c             VALUE self;
VALUE            2837 eval.c             volatile VALUE result = Qnil;
VALUE            2877 eval.c         	    VALUE l = rb_eval(self,node->nd_recv);
VALUE            2878 eval.c         	    VALUE r = rb_eval(self,node->nd_value);
VALUE            2886 eval.c         	    VALUE r = rb_eval(self,node->nd_recv);
VALUE            2887 eval.c         	    VALUE l = rb_eval(self,node->nd_value);
VALUE            2959 eval.c         		    VALUE v = rb_eval(self, tag->nd_head->nd_head);
VALUE            2984 eval.c         	    VALUE val;
VALUE            3000 eval.c         			VALUE v = rb_eval(self, tag->nd_head->nd_head);
VALUE            3112 eval.c         		    VALUE recv;
VALUE            3190 eval.c         	    volatile VALUE e_info = ruby_errinfo;
VALUE            3249 eval.c         	    VALUE retval = prot_tag->retval; /* save retval */
VALUE            3250 eval.c         	    VALUE errinfo = ruby_errinfo;
VALUE            3279 eval.c         	    VALUE beg = rb_eval(self, node->nd_beg);
VALUE            3280 eval.c         	    VALUE end = rb_eval(self, node->nd_end);
VALUE            3287 eval.c         	    VALUE *flip = rb_svar(node->nd_cnt);
VALUE            3309 eval.c         	    VALUE *flip = rb_svar(node->nd_cnt);
VALUE            3330 eval.c         	    VALUE args = rb_eval(self, node->nd_head);
VALUE            3337 eval.c         	    VALUE args = rb_ary_dup(rb_eval(self, node->nd_head));
VALUE            3344 eval.c         	    VALUE recv;
VALUE            3345 eval.c         	    int argc; VALUE *argv; /* used in SETUP_ARGS */
VALUE            3370 eval.c         	    VALUE recv;
VALUE            3371 eval.c         	    int argc; VALUE *argv; /* used in SETUP_ARGS */
VALUE            3387 eval.c         	    int argc; VALUE *argv; /* used in SETUP_ARGS */
VALUE            3408 eval.c         	    int argc; VALUE *argv; /* used in SETUP_ARGS */
VALUE            3453 eval.c         		VALUE *vars = ALLOCA_N(VALUE, node->nd_tbl[0]+1);
VALUE            3454 eval.c         		*vars++ = (VALUE)node;
VALUE            3477 eval.c         	    int argc; VALUE *argv; /* used in SETUP_ARGS */
VALUE            3478 eval.c         	    VALUE recv, val;
VALUE            3507 eval.c         	    VALUE recv, val;
VALUE            3642 eval.c         	    VALUE klass;
VALUE            3693 eval.c         	    VALUE hash = rb_hash_new();
VALUE            3694 eval.c         	    VALUE key, val;
VALUE            3716 eval.c         	    VALUE ary;
VALUE            3744 eval.c         	    VALUE str, str2;
VALUE            3808 eval.c         	    VALUE origin;
VALUE            3854 eval.c         	    VALUE recv = rb_eval(self, node->nd_recv);
VALUE            3855 eval.c         	    VALUE klass;
VALUE            3908 eval.c         	    VALUE super, klass, tmp, cbase;
VALUE            3964 eval.c         	    VALUE module, cbase;
VALUE            3998 eval.c         	    VALUE klass;
VALUE            4048 eval.c         static VALUE
VALUE            4050 eval.c             VALUE module;
VALUE            4056 eval.c             VALUE result = Qnil;	/* OK */
VALUE            4068 eval.c         	VALUE *vars = TMP_ALLOC(node->nd_tbl[0]+1);
VALUE            4069 eval.c         	*vars++ = (VALUE)node;
VALUE            4104 eval.c             VALUE obj;
VALUE            4108 eval.c             VALUE klass = CLASS_OF(obj);
VALUE            4114 eval.c         	VALUE args[2];
VALUE            4124 eval.c             VALUE obj;
VALUE            4139 eval.c         static VALUE
VALUE            4142 eval.c             VALUE *argv;
VALUE            4143 eval.c             VALUE obj;
VALUE            4145 eval.c             VALUE mid, priv;
VALUE            4182 eval.c         static VALUE
VALUE            4184 eval.c             VALUE mod, mid;
VALUE            4217 eval.c         static VALUE
VALUE            4219 eval.c             VALUE mod, mid;
VALUE            4257 eval.c         static VALUE
VALUE            4259 eval.c             VALUE mod, mid;
VALUE            4297 eval.c         static VALUE
VALUE            4299 eval.c             VALUE mod, mid;
VALUE            4311 eval.c         NORETURN(static VALUE terminate_process _((int, VALUE)));
VALUE            4312 eval.c         static VALUE
VALUE            4315 eval.c             VALUE mesg;
VALUE            4317 eval.c             VALUE args[2];
VALUE            4374 eval.c         VALUE
VALUE            4377 eval.c             VALUE *argv;
VALUE            4379 eval.c             VALUE status;
VALUE            4418 eval.c         VALUE
VALUE            4421 eval.c             VALUE *argv;
VALUE            4431 eval.c         	VALUE mesg;
VALUE            4447 eval.c         NORETURN(static void rb_longjmp _((int, VALUE)));
VALUE            4448 eval.c         static VALUE make_backtrace _((void));
VALUE            4453 eval.c             VALUE mesg;
VALUE            4455 eval.c             VALUE at;
VALUE            4480 eval.c         	VALUE e = ruby_errinfo;
VALUE            4517 eval.c             VALUE mesg;
VALUE            4524 eval.c             VALUE mesg;
VALUE            4559 eval.c         static VALUE
VALUE            4562 eval.c             VALUE *argv;
VALUE            4568 eval.c         static VALUE
VALUE            4571 eval.c             VALUE *argv;
VALUE            4573 eval.c             VALUE mesg;
VALUE            4617 eval.c             VALUE mesg;
VALUE            4671 eval.c         static VALUE
VALUE            4679 eval.c         static VALUE rb_eThreadError;
VALUE            4681 eval.c         NORETURN(static void proc_jump_error(int, VALUE));
VALUE            4685 eval.c             VALUE result;
VALUE            4706 eval.c             VALUE retval;
VALUE            4718 eval.c         	    tt->dst = (VALUE)ruby_frame->uniq;
VALUE            4723 eval.c         	    tt->dst = (VALUE)tt->frame->uniq;
VALUE            4737 eval.c             VALUE retval;
VALUE            4748 eval.c         	    tt->dst = (VALUE)tt->frame->uniq;
VALUE            4771 eval.c         static VALUE
VALUE            4773 eval.c             VALUE val, self, klass;	/* OK */
VALUE            4777 eval.c             volatile VALUE result = Qnil;
VALUE            4778 eval.c             volatile VALUE old_cref;
VALUE            4779 eval.c             volatile VALUE old_wrapper;
VALUE            4796 eval.c             old_cref = (VALUE)ruby_cref;
VALUE            4932 eval.c         	    rb_gc_force_recycle((VALUE)ruby_dyna_vars);
VALUE            4935 eval.c         		rb_gc_force_recycle((VALUE)vars);
VALUE            4958 eval.c         		    tt->dst = (VALUE)tt->frame->uniq;
VALUE            4975 eval.c         VALUE
VALUE            4977 eval.c             VALUE val;
VALUE            4982 eval.c         VALUE
VALUE            4992 eval.c             VALUE ary;
VALUE            5000 eval.c         	rb_ary_push(ary, va_arg(args, VALUE));
VALUE            5006 eval.c         VALUE
VALUE            5008 eval.c             VALUE values;
VALUE            5037 eval.c         static VALUE
VALUE            5047 eval.c         static VALUE
VALUE            5049 eval.c             VALUE self;
VALUE            5051 eval.c             VALUE val;
VALUE            5096 eval.c             VALUE self;
VALUE            5098 eval.c             VALUE val;
VALUE            5156 eval.c         	    VALUE recv;
VALUE            5174 eval.c         		VALUE args;
VALUE            5192 eval.c         VALUE
VALUE            5194 eval.c             VALUE (*it_proc) _((VALUE)), (*bl_proc)(ANYARGS);
VALUE            5195 eval.c             VALUE data1, data2;
VALUE            5198 eval.c             volatile VALUE retval = Qnil;
VALUE            5200 eval.c             VALUE self = ruby_top_self;
VALUE            5233 eval.c             VALUE self;
VALUE            5236 eval.c             int argc; VALUE *argv; /* used in SETUP_ARGS */
VALUE            5257 eval.c         VALUE
VALUE            5259 eval.c         rb_rescue2(VALUE (*b_proc)(ANYARGS), VALUE data1, VALUE (*r_proc)(ANYARGS), VALUE data2, ...)
VALUE            5262 eval.c             VALUE (*b_proc)(ANYARGS), (*r_proc)(ANYARGS);
VALUE            5263 eval.c             VALUE data1, data2;
VALUE            5268 eval.c             volatile VALUE result;
VALUE            5269 eval.c             volatile VALUE e_info = ruby_errinfo;
VALUE            5271 eval.c             VALUE eclass;
VALUE            5288 eval.c         	while (eclass = va_arg(args, VALUE)) {
VALUE            5313 eval.c         VALUE
VALUE            5315 eval.c             VALUE (*b_proc)(), (*r_proc)();
VALUE            5316 eval.c             VALUE data1, data2;
VALUE            5318 eval.c             return rb_rescue2(b_proc, data1, r_proc, data2, rb_eStandardError, (VALUE)0);
VALUE            5321 eval.c         static VALUE cont_protect;
VALUE            5323 eval.c         VALUE
VALUE            5325 eval.c             VALUE (*proc) _((VALUE));
VALUE            5326 eval.c             VALUE data;
VALUE            5329 eval.c             VALUE result = Qnil;	/* OK */
VALUE            5333 eval.c             cont_protect = (VALUE)rb_node_newnode(NODE_MEMO, cont_protect, 0, 0);
VALUE            5349 eval.c         VALUE
VALUE            5351 eval.c             VALUE (*b_proc)();
VALUE            5352 eval.c             VALUE data1;
VALUE            5353 eval.c             VALUE (*e_proc)();
VALUE            5354 eval.c             VALUE data2;
VALUE            5357 eval.c             volatile VALUE result = Qnil;
VALUE            5358 eval.c             VALUE retval;
VALUE            5372 eval.c         VALUE
VALUE            5374 eval.c             VALUE (*proc)();
VALUE            5375 eval.c             VALUE data;
VALUE            5377 eval.c             VALUE result = Qnil;	/* OK */
VALUE            5453 eval.c         static VALUE
VALUE            5456 eval.c             VALUE *argv;
VALUE            5457 eval.c             VALUE obj;
VALUE            5460 eval.c             VALUE exc = rb_eNoMethodError;
VALUE            5492 eval.c         	VALUE args[3];
VALUE            5508 eval.c         static VALUE
VALUE            5510 eval.c             VALUE obj;
VALUE            5513 eval.c             const VALUE *argv;
VALUE            5516 eval.c             VALUE *nargv;
VALUE            5529 eval.c             nargv = ALLOCA_N(VALUE, argc+1);
VALUE            5531 eval.c             MEMCPY(nargv+1, argv, VALUE, argc);
VALUE            5536 eval.c         static inline VALUE
VALUE            5538 eval.c             VALUE (*func)();
VALUE            5539 eval.c             VALUE recv;
VALUE            5541 eval.c             VALUE *argv;
VALUE            5624 eval.c         static VALUE
VALUE            5626 eval.c             VALUE klass, recv;
VALUE            5630 eval.c             VALUE *argv;		/* OK */
VALUE            5635 eval.c             volatile VALUE result = Qnil;
VALUE            5722 eval.c         	    VALUE *local_vars;	/* OK */
VALUE            5733 eval.c         		*local_vars++ = (VALUE)body;
VALUE            5795 eval.c         			    MEMCPY(local_vars+2, argv, VALUE, i);
VALUE            5812 eval.c         			    VALUE v;
VALUE            5869 eval.c         static VALUE
VALUE            5871 eval.c             VALUE klass, recv;
VALUE            5874 eval.c             const VALUE *argv;		/* OK */
VALUE            5910 eval.c         	    VALUE defined_class = klass;
VALUE            5923 eval.c         VALUE
VALUE            5925 eval.c             VALUE recv;
VALUE            5927 eval.c             VALUE args;
VALUE            5930 eval.c             VALUE *argv;
VALUE            5933 eval.c             argv = ALLOCA_N(VALUE, argc);
VALUE            5934 eval.c             MEMCPY(argv, RARRAY(args)->ptr, VALUE, argc);
VALUE            5956 eval.c         static VALUE
VALUE            5959 eval.c             VALUE *argv;
VALUE            5960 eval.c             VALUE recv;
VALUE            5962 eval.c             VALUE vid;
VALUE            5974 eval.c         static VALUE
VALUE            5976 eval.c             VALUE recv;
VALUE            5981 eval.c             VALUE *argv;
VALUE            5986 eval.c         	argv = ALLOCA_N(VALUE, n);
VALUE            5989 eval.c         	    argv[i] = va_arg(*ar, VALUE);
VALUE            6000 eval.c         VALUE
VALUE            6002 eval.c         rb_funcall(VALUE recv, ID mid, int n, ...)
VALUE            6005 eval.c             VALUE recv;
VALUE            6017 eval.c         VALUE
VALUE            6019 eval.c         rb_funcall_rescue(VALUE recv, ID mid, int n, ...)
VALUE            6022 eval.c             VALUE recv;
VALUE            6028 eval.c             VALUE result = Qnil;	/* OK */
VALUE            6049 eval.c         VALUE
VALUE            6051 eval.c             VALUE recv;
VALUE            6054 eval.c             const VALUE *argv;
VALUE            6059 eval.c         VALUE
VALUE            6061 eval.c             VALUE recv;
VALUE            6064 eval.c             const VALUE *argv;
VALUE            6069 eval.c         VALUE
VALUE            6072 eval.c             const VALUE *argv;
VALUE            6074 eval.c             VALUE result, self, klass;
VALUE            6094 eval.c         static VALUE
VALUE            6100 eval.c             VALUE ary;
VALUE            6173 eval.c         static VALUE
VALUE            6176 eval.c             VALUE *argv;
VALUE            6178 eval.c             VALUE level;
VALUE            6194 eval.c             VALUE ary;
VALUE            6202 eval.c         static VALUE
VALUE            6216 eval.c             VALUE src;
VALUE            6234 eval.c         static VALUE
VALUE            6236 eval.c             VALUE self, src, scope;
VALUE            6241 eval.c             volatile VALUE result = Qnil;
VALUE            6245 eval.c             VALUE volatile old_cref;
VALUE            6247 eval.c             volatile VALUE old_wrapper;
VALUE            6273 eval.c         	old_cref = (VALUE)ruby_cref;
VALUE            6352 eval.c         		VALUE mesg, errat;
VALUE            6391 eval.c         static VALUE
VALUE            6394 eval.c             VALUE *argv;
VALUE            6395 eval.c             VALUE self;
VALUE            6397 eval.c             VALUE src, scope, vfile, vline;
VALUE            6421 eval.c         	VALUE val;
VALUE            6436 eval.c         static VALUE
VALUE            6438 eval.c             VALUE (*func)();
VALUE            6439 eval.c             VALUE under, cbase;
VALUE            6442 eval.c             VALUE val = Qnil;		/* OK */
VALUE            6475 eval.c         static VALUE
VALUE            6477 eval.c             VALUE *args;
VALUE            6488 eval.c         static VALUE
VALUE            6490 eval.c             VALUE under, self, src;
VALUE            6494 eval.c             VALUE args[4];
VALUE            6504 eval.c             args[2] = (VALUE)file;
VALUE            6505 eval.c             args[3] = (VALUE)line;
VALUE            6509 eval.c         static VALUE
VALUE            6511 eval.c             VALUE self;
VALUE            6517 eval.c         static VALUE
VALUE            6519 eval.c             VALUE under, self;
VALUE            6524 eval.c         static VALUE
VALUE            6527 eval.c             VALUE *argv;
VALUE            6528 eval.c             VALUE klass, self;
VALUE            6587 eval.c         VALUE
VALUE            6590 eval.c             VALUE *argv;
VALUE            6591 eval.c             VALUE self;
VALUE            6593 eval.c             VALUE klass;
VALUE            6628 eval.c         VALUE
VALUE            6631 eval.c             VALUE *argv;
VALUE            6632 eval.c             VALUE mod;
VALUE            6637 eval.c         VALUE rb_load_path;
VALUE            6639 eval.c         NORETURN(static void load_failed _((VALUE)));
VALUE            6643 eval.c             VALUE fname;
VALUE            6646 eval.c             VALUE tmp;
VALUE            6650 eval.c             volatile VALUE wrapper = ruby_wrapper;
VALUE            6651 eval.c             volatile VALUE self = ruby_top_self;
VALUE            6746 eval.c             VALUE fname;
VALUE            6775 eval.c         static VALUE
VALUE            6778 eval.c             VALUE *argv;
VALUE            6780 eval.c             VALUE fname, wrap;
VALUE            6787 eval.c         VALUE ruby_dln_librefs;
VALUE            6788 eval.c         static VALUE rb_features;
VALUE            6803 eval.c             VALUE v;
VALUE            6865 eval.c             VALUE feature;
VALUE            6914 eval.c         VALUE
VALUE            6916 eval.c             VALUE obj, fname;
VALUE            6923 eval.c             VALUE fname, *featurep, *path;
VALUE            6925 eval.c             VALUE tmp;
VALUE            6982 eval.c             VALUE fname;
VALUE            6987 eval.c         VALUE
VALUE            6989 eval.c             VALUE fname;
VALUE            6992 eval.c             VALUE result = Qnil;
VALUE            6993 eval.c             volatile VALUE errinfo = ruby_errinfo;
VALUE            7013 eval.c         	VALUE feature, path;
VALUE            7072 eval.c         VALUE
VALUE            7076 eval.c             VALUE fn = rb_str_new2(fname);
VALUE            7083 eval.c             VALUE self;
VALUE            7092 eval.c             VALUE self;
VALUE            7094 eval.c             VALUE *argv;
VALUE            7116 eval.c         static VALUE
VALUE            7119 eval.c             VALUE *argv;
VALUE            7120 eval.c             VALUE module;
VALUE            7142 eval.c         static VALUE
VALUE            7145 eval.c             VALUE *argv;
VALUE            7146 eval.c             VALUE module;
VALUE            7177 eval.c         static VALUE
VALUE            7180 eval.c             VALUE *argv;
VALUE            7181 eval.c             VALUE module;
VALUE            7200 eval.c         static VALUE
VALUE            7203 eval.c             VALUE *argv;
VALUE            7204 eval.c             VALUE obj;
VALUE            7226 eval.c         static VALUE
VALUE            7229 eval.c             VALUE *argv;
VALUE            7230 eval.c             VALUE obj;
VALUE            7246 eval.c         static VALUE
VALUE            7249 eval.c             VALUE *argv;
VALUE            7254 eval.c         static VALUE
VALUE            7257 eval.c             VALUE *argv;
VALUE            7298 eval.c         static VALUE
VALUE            7301 eval.c             VALUE *argv;
VALUE            7302 eval.c             VALUE module;
VALUE            7320 eval.c         	VALUE m = module;
VALUE            7354 eval.c         static VALUE
VALUE            7356 eval.c             VALUE module, include;
VALUE            7378 eval.c         static VALUE
VALUE            7381 eval.c             VALUE *argv;
VALUE            7382 eval.c             VALUE module;
VALUE            7396 eval.c             VALUE obj;
VALUE            7398 eval.c             VALUE *argv;
VALUE            7407 eval.c             VALUE obj, module;
VALUE            7439 eval.c         static VALUE
VALUE            7441 eval.c             VALUE mod, obj;
VALUE            7472 eval.c         static VALUE
VALUE            7475 eval.c             VALUE *argv;
VALUE            7476 eval.c             VALUE obj;
VALUE            7500 eval.c         static VALUE
VALUE            7503 eval.c             VALUE *argv;
VALUE            7504 eval.c             VALUE self;
VALUE            7514 eval.c         VALUE rb_f_trace_var();
VALUE            7515 eval.c         VALUE rb_f_untrace_var();
VALUE            7519 eval.c             VALUE val;
VALUE            7521 eval.c             VALUE *var;
VALUE            7529 eval.c         static VALUE
VALUE            7538 eval.c             VALUE val;
VALUE            7540 eval.c             VALUE *var;
VALUE            7561 eval.c         static VALUE
VALUE            7566 eval.c             VALUE ary = rb_ary_new();
VALUE            7589 eval.c         static VALUE rb_f_catch _((VALUE,VALUE));
VALUE            7590 eval.c         NORETURN(static VALUE rb_f_throw _((int,VALUE*)));
VALUE            7594 eval.c             VALUE data;
VALUE            7603 eval.c             void (*func) _((VALUE));
VALUE            7604 eval.c             VALUE data;
VALUE            7640 eval.c         static void call_end_proc _((VALUE data));
VALUE            7644 eval.c             VALUE data;
VALUE            7688 eval.c         static VALUE
VALUE            7691 eval.c             VALUE proc;
VALUE            7768 eval.c             rb_global_variable((VALUE*)&top_scope);
VALUE            7769 eval.c             rb_global_variable((VALUE*)&ruby_eval_tree_begin);
VALUE            7771 eval.c             rb_global_variable((VALUE*)&ruby_eval_tree);
VALUE            7772 eval.c             rb_global_variable((VALUE*)&ruby_dyna_vars);
VALUE            7785 eval.c             rb_global_variable((VALUE*)&basic_respond_to);
VALUE            7862 eval.c         static VALUE
VALUE            7864 eval.c             VALUE mod;
VALUE            7865 eval.c             VALUE sym;
VALUE            7866 eval.c             VALUE file;
VALUE            7888 eval.c         static VALUE
VALUE            7890 eval.c             VALUE mod, sym;
VALUE            7906 eval.c         static VALUE
VALUE            7908 eval.c             VALUE obj;
VALUE            7909 eval.c             VALUE sym;
VALUE            7910 eval.c             VALUE file;
VALUE            7926 eval.c         static VALUE
VALUE            7928 eval.c             VALUE obj;
VALUE            7929 eval.c             VALUE sym;
VALUE            7964 eval.c             VALUE *vars;
VALUE            7971 eval.c         	vars = ALLOC_N(VALUE, tbl[0]+1);
VALUE            7973 eval.c         	MEMCPY(vars, scope->local_vars, VALUE, tbl[0]);
VALUE            7985 eval.c         	rb_gc_mark((VALUE)data->scope);
VALUE            7986 eval.c         	rb_gc_mark((VALUE)data->var);
VALUE            7987 eval.c         	rb_gc_mark((VALUE)data->body);
VALUE            7988 eval.c         	rb_gc_mark((VALUE)data->self);
VALUE            7989 eval.c         	rb_gc_mark((VALUE)data->dyna_vars);
VALUE            7990 eval.c         	rb_gc_mark((VALUE)data->cref);
VALUE            8033 eval.c             VALUE *argv;
VALUE            8038 eval.c         	    argv = ALLOC_N(VALUE, frame->argc);
VALUE            8039 eval.c         	    MEMCPY(argv, frame->argv, VALUE, frame->argc);
VALUE            8096 eval.c         static VALUE
VALUE            8098 eval.c             VALUE self;
VALUE            8101 eval.c             VALUE bind;
VALUE            8115 eval.c         static VALUE
VALUE            8117 eval.c             VALUE self;
VALUE            8120 eval.c             VALUE bind;
VALUE            8145 eval.c         static VALUE
VALUE            8147 eval.c             VALUE self;
VALUE            8151 eval.c             VALUE bind;
VALUE            8193 eval.c             VALUE data;
VALUE            8202 eval.c             VALUE data;
VALUE            8209 eval.c             VALUE data;
VALUE            8214 eval.c         static VALUE
VALUE            8216 eval.c             VALUE klass;
VALUE            8219 eval.c             volatile VALUE block;
VALUE            8283 eval.c         static VALUE
VALUE            8286 eval.c             VALUE *argv;
VALUE            8287 eval.c             VALUE klass;
VALUE            8289 eval.c             VALUE block = proc_alloc(klass, Qfalse);
VALUE            8295 eval.c         VALUE
VALUE            8301 eval.c         VALUE
VALUE            8317 eval.c         static VALUE
VALUE            8336 eval.c         static VALUE
VALUE            8338 eval.c             VALUE proc, args;		/* OK */
VALUE            8339 eval.c             VALUE self, klass;
VALUE            8344 eval.c             volatile VALUE result = Qundef;
VALUE            8347 eval.c             volatile VALUE old_wrapper = ruby_wrapper;
VALUE            8349 eval.c             volatile VALUE tmp = args;
VALUE            8375 eval.c             _block.frame.argv = ALLOCA_N(VALUE, RARRAY(tmp)->len);
VALUE            8376 eval.c             MEMCPY(_block.frame.argv, RARRAY(tmp)->ptr, VALUE, RARRAY(tmp)->len);
VALUE            8454 eval.c         static VALUE
VALUE            8456 eval.c             VALUE proc, args;		/* OK */
VALUE            8461 eval.c         static VALUE bmcall _((VALUE, VALUE));
VALUE            8462 eval.c         static VALUE method_arity _((VALUE));
VALUE            8484 eval.c         static VALUE
VALUE            8486 eval.c             VALUE proc;
VALUE            8525 eval.c         static VALUE
VALUE            8527 eval.c             VALUE self, other;
VALUE            8554 eval.c         static VALUE
VALUE            8556 eval.c             VALUE self;
VALUE            8561 eval.c             const int w = (sizeof(VALUE) * CHAR_BIT) / 4;
VALUE            8563 eval.c             VALUE str;
VALUE            8570 eval.c         		 "#<%s:0x%.*lx@%s:%d>", cname, w, (VALUE)data->body,
VALUE            8576 eval.c         		 "#<%s:0x%.*lx>", cname, w, (VALUE)data->body);
VALUE            8593 eval.c         static VALUE
VALUE            8595 eval.c             VALUE self;
VALUE            8617 eval.c         static VALUE
VALUE            8619 eval.c             VALUE proc;
VALUE            8622 eval.c             VALUE bind;
VALUE            8639 eval.c         static VALUE
VALUE            8641 eval.c             VALUE self;
VALUE            8644 eval.c             VALUE proc = rb_eval(self, node->nd_body);	/* OK */
VALUE            8645 eval.c             VALUE b;
VALUE            8649 eval.c             volatile VALUE result = Qnil;
VALUE            8731 eval.c             VALUE klass, rklass;
VALUE            8732 eval.c             VALUE recv;
VALUE            8745 eval.c             rb_gc_mark((VALUE)data->body);
VALUE            8748 eval.c         static VALUE
VALUE            8750 eval.c             VALUE klass, obj, mklass;
VALUE            8753 eval.c             VALUE method;
VALUE            8757 eval.c             VALUE rklass = klass;
VALUE            8822 eval.c         static VALUE
VALUE            8824 eval.c             VALUE method, other;
VALUE            8852 eval.c         static VALUE
VALUE            8854 eval.c             VALUE obj;
VALUE            8856 eval.c             VALUE method;
VALUE            8900 eval.c         static VALUE
VALUE            8902 eval.c             VALUE obj;
VALUE            8903 eval.c             VALUE vid;
VALUE            8940 eval.c         static VALUE
VALUE            8942 eval.c             VALUE mod;
VALUE            8943 eval.c             VALUE vid;
VALUE            8952 eval.c         static VALUE
VALUE            8954 eval.c             VALUE self;
VALUE            8956 eval.c             VALUE clone;
VALUE            8980 eval.c         static VALUE
VALUE            8983 eval.c             VALUE *argv;
VALUE            8984 eval.c             VALUE method;
VALUE            8986 eval.c             VALUE result = Qnil;	/* OK */
VALUE            9097 eval.c         static VALUE
VALUE            9099 eval.c             VALUE method, recv;
VALUE            9102 eval.c             VALUE rklass = CLASS_OF(recv), klass = rklass;
VALUE            9165 eval.c         static VALUE
VALUE            9167 eval.c             VALUE method;
VALUE            9212 eval.c         static VALUE
VALUE            9214 eval.c             VALUE method;
VALUE            9217 eval.c             VALUE str;
VALUE            9228 eval.c         	VALUE v = rb_iv_get(data->klass, "__attached__");
VALUE            9260 eval.c         static VALUE
VALUE            9262 eval.c             VALUE method;
VALUE            9264 eval.c             VALUE proc;
VALUE            9276 eval.c         static VALUE
VALUE            9278 eval.c             VALUE args, method;
VALUE            9280 eval.c             volatile VALUE a;
VALUE            9281 eval.c             VALUE ret;
VALUE            9289 eval.c         VALUE
VALUE            9291 eval.c             VALUE (*func)(ANYARGS);	/* VALUE yieldarg[, VALUE procarg] */
VALUE            9292 eval.c             VALUE val;
VALUE            9295 eval.c             VALUE proc = rb_iterate((VALUE(*)_((VALUE)))mproc, 0, func, val);
VALUE            9309 eval.c         static VALUE
VALUE            9311 eval.c             VALUE method;
VALUE            9313 eval.c             VALUE proc;
VALUE            9317 eval.c             proc = rb_iterate((VALUE(*)_((VALUE)))mproc, 0, bmcall, method);
VALUE            9327 eval.c         static VALUE
VALUE            9329 eval.c             VALUE m;
VALUE            9374 eval.c         static VALUE
VALUE            9377 eval.c             VALUE *argv;
VALUE            9378 eval.c             VALUE mod;
VALUE            9381 eval.c             VALUE body;
VALUE            9626 eval.c         VALUE rb_cThread;
VALUE            9628 eval.c         extern VALUE rb_last_status;
VALUE            9663 eval.c             VALUE result;
VALUE            9667 eval.c             VALUE *stk_ptr;
VALUE            9668 eval.c             VALUE *stk_pos;
VALUE            9670 eval.c             VALUE *bstr_ptr;
VALUE            9680 eval.c             VALUE klass;
VALUE            9681 eval.c             VALUE wrapper;
VALUE            9689 eval.c             VALUE errinfo;
VALUE            9690 eval.c             VALUE last_status;
VALUE            9691 eval.c             VALUE last_line;
VALUE            9692 eval.c             VALUE last_match;
VALUE            9708 eval.c             VALUE thgroup;
VALUE            9712 eval.c             VALUE thread;
VALUE            9729 eval.c             VALUE errinfo;
VALUE            9730 eval.c             VALUE last_status;
VALUE            9731 eval.c             VALUE last_line;
VALUE            9732 eval.c             VALUE last_match;
VALUE            9787 eval.c         static VALUE run_trap_eval _((VALUE));
VALUE            9788 eval.c         static VALUE
VALUE            9790 eval.c             VALUE arg;
VALUE            9792 eval.c             VALUE *p = (VALUE *)arg;
VALUE            9796 eval.c         static VALUE
VALUE            9798 eval.c             VALUE cmd;
VALUE            9802 eval.c             VALUE val = Qnil;		/* OK */
VALUE            9804 eval.c             VALUE arg[3];
VALUE            9808 eval.c             arg[2] = (VALUE)safe;
VALUE            9812 eval.c             val = rb_protect(run_trap_eval, (VALUE)&arg, &state);
VALUE            9859 eval.c         static VALUE
VALUE            9867 eval.c             VALUE val;
VALUE            9889 eval.c         #define STACK(addr) (th->stk_pos<(VALUE*)(addr) && (VALUE*)(addr)<th->stk_pos+th->stk_len)
VALUE            9890 eval.c         #define ADJ(addr) (void*)(STACK(addr)?(((VALUE*)(addr)-th->stk_pos)+th->stk_ptr):(VALUE*)(addr))
VALUE            9904 eval.c         	VALUE *start = ADJ(frame->argv);
VALUE            9907 eval.c             rb_gc_mark((VALUE)frame->node);
VALUE            9924 eval.c             rb_gc_mark((VALUE)th->cref);
VALUE            9926 eval.c             rb_gc_mark((VALUE)th->scope);
VALUE            9927 eval.c             rb_gc_mark((VALUE)th->dyna_vars);
VALUE            9979 eval.c             rb_gc_mark((VALUE)ruby_cref);
VALUE            10007 eval.c             VALUE data;
VALUE            10016 eval.c         static VALUE rb_thread_raise _((int, VALUE*, rb_thread_t));
VALUE            10018 eval.c         static VALUE th_raise_exception;
VALUE            10020 eval.c         static VALUE th_cmd;
VALUE            10032 eval.c         extern VALUE *rb_gc_stack_start;
VALUE            10038 eval.c             VALUE *pos;
VALUE            10040 eval.c             static VALUE tval;
VALUE            10046 eval.c         	VALUE *ptr = realloc(th->stk_ptr, sizeof(VALUE) * len);
VALUE            10053 eval.c             MEMCPY(th->stk_ptr, th->stk_pos, VALUE, th->stk_len);
VALUE            10057 eval.c         	VALUE *top, *bot;
VALUE            10060 eval.c         	bot = (VALUE*)__libc_ia64_register_backing_store_base;
VALUE            10062 eval.c         	top = (VALUE*)ctx.uc_mcontext.mc_special.bspstore;
VALUE            10064 eval.c         	top = (VALUE*)ctx.uc_mcontext.sc_ar_bsp;
VALUE            10067 eval.c         	REALLOC_N(th->bstr_ptr, VALUE, th->bstr_len);
VALUE            10068 eval.c         	MEMCPY(th->bstr_ptr, (VALUE*)__libc_ia64_register_backing_store_base, VALUE, th->bstr_len);
VALUE            10154 eval.c             VALUE space[1024];
VALUE            10165 eval.c             VALUE v;
VALUE            10168 eval.c             static VALUE tval;
VALUE            10211 eval.c             MEMCPY(tmp->stk_pos, tmp->stk_ptr, VALUE, tmp->stk_len);
VALUE            10213 eval.c             MEMCPY((VALUE*)__libc_ia64_register_backing_store_base, tmp->bstr_ptr, VALUE, tmp->bstr_len);
VALUE            10277 eval.c         	    VALUE exc = rb_exc_new2(rb_eIOError, "stream closed");
VALUE            10284 eval.c         NORETURN(static void rb_thread_main_jump _((VALUE, int)));
VALUE            10287 eval.c             VALUE err;
VALUE            10301 eval.c             VALUE e;
VALUE            10845 eval.c         	VALUE oldbt = get_backtrace(th->errinfo);
VALUE            10846 eval.c         	VALUE errat = make_backtrace();
VALUE            10847 eval.c         	VALUE errinfo = rb_obj_dup(th->errinfo);
VALUE            10900 eval.c         static VALUE
VALUE            10903 eval.c             VALUE *argv;
VALUE            10904 eval.c             VALUE thread;
VALUE            10906 eval.c             VALUE limit;
VALUE            10927 eval.c         VALUE
VALUE            10943 eval.c         VALUE
VALUE            10970 eval.c         VALUE
VALUE            10974 eval.c             VALUE ary = rb_ary_new();
VALUE            11007 eval.c         VALUE
VALUE            11009 eval.c             VALUE thread;
VALUE            11041 eval.c         VALUE
VALUE            11043 eval.c             VALUE thread;
VALUE            11064 eval.c         VALUE
VALUE            11066 eval.c             VALUE thread;
VALUE            11098 eval.c         static VALUE
VALUE            11100 eval.c             VALUE obj, th;
VALUE            11116 eval.c         static VALUE
VALUE            11143 eval.c         static VALUE
VALUE            11170 eval.c         VALUE
VALUE            11245 eval.c         static VALUE
VALUE            11247 eval.c             VALUE thread;
VALUE            11276 eval.c         static VALUE
VALUE            11278 eval.c             VALUE thread, prio;
VALUE            11303 eval.c         static VALUE
VALUE            11305 eval.c             VALUE thread;
VALUE            11317 eval.c         static VALUE thgroup_default;
VALUE            11332 eval.c         static VALUE
VALUE            11363 eval.c         static VALUE
VALUE            11365 eval.c             VALUE self, val;
VALUE            11382 eval.c         static VALUE
VALUE            11384 eval.c             VALUE thread;
VALUE            11399 eval.c         static VALUE
VALUE            11401 eval.c             VALUE thread, val;
VALUE            11419 eval.c         VALUE
VALUE            11421 eval.c             VALUE thread;
VALUE            11423 eval.c             VALUE group = rb_thread_check(thread)->thgroup;
VALUE            11481 eval.c             VALUE klass;
VALUE            11587 eval.c         static VALUE
VALUE            11589 eval.c             VALUE (*fn)();
VALUE            11594 eval.c             volatile VALUE thread = th->thread;
VALUE            11699 eval.c         VALUE
VALUE            11701 eval.c             VALUE (*fn)();
VALUE            11704 eval.c             Init_stack((VALUE*)&arg);
VALUE            11708 eval.c         static VALUE
VALUE            11710 eval.c             VALUE arg;
VALUE            11751 eval.c         static VALUE
VALUE            11754 eval.c             VALUE *argv;
VALUE            11755 eval.c             VALUE klass;
VALUE            11758 eval.c             volatile VALUE *pos;
VALUE            11789 eval.c         static VALUE
VALUE            11791 eval.c             VALUE thread, args;
VALUE            11821 eval.c         static VALUE
VALUE            11823 eval.c             VALUE klass, args;
VALUE            11843 eval.c         static VALUE
VALUE            11845 eval.c             VALUE thread;
VALUE            11878 eval.c         static VALUE
VALUE            11880 eval.c             VALUE thread;
VALUE            11906 eval.c         static VALUE
VALUE            11908 eval.c             VALUE thread;
VALUE            11929 eval.c         static VALUE
VALUE            11931 eval.c             VALUE thread;
VALUE            11995 eval.c         static VALUE
VALUE            12016 eval.c         static VALUE
VALUE            12018 eval.c             VALUE obj, val;
VALUE            12064 eval.c             VALUE cmd;
VALUE            12087 eval.c             VALUE args[2];
VALUE            12106 eval.c         static VALUE
VALUE            12109 eval.c             VALUE *argv;
VALUE            12113 eval.c             VALUE exc;
VALUE            12159 eval.c         static VALUE
VALUE            12162 eval.c             VALUE *argv;
VALUE            12163 eval.c             VALUE thread;
VALUE            12174 eval.c         VALUE
VALUE            12176 eval.c             VALUE thread;
VALUE            12180 eval.c             VALUE val;
VALUE            12215 eval.c         static VALUE
VALUE            12217 eval.c             VALUE thread, id;
VALUE            12222 eval.c         VALUE
VALUE            12224 eval.c             VALUE thread;
VALUE            12226 eval.c             VALUE val;
VALUE            12256 eval.c         static VALUE
VALUE            12258 eval.c             VALUE thread, id, val;
VALUE            12277 eval.c         static VALUE
VALUE            12279 eval.c             VALUE thread, id;
VALUE            12292 eval.c             VALUE value, ary;
VALUE            12313 eval.c         static VALUE
VALUE            12315 eval.c             VALUE thread;
VALUE            12318 eval.c             VALUE ary = rb_ary_new();
VALUE            12333 eval.c         static VALUE
VALUE            12335 eval.c             VALUE thread;
VALUE            12340 eval.c             VALUE str;
VALUE            12416 eval.c         static VALUE rb_cCont;
VALUE            12432 eval.c         static VALUE
VALUE            12434 eval.c             VALUE self;
VALUE            12436 eval.c             volatile VALUE cont;
VALUE            12481 eval.c         static VALUE
VALUE            12484 eval.c             VALUE *argv;
VALUE            12485 eval.c             VALUE cont;
VALUE            12513 eval.c             VALUE group;
VALUE            12529 eval.c         static VALUE thgroup_s_alloc _((VALUE));
VALUE            12530 eval.c         static VALUE
VALUE            12532 eval.c             VALUE klass;
VALUE            12534 eval.c             VALUE group;
VALUE            12555 eval.c         static VALUE
VALUE            12557 eval.c             VALUE group;
VALUE            12561 eval.c             VALUE ary;
VALUE            12595 eval.c         static VALUE
VALUE            12597 eval.c             VALUE group;
VALUE            12616 eval.c         static VALUE
VALUE            12618 eval.c             VALUE group;
VALUE            12654 eval.c         static VALUE
VALUE            12656 eval.c             VALUE group, thread;
VALUE            12704 eval.c             VALUE cThGroup;
VALUE            12810 eval.c         static VALUE
VALUE            12812 eval.c             VALUE dmy, tag;
VALUE            12815 eval.c             VALUE val = Qnil;		/* OK */
VALUE            12832 eval.c         static VALUE
VALUE            12834 eval.c             VALUE tag;
VALUE            12839 eval.c         VALUE
VALUE            12842 eval.c             VALUE (*func)();
VALUE            12843 eval.c             VALUE data;
VALUE            12845 eval.c             return rb_iterate((VALUE(*)_((VALUE)))catch_i, ID2SYM(rb_intern(tag)), func, data);
VALUE            12860 eval.c         static VALUE
VALUE            12863 eval.c             VALUE *argv;
VALUE            12865 eval.c             VALUE tag, value;
VALUE            12897 eval.c             VALUE val;
VALUE            12899 eval.c             VALUE argv[2];
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             243 ext/dbm/dbm.c      VALUE *argv;
VALUE             244 ext/dbm/dbm.c      VALUE obj;
VALUE             246 ext/dbm/dbm.c      VALUE new;
VALUE             257 ext/dbm/dbm.c  static VALUE
VALUE             260 ext/dbm/dbm.c      VALUE *argv;
VALUE             261 ext/dbm/dbm.c      VALUE obj;
VALUE             263 ext/dbm/dbm.c      VALUE new = rb_ary_new2(argc);
VALUE             276 ext/dbm/dbm.c              VALUE assoc, v;
VALUE             298 ext/dbm/dbm.c  static VALUE
VALUE             301 ext/dbm/dbm.c      VALUE *argv;
VALUE             302 ext/dbm/dbm.c      VALUE obj;
VALUE             304 ext/dbm/dbm.c      VALUE new = rb_ary_new2(argc);
VALUE             316 ext/dbm/dbm.c      VALUE obj;
VALUE             322 ext/dbm/dbm.c  static VALUE
VALUE             324 ext/dbm/dbm.c      VALUE obj, keystr;
VALUE             329 ext/dbm/dbm.c      VALUE valstr;
VALUE             356 ext/dbm/dbm.c  static VALUE
VALUE             358 ext/dbm/dbm.c      VALUE obj;
VALUE             363 ext/dbm/dbm.c      VALUE keystr, valstr;
VALUE             379 ext/dbm/dbm.c  static VALUE
VALUE             381 ext/dbm/dbm.c      VALUE obj;
VALUE             386 ext/dbm/dbm.c      VALUE keystr, valstr;
VALUE             387 ext/dbm/dbm.c      VALUE ret, ary = rb_ary_new();
VALUE             420 ext/dbm/dbm.c  static VALUE
VALUE             422 ext/dbm/dbm.c      VALUE obj;
VALUE             441 ext/dbm/dbm.c  static VALUE
VALUE             443 ext/dbm/dbm.c      VALUE obj;
VALUE             448 ext/dbm/dbm.c      VALUE keystr, valstr;
VALUE             449 ext/dbm/dbm.c      VALUE hash = rb_hash_new();
VALUE             461 ext/dbm/dbm.c  static VALUE each_pair _((VALUE));
VALUE             463 ext/dbm/dbm.c  static VALUE
VALUE             465 ext/dbm/dbm.c      VALUE obj;
VALUE             470 ext/dbm/dbm.c  static VALUE fdbm_store _((VALUE,VALUE,VALUE));
VALUE             472 ext/dbm/dbm.c  static VALUE
VALUE             474 ext/dbm/dbm.c      VALUE pair, dbm;
VALUE             484 ext/dbm/dbm.c  static VALUE
VALUE             486 ext/dbm/dbm.c      VALUE obj, other;
VALUE             492 ext/dbm/dbm.c  static VALUE
VALUE             494 ext/dbm/dbm.c      VALUE obj, other;
VALUE             501 ext/dbm/dbm.c  static VALUE
VALUE             503 ext/dbm/dbm.c      VALUE obj, keystr, valstr;
VALUE             532 ext/dbm/dbm.c  static VALUE
VALUE             534 ext/dbm/dbm.c      VALUE obj;
VALUE             552 ext/dbm/dbm.c  static VALUE
VALUE             554 ext/dbm/dbm.c      VALUE obj;
VALUE             576 ext/dbm/dbm.c  static VALUE
VALUE             578 ext/dbm/dbm.c      VALUE obj;
VALUE             593 ext/dbm/dbm.c  static VALUE
VALUE             595 ext/dbm/dbm.c      VALUE obj;
VALUE             609 ext/dbm/dbm.c  static VALUE
VALUE             611 ext/dbm/dbm.c      VALUE obj;
VALUE             616 ext/dbm/dbm.c      VALUE keystr, valstr;
VALUE             631 ext/dbm/dbm.c  static VALUE
VALUE             633 ext/dbm/dbm.c      VALUE obj;
VALUE             638 ext/dbm/dbm.c      VALUE ary;
VALUE             650 ext/dbm/dbm.c  static VALUE
VALUE             652 ext/dbm/dbm.c      VALUE obj;
VALUE             657 ext/dbm/dbm.c      VALUE ary;
VALUE             669 ext/dbm/dbm.c  static VALUE
VALUE             671 ext/dbm/dbm.c      VALUE obj, keystr;
VALUE             687 ext/dbm/dbm.c  static VALUE
VALUE             689 ext/dbm/dbm.c      VALUE obj, valstr;
VALUE             709 ext/dbm/dbm.c  static VALUE
VALUE             711 ext/dbm/dbm.c      VALUE obj;
VALUE             716 ext/dbm/dbm.c      VALUE ary;
VALUE             729 ext/dbm/dbm.c  static VALUE
VALUE             731 ext/dbm/dbm.c      VALUE obj;
VALUE             736 ext/dbm/dbm.c      VALUE hash;
VALUE             749 ext/dbm/dbm.c  static VALUE
VALUE             751 ext/dbm/dbm.c      VALUE obj;
VALUE              36 ext/digest/digest.c static VALUE mDigest, cDigest_Base;
VALUE              45 ext/digest/digest.c     VALUE klass;
VALUE              47 ext/digest/digest.c     VALUE obj;
VALUE              61 ext/digest/digest.c static VALUE rb_digest_base_alloc _((VALUE));
VALUE              62 ext/digest/digest.c static VALUE
VALUE              64 ext/digest/digest.c     VALUE klass;
VALUE              67 ext/digest/digest.c     VALUE obj;
VALUE              85 ext/digest/digest.c static VALUE
VALUE              87 ext/digest/digest.c     VALUE klass;
VALUE              88 ext/digest/digest.c     VALUE str;
VALUE              94 ext/digest/digest.c     volatile VALUE obj = rb_digest_base_alloc(klass);
VALUE             114 ext/digest/digest.c static VALUE
VALUE             116 ext/digest/digest.c     VALUE klass;
VALUE             117 ext/digest/digest.c     VALUE str;
VALUE             123 ext/digest/digest.c     volatile VALUE obj = rb_digest_base_alloc(klass);
VALUE             143 ext/digest/digest.c static VALUE
VALUE             145 ext/digest/digest.c     VALUE copy, obj;
VALUE             163 ext/digest/digest.c static VALUE
VALUE             165 ext/digest/digest.c     VALUE self, str;
VALUE             179 ext/digest/digest.c static VALUE
VALUE             182 ext/digest/digest.c     VALUE* argv;
VALUE             183 ext/digest/digest.c     VALUE self;
VALUE             185 ext/digest/digest.c     VALUE arg;
VALUE             194 ext/digest/digest.c static VALUE
VALUE             196 ext/digest/digest.c     VALUE self;
VALUE             202 ext/digest/digest.c     VALUE str;
VALUE             225 ext/digest/digest.c static VALUE
VALUE             227 ext/digest/digest.c     VALUE self;
VALUE             233 ext/digest/digest.c     VALUE str;
VALUE             256 ext/digest/digest.c static VALUE
VALUE             258 ext/digest/digest.c     VALUE self, other;
VALUE             261 ext/digest/digest.c     VALUE klass;
VALUE             262 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              10 ext/dl/dl.c    VALUE rb_mDL;
VALUE              11 ext/dl/dl.c    VALUE rb_eDLError;
VALUE              12 ext/dl/dl.c    VALUE rb_eDLTypeError;
VALUE              14 ext/dl/dl.c    static VALUE DLFuncTable;
VALUE              20 ext/dl/dl.c    			 int *argc, VALUE argv[])
VALUE              24 ext/dl/dl.c      VALUE val;
VALUE             228 ext/dl/dl.c    c_farray(VALUE v, long *size)
VALUE             232 ext/dl/dl.c      VALUE e;
VALUE             256 ext/dl/dl.c    c_darray(VALUE v, long *size)
VALUE             260 ext/dl/dl.c      VALUE e;
VALUE             284 ext/dl/dl.c    c_larray(VALUE v, long *size)
VALUE             288 ext/dl/dl.c      VALUE e;
VALUE             313 ext/dl/dl.c    c_iarray(VALUE v, long *size)
VALUE             317 ext/dl/dl.c      VALUE e;
VALUE             342 ext/dl/dl.c    c_harray(VALUE v, long *size)
VALUE             346 ext/dl/dl.c      VALUE e;
VALUE             371 ext/dl/dl.c    c_carray(VALUE v, long *size)
VALUE             375 ext/dl/dl.c      VALUE e;
VALUE             400 ext/dl/dl.c    c_parray(VALUE v, long *size)
VALUE             404 ext/dl/dl.c      VALUE e, tmp;
VALUE             456 ext/dl/dl.c    rb_ary2cary(char t, VALUE v, long *size)
VALUE             459 ext/dl/dl.c      VALUE val0;
VALUE             520 ext/dl/dl.c    VALUE
VALUE             521 ext/dl/dl.c    rb_str_to_ptr(VALUE self)
VALUE             533 ext/dl/dl.c    VALUE
VALUE             534 ext/dl/dl.c    rb_ary_to_ptr(int argc, VALUE argv[], VALUE self)
VALUE             537 ext/dl/dl.c      VALUE t;
VALUE             551 ext/dl/dl.c    VALUE
VALUE             552 ext/dl/dl.c    rb_io_to_ptr(VALUE self)
VALUE             563 ext/dl/dl.c    VALUE
VALUE             564 ext/dl/dl.c    rb_dl_dlopen(int argc, VALUE argv[], VALUE self)
VALUE             570 ext/dl/dl.c    VALUE
VALUE             571 ext/dl/dl.c    rb_dl_malloc(VALUE self, VALUE size)
VALUE             577 ext/dl/dl.c    VALUE
VALUE             578 ext/dl/dl.c    rb_dl_strdup(VALUE self, VALUE str)
VALUE             584 ext/dl/dl.c    static VALUE
VALUE             585 ext/dl/dl.c    rb_dl_sizeof(VALUE self, VALUE str)
VALUE             590 ext/dl/dl.c    static VALUE
VALUE             591 ext/dl/dl.c    rb_dl_callback(int argc, VALUE argv[], VALUE self)
VALUE             593 ext/dl/dl.c      VALUE type, proc;
VALUE             660 ext/dl/dl.c    static VALUE
VALUE             661 ext/dl/dl.c    rb_dl_remove_callback(VALUE mod, VALUE sym)
VALUE             195 ext/dl/dl.h    extern VALUE rb_mDL;
VALUE             196 ext/dl/dl.h    extern VALUE rb_mDLMemorySpace;
VALUE             197 ext/dl/dl.h    extern VALUE rb_cDLHandle;
VALUE             198 ext/dl/dl.h    extern VALUE rb_cDLSymbol;
VALUE             199 ext/dl/dl.h    extern VALUE rb_cDLPtrData;
VALUE             200 ext/dl/dl.h    extern VALUE rb_cDLStructData;
VALUE             202 ext/dl/dl.h    extern VALUE rb_eDLError;
VALUE             203 ext/dl/dl.h    extern VALUE rb_eDLTypeError;
VALUE             293 ext/dl/dl.h    void *rb_ary2cary(char t, VALUE ary, long *size);
VALUE             302 ext/dl/dl.h    void dlptr_init(VALUE val);
VALUE             304 ext/dl/dl.h    VALUE rb_dlptr_new(void *ptr, long size, freefunc_t func);
VALUE             305 ext/dl/dl.h    VALUE rb_dlptr_new2(VALUE klass, void *ptr, long size, freefunc_t func);
VALUE             306 ext/dl/dl.h    VALUE rb_dlptr_malloc(long size, freefunc_t func);
VALUE             307 ext/dl/dl.h    void *rb_dlptr2cptr(VALUE val);
VALUE             309 ext/dl/dl.h    VALUE rb_dlsym_new(void (*func)(), const char *name, const char *type);
VALUE             310 ext/dl/dl.h    freefunc_t rb_dlsym2csym(VALUE val);
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              92 ext/dl/handle.c VALUE
VALUE              93 ext/dl/handle.c rb_dlhandle_enable_close(VALUE self)
VALUE             102 ext/dl/handle.c VALUE
VALUE             103 ext/dl/handle.c rb_dlhandle_disable_close(VALUE self)
VALUE             112 ext/dl/handle.c VALUE
VALUE             113 ext/dl/handle.c rb_dlhandle_to_i(VALUE self)
VALUE             121 ext/dl/handle.c VALUE
VALUE             122 ext/dl/handle.c rb_dlhandle_to_ptr(VALUE self)
VALUE             130 ext/dl/handle.c VALUE
VALUE             131 ext/dl/handle.c rb_dlhandle_sym(int argc, VALUE argv[], VALUE self)
VALUE             133 ext/dl/handle.c   VALUE sym, type;
VALUE             135 ext/dl/handle.c   VALUE val;
VALUE              10 ext/dl/ptr.c   VALUE rb_cDLPtrData;
VALUE              11 ext/dl/ptr.c   VALUE rb_mDLMemorySpace;
VALUE              12 ext/dl/ptr.c   static VALUE DLMemoryTable;
VALUE              19 ext/dl/ptr.c   static VALUE
VALUE              20 ext/dl/ptr.c   rb_hash_delete(VALUE hash, VALUE key)
VALUE              34 ext/dl/ptr.c   rb_dlmem_aset(void *ptr, VALUE obj)
VALUE              44 ext/dl/ptr.c   static VALUE
VALUE              47 ext/dl/ptr.c     VALUE val;
VALUE              50 ext/dl/ptr.c     return val == Qnil ? Qnil : (VALUE)DLNUM2LONG(val);
VALUE              75 ext/dl/ptr.c   dlptr_init(VALUE val)
VALUE              88 ext/dl/ptr.c   VALUE
VALUE              89 ext/dl/ptr.c   rb_dlptr_new2(VALUE klass, void *ptr, long size, freefunc_t func)
VALUE              92 ext/dl/ptr.c     VALUE val;
VALUE             125 ext/dl/ptr.c   VALUE
VALUE             131 ext/dl/ptr.c   VALUE
VALUE             143 ext/dl/ptr.c   rb_dlptr2cptr(VALUE val)
VALUE             162 ext/dl/ptr.c   static VALUE
VALUE             163 ext/dl/ptr.c   rb_dlptr_s_allocate(VALUE klass)
VALUE             165 ext/dl/ptr.c     VALUE obj;
VALUE             183 ext/dl/ptr.c   static VALUE
VALUE             184 ext/dl/ptr.c   rb_dlptr_initialize(int argc, VALUE argv[], VALUE self)
VALUE             186 ext/dl/ptr.c     VALUE ptr, sym, size;
VALUE             223 ext/dl/ptr.c   static VALUE
VALUE             224 ext/dl/ptr.c   rb_dlptr_s_malloc(int argc, VALUE argv[], VALUE klass)
VALUE             226 ext/dl/ptr.c     VALUE size, sym, obj;
VALUE             247 ext/dl/ptr.c   VALUE
VALUE             248 ext/dl/ptr.c   rb_dlptr_to_i(VALUE self)
VALUE             256 ext/dl/ptr.c   VALUE
VALUE             257 ext/dl/ptr.c   rb_dlptr_ptr(VALUE self)
VALUE             265 ext/dl/ptr.c   VALUE
VALUE             266 ext/dl/ptr.c   rb_dlptr_ref(VALUE self)
VALUE             274 ext/dl/ptr.c   VALUE
VALUE             275 ext/dl/ptr.c   rb_dlptr_null_p(VALUE self)
VALUE             283 ext/dl/ptr.c   VALUE
VALUE             284 ext/dl/ptr.c   rb_dlptr_free_set(VALUE self, VALUE val)
VALUE             295 ext/dl/ptr.c   VALUE
VALUE             296 ext/dl/ptr.c   rb_dlptr_free_get(VALUE self)
VALUE             305 ext/dl/ptr.c   VALUE
VALUE             306 ext/dl/ptr.c   rb_dlptr_to_array(int argc, VALUE argv[], VALUE self)
VALUE             312 ext/dl/ptr.c     VALUE ary;
VALUE             313 ext/dl/ptr.c     VALUE type, size;
VALUE             416 ext/dl/ptr.c   VALUE
VALUE             417 ext/dl/ptr.c   rb_dlptr_to_s(int argc, VALUE argv[], VALUE self)
VALUE             420 ext/dl/ptr.c     VALUE arg1, val;
VALUE             439 ext/dl/ptr.c   VALUE
VALUE             440 ext/dl/ptr.c   rb_dlptr_to_str(int argc, VALUE argv[], VALUE self)
VALUE             443 ext/dl/ptr.c     VALUE arg1, val;
VALUE             462 ext/dl/ptr.c   VALUE
VALUE             463 ext/dl/ptr.c   rb_dlptr_inspect(VALUE self)
VALUE             474 ext/dl/ptr.c   VALUE
VALUE             475 ext/dl/ptr.c   rb_dlptr_eql(VALUE self, VALUE other)
VALUE             484 ext/dl/ptr.c   VALUE
VALUE             485 ext/dl/ptr.c   rb_dlptr_cmp(VALUE self, VALUE other)
VALUE             493 ext/dl/ptr.c   VALUE
VALUE             494 ext/dl/ptr.c   rb_dlptr_plus(VALUE self, VALUE other)
VALUE             505 ext/dl/ptr.c   VALUE
VALUE             506 ext/dl/ptr.c   rb_dlptr_minus(VALUE self, VALUE other)
VALUE             517 ext/dl/ptr.c   VALUE
VALUE             518 ext/dl/ptr.c   rb_dlptr_define_data_type(int argc, VALUE argv[], VALUE self)
VALUE             520 ext/dl/ptr.c     VALUE data_type, type, rest, vid;
VALUE             596 ext/dl/ptr.c   VALUE
VALUE             597 ext/dl/ptr.c   rb_dlptr_define_struct(int argc, VALUE argv[], VALUE self)
VALUE             599 ext/dl/ptr.c     VALUE *pass_argv;
VALUE             603 ext/dl/ptr.c     pass_argv = ALLOCA_N(VALUE, pass_argc);
VALUE             611 ext/dl/ptr.c   VALUE
VALUE             612 ext/dl/ptr.c   rb_dlptr_define_union(int argc, VALUE argv[], VALUE self)
VALUE             614 ext/dl/ptr.c     VALUE *pass_argv;
VALUE             618 ext/dl/ptr.c     pass_argv = ALLOCA_N(VALUE, pass_argc);
VALUE             626 ext/dl/ptr.c   VALUE
VALUE             627 ext/dl/ptr.c   rb_dlptr_get_data_type(VALUE self)
VALUE             639 ext/dl/ptr.c   static VALUE
VALUE             642 ext/dl/ptr.c     VALUE ary;
VALUE             643 ext/dl/ptr.c     VALUE elem;
VALUE             727 ext/dl/ptr.c   VALUE
VALUE             728 ext/dl/ptr.c   rb_dlptr_aref(int argc, VALUE argv[], VALUE self)
VALUE             730 ext/dl/ptr.c     VALUE key = Qnil, num = Qnil;
VALUE             741 ext/dl/ptr.c       VALUE pass[1];
VALUE             828 ext/dl/ptr.c   ary2cary(char t, VALUE val, long *size)
VALUE             841 ext/dl/ptr.c   VALUE
VALUE             842 ext/dl/ptr.c   rb_dlptr_aset(int argc, VALUE argv[], VALUE self)
VALUE             844 ext/dl/ptr.c     VALUE key = Qnil, num = Qnil, val = Qnil;
VALUE             996 ext/dl/ptr.c   VALUE
VALUE             997 ext/dl/ptr.c   rb_dlptr_size(int argc, VALUE argv[], VALUE self)
VALUE             999 ext/dl/ptr.c     VALUE size;
VALUE            1010 ext/dl/ptr.c   static VALUE
VALUE            1011 ext/dl/ptr.c   dlmem_each_i(VALUE assoc, void *data)
VALUE            1013 ext/dl/ptr.c     VALUE key, val;
VALUE            1016 ext/dl/ptr.c     rb_yield(rb_assoc_new(key,(VALUE)DLNUM2LONG(val)));
VALUE            1020 ext/dl/ptr.c   VALUE
VALUE            1021 ext/dl/ptr.c   rb_dlmem_each(VALUE self)
VALUE               9 ext/dl/sym.c   VALUE rb_cDLSymbol;
VALUE              74 ext/dl/sym.c   VALUE
VALUE              77 ext/dl/sym.c     VALUE val;
VALUE             112 ext/dl/sym.c   rb_dlsym2csym(VALUE val)
VALUE             131 ext/dl/sym.c   VALUE
VALUE             132 ext/dl/sym.c   rb_dlsym_s_allocate(VALUE klass)
VALUE             134 ext/dl/sym.c     VALUE obj;
VALUE             146 ext/dl/sym.c   VALUE
VALUE             147 ext/dl/sym.c   rb_dlsym_initialize(int argc, VALUE argv[], VALUE self)
VALUE             149 ext/dl/sym.c     VALUE addr, name, type;
VALUE             174 ext/dl/sym.c   VALUE
VALUE             175 ext/dl/sym.c   rb_s_dlsym_char2type(VALUE self, VALUE ch)
VALUE             187 ext/dl/sym.c   VALUE
VALUE             188 ext/dl/sym.c   rb_dlsym_name(VALUE self)
VALUE             196 ext/dl/sym.c   VALUE
VALUE             197 ext/dl/sym.c   rb_dlsym_proto(VALUE self)
VALUE             205 ext/dl/sym.c   VALUE
VALUE             206 ext/dl/sym.c   rb_dlsym_cproto(VALUE self)
VALUE             211 ext/dl/sym.c     VALUE val;
VALUE             256 ext/dl/sym.c   VALUE
VALUE             257 ext/dl/sym.c   rb_dlsym_inspect(VALUE self)
VALUE             259 ext/dl/sym.c     VALUE proto;
VALUE             260 ext/dl/sym.c     VALUE val;
VALUE             323 ext/dl/sym.c   static VALUE
VALUE             324 ext/dl/sym.c   rb_dl_get_last_error(VALUE self)
VALUE             329 ext/dl/sym.c   static VALUE
VALUE             330 ext/dl/sym.c   rb_dl_set_last_error(VALUE self, VALUE val)
VALUE             341 ext/dl/sym.c   static VALUE
VALUE             342 ext/dl/sym.c   rb_dl_win32_get_last_error(VALUE self)
VALUE             347 ext/dl/sym.c   static VALUE
VALUE             348 ext/dl/sym.c   rb_dl_win32_set_last_error(VALUE self, VALUE val)
VALUE             440 ext/dl/sym.c   VALUE
VALUE             441 ext/dl/sym.c   rb_dlsym_call(int argc, VALUE argv[], VALUE self)
VALUE             448 ext/dl/sym.c     VALUE val;
VALUE             449 ext/dl/sym.c     VALUE dvals;
VALUE             480 ext/dl/sym.c   	VALUE pval;
VALUE             581 ext/dl/sym.c   	VALUE str = argv[i];
VALUE             589 ext/dl/sym.c   	VALUE str = argv[i];
VALUE             949 ext/dl/sym.c   VALUE
VALUE             950 ext/dl/sym.c   rb_dlsym_to_i(VALUE self)
VALUE             958 ext/dl/sym.c   VALUE
VALUE             959 ext/dl/sym.c   rb_dlsym_to_ptr(VALUE self)
VALUE              24 ext/enumerator/enumerator.c static VALUE rb_cEnumerator;
VALUE              46 ext/enumerator/enumerator.c static VALUE
VALUE              48 ext/enumerator/enumerator.c     VALUE obj, enum_args;
VALUE              62 ext/enumerator/enumerator.c static VALUE
VALUE              64 ext/enumerator/enumerator.c     VALUE obj;
VALUE              69 ext/enumerator/enumerator.c static VALUE
VALUE              71 ext/enumerator/enumerator.c     VALUE val;
VALUE              74 ext/enumerator/enumerator.c     VALUE ary = memo->u1.value;
VALUE             102 ext/enumerator/enumerator.c static VALUE
VALUE             104 ext/enumerator/enumerator.c     VALUE obj, n;
VALUE             108 ext/enumerator/enumerator.c     VALUE ary;
VALUE             114 ext/enumerator/enumerator.c     rb_iterate(rb_each, obj, each_slice_i, (VALUE)memo);
VALUE             129 ext/enumerator/enumerator.c static VALUE
VALUE             131 ext/enumerator/enumerator.c     VALUE obj, n;
VALUE             136 ext/enumerator/enumerator.c static VALUE
VALUE             138 ext/enumerator/enumerator.c     VALUE val;
VALUE             141 ext/enumerator/enumerator.c     VALUE ary = memo->u1.value;
VALUE             174 ext/enumerator/enumerator.c static VALUE
VALUE             176 ext/enumerator/enumerator.c     VALUE obj, n;
VALUE             184 ext/enumerator/enumerator.c     rb_iterate(rb_each, obj, each_cons_i, (VALUE)memo);
VALUE             196 ext/enumerator/enumerator.c static VALUE
VALUE             198 ext/enumerator/enumerator.c     VALUE obj, n;
VALUE             218 ext/enumerator/enumerator.c static VALUE
VALUE             221 ext/enumerator/enumerator.c     VALUE *argv;
VALUE             222 ext/enumerator/enumerator.c     VALUE obj;
VALUE             224 ext/enumerator/enumerator.c     VALUE enum_obj, enum_method, enum_args;
VALUE             238 ext/enumerator/enumerator.c static VALUE
VALUE             253 ext/enumerator/enumerator.c static VALUE
VALUE             255 ext/enumerator/enumerator.c     VALUE obj;
VALUE             257 ext/enumerator/enumerator.c     VALUE val;
VALUE             259 ext/enumerator/enumerator.c     obj = (VALUE)rb_node_newnode(NODE_MEMO,
VALUE             263 ext/enumerator/enumerator.c     val = rb_iterate((VALUE (*)_((VALUE)))enumerator_iter, obj, rb_yield, 0);
VALUE             270 ext/enumerator/enumerator.c     VALUE rb_mEnumerable;
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             339 ext/gdbm/gdbm.c     VALUE *argv;
VALUE             340 ext/gdbm/gdbm.c     VALUE obj;
VALUE             342 ext/gdbm/gdbm.c     VALUE new;
VALUE             353 ext/gdbm/gdbm.c static VALUE
VALUE             356 ext/gdbm/gdbm.c     VALUE *argv;
VALUE             357 ext/gdbm/gdbm.c     VALUE obj;
VALUE             359 ext/gdbm/gdbm.c     VALUE new = rb_ary_new2(argc);
VALUE             365 ext/gdbm/gdbm.c         VALUE keystr;
VALUE             373 ext/gdbm/gdbm.c             VALUE assoc = rb_assoc_new(keystr, rb_gdbm_fetch2(dbm, keystr));
VALUE             374 ext/gdbm/gdbm.c 	    VALUE v = rb_yield(assoc);
VALUE             393 ext/gdbm/gdbm.c static VALUE
VALUE             396 ext/gdbm/gdbm.c     VALUE *argv;
VALUE             397 ext/gdbm/gdbm.c     VALUE obj;
VALUE             399 ext/gdbm/gdbm.c     VALUE new = rb_ary_new2(argc);
VALUE             411 ext/gdbm/gdbm.c     VALUE obj;
VALUE             417 ext/gdbm/gdbm.c static VALUE
VALUE             419 ext/gdbm/gdbm.c     VALUE obj, keystr;
VALUE             445 ext/gdbm/gdbm.c static VALUE
VALUE             447 ext/gdbm/gdbm.c     VALUE obj, keystr;
VALUE             449 ext/gdbm/gdbm.c     VALUE valstr;
VALUE             456 ext/gdbm/gdbm.c static VALUE
VALUE             458 ext/gdbm/gdbm.c     VALUE obj;
VALUE             462 ext/gdbm/gdbm.c     VALUE keystr, valstr;
VALUE             474 ext/gdbm/gdbm.c static VALUE
VALUE             476 ext/gdbm/gdbm.c     VALUE obj;
VALUE             480 ext/gdbm/gdbm.c     VALUE keystr, valstr;
VALUE             481 ext/gdbm/gdbm.c     VALUE ret, ary = rb_ary_new();
VALUE             507 ext/gdbm/gdbm.c static VALUE
VALUE             509 ext/gdbm/gdbm.c     VALUE obj;
VALUE             545 ext/gdbm/gdbm.c static VALUE
VALUE             547 ext/gdbm/gdbm.c     VALUE obj;
VALUE             551 ext/gdbm/gdbm.c     VALUE keystr, valstr;
VALUE             552 ext/gdbm/gdbm.c     VALUE hash = rb_hash_new();
VALUE             564 ext/gdbm/gdbm.c static VALUE each_pair _((VALUE));
VALUE             566 ext/gdbm/gdbm.c static VALUE
VALUE             568 ext/gdbm/gdbm.c     VALUE obj;
VALUE             573 ext/gdbm/gdbm.c static VALUE fgdbm_store _((VALUE,VALUE,VALUE));
VALUE             575 ext/gdbm/gdbm.c static VALUE
VALUE             577 ext/gdbm/gdbm.c     VALUE pair, dbm;
VALUE             587 ext/gdbm/gdbm.c static VALUE
VALUE             589 ext/gdbm/gdbm.c     VALUE obj, other;
VALUE             595 ext/gdbm/gdbm.c static VALUE
VALUE             597 ext/gdbm/gdbm.c     VALUE obj, other;
VALUE             604 ext/gdbm/gdbm.c static VALUE
VALUE             606 ext/gdbm/gdbm.c     VALUE obj, keystr, valstr;
VALUE             632 ext/gdbm/gdbm.c static VALUE
VALUE             634 ext/gdbm/gdbm.c     VALUE obj;
VALUE             654 ext/gdbm/gdbm.c static VALUE
VALUE             656 ext/gdbm/gdbm.c     VALUE obj;
VALUE             678 ext/gdbm/gdbm.c static VALUE
VALUE             680 ext/gdbm/gdbm.c     VALUE obj;
VALUE             684 ext/gdbm/gdbm.c     VALUE keystr;
VALUE             696 ext/gdbm/gdbm.c static VALUE
VALUE             698 ext/gdbm/gdbm.c     VALUE obj;
VALUE             702 ext/gdbm/gdbm.c     VALUE keystr;
VALUE             714 ext/gdbm/gdbm.c static VALUE
VALUE             716 ext/gdbm/gdbm.c     VALUE obj;
VALUE             720 ext/gdbm/gdbm.c     VALUE keystr;
VALUE             733 ext/gdbm/gdbm.c static VALUE
VALUE             735 ext/gdbm/gdbm.c     VALUE obj;
VALUE             739 ext/gdbm/gdbm.c     VALUE keystr, ary;
VALUE             752 ext/gdbm/gdbm.c static VALUE
VALUE             754 ext/gdbm/gdbm.c     VALUE obj;
VALUE             759 ext/gdbm/gdbm.c     VALUE valstr, ary;
VALUE             773 ext/gdbm/gdbm.c static VALUE
VALUE             775 ext/gdbm/gdbm.c     VALUE obj, keystr;
VALUE             791 ext/gdbm/gdbm.c static VALUE
VALUE             793 ext/gdbm/gdbm.c     VALUE obj, valstr;
VALUE             797 ext/gdbm/gdbm.c     VALUE keystr, valstr2;
VALUE             816 ext/gdbm/gdbm.c static VALUE
VALUE             818 ext/gdbm/gdbm.c     VALUE obj;
VALUE             822 ext/gdbm/gdbm.c     VALUE keystr, ary;
VALUE             835 ext/gdbm/gdbm.c static VALUE
VALUE             837 ext/gdbm/gdbm.c     VALUE obj;
VALUE             848 ext/gdbm/gdbm.c static VALUE
VALUE             850 ext/gdbm/gdbm.c     VALUE obj;
VALUE             861 ext/gdbm/gdbm.c static VALUE
VALUE             863 ext/gdbm/gdbm.c     VALUE obj, val;
VALUE             877 ext/gdbm/gdbm.c static VALUE
VALUE             879 ext/gdbm/gdbm.c     VALUE obj, val;
VALUE             896 ext/gdbm/gdbm.c static VALUE
VALUE             898 ext/gdbm/gdbm.c     VALUE obj, val;
VALUE             920 ext/gdbm/gdbm.c static VALUE
VALUE             922 ext/gdbm/gdbm.c     VALUE obj;
VALUE             926 ext/gdbm/gdbm.c     VALUE keystr, hash;
VALUE             939 ext/gdbm/gdbm.c static VALUE
VALUE             941 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              86 ext/iconv/iconv.c static VALUE rb_eIconvInvalidEncoding;
VALUE              87 ext/iconv/iconv.c static VALUE rb_eIconvFailure;
VALUE              88 ext/iconv/iconv.c static VALUE rb_eIconvIllegalSeq;
VALUE              89 ext/iconv/iconv.c static VALUE rb_eIconvInvalidChar;
VALUE              90 ext/iconv/iconv.c static VALUE rb_eIconvOutOfRange;
VALUE              91 ext/iconv/iconv.c static VALUE rb_eIconvBrokenLibrary;
VALUE              94 ext/iconv/iconv.c static VALUE iconv_fail _((VALUE error, VALUE success, VALUE failed, struct iconv_env_t* env, const char *mesg));
VALUE              95 ext/iconv/iconv.c static VALUE iconv_failure_initialize _((VALUE error, VALUE mesg, VALUE success, VALUE failed));
VALUE              96 ext/iconv/iconv.c static VALUE iconv_failure_success _((VALUE self));
VALUE              97 ext/iconv/iconv.c static VALUE iconv_failure_failed _((VALUE self));
VALUE              99 ext/iconv/iconv.c static iconv_t iconv_create _((VALUE to, VALUE from));
VALUE             101 ext/iconv/iconv.c static VALUE iconv_free _((VALUE cd));
VALUE             102 ext/iconv/iconv.c static VALUE iconv_try _((iconv_t cd, const char **inptr, size_t *inlen, char **outptr, size_t *outlen));
VALUE             103 ext/iconv/iconv.c static VALUE rb_str_derive _((VALUE str, const char* ptr, int len));
VALUE             104 ext/iconv/iconv.c static VALUE iconv_convert _((iconv_t cd, VALUE str, int start, int length, struct iconv_env_t* env));
VALUE             105 ext/iconv/iconv.c static VALUE iconv_s_allocate _((VALUE klass));
VALUE             106 ext/iconv/iconv.c static VALUE iconv_initialize _((VALUE self, VALUE to, VALUE from));
VALUE             107 ext/iconv/iconv.c static VALUE iconv_s_open _((VALUE self, VALUE to, VALUE from));
VALUE             108 ext/iconv/iconv.c static VALUE iconv_s_convert _((struct iconv_env_t* env));
VALUE             109 ext/iconv/iconv.c static VALUE iconv_s_iconv _((int argc, VALUE *argv, VALUE self));
VALUE             110 ext/iconv/iconv.c static VALUE iconv_init_state _((VALUE cd));
VALUE             111 ext/iconv/iconv.c static VALUE iconv_finish _((VALUE self));
VALUE             112 ext/iconv/iconv.c static VALUE iconv_iconv _((int argc, VALUE *argv, VALUE self));
VALUE             114 ext/iconv/iconv.c static VALUE charset_map;
VALUE             122 ext/iconv/iconv.c static VALUE charset_map_get _((void))
VALUE             130 ext/iconv/iconv.c     (VALUE *code)
VALUE             133 ext/iconv/iconv.c     VALUE *code;
VALUE             136 ext/iconv/iconv.c     VALUE val = *code;
VALUE             139 ext/iconv/iconv.c 	VALUE key = rb_funcall2(val, rb_intern("downcase"), 0, 0);
VALUE             151 ext/iconv/iconv.c     (VALUE to, VALUE from)
VALUE             154 ext/iconv/iconv.c     VALUE to;
VALUE             155 ext/iconv/iconv.c     VALUE from;
VALUE             174 ext/iconv/iconv.c 	    volatile VALUE msg = rb_str_new(0, strlen(s) + RSTRING(to)->len +
VALUE             204 ext/iconv/iconv.c static VALUE
VALUE             207 ext/iconv/iconv.c     (VALUE cd)
VALUE             210 ext/iconv/iconv.c     VALUE cd;
VALUE             218 ext/iconv/iconv.c static VALUE
VALUE             221 ext/iconv/iconv.c     (VALUE obj)
VALUE             224 ext/iconv/iconv.c     VALUE obj;
VALUE             231 ext/iconv/iconv.c     return (VALUE)DATA_PTR(obj);
VALUE             234 ext/iconv/iconv.c static VALUE
VALUE             285 ext/iconv/iconv.c static VALUE iconv_failure_initialize
VALUE             287 ext/iconv/iconv.c     (VALUE error, VALUE mesg, VALUE success, VALUE failed)
VALUE             290 ext/iconv/iconv.c     VALUE error, mesg, success, failed;
VALUE             299 ext/iconv/iconv.c static VALUE
VALUE             302 ext/iconv/iconv.c     (VALUE error, VALUE success, VALUE failed, struct iconv_env_t* env, const char *mesg)
VALUE             305 ext/iconv/iconv.c     VALUE error, success, failed;
VALUE             310 ext/iconv/iconv.c     VALUE args[3];
VALUE             337 ext/iconv/iconv.c static VALUE
VALUE             340 ext/iconv/iconv.c     (VALUE str, const char* ptr, int len)
VALUE             343 ext/iconv/iconv.c     VALUE str;
VALUE             348 ext/iconv/iconv.c     VALUE ret;
VALUE             362 ext/iconv/iconv.c static VALUE
VALUE             365 ext/iconv/iconv.c     (iconv_t cd, VALUE str, int start, int length, struct iconv_env_t* env)
VALUE             369 ext/iconv/iconv.c     VALUE str;
VALUE             375 ext/iconv/iconv.c     VALUE ret = Qfalse;
VALUE             376 ext/iconv/iconv.c     VALUE error = Qfalse;
VALUE             377 ext/iconv/iconv.c     VALUE rescue;
VALUE             506 ext/iconv/iconv.c static VALUE
VALUE             509 ext/iconv/iconv.c     (VALUE klass)
VALUE             512 ext/iconv/iconv.c     VALUE klass;
VALUE             536 ext/iconv/iconv.c static VALUE
VALUE             539 ext/iconv/iconv.c     (VALUE self, VALUE to, VALUE from)
VALUE             542 ext/iconv/iconv.c     VALUE self;
VALUE             543 ext/iconv/iconv.c     VALUE to;
VALUE             544 ext/iconv/iconv.c     VALUE from;
VALUE             561 ext/iconv/iconv.c static VALUE
VALUE             564 ext/iconv/iconv.c     (VALUE self, VALUE to, VALUE from)
VALUE             567 ext/iconv/iconv.c     VALUE self;
VALUE             568 ext/iconv/iconv.c     VALUE to;
VALUE             569 ext/iconv/iconv.c     VALUE from;
VALUE             572 ext/iconv/iconv.c     VALUE cd = ICONV2VALUE(iconv_create(to, from));
VALUE             576 ext/iconv/iconv.c 	return rb_ensure(rb_yield, self, (VALUE(*)())iconv_finish, self);
VALUE             583 ext/iconv/iconv.c static VALUE
VALUE             592 ext/iconv/iconv.c     VALUE last = 0;
VALUE             595 ext/iconv/iconv.c 	VALUE s = iconv_convert(env->cd, last = *(env->argv), 0, -1, env);
VALUE             600 ext/iconv/iconv.c 	VALUE s = iconv_convert(env->cd, Qnil, 0, 0, env);
VALUE             626 ext/iconv/iconv.c static VALUE
VALUE             629 ext/iconv/iconv.c     (int argc, VALUE *argv, VALUE self)
VALUE             633 ext/iconv/iconv.c     VALUE *argv;
VALUE             634 ext/iconv/iconv.c     VALUE self;
VALUE             647 ext/iconv/iconv.c     return rb_ensure(iconv_s_convert, (VALUE)&arg, iconv_free, ICONV2VALUE(arg.cd));
VALUE             658 ext/iconv/iconv.c static VALUE
VALUE             661 ext/iconv/iconv.c     (VALUE self, VALUE to, VALUE from, VALUE str)
VALUE             664 ext/iconv/iconv.c     VALUE self, to, from, str;
VALUE             674 ext/iconv/iconv.c     return rb_ensure(iconv_s_convert, (VALUE)&arg, iconv_free, ICONV2VALUE(arg.cd));
VALUE             688 ext/iconv/iconv.c static VALUE
VALUE             691 ext/iconv/iconv.c     (VALUE cd)
VALUE             694 ext/iconv/iconv.c     VALUE cd;
VALUE             700 ext/iconv/iconv.c static VALUE
VALUE             703 ext/iconv/iconv.c     (VALUE self)
VALUE             706 ext/iconv/iconv.c     VALUE self;
VALUE             709 ext/iconv/iconv.c     VALUE cd = check_iconv(self);
VALUE             744 ext/iconv/iconv.c static VALUE
VALUE             747 ext/iconv/iconv.c     (int argc, VALUE *argv, VALUE self)
VALUE             751 ext/iconv/iconv.c     VALUE *argv;
VALUE             752 ext/iconv/iconv.c     VALUE self;
VALUE             755 ext/iconv/iconv.c     VALUE str, n1, n2;
VALUE             756 ext/iconv/iconv.c     VALUE cd = check_iconv(self);
VALUE             782 ext/iconv/iconv.c static VALUE
VALUE             785 ext/iconv/iconv.c (VALUE self)
VALUE             788 ext/iconv/iconv.c     VALUE self;
VALUE             801 ext/iconv/iconv.c static VALUE
VALUE             804 ext/iconv/iconv.c (VALUE self)
VALUE             807 ext/iconv/iconv.c     VALUE self;
VALUE             819 ext/iconv/iconv.c static VALUE
VALUE             822 ext/iconv/iconv.c     (VALUE self)
VALUE             825 ext/iconv/iconv.c     VALUE self;
VALUE             829 ext/iconv/iconv.c     VALUE success = rb_attr_get(self, rb_success);
VALUE             830 ext/iconv/iconv.c     VALUE failed = rb_attr_get(self, rb_failed);
VALUE             831 ext/iconv/iconv.c     VALUE str = rb_str_buf_cat2(rb_str_new2("#<"), cname);
VALUE             876 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              81 ext/io/wait/wait.c static VALUE
VALUE              84 ext/io/wait/wait.c     VALUE *argv;
VALUE              85 ext/io/wait/wait.c     VALUE io;
VALUE              92 ext/io/wait/wait.c     VALUE timeout;
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              72 ext/openssl/ossl.h extern VALUE mOSSL;
VALUE              77 ext/openssl/ossl.h extern VALUE eOSSLError;
VALUE             110 ext/openssl/ossl.h STACK_OF(X509) *ossl_x509_ary2sk0(VALUE);
VALUE             111 ext/openssl/ossl.h STACK_OF(X509) *ossl_x509_ary2sk(VALUE);
VALUE             112 ext/openssl/ossl.h STACK_OF(X509) *ossl_protect_x509_ary2sk(VALUE,int*);
VALUE             113 ext/openssl/ossl.h VALUE ossl_x509_sk2ary(STACK_OF(X509) *certs);
VALUE             114 ext/openssl/ossl.h VALUE ossl_x509crl_sk2ary(STACK_OF(X509_CRL) *crl);
VALUE             115 ext/openssl/ossl.h VALUE ossl_buf2str(char *buf, int len);
VALUE             134 ext/openssl/ossl.h NORETURN(void ossl_raise(VALUE, const char *, ...));
VALUE             142 ext/openssl/ossl.h     VALUE proc;
VALUE             143 ext/openssl/ossl.h     VALUE preverify_ok;
VALUE             144 ext/openssl/ossl.h     VALUE store_ctx;
VALUE             147 ext/openssl/ossl.h VALUE ossl_call_verify_cb_proc(struct ossl_verify_cb_args *);
VALUE             154 ext/openssl/ossl.h VALUE ossl_to_der(VALUE);
VALUE             155 ext/openssl/ossl.h VALUE ossl_to_der_if_possible(VALUE);
VALUE             160 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              37 ext/openssl/ossl_bio.c ossl_protect_obj2bio(VALUE obj, int *status)
VALUE              40 ext/openssl/ossl_bio.c      ret = (BIO*)rb_protect((VALUE(*)_((VALUE)))ossl_obj2bio, obj, status);
VALUE              44 ext/openssl/ossl_bio.c VALUE
VALUE              47 ext/openssl/ossl_bio.c     VALUE ret;
VALUE              56 ext/openssl/ossl_bio.c VALUE
VALUE              59 ext/openssl/ossl_bio.c     return rb_protect((VALUE(*)_((VALUE)))ossl_membio2str0, (VALUE)bio, status);
VALUE              62 ext/openssl/ossl_bio.c VALUE
VALUE              65 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_update_deprecated(VALUE self, VALUE data)
VALUE             250 ext/openssl/ossl_cipher.c static VALUE
VALUE             251 ext/openssl/ossl_cipher.c ossl_cipher_final(VALUE self)
VALUE             255 ext/openssl/ossl_cipher.c     VALUE str;
VALUE             268 ext/openssl/ossl_cipher.c static VALUE
VALUE             269 ext/openssl/ossl_cipher.c ossl_cipher_name(VALUE self)
VALUE             278 ext/openssl/ossl_cipher.c static VALUE
VALUE             279 ext/openssl/ossl_cipher.c ossl_cipher_set_key(VALUE self, VALUE key)
VALUE             295 ext/openssl/ossl_cipher.c static VALUE
VALUE             296 ext/openssl/ossl_cipher.c ossl_cipher_set_iv(VALUE self, VALUE iv)
VALUE             312 ext/openssl/ossl_cipher.c static VALUE
VALUE             313 ext/openssl/ossl_cipher.c ossl_cipher_set_key_length(VALUE self, VALUE key_length)
VALUE             325 ext/openssl/ossl_cipher.c static VALUE
VALUE             326 ext/openssl/ossl_cipher.c ossl_cipher_set_padding(VALUE self, VALUE padding)
VALUE             342 ext/openssl/ossl_cipher.c     static VALUE						\
VALUE             343 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             129 ext/openssl/ossl_ssl.c static VALUE
VALUE             130 ext/openssl/ossl_ssl.c ossl_sslctx_s_alloc(VALUE klass)
VALUE             143 ext/openssl/ossl_ssl.c static VALUE
VALUE             144 ext/openssl/ossl_ssl.c ossl_sslctx_initialize(int argc, VALUE *argv, VALUE self)
VALUE             146 ext/openssl/ossl_ssl.c     VALUE ssl_method;
VALUE             181 ext/openssl/ossl_ssl.c static VALUE
VALUE             182 ext/openssl/ossl_ssl.c ossl_call_client_cert_cb(VALUE obj)
VALUE             184 ext/openssl/ossl_ssl.c     VALUE cb, ary, cert, key;
VALUE             188 ext/openssl/ossl_ssl.c     cb = (VALUE)SSL_get_ex_data(ssl, ossl_ssl_ex_client_cert_cb_idx);
VALUE             203 ext/openssl/ossl_ssl.c     VALUE obj;
VALUE             206 ext/openssl/ossl_ssl.c     obj = (VALUE)SSL_get_ex_data(ssl, ossl_ssl_ex_ptr_idx);
VALUE             207 ext/openssl/ossl_ssl.c     success = rb_protect((VALUE(*)_((VALUE)))ossl_call_client_cert_cb,
VALUE             217 ext/openssl/ossl_ssl.c static VALUE
VALUE             218 ext/openssl/ossl_ssl.c ossl_call_tmp_dh_callback(VALUE *args)
VALUE             221 ext/openssl/ossl_ssl.c     VALUE cb, dh;
VALUE             225 ext/openssl/ossl_ssl.c     cb = (VALUE)SSL_get_ex_data(ssl, ossl_ssl_ex_tmp_dh_callback_idx);
VALUE             238 ext/openssl/ossl_ssl.c     VALUE args[3];
VALUE             241 ext/openssl/ossl_ssl.c     args[0] = (VALUE)SSL_get_ex_data(ssl, ossl_ssl_ex_ptr_idx);
VALUE             244 ext/openssl/ossl_ssl.c     success = rb_protect((VALUE(*)_((VALUE)))ossl_call_tmp_dh_callback,
VALUE             245 ext/openssl/ossl_ssl.c                          (VALUE)args, &status);
VALUE             267 ext/openssl/ossl_ssl.c     VALUE cb;
VALUE             271 ext/openssl/ossl_ssl.c     cb = (VALUE)SSL_get_ex_data(ssl, ossl_ssl_ex_vcb_idx);
VALUE             276 ext/openssl/ossl_ssl.c static VALUE
VALUE             277 ext/openssl/ossl_ssl.c ossl_sslctx_add_extra_chain_cert_i(VALUE i, VALUE arg)
VALUE             291 ext/openssl/ossl_ssl.c static VALUE
VALUE             292 ext/openssl/ossl_ssl.c ossl_sslctx_setup(VALUE self)
VALUE             300 ext/openssl/ossl_ssl.c     VALUE val;
VALUE             409 ext/openssl/ossl_ssl.c static VALUE
VALUE             412 ext/openssl/ossl_ssl.c     VALUE ary;
VALUE             425 ext/openssl/ossl_ssl.c static VALUE
VALUE             426 ext/openssl/ossl_ssl.c ossl_sslctx_get_ciphers(VALUE self)
VALUE             431 ext/openssl/ossl_ssl.c     VALUE ary;
VALUE             453 ext/openssl/ossl_ssl.c static VALUE
VALUE             454 ext/openssl/ossl_ssl.c ossl_sslctx_set_ciphers(VALUE self, VALUE v)
VALUE             457 ext/openssl/ossl_ssl.c     VALUE str, elem;
VALUE             508 ext/openssl/ossl_ssl.c static VALUE
VALUE             509 ext/openssl/ossl_ssl.c ossl_ssl_s_alloc(VALUE klass)
VALUE             514 ext/openssl/ossl_ssl.c static VALUE
VALUE             515 ext/openssl/ossl_ssl.c ossl_ssl_initialize(int argc, VALUE *argv, VALUE self)
VALUE             517 ext/openssl/ossl_ssl.c     VALUE io, ctx;
VALUE             533 ext/openssl/ossl_ssl.c static VALUE
VALUE             534 ext/openssl/ossl_ssl.c ossl_ssl_setup(VALUE self)
VALUE             536 ext/openssl/ossl_ssl.c     VALUE io, v_ctx, cb;
VALUE             576 ext/openssl/ossl_ssl.c static VALUE
VALUE             577 ext/openssl/ossl_ssl.c ossl_start_ssl(VALUE self, int (*func)())
VALUE             604 ext/openssl/ossl_ssl.c static VALUE
VALUE             605 ext/openssl/ossl_ssl.c ossl_ssl_connect(VALUE self)
VALUE             611 ext/openssl/ossl_ssl.c static VALUE
VALUE             612 ext/openssl/ossl_ssl.c ossl_ssl_accept(VALUE self)
VALUE             618 ext/openssl/ossl_ssl.c static VALUE
VALUE             619 ext/openssl/ossl_ssl.c ossl_ssl_read(int argc, VALUE *argv, VALUE self)
VALUE             623 ext/openssl/ossl_ssl.c     VALUE len, str;
VALUE             676 ext/openssl/ossl_ssl.c static VALUE
VALUE             677 ext/openssl/ossl_ssl.c ossl_ssl_write(VALUE self, VALUE str)
VALUE             716 ext/openssl/ossl_ssl.c static VALUE
VALUE             717 ext/openssl/ossl_ssl.c ossl_ssl_close(VALUE self)
VALUE             729 ext/openssl/ossl_ssl.c static VALUE
VALUE             730 ext/openssl/ossl_ssl.c ossl_ssl_get_cert(VALUE self)
VALUE             753 ext/openssl/ossl_ssl.c static VALUE
VALUE             754 ext/openssl/ossl_ssl.c ossl_ssl_get_peer_cert(VALUE self)
VALUE             758 ext/openssl/ossl_ssl.c     VALUE obj;
VALUE             778 ext/openssl/ossl_ssl.c static VALUE
VALUE             779 ext/openssl/ossl_ssl.c ossl_ssl_get_peer_cert_chain(VALUE self)
VALUE             784 ext/openssl/ossl_ssl.c     VALUE ary;
VALUE             804 ext/openssl/ossl_ssl.c static VALUE
VALUE             805 ext/openssl/ossl_ssl.c ossl_ssl_get_cipher(VALUE self)
VALUE             820 ext/openssl/ossl_ssl.c static VALUE
VALUE             821 ext/openssl/ossl_ssl.c ossl_ssl_get_state(VALUE self)
VALUE             824 ext/openssl/ossl_ssl.c     VALUE ret;
VALUE             839 ext/openssl/ossl_ssl.c static VALUE
VALUE             840 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              78 ext/readline/readline.c     buff = (char*)rb_protect((VALUE(*)_((VALUE)))readline, (VALUE)prompt,
VALUE             104 ext/readline/readline.c static VALUE
VALUE             106 ext/readline/readline.c     VALUE self;
VALUE             107 ext/readline/readline.c     VALUE proc;
VALUE             115 ext/readline/readline.c static VALUE
VALUE             117 ext/readline/readline.c     VALUE self;
VALUE             123 ext/readline/readline.c static VALUE
VALUE             125 ext/readline/readline.c     VALUE self;
VALUE             126 ext/readline/readline.c     VALUE val;
VALUE             132 ext/readline/readline.c static VALUE
VALUE             134 ext/readline/readline.c     VALUE self;
VALUE             146 ext/readline/readline.c     VALUE proc, ary, temp;
VALUE             207 ext/readline/readline.c static VALUE
VALUE             209 ext/readline/readline.c     VALUE self;
VALUE             221 ext/readline/readline.c static VALUE
VALUE             223 ext/readline/readline.c     VALUE self;
VALUE             235 ext/readline/readline.c static VALUE
VALUE             237 ext/readline/readline.c     VALUE self, str;
VALUE             259 ext/readline/readline.c static VALUE
VALUE             261 ext/readline/readline.c     VALUE self;
VALUE             264 ext/readline/readline.c     VALUE str;
VALUE             279 ext/readline/readline.c static VALUE
VALUE             281 ext/readline/readline.c     VALUE self, str;
VALUE             306 ext/readline/readline.c static VALUE
VALUE             308 ext/readline/readline.c     VALUE self, str;
VALUE             321 ext/readline/readline.c static VALUE
VALUE             323 ext/readline/readline.c     VALUE self, str;
VALUE             348 ext/readline/readline.c static VALUE
VALUE             350 ext/readline/readline.c     VALUE self, str;
VALUE             363 ext/readline/readline.c static VALUE
VALUE             365 ext/readline/readline.c     VALUE self, str;
VALUE             391 ext/readline/readline.c static VALUE
VALUE             393 ext/readline/readline.c     VALUE self, str;
VALUE             406 ext/readline/readline.c static VALUE
VALUE             408 ext/readline/readline.c     VALUE self, str;
VALUE             434 ext/readline/readline.c static VALUE
VALUE             436 ext/readline/readline.c     VALUE self, str;
VALUE             449 ext/readline/readline.c static VALUE
VALUE             451 ext/readline/readline.c     VALUE self, str;
VALUE             477 ext/readline/readline.c static VALUE
VALUE             479 ext/readline/readline.c     VALUE self, str;
VALUE             492 ext/readline/readline.c static VALUE
VALUE             494 ext/readline/readline.c     VALUE self;
VALUE             499 ext/readline/readline.c static VALUE
VALUE             501 ext/readline/readline.c     VALUE self;
VALUE             502 ext/readline/readline.c     VALUE index;
VALUE             519 ext/readline/readline.c static VALUE
VALUE             521 ext/readline/readline.c     VALUE self;
VALUE             522 ext/readline/readline.c     VALUE index;
VALUE             523 ext/readline/readline.c     VALUE str;
VALUE             546 ext/readline/readline.c static VALUE
VALUE             548 ext/readline/readline.c     VALUE self;
VALUE             549 ext/readline/readline.c     VALUE str;
VALUE             557 ext/readline/readline.c static VALUE
VALUE             560 ext/readline/readline.c     VALUE *argv;
VALUE             561 ext/readline/readline.c     VALUE self;
VALUE             563 ext/readline/readline.c     VALUE str;
VALUE             574 ext/readline/readline.c static VALUE
VALUE             580 ext/readline/readline.c     VALUE val;
VALUE             597 ext/readline/readline.c static VALUE
VALUE             599 ext/readline/readline.c     VALUE self;
VALUE             609 ext/readline/readline.c static VALUE
VALUE             611 ext/readline/readline.c     VALUE self;
VALUE             621 ext/readline/readline.c static VALUE
VALUE             623 ext/readline/readline.c     VALUE self;
VALUE             638 ext/readline/readline.c static VALUE
VALUE             640 ext/readline/readline.c     VALUE self;
VALUE             646 ext/readline/readline.c static VALUE
VALUE             648 ext/readline/readline.c     VALUE self;
VALUE             654 ext/readline/readline.c static VALUE
VALUE             656 ext/readline/readline.c     VALUE self;
VALUE             657 ext/readline/readline.c     VALUE index;
VALUE             671 ext/readline/readline.c static VALUE
VALUE             673 ext/readline/readline.c     VALUE self;
VALUE             674 ext/readline/readline.c     VALUE str;
VALUE             676 ext/readline/readline.c     VALUE result;
VALUE             698 ext/readline/readline.c static VALUE
VALUE             700 ext/readline/readline.c     VALUE self;
VALUE             701 ext/readline/readline.c     VALUE str;
VALUE             703 ext/readline/readline.c     VALUE result;
VALUE             728 ext/readline/readline.c     VALUE history, fcomp, ucomp;
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             220 ext/sdbm/init.c     VALUE *argv;
VALUE             221 ext/sdbm/init.c     VALUE obj;
VALUE             223 ext/sdbm/init.c     VALUE new;
VALUE             234 ext/sdbm/init.c static VALUE
VALUE             237 ext/sdbm/init.c     VALUE *argv;
VALUE             238 ext/sdbm/init.c     VALUE obj;
VALUE             240 ext/sdbm/init.c     VALUE new = rb_ary_new2(argc);
VALUE             253 ext/sdbm/init.c             VALUE assoc, v;
VALUE             275 ext/sdbm/init.c static VALUE
VALUE             278 ext/sdbm/init.c     VALUE *argv;
VALUE             279 ext/sdbm/init.c     VALUE obj;
VALUE             281 ext/sdbm/init.c     VALUE new = rb_ary_new2(argc);
VALUE             293 ext/sdbm/init.c     VALUE obj;
VALUE             299 ext/sdbm/init.c static VALUE
VALUE             301 ext/sdbm/init.c     VALUE obj, keystr;
VALUE             306 ext/sdbm/init.c     VALUE valstr;
VALUE             335 ext/sdbm/init.c static VALUE
VALUE             337 ext/sdbm/init.c     VALUE obj;
VALUE             342 ext/sdbm/init.c     VALUE keystr, valstr;
VALUE             359 ext/sdbm/init.c static VALUE
VALUE             361 ext/sdbm/init.c     VALUE obj;
VALUE             366 ext/sdbm/init.c     VALUE keystr, valstr;
VALUE             367 ext/sdbm/init.c     VALUE ret, ary = rb_ary_new();
VALUE             399 ext/sdbm/init.c static VALUE
VALUE             401 ext/sdbm/init.c     VALUE obj;
VALUE             420 ext/sdbm/init.c static VALUE
VALUE             422 ext/sdbm/init.c     VALUE obj;
VALUE             427 ext/sdbm/init.c     VALUE keystr, valstr;
VALUE             428 ext/sdbm/init.c     VALUE hash = rb_hash_new();
VALUE             440 ext/sdbm/init.c static VALUE each_pair _((VALUE));
VALUE             442 ext/sdbm/init.c static VALUE
VALUE             444 ext/sdbm/init.c     VALUE obj;
VALUE             449 ext/sdbm/init.c static VALUE fsdbm_store _((VALUE,VALUE,VALUE));
VALUE             451 ext/sdbm/init.c static VALUE
VALUE             453 ext/sdbm/init.c     VALUE pair, dbm;
VALUE             463 ext/sdbm/init.c static VALUE
VALUE             465 ext/sdbm/init.c     VALUE obj, other;
VALUE             471 ext/sdbm/init.c static VALUE
VALUE             473 ext/sdbm/init.c     VALUE obj, other;
VALUE             480 ext/sdbm/init.c static VALUE
VALUE             482 ext/sdbm/init.c     VALUE obj, keystr, valstr;
VALUE             516 ext/sdbm/init.c static VALUE
VALUE             518 ext/sdbm/init.c     VALUE obj;
VALUE             536 ext/sdbm/init.c static VALUE
VALUE             538 ext/sdbm/init.c     VALUE obj;
VALUE             560 ext/sdbm/init.c static VALUE
VALUE             562 ext/sdbm/init.c     VALUE obj;
VALUE             577 ext/sdbm/init.c static VALUE
VALUE             579 ext/sdbm/init.c     VALUE obj;
VALUE             593 ext/sdbm/init.c static VALUE
VALUE             595 ext/sdbm/init.c     VALUE obj;
VALUE             600 ext/sdbm/init.c     VALUE keystr, valstr;
VALUE             614 ext/sdbm/init.c static VALUE
VALUE             616 ext/sdbm/init.c     VALUE obj;
VALUE             621 ext/sdbm/init.c     VALUE ary;
VALUE             632 ext/sdbm/init.c static VALUE
VALUE             634 ext/sdbm/init.c     VALUE obj;
VALUE             639 ext/sdbm/init.c     VALUE ary;
VALUE             651 ext/sdbm/init.c static VALUE
VALUE             653 ext/sdbm/init.c     VALUE obj, keystr;
VALUE             669 ext/sdbm/init.c static VALUE
VALUE             671 ext/sdbm/init.c     VALUE obj, valstr;
VALUE             691 ext/sdbm/init.c static VALUE
VALUE             693 ext/sdbm/init.c     VALUE obj;
VALUE             698 ext/sdbm/init.c     VALUE ary;
VALUE             711 ext/sdbm/init.c static VALUE
VALUE             713 ext/sdbm/init.c     VALUE obj;
VALUE             718 ext/sdbm/init.c     VALUE hash;
VALUE             731 ext/sdbm/init.c static VALUE
VALUE             733 ext/sdbm/init.c     VALUE obj;
VALUE              80 ext/socket/socket.c VALUE rb_cBasicSocket;
VALUE              81 ext/socket/socket.c VALUE rb_cIPSocket;
VALUE              82 ext/socket/socket.c VALUE rb_cTCPSocket;
VALUE              83 ext/socket/socket.c VALUE rb_cTCPServer;
VALUE              84 ext/socket/socket.c VALUE rb_cUDPSocket;
VALUE              86 ext/socket/socket.c VALUE rb_cUNIXSocket;
VALUE              87 ext/socket/socket.c VALUE rb_cUNIXServer;
VALUE              89 ext/socket/socket.c VALUE rb_cSocket;
VALUE              91 ext/socket/socket.c static VALUE rb_eSocket;
VALUE              94 ext/socket/socket.c VALUE rb_cSOCKSSocket;
VALUE             205 ext/socket/socket.c static VALUE
VALUE             207 ext/socket/socket.c     VALUE sock;
VALUE             221 ext/socket/socket.c static VALUE
VALUE             223 ext/socket/socket.c     VALUE klass, fd;
VALUE             226 ext/socket/socket.c     VALUE sock = init_sock(rb_obj_alloc(klass), NUM2INT(fd));
VALUE             233 ext/socket/socket.c static VALUE
VALUE             236 ext/socket/socket.c     VALUE *argv;
VALUE             237 ext/socket/socket.c     VALUE sock;
VALUE             239 ext/socket/socket.c     VALUE howto;
VALUE             262 ext/socket/socket.c static VALUE
VALUE             264 ext/socket/socket.c     VALUE sock;
VALUE             281 ext/socket/socket.c static VALUE
VALUE             283 ext/socket/socket.c     VALUE sock;
VALUE             345 ext/socket/socket.c static VALUE
VALUE             347 ext/socket/socket.c     VALUE sock, lev, optname, val;
VALUE             425 ext/socket/socket.c static VALUE
VALUE             427 ext/socket/socket.c     VALUE sock, lev, optname;
VALUE             451 ext/socket/socket.c static VALUE
VALUE             453 ext/socket/socket.c     VALUE sock;
VALUE             465 ext/socket/socket.c static VALUE
VALUE             467 ext/socket/socket.c     VALUE sock;
VALUE             479 ext/socket/socket.c static VALUE
VALUE             482 ext/socket/socket.c     VALUE *argv;
VALUE             483 ext/socket/socket.c     VALUE sock;
VALUE             485 ext/socket/socket.c     VALUE mesg, to;
VALUE             486 ext/socket/socket.c     VALUE flags;
VALUE             521 ext/socket/socket.c static VALUE ipaddr _((struct sockaddr*));
VALUE             523 ext/socket/socket.c static VALUE unixaddr _((struct sockaddr_un*));
VALUE             533 ext/socket/socket.c static VALUE
VALUE             535 ext/socket/socket.c     VALUE sock;
VALUE             537 ext/socket/socket.c     VALUE *argv;
VALUE             541 ext/socket/socket.c     VALUE str;
VALUE             544 ext/socket/socket.c     VALUE len, flg;
VALUE             584 ext/socket/socket.c 	return (VALUE)str;
VALUE             606 ext/socket/socket.c static VALUE
VALUE             609 ext/socket/socket.c     VALUE *argv;
VALUE             610 ext/socket/socket.c     VALUE sock;
VALUE             615 ext/socket/socket.c static VALUE
VALUE             621 ext/socket/socket.c static VALUE
VALUE             623 ext/socket/socket.c     VALUE self, val;
VALUE             644 ext/socket/socket.c static VALUE
VALUE             687 ext/socket/socket.c     VALUE host;
VALUE             723 ext/socket/socket.c     VALUE port;
VALUE             756 ext/socket/socket.c     VALUE host, port;
VALUE             804 ext/socket/socket.c static VALUE
VALUE             808 ext/socket/socket.c     VALUE family, port, addr1, addr2;
VALUE             809 ext/socket/socket.c     VALUE ary;
VALUE            1044 ext/socket/socket.c     VALUE sock;
VALUE            1046 ext/socket/socket.c 	VALUE host, serv;
VALUE            1053 ext/socket/socket.c static VALUE
VALUE            1071 ext/socket/socket.c static VALUE
VALUE            1141 ext/socket/socket.c static VALUE
VALUE            1143 ext/socket/socket.c     VALUE sock, remote_host, remote_serv, local_host, local_serv;
VALUE            1156 ext/socket/socket.c     return rb_ensure(init_inetsock_internal, (VALUE)&arg,
VALUE            1157 ext/socket/socket.c 		     inetsock_cleanup, (VALUE)&arg);
VALUE            1160 ext/socket/socket.c static VALUE
VALUE            1163 ext/socket/socket.c      VALUE *argv;
VALUE            1164 ext/socket/socket.c      VALUE sock;
VALUE            1166 ext/socket/socket.c     VALUE remote_host, remote_serv;
VALUE            1167 ext/socket/socket.c     VALUE local_host, local_serv;
VALUE            1177 ext/socket/socket.c static VALUE
VALUE            1179 ext/socket/socket.c     VALUE sock, host, serv;
VALUE            1192 ext/socket/socket.c static VALUE
VALUE            1194 ext/socket/socket.c     VALUE sock;
VALUE            1210 ext/socket/socket.c     VALUE host;
VALUE            1212 ext/socket/socket.c     VALUE (*ipaddr)_((struct sockaddr*, size_t));
VALUE            1215 ext/socket/socket.c static VALUE
VALUE            1219 ext/socket/socket.c     VALUE host = arg->host;
VALUE            1221 ext/socket/socket.c     VALUE (*ipaddr)_((struct sockaddr*, size_t)) = arg->ipaddr;
VALUE            1225 ext/socket/socket.c     VALUE ary, names;
VALUE            1259 ext/socket/socket.c static VALUE
VALUE            1261 ext/socket/socket.c     VALUE host;
VALUE            1263 ext/socket/socket.c     VALUE (*ipaddr)_((struct sockaddr*, size_t));
VALUE            1270 ext/socket/socket.c     return rb_ensure(make_hostent_internal, (VALUE)&arg,
VALUE            1271 ext/socket/socket.c 		     RUBY_METHOD_FUNC(freeaddrinfo), (VALUE)addr);
VALUE            1274 ext/socket/socket.c VALUE
VALUE            1282 ext/socket/socket.c static VALUE
VALUE            1284 ext/socket/socket.c     VALUE obj, host;
VALUE            1290 ext/socket/socket.c static VALUE
VALUE            1293 ext/socket/socket.c     VALUE *argv;
VALUE            1294 ext/socket/socket.c     VALUE sock;
VALUE            1296 ext/socket/socket.c     VALUE arg1, arg2;
VALUE            1304 ext/socket/socket.c static VALUE
VALUE            1306 ext/socket/socket.c     VALUE klass;
VALUE            1345 ext/socket/socket.c static VALUE
VALUE            1347 ext/socket/socket.c     VALUE sock;
VALUE            1359 ext/socket/socket.c static VALUE
VALUE            1361 ext/socket/socket.c     VALUE sock;
VALUE            1378 ext/socket/socket.c static VALUE
VALUE            1382 ext/socket/socket.c     return (VALUE)ruby_connect(arg->fd, arg->sockaddr, sizeof(*arg->sockaddr),
VALUE            1386 ext/socket/socket.c static VALUE
VALUE            1388 ext/socket/socket.c     VALUE sock;
VALUE            1389 ext/socket/socket.c     VALUE path;
VALUE            1415 ext/socket/socket.c         status = rb_protect(unixsock_connect_internal, (VALUE)&arg, &prot);
VALUE            1437 ext/socket/socket.c static VALUE
VALUE            1439 ext/socket/socket.c     VALUE sock;
VALUE            1452 ext/socket/socket.c static VALUE
VALUE            1454 ext/socket/socket.c     VALUE sock;
VALUE            1467 ext/socket/socket.c static VALUE
VALUE            1470 ext/socket/socket.c     VALUE *argv;
VALUE            1471 ext/socket/socket.c     VALUE sock;
VALUE            1476 ext/socket/socket.c static VALUE
VALUE            1478 ext/socket/socket.c     VALUE obj, host;
VALUE            1490 ext/socket/socket.c static VALUE
VALUE            1493 ext/socket/socket.c     VALUE *argv;
VALUE            1494 ext/socket/socket.c     VALUE sock;
VALUE            1496 ext/socket/socket.c     VALUE arg;
VALUE            1518 ext/socket/socket.c static VALUE
VALUE            1533 ext/socket/socket.c static VALUE
VALUE            1535 ext/socket/socket.c     VALUE sock, host, port;
VALUE            1539 ext/socket/socket.c     VALUE ret;
VALUE            1545 ext/socket/socket.c     ret = rb_ensure(udp_connect_internal, (VALUE)&arg,
VALUE            1546 ext/socket/socket.c 		    RUBY_METHOD_FUNC(freeaddrinfo), (VALUE)arg.res);
VALUE            1551 ext/socket/socket.c static VALUE
VALUE            1553 ext/socket/socket.c     VALUE sock, host, port;
VALUE            1573 ext/socket/socket.c static VALUE
VALUE            1576 ext/socket/socket.c     VALUE *argv;
VALUE            1577 ext/socket/socket.c     VALUE sock;
VALUE            1579 ext/socket/socket.c     VALUE mesg, flags, host, port;
VALUE            1613 ext/socket/socket.c static VALUE
VALUE            1615 ext/socket/socket.c     VALUE sock, path;
VALUE            1620 ext/socket/socket.c static VALUE
VALUE            1622 ext/socket/socket.c     VALUE sock;
VALUE            1637 ext/socket/socket.c static VALUE
VALUE            1639 ext/socket/socket.c     VALUE sock, path;
VALUE            1644 ext/socket/socket.c static VALUE
VALUE            1647 ext/socket/socket.c     VALUE *argv;
VALUE            1648 ext/socket/socket.c     VALUE sock;
VALUE            1665 ext/socket/socket.c static VALUE
VALUE            1667 ext/socket/socket.c     VALUE sock, val;
VALUE            1743 ext/socket/socket.c static VALUE
VALUE            1746 ext/socket/socket.c     VALUE *argv;
VALUE            1747 ext/socket/socket.c     VALUE sock;
VALUE            1750 ext/socket/socket.c     VALUE klass, mode;
VALUE            1837 ext/socket/socket.c 	VALUE ff_argv[2];
VALUE            1851 ext/socket/socket.c static VALUE
VALUE            1853 ext/socket/socket.c     VALUE sock;
VALUE            1865 ext/socket/socket.c static VALUE
VALUE            1867 ext/socket/socket.c     VALUE sock;
VALUE            1878 ext/socket/socket.c static VALUE
VALUE            1886 ext/socket/socket.c static VALUE
VALUE            1888 ext/socket/socket.c     VALUE sock;
VALUE            1903 ext/socket/socket.c static VALUE
VALUE            1905 ext/socket/socket.c     VALUE sock;
VALUE            1923 ext/socket/socket.c     VALUE domain, type;
VALUE            1926 ext/socket/socket.c     VALUE tmp;
VALUE            2013 ext/socket/socket.c static VALUE
VALUE            2015 ext/socket/socket.c     VALUE sock, domain, type, protocol;
VALUE            2028 ext/socket/socket.c static VALUE
VALUE            2030 ext/socket/socket.c     VALUE klass, domain, type, protocol;
VALUE            2053 ext/socket/socket.c static VALUE
VALUE            2056 ext/socket/socket.c     VALUE *argv;
VALUE            2057 ext/socket/socket.c     VALUE klass;
VALUE            2059 ext/socket/socket.c     VALUE domain, type, protocol;
VALUE            2183 ext/socket/socket.c static VALUE
VALUE            2185 ext/socket/socket.c     VALUE sock, addr;
VALUE            2280 ext/socket/socket.c static VALUE
VALUE            2282 ext/socket/socket.c     VALUE sock, addr;
VALUE            2364 ext/socket/socket.c static VALUE
VALUE            2366 ext/socket/socket.c     VALUE sock, log;
VALUE            2485 ext/socket/socket.c static VALUE
VALUE            2488 ext/socket/socket.c     VALUE *argv;
VALUE            2489 ext/socket/socket.c     VALUE sock;
VALUE            2576 ext/socket/socket.c static VALUE
VALUE            2578 ext/socket/socket.c     VALUE sock;
VALUE            2581 ext/socket/socket.c     VALUE sock2;
VALUE            2629 ext/socket/socket.c static VALUE
VALUE            2631 ext/socket/socket.c     VALUE sock;
VALUE            2634 ext/socket/socket.c     VALUE sock2;
VALUE            2645 ext/socket/socket.c static VALUE
VALUE            2647 ext/socket/socket.c     VALUE obj;
VALUE            2663 ext/socket/socket.c static VALUE
VALUE            2665 ext/socket/socket.c     VALUE obj;
VALUE            2674 ext/socket/socket.c static VALUE
VALUE            2676 ext/socket/socket.c     VALUE obj;
VALUE            2683 ext/socket/socket.c static VALUE
VALUE            2687 ext/socket/socket.c     VALUE base, ary;
VALUE            2704 ext/socket/socket.c VALUE
VALUE            2729 ext/socket/socket.c static VALUE
VALUE            2731 ext/socket/socket.c     VALUE obj, host;
VALUE            2737 ext/socket/socket.c static VALUE
VALUE            2740 ext/socket/socket.c     VALUE *argv;
VALUE            2742 ext/socket/socket.c     VALUE addr, type;
VALUE            2746 ext/socket/socket.c     VALUE ary, names;
VALUE            2789 ext/socket/socket.c static VALUE
VALUE            2792 ext/socket/socket.c     VALUE *argv;
VALUE            2794 ext/socket/socket.c     VALUE service, proto;
VALUE            2819 ext/socket/socket.c static VALUE
VALUE            2822 ext/socket/socket.c     VALUE *argv;
VALUE            2824 ext/socket/socket.c     VALUE host, port, family, socktype, protocol, flags, ret;
VALUE            2890 ext/socket/socket.c static VALUE
VALUE            2893 ext/socket/socket.c     VALUE *argv;
VALUE            2895 ext/socket/socket.c     VALUE sa, af = Qnil, host = Qnil, port = Qnil, flags, tmp;
VALUE            3034 ext/socket/socket.c static VALUE
VALUE            3036 ext/socket/socket.c     VALUE self, port, host;
VALUE            3039 ext/socket/socket.c     VALUE addr = rb_str_new((char*)res->ai_addr, res->ai_addrlen);
VALUE            3048 ext/socket/socket.c static VALUE
VALUE            3050 ext/socket/socket.c     VALUE self, addr;
VALUE            3053 ext/socket/socket.c     VALUE host;
VALUE            3062 ext/socket/socket.c static VALUE
VALUE            3064 ext/socket/socket.c     VALUE self, path;
VALUE            3067 ext/socket/socket.c     VALUE addr;
VALUE            3078 ext/socket/socket.c static VALUE
VALUE            3080 ext/socket/socket.c     VALUE self, addr;
VALUE            3083 ext/socket/socket.c     VALUE path;
VALUE            3097 ext/socket/socket.c static VALUE mConst;
VALUE              26 ext/stringio/stringio.c     VALUE string;
VALUE              36 ext/stringio/stringio.c static struct StringIO* check_strio _((VALUE));
VALUE              37 ext/stringio/stringio.c static struct StringIO* get_strio _((VALUE));
VALUE              77 ext/stringio/stringio.c     VALUE self;
VALUE              89 ext/stringio/stringio.c     VALUE self;
VALUE             137 ext/stringio/stringio.c static VALUE strio_s_allocate _((VALUE));
VALUE             138 ext/stringio/stringio.c static VALUE strio_s_open _((int, VALUE *, VALUE));
VALUE             139 ext/stringio/stringio.c static VALUE strio_initialize _((int, VALUE *, VALUE));
VALUE             140 ext/stringio/stringio.c static VALUE strio_finalize _((VALUE));
VALUE             141 ext/stringio/stringio.c static VALUE strio_self _((VALUE));
VALUE             142 ext/stringio/stringio.c static VALUE strio_false _((VALUE));
VALUE             143 ext/stringio/stringio.c static VALUE strio_nil _((VALUE));
VALUE             144 ext/stringio/stringio.c static VALUE strio_0 _((VALUE));
VALUE             145 ext/stringio/stringio.c static VALUE strio_first _((VALUE, VALUE));
VALUE             146 ext/stringio/stringio.c static VALUE strio_unimpl _((int, VALUE *, VALUE));
VALUE             147 ext/stringio/stringio.c static VALUE strio_get_string _((VALUE));
VALUE             148 ext/stringio/stringio.c static VALUE strio_set_string _((VALUE, VALUE));
VALUE             149 ext/stringio/stringio.c static VALUE strio_close _((VALUE));
VALUE             150 ext/stringio/stringio.c static VALUE strio_close_read _((VALUE));
VALUE             151 ext/stringio/stringio.c static VALUE strio_close_write _((VALUE));
VALUE             152 ext/stringio/stringio.c static VALUE strio_closed _((VALUE));
VALUE             153 ext/stringio/stringio.c static VALUE strio_closed_read _((VALUE));
VALUE             154 ext/stringio/stringio.c static VALUE strio_closed_write _((VALUE));
VALUE             155 ext/stringio/stringio.c static VALUE strio_eof _((VALUE));
VALUE             156 ext/stringio/stringio.c static VALUE strio_get_lineno _((VALUE));
VALUE             157 ext/stringio/stringio.c static VALUE strio_set_lineno _((VALUE, VALUE));
VALUE             158 ext/stringio/stringio.c static VALUE strio_get_pos _((VALUE));
VALUE             159 ext/stringio/stringio.c static VALUE strio_set_pos _((VALUE, VALUE));
VALUE             160 ext/stringio/stringio.c static VALUE strio_rewind _((VALUE));
VALUE             161 ext/stringio/stringio.c static VALUE strio_seek _((int, VALUE *, VALUE));
VALUE             162 ext/stringio/stringio.c static VALUE strio_get_sync _((VALUE));
VALUE             163 ext/stringio/stringio.c static VALUE strio_each_byte _((VALUE));
VALUE             164 ext/stringio/stringio.c static VALUE strio_getc _((VALUE));
VALUE             165 ext/stringio/stringio.c static VALUE strio_ungetc _((VALUE, VALUE));
VALUE             166 ext/stringio/stringio.c static VALUE strio_readchar _((VALUE));
VALUE             167 ext/stringio/stringio.c static VALUE strio_getline _((int, VALUE *, struct StringIO *));
VALUE             168 ext/stringio/stringio.c static VALUE strio_gets _((int, VALUE *, VALUE));
VALUE             169 ext/stringio/stringio.c static VALUE strio_readline _((int, VALUE *, VALUE));
VALUE             170 ext/stringio/stringio.c static VALUE strio_each _((int, VALUE *, VALUE));
VALUE             171 ext/stringio/stringio.c static VALUE strio_readlines _((int, VALUE *, VALUE));
VALUE             172 ext/stringio/stringio.c static VALUE strio_write _((VALUE, VALUE));
VALUE             173 ext/stringio/stringio.c static VALUE strio_putc _((VALUE, VALUE));
VALUE             174 ext/stringio/stringio.c static VALUE strio_read _((int, VALUE *, VALUE));
VALUE             175 ext/stringio/stringio.c static VALUE strio_size _((VALUE));
VALUE             176 ext/stringio/stringio.c static VALUE strio_truncate _((VALUE, VALUE));
VALUE             183 ext/stringio/stringio.c static VALUE
VALUE             185 ext/stringio/stringio.c     VALUE klass;
VALUE             197 ext/stringio/stringio.c static VALUE
VALUE             200 ext/stringio/stringio.c     VALUE *argv;
VALUE             201 ext/stringio/stringio.c     VALUE klass;
VALUE             203 ext/stringio/stringio.c     VALUE obj = rb_class_new_instance(argc, argv, klass);
VALUE             213 ext/stringio/stringio.c static VALUE
VALUE             216 ext/stringio/stringio.c     VALUE *argv;
VALUE             217 ext/stringio/stringio.c     VALUE self;
VALUE             220 ext/stringio/stringio.c     VALUE string, mode;
VALUE             261 ext/stringio/stringio.c static VALUE
VALUE             263 ext/stringio/stringio.c     VALUE self;
VALUE             274 ext/stringio/stringio.c static VALUE
VALUE             276 ext/stringio/stringio.c     VALUE self;
VALUE             285 ext/stringio/stringio.c static VALUE
VALUE             287 ext/stringio/stringio.c     VALUE self;
VALUE             296 ext/stringio/stringio.c static VALUE
VALUE             298 ext/stringio/stringio.c     VALUE self;
VALUE             307 ext/stringio/stringio.c static VALUE
VALUE             309 ext/stringio/stringio.c     VALUE self;
VALUE             318 ext/stringio/stringio.c static VALUE
VALUE             320 ext/stringio/stringio.c     VALUE self, arg;
VALUE             329 ext/stringio/stringio.c static VALUE
VALUE             332 ext/stringio/stringio.c     VALUE *argv;
VALUE             333 ext/stringio/stringio.c     VALUE self;
VALUE             345 ext/stringio/stringio.c static VALUE
VALUE             347 ext/stringio/stringio.c     VALUE self;
VALUE             358 ext/stringio/stringio.c static VALUE
VALUE             360 ext/stringio/stringio.c     VALUE self, string;
VALUE             380 ext/stringio/stringio.c static VALUE
VALUE             382 ext/stringio/stringio.c     VALUE self;
VALUE             399 ext/stringio/stringio.c static VALUE
VALUE             401 ext/stringio/stringio.c     VALUE self;
VALUE             418 ext/stringio/stringio.c static VALUE
VALUE             420 ext/stringio/stringio.c     VALUE self;
VALUE             436 ext/stringio/stringio.c static VALUE
VALUE             438 ext/stringio/stringio.c     VALUE self;
VALUE             451 ext/stringio/stringio.c static VALUE
VALUE             453 ext/stringio/stringio.c     VALUE self;
VALUE             466 ext/stringio/stringio.c static VALUE
VALUE             468 ext/stringio/stringio.c     VALUE self;
VALUE             483 ext/stringio/stringio.c static VALUE
VALUE             485 ext/stringio/stringio.c     VALUE self;
VALUE             493 ext/stringio/stringio.c static VALUE
VALUE             495 ext/stringio/stringio.c     VALUE copy, orig;
VALUE             521 ext/stringio/stringio.c static VALUE
VALUE             523 ext/stringio/stringio.c     VALUE self;
VALUE             535 ext/stringio/stringio.c static VALUE
VALUE             537 ext/stringio/stringio.c     VALUE self, lineno;
VALUE             563 ext/stringio/stringio.c static VALUE
VALUE             566 ext/stringio/stringio.c     VALUE *argv;
VALUE             567 ext/stringio/stringio.c     VALUE self;
VALUE             583 ext/stringio/stringio.c static VALUE
VALUE             585 ext/stringio/stringio.c     VALUE self;
VALUE             596 ext/stringio/stringio.c static VALUE
VALUE             598 ext/stringio/stringio.c     VALUE self;
VALUE             599 ext/stringio/stringio.c     VALUE pos;
VALUE             618 ext/stringio/stringio.c static VALUE
VALUE             620 ext/stringio/stringio.c     VALUE self;
VALUE             636 ext/stringio/stringio.c static VALUE
VALUE             639 ext/stringio/stringio.c     VALUE *argv;
VALUE             640 ext/stringio/stringio.c     VALUE self;
VALUE             642 ext/stringio/stringio.c     VALUE whence;
VALUE             674 ext/stringio/stringio.c static VALUE
VALUE             676 ext/stringio/stringio.c     VALUE self;
VALUE             693 ext/stringio/stringio.c static VALUE
VALUE             695 ext/stringio/stringio.c     VALUE self;
VALUE             711 ext/stringio/stringio.c static VALUE
VALUE             713 ext/stringio/stringio.c     VALUE self;
VALUE             754 ext/stringio/stringio.c static VALUE
VALUE             756 ext/stringio/stringio.c     VALUE self, ch;
VALUE             782 ext/stringio/stringio.c static VALUE
VALUE             784 ext/stringio/stringio.c     VALUE self;
VALUE             786 ext/stringio/stringio.c     VALUE c = strio_getc(self);
VALUE             831 ext/stringio/stringio.c static VALUE
VALUE             834 ext/stringio/stringio.c     VALUE *argv;
VALUE             839 ext/stringio/stringio.c     VALUE str;
VALUE             914 ext/stringio/stringio.c static VALUE
VALUE             917 ext/stringio/stringio.c     VALUE *argv;
VALUE             918 ext/stringio/stringio.c     VALUE self;
VALUE             920 ext/stringio/stringio.c     VALUE str = strio_getline(argc, argv, readable(StringIO(self)));
VALUE             932 ext/stringio/stringio.c static VALUE
VALUE             935 ext/stringio/stringio.c     VALUE *argv;
VALUE             936 ext/stringio/stringio.c     VALUE self;
VALUE             938 ext/stringio/stringio.c     VALUE line = strio_getline(argc, argv, readable(StringIO(self)));
VALUE             950 ext/stringio/stringio.c static VALUE
VALUE             953 ext/stringio/stringio.c     VALUE *argv;
VALUE             954 ext/stringio/stringio.c     VALUE self;
VALUE             957 ext/stringio/stringio.c     VALUE line;
VALUE             971 ext/stringio/stringio.c static VALUE
VALUE             974 ext/stringio/stringio.c     VALUE *argv;
VALUE             975 ext/stringio/stringio.c     VALUE self;
VALUE             978 ext/stringio/stringio.c     VALUE ary = rb_ary_new(), line;
VALUE             995 ext/stringio/stringio.c static VALUE
VALUE             997 ext/stringio/stringio.c     VALUE self, str;
VALUE            1054 ext/stringio/stringio.c static VALUE
VALUE            1056 ext/stringio/stringio.c     VALUE self, ch;
VALUE            1087 ext/stringio/stringio.c static VALUE
VALUE            1090 ext/stringio/stringio.c     VALUE *argv;
VALUE            1091 ext/stringio/stringio.c     VALUE self;
VALUE            1094 ext/stringio/stringio.c     VALUE str = Qnil;
VALUE            1167 ext/stringio/stringio.c static VALUE
VALUE            1170 ext/stringio/stringio.c     VALUE *argv;
VALUE            1171 ext/stringio/stringio.c     VALUE self;
VALUE            1173 ext/stringio/stringio.c     VALUE val = strio_read(argc, argv, self);
VALUE            1205 ext/stringio/stringio.c static VALUE
VALUE            1207 ext/stringio/stringio.c     VALUE self;
VALUE            1209 ext/stringio/stringio.c     VALUE string = StringIO(self)->string;
VALUE            1223 ext/stringio/stringio.c static VALUE
VALUE            1225 ext/stringio/stringio.c     VALUE self, len;
VALUE            1227 ext/stringio/stringio.c     VALUE string = writable(StringIO(self))->string;
VALUE            1246 ext/stringio/stringio.c     VALUE StringIO = rb_define_class("StringIO", rb_cData);
VALUE              31 ext/strscan/strscan.c static VALUE StringScanner;
VALUE              32 ext/strscan/strscan.c static VALUE ScanError;
VALUE              41 ext/strscan/strscan.c     VALUE str;
VALUE              72 ext/strscan/strscan.c static VALUE infect _((VALUE str, struct strscanner *p));
VALUE              73 ext/strscan/strscan.c static VALUE extract_range _((struct strscanner *p, long beg_i, long end_i));
VALUE              74 ext/strscan/strscan.c static VALUE extract_beg_len _((struct strscanner *p, long beg_i, long len));
VALUE              78 ext/strscan/strscan.c static VALUE strscan_s_allocate _((VALUE klass));
VALUE              79 ext/strscan/strscan.c static VALUE strscan_initialize _((int argc, VALUE *argv, VALUE self));
VALUE              81 ext/strscan/strscan.c static VALUE strscan_s_mustc _((VALUE self));
VALUE              82 ext/strscan/strscan.c static VALUE strscan_terminate _((VALUE self));
VALUE              83 ext/strscan/strscan.c static VALUE strscan_clear _((VALUE self));
VALUE              84 ext/strscan/strscan.c static VALUE strscan_get_string _((VALUE self));
VALUE              85 ext/strscan/strscan.c static VALUE strscan_set_string _((VALUE self, VALUE str));
VALUE              86 ext/strscan/strscan.c static VALUE strscan_concat _((VALUE self, VALUE str));
VALUE              87 ext/strscan/strscan.c static VALUE strscan_get_pos _((VALUE self));
VALUE              88 ext/strscan/strscan.c static VALUE strscan_set_pos _((VALUE self, VALUE pos));
VALUE              89 ext/strscan/strscan.c static VALUE strscan_do_scan _((VALUE self, VALUE regex,
VALUE              91 ext/strscan/strscan.c static VALUE strscan_scan _((VALUE self, VALUE re));
VALUE              92 ext/strscan/strscan.c static VALUE strscan_match_p _((VALUE self, VALUE re));
VALUE              93 ext/strscan/strscan.c static VALUE strscan_skip _((VALUE self, VALUE re));
VALUE              94 ext/strscan/strscan.c static VALUE strscan_check _((VALUE self, VALUE re));
VALUE              95 ext/strscan/strscan.c static VALUE strscan_scan_full _((VALUE self, VALUE re,
VALUE              96 ext/strscan/strscan.c                                   VALUE succp, VALUE getp));
VALUE              97 ext/strscan/strscan.c static VALUE strscan_scan_until _((VALUE self, VALUE re));
VALUE              98 ext/strscan/strscan.c static VALUE strscan_skip_until _((VALUE self, VALUE re));
VALUE              99 ext/strscan/strscan.c static VALUE strscan_check_until _((VALUE self, VALUE re));
VALUE             100 ext/strscan/strscan.c static VALUE strscan_search_full _((VALUE self, VALUE re,
VALUE             101 ext/strscan/strscan.c                                     VALUE succp, VALUE getp));
VALUE             103 ext/strscan/strscan.c static VALUE strscan_getch _((VALUE self));
VALUE             104 ext/strscan/strscan.c static VALUE strscan_get_byte _((VALUE self));
VALUE             105 ext/strscan/strscan.c static VALUE strscan_getbyte _((VALUE self));
VALUE             106 ext/strscan/strscan.c static VALUE strscan_peek _((VALUE self, VALUE len));
VALUE             107 ext/strscan/strscan.c static VALUE strscan_peep _((VALUE self, VALUE len));
VALUE             108 ext/strscan/strscan.c static VALUE strscan_unscan _((VALUE self));
VALUE             109 ext/strscan/strscan.c static VALUE strscan_bol_p _((VALUE self));
VALUE             110 ext/strscan/strscan.c static VALUE strscan_eos_p _((VALUE self));
VALUE             111 ext/strscan/strscan.c static VALUE strscan_empty_p _((VALUE self));
VALUE             112 ext/strscan/strscan.c static VALUE strscan_rest_p _((VALUE self));
VALUE             113 ext/strscan/strscan.c static VALUE strscan_matched_p _((VALUE self));
VALUE             114 ext/strscan/strscan.c static VALUE strscan_matched _((VALUE self));
VALUE             115 ext/strscan/strscan.c static VALUE strscan_matched_size _((VALUE self));
VALUE             116 ext/strscan/strscan.c static VALUE strscan_aref _((VALUE self, VALUE idx));
VALUE             117 ext/strscan/strscan.c static VALUE strscan_pre_match _((VALUE self));
VALUE             118 ext/strscan/strscan.c static VALUE strscan_post_match _((VALUE self));
VALUE             119 ext/strscan/strscan.c static VALUE strscan_rest _((VALUE self));
VALUE             120 ext/strscan/strscan.c static VALUE strscan_rest_size _((VALUE self));
VALUE             122 ext/strscan/strscan.c static VALUE strscan_inspect _((VALUE self));
VALUE             123 ext/strscan/strscan.c static VALUE inspect1 _((struct strscanner *p));
VALUE             124 ext/strscan/strscan.c static VALUE inspect2 _((struct strscanner *p));
VALUE             130 ext/strscan/strscan.c static VALUE
VALUE             132 ext/strscan/strscan.c     VALUE str;
VALUE             139 ext/strscan/strscan.c static VALUE
VALUE             150 ext/strscan/strscan.c static VALUE
VALUE             182 ext/strscan/strscan.c static VALUE
VALUE             184 ext/strscan/strscan.c     VALUE klass;
VALUE             202 ext/strscan/strscan.c static VALUE
VALUE             205 ext/strscan/strscan.c     VALUE *argv;
VALUE             206 ext/strscan/strscan.c     VALUE self;
VALUE             209 ext/strscan/strscan.c     VALUE str, need_dup;
VALUE             229 ext/strscan/strscan.c static VALUE
VALUE             231 ext/strscan/strscan.c     VALUE self;
VALUE             239 ext/strscan/strscan.c static VALUE
VALUE             241 ext/strscan/strscan.c     VALUE self;
VALUE             258 ext/strscan/strscan.c static VALUE
VALUE             260 ext/strscan/strscan.c     VALUE self;
VALUE             274 ext/strscan/strscan.c static VALUE
VALUE             276 ext/strscan/strscan.c     VALUE self;
VALUE             285 ext/strscan/strscan.c static VALUE
VALUE             287 ext/strscan/strscan.c     VALUE self;
VALUE             301 ext/strscan/strscan.c static VALUE
VALUE             303 ext/strscan/strscan.c     VALUE self, str;
VALUE             330 ext/strscan/strscan.c static VALUE
VALUE             332 ext/strscan/strscan.c     VALUE self, str;
VALUE             356 ext/strscan/strscan.c static VALUE
VALUE             358 ext/strscan/strscan.c     VALUE self;
VALUE             375 ext/strscan/strscan.c static VALUE
VALUE             377 ext/strscan/strscan.c     VALUE self, v;
VALUE             395 ext/strscan/strscan.c static VALUE
VALUE             397 ext/strscan/strscan.c     VALUE self, regex;
VALUE             465 ext/strscan/strscan.c static VALUE
VALUE             467 ext/strscan/strscan.c     VALUE self, re;
VALUE             483 ext/strscan/strscan.c static VALUE
VALUE             485 ext/strscan/strscan.c     VALUE self, re;
VALUE             507 ext/strscan/strscan.c static VALUE
VALUE             509 ext/strscan/strscan.c     VALUE self, re;
VALUE             529 ext/strscan/strscan.c static VALUE
VALUE             531 ext/strscan/strscan.c     VALUE self, re;
VALUE             546 ext/strscan/strscan.c static VALUE
VALUE             548 ext/strscan/strscan.c     VALUE self, re, s, f;
VALUE             566 ext/strscan/strscan.c static VALUE
VALUE             568 ext/strscan/strscan.c     VALUE self, re;
VALUE             586 ext/strscan/strscan.c static VALUE
VALUE             588 ext/strscan/strscan.c     VALUE self, re;
VALUE             609 ext/strscan/strscan.c static VALUE
VALUE             611 ext/strscan/strscan.c     VALUE self, re;
VALUE             629 ext/strscan/strscan.c static VALUE
VALUE             631 ext/strscan/strscan.c     VALUE self, re;
VALUE             645 ext/strscan/strscan.c static VALUE
VALUE             647 ext/strscan/strscan.c     VALUE self, re, s, f;
VALUE             675 ext/strscan/strscan.c static VALUE
VALUE             677 ext/strscan/strscan.c     VALUE self;
VALUE             706 ext/strscan/strscan.c static VALUE
VALUE             708 ext/strscan/strscan.c     VALUE self;
VALUE             729 ext/strscan/strscan.c static VALUE
VALUE             731 ext/strscan/strscan.c     VALUE self;
VALUE             748 ext/strscan/strscan.c static VALUE
VALUE             750 ext/strscan/strscan.c     VALUE self, vlen;
VALUE             770 ext/strscan/strscan.c static VALUE
VALUE             772 ext/strscan/strscan.c     VALUE self, vlen;
VALUE             789 ext/strscan/strscan.c static VALUE
VALUE             791 ext/strscan/strscan.c     VALUE self;
VALUE             816 ext/strscan/strscan.c static VALUE
VALUE             818 ext/strscan/strscan.c     VALUE self;
VALUE             838 ext/strscan/strscan.c static VALUE
VALUE             840 ext/strscan/strscan.c     VALUE self;
VALUE             855 ext/strscan/strscan.c static VALUE
VALUE             857 ext/strscan/strscan.c     VALUE self;
VALUE             871 ext/strscan/strscan.c static VALUE
VALUE             873 ext/strscan/strscan.c     VALUE self;
VALUE             893 ext/strscan/strscan.c static VALUE
VALUE             895 ext/strscan/strscan.c     VALUE self;
VALUE             913 ext/strscan/strscan.c static VALUE
VALUE             915 ext/strscan/strscan.c     VALUE self;
VALUE             936 ext/strscan/strscan.c static VALUE
VALUE             938 ext/strscan/strscan.c     VALUE self;
VALUE             952 ext/strscan/strscan.c static VALUE
VALUE             954 ext/strscan/strscan.c     VALUE self;
VALUE             974 ext/strscan/strscan.c static VALUE
VALUE             976 ext/strscan/strscan.c     VALUE self, idx;
VALUE            1004 ext/strscan/strscan.c static VALUE
VALUE            1006 ext/strscan/strscan.c     VALUE self;
VALUE            1025 ext/strscan/strscan.c static VALUE
VALUE            1027 ext/strscan/strscan.c     VALUE self;
VALUE            1041 ext/strscan/strscan.c static VALUE
VALUE            1043 ext/strscan/strscan.c     VALUE self;
VALUE            1057 ext/strscan/strscan.c static VALUE
VALUE            1059 ext/strscan/strscan.c     VALUE self;
VALUE            1077 ext/strscan/strscan.c static VALUE
VALUE            1079 ext/strscan/strscan.c     VALUE self;
VALUE            1099 ext/strscan/strscan.c static VALUE
VALUE            1101 ext/strscan/strscan.c     VALUE self;
VALUE            1106 ext/strscan/strscan.c     VALUE a, b;
VALUE            1137 ext/strscan/strscan.c static VALUE
VALUE            1157 ext/strscan/strscan.c static VALUE
VALUE            1289 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            1058 ext/syck/rubyext.c VALUE
VALUE            1060 ext/syck/rubyext.c     VALUE const_name;
VALUE            1062 ext/syck/rubyext.c     VALUE tclass = rb_cObject;
VALUE            1063 ext/syck/rubyext.c     VALUE tparts = rb_str_split( const_name, "::" );
VALUE            1066 ext/syck/rubyext.c         VALUE tpart = rb_to_id( rb_ary_entry( tparts, i ) );
VALUE            1076 ext/syck/rubyext.c VALUE
VALUE            1078 ext/syck/rubyext.c     VALUE self, type, val;
VALUE            1087 ext/syck/rubyext.c         VALUE str_xprivate = rb_str_new2( "x-private" );
VALUE            1088 ext/syck/rubyext.c         VALUE colon = rb_str_new2( ":" );
VALUE            1089 ext/syck/rubyext.c         VALUE tags = rb_attr_get(self, s_tags);
VALUE            1090 ext/syck/rubyext.c         VALUE target_class = rb_hash_aref( tags, type );
VALUE            1091 ext/syck/rubyext.c         VALUE subclass = target_class;
VALUE            1092 ext/syck/rubyext.c         VALUE obj = Qnil;
VALUE            1099 ext/syck/rubyext.c             VALUE subclass_parts = rb_ary_new();
VALUE            1100 ext/syck/rubyext.c             VALUE parts = rb_str_split( type, ":" );
VALUE            1104 ext/syck/rubyext.c                 VALUE partial;
VALUE            1123 ext/syck/rubyext.c                         VALUE subclass_v;
VALUE            1172 ext/syck/rubyext.c                 VALUE parts = rb_str_split( type, ":" );
VALUE            1173 ext/syck/rubyext.c                 VALUE scheme = rb_ary_shift( parts );
VALUE            1176 ext/syck/rubyext.c                     VALUE name = rb_ary_join( parts, colon );
VALUE            1181 ext/syck/rubyext.c                     VALUE domain = rb_ary_shift( parts );
VALUE            1182 ext/syck/rubyext.c                     VALUE name = rb_ary_join( parts, colon );
VALUE            1196 ext/syck/rubyext.c VALUE
VALUE            1198 ext/syck/rubyext.c     VALUE self, val;
VALUE            1200 ext/syck/rubyext.c     VALUE tmp = rb_check_string_type(val);
VALUE            1215 ext/syck/rubyext.c VALUE
VALUE            1217 ext/syck/rubyext.c     VALUE self, val;
VALUE            1220 ext/syck/rubyext.c     VALUE tmp = rb_check_string_type(val);
VALUE            1235 ext/syck/rubyext.c VALUE
VALUE            1237 ext/syck/rubyext.c     VALUE self, node;
VALUE            1240 ext/syck/rubyext.c     VALUE obj;
VALUE            1252 ext/syck/rubyext.c VALUE
VALUE            1254 ext/syck/rubyext.c     VALUE self, node;
VALUE            1258 ext/syck/rubyext.c     VALUE t = Qnil, obj = Qnil, v = Qnil, style = Qnil;
VALUE            1330 ext/syck/rubyext.c VALUE
VALUE            1332 ext/syck/rubyext.c     VALUE self, val;
VALUE            1341 ext/syck/rubyext.c VALUE
VALUE            1343 ext/syck/rubyext.c     VALUE alias1, alias2;
VALUE            1345 ext/syck/rubyext.c     VALUE str1 = rb_ivar_get( alias1, s_name );
VALUE            1346 ext/syck/rubyext.c     VALUE str2 = rb_ivar_get( alias2, s_name );
VALUE            1347 ext/syck/rubyext.c     VALUE val = rb_funcall( str1, s_cmp, 1, str2 );
VALUE            1354 ext/syck/rubyext.c VALUE
VALUE            1356 ext/syck/rubyext.c     VALUE self, domain, type_id, val;
VALUE            1367 ext/syck/rubyext.c VALUE
VALUE            1369 ext/syck/rubyext.c     VALUE self, klass, ivars;
VALUE            1379 ext/syck/rubyext.c VALUE
VALUE            1381 ext/syck/rubyext.c     VALUE self, type_id, val;
VALUE            1422 ext/syck/rubyext.c VALUE
VALUE            1424 ext/syck/rubyext.c     VALUE class;
VALUE            1427 ext/syck/rubyext.c     VALUE obj = Data_Wrap_Struct( class, syck_node_mark, syck_free_node, node );
VALUE            1435 ext/syck/rubyext.c VALUE
VALUE            1437 ext/syck/rubyext.c     VALUE self, type_id, val, style;
VALUE            1449 ext/syck/rubyext.c VALUE
VALUE            1451 ext/syck/rubyext.c     VALUE self, style;
VALUE            1488 ext/syck/rubyext.c VALUE
VALUE            1490 ext/syck/rubyext.c     VALUE self, val;
VALUE            1507 ext/syck/rubyext.c VALUE
VALUE            1509 ext/syck/rubyext.c     VALUE class;
VALUE            1512 ext/syck/rubyext.c     VALUE obj;
VALUE            1522 ext/syck/rubyext.c VALUE
VALUE            1524 ext/syck/rubyext.c     VALUE self, type_id, val, style;
VALUE            1539 ext/syck/rubyext.c VALUE
VALUE            1541 ext/syck/rubyext.c     VALUE self, val;
VALUE            1563 ext/syck/rubyext.c VALUE
VALUE            1565 ext/syck/rubyext.c     VALUE self, val;
VALUE            1568 ext/syck/rubyext.c     VALUE emitter = rb_ivar_get( self, s_emitter );
VALUE            1583 ext/syck/rubyext.c VALUE
VALUE            1585 ext/syck/rubyext.c     VALUE self, style;
VALUE            1606 ext/syck/rubyext.c VALUE
VALUE            1608 ext/syck/rubyext.c     VALUE class;
VALUE            1611 ext/syck/rubyext.c     VALUE obj;
VALUE            1621 ext/syck/rubyext.c VALUE
VALUE            1623 ext/syck/rubyext.c     VALUE self, type_id, val, style;
VALUE            1630 ext/syck/rubyext.c         VALUE hsh = rb_check_convert_type(val, T_HASH, "Hash", "to_hash");
VALUE            1631 ext/syck/rubyext.c         VALUE keys;
VALUE            1641 ext/syck/rubyext.c             VALUE key = rb_ary_entry(keys, i);
VALUE            1656 ext/syck/rubyext.c VALUE
VALUE            1658 ext/syck/rubyext.c     VALUE self, val;
VALUE            1665 ext/syck/rubyext.c         VALUE hsh = rb_check_convert_type(val, T_HASH, "Hash", "to_hash");
VALUE            1666 ext/syck/rubyext.c         VALUE keys;
VALUE            1677 ext/syck/rubyext.c             VALUE key = rb_ary_entry(keys, i);
VALUE            1689 ext/syck/rubyext.c VALUE
VALUE            1691 ext/syck/rubyext.c     VALUE self, key, val;
VALUE            1694 ext/syck/rubyext.c     VALUE emitter = rb_ivar_get( self, s_emitter );
VALUE            1710 ext/syck/rubyext.c VALUE
VALUE            1712 ext/syck/rubyext.c     VALUE self, style;
VALUE            1733 ext/syck/rubyext.c VALUE
VALUE            1735 ext/syck/rubyext.c     VALUE copy, orig;
VALUE            1757 ext/syck/rubyext.c VALUE
VALUE            1759 ext/syck/rubyext.c     VALUE self, type_id;
VALUE            1778 ext/syck/rubyext.c VALUE
VALUE            1780 ext/syck/rubyext.c     VALUE self;
VALUE            1782 ext/syck/rubyext.c     VALUE t;
VALUE            1841 ext/syck/rubyext.c     Data_Get_Struct((VALUE)data, SyckNode, n);
VALUE            1888 ext/syck/rubyext.c     VALUE dest = bonus->port;
VALUE            1902 ext/syck/rubyext.c     VALUE emitter, node;
VALUE            1942 ext/syck/rubyext.c VALUE syck_emitter_s_alloc _((VALUE));
VALUE            1943 ext/syck/rubyext.c VALUE
VALUE            1945 ext/syck/rubyext.c     VALUE class;
VALUE            1947 ext/syck/rubyext.c     VALUE pobj;
VALUE            1964 ext/syck/rubyext.c VALUE
VALUE            1967 ext/syck/rubyext.c     VALUE *argv;
VALUE            1968 ext/syck/rubyext.c     VALUE self;
VALUE            1970 ext/syck/rubyext.c     VALUE options, tmp;
VALUE            2009 ext/syck/rubyext.c VALUE
VALUE            2012 ext/syck/rubyext.c     VALUE *argv;
VALUE            2013 ext/syck/rubyext.c     VALUE self;
VALUE            2015 ext/syck/rubyext.c     VALUE oid, proc;
VALUE            2053 ext/syck/rubyext.c VALUE
VALUE            2055 ext/syck/rubyext.c     VALUE self, node;
VALUE            2063 ext/syck/rubyext.c VALUE
VALUE            2065 ext/syck/rubyext.c     VALUE self, resolver;
VALUE            2074 ext/syck/rubyext.c VALUE
VALUE            2076 ext/syck/rubyext.c     VALUE self, emitter;
VALUE            2085 ext/syck/rubyext.c VALUE
VALUE            2088 ext/syck/rubyext.c     VALUE *argv;
VALUE            2089 ext/syck/rubyext.c     VALUE self;
VALUE            2091 ext/syck/rubyext.c     VALUE type_id, style, map;
VALUE            2104 ext/syck/rubyext.c VALUE
VALUE            2107 ext/syck/rubyext.c     VALUE *argv;
VALUE            2108 ext/syck/rubyext.c     VALUE self;
VALUE            2110 ext/syck/rubyext.c     VALUE type_id, style, seq;
VALUE            2125 ext/syck/rubyext.c VALUE
VALUE            2128 ext/syck/rubyext.c     VALUE *argv;
VALUE            2129 ext/syck/rubyext.c     VALUE self;
VALUE            2131 ext/syck/rubyext.c     VALUE type_id, str, style, scalar;
VALUE            2146 ext/syck/rubyext.c     VALUE rb_yaml = rb_define_module( "YAML" );
VALUE            2147 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             140 ext/win32ole/win32ole.c VALUE cWIN32OLE;
VALUE             141 ext/win32ole/win32ole.c VALUE cWIN32OLE_TYPE;
VALUE             142 ext/win32ole/win32ole.c VALUE cWIN32OLE_VARIABLE;
VALUE             143 ext/win32ole/win32ole.c VALUE cWIN32OLE_METHOD;
VALUE             144 ext/win32ole/win32ole.c VALUE cWIN32OLE_PARAM;
VALUE             145 ext/win32ole/win32ole.c VALUE cWIN32OLE_EVENT;
VALUE             146 ext/win32ole/win32ole.c VALUE eWIN32OLE_RUNTIME_ERROR;
VALUE             147 ext/win32ole/win32ole.c VALUE mWIN32OLE_VARIANT;
VALUE             149 ext/win32ole/win32ole.c static VALUE ary_ole_event;
VALUE             155 ext/win32ole/win32ole.c static VALUE com_hash;
VALUE             195 ext/win32ole/win32ole.c static VALUE folemethod_s_allocate _((VALUE));
VALUE             196 ext/win32ole/win32ole.c static VALUE olemethod_set_member _((VALUE, ITypeInfo *, ITypeInfo *, int, VALUE));
VALUE             197 ext/win32ole/win32ole.c static VALUE foletype_s_allocate _((VALUE));
VALUE             198 ext/win32ole/win32ole.c static VALUE oletype_set_member  _((VALUE, ITypeInfo *, VALUE));
VALUE             199 ext/win32ole/win32ole.c static VALUE olemethod_from_typeinfo _((VALUE, ITypeInfo *, VALUE));
VALUE             202 ext/win32ole/win32ole.c static VALUE ole_variant2val(VARIANT*);
VALUE             203 ext/win32ole/win32ole.c static void ole_val2variant(VALUE, VARIANT*);
VALUE             209 ext/win32ole/win32ole.c     VALUE obj;
VALUE             291 ext/win32ole/win32ole.c     VALUE v;
VALUE             295 ext/win32ole/win32ole.c     VALUE* parg = ALLOCA_N(VALUE, args);
VALUE             313 ext/win32ole/win32ole.c     VALUE val;
VALUE             328 ext/win32ole/win32ole.c         st_insert(tbl, val, (VALUE)pdisp | FIXNUM_FLAG);
VALUE             440 ext/win32ole/win32ole.c     VALUE tmobj;
VALUE             456 ext/win32ole/win32ole.c static VALUE
VALUE             489 ext/win32ole/win32ole.c static VALUE
VALUE             493 ext/win32ole/win32ole.c     VALUE msg = Qnil;
VALUE             523 ext/win32ole/win32ole.c static VALUE
VALUE             530 ext/win32ole/win32ole.c     VALUE error_msg;
VALUE             570 ext/win32ole/win32ole.c ole_raise(HRESULT hr, VALUE ecs, const char *fmt, ...)
VALUE             574 ext/win32ole/win32ole.c     VALUE exc;
VALUE             581 ext/win32ole/win32ole.c     VALUE err_msg;
VALUE             680 ext/win32ole/win32ole.c static VALUE
VALUE             686 ext/win32ole/win32ole.c     VALUE vstr = rb_str_new2(p);
VALUE             693 ext/win32ole/win32ole.c static VALUE
VALUE             695 ext/win32ole/win32ole.c     VALUE val;
VALUE             698 ext/win32ole/win32ole.c     VALUE obj = Qnil;
VALUE             714 ext/win32ole/win32ole.c     VALUE val;
VALUE             717 ext/win32ole/win32ole.c     VALUE val1;
VALUE             738 ext/win32ole/win32ole.c     VALUE val;
VALUE             757 ext/win32ole/win32ole.c         VALUE val1;
VALUE             854 ext/win32ole/win32ole.c     VALUE val;
VALUE             862 ext/win32ole/win32ole.c static VALUE
VALUE             864 ext/win32ole/win32ole.c     VALUE self;
VALUE             877 ext/win32ole/win32ole.c static VALUE fole_s_allocate _((VALUE));
VALUE             878 ext/win32ole/win32ole.c static VALUE
VALUE             880 ext/win32ole/win32ole.c     VALUE klass;
VALUE             883 ext/win32ole/win32ole.c     VALUE obj;
VALUE             890 ext/win32ole/win32ole.c static VALUE
VALUE             892 ext/win32ole/win32ole.c     VALUE klass;
VALUE             895 ext/win32ole/win32ole.c     VALUE *argv;
VALUE             897 ext/win32ole/win32ole.c     VALUE obj = fole_s_allocate(klass);
VALUE             902 ext/win32ole/win32ole.c static VALUE
VALUE             906 ext/win32ole/win32ole.c     VALUE obj = Qnil;
VALUE             916 ext/win32ole/win32ole.c         VALUE val;
VALUE             917 ext/win32ole/win32ole.c         VALUE val2;
VALUE            1119 ext/win32ole/win32ole.c     VALUE key;
VALUE            1125 ext/win32ole/win32ole.c static VALUE
VALUE            1141 ext/win32ole/win32ole.c static VALUE
VALUE            1155 ext/win32ole/win32ole.c static VALUE
VALUE            1157 ext/win32ole/win32ole.c     VALUE ole;
VALUE            1164 ext/win32ole/win32ole.c     VALUE typelib;
VALUE            1165 ext/win32ole/win32ole.c     VALUE vclsid;
VALUE            1191 ext/win32ole/win32ole.c static VALUE
VALUE            1193 ext/win32ole/win32ole.c     VALUE ole;
VALUE            1200 ext/win32ole/win32ole.c     VALUE typelib;
VALUE            1201 ext/win32ole/win32ole.c     VALUE file = Qnil;
VALUE            1202 ext/win32ole/win32ole.c     VALUE clsid;
VALUE            1203 ext/win32ole/win32ole.c     VALUE ver;
VALUE            1204 ext/win32ole/win32ole.c     VALUE lang;
VALUE            1250 ext/win32ole/win32ole.c static VALUE
VALUE            1252 ext/win32ole/win32ole.c     VALUE ole;
VALUE            1254 ext/win32ole/win32ole.c     VALUE file = typelib_file_from_clsid(ole);
VALUE            1264 ext/win32ole/win32ole.c     VALUE klass;
VALUE            1265 ext/win32ole/win32ole.c     VALUE self;
VALUE            1277 ext/win32ole/win32ole.c     VALUE val;
VALUE            1278 ext/win32ole/win32ole.c     VALUE constant;
VALUE            1329 ext/win32ole/win32ole.c     VALUE host;
VALUE            1330 ext/win32ole/win32ole.c     VALUE com;
VALUE            1335 ext/win32ole/win32ole.c     VALUE subkey;
VALUE            1368 ext/win32ole/win32ole.c static VALUE
VALUE            1371 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            1372 ext/win32ole/win32ole.c     VALUE self;
VALUE            1374 ext/win32ole/win32ole.c     VALUE ole, host, others;
VALUE            1421 ext/win32ole/win32ole.c static VALUE
VALUE            1423 ext/win32ole/win32ole.c     VALUE moniker;
VALUE            1425 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            1426 ext/win32ole/win32ole.c     VALUE self;
VALUE            1475 ext/win32ole/win32ole.c static VALUE
VALUE            1478 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            1479 ext/win32ole/win32ole.c     VALUE self;
VALUE            1481 ext/win32ole/win32ole.c     VALUE svr_name;
VALUE            1482 ext/win32ole/win32ole.c     VALUE others;
VALUE            1558 ext/win32ole/win32ole.c static VALUE
VALUE            1561 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            1562 ext/win32ole/win32ole.c     VALUE self;
VALUE            1564 ext/win32ole/win32ole.c     VALUE ole;
VALUE            1565 ext/win32ole/win32ole.c     VALUE klass;
VALUE            1572 ext/win32ole/win32ole.c     VALUE file;
VALUE            1627 ext/win32ole/win32ole.c static VALUE
VALUE            1630 ext/win32ole/win32ole.c     VALUE classes;
VALUE            1638 ext/win32ole/win32ole.c     VALUE type;
VALUE            1681 ext/win32ole/win32ole.c static VALUE
VALUE            1683 ext/win32ole/win32ole.c     VALUE self;
VALUE            1684 ext/win32ole/win32ole.c     VALUE obj;
VALUE            1700 ext/win32ole/win32ole.c static VALUE
VALUE            1702 ext/win32ole/win32ole.c     VALUE self;
VALUE            1703 ext/win32ole/win32ole.c     VALUE obj;
VALUE            1718 ext/win32ole/win32ole.c     VALUE helpfile;
VALUE            1719 ext/win32ole/win32ole.c     VALUE helpcontext;
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 target;
VALUE            1757 ext/win32ole/win32ole.c     VALUE helpcontext;
VALUE            1758 ext/win32ole/win32ole.c     VALUE helpfile;
VALUE            1759 ext/win32ole/win32ole.c     VALUE name;
VALUE            1792 ext/win32ole/win32ole.c static VALUE
VALUE            1794 ext/win32ole/win32ole.c     VALUE self;
VALUE            1806 ext/win32ole/win32ole.c static VALUE
VALUE            1808 ext/win32ole/win32ole.c     VALUE self;
VALUE            1809 ext/win32ole/win32ole.c     VALUE vcp;
VALUE            1853 ext/win32ole/win32ole.c static VALUE
VALUE            1856 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            1857 ext/win32ole/win32ole.c     VALUE self;
VALUE            1859 ext/win32ole/win32ole.c     VALUE svr_name;
VALUE            1860 ext/win32ole/win32ole.c     VALUE host;
VALUE            1861 ext/win32ole/win32ole.c     VALUE others;
VALUE            1909 ext/win32ole/win32ole.c static VALUE
VALUE            1911 ext/win32ole/win32ole.c     VALUE pair;
VALUE            1915 ext/win32ole/win32ole.c     VALUE key, value;
VALUE            1946 ext/win32ole/win32ole.c static VALUE
VALUE            1951 ext/win32ole/win32ole.c     VALUE argv = rb_const_get(cWIN32OLE, rb_intern("ARGV"));
VALUE            1962 ext/win32ole/win32ole.c static VALUE
VALUE            1965 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            1966 ext/win32ole/win32ole.c     VALUE self;
VALUE            1972 ext/win32ole/win32ole.c     VALUE cmd;
VALUE            1973 ext/win32ole/win32ole.c     VALUE paramS;
VALUE            1974 ext/win32ole/win32ole.c     VALUE param;
VALUE            1975 ext/win32ole/win32ole.c     VALUE obj;
VALUE            1976 ext/win32ole/win32ole.c     VALUE v;
VALUE            2028 ext/win32ole/win32ole.c         rb_iterate(rb_each, param, hash2named_arg, (VALUE)&op);
VALUE            2177 ext/win32ole/win32ole.c static VALUE
VALUE            2180 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            2181 ext/win32ole/win32ole.c     VALUE self;
VALUE            2186 ext/win32ole/win32ole.c static VALUE
VALUE            2188 ext/win32ole/win32ole.c     VALUE self;
VALUE            2189 ext/win32ole/win32ole.c     VALUE dispid;
VALUE            2190 ext/win32ole/win32ole.c     VALUE args;
VALUE            2191 ext/win32ole/win32ole.c     VALUE types;
VALUE            2202 ext/win32ole/win32ole.c     VALUE obj = Qnil;
VALUE            2203 ext/win32ole/win32ole.c     VALUE tp, param;
VALUE            2204 ext/win32ole/win32ole.c     VALUE v;
VALUE            2259 ext/win32ole/win32ole.c                     VALUE elem = rb_ary_entry(param, ent);
VALUE            2392 ext/win32ole/win32ole.c static VALUE
VALUE            2394 ext/win32ole/win32ole.c     VALUE self;
VALUE            2395 ext/win32ole/win32ole.c     VALUE dispid;
VALUE            2396 ext/win32ole/win32ole.c     VALUE args;
VALUE            2397 ext/win32ole/win32ole.c     VALUE types;
VALUE            2414 ext/win32ole/win32ole.c static VALUE
VALUE            2416 ext/win32ole/win32ole.c     VALUE self;
VALUE            2417 ext/win32ole/win32ole.c     VALUE dispid;
VALUE            2418 ext/win32ole/win32ole.c     VALUE args;
VALUE            2419 ext/win32ole/win32ole.c     VALUE types;
VALUE            2436 ext/win32ole/win32ole.c static VALUE
VALUE            2438 ext/win32ole/win32ole.c     VALUE self;
VALUE            2439 ext/win32ole/win32ole.c     VALUE dispid;
VALUE            2440 ext/win32ole/win32ole.c     VALUE args;
VALUE            2441 ext/win32ole/win32ole.c     VALUE types;
VALUE            2460 ext/win32ole/win32ole.c static VALUE
VALUE            2463 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            2464 ext/win32ole/win32ole.c     VALUE self;
VALUE            2478 ext/win32ole/win32ole.c static VALUE
VALUE            2480 ext/win32ole/win32ole.c     VALUE self, property;
VALUE            2485 ext/win32ole/win32ole.c static VALUE
VALUE            2487 ext/win32ole/win32ole.c     VALUE self, property, value;
VALUE            2500 ext/win32ole/win32ole.c     VALUE v;
VALUE            2550 ext/win32ole/win32ole.c static VALUE
VALUE            2552 ext/win32ole/win32ole.c     VALUE self;
VALUE            2562 ext/win32ole/win32ole.c static VALUE
VALUE            2564 ext/win32ole/win32ole.c     VALUE pEnumV;
VALUE            2567 ext/win32ole/win32ole.c     VALUE obj = Qnil;
VALUE            2579 ext/win32ole/win32ole.c static VALUE
VALUE            2581 ext/win32ole/win32ole.c     VALUE pEnumV;
VALUE            2602 ext/win32ole/win32ole.c static VALUE
VALUE            2604 ext/win32ole/win32ole.c     VALUE self;
VALUE            2650 ext/win32ole/win32ole.c     rb_ensure(ole_each_sub, (VALUE)pEnum, ole_ienum_free, (VALUE)pEnum);
VALUE            2660 ext/win32ole/win32ole.c static VALUE
VALUE            2663 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            2664 ext/win32ole/win32ole.c     VALUE self;
VALUE            2686 ext/win32ole/win32ole.c static VALUE
VALUE            2688 ext/win32ole/win32ole.c     VALUE self;
VALUE            2691 ext/win32ole/win32ole.c     VALUE name;
VALUE            2698 ext/win32ole/win32ole.c     VALUE fname;
VALUE            2699 ext/win32ole/win32ole.c     VALUE method = Qnil;
VALUE            2727 ext/win32ole/win32ole.c static VALUE
VALUE            2729 ext/win32ole/win32ole.c     VALUE self;
VALUE            2731 ext/win32ole/win32ole.c     VALUE name;
VALUE            2738 ext/win32ole/win32ole.c     VALUE method = Qnil;
VALUE            2761 ext/win32ole/win32ole.c static VALUE
VALUE            2765 ext/win32ole/win32ole.c     VALUE     methods;
VALUE            2773 ext/win32ole/win32ole.c     VALUE method;
VALUE            2805 ext/win32ole/win32ole.c static VALUE
VALUE            2815 ext/win32ole/win32ole.c     VALUE methods = rb_ary_new();
VALUE            2844 ext/win32ole/win32ole.c     VALUE type;
VALUE            2879 ext/win32ole/win32ole.c static VALUE
VALUE            2881 ext/win32ole/win32ole.c     VALUE self;
VALUE            2886 ext/win32ole/win32ole.c     VALUE methods;
VALUE            2911 ext/win32ole/win32ole.c static VALUE
VALUE            2913 ext/win32ole/win32ole.c     VALUE self;
VALUE            2928 ext/win32ole/win32ole.c static VALUE
VALUE            2930 ext/win32ole/win32ole.c     VALUE self;
VALUE            2945 ext/win32ole/win32ole.c static VALUE
VALUE            2947 ext/win32ole/win32ole.c     VALUE self;
VALUE            2963 ext/win32ole/win32ole.c static VALUE
VALUE            2965 ext/win32ole/win32ole.c     VALUE self;
VALUE            2979 ext/win32ole/win32ole.c static VALUE
VALUE            2981 ext/win32ole/win32ole.c     VALUE self;
VALUE            2990 ext/win32ole/win32ole.c     VALUE type = Qnil;
VALUE            3043 ext/win32ole/win32ole.c static VALUE
VALUE            3047 ext/win32ole/win32ole.c     VALUE typedetails;
VALUE            3052 ext/win32ole/win32ole.c     VALUE type = Qnil;
VALUE            3071 ext/win32ole/win32ole.c static VALUE ole_typedesc2val();
VALUE            3072 ext/win32ole/win32ole.c static VALUE
VALUE            3076 ext/win32ole/win32ole.c     VALUE typedetails;
VALUE            3079 ext/win32ole/win32ole.c     VALUE type = rb_str_new2("");
VALUE            3092 ext/win32ole/win32ole.c static VALUE
VALUE            3096 ext/win32ole/win32ole.c     VALUE typedetails;
VALUE            3098 ext/win32ole/win32ole.c     VALUE str;
VALUE            3224 ext/win32ole/win32ole.c static VALUE
VALUE            3226 ext/win32ole/win32ole.c     VALUE self;
VALUE            3227 ext/win32ole/win32ole.c     VALUE cmdname;
VALUE            3232 ext/win32ole/win32ole.c     VALUE method, obj;
VALUE            3255 ext/win32ole/win32ole.c static VALUE
VALUE            3257 ext/win32ole/win32ole.c     VALUE self;
VALUE            3258 ext/win32ole/win32ole.c     VALUE typelib;
VALUE            3260 ext/win32ole/win32ole.c     VALUE file, classes;
VALUE            3292 ext/win32ole/win32ole.c static VALUE
VALUE            3294 ext/win32ole/win32ole.c     VALUE self;
VALUE            3300 ext/win32ole/win32ole.c     VALUE clsid;
VALUE            3301 ext/win32ole/win32ole.c     VALUE ver;
VALUE            3302 ext/win32ole/win32ole.c     VALUE v = Qnil;
VALUE            3303 ext/win32ole/win32ole.c     VALUE typelibs = rb_ary_new();
VALUE            3340 ext/win32ole/win32ole.c static VALUE
VALUE            3342 ext/win32ole/win32ole.c     VALUE self;
VALUE            3347 ext/win32ole/win32ole.c     VALUE clsid;
VALUE            3348 ext/win32ole/win32ole.c     VALUE v = rb_str_new2("");
VALUE            3349 ext/win32ole/win32ole.c     VALUE progids = rb_ary_new();
VALUE            3372 ext/win32ole/win32ole.c static VALUE
VALUE            3374 ext/win32ole/win32ole.c     VALUE klass;
VALUE            3377 ext/win32ole/win32ole.c     VALUE obj;
VALUE            3384 ext/win32ole/win32ole.c static VALUE
VALUE            3386 ext/win32ole/win32ole.c     VALUE self;
VALUE            3388 ext/win32ole/win32ole.c     VALUE name;
VALUE            3398 ext/win32ole/win32ole.c static VALUE
VALUE            3400 ext/win32ole/win32ole.c     VALUE self;
VALUE            3402 ext/win32ole/win32ole.c     VALUE oleclass;
VALUE            3409 ext/win32ole/win32ole.c     VALUE typelib;
VALUE            3412 ext/win32ole/win32ole.c     VALUE found = Qfalse;
VALUE            3450 ext/win32ole/win32ole.c static VALUE
VALUE            3452 ext/win32ole/win32ole.c     VALUE self;
VALUE            3453 ext/win32ole/win32ole.c     VALUE typelib;
VALUE            3454 ext/win32ole/win32ole.c     VALUE oleclass;
VALUE            3456 ext/win32ole/win32ole.c     VALUE file;
VALUE            3489 ext/win32ole/win32ole.c static VALUE
VALUE            3491 ext/win32ole/win32ole.c     VALUE self;
VALUE            3496 ext/win32ole/win32ole.c static VALUE
VALUE            3502 ext/win32ole/win32ole.c     VALUE type = Qnil;
VALUE            3551 ext/win32ole/win32ole.c static VALUE
VALUE            3553 ext/win32ole/win32ole.c     VALUE self;
VALUE            3560 ext/win32ole/win32ole.c static VALUE
VALUE            3568 ext/win32ole/win32ole.c     VALUE guid = Qnil;
VALUE            3588 ext/win32ole/win32ole.c static VALUE
VALUE            3590 ext/win32ole/win32ole.c     VALUE self;
VALUE            3597 ext/win32ole/win32ole.c static VALUE
VALUE            3604 ext/win32ole/win32ole.c     VALUE progid = Qnil;
VALUE            3623 ext/win32ole/win32ole.c static VALUE
VALUE            3625 ext/win32ole/win32ole.c     VALUE self;
VALUE            3633 ext/win32ole/win32ole.c static VALUE
VALUE            3639 ext/win32ole/win32ole.c     VALUE visible;
VALUE            3660 ext/win32ole/win32ole.c static VALUE
VALUE            3662 ext/win32ole/win32ole.c     VALUE self;
VALUE            3669 ext/win32ole/win32ole.c static VALUE
VALUE            3673 ext/win32ole/win32ole.c     VALUE ver;
VALUE            3692 ext/win32ole/win32ole.c static VALUE
VALUE            3694 ext/win32ole/win32ole.c     VALUE self;
VALUE            3701 ext/win32ole/win32ole.c static VALUE
VALUE            3705 ext/win32ole/win32ole.c     VALUE ver;
VALUE            3724 ext/win32ole/win32ole.c static VALUE
VALUE            3726 ext/win32ole/win32ole.c     VALUE self;
VALUE            3733 ext/win32ole/win32ole.c static VALUE
VALUE            3737 ext/win32ole/win32ole.c     VALUE typekind;
VALUE            3757 ext/win32ole/win32ole.c static VALUE
VALUE            3759 ext/win32ole/win32ole.c     VALUE self;
VALUE            3766 ext/win32ole/win32ole.c static VALUE
VALUE            3787 ext/win32ole/win32ole.c static VALUE
VALUE            3789 ext/win32ole/win32ole.c     VALUE self;
VALUE            3796 ext/win32ole/win32ole.c static VALUE
VALUE            3802 ext/win32ole/win32ole.c     VALUE alias = Qnil;
VALUE            3824 ext/win32ole/win32ole.c static VALUE
VALUE            3826 ext/win32ole/win32ole.c     VALUE self;
VALUE            3833 ext/win32ole/win32ole.c static VALUE
VALUE            3855 ext/win32ole/win32ole.c static VALUE
VALUE            3857 ext/win32ole/win32ole.c     VALUE self;
VALUE            3864 ext/win32ole/win32ole.c static VALUE
VALUE            3885 ext/win32ole/win32ole.c static VALUE
VALUE            3887 ext/win32ole/win32ole.c     VALUE self;
VALUE            3894 ext/win32ole/win32ole.c static VALUE
VALUE            3906 ext/win32ole/win32ole.c     VALUE var;
VALUE            3907 ext/win32ole/win32ole.c     VALUE variables = rb_ary_new();
VALUE            3959 ext/win32ole/win32ole.c static VALUE
VALUE            3961 ext/win32ole/win32ole.c     VALUE self;
VALUE            3980 ext/win32ole/win32ole.c static VALUE
VALUE            3983 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            3984 ext/win32ole/win32ole.c     VALUE self;
VALUE            4017 ext/win32ole/win32ole.c static VALUE
VALUE            4019 ext/win32ole/win32ole.c     VALUE self;
VALUE            4030 ext/win32ole/win32ole.c     VALUE type;
VALUE            4059 ext/win32ole/win32ole.c static VALUE
VALUE            4061 ext/win32ole/win32ole.c     VALUE self;
VALUE            4074 ext/win32ole/win32ole.c     VALUE type = rb_ary_new();
VALUE            4095 ext/win32ole/win32ole.c static VALUE
VALUE            4097 ext/win32ole/win32ole.c     VALUE self;
VALUE            4110 ext/win32ole/win32ole.c     VALUE val = Qnil;
VALUE            4141 ext/win32ole/win32ole.c static VALUE
VALUE            4143 ext/win32ole/win32ole.c     VALUE self;
VALUE            4156 ext/win32ole/win32ole.c     VALUE visible = Qfalse;
VALUE            4189 ext/win32ole/win32ole.c static VALUE
VALUE            4191 ext/win32ole/win32ole.c     VALUE self;
VALUE            4198 ext/win32ole/win32ole.c static VALUE
VALUE            4205 ext/win32ole/win32ole.c     VALUE kind = rb_str_new2("UNKNOWN");
VALUE            4248 ext/win32ole/win32ole.c static VALUE
VALUE            4250 ext/win32ole/win32ole.c     VALUE self;
VALUE            4257 ext/win32ole/win32ole.c static VALUE
VALUE            4264 ext/win32ole/win32ole.c     VALUE kind = Qnil;
VALUE            4291 ext/win32ole/win32ole.c static VALUE
VALUE            4293 ext/win32ole/win32ole.c     VALUE self;
VALUE            4306 ext/win32ole/win32ole.c static VALUE
VALUE            4308 ext/win32ole/win32ole.c     VALUE self;
VALUE            4312 ext/win32ole/win32ole.c     VALUE name;
VALUE            4325 ext/win32ole/win32ole.c static VALUE
VALUE            4327 ext/win32ole/win32ole.c     VALUE klass;
VALUE            4330 ext/win32ole/win32ole.c     VALUE obj;
VALUE            4353 ext/win32ole/win32ole.c static VALUE
VALUE            4355 ext/win32ole/win32ole.c     VALUE self;
VALUE            4356 ext/win32ole/win32ole.c     VALUE oletype;
VALUE            4357 ext/win32ole/win32ole.c     VALUE method;
VALUE            4360 ext/win32ole/win32ole.c     VALUE obj = Qnil;
VALUE            4387 ext/win32ole/win32ole.c static VALUE
VALUE            4389 ext/win32ole/win32ole.c     VALUE self;
VALUE            4394 ext/win32ole/win32ole.c static VALUE
VALUE            4401 ext/win32ole/win32ole.c     VALUE type;
VALUE            4422 ext/win32ole/win32ole.c static VALUE
VALUE            4424 ext/win32ole/win32ole.c     VALUE self;
VALUE            4431 ext/win32ole/win32ole.c static VALUE
VALUE            4438 ext/win32ole/win32ole.c     VALUE vt;
VALUE            4459 ext/win32ole/win32ole.c static VALUE
VALUE            4461 ext/win32ole/win32ole.c     VALUE self;
VALUE            4468 ext/win32ole/win32ole.c static VALUE
VALUE            4475 ext/win32ole/win32ole.c     VALUE type = rb_ary_new();
VALUE            4496 ext/win32ole/win32ole.c static VALUE
VALUE            4498 ext/win32ole/win32ole.c     VALUE self;
VALUE            4505 ext/win32ole/win32ole.c static VALUE
VALUE            4512 ext/win32ole/win32ole.c     VALUE invkind;
VALUE            4521 ext/win32ole/win32ole.c static VALUE
VALUE            4526 ext/win32ole/win32ole.c     VALUE type = rb_str_new2("UNKNOWN");
VALUE            4527 ext/win32ole/win32ole.c     VALUE invkind = ole_method_invkind(pTypeInfo, method_index);
VALUE            4553 ext/win32ole/win32ole.c static VALUE
VALUE            4555 ext/win32ole/win32ole.c     VALUE self;
VALUE            4573 ext/win32ole/win32ole.c static VALUE
VALUE            4575 ext/win32ole/win32ole.c     VALUE self;
VALUE            4582 ext/win32ole/win32ole.c static VALUE
VALUE            4589 ext/win32ole/win32ole.c     VALUE visible;
VALUE            4613 ext/win32ole/win32ole.c static VALUE
VALUE            4615 ext/win32ole/win32ole.c     VALUE self;
VALUE            4625 ext/win32ole/win32ole.c     VALUE method_name;
VALUE            4635 ext/win32ole/win32ole.c     VALUE name;
VALUE            4636 ext/win32ole/win32ole.c     VALUE event = Qfalse;
VALUE            4698 ext/win32ole/win32ole.c static VALUE
VALUE            4700 ext/win32ole/win32ole.c     VALUE self;
VALUE            4720 ext/win32ole/win32ole.c static VALUE
VALUE            4722 ext/win32ole/win32ole.c     VALUE self;
VALUE            4736 ext/win32ole/win32ole.c static VALUE
VALUE            4758 ext/win32ole/win32ole.c static VALUE
VALUE            4783 ext/win32ole/win32ole.c static VALUE
VALUE            4785 ext/win32ole/win32ole.c     VALUE self;
VALUE            4792 ext/win32ole/win32ole.c static VALUE
VALUE            4816 ext/win32ole/win32ole.c static VALUE
VALUE            4818 ext/win32ole/win32ole.c     VALUE self;
VALUE            4826 ext/win32ole/win32ole.c static VALUE
VALUE            4849 ext/win32ole/win32ole.c static VALUE
VALUE            4851 ext/win32ole/win32ole.c     VALUE self;
VALUE            4858 ext/win32ole/win32ole.c static VALUE
VALUE            4865 ext/win32ole/win32ole.c     VALUE dispid = Qnil;
VALUE            4883 ext/win32ole/win32ole.c static VALUE
VALUE            4885 ext/win32ole/win32ole.c     VALUE self;
VALUE            4892 ext/win32ole/win32ole.c static VALUE
VALUE            4899 ext/win32ole/win32ole.c     VALUE offset_vtbl = Qnil;
VALUE            4917 ext/win32ole/win32ole.c static VALUE
VALUE            4919 ext/win32ole/win32ole.c     VALUE self;
VALUE            4926 ext/win32ole/win32ole.c static VALUE
VALUE            4933 ext/win32ole/win32ole.c     VALUE size_params = Qnil;
VALUE            4952 ext/win32ole/win32ole.c static VALUE
VALUE            4954 ext/win32ole/win32ole.c     VALUE self;
VALUE            4961 ext/win32ole/win32ole.c static VALUE
VALUE            4968 ext/win32ole/win32ole.c     VALUE size_opt_params = Qnil;
VALUE            4986 ext/win32ole/win32ole.c static VALUE
VALUE            4988 ext/win32ole/win32ole.c     VALUE self;
VALUE            4995 ext/win32ole/win32ole.c static VALUE
VALUE            5005 ext/win32ole/win32ole.c     VALUE param;
VALUE            5006 ext/win32ole/win32ole.c     VALUE params = rb_ary_new();
VALUE            5049 ext/win32ole/win32ole.c static VALUE
VALUE            5051 ext/win32ole/win32ole.c     VALUE self;
VALUE            5075 ext/win32ole/win32ole.c static VALUE
VALUE            5077 ext/win32ole/win32ole.c     VALUE self;
VALUE            5082 ext/win32ole/win32ole.c static VALUE
VALUE            5090 ext/win32ole/win32ole.c     VALUE type = rb_str_new2("UNKNOWN");
VALUE            5110 ext/win32ole/win32ole.c static VALUE
VALUE            5112 ext/win32ole/win32ole.c     VALUE self;
VALUE            5120 ext/win32ole/win32ole.c static VALUE
VALUE            5128 ext/win32ole/win32ole.c     VALUE typedetail = rb_ary_new();
VALUE            5148 ext/win32ole/win32ole.c static VALUE
VALUE            5150 ext/win32ole/win32ole.c     VALUE self;
VALUE            5158 ext/win32ole/win32ole.c static VALUE
VALUE            5167 ext/win32ole/win32ole.c     VALUE ret = Qfalse;
VALUE            5187 ext/win32ole/win32ole.c static VALUE foleparam_input(self)
VALUE            5188 ext/win32ole/win32ole.c     VALUE self;
VALUE            5215 ext/win32ole/win32ole.c static VALUE foleparam_output(self)
VALUE            5216 ext/win32ole/win32ole.c     VALUE self;
VALUE            5234 ext/win32ole/win32ole.c static VALUE foleparam_optional(self)
VALUE            5235 ext/win32ole/win32ole.c     VALUE self;
VALUE            5254 ext/win32ole/win32ole.c static VALUE foleparam_retval(self)
VALUE            5255 ext/win32ole/win32ole.c     VALUE self;
VALUE            5263 ext/win32ole/win32ole.c static VALUE
VALUE            5275 ext/win32ole/win32ole.c     VALUE defval = Qnil;
VALUE            5318 ext/win32ole/win32ole.c static VALUE foleparam_default(self)
VALUE            5319 ext/win32ole/win32ole.c     VALUE self;
VALUE            5408 ext/win32ole/win32ole.c     VALUE ary;
VALUE            5409 ext/win32ole/win32ole.c     VALUE ev;
VALUE            5411 ext/win32ole/win32ole.c     VALUE event;
VALUE            5412 ext/win32ole/win32ole.c     VALUE def_event;
VALUE            5413 ext/win32ole/win32ole.c     VALUE event_name;
VALUE            5435 ext/win32ole/win32ole.c static VALUE
VALUE            5437 ext/win32ole/win32ole.c     VALUE ary;
VALUE            5438 ext/win32ole/win32ole.c     VALUE ev;
VALUE            5441 ext/win32ole/win32ole.c     VALUE event;
VALUE            5442 ext/win32ole/win32ole.c     VALUE def_event;
VALUE            5443 ext/win32ole/win32ole.c     VALUE event_name;
VALUE            5465 ext/win32ole/win32ole.c     VALUE val;
VALUE            5535 ext/win32ole/win32ole.c     VALUE ary;
VALUE            5539 ext/win32ole/win32ole.c     VALUE v;
VALUE            5566 ext/win32ole/win32ole.c     VALUE ary, obj, event, handler, args, argv, ev, result;
VALUE            5657 ext/win32ole/win32ole.c     VALUE ole;
VALUE            5772 ext/win32ole/win32ole.c     VALUE ole;
VALUE            5886 ext/win32ole/win32ole.c static VALUE fev_s_allocate _((VALUE));
VALUE            5887 ext/win32ole/win32ole.c static VALUE
VALUE            5889 ext/win32ole/win32ole.c     VALUE klass;
VALUE            5891 ext/win32ole/win32ole.c     VALUE obj;
VALUE            5908 ext/win32ole/win32ole.c static VALUE
VALUE            5911 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            5912 ext/win32ole/win32ole.c     VALUE self;
VALUE            5914 ext/win32ole/win32ole.c     VALUE ole, itf;
VALUE            5997 ext/win32ole/win32ole.c static VALUE
VALUE            5999 ext/win32ole/win32ole.c     VALUE klass;
VALUE            6008 ext/win32ole/win32ole.c     VALUE obj;
VALUE            6009 ext/win32ole/win32ole.c     VALUE event;
VALUE            6010 ext/win32ole/win32ole.c     VALUE data;
VALUE            6013 ext/win32ole/win32ole.c     VALUE events = rb_ivar_get(obj, id_events);
VALUE            6025 ext/win32ole/win32ole.c static VALUE
VALUE            6028 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            6029 ext/win32ole/win32ole.c     VALUE self;
VALUE            6030 ext/win32ole/win32ole.c     VALUE is_ary_arg;
VALUE            6032 ext/win32ole/win32ole.c     VALUE event, args, data;
VALUE            6052 ext/win32ole/win32ole.c static VALUE
VALUE            6055 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            6056 ext/win32ole/win32ole.c     VALUE self;
VALUE            6069 ext/win32ole/win32ole.c static VALUE
VALUE            6072 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            6073 ext/win32ole/win32ole.c     VALUE self;
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 _((struct gzfile*));
VALUE             124 ext/zlib/zlib.c static void gzfile_calc_crc _((struct gzfile*, VALUE));
VALUE             125 ext/zlib/zlib.c static VALUE gzfile_read _((struct gzfile*, int));
VALUE             126 ext/zlib/zlib.c static VALUE gzfile_read_all _((struct gzfile*));
VALUE             128 ext/zlib/zlib.c static VALUE gzfile_finalize _((VALUE));
VALUE             132 ext/zlib/zlib.c static VALUE gzfile_reader_get_unused _((struct gzfile*));
VALUE             133 ext/zlib/zlib.c static struct gzfile *get_gzfile _((VALUE));
VALUE             134 ext/zlib/zlib.c static VALUE gzfile_ensure_close _((VALUE));
VALUE             135 ext/zlib/zlib.c static VALUE rb_gzfile_s_wrap _((int, VALUE*, VALUE));
VALUE             136 ext/zlib/zlib.c static VALUE gzfile_s_open _((int, VALUE*, VALUE, const char*));
VALUE             138 ext/zlib/zlib.c static VALUE rb_gzfile_to_io _((VALUE));
VALUE             139 ext/zlib/zlib.c static VALUE rb_gzfile_crc _((VALUE));
VALUE             140 ext/zlib/zlib.c static VALUE rb_gzfile_mtime _((VALUE));
VALUE             141 ext/zlib/zlib.c static VALUE rb_gzfile_level _((VALUE));
VALUE             142 ext/zlib/zlib.c static VALUE rb_gzfile_os_code _((VALUE));
VALUE             143 ext/zlib/zlib.c static VALUE rb_gzfile_orig_name _((VALUE));
VALUE             144 ext/zlib/zlib.c static VALUE rb_gzfile_comment _((VALUE));
VALUE             145 ext/zlib/zlib.c static VALUE rb_gzfile_lineno _((VALUE));
VALUE             146 ext/zlib/zlib.c static VALUE rb_gzfile_set_lineno _((VALUE, VALUE));
VALUE             147 ext/zlib/zlib.c static VALUE rb_gzfile_set_mtime _((VALUE, VALUE));
VALUE             148 ext/zlib/zlib.c static VALUE rb_gzfile_set_orig_name _((VALUE, VALUE));
VALUE             149 ext/zlib/zlib.c static VALUE rb_gzfile_set_comment _((VALUE, VALUE));
VALUE             150 ext/zlib/zlib.c static VALUE rb_gzfile_close _((VALUE));
VALUE             151 ext/zlib/zlib.c static VALUE rb_gzfile_finish _((VALUE));
VALUE             152 ext/zlib/zlib.c static VALUE rb_gzfile_closed_p _((VALUE));
VALUE             153 ext/zlib/zlib.c static VALUE rb_gzfile_eof_p _((VALUE));
VALUE             154 ext/zlib/zlib.c static VALUE rb_gzfile_sync _((VALUE));
VALUE             155 ext/zlib/zlib.c static VALUE rb_gzfile_set_sync _((VALUE, VALUE));
VALUE             156 ext/zlib/zlib.c static VALUE rb_gzfile_total_in _((VALUE));
VALUE             157 ext/zlib/zlib.c static VALUE rb_gzfile_total_out _((VALUE));
VALUE             159 ext/zlib/zlib.c static VALUE rb_gzwriter_s_allocate _((VALUE));
VALUE             160 ext/zlib/zlib.c static VALUE rb_gzwriter_s_open _((int, VALUE*, VALUE));
VALUE             161 ext/zlib/zlib.c static VALUE rb_gzwriter_initialize _((int, VALUE*, VALUE));
VALUE             162 ext/zlib/zlib.c static VALUE rb_gzwriter_flush _((int, VALUE*, VALUE));
VALUE             163 ext/zlib/zlib.c static VALUE rb_gzwriter_write _((VALUE, VALUE));
VALUE             164 ext/zlib/zlib.c static VALUE rb_gzwriter_putc _((VALUE, VALUE));
VALUE             166 ext/zlib/zlib.c static VALUE rb_gzreader_s_allocate _((VALUE));
VALUE             167 ext/zlib/zlib.c static VALUE rb_gzreader_s_open _((int, VALUE*, VALUE));
VALUE             168 ext/zlib/zlib.c static VALUE rb_gzreader_initialize _((VALUE, VALUE));
VALUE             169 ext/zlib/zlib.c static VALUE rb_gzreader_rewind _((VALUE));
VALUE             170 ext/zlib/zlib.c static VALUE rb_gzreader_unused _((VALUE));
VALUE             171 ext/zlib/zlib.c static VALUE rb_gzreader_read _((int, VALUE*, VALUE));
VALUE             172 ext/zlib/zlib.c static VALUE rb_gzreader_getc _((VALUE));
VALUE             173 ext/zlib/zlib.c static VALUE rb_gzreader_readchar _((VALUE));
VALUE             174 ext/zlib/zlib.c static VALUE rb_gzreader_each_byte _((VALUE));
VALUE             175 ext/zlib/zlib.c static VALUE rb_gzreader_ungetc _((VALUE, VALUE));
VALUE             177 ext/zlib/zlib.c static VALUE gzreader_gets _((int, VALUE*, VALUE));
VALUE             178 ext/zlib/zlib.c static VALUE rb_gzreader_gets _((int, VALUE*, VALUE));
VALUE             179 ext/zlib/zlib.c static VALUE rb_gzreader_readline _((int, VALUE*, VALUE));
VALUE             180 ext/zlib/zlib.c static VALUE rb_gzreader_each _((int, VALUE*, VALUE));
VALUE             181 ext/zlib/zlib.c static VALUE rb_gzreader_readlines _((int, VALUE*, VALUE));
VALUE             191 ext/zlib/zlib.c static VALUE cZError, cStreamEnd, cNeedDict;
VALUE             192 ext/zlib/zlib.c static VALUE cStreamError, cDataError, cMemError, cBufError, cVersionError;
VALUE             199 ext/zlib/zlib.c     VALUE exc;
VALUE             248 ext/zlib/zlib.c static VALUE
VALUE             250 ext/zlib/zlib.c     VALUE klass;
VALUE             252 ext/zlib/zlib.c     VALUE str;
VALUE             259 ext/zlib/zlib.c static VALUE
VALUE             262 ext/zlib/zlib.c     VALUE *argv;
VALUE             265 ext/zlib/zlib.c     VALUE str, vsum;
VALUE             299 ext/zlib/zlib.c static VALUE
VALUE             302 ext/zlib/zlib.c     VALUE *argv;
VALUE             303 ext/zlib/zlib.c     VALUE klass;
VALUE             317 ext/zlib/zlib.c static VALUE
VALUE             320 ext/zlib/zlib.c     VALUE *argv;
VALUE             321 ext/zlib/zlib.c     VALUE klass;
VALUE             329 ext/zlib/zlib.c static VALUE
VALUE             331 ext/zlib/zlib.c     VALUE obj;
VALUE             334 ext/zlib/zlib.c     VALUE dst;
VALUE             352 ext/zlib/zlib.c     VALUE buf;
VALUE             354 ext/zlib/zlib.c     VALUE input;
VALUE             519 ext/zlib/zlib.c static VALUE
VALUE             523 ext/zlib/zlib.c     VALUE dst;
VALUE             541 ext/zlib/zlib.c static VALUE
VALUE             546 ext/zlib/zlib.c     VALUE dst;
VALUE             637 ext/zlib/zlib.c static VALUE
VALUE             641 ext/zlib/zlib.c     VALUE dst;
VALUE             672 ext/zlib/zlib.c static VALUE
VALUE             709 ext/zlib/zlib.c     volatile VALUE guard;
VALUE             766 ext/zlib/zlib.c static VALUE
VALUE             772 ext/zlib/zlib.c     VALUE rest;
VALUE             825 ext/zlib/zlib.c static VALUE
VALUE             827 ext/zlib/zlib.c     VALUE klass;
VALUE             830 ext/zlib/zlib.c     VALUE obj;
VALUE             844 ext/zlib/zlib.c     VALUE obj;
VALUE             923 ext/zlib/zlib.c static VALUE
VALUE             925 ext/zlib/zlib.c     VALUE obj;
VALUE             935 ext/zlib/zlib.c static VALUE
VALUE             937 ext/zlib/zlib.c     VALUE obj;
VALUE             947 ext/zlib/zlib.c static VALUE
VALUE             949 ext/zlib/zlib.c     VALUE obj;
VALUE             952 ext/zlib/zlib.c     VALUE dst;
VALUE             964 ext/zlib/zlib.c static VALUE
VALUE             966 ext/zlib/zlib.c     VALUE obj;
VALUE             969 ext/zlib/zlib.c     VALUE dst;
VALUE             980 ext/zlib/zlib.c static VALUE
VALUE             982 ext/zlib/zlib.c     VALUE obj;
VALUE             985 ext/zlib/zlib.c     VALUE dst;
VALUE             997 ext/zlib/zlib.c static VALUE
VALUE             999 ext/zlib/zlib.c     VALUE obj;
VALUE            1012 ext/zlib/zlib.c static VALUE
VALUE            1014 ext/zlib/zlib.c     VALUE obj, size;
VALUE            1026 ext/zlib/zlib.c static VALUE
VALUE            1028 ext/zlib/zlib.c     VALUE obj;
VALUE            1038 ext/zlib/zlib.c static VALUE
VALUE            1040 ext/zlib/zlib.c     VALUE obj;
VALUE            1048 ext/zlib/zlib.c static VALUE
VALUE            1050 ext/zlib/zlib.c     VALUE obj;
VALUE            1060 ext/zlib/zlib.c static VALUE
VALUE            1062 ext/zlib/zlib.c     VALUE obj;
VALUE            1070 ext/zlib/zlib.c static VALUE
VALUE            1072 ext/zlib/zlib.c     VALUE obj;
VALUE            1080 ext/zlib/zlib.c static VALUE
VALUE            1082 ext/zlib/zlib.c     VALUE obj;
VALUE            1090 ext/zlib/zlib.c static VALUE
VALUE            1092 ext/zlib/zlib.c     VALUE obj;
VALUE            1120 ext/zlib/zlib.c static VALUE
VALUE            1122 ext/zlib/zlib.c     VALUE klass;
VALUE            1136 ext/zlib/zlib.c static VALUE
VALUE            1139 ext/zlib/zlib.c     VALUE *argv;
VALUE            1140 ext/zlib/zlib.c     VALUE obj;
VALUE            1143 ext/zlib/zlib.c     VALUE level, wbits, memlevel, strategy;
VALUE            1163 ext/zlib/zlib.c static VALUE
VALUE            1165 ext/zlib/zlib.c     VALUE self, orig;
VALUE            1180 ext/zlib/zlib.c static VALUE
VALUE            1182 ext/zlib/zlib.c     VALUE args;
VALUE            1184 ext/zlib/zlib.c     struct zstream *z = (struct zstream *)((VALUE *)args)[0];
VALUE            1185 ext/zlib/zlib.c     VALUE src = ((VALUE *)args)[1];
VALUE            1211 ext/zlib/zlib.c static VALUE
VALUE            1214 ext/zlib/zlib.c     VALUE *argv;
VALUE            1215 ext/zlib/zlib.c     VALUE klass;
VALUE            1218 ext/zlib/zlib.c     VALUE src, level, dst, args[2];
VALUE            1232 ext/zlib/zlib.c     args[0] = (VALUE)&z;
VALUE            1234 ext/zlib/zlib.c     dst = rb_ensure(deflate_run, (VALUE)args, zstream_end, (VALUE)&z);
VALUE            1243 ext/zlib/zlib.c     VALUE src;
VALUE            1270 ext/zlib/zlib.c static VALUE
VALUE            1273 ext/zlib/zlib.c     VALUE *argv;
VALUE            1274 ext/zlib/zlib.c     VALUE obj;
VALUE            1277 ext/zlib/zlib.c     VALUE src, flush, dst;
VALUE            1295 ext/zlib/zlib.c static VALUE
VALUE            1297 ext/zlib/zlib.c     VALUE obj, src;
VALUE            1313 ext/zlib/zlib.c static VALUE
VALUE            1316 ext/zlib/zlib.c     VALUE *argv;
VALUE            1317 ext/zlib/zlib.c     VALUE obj;
VALUE            1320 ext/zlib/zlib.c     VALUE v_flush, dst;
VALUE            1343 ext/zlib/zlib.c static VALUE
VALUE            1345 ext/zlib/zlib.c     VALUE obj, v_level, v_strategy;
VALUE            1378 ext/zlib/zlib.c static VALUE
VALUE            1380 ext/zlib/zlib.c     VALUE obj, dic;
VALUE            1383 ext/zlib/zlib.c     VALUE src = dic;
VALUE            1410 ext/zlib/zlib.c static VALUE
VALUE            1412 ext/zlib/zlib.c     VALUE klass;
VALUE            1425 ext/zlib/zlib.c static VALUE
VALUE            1428 ext/zlib/zlib.c     VALUE *argv;
VALUE            1429 ext/zlib/zlib.c     VALUE obj;
VALUE            1432 ext/zlib/zlib.c     VALUE wbits;
VALUE            1447 ext/zlib/zlib.c static VALUE
VALUE            1449 ext/zlib/zlib.c     VALUE args;
VALUE            1451 ext/zlib/zlib.c     struct zstream *z = (struct zstream *)((VALUE *)args)[0];
VALUE            1452 ext/zlib/zlib.c     VALUE src = ((VALUE *)args)[1];
VALUE            1476 ext/zlib/zlib.c static VALUE
VALUE            1478 ext/zlib/zlib.c     VALUE obj, src;
VALUE            1481 ext/zlib/zlib.c     VALUE dst, args[2];
VALUE            1492 ext/zlib/zlib.c     args[0] = (VALUE)&z;
VALUE            1494 ext/zlib/zlib.c     dst = rb_ensure(inflate_run, (VALUE)args, zstream_end, (VALUE)&z);
VALUE            1503 ext/zlib/zlib.c     VALUE src;
VALUE            1529 ext/zlib/zlib.c static VALUE
VALUE            1531 ext/zlib/zlib.c     VALUE obj, src;
VALUE            1534 ext/zlib/zlib.c     VALUE dst;
VALUE            1567 ext/zlib/zlib.c static VALUE
VALUE            1569 ext/zlib/zlib.c     VALUE obj, src;
VALUE            1599 ext/zlib/zlib.c static VALUE
VALUE            1601 ext/zlib/zlib.c     VALUE obj, src;
VALUE            1617 ext/zlib/zlib.c static VALUE
VALUE            1619 ext/zlib/zlib.c     VALUE obj;
VALUE            1640 ext/zlib/zlib.c static VALUE
VALUE            1642 ext/zlib/zlib.c     VALUE obj, dic;
VALUE            1645 ext/zlib/zlib.c     VALUE src = dic;
VALUE            1706 ext/zlib/zlib.c static VALUE cGzError, cNoFooter, cCRCError, cLengthError;
VALUE            1714 ext/zlib/zlib.c     VALUE io;
VALUE            1718 ext/zlib/zlib.c     VALUE orig_name;    /* for header; must be a String */
VALUE            1719 ext/zlib/zlib.c     VALUE comment;      /* for header; must be a String */
VALUE            1757 ext/zlib/zlib.c static VALUE
VALUE            1759 ext/zlib/zlib.c     VALUE klass;
VALUE            1763 ext/zlib/zlib.c     VALUE obj;
VALUE            1800 ext/zlib/zlib.c     VALUE io = gz->io;
VALUE            1815 ext/zlib/zlib.c     VALUE str;
VALUE            1827 ext/zlib/zlib.c static VALUE
VALUE            1831 ext/zlib/zlib.c     VALUE str;
VALUE            1845 ext/zlib/zlib.c     VALUE str;
VALUE            1860 ext/zlib/zlib.c     VALUE str;
VALUE            2091 ext/zlib/zlib.c     volatile VALUE str;
VALUE            2113 ext/zlib/zlib.c     VALUE str;
VALUE            2125 ext/zlib/zlib.c static VALUE
VALUE            2130 ext/zlib/zlib.c     VALUE dst;
VALUE            2153 ext/zlib/zlib.c static VALUE
VALUE            2157 ext/zlib/zlib.c     VALUE dst;
VALUE            2185 ext/zlib/zlib.c static VALUE
VALUE            2187 ext/zlib/zlib.c     VALUE obj;
VALUE            2217 ext/zlib/zlib.c 	    rb_protect(gzfile_finalize, (VALUE)gz, &aborted);
VALUE            2260 ext/zlib/zlib.c static VALUE
VALUE            2264 ext/zlib/zlib.c     VALUE str;
VALUE            2280 ext/zlib/zlib.c     VALUE obj;
VALUE            2305 ext/zlib/zlib.c static VALUE
VALUE            2307 ext/zlib/zlib.c     VALUE obj;
VALUE            2321 ext/zlib/zlib.c static VALUE
VALUE            2324 ext/zlib/zlib.c     VALUE *argv;
VALUE            2325 ext/zlib/zlib.c     VALUE klass;
VALUE            2327 ext/zlib/zlib.c     VALUE obj = rb_class_new_instance(argc, argv, klass);
VALUE            2340 ext/zlib/zlib.c static VALUE
VALUE            2343 ext/zlib/zlib.c     VALUE *argv;
VALUE            2344 ext/zlib/zlib.c     VALUE klass;
VALUE            2347 ext/zlib/zlib.c     VALUE io, filename;
VALUE            2363 ext/zlib/zlib.c static VALUE
VALUE            2365 ext/zlib/zlib.c     VALUE obj;
VALUE            2373 ext/zlib/zlib.c static VALUE
VALUE            2375 ext/zlib/zlib.c     VALUE obj;
VALUE            2383 ext/zlib/zlib.c static VALUE
VALUE            2385 ext/zlib/zlib.c     VALUE obj;
VALUE            2393 ext/zlib/zlib.c static VALUE
VALUE            2395 ext/zlib/zlib.c     VALUE obj;
VALUE            2403 ext/zlib/zlib.c static VALUE
VALUE            2405 ext/zlib/zlib.c     VALUE obj;
VALUE            2414 ext/zlib/zlib.c static VALUE
VALUE            2416 ext/zlib/zlib.c     VALUE obj;
VALUE            2418 ext/zlib/zlib.c     VALUE str = get_gzfile(obj)->orig_name;
VALUE            2430 ext/zlib/zlib.c static VALUE
VALUE            2432 ext/zlib/zlib.c     VALUE obj;
VALUE            2434 ext/zlib/zlib.c     VALUE str = get_gzfile(obj)->comment;
VALUE            2445 ext/zlib/zlib.c static VALUE
VALUE            2447 ext/zlib/zlib.c     VALUE obj;
VALUE            2455 ext/zlib/zlib.c static VALUE
VALUE            2457 ext/zlib/zlib.c     VALUE obj, lineno;
VALUE            2467 ext/zlib/zlib.c static VALUE
VALUE            2469 ext/zlib/zlib.c     VALUE obj, mtime;
VALUE            2472 ext/zlib/zlib.c     VALUE val;
VALUE            2491 ext/zlib/zlib.c static VALUE
VALUE            2493 ext/zlib/zlib.c     VALUE obj, str;
VALUE            2496 ext/zlib/zlib.c     VALUE s;
VALUE            2514 ext/zlib/zlib.c static VALUE
VALUE            2516 ext/zlib/zlib.c     VALUE obj, str;
VALUE            2519 ext/zlib/zlib.c     VALUE s;
VALUE            2538 ext/zlib/zlib.c static VALUE
VALUE            2540 ext/zlib/zlib.c     VALUE obj;
VALUE            2543 ext/zlib/zlib.c     VALUE io;
VALUE            2555 ext/zlib/zlib.c static VALUE
VALUE            2557 ext/zlib/zlib.c     VALUE obj;
VALUE            2560 ext/zlib/zlib.c     VALUE io;
VALUE            2570 ext/zlib/zlib.c static VALUE
VALUE            2572 ext/zlib/zlib.c     VALUE obj;
VALUE            2582 ext/zlib/zlib.c static VALUE
VALUE            2584 ext/zlib/zlib.c     VALUE obj;
VALUE            2593 ext/zlib/zlib.c static VALUE
VALUE            2595 ext/zlib/zlib.c     VALUE obj;
VALUE            2607 ext/zlib/zlib.c static VALUE
VALUE            2609 ext/zlib/zlib.c     VALUE obj, mode;
VALUE            2625 ext/zlib/zlib.c static VALUE
VALUE            2627 ext/zlib/zlib.c     VALUE obj;
VALUE            2635 ext/zlib/zlib.c static VALUE
VALUE            2637 ext/zlib/zlib.c     VALUE obj;
VALUE            2673 ext/zlib/zlib.c static VALUE
VALUE            2675 ext/zlib/zlib.c     VALUE klass;
VALUE            2687 ext/zlib/zlib.c static VALUE
VALUE            2690 ext/zlib/zlib.c     VALUE *argv;
VALUE            2691 ext/zlib/zlib.c     VALUE klass;
VALUE            2704 ext/zlib/zlib.c static VALUE
VALUE            2707 ext/zlib/zlib.c     VALUE *argv;
VALUE            2708 ext/zlib/zlib.c     VALUE obj;
VALUE            2711 ext/zlib/zlib.c     VALUE io, level, strategy;
VALUE            2737 ext/zlib/zlib.c static VALUE
VALUE            2740 ext/zlib/zlib.c     VALUE *argv;
VALUE            2741 ext/zlib/zlib.c     VALUE obj;
VALUE            2744 ext/zlib/zlib.c     VALUE v_flush;
VALUE            2764 ext/zlib/zlib.c static VALUE
VALUE            2766 ext/zlib/zlib.c     VALUE obj, str;
VALUE            2780 ext/zlib/zlib.c static VALUE
VALUE            2782 ext/zlib/zlib.c     VALUE obj, ch;
VALUE            2872 ext/zlib/zlib.c static VALUE
VALUE            2874 ext/zlib/zlib.c     VALUE klass;
VALUE            2886 ext/zlib/zlib.c static VALUE
VALUE            2889 ext/zlib/zlib.c     VALUE *argv;
VALUE            2890 ext/zlib/zlib.c     VALUE klass;
VALUE            2905 ext/zlib/zlib.c static VALUE
VALUE            2907 ext/zlib/zlib.c     VALUE obj, io;
VALUE            2930 ext/zlib/zlib.c static VALUE
VALUE            2932 ext/zlib/zlib.c     VALUE obj;
VALUE            2943 ext/zlib/zlib.c static VALUE
VALUE            2945 ext/zlib/zlib.c     VALUE obj;
VALUE            2955 ext/zlib/zlib.c static VALUE
VALUE            2958 ext/zlib/zlib.c     VALUE *argv;
VALUE            2959 ext/zlib/zlib.c     VALUE obj;
VALUE            2962 ext/zlib/zlib.c     VALUE vlen;
VALUE            2980 ext/zlib/zlib.c static VALUE
VALUE            2982 ext/zlib/zlib.c     VALUE obj;
VALUE            2985 ext/zlib/zlib.c     VALUE dst;
VALUE            2997 ext/zlib/zlib.c static VALUE
VALUE            2999 ext/zlib/zlib.c     VALUE obj;
VALUE            3001 ext/zlib/zlib.c     VALUE dst;
VALUE            3012 ext/zlib/zlib.c static VALUE
VALUE            3014 ext/zlib/zlib.c     VALUE obj;
VALUE            3016 ext/zlib/zlib.c     VALUE c;
VALUE            3026 ext/zlib/zlib.c static VALUE
VALUE            3028 ext/zlib/zlib.c     VALUE obj, ch;
VALUE            3039 ext/zlib/zlib.c     VALUE str;
VALUE            3071 ext/zlib/zlib.c     VALUE rs;
VALUE            3077 ext/zlib/zlib.c static VALUE
VALUE            3080 ext/zlib/zlib.c     VALUE *argv;
VALUE            3081 ext/zlib/zlib.c     VALUE obj;
VALUE            3084 ext/zlib/zlib.c     volatile VALUE rs;
VALUE            3085 ext/zlib/zlib.c     VALUE dst;
VALUE            3160 ext/zlib/zlib.c static VALUE
VALUE            3163 ext/zlib/zlib.c     VALUE *argv;
VALUE            3164 ext/zlib/zlib.c     VALUE obj;
VALUE            3166 ext/zlib/zlib.c     VALUE dst;
VALUE            3177 ext/zlib/zlib.c static VALUE
VALUE            3180 ext/zlib/zlib.c     VALUE *argv;
VALUE            3181 ext/zlib/zlib.c     VALUE obj;
VALUE            3183 ext/zlib/zlib.c     VALUE dst;
VALUE            3194 ext/zlib/zlib.c static VALUE
VALUE            3197 ext/zlib/zlib.c     VALUE *argv;
VALUE            3198 ext/zlib/zlib.c     VALUE obj;
VALUE            3200 ext/zlib/zlib.c     VALUE str;
VALUE            3210 ext/zlib/zlib.c static VALUE
VALUE            3213 ext/zlib/zlib.c     VALUE *argv;
VALUE            3214 ext/zlib/zlib.c     VALUE obj;
VALUE            3216 ext/zlib/zlib.c     VALUE str, dst;
VALUE            3309 ext/zlib/zlib.c     VALUE mZlib, cZStream, cDeflate, cInflate;
VALUE            3311 ext/zlib/zlib.c     VALUE cGzipFile, cGzipWriter, cGzipReader;
VALUE              44 file.c         VALUE rb_time_new _((time_t, time_t));
VALUE             101 file.c         VALUE rb_cFile;
VALUE             102 file.c         VALUE rb_mFileTest;
VALUE             103 file.c         static VALUE rb_cStat;
VALUE             105 file.c         static long apply2files _((void (*)(const char *, void *), VALUE, void *));
VALUE             109 file.c             VALUE vargs;
VALUE             113 file.c             VALUE path;
VALUE             137 file.c         static VALUE
VALUE             139 file.c             VALUE obj;
VALUE             149 file.c         static VALUE
VALUE             151 file.c             VALUE klass;
VALUE             163 file.c         static VALUE
VALUE             172 file.c             VALUE self;
VALUE             193 file.c         static VALUE
VALUE             195 file.c             VALUE self, other;
VALUE             210 file.c         static VALUE rb_stat_dev _((VALUE));
VALUE             211 file.c         static VALUE rb_stat_ino _((VALUE));
VALUE             212 file.c         static VALUE rb_stat_mode _((VALUE));
VALUE             213 file.c         static VALUE rb_stat_nlink _((VALUE));
VALUE             214 file.c         static VALUE rb_stat_uid _((VALUE));
VALUE             215 file.c         static VALUE rb_stat_gid _((VALUE));
VALUE             216 file.c         static VALUE rb_stat_rdev _((VALUE));
VALUE             217 file.c         static VALUE rb_stat_size _((VALUE));
VALUE             218 file.c         static VALUE rb_stat_blksize _((VALUE));
VALUE             219 file.c         static VALUE rb_stat_blocks _((VALUE));
VALUE             220 file.c         static VALUE rb_stat_atime _((VALUE));
VALUE             221 file.c         static VALUE rb_stat_mtime _((VALUE));
VALUE             222 file.c         static VALUE rb_stat_ctime _((VALUE));
VALUE             234 file.c         static VALUE
VALUE             236 file.c             VALUE self;
VALUE             252 file.c         static VALUE
VALUE             254 file.c             VALUE self;
VALUE             275 file.c         static VALUE
VALUE             277 file.c             VALUE self;
VALUE             298 file.c         static VALUE
VALUE             300 file.c             VALUE self;
VALUE             322 file.c         static VALUE
VALUE             324 file.c             VALUE self;
VALUE             345 file.c         static VALUE
VALUE             347 file.c             VALUE self;
VALUE             363 file.c         static VALUE
VALUE             365 file.c             VALUE self;
VALUE             380 file.c         static VALUE
VALUE             382 file.c             VALUE self;
VALUE             400 file.c         static VALUE
VALUE             402 file.c             VALUE self;
VALUE             422 file.c         static VALUE
VALUE             424 file.c             VALUE self;
VALUE             445 file.c         static VALUE
VALUE             447 file.c             VALUE self;
VALUE             466 file.c         static VALUE
VALUE             468 file.c             VALUE self;
VALUE             484 file.c         static VALUE
VALUE             486 file.c             VALUE self;
VALUE             506 file.c         static VALUE
VALUE             508 file.c             VALUE self;
VALUE             529 file.c         static VALUE
VALUE             531 file.c             VALUE self;
VALUE             546 file.c         static VALUE
VALUE             548 file.c             VALUE self;
VALUE             565 file.c         static VALUE
VALUE             567 file.c             VALUE self;
VALUE             586 file.c         static VALUE
VALUE             588 file.c             VALUE self;
VALUE             590 file.c             VALUE str;
VALUE             594 file.c         	VALUE (*func)_((VALUE));
VALUE             616 file.c         	VALUE v;
VALUE             648 file.c             VALUE file;
VALUE             651 file.c             VALUE tmp;
VALUE             668 file.c             VALUE *file;
VALUE             671 file.c             VALUE tmp;
VALUE             710 file.c         static VALUE
VALUE             712 file.c             VALUE klass, fname;
VALUE             738 file.c         static VALUE
VALUE             740 file.c             VALUE obj;
VALUE             766 file.c         static VALUE
VALUE             768 file.c             VALUE klass, fname;
VALUE             798 file.c         static VALUE
VALUE             800 file.c             VALUE obj;
VALUE             913 file.c         static VALUE
VALUE             915 file.c             VALUE obj, fname;
VALUE             935 file.c         static VALUE
VALUE             937 file.c             VALUE obj, fname;
VALUE             960 file.c         static VALUE
VALUE             962 file.c             VALUE obj, fname;
VALUE            1004 file.c         static VALUE
VALUE            1006 file.c             VALUE obj, fname;
VALUE            1047 file.c         static VALUE
VALUE            1049 file.c             VALUE obj, fname;
VALUE            1075 file.c         static VALUE
VALUE            1077 file.c             VALUE obj, fname;
VALUE            1100 file.c         static VALUE
VALUE            1102 file.c             VALUE obj, fname;
VALUE            1118 file.c         static VALUE
VALUE            1120 file.c             VALUE obj, fname;
VALUE            1135 file.c         static VALUE
VALUE            1137 file.c             VALUE obj, fname;
VALUE            1153 file.c         static VALUE
VALUE            1155 file.c             VALUE obj, fname;
VALUE            1170 file.c         static VALUE
VALUE            1172 file.c             VALUE obj, fname;
VALUE            1187 file.c         static VALUE
VALUE            1189 file.c             VALUE obj, fname;
VALUE            1204 file.c         static VALUE
VALUE            1206 file.c             VALUE obj, fname;
VALUE            1225 file.c         static VALUE
VALUE            1227 file.c             VALUE obj, fname;
VALUE            1244 file.c         static VALUE
VALUE            1246 file.c             VALUE obj, fname;
VALUE            1263 file.c         static VALUE
VALUE            1265 file.c             VALUE obj, fname;
VALUE            1283 file.c         static VALUE
VALUE            1285 file.c             VALUE obj, fname;
VALUE            1294 file.c         static VALUE
VALUE            1296 file.c             VALUE obj, fname;
VALUE            1314 file.c         static VALUE
VALUE            1316 file.c             VALUE obj, fname;
VALUE            1328 file.c         static VALUE
VALUE            1330 file.c             VALUE fname;
VALUE            1349 file.c         static VALUE
VALUE            1351 file.c             VALUE obj, fname;
VALUE            1367 file.c         static VALUE
VALUE            1369 file.c             VALUE obj, fname;
VALUE            1385 file.c         static VALUE
VALUE            1387 file.c             VALUE obj, fname;
VALUE            1413 file.c         static VALUE
VALUE            1415 file.c             VALUE obj, fname1, fname2;
VALUE            1468 file.c         static VALUE
VALUE            1470 file.c             VALUE klass, fname;
VALUE            1479 file.c         static VALUE
VALUE            1536 file.c         static VALUE
VALUE            1538 file.c             VALUE klass, fname;
VALUE            1560 file.c         static VALUE
VALUE            1562 file.c             VALUE klass, fname;
VALUE            1582 file.c         static VALUE
VALUE            1584 file.c             VALUE obj;
VALUE            1606 file.c         static VALUE
VALUE            1608 file.c             VALUE klass, fname;
VALUE            1627 file.c         static VALUE
VALUE            1629 file.c             VALUE obj;
VALUE            1653 file.c         static VALUE
VALUE            1655 file.c             VALUE klass, fname;
VALUE            1675 file.c         static VALUE
VALUE            1677 file.c             VALUE obj;
VALUE            1712 file.c         static VALUE
VALUE            1715 file.c             VALUE *argv;
VALUE            1717 file.c             VALUE vmode;
VALUE            1718 file.c             VALUE rest;
VALUE            1743 file.c         static VALUE
VALUE            1745 file.c             VALUE obj, vmode;
VALUE            1787 file.c         static VALUE
VALUE            1790 file.c             VALUE *argv;
VALUE            1792 file.c             VALUE vmode;
VALUE            1793 file.c             VALUE rest;
VALUE            1804 file.c         static VALUE
VALUE            1807 file.c             VALUE *argv;
VALUE            1844 file.c         static VALUE
VALUE            1847 file.c             VALUE *argv;
VALUE            1849 file.c             VALUE o, g, rest;
VALUE            1887 file.c         static VALUE
VALUE            1889 file.c             VALUE obj, owner, group;
VALUE            1934 file.c         static VALUE
VALUE            1937 file.c             VALUE *argv;
VALUE            1939 file.c             VALUE o, g, rest;
VALUE            1962 file.c         static VALUE
VALUE            1965 file.c             VALUE *argv;
VALUE            1996 file.c         static VALUE
VALUE            1999 file.c             VALUE *argv;
VALUE            2001 file.c             VALUE atime, mtime, rest;
VALUE            2033 file.c         static VALUE
VALUE            2036 file.c             VALUE *argv;
VALUE            2038 file.c             VALUE atime, mtime, rest;
VALUE            2056 file.c         NORETURN(static void sys_fail2 _((VALUE,VALUE)));
VALUE            2059 file.c             VALUE s1, s2;
VALUE            2082 file.c         static VALUE
VALUE            2084 file.c             VALUE klass, from, to;
VALUE            2112 file.c         static VALUE
VALUE            2114 file.c             VALUE klass, from, to;
VALUE            2141 file.c         static VALUE
VALUE            2143 file.c             VALUE klass, path;
VALUE            2149 file.c             VALUE v;
VALUE            2195 file.c         static VALUE
VALUE            2197 file.c             VALUE klass, args;
VALUE            2216 file.c         static VALUE
VALUE            2218 file.c             VALUE klass, from, to;
VALUE            2263 file.c         static VALUE
VALUE            2266 file.c             VALUE *argv;
VALUE            2455 file.c         static VALUE
VALUE            2457 file.c             VALUE fname, dname, result;
VALUE            2655 file.c         VALUE
VALUE            2657 file.c             VALUE fname, dname;
VALUE            2679 file.c         VALUE
VALUE            2682 file.c             VALUE *argv;
VALUE            2684 file.c             VALUE fname, dname;
VALUE            2731 file.c         static VALUE
VALUE            2734 file.c             VALUE *argv;
VALUE            2736 file.c             VALUE fname, fext, basename;
VALUE            2805 file.c         static VALUE
VALUE            2807 file.c             VALUE klass, fname;
VALUE            2810 file.c             VALUE dirname;
VALUE            2857 file.c         static VALUE
VALUE            2859 file.c             VALUE klass, fname;
VALUE            2862 file.c             VALUE extname;
VALUE            2890 file.c         static VALUE
VALUE            2892 file.c             VALUE klass, path;
VALUE            2898 file.c         static VALUE separator;
VALUE            2900 file.c         static VALUE rb_file_join _((VALUE ary, VALUE sep));
VALUE            2902 file.c         static VALUE
VALUE            2904 file.c             VALUE ary;
VALUE            2905 file.c             VALUE *arg;
VALUE            2910 file.c         static VALUE
VALUE            2912 file.c             VALUE ary, sep;
VALUE            2916 file.c             VALUE result, tmp;
VALUE            2946 file.c         		VALUE args[2];
VALUE            2950 file.c         		tmp = rb_protect_inspect(file_inspect_join, ary, (VALUE)args);
VALUE            2985 file.c         static VALUE
VALUE            2987 file.c             VALUE klass, args;
VALUE            3007 file.c         static VALUE
VALUE            3009 file.c             VALUE klass, path, len;
VALUE            3061 file.c         static VALUE
VALUE            3063 file.c             VALUE obj, len;
VALUE            3167 file.c         static VALUE
VALUE            3169 file.c             VALUE obj;
VALUE            3170 file.c             VALUE operation;
VALUE            3208 file.c             VALUE *argv;
VALUE            3287 file.c         static VALUE
VALUE            3290 file.c             VALUE *argv;
VALUE            3439 file.c         static VALUE rb_stat_s_alloc _((VALUE));
VALUE            3440 file.c         static VALUE
VALUE            3442 file.c             VALUE klass;
VALUE            3456 file.c         static VALUE
VALUE            3458 file.c             VALUE obj, fname;
VALUE            3479 file.c         static VALUE
VALUE            3481 file.c             VALUE copy, orig;
VALUE            3518 file.c         static VALUE
VALUE            3520 file.c             VALUE obj;
VALUE            3536 file.c         static VALUE
VALUE            3538 file.c             VALUE obj;
VALUE            3552 file.c         static VALUE
VALUE            3554 file.c             VALUE obj;
VALUE            3580 file.c         static VALUE
VALUE            3582 file.c             VALUE obj;
VALUE            3602 file.c         static VALUE
VALUE            3604 file.c             VALUE obj;
VALUE            3626 file.c         static VALUE
VALUE            3628 file.c             VALUE obj;
VALUE            3649 file.c         static VALUE
VALUE            3651 file.c             VALUE obj;
VALUE            3670 file.c         static VALUE
VALUE            3672 file.c             VALUE obj;
VALUE            3678 file.c         static VALUE
VALUE            3680 file.c             VALUE obj;
VALUE            3698 file.c         static VALUE
VALUE            3700 file.c             VALUE obj;
VALUE            3719 file.c         static VALUE
VALUE            3721 file.c             VALUE obj;
VALUE            3752 file.c         static VALUE
VALUE            3754 file.c             VALUE obj;
VALUE            3783 file.c         static VALUE
VALUE            3785 file.c             VALUE obj;
VALUE            3814 file.c         static VALUE
VALUE            3816 file.c             VALUE obj;
VALUE            3847 file.c         static VALUE
VALUE            3849 file.c             VALUE obj;
VALUE            3876 file.c         static VALUE
VALUE            3878 file.c             VALUE obj;
VALUE            3907 file.c         static VALUE
VALUE            3909 file.c             VALUE obj;
VALUE            3926 file.c         static VALUE
VALUE            3928 file.c             VALUE obj;
VALUE            3945 file.c         static VALUE
VALUE            3947 file.c             VALUE obj;
VALUE            3966 file.c         static VALUE
VALUE            3968 file.c             VALUE obj;
VALUE            3988 file.c         static VALUE
VALUE            3990 file.c             VALUE obj;
VALUE            4010 file.c         static VALUE
VALUE            4012 file.c             VALUE obj;
VALUE            4020 file.c         static VALUE rb_mFConst;
VALUE            4025 file.c             VALUE value;
VALUE            4049 file.c              VALUE fpath;
VALUE            4058 file.c         	VALUE newpath;
VALUE            4151 file.c         extern VALUE rb_load_path;
VALUE            4155 file.c             VALUE *filep;
VALUE            4160 file.c             VALUE fname;
VALUE            4190 file.c         	VALUE str = RARRAY(rb_load_path)->ptr[i];
VALUE            4209 file.c         VALUE
VALUE            4211 file.c             VALUE path;
VALUE            4213 file.c             VALUE tmp;
VALUE            4252 file.c         	    VALUE str = RARRAY(rb_load_path)->ptr[i];
VALUE            4291 file.c             VALUE (*func)();
VALUE              90 gc.c           static VALUE nomem_error;
VALUE             198 gc.c           VALUE
VALUE             219 gc.c           VALUE
VALUE             228 gc.c           VALUE rb_mGC;
VALUE             231 gc.c               VALUE *varptr;
VALUE             237 gc.c               VALUE *addr;
VALUE             249 gc.c               VALUE *addr;
VALUE             274 gc.c               VALUE *var;
VALUE             376 gc.c           VALUE
VALUE             379 gc.c               VALUE obj;
VALUE             383 gc.c               obj = (VALUE)freelist;
VALUE             393 gc.c           VALUE
VALUE             395 gc.c               VALUE klass;
VALUE             407 gc.c               return (VALUE)data;
VALUE             411 gc.c           VALUE *rb_gc_stack_start = 0;
VALUE             431 gc.c           # define SET_STACK_END VALUE stack_end; alloca(0);
VALUE             438 gc.c           static VALUE *
VALUE             441 gc.c               return (VALUE *)__builtin_frame_address(0);
VALUE             443 gc.c           #  define  SET_STACK_END    VALUE *stack_end = stack_end_address()
VALUE             445 gc.c           #  define  SET_STACK_END    VALUE *stack_end = alloca(1)
VALUE             467 gc.c               VALUE *addr;
VALUE             487 gc.c               VALUE **p;
VALUE             504 gc.c           static VALUE mark_stack[MARK_STACK_MAX];
VALUE             505 gc.c           static VALUE *mark_stack_ptr;
VALUE             559 gc.c           static void gc_mark _((VALUE ptr, int lev));
VALUE             560 gc.c           static void gc_mark_children _((VALUE ptr, int lev));
VALUE             574 gc.c           		gc_mark_children((VALUE)p, 0);
VALUE             584 gc.c               VALUE tmp_arry[MARK_STACK_MAX];
VALUE             585 gc.c               VALUE *p;
VALUE             588 gc.c               MEMCPY(tmp_arry, mark_stack, VALUE, MARK_STACK_MAX);
VALUE             619 gc.c               register VALUE *x;
VALUE             622 gc.c               VALUE v;
VALUE             634 gc.c               VALUE *start, *end;
VALUE             645 gc.c               VALUE value;
VALUE             670 gc.c               VALUE key;
VALUE             671 gc.c               VALUE value;
VALUE             697 gc.c               VALUE obj;
VALUE             708 gc.c               VALUE ptr;
VALUE             736 gc.c               VALUE ptr;
VALUE             743 gc.c               VALUE ptr;
VALUE             780 gc.c           	    gc_mark((VALUE)obj->as.node.u2.node, lev);
VALUE             793 gc.c           	    gc_mark((VALUE)obj->as.node.u1.node, lev);
VALUE             799 gc.c           	    ptr = (VALUE)obj->as.node.u3.node;
VALUE             817 gc.c           	    gc_mark((VALUE)obj->as.node.u1.node, lev);
VALUE             831 gc.c           	    ptr = (VALUE)obj->as.node.u2.node;
VALUE             849 gc.c           	    ptr = (VALUE)obj->as.node.u1.node;
VALUE             855 gc.c           	    gc_mark((VALUE)obj->as.node.u3.node, lev);
VALUE             856 gc.c           	    ptr = (VALUE)obj->as.node.u2.node;
VALUE             884 gc.c           	    mark_locations_array((VALUE*)obj->as.node.u1.value,
VALUE             886 gc.c           	    ptr = (VALUE)obj->as.node.u2.node;
VALUE             891 gc.c           		gc_mark((VALUE)obj->as.node.u1.node, lev);
VALUE             894 gc.c           		gc_mark((VALUE)obj->as.node.u2.node, lev);
VALUE             897 gc.c           		gc_mark((VALUE)obj->as.node.u3.node, lev);
VALUE             920 gc.c           	    VALUE *ptr = obj->as.array.ptr;
VALUE             965 gc.c           	ptr = (VALUE)obj->as.varmap.next;
VALUE             971 gc.c           	    VALUE *vars = &obj->as.scope.local_vars[-1];
VALUE             982 gc.c           	    VALUE *ptr = obj->as.rstruct.ptr;
VALUE             997 gc.c           static void obj_free _((VALUE));
VALUE            1005 gc.c           	run_final((VALUE)p);
VALUE            1049 gc.c           		    gc_mark((VALUE)p, 0);
VALUE            1072 gc.c           		    obj_free((VALUE)p);
VALUE            1129 gc.c               VALUE p;
VALUE            1138 gc.c               VALUE obj;
VALUE            1150 gc.c           	rb_free_generic_ivar((VALUE)obj);
VALUE            1161 gc.c           	rb_clear_cache_by_class((VALUE)obj);
VALUE            1242 gc.c           	    VALUE *vars = RANY(obj)->as.scope.local_vars-1;
VALUE            1267 gc.c               gc_mark((VALUE)frame->node, 0);
VALUE            1343 gc.c               gc_mark((VALUE)ruby_scope, 0);
VALUE            1344 gc.c               gc_mark((VALUE)ruby_dyna_vars, 0);
VALUE            1352 gc.c               mark_locations_array((VALUE*)save_regs_gc_mark, sizeof(save_regs_gc_mark) / sizeof(VALUE *));
VALUE            1354 gc.c               rb_gc_mark_locations((VALUE*)STACK_END, rb_gc_stack_start);
VALUE            1356 gc.c               rb_gc_mark_locations(rb_gc_stack_start, (VALUE*)STACK_END + 1);
VALUE            1358 gc.c               if ((VALUE*)STACK_END < rb_gc_stack_start)
VALUE            1359 gc.c           	rb_gc_mark_locations((VALUE*)STACK_END, rb_gc_stack_start);
VALUE            1361 gc.c           	rb_gc_mark_locations(rb_gc_stack_start, (VALUE*)STACK_END + 1);
VALUE            1368 gc.c           	VALUE *top, *bot;
VALUE            1370 gc.c           	mark_locations_array((VALUE*)&ctx.uc_mcontext,
VALUE            1371 gc.c           			     ((size_t)(sizeof(VALUE)-1 + sizeof ctx.uc_mcontext)/sizeof(VALUE)));
VALUE            1372 gc.c           	bot = (VALUE*)__libc_ia64_register_backing_store_base;
VALUE            1374 gc.c           	top = (VALUE*)ctx.uc_mcontext.mc_special.bspstore;
VALUE            1376 gc.c           	top = (VALUE*)ctx.uc_mcontext.sc_ar_bsp;
VALUE            1382 gc.c               rb_gc_mark_locations((VALUE*)((char*)STACK_END + 2),
VALUE            1383 gc.c           			 (VALUE*)((char*)rb_gc_stack_start + 2));
VALUE            1431 gc.c           VALUE
VALUE            1443 gc.c               STACK_LEVEL_MAX = size / sizeof(VALUE);
VALUE            1449 gc.c               VALUE *addr;
VALUE            1456 gc.c           	STACK_UPPER((VALUE *)&m, (VALUE *)m.BaseAddress,
VALUE            1457 gc.c           		    (VALUE *)((char *)m.BaseAddress + m.RegionSize) - 1);
VALUE            1462 gc.c               if (!addr) addr = (VALUE *)&addr;
VALUE            1481 gc.c           	    STACK_LEVEL_MAX = (rlim.rlim_cur - space) / sizeof(VALUE);
VALUE            1528 gc.c           static VALUE
VALUE            1550 gc.c           		    rb_yield((VALUE)p);
VALUE            1560 gc.c           static VALUE
VALUE            1562 gc.c               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            1631 gc.c               VALUE *argv;
VALUE            1633 gc.c               VALUE of;
VALUE            1644 gc.c           static VALUE finalizers;
VALUE            1649 gc.c           static VALUE
VALUE            1651 gc.c               VALUE os, block;
VALUE            1665 gc.c           static VALUE
VALUE            1667 gc.c               VALUE os, block;
VALUE            1677 gc.c           static VALUE
VALUE            1688 gc.c           static VALUE
VALUE            1690 gc.c               VALUE os, obj;
VALUE            1706 gc.c           static VALUE
VALUE            1708 gc.c               VALUE os, obj;
VALUE            1725 gc.c           static VALUE
VALUE            1728 gc.c               VALUE *argv;
VALUE            1729 gc.c               VALUE os;
VALUE            1731 gc.c               VALUE obj, block, table;
VALUE            1760 gc.c               VALUE dest, obj;
VALUE            1762 gc.c               VALUE table;
VALUE            1772 gc.c           static VALUE
VALUE            1774 gc.c               VALUE *args;
VALUE            1782 gc.c               VALUE obj;
VALUE            1786 gc.c               VALUE args[3], table, objid;
VALUE            1791 gc.c               args[2] = (VALUE)ruby_safe_level;
VALUE            1795 gc.c           	rb_protect((VALUE(*)_((VALUE)))run_single_final, (VALUE)args, &status);
VALUE            1799 gc.c           	    VALUE final = RARRAY(table)->ptr[i];
VALUE            1803 gc.c           	    rb_protect((VALUE(*)_((VALUE)))run_single_final, (VALUE)args, &status);
VALUE            1838 gc.c           		    run_final((VALUE)p);
VALUE            1880 gc.c           static VALUE
VALUE            1882 gc.c               VALUE obj, id;
VALUE            1891 gc.c               if (FIXNUM_P(ptr)) return (VALUE)ptr;
VALUE            1892 gc.c               if (SYMBOL_P(ptr) && rb_id2name(SYM2ID((VALUE)ptr)) != 0) {
VALUE            1893 gc.c           	return (VALUE)ptr;
VALUE            1903 gc.c               return (VALUE)ptr;
VALUE            1915 gc.c               VALUE rb_mObSpace;
VALUE              29 hash.c             VALUE hash;
VALUE              37 hash.c         VALUE
VALUE              39 hash.c             VALUE hash;
VALUE              44 hash.c         VALUE rb_cHash;
VALUE              46 hash.c         static VALUE envtbl;
VALUE              49 hash.c         static VALUE
VALUE              51 hash.c             VALUE *args;
VALUE              53 hash.c             return (VALUE)rb_eql(args[0], args[1]);
VALUE              58 hash.c             VALUE a, b;
VALUE              60 hash.c             VALUE args[2];
VALUE              77 hash.c             return !rb_with_disable_interrupt(eql, (VALUE)args);
VALUE              80 hash.c         VALUE
VALUE              82 hash.c             VALUE obj;
VALUE              89 hash.c             VALUE a;
VALUE              91 hash.c             VALUE hval;
VALUE             155 hash.c             VALUE hash;
VALUE             157 hash.c             VALUE arg;
VALUE             162 hash.c             VALUE key, value;
VALUE             186 hash.c         static VALUE
VALUE             188 hash.c             VALUE hash;
VALUE             201 hash.c         static VALUE
VALUE             213 hash.c             VALUE hash;
VALUE             215 hash.c             VALUE farg;
VALUE             223 hash.c             rb_ensure(hash_foreach_call, (VALUE)&arg, hash_foreach_ensure, hash);
VALUE             226 hash.c         static VALUE hash_alloc _((VALUE));
VALUE             227 hash.c         static VALUE
VALUE             229 hash.c             VALUE klass;
VALUE             237 hash.c             return (VALUE)hash;
VALUE             240 hash.c         VALUE
VALUE             281 hash.c         static VALUE
VALUE             284 hash.c             VALUE *argv;
VALUE             285 hash.c             VALUE hash;
VALUE             287 hash.c             VALUE ifnone;
VALUE             318 hash.c         static VALUE
VALUE             321 hash.c             VALUE *argv;
VALUE             322 hash.c             VALUE klass;
VALUE             324 hash.c             VALUE hash;
VALUE             348 hash.c         static VALUE
VALUE             350 hash.c             VALUE hash;
VALUE             357 hash.c             VALUE key, value;
VALUE             384 hash.c         static VALUE
VALUE             386 hash.c             VALUE hash;
VALUE             413 hash.c         VALUE
VALUE             415 hash.c             VALUE hash, key;
VALUE             417 hash.c             VALUE val;
VALUE             454 hash.c         static VALUE
VALUE             457 hash.c             VALUE *argv;
VALUE             458 hash.c             VALUE hash;
VALUE             460 hash.c             VALUE key, if_none;
VALUE             461 hash.c             VALUE val;
VALUE             501 hash.c         static VALUE
VALUE             504 hash.c             VALUE *argv;
VALUE             505 hash.c             VALUE hash;
VALUE             507 hash.c             VALUE key;
VALUE             536 hash.c         static VALUE
VALUE             538 hash.c             VALUE hash, ifnone;
VALUE             561 hash.c         static VALUE
VALUE             563 hash.c             VALUE hash;
VALUE             573 hash.c             VALUE key, value;
VALUE             574 hash.c             VALUE *args;
VALUE             595 hash.c         static VALUE
VALUE             597 hash.c             VALUE hash, value;
VALUE             599 hash.c             VALUE args[2];
VALUE             618 hash.c         static VALUE
VALUE             621 hash.c             VALUE *argv;
VALUE             622 hash.c             VALUE hash;
VALUE             624 hash.c             VALUE indexes;
VALUE             655 hash.c         VALUE
VALUE             657 hash.c             VALUE hash, key;
VALUE             659 hash.c             VALUE val;
VALUE             678 hash.c             VALUE key;
VALUE             679 hash.c             VALUE val;
VALUE             684 hash.c             VALUE key, value;
VALUE             708 hash.c         static VALUE
VALUE             710 hash.c             VALUE hash;
VALUE             731 hash.c             VALUE key, value, hash;
VALUE             752 hash.c         VALUE
VALUE             754 hash.c             VALUE hash;
VALUE             769 hash.c         VALUE
VALUE             771 hash.c             VALUE hash;
VALUE             789 hash.c         static VALUE
VALUE             791 hash.c             VALUE hash;
VALUE             798 hash.c             VALUE key, value, result;
VALUE             817 hash.c         VALUE
VALUE             820 hash.c             VALUE *argv;
VALUE             821 hash.c             VALUE hash;
VALUE             823 hash.c             VALUE result = rb_ary_new();
VALUE             845 hash.c         VALUE
VALUE             848 hash.c             VALUE *argv;
VALUE             849 hash.c             VALUE hash;
VALUE             851 hash.c             VALUE result;
VALUE             863 hash.c             VALUE key, value, dummy;
VALUE             879 hash.c         static VALUE
VALUE             881 hash.c             VALUE hash;
VALUE             909 hash.c         VALUE
VALUE             911 hash.c             VALUE hash, key, val;
VALUE             925 hash.c             VALUE key, val, hash;
VALUE             946 hash.c         static VALUE
VALUE             948 hash.c             VALUE hash, hash2;
VALUE             978 hash.c         static VALUE
VALUE             980 hash.c             VALUE hash;
VALUE             996 hash.c         static VALUE
VALUE             998 hash.c             VALUE hash;
VALUE            1007 hash.c             VALUE key, value;
VALUE            1030 hash.c         static VALUE
VALUE            1032 hash.c             VALUE hash;
VALUE            1040 hash.c             VALUE key, value;
VALUE            1062 hash.c         static VALUE
VALUE            1064 hash.c             VALUE hash;
VALUE            1072 hash.c             VALUE key, value;
VALUE            1096 hash.c         static VALUE
VALUE            1098 hash.c             VALUE hash;
VALUE            1106 hash.c             VALUE key, value;
VALUE            1133 hash.c         static VALUE
VALUE            1135 hash.c             VALUE hash;
VALUE            1143 hash.c             VALUE key, value, ary;
VALUE            1161 hash.c         static VALUE
VALUE            1163 hash.c             VALUE hash;
VALUE            1165 hash.c             VALUE ary;
VALUE            1189 hash.c         static VALUE
VALUE            1191 hash.c             VALUE hash;
VALUE            1193 hash.c             VALUE entries = rb_hash_to_a(hash);
VALUE            1200 hash.c             VALUE key, value, str;
VALUE            1202 hash.c             VALUE str2;
VALUE            1219 hash.c         static VALUE
VALUE            1221 hash.c             VALUE hash;
VALUE            1223 hash.c             VALUE str;
VALUE            1240 hash.c         static VALUE
VALUE            1242 hash.c             VALUE hash;
VALUE            1250 hash.c         static VALUE
VALUE            1252 hash.c             VALUE hash;
VALUE            1270 hash.c         static VALUE
VALUE            1272 hash.c             VALUE hash;
VALUE            1285 hash.c         static VALUE
VALUE            1287 hash.c             VALUE hash;
VALUE            1294 hash.c             VALUE key, value, ary;
VALUE            1313 hash.c         static VALUE
VALUE            1315 hash.c             VALUE hash;
VALUE            1317 hash.c             VALUE ary;
VALUE            1327 hash.c             VALUE key, value, ary;
VALUE            1346 hash.c         static VALUE
VALUE            1348 hash.c             VALUE hash;
VALUE            1350 hash.c             VALUE ary;
VALUE            1373 hash.c         static VALUE
VALUE            1375 hash.c             VALUE hash;
VALUE            1376 hash.c             VALUE key;
VALUE            1386 hash.c             VALUE key, value, *data;
VALUE            1409 hash.c         static VALUE
VALUE            1411 hash.c             VALUE hash;
VALUE            1412 hash.c             VALUE val;
VALUE            1414 hash.c             VALUE data[2];
VALUE            1429 hash.c             VALUE key, val1;
VALUE            1432 hash.c             VALUE val2;
VALUE            1446 hash.c         static VALUE
VALUE            1448 hash.c             VALUE hash1, hash2;
VALUE            1494 hash.c         static VALUE
VALUE            1496 hash.c             VALUE hash1, hash2;
VALUE            1503 hash.c             VALUE key, value;
VALUE            1504 hash.c             VALUE hash;
VALUE            1523 hash.c         static VALUE
VALUE            1525 hash.c             VALUE hash;
VALUE            1527 hash.c             VALUE h = rb_hash_new();
VALUE            1535 hash.c             VALUE key, value;
VALUE            1536 hash.c             VALUE hash;
VALUE            1545 hash.c             VALUE key, value;
VALUE            1546 hash.c             VALUE hash;
VALUE            1571 hash.c         static VALUE
VALUE            1573 hash.c             VALUE hash1, hash2;
VALUE            1601 hash.c         static VALUE
VALUE            1603 hash.c             VALUE hash1, hash2;
VALUE            1628 hash.c         static VALUE
VALUE            1633 hash.c             VALUE str = rb_tainted_str_new(ptr, len);
VALUE            1639 hash.c         static VALUE
VALUE            1647 hash.c         static VALUE
VALUE            1649 hash.c             VALUE obj, name;
VALUE            1661 hash.c         	VALUE value = env_str_new2(val);
VALUE            1677 hash.c         static VALUE
VALUE            1679 hash.c             VALUE obj, name;
VALUE            1681 hash.c             VALUE val;
VALUE            1688 hash.c         static VALUE
VALUE            1690 hash.c             VALUE obj, name;
VALUE            1707 hash.c         	    VALUE str = rb_str_new2(env);
VALUE            1717 hash.c         static VALUE
VALUE            1720 hash.c             VALUE *argv;
VALUE            1722 hash.c             VALUE key, if_none;
VALUE            1880 hash.c         static VALUE
VALUE            1882 hash.c             VALUE obj, nm, val;
VALUE            1922 hash.c         static VALUE
VALUE            1926 hash.c             VALUE ary = rb_ary_new();
VALUE            1940 hash.c         static VALUE
VALUE            1942 hash.c             VALUE ehash;
VALUE            1944 hash.c             VALUE keys = env_keys();
VALUE            1953 hash.c         static VALUE
VALUE            1957 hash.c             VALUE ary = rb_ary_new();
VALUE            1971 hash.c         static VALUE
VALUE            1973 hash.c             VALUE ehash;
VALUE            1975 hash.c             VALUE values = env_values();
VALUE            1984 hash.c         static VALUE
VALUE            1986 hash.c             VALUE ehash;
VALUE            1990 hash.c             VALUE ary = rb_ary_new();
VALUE            2015 hash.c         static VALUE
VALUE            2017 hash.c             VALUE ehash;
VALUE            2022 hash.c         static VALUE
VALUE            2024 hash.c             VALUE ehash;
VALUE            2029 hash.c         static VALUE
VALUE            2032 hash.c             volatile VALUE keys;
VALUE            2040 hash.c         	VALUE val = rb_f_getenv(Qnil, RARRAY(keys)->ptr[i]);
VALUE            2053 hash.c         static VALUE
VALUE            2060 hash.c         static VALUE
VALUE            2063 hash.c             VALUE *argv;
VALUE            2065 hash.c             VALUE result = rb_ary_new();
VALUE            2074 hash.c         static VALUE
VALUE            2077 hash.c             VALUE *argv;
VALUE            2079 hash.c             VALUE result;
VALUE            2090 hash.c         	    VALUE k = env_str_new(*env, s-*env);
VALUE            2091 hash.c         	    VALUE v = env_str_new2(s+1);
VALUE            2103 hash.c         static VALUE
VALUE            2106 hash.c             volatile VALUE keys;
VALUE            2113 hash.c         	VALUE val = rb_f_getenv(Qnil, RARRAY(keys)->ptr[i]);
VALUE            2121 hash.c         static VALUE
VALUE            2127 hash.c         static VALUE
VALUE            2131 hash.c             VALUE str = rb_str_buf_new2("{");
VALUE            2132 hash.c             VALUE i;
VALUE            2157 hash.c         static VALUE
VALUE            2161 hash.c             VALUE ary = rb_ary_new();
VALUE            2176 hash.c         static VALUE
VALUE            2182 hash.c         static VALUE
VALUE            2195 hash.c         static VALUE
VALUE            2209 hash.c         static VALUE
VALUE            2211 hash.c             VALUE env, key;
VALUE            2222 hash.c         static VALUE
VALUE            2224 hash.c             VALUE dmy, value;
VALUE            2245 hash.c         static VALUE
VALUE            2247 hash.c             VALUE dmy, value;
VALUE            2250 hash.c             VALUE str;
VALUE            2270 hash.c         static VALUE
VALUE            2273 hash.c             VALUE *argv;
VALUE            2276 hash.c             VALUE indexes = rb_ary_new2(argc);
VALUE            2281 hash.c         	VALUE tmp = rb_check_string_type(argv[i]);
VALUE            2294 hash.c         static VALUE
VALUE            2298 hash.c             VALUE hash = rb_hash_new();
VALUE            2313 hash.c         static VALUE
VALUE            2319 hash.c         static VALUE
VALUE            2328 hash.c         	    VALUE key = env_str_new(*env, s-*env);
VALUE            2329 hash.c         	    VALUE val = env_str_new2(getenv(RSTRING(key)->ptr));
VALUE            2338 hash.c         static VALUE
VALUE            2346 hash.c             VALUE key, val, keys;
VALUE            2357 hash.c         static VALUE
VALUE            2359 hash.c             VALUE env, hash;
VALUE            2361 hash.c             volatile VALUE keys = env_keys();
VALUE            2376 hash.c             VALUE key, val;
VALUE            2387 hash.c         static VALUE
VALUE            2389 hash.c             VALUE env, hash;
VALUE              23 intern.h       void rb_mem_clear _((register VALUE*, register long));
VALUE              24 intern.h       VALUE rb_assoc_new _((VALUE, VALUE));
VALUE              25 intern.h       VALUE rb_check_array_type _((VALUE));
VALUE              26 intern.h       VALUE rb_ary_new _((void));
VALUE              27 intern.h       VALUE rb_ary_new2 _((long));
VALUE              28 intern.h       VALUE rb_ary_new3 __((long,...));
VALUE              29 intern.h       VALUE rb_ary_new4 _((long, const VALUE *));
VALUE              30 intern.h       VALUE rb_ary_freeze _((VALUE));
VALUE              31 intern.h       VALUE rb_ary_aref _((int, VALUE*, VALUE));
VALUE              32 intern.h       void rb_ary_store _((VALUE, long, VALUE));
VALUE              33 intern.h       VALUE rb_ary_dup _((VALUE));
VALUE              34 intern.h       VALUE rb_ary_to_ary _((VALUE));
VALUE              35 intern.h       VALUE rb_ary_to_s _((VALUE));
VALUE              36 intern.h       VALUE rb_ary_push _((VALUE, VALUE));
VALUE              37 intern.h       VALUE rb_ary_pop _((VALUE));
VALUE              38 intern.h       VALUE rb_ary_shift _((VALUE));
VALUE              39 intern.h       VALUE rb_ary_unshift _((VALUE, VALUE));
VALUE              40 intern.h       VALUE rb_ary_entry _((VALUE, long));
VALUE              41 intern.h       VALUE rb_ary_each _((VALUE));
VALUE              42 intern.h       VALUE rb_ary_join _((VALUE, VALUE));
VALUE              43 intern.h       VALUE rb_ary_print_on _((VALUE, VALUE));
VALUE              44 intern.h       VALUE rb_ary_reverse _((VALUE));
VALUE              45 intern.h       VALUE rb_ary_sort _((VALUE));
VALUE              46 intern.h       VALUE rb_ary_sort_bang _((VALUE));
VALUE              47 intern.h       VALUE rb_ary_delete _((VALUE, VALUE));
VALUE              48 intern.h       VALUE rb_ary_delete_at _((VALUE, long));
VALUE              49 intern.h       VALUE rb_ary_clear _((VALUE));
VALUE              50 intern.h       VALUE rb_ary_plus _((VALUE, VALUE));
VALUE              51 intern.h       VALUE rb_ary_concat _((VALUE, VALUE));
VALUE              52 intern.h       VALUE rb_ary_assoc _((VALUE, VALUE));
VALUE              53 intern.h       VALUE rb_ary_rassoc _((VALUE, VALUE));
VALUE              54 intern.h       VALUE rb_ary_includes _((VALUE, VALUE));
VALUE              55 intern.h       VALUE rb_ary_cmp _((VALUE, VALUE));
VALUE              56 intern.h       VALUE rb_protect_inspect _((VALUE(*)(ANYARGS),VALUE,VALUE));
VALUE              57 intern.h       VALUE rb_inspecting_p _((VALUE));
VALUE              58 intern.h       VALUE rb_check_array_value _((VALUE));
VALUE              59 intern.h       VALUE rb_values_at _((VALUE, long, int, VALUE*, VALUE(*) _((VALUE,long))));
VALUE              61 intern.h       VALUE rb_big_clone _((VALUE));
VALUE              62 intern.h       void rb_big_2comp _((VALUE));
VALUE              63 intern.h       VALUE rb_big_norm _((VALUE));
VALUE              64 intern.h       VALUE rb_uint2big _((unsigned long));
VALUE              65 intern.h       VALUE rb_int2big _((long));
VALUE              66 intern.h       VALUE rb_uint2inum _((unsigned long));
VALUE              67 intern.h       VALUE rb_int2inum _((long));
VALUE              68 intern.h       VALUE rb_cstr_to_inum _((const char*, int, int));
VALUE              69 intern.h       VALUE rb_str_to_inum _((VALUE, int, int));
VALUE              70 intern.h       VALUE rb_cstr2inum _((const char*, int));
VALUE              71 intern.h       VALUE rb_str2inum _((VALUE, int));
VALUE              72 intern.h       VALUE rb_big2str _((VALUE, int));
VALUE              73 intern.h       long rb_big2long _((VALUE));
VALUE              75 intern.h       unsigned long rb_big2ulong _((VALUE));
VALUE              78 intern.h       VALUE rb_ll2inum _((LONG_LONG));
VALUE              79 intern.h       VALUE rb_ull2inum _((unsigned LONG_LONG));
VALUE              80 intern.h       LONG_LONG rb_big2ll _((VALUE));
VALUE              81 intern.h       unsigned LONG_LONG rb_big2ull _((VALUE));
VALUE              83 intern.h       void rb_quad_pack _((char*,VALUE));
VALUE              84 intern.h       VALUE rb_quad_unpack _((const char*,int));
VALUE              85 intern.h       VALUE rb_dbl2big _((double));
VALUE              86 intern.h       double rb_big2dbl _((VALUE));
VALUE              87 intern.h       VALUE rb_big_plus _((VALUE, VALUE));
VALUE              88 intern.h       VALUE rb_big_minus _((VALUE, VALUE));
VALUE              89 intern.h       VALUE rb_big_mul _((VALUE, VALUE));
VALUE              90 intern.h       VALUE rb_big_divmod _((VALUE, VALUE));
VALUE              91 intern.h       VALUE rb_big_pow _((VALUE, VALUE));
VALUE              92 intern.h       VALUE rb_big_and _((VALUE, VALUE));
VALUE              93 intern.h       VALUE rb_big_or _((VALUE, VALUE));
VALUE              94 intern.h       VALUE rb_big_xor _((VALUE, VALUE));
VALUE              95 intern.h       VALUE rb_big_lshift _((VALUE, VALUE));
VALUE              96 intern.h       VALUE rb_big_rand _((VALUE, double*));
VALUE              98 intern.h       VALUE rb_class_boot _((VALUE));
VALUE              99 intern.h       VALUE rb_class_new _((VALUE));
VALUE             100 intern.h       VALUE rb_mod_init_copy _((VALUE, VALUE));
VALUE             101 intern.h       VALUE rb_class_init_copy _((VALUE, VALUE));
VALUE             102 intern.h       VALUE rb_singleton_class_clone _((VALUE));
VALUE             103 intern.h       void rb_singleton_class_attached _((VALUE,VALUE));
VALUE             104 intern.h       VALUE rb_make_metaclass _((VALUE, VALUE));
VALUE             105 intern.h       void rb_check_inheritable _((VALUE));
VALUE             106 intern.h       VALUE rb_class_inherited _((VALUE, VALUE));
VALUE             107 intern.h       VALUE rb_define_class_id _((ID, VALUE));
VALUE             108 intern.h       VALUE rb_module_new _((void));
VALUE             109 intern.h       VALUE rb_define_module_id _((ID));
VALUE             110 intern.h       VALUE rb_mod_included_modules _((VALUE));
VALUE             111 intern.h       VALUE rb_mod_include_p _((VALUE, VALUE));
VALUE             112 intern.h       VALUE rb_mod_ancestors _((VALUE));
VALUE             113 intern.h       VALUE rb_class_instance_methods _((int, VALUE*, VALUE));
VALUE             114 intern.h       VALUE rb_class_public_instance_methods _((int, VALUE*, VALUE));
VALUE             115 intern.h       VALUE rb_class_protected_instance_methods _((int, VALUE*, VALUE));
VALUE             116 intern.h       VALUE rb_class_private_instance_methods _((int, VALUE*, VALUE));
VALUE             117 intern.h       VALUE rb_obj_singleton_methods _((int, VALUE*, VALUE));
VALUE             118 intern.h       void rb_define_method_id _((VALUE, ID, VALUE (*)(ANYARGS), int));
VALUE             119 intern.h       void rb_frozen_class_p _((VALUE));
VALUE             120 intern.h       void rb_undef _((VALUE, ID));
VALUE             121 intern.h       void rb_define_protected_method _((VALUE, const char*, VALUE (*)(ANYARGS), int));
VALUE             122 intern.h       void rb_define_private_method _((VALUE, const char*, VALUE (*)(ANYARGS), int));
VALUE             123 intern.h       void rb_define_singleton_method _((VALUE, const char*, VALUE(*)(ANYARGS), int));
VALUE             124 intern.h       VALUE rb_singleton_class _((VALUE));
VALUE             126 intern.h       int rb_cmpint _((VALUE, VALUE, VALUE));
VALUE             127 intern.h       NORETURN(void rb_cmperr _((VALUE, VALUE)));
VALUE             131 intern.h       VALUE rb_exc_new _((VALUE, const char*, long));
VALUE             132 intern.h       VALUE rb_exc_new2 _((VALUE, const char*));
VALUE             133 intern.h       VALUE rb_exc_new3 _((VALUE, VALUE));
VALUE             141 intern.h       void rb_check_frozen _((VALUE));
VALUE             145 intern.h       NORETURN(void rb_exc_raise _((VALUE)));
VALUE             146 intern.h       NORETURN(void rb_exc_fatal _((VALUE)));
VALUE             147 intern.h       VALUE rb_f_exit _((int,VALUE*));
VALUE             148 intern.h       VALUE rb_f_abort _((int,VALUE*));
VALUE             149 intern.h       void rb_remove_method _((VALUE, const char*));
VALUE             153 intern.h       void rb_define_alloc_func _((VALUE, VALUE (*)(VALUE)));
VALUE             154 intern.h       void rb_undef_alloc_func _((VALUE));
VALUE             156 intern.h       void rb_clear_cache_by_class _((VALUE));
VALUE             157 intern.h       void rb_alias _((VALUE, ID, ID));
VALUE             158 intern.h       void rb_attr _((VALUE,ID,int,int,int));
VALUE             159 intern.h       int rb_method_boundp _((VALUE, ID, int));
VALUE             160 intern.h       VALUE rb_dvar_defined _((ID));
VALUE             161 intern.h       VALUE rb_dvar_curr _((ID));
VALUE             162 intern.h       VALUE rb_dvar_ref _((ID));
VALUE             163 intern.h       void rb_dvar_asgn _((ID, VALUE));
VALUE             164 intern.h       void rb_dvar_push _((ID, VALUE));
VALUE             165 intern.h       VALUE *rb_svar _((int));
VALUE             166 intern.h       VALUE rb_eval_cmd _((VALUE, VALUE, int));
VALUE             167 intern.h       int rb_obj_respond_to _((VALUE, ID, int));
VALUE             168 intern.h       int rb_respond_to _((VALUE, ID));
VALUE             170 intern.h       VALUE rb_apply _((VALUE, ID, VALUE));
VALUE             173 intern.h       VALUE rb_obj_instance_eval _((int, VALUE*, VALUE));
VALUE             174 intern.h       VALUE rb_mod_module_eval _((int, VALUE*, VALUE));
VALUE             175 intern.h       void rb_load _((VALUE, int));
VALUE             176 intern.h       void rb_load_protect _((VALUE, int, int*));
VALUE             180 intern.h       VALUE rb_f_require _((VALUE, VALUE));
VALUE             181 intern.h       VALUE rb_require_safe _((VALUE, int));
VALUE             182 intern.h       void rb_obj_call_init _((VALUE, int, VALUE*));
VALUE             183 intern.h       VALUE rb_class_new_instance _((int, VALUE*, VALUE));
VALUE             184 intern.h       VALUE rb_block_proc _((void));
VALUE             185 intern.h       VALUE rb_f_lambda _((void));
VALUE             186 intern.h       VALUE rb_proc_new _((VALUE (*)(ANYARGS/* VALUE yieldarg[, VALUE procarg] */), VALUE));
VALUE             187 intern.h       VALUE rb_protect _((VALUE (*)(VALUE), VALUE, int*));
VALUE             188 intern.h       void rb_set_end_proc _((void (*)(VALUE), VALUE));
VALUE             206 intern.h       VALUE rb_thread_stop _((void));
VALUE             207 intern.h       VALUE rb_thread_wakeup _((VALUE));
VALUE             208 intern.h       VALUE rb_thread_run _((VALUE));
VALUE             209 intern.h       VALUE rb_thread_kill _((VALUE));
VALUE             210 intern.h       VALUE rb_thread_create _((VALUE (*)(ANYARGS), void*));
VALUE             212 intern.h       void rb_thread_trap_eval _((VALUE, int, int));
VALUE             217 intern.h       VALUE rb_thread_current _((void));
VALUE             218 intern.h       VALUE rb_thread_main _((void));
VALUE             219 intern.h       VALUE rb_thread_local_aref _((VALUE, ID));
VALUE             220 intern.h       VALUE rb_thread_local_aset _((VALUE, ID, VALUE));
VALUE             222 intern.h       VALUE rb_funcall_rescue __((VALUE, ID, int, ...));
VALUE             225 intern.h       VALUE rb_file_s_expand_path _((int, VALUE *));
VALUE             226 intern.h       VALUE rb_file_expand_path _((VALUE, VALUE));
VALUE             227 intern.h       void rb_file_const _((const char*, VALUE));
VALUE             228 intern.h       int rb_find_file_ext _((VALUE*, const char* const*));
VALUE             229 intern.h       VALUE rb_find_file _((VALUE));
VALUE             237 intern.h       int ruby_stack_length _((VALUE**));
VALUE             239 intern.h       void rb_gc_mark_locations _((VALUE*, VALUE*));
VALUE             242 intern.h       void rb_gc_mark_maybe _((VALUE));
VALUE             243 intern.h       void rb_gc_mark _((VALUE));
VALUE             244 intern.h       void rb_gc_force_recycle _((VALUE));
VALUE             246 intern.h       void rb_gc_copy_finalizer _((VALUE,VALUE));
VALUE             249 intern.h       VALUE rb_gc_enable _((void));
VALUE             250 intern.h       VALUE rb_gc_disable _((void));
VALUE             251 intern.h       VALUE rb_gc_start _((void));
VALUE             254 intern.h       void rb_hash_foreach _((VALUE, int (*)(ANYARGS), VALUE));
VALUE             255 intern.h       VALUE rb_hash _((VALUE));
VALUE             256 intern.h       VALUE rb_hash_new _((void));
VALUE             257 intern.h       VALUE rb_hash_freeze _((VALUE));
VALUE             258 intern.h       VALUE rb_hash_aref _((VALUE, VALUE));
VALUE             259 intern.h       VALUE rb_hash_aset _((VALUE, VALUE, VALUE));
VALUE             260 intern.h       VALUE rb_hash_delete_if _((VALUE));
VALUE             261 intern.h       VALUE rb_hash_delete _((VALUE,VALUE));
VALUE             266 intern.h       RUBY_EXTERN VALUE rb_fs;
VALUE             267 intern.h       RUBY_EXTERN VALUE rb_output_fs;
VALUE             268 intern.h       RUBY_EXTERN VALUE rb_rs;
VALUE             269 intern.h       RUBY_EXTERN VALUE rb_default_rs;
VALUE             270 intern.h       RUBY_EXTERN VALUE rb_output_rs;
VALUE             271 intern.h       VALUE rb_io_write _((VALUE, VALUE));
VALUE             272 intern.h       VALUE rb_io_gets _((VALUE));
VALUE             273 intern.h       VALUE rb_io_getc _((VALUE));
VALUE             274 intern.h       VALUE rb_io_ungetc _((VALUE, VALUE));
VALUE             275 intern.h       VALUE rb_io_close _((VALUE));
VALUE             276 intern.h       VALUE rb_io_eof _((VALUE));
VALUE             277 intern.h       VALUE rb_io_binmode _((VALUE));
VALUE             278 intern.h       VALUE rb_io_addstr _((VALUE, VALUE));
VALUE             279 intern.h       VALUE rb_io_printf _((int, VALUE*, VALUE));
VALUE             280 intern.h       VALUE rb_io_print _((int, VALUE*, VALUE));
VALUE             281 intern.h       VALUE rb_io_puts _((int, VALUE*, VALUE));
VALUE             282 intern.h       VALUE rb_file_open _((const char*, const char*));
VALUE             283 intern.h       VALUE rb_gets _((void));
VALUE             287 intern.h       VALUE rb_marshal_dump _((VALUE, VALUE));
VALUE             288 intern.h       VALUE rb_marshal_load _((VALUE));
VALUE             291 intern.h       VALUE rb_num_coerce_bin _((VALUE, VALUE));
VALUE             292 intern.h       VALUE rb_num_coerce_cmp _((VALUE, VALUE));
VALUE             293 intern.h       VALUE rb_num_coerce_relop _((VALUE, VALUE));
VALUE             294 intern.h       VALUE rb_float_new _((double));
VALUE             295 intern.h       VALUE rb_num2fix _((VALUE));
VALUE             296 intern.h       VALUE rb_fix2str _((VALUE, int));
VALUE             297 intern.h       VALUE rb_dbl_cmp _((double, double));
VALUE             299 intern.h       int rb_eql _((VALUE, VALUE));
VALUE             300 intern.h       VALUE rb_any_to_s _((VALUE));
VALUE             301 intern.h       VALUE rb_inspect _((VALUE));
VALUE             302 intern.h       VALUE rb_obj_is_instance_of _((VALUE, VALUE));
VALUE             303 intern.h       VALUE rb_obj_is_kind_of _((VALUE, VALUE));
VALUE             304 intern.h       VALUE rb_obj_alloc _((VALUE));
VALUE             305 intern.h       VALUE rb_obj_clone _((VALUE));
VALUE             306 intern.h       VALUE rb_obj_dup _((VALUE));
VALUE             307 intern.h       VALUE rb_obj_init_copy _((VALUE,VALUE));
VALUE             308 intern.h       VALUE rb_obj_taint _((VALUE));
VALUE             309 intern.h       VALUE rb_obj_tainted _((VALUE));
VALUE             310 intern.h       VALUE rb_obj_untaint _((VALUE));
VALUE             311 intern.h       VALUE rb_obj_freeze _((VALUE));
VALUE             312 intern.h       VALUE rb_obj_id _((VALUE));
VALUE             313 intern.h       VALUE rb_obj_class _((VALUE));
VALUE             314 intern.h       VALUE rb_class_real _((VALUE));
VALUE             315 intern.h       VALUE rb_class_inherited_p _((VALUE, VALUE));
VALUE             316 intern.h       VALUE rb_convert_type _((VALUE,int,const char*,const char*));
VALUE             317 intern.h       VALUE rb_check_convert_type _((VALUE,int,const char*,const char*));
VALUE             318 intern.h       VALUE rb_to_int _((VALUE));
VALUE             319 intern.h       VALUE rb_Integer _((VALUE));
VALUE             320 intern.h       VALUE rb_Float _((VALUE));
VALUE             321 intern.h       VALUE rb_String _((VALUE));
VALUE             322 intern.h       VALUE rb_Array _((VALUE));
VALUE             324 intern.h       double rb_str_to_dbl _((VALUE, int));
VALUE             340 intern.h       VALUE rb_backref_get _((void));
VALUE             341 intern.h       void rb_backref_set _((VALUE));
VALUE             342 intern.h       VALUE rb_lastline_get _((void));
VALUE             343 intern.h       void rb_lastline_set _((VALUE));
VALUE             344 intern.h       VALUE rb_sym_all_symbols _((void));
VALUE             347 intern.h       VALUE rb_f_exec _((int,VALUE*));
VALUE             350 intern.h       VALUE rb_proc_times _((VALUE));
VALUE             351 intern.h       VALUE rb_detach_process _((int));
VALUE             353 intern.h       VALUE rb_range_new _((VALUE, VALUE, int));
VALUE             354 intern.h       VALUE rb_range_beg_len _((VALUE, long*, long*, long, int));
VALUE             355 intern.h       VALUE rb_length_by_each _((VALUE));
VALUE             360 intern.h       VALUE rb_reg_nth_defined _((int, VALUE));
VALUE             361 intern.h       VALUE rb_reg_nth_match _((int, VALUE));
VALUE             362 intern.h       VALUE rb_reg_last_match _((VALUE));
VALUE             363 intern.h       VALUE rb_reg_match_pre _((VALUE));
VALUE             364 intern.h       VALUE rb_reg_match_post _((VALUE));
VALUE             365 intern.h       VALUE rb_reg_match_last _((VALUE));
VALUE             366 intern.h       VALUE rb_reg_new _((const char*, long, int));
VALUE             367 intern.h       VALUE rb_reg_match _((VALUE, VALUE));
VALUE             368 intern.h       VALUE rb_reg_match2 _((VALUE));
VALUE             369 intern.h       int rb_reg_options _((VALUE));
VALUE             373 intern.h       RUBY_EXTERN VALUE rb_argv;
VALUE             374 intern.h       RUBY_EXTERN VALUE rb_argv0;
VALUE             384 intern.h       VALUE rb_f_kill _((int, VALUE*));
VALUE             394 intern.h       VALUE rb_f_sprintf _((int, VALUE*));
VALUE             396 intern.h       VALUE rb_str_new _((const char*, long));
VALUE             397 intern.h       VALUE rb_str_new2 _((const char*));
VALUE             398 intern.h       VALUE rb_str_new3 _((VALUE));
VALUE             399 intern.h       VALUE rb_str_new4 _((VALUE));
VALUE             400 intern.h       VALUE rb_str_new5 _((VALUE, const char*, long));
VALUE             401 intern.h       VALUE rb_tainted_str_new _((const char*, long));
VALUE             402 intern.h       VALUE rb_tainted_str_new2 _((const char*));
VALUE             403 intern.h       VALUE rb_str_buf_new _((long));
VALUE             404 intern.h       VALUE rb_str_buf_new2 _((const char*));
VALUE             405 intern.h       VALUE rb_str_buf_append _((VALUE, VALUE));
VALUE             406 intern.h       VALUE rb_str_buf_cat _((VALUE, const char*, long));
VALUE             407 intern.h       VALUE rb_str_buf_cat2 _((VALUE, const char*));
VALUE             408 intern.h       VALUE rb_obj_as_string _((VALUE));
VALUE             409 intern.h       VALUE rb_check_string_type _((VALUE));
VALUE             410 intern.h       VALUE rb_str_dup _((VALUE));
VALUE             411 intern.h       VALUE rb_str_locktmp _((VALUE));
VALUE             412 intern.h       VALUE rb_str_unlocktmp _((VALUE));
VALUE             413 intern.h       VALUE rb_str_dup_frozen _((VALUE));
VALUE             414 intern.h       VALUE rb_str_plus _((VALUE, VALUE));
VALUE             415 intern.h       VALUE rb_str_times _((VALUE, VALUE));
VALUE             416 intern.h       VALUE rb_str_substr _((VALUE, long, long));
VALUE             417 intern.h       void rb_str_modify _((VALUE));
VALUE             418 intern.h       VALUE rb_str_freeze _((VALUE));
VALUE             419 intern.h       VALUE rb_str_resize _((VALUE, long));
VALUE             420 intern.h       VALUE rb_str_cat _((VALUE, const char*, long));
VALUE             421 intern.h       VALUE rb_str_cat2 _((VALUE, const char*));
VALUE             422 intern.h       VALUE rb_str_append _((VALUE, VALUE));
VALUE             423 intern.h       VALUE rb_str_concat _((VALUE, VALUE));
VALUE             424 intern.h       int rb_str_hash _((VALUE));
VALUE             425 intern.h       int rb_str_cmp _((VALUE, VALUE));
VALUE             426 intern.h       VALUE rb_str_upto _((VALUE, VALUE, int));
VALUE             427 intern.h       void rb_str_update _((VALUE, long, long, VALUE));
VALUE             428 intern.h       VALUE rb_str_inspect _((VALUE));
VALUE             429 intern.h       VALUE rb_str_dump _((VALUE));
VALUE             430 intern.h       VALUE rb_str_split _((VALUE, const char*));
VALUE             431 intern.h       void rb_str_associate _((VALUE, VALUE));
VALUE             432 intern.h       VALUE rb_str_associated _((VALUE));
VALUE             433 intern.h       void rb_str_setter _((VALUE, ID, VALUE*));
VALUE             434 intern.h       VALUE rb_str_intern _((VALUE));
VALUE             436 intern.h       VALUE rb_struct_new __((VALUE, ...));
VALUE             437 intern.h       VALUE rb_struct_define __((const char*, ...));
VALUE             438 intern.h       VALUE rb_struct_alloc _((VALUE, VALUE));
VALUE             439 intern.h       VALUE rb_struct_aref _((VALUE, VALUE));
VALUE             440 intern.h       VALUE rb_struct_aset _((VALUE, VALUE, VALUE));
VALUE             441 intern.h       VALUE rb_struct_getmember _((VALUE, ID));
VALUE             442 intern.h       VALUE rb_struct_iv_get _((VALUE, char*));
VALUE             443 intern.h       VALUE rb_struct_s_members _((VALUE));
VALUE             444 intern.h       VALUE rb_struct_members _((VALUE));
VALUE             446 intern.h       VALUE rb_time_new _((time_t, time_t));
VALUE             448 intern.h       VALUE rb_mod_name _((VALUE));
VALUE             449 intern.h       VALUE rb_class_path _((VALUE));
VALUE             450 intern.h       void rb_set_class_path _((VALUE, VALUE, const char*));
VALUE             451 intern.h       VALUE rb_path2class _((const char*));
VALUE             452 intern.h       void rb_name_class _((VALUE, ID));
VALUE             453 intern.h       VALUE rb_class_name _((VALUE));
VALUE             454 intern.h       void rb_autoload _((VALUE, ID, const char*));
VALUE             455 intern.h       VALUE rb_autoload_load _((VALUE, ID));
VALUE             456 intern.h       VALUE rb_autoload_p _((VALUE, ID));
VALUE             458 intern.h       VALUE rb_f_trace_var _((int, VALUE*));
VALUE             459 intern.h       VALUE rb_f_untrace_var _((int, VALUE*));
VALUE             460 intern.h       VALUE rb_f_global_variables _((void));
VALUE             462 intern.h       struct st_table* rb_generic_ivar_table _((VALUE));
VALUE             463 intern.h       void rb_copy_generic_ivar _((VALUE,VALUE));
VALUE             464 intern.h       void rb_mark_generic_ivar _((VALUE));
VALUE             466 intern.h       void rb_free_generic_ivar _((VALUE));
VALUE             467 intern.h       VALUE rb_ivar_get _((VALUE, ID));
VALUE             468 intern.h       VALUE rb_ivar_set _((VALUE, ID, VALUE));
VALUE             469 intern.h       VALUE rb_ivar_defined _((VALUE, ID));
VALUE             470 intern.h       VALUE rb_iv_set _((VALUE, const char*, VALUE));
VALUE             471 intern.h       VALUE rb_iv_get _((VALUE, const char*));
VALUE             472 intern.h       VALUE rb_attr_get _((VALUE, ID));
VALUE             473 intern.h       VALUE rb_obj_instance_variables _((VALUE));
VALUE             474 intern.h       VALUE rb_obj_remove_instance_variable _((VALUE, VALUE));
VALUE             475 intern.h       void *rb_mod_const_at _((VALUE, void*));
VALUE             476 intern.h       void *rb_mod_const_of _((VALUE, void*));
VALUE             477 intern.h       VALUE rb_const_list _((void*));
VALUE             478 intern.h       VALUE rb_mod_constants _((VALUE));
VALUE             479 intern.h       VALUE rb_mod_remove_const _((VALUE, VALUE));
VALUE             480 intern.h       int rb_const_defined _((VALUE, ID));
VALUE             481 intern.h       int rb_const_defined_at _((VALUE, ID));
VALUE             482 intern.h       int rb_const_defined_from _((VALUE, ID));
VALUE             483 intern.h       VALUE rb_const_get _((VALUE, ID));
VALUE             484 intern.h       VALUE rb_const_get_at _((VALUE, ID));
VALUE             485 intern.h       VALUE rb_const_get_from _((VALUE, ID));
VALUE             486 intern.h       void rb_const_set _((VALUE, ID, VALUE));
VALUE             487 intern.h       VALUE rb_mod_constants _((VALUE));
VALUE             488 intern.h       VALUE rb_mod_const_missing _((VALUE,VALUE));
VALUE             489 intern.h       VALUE rb_cvar_defined _((VALUE, ID));
VALUE             491 intern.h       void rb_cvar_set _((VALUE, ID, VALUE, int));
VALUE             492 intern.h       VALUE rb_cvar_get _((VALUE, ID));
VALUE             493 intern.h       void rb_cv_set _((VALUE, const char*, VALUE));
VALUE             494 intern.h       VALUE rb_cv_get _((VALUE, const char*));
VALUE             495 intern.h       void rb_define_class_variable _((VALUE, const char*, VALUE));
VALUE             496 intern.h       VALUE rb_mod_class_variables _((VALUE));
VALUE             497 intern.h       VALUE rb_mod_remove_cvar _((VALUE, VALUE));
VALUE             111 io.c           VALUE rb_cIO;
VALUE             112 io.c           VALUE rb_eEOFError;
VALUE             113 io.c           VALUE rb_eIOError;
VALUE             115 io.c           VALUE rb_stdin, rb_stdout, rb_stderr;
VALUE             116 io.c           VALUE rb_deferr;		/* rescue VIM plugin */
VALUE             117 io.c           static VALUE orig_stdout, orig_stderr;
VALUE             119 io.c           VALUE rb_output_fs;
VALUE             120 io.c           VALUE rb_rs;
VALUE             121 io.c           VALUE rb_output_rs;
VALUE             122 io.c           VALUE rb_default_rs;
VALUE             124 io.c           static VALUE argf;
VALUE             130 io.c           struct timeval rb_time_interval _((VALUE));
VALUE             132 io.c           static VALUE filename, current_file;
VALUE             135 io.c           static VALUE lineno = INT2FIX(0);
VALUE             193 io.c           VALUE
VALUE             195 io.c               VALUE io;
VALUE             315 io.c           static VALUE io_alloc _((VALUE));
VALUE             316 io.c           static VALUE
VALUE             318 io.c               VALUE klass;
VALUE             325 io.c               return (VALUE)io;
VALUE             433 io.c               VALUE str;
VALUE             541 io.c           static VALUE
VALUE             543 io.c               VALUE io, str;
VALUE             570 io.c           VALUE
VALUE             572 io.c               VALUE io, str;
VALUE             592 io.c           VALUE
VALUE             594 io.c               VALUE io, str;
VALUE             616 io.c           static VALUE
VALUE             618 io.c               VALUE io;
VALUE             645 io.c           static VALUE
VALUE             647 io.c                VALUE io;
VALUE             658 io.c           static VALUE
VALUE             660 io.c               VALUE io, offset;
VALUE             696 io.c           static VALUE
VALUE             699 io.c               VALUE *argv;
VALUE             700 io.c               VALUE io;
VALUE             702 io.c               VALUE offset, ptrname;
VALUE             723 io.c           static VALUE
VALUE             725 io.c                VALUE io, offset;
VALUE             753 io.c           static VALUE
VALUE             755 io.c               VALUE io;
VALUE             802 io.c           VALUE
VALUE             804 io.c               VALUE io;
VALUE             842 io.c           static VALUE
VALUE             844 io.c               VALUE io;
VALUE             867 io.c           static VALUE
VALUE             869 io.c               VALUE io, mode;
VALUE             895 io.c           static VALUE
VALUE             897 io.c               VALUE io;
VALUE             928 io.c           static VALUE
VALUE             930 io.c               VALUE io;
VALUE             960 io.c           static VALUE
VALUE             962 io.c               VALUE io;
VALUE             979 io.c           static VALUE
VALUE             981 io.c               VALUE obj;
VALUE            1007 io.c           static VALUE
VALUE            1009 io.c               VALUE io;
VALUE            1133 io.c           static VALUE
VALUE            1137 io.c               VALUE str;
VALUE            1171 io.c           static VALUE
VALUE            1172 io.c           io_getpartial(int argc, VALUE *argv, VALUE io)
VALUE            1175 io.c               VALUE length, str;
VALUE            1279 io.c           static VALUE
VALUE            1280 io.c           io_readpartial(int argc, VALUE *argv, VALUE io)
VALUE            1282 io.c               VALUE ret;
VALUE            1311 io.c           static VALUE
VALUE            1314 io.c               VALUE *argv;
VALUE            1315 io.c               VALUE io;
VALUE            1319 io.c               VALUE length, str;
VALUE            1375 io.c               VALUE *strp;
VALUE            1378 io.c               VALUE str = *strp;
VALUE            1515 io.c           static VALUE
VALUE            1520 io.c               VALUE str = Qnil;
VALUE            1538 io.c               VALUE rs;
VALUE            1545 io.c           static VALUE rb_io_getline(VALUE rs, VALUE io);
VALUE            1547 io.c           static VALUE
VALUE            1549 io.c               VALUE rs, io;
VALUE            1551 io.c               VALUE str = Qnil;
VALUE            1605 io.c           VALUE
VALUE            1607 io.c               VALUE io;
VALUE            1633 io.c           static VALUE
VALUE            1636 io.c               VALUE *argv;
VALUE            1637 io.c               VALUE io;
VALUE            1639 io.c               VALUE rs, str;
VALUE            1673 io.c           static VALUE
VALUE            1675 io.c               VALUE io;
VALUE            1701 io.c           static VALUE
VALUE            1703 io.c               VALUE io, lineno;
VALUE            1715 io.c               VALUE val;
VALUE            1717 io.c               VALUE *var;
VALUE            1723 io.c           static VALUE
VALUE            1725 io.c               VALUE argf, val;
VALUE            1732 io.c           static VALUE
VALUE            1746 io.c           static VALUE
VALUE            1749 io.c               VALUE *argv;
VALUE            1750 io.c               VALUE io;
VALUE            1752 io.c               VALUE line = rb_io_gets_m(argc, argv, io);
VALUE            1775 io.c           static VALUE
VALUE            1778 io.c               VALUE *argv;
VALUE            1779 io.c               VALUE io;
VALUE            1781 io.c               VALUE line, ary;
VALUE            1782 io.c               VALUE rs;
VALUE            1818 io.c           static VALUE
VALUE            1821 io.c               VALUE *argv;
VALUE            1822 io.c               VALUE io;
VALUE            1824 io.c               VALUE str;
VALUE            1825 io.c               VALUE rs;
VALUE            1854 io.c           static VALUE
VALUE            1856 io.c               VALUE io;
VALUE            1899 io.c           VALUE
VALUE            1901 io.c               VALUE io;
VALUE            1955 io.c           static VALUE
VALUE            1957 io.c               VALUE io;
VALUE            1959 io.c               VALUE c = rb_io_getc(io);
VALUE            1983 io.c           VALUE
VALUE            1985 io.c               VALUE io, c;
VALUE            2013 io.c           static VALUE
VALUE            2015 io.c               VALUE io;
VALUE            2096 io.c           VALUE
VALUE            2098 io.c               VALUE io;
VALUE            2137 io.c           static VALUE
VALUE            2139 io.c               VALUE io;
VALUE            2149 io.c           static VALUE
VALUE            2151 io.c               VALUE io;
VALUE            2178 io.c           static VALUE
VALUE            2180 io.c               VALUE io;
VALUE            2207 io.c           static VALUE
VALUE            2209 io.c               VALUE io;
VALUE            2252 io.c           static VALUE
VALUE            2254 io.c               VALUE io;
VALUE            2290 io.c           static VALUE
VALUE            2293 io.c               VALUE *argv;
VALUE            2294 io.c               VALUE io;
VALUE            2296 io.c               VALUE offset, ptrname;
VALUE            2332 io.c           static VALUE
VALUE            2334 io.c               VALUE io, str;
VALUE            2377 io.c           static VALUE
VALUE            2380 io.c               VALUE *argv;
VALUE            2381 io.c               VALUE io;
VALUE            2383 io.c               VALUE len, str;
VALUE            2442 io.c           VALUE
VALUE            2444 io.c               VALUE io;
VALUE            2726 io.c           static VALUE
VALUE            2728 io.c               VALUE io;
VALUE            2742 io.c           VALUE
VALUE            2749 io.c           static VALUE
VALUE            2751 io.c               VALUE io;
VALUE            2770 io.c           VALUE
VALUE            2841 io.c               extern VALUE rb_last_status;
VALUE            2875 io.c           static VALUE pipe_open(VALUE pstr, char *pname, char *mode);
VALUE            2877 io.c           static VALUE
VALUE            2879 io.c               VALUE pstr;
VALUE            2893 io.c           	VALUE port = io_alloc(rb_cIO);
VALUE            2906 io.c           	return (VALUE)port;
VALUE            2925 io.c                   VALUE port = io_alloc(rb_cIO);
VALUE            2941 io.c           	return (VALUE)port;
VALUE            3004 io.c           	    VALUE port = io_alloc(rb_cIO);
VALUE            3074 io.c           static VALUE
VALUE            3077 io.c               VALUE *argv;
VALUE            3078 io.c               VALUE klass;
VALUE            3081 io.c               VALUE pname, pmode, port;
VALUE            3111 io.c           static VALUE
VALUE            3114 io.c               VALUE *argv;
VALUE            3115 io.c               VALUE io;
VALUE            3117 io.c               VALUE fname, vmode, perm;
VALUE            3156 io.c           static VALUE
VALUE            3159 io.c               VALUE *argv;
VALUE            3160 io.c               VALUE klass;
VALUE            3162 io.c               VALUE io = rb_class_new_instance(argc, argv, klass);
VALUE            3182 io.c           static VALUE
VALUE            3185 io.c               VALUE *argv;
VALUE            3187 io.c               VALUE fname, vmode, perm;
VALUE            3291 io.c           static VALUE
VALUE            3294 io.c               VALUE *argv;
VALUE            3300 io.c           	    VALUE tmp = rb_str_new(str+1, RSTRING(argv[0])->len-1);
VALUE            3309 io.c           static VALUE
VALUE            3321 io.c           static VALUE
VALUE            3323 io.c               VALUE io;
VALUE            3328 io.c           static VALUE
VALUE            3330 io.c               VALUE io;
VALUE            3350 io.c           static VALUE
VALUE            3352 io.c               VALUE io, nfile;
VALUE            3464 io.c           static VALUE
VALUE            3467 io.c               VALUE *argv;
VALUE            3468 io.c               VALUE file;
VALUE            3470 io.c               VALUE fname, nmode;
VALUE            3476 io.c           	VALUE tmp = rb_io_check_io(fname);
VALUE            3528 io.c           static VALUE
VALUE            3530 io.c               VALUE dest, io;
VALUE            3596 io.c           VALUE
VALUE            3599 io.c               VALUE argv[];
VALUE            3600 io.c               VALUE out;
VALUE            3617 io.c           static VALUE
VALUE            3620 io.c               VALUE argv[];
VALUE            3622 io.c               VALUE out;
VALUE            3658 io.c           VALUE
VALUE            3661 io.c               VALUE *argv;
VALUE            3662 io.c               VALUE out;
VALUE            3665 io.c               VALUE line;
VALUE            3716 io.c           static VALUE
VALUE            3719 io.c               VALUE *argv;
VALUE            3741 io.c           static VALUE
VALUE            3743 io.c               VALUE io, ch;
VALUE            3760 io.c           static VALUE
VALUE            3762 io.c               VALUE recv, ch;
VALUE            3767 io.c           static VALUE
VALUE            3769 io.c               VALUE ary, out;
VALUE            3771 io.c               VALUE tmp;
VALUE            3804 io.c           VALUE
VALUE            3807 io.c               VALUE *argv;
VALUE            3808 io.c               VALUE out;
VALUE            3811 io.c               VALUE line;
VALUE            3849 io.c           static VALUE
VALUE            3852 io.c               VALUE *argv;
VALUE            3860 io.c               VALUE obj;
VALUE            3883 io.c           static VALUE
VALUE            3886 io.c               VALUE *argv;
VALUE            3922 io.c           static VALUE
VALUE            3925 io.c               VALUE *argv;
VALUE            3926 io.c               VALUE self;
VALUE            3928 io.c               VALUE out;
VALUE            3957 io.c               VALUE val;
VALUE            3969 io.c               VALUE val;
VALUE            3971 io.c               VALUE *variable;
VALUE            3979 io.c               VALUE val;
VALUE            3981 io.c               VALUE *variable;
VALUE            3989 io.c               VALUE val;
VALUE            3991 io.c               VALUE *variable;
VALUE            3997 io.c           static VALUE
VALUE            4001 io.c               VALUE klass;
VALUE            4004 io.c               VALUE io = io_alloc(klass);
VALUE            4021 io.c               VALUE io;
VALUE            4049 io.c           static VALUE
VALUE            4052 io.c               VALUE *argv;
VALUE            4053 io.c               VALUE io;
VALUE            4055 io.c               VALUE fnum, mode;
VALUE            4107 io.c           static VALUE
VALUE            4110 io.c               VALUE *argv;
VALUE            4111 io.c               VALUE io;
VALUE            4117 io.c           	VALUE fd = rb_check_convert_type(argv[0], T_FIXNUM, "Fixnum", "to_int");
VALUE            4147 io.c           static VALUE
VALUE            4150 io.c               VALUE *argv;
VALUE            4151 io.c               VALUE klass;
VALUE            4170 io.c           static VALUE
VALUE            4173 io.c               VALUE *argv;
VALUE            4174 io.c               VALUE klass;
VALUE            4176 io.c               VALUE io = rb_obj_alloc(klass);
VALUE            4183 io.c           static VALUE
VALUE            4198 io.c               VALUE file;
VALUE            4209 io.c               extern VALUE rb_argv;
VALUE            4249 io.c           		    VALUE str;
VALUE            4326 io.c           static VALUE
VALUE            4329 io.c               VALUE *argv;
VALUE            4331 io.c               VALUE line;
VALUE            4339 io.c           	VALUE rs;
VALUE            4391 io.c           static VALUE
VALUE            4394 io.c               VALUE *argv;
VALUE            4396 io.c               VALUE line;
VALUE            4409 io.c           VALUE
VALUE            4412 io.c               VALUE line;
VALUE            4443 io.c           static VALUE
VALUE            4446 io.c               VALUE *argv;
VALUE            4448 io.c               VALUE line;
VALUE            4464 io.c           static VALUE
VALUE            4482 io.c           static VALUE
VALUE            4485 io.c               VALUE *argv;
VALUE            4487 io.c               VALUE line, ary;
VALUE            4512 io.c           static VALUE
VALUE            4514 io.c               VALUE obj, str;
VALUE            4516 io.c               volatile VALUE port;
VALUE            4517 io.c               VALUE result;
VALUE            4545 io.c           static VALUE
VALUE            4548 io.c               VALUE *argv;
VALUE            4549 io.c               VALUE obj;
VALUE            4551 io.c               VALUE read, write, except, timeout, res, list;
VALUE            4710 io.c           static VALUE
VALUE            4712 io.c               VALUE io, req, arg;
VALUE            4734 io.c           	VALUE tmp = rb_check_string_type(arg);
VALUE            4804 io.c           static VALUE
VALUE            4807 io.c               VALUE *argv;
VALUE            4808 io.c               VALUE io;
VALUE            4810 io.c               VALUE req, arg;
VALUE            4829 io.c           static VALUE
VALUE            4832 io.c               VALUE *argv;
VALUE            4833 io.c               VALUE io;
VALUE            4836 io.c               VALUE req, arg;
VALUE            4865 io.c           static VALUE
VALUE            4868 io.c               VALUE *argv;
VALUE            4890 io.c           	VALUE v = rb_check_string_type(*argv);
VALUE            4966 io.c           static VALUE io_new_instance _((VALUE));
VALUE            4967 io.c           static VALUE
VALUE            4969 io.c               VALUE args;
VALUE            4971 io.c               return rb_class_new_instance(2, (VALUE*)args+1, *(VALUE*)args);
VALUE            5010 io.c           static VALUE
VALUE            5012 io.c               VALUE klass;
VALUE            5016 io.c               VALUE r, w, args[3];
VALUE            5028 io.c               r = rb_protect(io_new_instance, (VALUE)args, &state);
VALUE            5036 io.c               w = rb_protect(io_new_instance, (VALUE)args, &state);
VALUE            5053 io.c               VALUE sep;
VALUE            5054 io.c               VALUE io;
VALUE            5057 io.c           static VALUE
VALUE            5061 io.c               VALUE str;
VALUE            5086 io.c           static VALUE
VALUE            5089 io.c               VALUE *argv;
VALUE            5091 io.c               VALUE fname;
VALUE            5106 io.c               return rb_ensure(io_s_foreach, (VALUE)&arg, rb_io_close, arg.io);
VALUE            5109 io.c           static VALUE
VALUE            5129 io.c           static VALUE
VALUE            5132 io.c               VALUE *argv;
VALUE            5133 io.c               VALUE io;
VALUE            5135 io.c               VALUE fname;
VALUE            5144 io.c               return rb_ensure(io_s_readlines, (VALUE)&arg, rb_io_close, arg.io);
VALUE            5147 io.c           static VALUE
VALUE            5167 io.c           static VALUE
VALUE            5170 io.c               VALUE *argv;
VALUE            5171 io.c               VALUE io;
VALUE            5173 io.c               VALUE fname, offset;
VALUE            5185 io.c               return rb_ensure(io_s_read, (VALUE)&arg, rb_io_close, arg.io);
VALUE            5188 io.c           static VALUE
VALUE            5198 io.c           static VALUE
VALUE            5201 io.c               VALUE *argv;
VALUE            5202 io.c               VALUE self;
VALUE            5211 io.c           static VALUE
VALUE            5213 io.c                VALUE self, offset;
VALUE            5222 io.c           static VALUE
VALUE            5232 io.c           static VALUE
VALUE            5242 io.c           static VALUE
VALUE            5250 io.c           static VALUE
VALUE            5263 io.c           static VALUE
VALUE            5266 io.c               VALUE *argv;
VALUE            5268 io.c               VALUE tmp, str, length;
VALUE            5310 io.c           static VALUE
VALUE            5313 io.c               VALUE byte;
VALUE            5332 io.c           static VALUE
VALUE            5335 io.c               VALUE c;
VALUE            5345 io.c           static VALUE
VALUE            5348 io.c               VALUE *argv;
VALUE            5350 io.c               VALUE str;
VALUE            5366 io.c           static VALUE
VALUE            5369 io.c               VALUE byte;
VALUE            5377 io.c           static VALUE
VALUE            5384 io.c           static VALUE
VALUE            5391 io.c           static VALUE
VALUE            5401 io.c           static VALUE
VALUE            5411 io.c           static VALUE
VALUE            5423 io.c           static VALUE
VALUE            5431 io.c           static VALUE
VALUE            5437 io.c           static VALUE
VALUE            5446 io.c               VALUE val;
VALUE              88 marshal.c          VALUE obj;
VALUE              89 marshal.c          VALUE str, dest;
VALUE              96 marshal.c          VALUE obj;
VALUE             101 marshal.c      static VALUE
VALUE             103 marshal.c          VALUE klass;
VALUE             105 marshal.c          VALUE path = rb_class_path(klass);
VALUE             127 marshal.c          VALUE buf = arg->str;
VALUE             356 marshal.c      static void w_object _((VALUE,struct dump_arg*,int));
VALUE             360 marshal.c          VALUE key, value;
VALUE             370 marshal.c          VALUE klass;
VALUE             394 marshal.c          VALUE obj;
VALUE             400 marshal.c          VALUE klass = CLASS_OF(obj);
VALUE             409 marshal.c          VALUE obj, base_klass;
VALUE             412 marshal.c          VALUE klass = CLASS_OF(obj);
VALUE             425 marshal.c          VALUE value;
VALUE             449 marshal.c          VALUE obj;
VALUE             505 marshal.c      	    VALUE v;
VALUE             514 marshal.c      	    VALUE v;
VALUE             538 marshal.c      		VALUE path = class2path(obj);
VALUE             546 marshal.c      		VALUE path = class2path(obj);
VALUE             601 marshal.c      		VALUE *ptr = RARRAY(obj)->ptr;
VALUE             634 marshal.c      		VALUE mem;
VALUE             653 marshal.c      		VALUE v;
VALUE             677 marshal.c      static VALUE
VALUE             689 marshal.c      static VALUE
VALUE             727 marshal.c      static VALUE
VALUE             730 marshal.c          VALUE* argv;
VALUE             732 marshal.c          VALUE obj, port, a1, a2;
VALUE             776 marshal.c          rb_ensure(dump, (VALUE)&c_arg, dump_ensure, (VALUE)&arg);
VALUE             782 marshal.c          VALUE src;
VALUE             785 marshal.c          VALUE data;
VALUE             786 marshal.c          VALUE proc;
VALUE             790 marshal.c      static VALUE r_object _((struct load_arg *arg));
VALUE             807 marshal.c      	VALUE src = arg->src;
VALUE             808 marshal.c      	VALUE v = rb_funcall2(src, s_getc, 0, 0);
VALUE             867 marshal.c      static VALUE
VALUE             872 marshal.c          VALUE str;
VALUE             886 marshal.c      	VALUE src = arg->src;
VALUE             887 marshal.c      	VALUE n = LONG2NUM(len);
VALUE             939 marshal.c      static VALUE
VALUE             946 marshal.c      static VALUE
VALUE             948 marshal.c          VALUE v;
VALUE             958 marshal.c          VALUE obj;
VALUE             967 marshal.c      	    VALUE val = r_object(arg);
VALUE             973 marshal.c      static VALUE
VALUE             977 marshal.c          VALUE v = rb_path2class(path);
VALUE             985 marshal.c      static VALUE
VALUE             989 marshal.c          VALUE v = rb_path2class(path);
VALUE             997 marshal.c      static VALUE
VALUE            1000 marshal.c          VALUE proc;
VALUE            1002 marshal.c          VALUE extmod;
VALUE            1004 marshal.c          VALUE v = Qnil;
VALUE            1028 marshal.c      	    VALUE m = path2module(r_unique(arg));
VALUE            1043 marshal.c      	    VALUE c = path2class(r_unique(arg));
VALUE            1054 marshal.c      		VALUE tmp = rb_obj_alloc(c);
VALUE            1084 marshal.c      	    VALUE str = r_bytes(arg);
VALUE            1110 marshal.c      	    volatile VALUE data;
VALUE            1146 marshal.c      	    v = rb_big_norm((VALUE)big);
VALUE            1157 marshal.c      	    volatile VALUE str = r_bytes(arg);
VALUE            1183 marshal.c      		VALUE key = r_object(arg);
VALUE            1184 marshal.c      		VALUE value = r_object(arg);
VALUE            1195 marshal.c      	    VALUE klass, mem, values;
VALUE            1229 marshal.c      	    VALUE klass = path2class(r_unique(arg));
VALUE            1230 marshal.c      	    VALUE data;
VALUE            1248 marshal.c      	    VALUE klass = path2class(r_unique(arg));
VALUE            1249 marshal.c      	    VALUE data;
VALUE            1254 marshal.c                          VALUE m = rb_ary_pop(extmod);
VALUE            1270 marshal.c      	    VALUE klass = path2class(r_unique(arg));
VALUE            1283 marshal.c                 VALUE klass = path2class(r_unique(arg));
VALUE            1310 marshal.c      	    volatile VALUE str = r_bytes(arg);
VALUE            1319 marshal.c      	    volatile VALUE str = r_bytes(arg);
VALUE            1328 marshal.c      	    volatile VALUE str = r_bytes(arg);
VALUE            1352 marshal.c      static VALUE
VALUE            1359 marshal.c      static VALUE
VALUE            1366 marshal.c      static VALUE
VALUE            1385 marshal.c      static VALUE
VALUE            1388 marshal.c          VALUE *argv;
VALUE            1390 marshal.c          VALUE port, proc;
VALUE            1392 marshal.c          VALUE v;
VALUE            1429 marshal.c          v = rb_ensure(load, (VALUE)&arg, load_ensure, (VALUE)&arg);
VALUE            1470 marshal.c          VALUE rb_mMarshal = rb_define_module("Marshal");
VALUE            1492 marshal.c      VALUE
VALUE            1494 marshal.c          VALUE obj, port;
VALUE            1497 marshal.c          VALUE argv[2];
VALUE            1505 marshal.c      VALUE
VALUE            1507 marshal.c          VALUE port;
VALUE              17 math.c         VALUE rb_mMath;
VALUE              35 math.c         static VALUE
VALUE              37 math.c             VALUE obj, x, y;
VALUE              53 math.c         static VALUE
VALUE              55 math.c             VALUE obj, x;
VALUE              69 math.c         static VALUE
VALUE              71 math.c             VALUE obj, x;
VALUE              86 math.c         static VALUE
VALUE              88 math.c             VALUE obj, x;
VALUE             102 math.c         static VALUE
VALUE             104 math.c             VALUE obj, x;
VALUE             124 math.c         static VALUE
VALUE             126 math.c             VALUE obj, x;
VALUE             146 math.c         static VALUE
VALUE             148 math.c             VALUE obj, x;
VALUE             170 math.c         static VALUE
VALUE             172 math.c             VALUE obj, x;
VALUE             196 math.c         static VALUE
VALUE             198 math.c             VALUE obj, x;
VALUE             221 math.c         static VALUE
VALUE             223 math.c             VALUE obj, x;
VALUE             236 math.c         static VALUE
VALUE             238 math.c             VALUE obj, x;
VALUE             258 math.c         static VALUE
VALUE             260 math.c             VALUE obj, x;
VALUE             273 math.c         static VALUE
VALUE             275 math.c             VALUE obj, x;
VALUE             295 math.c         static VALUE
VALUE             297 math.c             VALUE obj, x;
VALUE             319 math.c         static VALUE
VALUE             321 math.c             VALUE obj, x;
VALUE             341 math.c         static VALUE
VALUE             343 math.c             VALUE obj, x;
VALUE             364 math.c         static VALUE
VALUE             366 math.c             VALUE obj, x;
VALUE             391 math.c         static VALUE
VALUE             393 math.c             VALUE obj, x;
VALUE             414 math.c         static VALUE
VALUE             416 math.c             VALUE obj, x, n;
VALUE             432 math.c         static VALUE
VALUE             434 math.c             VALUE obj, x, y;
VALUE             447 math.c         static VALUE
VALUE             449 math.c             VALUE obj, x;
VALUE             462 math.c         static VALUE
VALUE             464 math.c             VALUE obj, x;
VALUE             134 node.h         	VALUE value;
VALUE             135 node.h         	VALUE (*cfunc)(ANYARGS);
VALUE             142 node.h         	VALUE value;
VALUE             150 node.h         	VALUE value;
VALUE             234 node.h         #define NEW_NODE(t,a0,a1,a2) rb_node_newnode((t),(VALUE)(a0),(VALUE)(a1),(VALUE)(a2))
VALUE             347 node.h         NODE *rb_compile_string _((const char*, VALUE, int));
VALUE             348 node.h         NODE *rb_compile_file _((const char*, VALUE, int));
VALUE             350 node.h         void rb_add_method _((VALUE, ID, NODE *, int));
VALUE             351 node.h         NODE *rb_node_newnode _((enum node_type,VALUE,VALUE,VALUE));
VALUE             353 node.h         NODE* rb_method_node _((VALUE klass, ID id));
VALUE             356 node.h         VALUE rb_gvar_get _((struct global_entry *));
VALUE             357 node.h         VALUE rb_gvar_set _((struct global_entry *, VALUE));
VALUE             358 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             101 numeric.c          VALUE x, y;
VALUE             108 numeric.c      static VALUE
VALUE             110 numeric.c          VALUE *x;
VALUE             115 numeric.c      static VALUE
VALUE             117 numeric.c          VALUE *x;
VALUE             119 numeric.c          volatile VALUE v = rb_inspect(x[1]);
VALUE             131 numeric.c          VALUE *x, *y;
VALUE             134 numeric.c          VALUE ary;
VALUE             135 numeric.c          VALUE a[2];
VALUE             139 numeric.c          ary = rb_rescue(coerce_body, (VALUE)a, err?coerce_rescue:0, (VALUE)a);
VALUE             152 numeric.c      VALUE
VALUE             154 numeric.c          VALUE x, y;
VALUE             160 numeric.c      VALUE
VALUE             162 numeric.c          VALUE x, y;
VALUE             169 numeric.c      VALUE
VALUE             171 numeric.c          VALUE x, y;
VALUE             173 numeric.c          VALUE c, x0 = x, y0 = y;
VALUE             188 numeric.c      static VALUE
VALUE             190 numeric.c          VALUE x, name;
VALUE             202 numeric.c      static VALUE
VALUE             204 numeric.c          VALUE x, y;
VALUE             218 numeric.c      static VALUE
VALUE             220 numeric.c          VALUE num;
VALUE             232 numeric.c      static VALUE
VALUE             234 numeric.c          VALUE num;
VALUE             236 numeric.c          VALUE zero;
VALUE             251 numeric.c      static VALUE
VALUE             253 numeric.c          VALUE x, y;
VALUE             268 numeric.c      static VALUE
VALUE             270 numeric.c          VALUE x, y;
VALUE             317 numeric.c      static VALUE
VALUE             319 numeric.c          VALUE x, y;
VALUE             332 numeric.c      static VALUE
VALUE             334 numeric.c          VALUE x, y;
VALUE             351 numeric.c      static VALUE
VALUE             353 numeric.c          VALUE x, y;
VALUE             355 numeric.c          VALUE z = rb_funcall(x, '%', 1, y);
VALUE             375 numeric.c      static VALUE
VALUE             377 numeric.c          VALUE num;
VALUE             393 numeric.c      static VALUE
VALUE             395 numeric.c          VALUE num;
VALUE             411 numeric.c      static VALUE
VALUE             413 numeric.c          VALUE num;
VALUE             434 numeric.c      static VALUE
VALUE             436 numeric.c          VALUE num;
VALUE             452 numeric.c      static VALUE
VALUE             454 numeric.c          VALUE num;
VALUE             468 numeric.c      VALUE
VALUE             476 numeric.c          return (VALUE)flt;
VALUE             489 numeric.c      static VALUE
VALUE             491 numeric.c          VALUE flt;
VALUE             523 numeric.c      static VALUE
VALUE             525 numeric.c          VALUE x, y;
VALUE             537 numeric.c      static VALUE
VALUE             539 numeric.c          VALUE flt;
VALUE             552 numeric.c      static VALUE
VALUE             554 numeric.c          VALUE x, y;
VALUE             576 numeric.c      static VALUE
VALUE             578 numeric.c          VALUE x, y;
VALUE             600 numeric.c      static VALUE
VALUE             602 numeric.c          VALUE x, y;
VALUE             624 numeric.c      static VALUE
VALUE             626 numeric.c          VALUE x, y;
VALUE             684 numeric.c      static VALUE
VALUE             686 numeric.c          VALUE x, y;
VALUE             714 numeric.c      static VALUE
VALUE             716 numeric.c          VALUE x, y;
VALUE             719 numeric.c          volatile VALUE a, b;
VALUE             748 numeric.c      static VALUE
VALUE             750 numeric.c          VALUE x, y;
VALUE             776 numeric.c      static VALUE
VALUE             778 numeric.c          VALUE x, y;
VALUE             793 numeric.c      static VALUE
VALUE             795 numeric.c          VALUE x, y;
VALUE             801 numeric.c      static VALUE
VALUE             803 numeric.c          VALUE x, y;
VALUE             821 numeric.c      static VALUE
VALUE             823 numeric.c          VALUE x, y;
VALUE             853 numeric.c      static VALUE
VALUE             855 numeric.c          VALUE num;
VALUE             871 numeric.c      VALUE
VALUE             891 numeric.c      static VALUE
VALUE             893 numeric.c          VALUE x, y;
VALUE             924 numeric.c      static VALUE
VALUE             926 numeric.c          VALUE x, y;
VALUE             960 numeric.c      static VALUE
VALUE             962 numeric.c          VALUE x, y;
VALUE             995 numeric.c      static VALUE
VALUE             997 numeric.c          VALUE x, y;
VALUE            1031 numeric.c      static VALUE
VALUE            1033 numeric.c          VALUE x, y;
VALUE            1070 numeric.c      static VALUE
VALUE            1072 numeric.c          VALUE x, y;
VALUE            1091 numeric.c      static VALUE
VALUE            1093 numeric.c          VALUE num;
VALUE            1109 numeric.c      static VALUE
VALUE            1111 numeric.c          VALUE flt;
VALUE            1125 numeric.c      static VALUE
VALUE            1127 numeric.c          VALUE num;
VALUE            1148 numeric.c      static VALUE
VALUE            1150 numeric.c           VALUE num;
VALUE            1169 numeric.c      static VALUE
VALUE            1171 numeric.c           VALUE num;
VALUE            1192 numeric.c      static VALUE
VALUE            1194 numeric.c           VALUE num;
VALUE            1221 numeric.c      static VALUE
VALUE            1223 numeric.c          VALUE num;
VALUE            1248 numeric.c      static VALUE
VALUE            1250 numeric.c          VALUE num;
VALUE            1279 numeric.c      static VALUE
VALUE            1281 numeric.c          VALUE num;
VALUE            1305 numeric.c      static VALUE
VALUE            1307 numeric.c          VALUE num;
VALUE            1335 numeric.c      static VALUE
VALUE            1337 numeric.c          VALUE num;
VALUE            1358 numeric.c      static VALUE
VALUE            1360 numeric.c          VALUE num;
VALUE            1374 numeric.c      static VALUE
VALUE            1376 numeric.c          VALUE num;
VALUE            1390 numeric.c      static VALUE
VALUE            1392 numeric.c          VALUE num;
VALUE            1425 numeric.c      static VALUE
VALUE            1428 numeric.c          VALUE *argv;
VALUE            1429 numeric.c          VALUE from;
VALUE            1431 numeric.c          VALUE to, step;
VALUE            1486 numeric.c      	VALUE i = from;
VALUE            1506 numeric.c          VALUE val;
VALUE            1540 numeric.c          VALUE val;
VALUE            1578 numeric.c          VALUE val;
VALUE            1588 numeric.c          VALUE val;
VALUE            1598 numeric.c          VALUE val;
VALUE            1610 numeric.c          VALUE val;
VALUE            1626 numeric.c          VALUE val;
VALUE            1633 numeric.c          VALUE val;
VALUE            1639 numeric.c      VALUE
VALUE            1641 numeric.c          VALUE val;
VALUE            1657 numeric.c          VALUE val;
VALUE            1700 numeric.c          VALUE val;
VALUE            1733 numeric.c      static VALUE
VALUE            1735 numeric.c          VALUE num;
VALUE            1747 numeric.c      static VALUE
VALUE            1749 numeric.c          VALUE num;
VALUE            1765 numeric.c      static VALUE
VALUE            1767 numeric.c          VALUE num;
VALUE            1788 numeric.c      static VALUE
VALUE            1790 numeric.c          VALUE num;
VALUE            1828 numeric.c      static VALUE
VALUE            1830 numeric.c          VALUE klass, x;
VALUE            1842 numeric.c      static VALUE
VALUE            1844 numeric.c          VALUE klass, x;
VALUE            1865 numeric.c      static VALUE
VALUE            1867 numeric.c          VALUE klass, x;
VALUE            1888 numeric.c      static VALUE
VALUE            1890 numeric.c          VALUE num;
VALUE            1895 numeric.c      VALUE
VALUE            1897 numeric.c          VALUE x;
VALUE            1941 numeric.c      static VALUE
VALUE            1944 numeric.c          VALUE *argv;
VALUE            1945 numeric.c          VALUE x;
VALUE            1947 numeric.c          VALUE b;
VALUE            1970 numeric.c      static VALUE
VALUE            1972 numeric.c          VALUE x, y;
VALUE            1976 numeric.c      	VALUE r;
VALUE            2003 numeric.c      static VALUE
VALUE            2005 numeric.c          VALUE x, y;
VALUE            2009 numeric.c      	VALUE r;
VALUE            2036 numeric.c      static VALUE
VALUE            2038 numeric.c          VALUE x, y;
VALUE            2042 numeric.c      	VALUE r;
VALUE            2103 numeric.c      static VALUE
VALUE            2105 numeric.c          VALUE x, y;
VALUE            2123 numeric.c      static VALUE
VALUE            2125 numeric.c          VALUE x, y;
VALUE            2145 numeric.c      static VALUE
VALUE            2147 numeric.c          VALUE x, y;
VALUE            2164 numeric.c      static VALUE
VALUE            2166 numeric.c          VALUE x, y;
VALUE            2190 numeric.c      static VALUE
VALUE            2192 numeric.c          VALUE x, y;
VALUE            2223 numeric.c      static VALUE
VALUE            2225 numeric.c          VALUE x, y;
VALUE            2244 numeric.c      static VALUE
VALUE            2246 numeric.c          VALUE x, y;
VALUE            2268 numeric.c      static VALUE
VALUE            2270 numeric.c          VALUE x, y;
VALUE            2291 numeric.c      static VALUE
VALUE            2293 numeric.c          VALUE x, y;
VALUE            2314 numeric.c      static VALUE
VALUE            2316 numeric.c          VALUE x, y;
VALUE            2337 numeric.c      static VALUE
VALUE            2339 numeric.c          VALUE x, y;
VALUE            2359 numeric.c      static VALUE
VALUE            2361 numeric.c          VALUE num;
VALUE            2376 numeric.c      static VALUE
VALUE            2378 numeric.c          VALUE x, y;
VALUE            2396 numeric.c      static VALUE
VALUE            2398 numeric.c          VALUE x, y;
VALUE            2416 numeric.c      static VALUE
VALUE            2418 numeric.c          VALUE x, y;
VALUE            2429 numeric.c      static VALUE fix_rshift _((VALUE, VALUE));
VALUE            2438 numeric.c      static VALUE
VALUE            2440 numeric.c          VALUE x, y;
VALUE            2448 numeric.c          if (width > (sizeof(VALUE)*CHAR_BIT-1)
VALUE            2449 numeric.c      	|| ((unsigned long)val)>>(sizeof(VALUE)*CHAR_BIT-1-width) > 0) {
VALUE            2463 numeric.c      static VALUE
VALUE            2465 numeric.c          VALUE x, y;
VALUE            2498 numeric.c      static VALUE
VALUE            2500 numeric.c          VALUE fix, idx;
VALUE            2516 numeric.c          if (sizeof(VALUE)*CHAR_BIT-1 < i) {
VALUE            2533 numeric.c      static VALUE
VALUE            2535 numeric.c          VALUE num;
VALUE            2555 numeric.c      static VALUE
VALUE            2557 numeric.c          VALUE fix;
VALUE            2581 numeric.c      static VALUE
VALUE            2583 numeric.c          VALUE fix;
VALUE            2603 numeric.c      static VALUE
VALUE            2605 numeric.c          VALUE fix;
VALUE            2628 numeric.c      static VALUE
VALUE            2630 numeric.c          VALUE fix;
VALUE            2649 numeric.c      static VALUE
VALUE            2651 numeric.c          VALUE from, to;
VALUE            2662 numeric.c      	VALUE i = from, c;
VALUE            2688 numeric.c      static VALUE
VALUE            2690 numeric.c          VALUE from, to;
VALUE            2701 numeric.c      	VALUE i = from, c;
VALUE            2728 numeric.c      static VALUE
VALUE            2730 numeric.c          VALUE num;
VALUE            2741 numeric.c      	VALUE i = INT2FIX(0);
VALUE            2760 numeric.c      static VALUE
VALUE            2762 numeric.c          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              47 object.c           VALUE obj1, obj2;
VALUE              49 object.c           VALUE result;
VALUE              59 object.c           VALUE obj1, obj2;
VALUE              93 object.c       static VALUE
VALUE              95 object.c           VALUE obj1, obj2;
VALUE             131 object.c       VALUE
VALUE             133 object.c           VALUE obj;
VALUE             138 object.c           return (VALUE)((long)obj|FIXNUM_FLAG);
VALUE             148 object.c       VALUE
VALUE             150 object.c           VALUE obj;
VALUE             156 object.c       VALUE
VALUE             158 object.c           VALUE cl;
VALUE             173 object.c       VALUE
VALUE             175 object.c           VALUE obj;
VALUE             196 object.c       VALUE
VALUE             198 object.c           VALUE obj;
VALUE             205 object.c           VALUE dest, obj;
VALUE             255 object.c       VALUE
VALUE             257 object.c           VALUE obj;
VALUE             259 object.c           VALUE clone;
VALUE             291 object.c       VALUE
VALUE             293 object.c           VALUE obj;
VALUE             295 object.c           VALUE dup;
VALUE             307 object.c       VALUE
VALUE             309 object.c           VALUE obj, orig;
VALUE             334 object.c       static VALUE
VALUE             336 object.c           VALUE obj;
VALUE             353 object.c       VALUE
VALUE             355 object.c           VALUE obj;
VALUE             359 object.c           VALUE str;
VALUE             370 object.c       VALUE
VALUE             372 object.c           VALUE obj;
VALUE             380 object.c           VALUE value;
VALUE             381 object.c           VALUE str;
VALUE             383 object.c           VALUE str2;
VALUE             406 object.c       static VALUE
VALUE             408 object.c           VALUE obj, str;
VALUE             431 object.c       static VALUE
VALUE             433 object.c           VALUE obj;
VALUE             438 object.c       	VALUE str;
VALUE             468 object.c       VALUE
VALUE             470 object.c           VALUE obj, c;
VALUE             512 object.c       VALUE
VALUE             514 object.c           VALUE obj, c;
VALUE             516 object.c           VALUE cl = CLASS_OF(obj);
VALUE             642 object.c       static VALUE
VALUE             656 object.c       VALUE
VALUE             658 object.c           VALUE obj;
VALUE             674 object.c       VALUE
VALUE             676 object.c           VALUE obj;
VALUE             696 object.c       VALUE
VALUE             698 object.c           VALUE obj;
VALUE             712 object.c           VALUE obj1, obj2;
VALUE             737 object.c       VALUE
VALUE             739 object.c           VALUE obj;
VALUE             761 object.c       static VALUE
VALUE             763 object.c           VALUE obj;
VALUE             786 object.c       static VALUE
VALUE             788 object.c           VALUE obj;
VALUE             802 object.c       static VALUE
VALUE             804 object.c           VALUE obj;
VALUE             818 object.c       static VALUE
VALUE             820 object.c           VALUE obj;
VALUE             834 object.c       static VALUE
VALUE             836 object.c           VALUE obj;
VALUE             848 object.c       static VALUE
VALUE             850 object.c           VALUE obj;
VALUE             856 object.c       static VALUE
VALUE             858 object.c           VALUE x, y;
VALUE             877 object.c       static VALUE
VALUE             879 object.c           VALUE obj;
VALUE             902 object.c       static VALUE
VALUE             904 object.c           VALUE obj;
VALUE             918 object.c       static VALUE
VALUE             920 object.c           VALUE obj, obj2;
VALUE             941 object.c       static VALUE
VALUE             943 object.c           VALUE obj, obj2;
VALUE             958 object.c       static VALUE
VALUE             960 object.c           VALUE obj, obj2;
VALUE             983 object.c       static VALUE
VALUE             985 object.c           VALUE obj;
VALUE            1000 object.c       static VALUE
VALUE            1002 object.c           VALUE obj, obj2;
VALUE            1017 object.c       static VALUE
VALUE            1019 object.c           VALUE obj, obj2;
VALUE            1037 object.c       static VALUE
VALUE            1039 object.c           VALUE obj, obj2;
VALUE            1051 object.c       static VALUE
VALUE            1053 object.c           VALUE obj;
VALUE            1067 object.c       static VALUE
VALUE            1069 object.c           VALUE obj;
VALUE            1084 object.c       static VALUE
VALUE            1086 object.c           VALUE obj1, obj2;
VALUE            1135 object.c       static VALUE
VALUE            1137 object.c           VALUE sym;
VALUE            1147 object.c       static VALUE
VALUE            1149 object.c           VALUE sym;
VALUE            1165 object.c       static VALUE
VALUE            1167 object.c           VALUE sym;
VALUE            1169 object.c           VALUE str;
VALUE            1196 object.c       static VALUE
VALUE            1198 object.c           VALUE sym;
VALUE            1213 object.c       static VALUE
VALUE            1215 object.c           VALUE sym;
VALUE            1258 object.c       static VALUE
VALUE            1260 object.c           VALUE klass;
VALUE            1264 object.c       	VALUE s = rb_str_new2("#<");
VALUE            1265 object.c       	VALUE v = rb_iv_get(klass, "__attached__");
VALUE            1290 object.c       static VALUE
VALUE            1292 object.c           VALUE mod;
VALUE            1308 object.c       static VALUE
VALUE            1310 object.c           VALUE mod, arg;
VALUE            1327 object.c       VALUE
VALUE            1329 object.c           VALUE mod, arg;
VALUE            1331 object.c           VALUE start = mod;
VALUE            1372 object.c       static VALUE
VALUE            1374 object.c           VALUE mod, arg;
VALUE            1393 object.c       static VALUE
VALUE            1395 object.c           VALUE mod, arg;
VALUE            1419 object.c       static VALUE
VALUE            1421 object.c           VALUE mod, arg;
VALUE            1438 object.c       static VALUE
VALUE            1440 object.c           VALUE mod, arg;
VALUE            1442 object.c           VALUE cmp;
VALUE            1461 object.c       static VALUE rb_module_s_alloc _((VALUE));
VALUE            1462 object.c       static VALUE
VALUE            1464 object.c           VALUE klass;
VALUE            1466 object.c           VALUE mod = rb_module_new();
VALUE            1472 object.c       static VALUE rb_class_s_alloc _((VALUE));
VALUE            1473 object.c       static VALUE
VALUE            1475 object.c           VALUE klass;
VALUE            1503 object.c       static VALUE
VALUE            1505 object.c           VALUE module;
VALUE            1523 object.c       static VALUE
VALUE            1526 object.c           VALUE *argv;
VALUE            1527 object.c           VALUE klass;
VALUE            1529 object.c           VALUE super;
VALUE            1557 object.c       VALUE
VALUE            1559 object.c           VALUE klass;
VALUE            1561 object.c           VALUE obj;
VALUE            1576 object.c       static VALUE rb_class_allocate_instance _((VALUE));
VALUE            1577 object.c       static VALUE
VALUE            1579 object.c           VALUE klass;
VALUE            1583 object.c           return (VALUE)obj;
VALUE            1598 object.c       VALUE
VALUE            1601 object.c           VALUE *argv;
VALUE            1602 object.c           VALUE klass;
VALUE            1604 object.c           VALUE obj;
VALUE            1624 object.c       static VALUE
VALUE            1626 object.c           VALUE klass;
VALUE            1628 object.c           VALUE super = RCLASS(klass)->super;
VALUE            1647 object.c           VALUE str;
VALUE            1660 object.c           VALUE name;
VALUE            1662 object.c           VALUE tmp;
VALUE            1714 object.c       static VALUE
VALUE            1717 object.c           VALUE *argv;
VALUE            1718 object.c           VALUE klass;
VALUE            1720 object.c           VALUE name, pub;
VALUE            1736 object.c       static VALUE
VALUE            1739 object.c           VALUE *argv;
VALUE            1740 object.c           VALUE klass;
VALUE            1758 object.c       static VALUE
VALUE            1761 object.c           VALUE *argv;
VALUE            1762 object.c           VALUE klass;
VALUE            1785 object.c       static VALUE
VALUE            1788 object.c           VALUE *argv;
VALUE            1789 object.c           VALUE klass;
VALUE            1808 object.c       static VALUE
VALUE            1810 object.c           VALUE mod, name;
VALUE            1832 object.c       static VALUE
VALUE            1834 object.c           VALUE mod, name, value;
VALUE            1855 object.c       static VALUE
VALUE            1857 object.c           VALUE mod, name;
VALUE            1887 object.c       static VALUE
VALUE            1890 object.c           VALUE *argv;
VALUE            1891 object.c           VALUE obj;
VALUE            1895 object.c       	VALUE args[1];
VALUE            1901 object.c       	VALUE recur;
VALUE            1921 object.c       static VALUE
VALUE            1924 object.c           VALUE *argv;
VALUE            1925 object.c           VALUE obj;
VALUE            1928 object.c       	VALUE args[1];
VALUE            1945 object.c       static VALUE
VALUE            1948 object.c           VALUE *argv;
VALUE            1949 object.c           VALUE obj;
VALUE            1952 object.c       	VALUE args[1];
VALUE            1969 object.c       static VALUE
VALUE            1972 object.c           VALUE *argv;
VALUE            1973 object.c           VALUE obj;
VALUE            1976 object.c       	VALUE args[1];
VALUE            2002 object.c       static VALUE
VALUE            2004 object.c           VALUE obj, iv;
VALUE            2035 object.c       static VALUE
VALUE            2037 object.c           VALUE obj, iv, val;
VALUE            2064 object.c       static VALUE
VALUE            2066 object.c           VALUE obj, iv;
VALUE            2098 object.c       static VALUE
VALUE            2100 object.c           VALUE obj, iv, val;
VALUE            2111 object.c       static VALUE
VALUE            2113 object.c           VALUE val;
VALUE            2136 object.c       VALUE
VALUE            2138 object.c           VALUE val;
VALUE            2142 object.c           VALUE v;
VALUE            2153 object.c       VALUE
VALUE            2155 object.c           VALUE val;
VALUE            2159 object.c           VALUE v;
VALUE            2173 object.c       static VALUE
VALUE            2175 object.c           VALUE val;
VALUE            2178 object.c           VALUE v = convert_type(val, "Integer", method, Qtrue);
VALUE            2186 object.c       VALUE
VALUE            2188 object.c           VALUE val;
VALUE            2193 object.c       VALUE
VALUE            2195 object.c           VALUE val;
VALUE            2197 object.c           VALUE tmp;
VALUE            2241 object.c       static VALUE
VALUE            2243 object.c           VALUE obj, arg;
VALUE            2319 object.c           VALUE str;
VALUE            2343 object.c       VALUE
VALUE            2345 object.c           VALUE val;
VALUE            2366 object.c       	  VALUE f = rb_convert_type(val, T_FLOAT, "Float", "to_f");
VALUE            2387 object.c       static VALUE
VALUE            2389 object.c           VALUE obj, arg;
VALUE            2396 object.c           VALUE val;
VALUE            2419 object.c           VALUE str;
VALUE            2430 object.c       VALUE
VALUE            2432 object.c           VALUE val;
VALUE            2450 object.c       static VALUE
VALUE            2452 object.c           VALUE obj, arg;
VALUE            2458 object.c       VALUE
VALUE            2460 object.c           VALUE val;
VALUE            2462 object.c           VALUE tmp = rb_check_array_type(val);
VALUE            2486 object.c       static VALUE
VALUE            2488 object.c           VALUE obj, arg;
VALUE            2493 object.c       static VALUE
VALUE            2496 object.c           VALUE super;
VALUE            2499 object.c           VALUE obj = rb_class_boot(super);
VALUE            2508 object.c       VALUE ruby_top_self;
VALUE            2587 object.c           VALUE metaclass;
VALUE             334 pack.c         unsigned long rb_big2ulong_pack _((VALUE x));
VALUE             338 pack.c             VALUE x;
VALUE             369 pack.c         static void encodes _((VALUE,char*,long,int));
VALUE             370 pack.c         static void qpencode _((VALUE,VALUE,long));
VALUE             440 pack.c         static VALUE
VALUE             442 pack.c             VALUE ary, fmt;
VALUE             447 pack.c             VALUE res, from, associates = 0;
VALUE             948 pack.c         		VALUE buf = rb_str_new(0, 0);
VALUE             953 pack.c         		    VALUE big128 = rb_uint2big(128);
VALUE            1012 pack.c             VALUE str;
VALUE            1057 pack.c             VALUE str, from;
VALUE            1151 pack.c         static VALUE
VALUE            1155 pack.c             VALUE str;
VALUE            1157 pack.c             VALUE s = rb_str_new(ptr, len);
VALUE            1301 pack.c         static VALUE
VALUE            1303 pack.c             VALUE str, fmt;
VALUE            1308 pack.c             VALUE ary;
VALUE            1406 pack.c         		VALUE bitstr;
VALUE            1426 pack.c         		VALUE bitstr;
VALUE            1446 pack.c         		VALUE bitstr;
VALUE            1468 pack.c         		VALUE bitstr;
VALUE            1730 pack.c         		VALUE buf = infected_str_new(0, (send - s)*3/4, str);
VALUE            1786 pack.c         		VALUE buf = infected_str_new(0, (send - s)*3/4, str);
VALUE            1830 pack.c         		VALUE buf = infected_str_new(0, send - s, str);
VALUE            1876 pack.c         		VALUE tmp;
VALUE            1882 pack.c         		    VALUE a, *p, *pend;
VALUE            1917 pack.c         		    VALUE tmp;
VALUE            1924 pack.c         			VALUE a, *p, *pend;
VALUE            1965 pack.c         			VALUE big = rb_uint2big(ul);
VALUE            1966 pack.c         			VALUE big128 = rb_uint2big(128);
VALUE            5737 parse.c        				VALUE src = node->nd_lit;
VALUE            5870 parse.c        			    rb_gc_force_recycle((VALUE)yyvsp[-1].node);
VALUE            5902 parse.c        			    VALUE lit;
VALUE            6500 parse.c        static VALUE (*lex_gets)();	/* gets function */
VALUE            6501 parse.c        static VALUE lex_input;		/* non-nil if File */
VALUE            6502 parse.c        static VALUE lex_lastline;	/* gc protect */
VALUE            6556 parse.c        static VALUE ruby_debug_lines;
VALUE            6573 parse.c        	VALUE hash, fname;
VALUE            6585 parse.c        	    VALUE str = rb_str_new(0,0);
VALUE            6617 parse.c        	rb_gc_force_recycle((VALUE)tmp);
VALUE            6626 parse.c        static VALUE
VALUE            6628 parse.c            VALUE s;
VALUE            6646 parse.c        static VALUE
VALUE            6649 parse.c            VALUE line = (*lex_gets)(lex_input);
VALUE            6659 parse.c            VALUE s;
VALUE            6683 parse.c            VALUE file;
VALUE            6701 parse.c        	    VALUE v = lex_getline();
VALUE            7022 parse.c            VALUE str;
VALUE            7225 parse.c            VALUE line = here->nd_orig;
VALUE            7233 parse.c            rb_gc_force_recycle((VALUE)here);
VALUE            7260 parse.c            VALUE str = 0;
VALUE            7366 parse.c        		rb_gc_force_recycle((VALUE)lex_strterm);
VALUE            8491 parse.c            VALUE a0, a1, a2;
VALUE            8693 parse.c        	    rb_gc_force_recycle((VALUE)tail);
VALUE            8704 parse.c        	    rb_gc_force_recycle((VALUE)head);
VALUE            9598 parse.c        	rb_dvar_push(0, (VALUE)ruby_dyna_vars);
VALUE            9701 parse.c        		VALUE *vars = ALLOC_N(VALUE, len+1);
VALUE            9704 parse.c        		    MEMCPY(vars, ruby_scope->local_vars, VALUE, i);
VALUE            9715 parse.c        		VALUE *vars = ruby_scope->local_vars-1;
VALUE            9716 parse.c        		REALLOC_N(vars, VALUE, len+1);
VALUE            9783 parse.c            rb_gc_mark((VALUE)parser_heap);
VALUE            9785 parse.c            if (yyvsp) rb_gc_mark_locations((VALUE *)yyvs, (VALUE *)yyvsp);
VALUE            9790 parse.c            rb_gc_mark_maybe((VALUE)yylval.node);
VALUE            9794 parse.c            rb_gc_mark((VALUE)lex_strterm);
VALUE            10107 parse.c            VALUE ary;
VALUE            10129 parse.c        VALUE
VALUE            10132 parse.c            VALUE ary = rb_ary_new2(sym_tbl->num_entries);
VALUE            10181 parse.c            VALUE val;
VALUE            10191 parse.c        VALUE
VALUE            10194 parse.c            VALUE *var = rb_svar(1);
VALUE            10203 parse.c            VALUE val;
VALUE            10205 parse.c            VALUE *var = rb_svar(1);
VALUE            10214 parse.c        VALUE
VALUE            10217 parse.c            VALUE *var = rb_svar(0);
VALUE            10226 parse.c            VALUE val;
VALUE            10228 parse.c            VALUE *var = rb_svar(0);
VALUE            10239 parse.c        #define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser_heap, 0)
VALUE            10296 parse.c        	    rb_gc_force_recycle((VALUE)n);
VALUE            1997 parse.y        				VALUE src = node->nd_lit;
VALUE            2114 parse.y        			    rb_gc_force_recycle((VALUE)$3);
VALUE            2146 parse.y        			    VALUE lit;
VALUE            2502 parse.y        static VALUE (*lex_gets)();	/* gets function */
VALUE            2503 parse.y        static VALUE lex_input;		/* non-nil if File */
VALUE            2504 parse.y        static VALUE lex_lastline;	/* gc protect */
VALUE            2558 parse.y        static VALUE ruby_debug_lines;
VALUE            2575 parse.y        	VALUE hash, fname;
VALUE            2587 parse.y        	    VALUE str = rb_str_new(0,0);
VALUE            2619 parse.y        	rb_gc_force_recycle((VALUE)tmp);
VALUE            2628 parse.y        static VALUE
VALUE            2630 parse.y            VALUE s;
VALUE            2648 parse.y        static VALUE
VALUE            2651 parse.y            VALUE line = (*lex_gets)(lex_input);
VALUE            2661 parse.y            VALUE s;
VALUE            2685 parse.y            VALUE file;
VALUE            2703 parse.y        	    VALUE v = lex_getline();
VALUE            3024 parse.y            VALUE str;
VALUE            3227 parse.y            VALUE line = here->nd_orig;
VALUE            3235 parse.y            rb_gc_force_recycle((VALUE)here);
VALUE            3262 parse.y            VALUE str = 0;
VALUE            3368 parse.y        		rb_gc_force_recycle((VALUE)lex_strterm);
VALUE            4493 parse.y            VALUE a0, a1, a2;
VALUE            4695 parse.y        	    rb_gc_force_recycle((VALUE)tail);
VALUE            4706 parse.y        	    rb_gc_force_recycle((VALUE)head);
VALUE            5600 parse.y        	rb_dvar_push(0, (VALUE)ruby_dyna_vars);
VALUE            5703 parse.y        		VALUE *vars = ALLOC_N(VALUE, len+1);
VALUE            5706 parse.y        		    MEMCPY(vars, ruby_scope->local_vars, VALUE, i);
VALUE            5717 parse.y        		VALUE *vars = ruby_scope->local_vars-1;
VALUE            5718 parse.y        		REALLOC_N(vars, VALUE, len+1);
VALUE            5785 parse.y            rb_gc_mark((VALUE)parser_heap);
VALUE            5787 parse.y            if (yyvsp) rb_gc_mark_locations((VALUE *)yyvs, (VALUE *)yyvsp);
VALUE            5792 parse.y            rb_gc_mark_maybe((VALUE)yylval.node);
VALUE            5796 parse.y            rb_gc_mark((VALUE)lex_strterm);
VALUE            6109 parse.y            VALUE ary;
VALUE            6131 parse.y        VALUE
VALUE            6134 parse.y            VALUE ary = rb_ary_new2(sym_tbl->num_entries);
VALUE            6183 parse.y            VALUE val;
VALUE            6193 parse.y        VALUE
VALUE            6196 parse.y            VALUE *var = rb_svar(1);
VALUE            6205 parse.y            VALUE val;
VALUE            6207 parse.y            VALUE *var = rb_svar(1);
VALUE            6216 parse.y        VALUE
VALUE            6219 parse.y            VALUE *var = rb_svar(0);
VALUE            6228 parse.y            VALUE val;
VALUE            6230 parse.y            VALUE *var = rb_svar(0);
VALUE            6241 parse.y        #define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser_heap, 0)
VALUE            6298 parse.y        	    rb_gc_force_recycle((VALUE)n);
VALUE              15 prec.c         VALUE rb_mPrecision;
VALUE              34 prec.c         static VALUE
VALUE              36 prec.c             VALUE x, klass;
VALUE              49 prec.c         static VALUE
VALUE              51 prec.c             VALUE x;
VALUE              53 prec.c             VALUE klass = rb_cInteger;
VALUE              66 prec.c         static VALUE
VALUE              68 prec.c             VALUE x;
VALUE              70 prec.c             VALUE klass = rb_cFloat;
VALUE              88 prec.c         static VALUE
VALUE              90 prec.c             VALUE module, x;
VALUE             106 prec.c         static VALUE
VALUE             108 prec.c             VALUE module, include;
VALUE              40 process.c      struct timeval rb_time_interval _((VALUE));
VALUE              63 process.c      static VALUE S_Tms;
VALUE             124 process.c      static VALUE
VALUE             148 process.c      static VALUE
VALUE             190 process.c      static VALUE rb_cProcStatus;
VALUE             191 process.c      VALUE rb_last_status = Qnil;
VALUE             216 process.c      static VALUE
VALUE             218 process.c          VALUE st;
VALUE             231 process.c      static VALUE
VALUE             233 process.c          VALUE st;
VALUE             250 process.c      static VALUE
VALUE             252 process.c          VALUE st;
VALUE             265 process.c      static VALUE
VALUE             267 process.c          VALUE st;
VALUE             269 process.c          VALUE pid;
VALUE             271 process.c          VALUE str;
VALUE             323 process.c      static VALUE
VALUE             325 process.c          VALUE st1, st2;
VALUE             344 process.c      static VALUE
VALUE             346 process.c          VALUE st1, st2;
VALUE             366 process.c      static VALUE
VALUE             368 process.c          VALUE st1, st2;
VALUE             385 process.c      static VALUE
VALUE             387 process.c          VALUE st;
VALUE             406 process.c      static VALUE
VALUE             408 process.c          VALUE st;
VALUE             426 process.c      static VALUE
VALUE             428 process.c          VALUE st;
VALUE             448 process.c      static VALUE
VALUE             450 process.c          VALUE st;
VALUE             469 process.c      static VALUE
VALUE             471 process.c          VALUE st;
VALUE             501 process.c      static VALUE
VALUE             503 process.c          VALUE st;
VALUE             521 process.c      static VALUE
VALUE             523 process.c          VALUE st;
VALUE             541 process.c      static VALUE
VALUE             543 process.c          VALUE st;
VALUE             654 process.c          VALUE ary;
VALUE             721 process.c      static VALUE
VALUE             724 process.c          VALUE *argv;
VALUE             726 process.c          VALUE vpid, vflags;
VALUE             767 process.c      static VALUE
VALUE             770 process.c          VALUE *argv;
VALUE             772 process.c          VALUE pid = proc_wait(argc, argv);
VALUE             798 process.c      static VALUE
VALUE             801 process.c          VALUE result;
VALUE             840 process.c      static VALUE
VALUE             853 process.c      VALUE
VALUE             902 process.c      static VALUE
VALUE             903 process.c      proc_detach(VALUE obj, VALUE pid)
VALUE             992 process.c          VALUE *argv;
VALUE             993 process.c          VALUE progv;
VALUE            1130 process.c          VALUE *argv;
VALUE            1131 process.c          VALUE prog;
VALUE            1152 process.c          VALUE sv;
VALUE            1208 process.c      VALUE
VALUE            1211 process.c          VALUE *argv;
VALUE            1213 process.c          VALUE prog = 0;
VALUE            1214 process.c          VALUE tmp;
VALUE            1230 process.c      	VALUE cmd = argv[0];
VALUE            1264 process.c      static VALUE
VALUE            1266 process.c          VALUE obj;
VALUE            1316 process.c      static VALUE
VALUE            1319 process.c          VALUE *argv;
VALUE            1320 process.c          VALUE obj;
VALUE            1322 process.c          VALUE status;
VALUE            1413 process.c      static VALUE
VALUE            1416 process.c          VALUE *argv;
VALUE            1420 process.c          VALUE cmd;
VALUE            1441 process.c          volatile VALUE prog = 0;
VALUE            1473 process.c          VALUE cmd;
VALUE            1492 process.c          volatile VALUE prog = 0;
VALUE            1566 process.c      static VALUE
VALUE            1569 process.c          VALUE *argv;
VALUE            1601 process.c      static VALUE
VALUE            1631 process.c      static VALUE
VALUE            1660 process.c      static VALUE
VALUE            1662 process.c          VALUE obj, pid;
VALUE            1685 process.c      static VALUE
VALUE            1687 process.c          VALUE obj, pid, pgrp;
VALUE            1715 process.c      static VALUE
VALUE            1769 process.c      static VALUE
VALUE            1771 process.c          VALUE obj, which, who;
VALUE            1802 process.c      static VALUE
VALUE            1804 process.c          VALUE obj, which, who, prio;
VALUE            1863 process.c      static VALUE
VALUE            1865 process.c          VALUE obj, id;
VALUE            1887 process.c      static VALUE
VALUE            1889 process.c          VALUE obj, id;
VALUE            1910 process.c      static VALUE
VALUE            1912 process.c          VALUE obj, id;
VALUE            1935 process.c      static VALUE
VALUE            1937 process.c          VALUE obj, rid, eid;
VALUE            1960 process.c      static VALUE
VALUE            1962 process.c          VALUE obj, rid, eid, sid;
VALUE            1985 process.c      static VALUE
VALUE            1987 process.c          VALUE obj;
VALUE            2002 process.c      static VALUE
VALUE            2004 process.c          VALUE obj, id;
VALUE            2057 process.c      static VALUE
VALUE            2059 process.c          VALUE obj, id;
VALUE            2207 process.c      static VALUE
VALUE            2209 process.c          VALUE obj, id;
VALUE            2230 process.c      static VALUE
VALUE            2232 process.c          VALUE obj, id;
VALUE            2254 process.c      static VALUE
VALUE            2256 process.c          VALUE obj, id;
VALUE            2279 process.c      static VALUE
VALUE            2281 process.c          VALUE obj, rid, eid;
VALUE            2303 process.c      static VALUE
VALUE            2305 process.c          VALUE obj, rid, eid, sid;
VALUE            2329 process.c      static VALUE
VALUE            2331 process.c          VALUE obj;
VALUE            2358 process.c      static VALUE
VALUE            2360 process.c          VALUE obj;
VALUE            2374 process.c      static VALUE
VALUE            2376 process.c          VALUE obj, id;
VALUE            2417 process.c      static VALUE
VALUE            2418 process.c      proc_getgroups(VALUE obj)
VALUE            2421 process.c          VALUE ary;
VALUE            2457 process.c      static VALUE
VALUE            2458 process.c      proc_setgroups(VALUE obj, VALUE ary)
VALUE            2475 process.c      	VALUE g = RARRAY(ary)->ptr[i];
VALUE            2481 process.c      	    VALUE tmp = rb_check_string_type(g);
VALUE            2525 process.c      static VALUE
VALUE            2527 process.c          VALUE obj, uname, base_grp;
VALUE            2551 process.c      static VALUE
VALUE            2553 process.c          VALUE obj;
VALUE            2567 process.c      static VALUE
VALUE            2568 process.c      proc_setmaxgroups(VALUE obj, VALUE val)
VALUE            2607 process.c      static VALUE
VALUE            2609 process.c          VALUE obj, id;
VALUE            2759 process.c      static VALUE
VALUE            2761 process.c          VALUE obj;
VALUE            2776 process.c      static VALUE
VALUE            2778 process.c          VALUE obj, euid;
VALUE            2801 process.c      static VALUE
VALUE            2851 process.c      static VALUE
VALUE            2853 process.c          VALUE obj, id;
VALUE            2871 process.c      static VALUE
VALUE            2873 process.c          VALUE obj;
VALUE            2889 process.c      static VALUE
VALUE            2891 process.c          VALUE obj, egid;
VALUE            2915 process.c      static VALUE
VALUE            2965 process.c      static VALUE
VALUE            2967 process.c          VALUE obj, id;
VALUE            2982 process.c      static VALUE
VALUE            3007 process.c      static VALUE
VALUE            3009 process.c          VALUE obj;
VALUE            3040 process.c      static VALUE
VALUE            3065 process.c      static VALUE
VALUE            3067 process.c          VALUE obj;
VALUE            3099 process.c      static VALUE
VALUE            3111 process.c      static VALUE
VALUE            3133 process.c      static VALUE
VALUE            3135 process.c          VALUE obj;
VALUE            3166 process.c      static VALUE
VALUE            3168 process.c          VALUE obj;
VALUE            3174 process.c      static VALUE
VALUE            3176 process.c          VALUE obj;
VALUE            3211 process.c      static VALUE
VALUE            3222 process.c      static VALUE
VALUE            3244 process.c      static VALUE
VALUE            3246 process.c          VALUE obj;
VALUE            3276 process.c      static VALUE
VALUE            3278 process.c          VALUE obj;
VALUE            3284 process.c      static VALUE
VALUE            3286 process.c          VALUE obj;
VALUE            3322 process.c      VALUE
VALUE            3324 process.c          VALUE obj;
VALUE            3335 process.c          volatile VALUE utime, stime, cutime, sctime;
VALUE            3348 process.c      VALUE rb_mProcess;
VALUE            3349 process.c      VALUE rb_mProcUID;
VALUE            3350 process.c      VALUE rb_mProcGID;
VALUE            3351 process.c      VALUE rb_mProcID_Syscall;
VALUE             193 random.c       static VALUE saved_seed = INT2FIX(0);
VALUE             195 random.c       static VALUE
VALUE             197 random.c           VALUE vseed;
VALUE             199 random.c           volatile VALUE seed;
VALUE             200 random.c           VALUE old;
VALUE             207 random.c                 len = sizeof(VALUE);
VALUE             255 random.c       static VALUE
VALUE             305 random.c           return rb_big_norm((VALUE)big);
VALUE             322 random.c       static VALUE
VALUE             325 random.c           VALUE *argv;
VALUE             326 random.c           VALUE obj;
VALUE             328 random.c           VALUE seed, old;
VALUE             373 random.c       static VALUE
VALUE             381 random.c           val = (struct RBignum *)rb_big_clone((VALUE)limit);
VALUE             415 random.c           return rb_big_norm((VALUE)val);
VALUE             438 random.c       static VALUE
VALUE             441 random.c           VALUE *argv;
VALUE             442 random.c           VALUE obj;
VALUE             444 random.c           VALUE vmax;
VALUE             470 random.c                   limit = (struct RBignum *)rb_big_minus((VALUE)limit, INT2FIX(1));
VALUE             471 random.c                   if (FIXNUM_P((VALUE)limit)) {
VALUE             472 random.c                       if (FIX2LONG((VALUE)limit) == -1)
VALUE             474 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              30 range.c            VALUE *args;
VALUE              37 range.c            VALUE range, beg, end;
VALUE              40 range.c            VALUE args[2];
VALUE              46 range.c        	VALUE v;
VALUE              48 range.c        	v = rb_rescue(range_check, (VALUE)args, range_failed, 0);
VALUE              57 range.c        VALUE
VALUE              59 range.c            VALUE beg, end;
VALUE              62 range.c            VALUE range = rb_obj_alloc(rb_cRange);
VALUE              77 range.c        static VALUE
VALUE              80 range.c            VALUE *argv;
VALUE              81 range.c            VALUE range;
VALUE              83 range.c            VALUE beg, end, flags;
VALUE             102 range.c        static VALUE
VALUE             104 range.c            VALUE range;
VALUE             124 range.c        static VALUE
VALUE             126 range.c            VALUE range, obj;
VALUE             144 range.c            VALUE a, b;
VALUE             146 range.c            VALUE r = rb_funcall(a, id_cmp, 1, b);
VALUE             155 range.c            VALUE a, b;
VALUE             158 range.c            VALUE r = rb_funcall(a, id_cmp, 1, b);
VALUE             182 range.c        static VALUE
VALUE             184 range.c            VALUE range, obj;
VALUE             209 range.c        static VALUE
VALUE             211 range.c            VALUE range;
VALUE             214 range.c            VALUE v;
VALUE             225 range.c        static VALUE
VALUE             227 range.c            VALUE *args;
VALUE             234 range.c            VALUE range;
VALUE             235 range.c            void (*func) _((VALUE, void*));
VALUE             236 range.c            VALUE v, e;
VALUE             256 range.c        static VALUE
VALUE             258 range.c            VALUE i;
VALUE             297 range.c        static VALUE
VALUE             300 range.c            VALUE *argv;
VALUE             301 range.c            VALUE range;
VALUE             303 range.c            VALUE b, e, step;
VALUE             327 range.c        	VALUE tmp = rb_check_string_type(b);
VALUE             330 range.c        	    VALUE args[5];
VALUE             337 range.c        	    rb_iterate((VALUE(*)_((VALUE)))str_step, (VALUE)args, step_i,
VALUE             338 range.c        			(VALUE)iter);
VALUE             368 range.c            VALUE v;
VALUE             392 range.c        static VALUE
VALUE             394 range.c            VALUE range;
VALUE             396 range.c            VALUE beg, end;
VALUE             415 range.c        	VALUE args[5];
VALUE             420 range.c        	rb_iterate((VALUE(*)_((VALUE)))str_step, (VALUE)args, step_i,
VALUE             421 range.c        		   (VALUE)iter);
VALUE             437 range.c        static VALUE
VALUE             439 range.c            VALUE range;
VALUE             457 range.c        static VALUE
VALUE             459 range.c            VALUE range;
VALUE             464 range.c        VALUE
VALUE             466 range.c            VALUE range;
VALUE             510 range.c        static VALUE
VALUE             512 range.c            VALUE range;
VALUE             514 range.c            VALUE str, str2;
VALUE             536 range.c        static VALUE
VALUE             538 range.c            VALUE range;
VALUE             540 range.c            VALUE str, str2;
VALUE             574 range.c        static VALUE
VALUE             576 range.c            VALUE range, val;
VALUE             578 range.c            VALUE beg, end;
VALUE              16 re.c           static VALUE rb_eRegexpError;
VALUE             203 re.c               VALUE re;
VALUE             248 re.c               VALUE re;
VALUE             262 re.c               VALUE re;
VALUE             273 re.c               VALUE str;
VALUE             327 re.c           static VALUE
VALUE             331 re.c               VALUE re;
VALUE             333 re.c               VALUE str = rb_str_buf_new2("/");
VALUE             377 re.c           static VALUE
VALUE             379 re.c               VALUE re;
VALUE             381 re.c               VALUE str;
VALUE             400 re.c           static VALUE
VALUE             402 re.c               VALUE re;
VALUE             429 re.c           static VALUE
VALUE             431 re.c               VALUE re;
VALUE             437 re.c               VALUE str = rb_str_buf_new2("(?");
VALUE             525 re.c               VALUE re;
VALUE             527 re.c               VALUE desc = rb_reg_desc(s, len, re);
VALUE             543 re.c           static VALUE
VALUE             545 re.c               VALUE re;
VALUE             576 re.c           static VALUE
VALUE             578 re.c               VALUE re;
VALUE             592 re.c           static VALUE
VALUE             594 re.c               VALUE re;
VALUE             665 re.c           static VALUE rb_cMatch;
VALUE             667 re.c           static VALUE match_alloc _((VALUE));
VALUE             668 re.c           static VALUE
VALUE             670 re.c               VALUE klass;
VALUE             680 re.c               return (VALUE)match;
VALUE             684 re.c           static VALUE
VALUE             686 re.c               VALUE obj, orig;
VALUE             714 re.c           static VALUE
VALUE             716 re.c               VALUE match;
VALUE             734 re.c           static VALUE
VALUE             736 re.c               VALUE match, n;
VALUE             763 re.c           static VALUE
VALUE             765 re.c               VALUE match, n;
VALUE             791 re.c           static VALUE
VALUE             793 re.c               VALUE match, n;
VALUE             810 re.c               VALUE match;
VALUE             820 re.c               VALUE re;
VALUE             862 re.c               VALUE re, str;
VALUE             888 re.c               VALUE re, str;
VALUE             892 re.c               VALUE match;
VALUE             951 re.c           VALUE
VALUE             954 re.c               VALUE match;
VALUE             968 re.c           VALUE
VALUE             971 re.c               VALUE match;
VALUE             973 re.c               VALUE str;
VALUE             993 re.c           VALUE
VALUE             995 re.c               VALUE match;
VALUE            1012 re.c           VALUE
VALUE            1014 re.c               VALUE match;
VALUE            1016 re.c               VALUE str;
VALUE            1037 re.c           VALUE
VALUE            1039 re.c               VALUE match;
VALUE            1041 re.c               VALUE str;
VALUE            1053 re.c           VALUE
VALUE            1055 re.c               VALUE match;
VALUE            1068 re.c           static VALUE
VALUE            1074 re.c           static VALUE
VALUE            1080 re.c           static VALUE
VALUE            1086 re.c           static VALUE
VALUE            1092 re.c           static VALUE
VALUE            1094 re.c               VALUE match;
VALUE            1098 re.c               VALUE ary = rb_ary_new2(regs->num_regs);
VALUE            1099 re.c               VALUE target = RMATCH(match)->str;
VALUE            1108 re.c           	    VALUE str = rb_str_substr(target, regs->beg[i], regs->end[i]-regs->beg[i]);
VALUE            1143 re.c           static VALUE
VALUE            1145 re.c               VALUE match;
VALUE            1163 re.c           static VALUE
VALUE            1165 re.c               VALUE match;
VALUE            1190 re.c           static VALUE
VALUE            1193 re.c               VALUE *argv;
VALUE            1194 re.c               VALUE match;
VALUE            1196 re.c               VALUE idx, rest;
VALUE            1206 re.c           static VALUE match_entry _((VALUE, long));
VALUE            1207 re.c           static VALUE
VALUE            1209 re.c               VALUE match;
VALUE            1228 re.c           static VALUE
VALUE            1231 re.c               VALUE *argv;
VALUE            1232 re.c               VALUE match;
VALUE            1250 re.c           static VALUE
VALUE            1253 re.c               VALUE *argv;
VALUE            1254 re.c               VALUE match;
VALUE            1261 re.c           	VALUE target = RMATCH(match)->str;
VALUE            1262 re.c           	VALUE result = rb_ary_new();
VALUE            1267 re.c           	    VALUE str = rb_str_substr(target, regs->beg[i], regs->end[i]-regs->beg[i]);
VALUE            1288 re.c           static VALUE
VALUE            1290 re.c               VALUE match;
VALUE            1292 re.c               VALUE str = rb_reg_last_match(match);
VALUE            1311 re.c           static VALUE
VALUE            1313 re.c               VALUE match;
VALUE            1318 re.c           VALUE rb_cRegexp;
VALUE            1322 re.c               VALUE obj;
VALUE            1360 re.c           	kcode_set_option((VALUE)re);
VALUE            1376 re.c           static VALUE rb_reg_s_alloc _((VALUE));
VALUE            1377 re.c           static VALUE
VALUE            1379 re.c               VALUE klass;
VALUE            1388 re.c               return (VALUE)re;
VALUE            1391 re.c           VALUE
VALUE            1397 re.c               VALUE re = rb_reg_s_alloc(rb_cRegexp);
VALUE            1400 re.c               return (VALUE)re;
VALUE            1405 re.c           static VALUE reg_cache;
VALUE            1407 re.c           VALUE
VALUE            1409 re.c               VALUE str;
VALUE            1411 re.c               volatile VALUE save_str = str;
VALUE            1426 re.c               VALUE re;
VALUE            1441 re.c           static VALUE
VALUE            1443 re.c               VALUE re;
VALUE            1475 re.c           static VALUE
VALUE            1477 re.c               VALUE re1, re2;
VALUE            1503 re.c           VALUE
VALUE            1505 re.c               VALUE re, str;
VALUE            1540 re.c           VALUE
VALUE            1542 re.c               VALUE re, str;
VALUE            1573 re.c           VALUE
VALUE            1575 re.c               VALUE re;
VALUE            1578 re.c               VALUE line = rb_lastline_get();
VALUE            1604 re.c           static VALUE
VALUE            1606 re.c               VALUE re, str;
VALUE            1608 re.c               VALUE result = rb_reg_match(re, str);
VALUE            1646 re.c           static VALUE
VALUE            1649 re.c               VALUE *argv;
VALUE            1650 re.c               VALUE self;
VALUE            1720 re.c           VALUE
VALUE            1722 re.c               VALUE str;
VALUE            1725 re.c               VALUE tmp;
VALUE            1819 re.c           static VALUE
VALUE            1822 re.c               VALUE *argv;
VALUE            1824 re.c               VALUE str, kcode;
VALUE            1857 re.c               VALUE re;
VALUE            1875 re.c               VALUE re;
VALUE            1903 re.c           static VALUE
VALUE            1906 re.c               VALUE *argv;
VALUE            1909 re.c                   VALUE args[1];
VALUE            1914 re.c                   VALUE v;
VALUE            1919 re.c                       VALUE args[1];
VALUE            1926 re.c                   VALUE kcode_re = Qnil;
VALUE            1927 re.c                   VALUE source = rb_str_buf_new(0);
VALUE            1928 re.c                   VALUE args[3];
VALUE            1930 re.c                       volatile VALUE v;
VALUE            1941 re.c                                   volatile VALUE str1, str2;
VALUE            1980 re.c           static VALUE
VALUE            1982 re.c               VALUE copy, re;
VALUE            1996 re.c           VALUE
VALUE            1998 re.c               VALUE str, src;
VALUE            2001 re.c               VALUE val = 0;
VALUE            2096 re.c           static VALUE
VALUE            2138 re.c               VALUE val;
VALUE            2144 re.c           static VALUE
VALUE            2152 re.c               VALUE val;
VALUE            2160 re.c           static VALUE
VALUE            2163 re.c               VALUE match = rb_backref_get();
VALUE            2172 re.c               VALUE val;
VALUE            2197 re.c           static VALUE
VALUE            2200 re.c               VALUE *argv;
VALUE            2202 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              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             110 ruby.c         extern VALUE rb_load_path;
VALUE             190 ruby.c         	VALUE ary = rb_ary_new();
VALUE             356 ruby.c         	rb_protect((VALUE (*)(VALUE))rb_require, (VALUE)list->name, &state);
VALUE             368 ruby.c             rb_gc_force_recycle((VALUE)save[2]);
VALUE             377 ruby.c         	VALUE *args;
VALUE             382 ruby.c         	    VALUE v = *args++;
VALUE             403 ruby.c         		    VALUE name_error[2];
VALUE             466 ruby.c             VALUE e_script = Qfalse;
VALUE             838 ruby.c             extern VALUE rb_stdin;
VALUE             839 ruby.c             VALUE f;
VALUE             865 ruby.c         	VALUE c = 1;		/* something not nil */
VALUE             866 ruby.c         	VALUE line;
VALUE             970 ruby.c         VALUE rb_progname;
VALUE             971 ruby.c         VALUE rb_argv;
VALUE             972 ruby.c         VALUE rb_argv0;
VALUE            1003 ruby.c             VALUE val;
VALUE            1119 ruby.c             VALUE val;
VALUE            1121 ruby.c             VALUE *variable;
VALUE            1172 ruby.c         	VALUE arg = rb_tainted_str_new2(argv[i]);
VALUE             132 ruby.h         #define INT2FIX(i) ((VALUE)(((long)(i))<<1 | FIXNUM_FLAG))
VALUE             135 ruby.h         VALUE rb_int2inum _((long));
VALUE             139 ruby.h         VALUE rb_uint2inum _((unsigned long));
VALUE             145 ruby.h         VALUE rb_ll2inum _((LONG_LONG));
VALUE             147 ruby.h         VALUE rb_ull2inum _((unsigned LONG_LONG));
VALUE             165 ruby.h         #define IMMEDIATE_P(x) ((VALUE)(x) & IMMEDIATE_MASK)
VALUE             168 ruby.h         #define SYMBOL_P(x) (((VALUE)(x)&0xff)==SYMBOL_FLAG)
VALUE             169 ruby.h         #define ID2SYM(x) ((VALUE)(((long)(x))<<8|SYMBOL_FLAG))
VALUE             173 ruby.h         #define Qfalse ((VALUE)0)
VALUE             174 ruby.h         #define Qtrue  ((VALUE)2)
VALUE             175 ruby.h         #define Qnil   ((VALUE)4)
VALUE             176 ruby.h         #define Qundef ((VALUE)6)	/* undefined value for placeholder */
VALUE             178 ruby.h         #define RTEST(v) (((VALUE)(v) & ~Qnil) != 0)
VALUE             179 ruby.h         #define NIL_P(v) ((VALUE)(v) == Qnil)
VALUE             181 ruby.h         #define CLASS_OF(v) rb_class_of((VALUE)(v))
VALUE             216 ruby.h         #define TYPE(x) rb_type((VALUE)(x))
VALUE             218 ruby.h         void rb_check_type _((VALUE,int));
VALUE             219 ruby.h         #define Check_Type(v,t) rb_check_type((VALUE)(v),t)
VALUE             221 ruby.h         VALUE rb_str_to_str _((VALUE));
VALUE             222 ruby.h         VALUE rb_string_value _((volatile VALUE*));
VALUE             223 ruby.h         char *rb_string_value_ptr _((volatile VALUE*));
VALUE             224 ruby.h         char *rb_string_value_cstr _((volatile VALUE*));
VALUE             230 ruby.h         void rb_check_safe_obj _((VALUE));
VALUE             231 ruby.h         void rb_check_safe_str _((VALUE));
VALUE             237 ruby.h         #define Check_SafeStr(v) rb_check_safe_str((VALUE)(v))
VALUE             243 ruby.h         void rb_secure_update _((VALUE));
VALUE             245 ruby.h         long rb_num2long _((VALUE));
VALUE             246 ruby.h         unsigned long rb_num2ulong _((VALUE));
VALUE             247 ruby.h         #define NUM2LONG(x) (FIXNUM_P(x)?FIX2LONG(x):rb_num2long((VALUE)x))
VALUE             248 ruby.h         #define NUM2ULONG(x) rb_num2ulong((VALUE)x)
VALUE             250 ruby.h         long rb_num2int _((VALUE));
VALUE             251 ruby.h         #define NUM2INT(x) (FIXNUM_P(x)?FIX2INT(x):rb_num2int((VALUE)x))
VALUE             252 ruby.h         long rb_fix2int _((VALUE));
VALUE             253 ruby.h         #define FIX2INT(x) rb_fix2int((VALUE)x)
VALUE             254 ruby.h         unsigned long rb_num2uint _((VALUE));
VALUE             256 ruby.h         unsigned long rb_fix2uint _((VALUE));
VALUE             266 ruby.h         LONG_LONG rb_num2ll _((VALUE));
VALUE             267 ruby.h         unsigned LONG_LONG rb_num2ull _((VALUE));
VALUE             268 ruby.h         # define NUM2LL(x) (FIXNUM_P(x)?FIX2LONG(x):rb_num2ll((VALUE)x))
VALUE             277 ruby.h         double rb_num2dbl _((VALUE));
VALUE             278 ruby.h         #define NUM2DBL(x) rb_num2dbl((VALUE)(x))
VALUE             281 ruby.h         char *rb_str2cstr _((VALUE,long*));
VALUE             283 ruby.h         #define STR2CSTR(x) rb_str2cstr((VALUE)(x),0)
VALUE             289 ruby.h         VALUE rb_newobj _((void));
VALUE             297 ruby.h             OBJSETUP(clone,rb_singleton_class_clone((VALUE)obj),RBASIC(obj)->flags);\
VALUE             298 ruby.h             rb_singleton_class_attached(RBASIC(clone)->klass, (VALUE)clone);\
VALUE             299 ruby.h             if (FL_TEST(obj, FL_EXIVAR)) rb_copy_generic_ivar((VALUE)clone,(VALUE)obj);\
VALUE             303 ruby.h             if (FL_TEST(obj, FL_EXIVAR)) rb_copy_generic_ivar((VALUE)dup,(VALUE)obj);\
VALUE             308 ruby.h             VALUE klass;
VALUE             320 ruby.h             VALUE super;
VALUE             336 ruby.h         	VALUE shared;
VALUE             345 ruby.h         	VALUE shared;
VALUE             347 ruby.h             VALUE *ptr;
VALUE             361 ruby.h             VALUE ifnone;
VALUE             383 ruby.h         VALUE rb_data_object_alloc _((VALUE,void*,RUBY_DATA_FUNC,RUBY_DATA_FUNC));
VALUE             402 ruby.h             VALUE *ptr;
VALUE             473 ruby.h         void rb_obj_infect _((VALUE,VALUE));
VALUE             475 ruby.h         void rb_glob _((const char*,void(*)(const char*,VALUE),VALUE));
VALUE             476 ruby.h         void rb_globi _((const char*,void(*)(const char*,VALUE),VALUE));
VALUE             478 ruby.h         VALUE rb_define_class _((const char*,VALUE));
VALUE             479 ruby.h         VALUE rb_define_module _((const char*));
VALUE             480 ruby.h         VALUE rb_define_class_under _((VALUE, const char*, VALUE));
VALUE             481 ruby.h         VALUE rb_define_module_under _((VALUE, const char*));
VALUE             483 ruby.h         void rb_include_module _((VALUE,VALUE));
VALUE             484 ruby.h         void rb_extend_object _((VALUE,VALUE));
VALUE             486 ruby.h         void rb_define_variable _((const char*,VALUE*));
VALUE             487 ruby.h         void rb_define_virtual_variable _((const char*,VALUE(*)(ANYARGS),void(*)(ANYARGS)));
VALUE             488 ruby.h         void rb_define_hooked_variable _((const char*,VALUE*,VALUE(*)(ANYARGS),void(*)(ANYARGS)));
VALUE             489 ruby.h         int ruby_glob _((const char*,int,int(*)(const char*,VALUE),VALUE));
VALUE             490 ruby.h         int ruby_globi _((const char*,int,int(*)(const char*,VALUE),VALUE));
VALUE             491 ruby.h         void rb_define_readonly_variable _((const char*,VALUE*));
VALUE             492 ruby.h         void rb_define_const _((VALUE,const char*,VALUE));
VALUE             493 ruby.h         void rb_define_global_const _((const char*,VALUE));
VALUE             495 ruby.h         #define RUBY_METHOD_FUNC(func) ((VALUE (*)(ANYARGS))func)
VALUE             496 ruby.h         void rb_define_method _((VALUE,const char*,VALUE(*)(ANYARGS),int));
VALUE             497 ruby.h         void rb_define_module_function _((VALUE,const char*,VALUE(*)(ANYARGS),int));
VALUE             498 ruby.h         void rb_define_global_function _((const char*,VALUE(*)(ANYARGS),int));
VALUE             500 ruby.h         void rb_undef_method _((VALUE,const char*));
VALUE             501 ruby.h         void rb_define_alias _((VALUE,const char*,const char*));
VALUE             502 ruby.h         void rb_define_attr _((VALUE,const char*,int,int));
VALUE             504 ruby.h         void rb_global_variable _((VALUE*));
VALUE             505 ruby.h         void rb_gc_register_address _((VALUE*));
VALUE             506 ruby.h         void rb_gc_unregister_address _((VALUE*));
VALUE             510 ruby.h         ID rb_to_id _((VALUE));
VALUE             512 ruby.h         char *rb_class2name _((VALUE));
VALUE             513 ruby.h         char *rb_obj_classname _((VALUE));
VALUE             515 ruby.h         void rb_p _((VALUE));
VALUE             517 ruby.h         VALUE rb_eval_string _((const char*));
VALUE             518 ruby.h         VALUE rb_eval_string_protect _((const char*, int*));
VALUE             519 ruby.h         VALUE rb_eval_string_wrap _((const char*, int*));
VALUE             520 ruby.h         VALUE rb_funcall __((VALUE, ID, int, ...));
VALUE             521 ruby.h         VALUE rb_funcall2 _((VALUE, ID, int, const VALUE*));
VALUE             522 ruby.h         VALUE rb_funcall3 _((VALUE, ID, int, const VALUE*));
VALUE             523 ruby.h         int rb_scan_args __((int, const VALUE*, const char*, ...));
VALUE             524 ruby.h         VALUE rb_call_super _((int, const VALUE*));
VALUE             526 ruby.h         VALUE rb_gv_set _((const char*, VALUE));
VALUE             527 ruby.h         VALUE rb_gv_get _((const char*));
VALUE             528 ruby.h         VALUE rb_iv_get _((VALUE, const char*));
VALUE             529 ruby.h         VALUE rb_iv_set _((VALUE, const char*, VALUE));
VALUE             531 ruby.h         VALUE rb_equal _((VALUE,VALUE));
VALUE             533 ruby.h         RUBY_EXTERN VALUE ruby_verbose, ruby_debug;
VALUE             535 ruby.h         NORETURN(void rb_raise __((VALUE, const char*, ...)));
VALUE             547 ruby.h         VALUE rb_each _((VALUE));
VALUE             548 ruby.h         VALUE rb_yield _((VALUE));
VALUE             549 ruby.h         VALUE rb_yield_values __((int n, ...));
VALUE             550 ruby.h         VALUE rb_yield_splat _((VALUE));
VALUE             553 ruby.h         VALUE rb_iterate _((VALUE(*)(VALUE),VALUE,VALUE(*)(ANYARGS),VALUE));
VALUE             554 ruby.h         VALUE rb_rescue _((VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE));
VALUE             555 ruby.h         VALUE rb_rescue2 __((VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE,...));
VALUE             556 ruby.h         VALUE rb_ensure _((VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE));
VALUE             557 ruby.h         VALUE rb_catch _((const char*,VALUE(*)(ANYARGS),VALUE));
VALUE             558 ruby.h         NORETURN(void rb_throw _((const char*,VALUE)));
VALUE             560 ruby.h         VALUE rb_require _((const char*));
VALUE             566 ruby.h         RUBY_EXTERN VALUE rb_mKernel;
VALUE             567 ruby.h         RUBY_EXTERN VALUE rb_mComparable;
VALUE             568 ruby.h         RUBY_EXTERN VALUE rb_mEnumerable;
VALUE             569 ruby.h         RUBY_EXTERN VALUE rb_mPrecision;
VALUE             570 ruby.h         RUBY_EXTERN VALUE rb_mErrno;
VALUE             571 ruby.h         RUBY_EXTERN VALUE rb_mFileTest;
VALUE             572 ruby.h         RUBY_EXTERN VALUE rb_mGC;
VALUE             573 ruby.h         RUBY_EXTERN VALUE rb_mMath;
VALUE             574 ruby.h         RUBY_EXTERN VALUE rb_mProcess;
VALUE             576 ruby.h         RUBY_EXTERN VALUE rb_cObject;
VALUE             577 ruby.h         RUBY_EXTERN VALUE rb_cArray;
VALUE             578 ruby.h         RUBY_EXTERN VALUE rb_cBignum;
VALUE             579 ruby.h         RUBY_EXTERN VALUE rb_cClass;
VALUE             580 ruby.h         RUBY_EXTERN VALUE rb_cDir;
VALUE             581 ruby.h         RUBY_EXTERN VALUE rb_cData;
VALUE             582 ruby.h         RUBY_EXTERN VALUE rb_cFalseClass;
VALUE             583 ruby.h         RUBY_EXTERN VALUE rb_cFile;
VALUE             584 ruby.h         RUBY_EXTERN VALUE rb_cFixnum;
VALUE             585 ruby.h         RUBY_EXTERN VALUE rb_cFloat;
VALUE             586 ruby.h         RUBY_EXTERN VALUE rb_cHash;
VALUE             587 ruby.h         RUBY_EXTERN VALUE rb_cInteger;
VALUE             588 ruby.h         RUBY_EXTERN VALUE rb_cIO;
VALUE             589 ruby.h         RUBY_EXTERN VALUE rb_cModule;
VALUE             590 ruby.h         RUBY_EXTERN VALUE rb_cNilClass;
VALUE             591 ruby.h         RUBY_EXTERN VALUE rb_cNumeric;
VALUE             592 ruby.h         RUBY_EXTERN VALUE rb_cProc;
VALUE             593 ruby.h         RUBY_EXTERN VALUE rb_cRange;
VALUE             594 ruby.h         RUBY_EXTERN VALUE rb_cRegexp;
VALUE             595 ruby.h         RUBY_EXTERN VALUE rb_cString;
VALUE             596 ruby.h         RUBY_EXTERN VALUE rb_cSymbol;
VALUE             597 ruby.h         RUBY_EXTERN VALUE rb_cThread;
VALUE             598 ruby.h         RUBY_EXTERN VALUE rb_cTime;
VALUE             599 ruby.h         RUBY_EXTERN VALUE rb_cTrueClass;
VALUE             600 ruby.h         RUBY_EXTERN VALUE rb_cStruct;
VALUE             602 ruby.h         RUBY_EXTERN VALUE rb_eException;
VALUE             603 ruby.h         RUBY_EXTERN VALUE rb_eStandardError;
VALUE             604 ruby.h         RUBY_EXTERN VALUE rb_eSystemExit;
VALUE             605 ruby.h         RUBY_EXTERN VALUE rb_eInterrupt;
VALUE             606 ruby.h         RUBY_EXTERN VALUE rb_eSignal;
VALUE             607 ruby.h         RUBY_EXTERN VALUE rb_eFatal;
VALUE             608 ruby.h         RUBY_EXTERN VALUE rb_eArgError;
VALUE             609 ruby.h         RUBY_EXTERN VALUE rb_eEOFError;
VALUE             610 ruby.h         RUBY_EXTERN VALUE rb_eIndexError;
VALUE             611 ruby.h         RUBY_EXTERN VALUE rb_eRangeError;
VALUE             612 ruby.h         RUBY_EXTERN VALUE rb_eIOError;
VALUE             613 ruby.h         RUBY_EXTERN VALUE rb_eRuntimeError;
VALUE             614 ruby.h         RUBY_EXTERN VALUE rb_eSecurityError;
VALUE             615 ruby.h         RUBY_EXTERN VALUE rb_eSystemCallError;
VALUE             616 ruby.h         RUBY_EXTERN VALUE rb_eTypeError;
VALUE             617 ruby.h         RUBY_EXTERN VALUE rb_eZeroDivError;
VALUE             618 ruby.h         RUBY_EXTERN VALUE rb_eNotImpError;
VALUE             619 ruby.h         RUBY_EXTERN VALUE rb_eNoMemError;
VALUE             620 ruby.h         RUBY_EXTERN VALUE rb_eNoMethodError;
VALUE             621 ruby.h         RUBY_EXTERN VALUE rb_eFloatDomainError;
VALUE             623 ruby.h         RUBY_EXTERN VALUE rb_eScriptError;
VALUE             624 ruby.h         RUBY_EXTERN VALUE rb_eNameError;
VALUE             625 ruby.h         RUBY_EXTERN VALUE rb_eSyntaxError;
VALUE             626 ruby.h         RUBY_EXTERN VALUE rb_eLoadError;
VALUE             628 ruby.h         RUBY_EXTERN VALUE rb_stdin, rb_stdout, rb_stderr;
VALUE             629 ruby.h         RUBY_EXTERN VALUE ruby_errinfo;
VALUE             631 ruby.h         static inline VALUE
VALUE             633 ruby.h         rb_class_of(VALUE obj)
VALUE             636 ruby.h             VALUE obj;
VALUE             650 ruby.h         rb_type(VALUE obj)
VALUE             653 ruby.h            VALUE obj;
VALUE             667 ruby.h         rb_special_const_p(VALUE obj)
VALUE             670 ruby.h             VALUE obj;
VALUE              82 rubyio.h       VALUE rb_io_taint_check _((VALUE));
VALUE              75 rubysig.h      VALUE rb_with_disable_interrupt _((VALUE(*)(ANYARGS),VALUE));
VALUE             226 signal.c       VALUE
VALUE             229 signal.c           VALUE *argv;
VALUE             267 signal.c       	    VALUE str;
VALUE             303 signal.c           VALUE cmd;
VALUE             466 signal.c       	VALUE trap_exit = trap_list[0].cmd;
VALUE             498 signal.c           VALUE sig, cmd;
VALUE             515 signal.c       static VALUE
VALUE             520 signal.c           VALUE command, oldcmd;
VALUE             648 signal.c       static VALUE
VALUE             703 signal.c       static VALUE
VALUE             706 signal.c           VALUE *argv;
VALUE             735 signal.c           return rb_ensure(trap, (VALUE)&arg, trap_ensure, (VALUE)&arg);
VALUE             750 signal.c       static VALUE
VALUE             753 signal.c           VALUE h = rb_hash_new();
VALUE             858 signal.c           VALUE mSignal = rb_define_module("Signal");
VALUE             234 sprintf.c      VALUE
VALUE             237 sprintf.c          VALUE *argv;
VALUE             239 sprintf.c          VALUE fmt;
VALUE             243 sprintf.c          VALUE result;
VALUE             249 sprintf.c          VALUE nextvalue;
VALUE             250 sprintf.c          VALUE tmp;
VALUE             251 sprintf.c          VALUE str;
VALUE             388 sprintf.c      		VALUE val = GETARG();
VALUE             404 sprintf.c      		VALUE arg = GETARG();
VALUE             448 sprintf.c      		volatile VALUE val = GETARG();
VALUE             456 sprintf.c      		VALUE tmp;
VALUE             457 sprintf.c                      volatile VALUE tmp1;
VALUE             697 sprintf.c      		VALUE val = GETARG();
VALUE              28 string.c       VALUE rb_cString;
VALUE              40 string.c       VALUE rb_fs;
VALUE              44 string.c           VALUE s;
VALUE              55 string.c           VALUE s;
VALUE              62 string.c       static VALUE str_alloc _((VALUE));
VALUE              63 string.c       static VALUE
VALUE              65 string.c           VALUE klass;
VALUE              74 string.c           return (VALUE)str;
VALUE              77 string.c       static VALUE
VALUE              79 string.c           VALUE klass;
VALUE              83 string.c           VALUE str;
VALUE             100 string.c       VALUE
VALUE             108 string.c       VALUE
VALUE             118 string.c       VALUE
VALUE             123 string.c           VALUE str = rb_str_new(ptr, len);
VALUE             129 string.c       VALUE
VALUE             133 string.c           VALUE str = rb_str_new2(ptr);
VALUE             139 string.c       static VALUE
VALUE             141 string.c           VALUE klass, str;
VALUE             143 string.c           VALUE str2 = str_alloc(klass);
VALUE             154 string.c       VALUE
VALUE             156 string.c           VALUE str;
VALUE             161 string.c       static VALUE
VALUE             163 string.c           VALUE klass, str;
VALUE             165 string.c           VALUE str2 = str_alloc(klass);
VALUE             181 string.c       VALUE
VALUE             183 string.c           VALUE orig;
VALUE             185 string.c           VALUE klass, str;
VALUE             209 string.c       VALUE
VALUE             211 string.c           VALUE obj;
VALUE             220 string.c       VALUE
VALUE             224 string.c           VALUE str = str_alloc(rb_cString);
VALUE             238 string.c       VALUE
VALUE             242 string.c           VALUE str;
VALUE             251 string.c       VALUE
VALUE             253 string.c           VALUE str;
VALUE             260 string.c           VALUE str, str2;
VALUE             291 string.c       VALUE
VALUE             293 string.c           VALUE obj;
VALUE             295 string.c           VALUE str;
VALUE             307 string.c       static VALUE rb_str_replace _((VALUE, VALUE));
VALUE             309 string.c       VALUE
VALUE             311 string.c           VALUE str;
VALUE             313 string.c           VALUE dup = str_alloc(rb_obj_class(str));
VALUE             326 string.c       static VALUE
VALUE             329 string.c           VALUE *argv;
VALUE             330 string.c           VALUE str;
VALUE             332 string.c           VALUE orig;
VALUE             346 string.c       static VALUE
VALUE             348 string.c           VALUE str;
VALUE             363 string.c       static VALUE
VALUE             365 string.c           VALUE str;
VALUE             382 string.c       VALUE
VALUE             384 string.c           VALUE str1, str2;
VALUE             386 string.c           VALUE str3;
VALUE             410 string.c       VALUE
VALUE             412 string.c           VALUE str;
VALUE             413 string.c           VALUE times;
VALUE             415 string.c           VALUE str2;
VALUE             452 string.c       static VALUE
VALUE             454 string.c           VALUE str, arg;
VALUE             456 string.c           VALUE *argv;
VALUE             459 string.c       	argv = ALLOCA_N(VALUE, RARRAY(arg)->len + 1);
VALUE             461 string.c       	MEMCPY(argv+1, RARRAY(arg)->ptr, VALUE, RARRAY(arg)->len);
VALUE             465 string.c           argv = ALLOCA_N(VALUE, 2);
VALUE             473 string.c           VALUE str;
VALUE             487 string.c           VALUE str;
VALUE             503 string.c           VALUE str;
VALUE             511 string.c           VALUE str, add;
VALUE             529 string.c       VALUE
VALUE             531 string.c           VALUE str;
VALUE             541 string.c       VALUE
VALUE             543 string.c           volatile VALUE *ptr;
VALUE             545 string.c           VALUE s = *ptr;
VALUE             559 string.c           volatile VALUE *ptr;
VALUE             566 string.c           volatile VALUE *ptr;
VALUE             568 string.c           VALUE str = rb_string_value(ptr);
VALUE             577 string.c       VALUE
VALUE             579 string.c           VALUE str;
VALUE             589 string.c       VALUE
VALUE             591 string.c           VALUE str;
VALUE             594 string.c           VALUE str2;
VALUE             625 string.c       VALUE
VALUE             627 string.c           VALUE str;
VALUE             632 string.c       VALUE
VALUE             634 string.c           VALUE str;
VALUE             637 string.c       	VALUE shared = RSTRING(str)->aux.shared;
VALUE             649 string.c       VALUE
VALUE             651 string.c           VALUE str;
VALUE             660 string.c       VALUE
VALUE             662 string.c           VALUE str;
VALUE             671 string.c       VALUE
VALUE             673 string.c           VALUE str;
VALUE             694 string.c       VALUE
VALUE             696 string.c           VALUE str;
VALUE             728 string.c       VALUE
VALUE             730 string.c           VALUE str;
VALUE             736 string.c       VALUE
VALUE             738 string.c           VALUE str;
VALUE             757 string.c       VALUE
VALUE             759 string.c           VALUE str;
VALUE             765 string.c       VALUE
VALUE             767 string.c           VALUE str, str2;
VALUE             795 string.c       VALUE
VALUE             797 string.c           VALUE str, str2;
VALUE             835 string.c       VALUE
VALUE             837 string.c           VALUE str1, str2;
VALUE             853 string.c           VALUE str;
VALUE             894 string.c       static VALUE
VALUE             896 string.c           VALUE str;
VALUE             906 string.c           VALUE str1, str2;
VALUE             932 string.c       static VALUE
VALUE             934 string.c           VALUE str1, str2;
VALUE             959 string.c       static VALUE
VALUE             961 string.c           VALUE str1, str2;
VALUE             998 string.c       static VALUE
VALUE            1000 string.c           VALUE str1, str2;
VALUE            1012 string.c       	    VALUE tmp = rb_funcall(str2, rb_intern("<=>"), 1, str1);
VALUE            1039 string.c       static VALUE
VALUE            1041 string.c           VALUE str1, str2;
VALUE            1061 string.c           VALUE str, sub;
VALUE            1097 string.c       static VALUE
VALUE            1100 string.c           VALUE *argv;
VALUE            1101 string.c           VALUE str;
VALUE            1103 string.c           VALUE sub;
VALUE            1104 string.c           VALUE initpos;
VALUE            1142 string.c       	  VALUE tmp;
VALUE            1163 string.c           VALUE str, sub;
VALUE            1211 string.c       static VALUE
VALUE            1214 string.c           VALUE *argv;
VALUE            1215 string.c           VALUE str;
VALUE            1217 string.c           VALUE sub;
VALUE            1218 string.c           VALUE position;
VALUE            1292 string.c       static VALUE
VALUE            1294 string.c           VALUE x, y;
VALUE            1309 string.c       static VALUE get_pat _((VALUE, int));
VALUE            1325 string.c       static VALUE
VALUE            1327 string.c           VALUE str, re;
VALUE            1383 string.c       static VALUE
VALUE            1385 string.c           VALUE orig;
VALUE            1387 string.c           VALUE str;
VALUE            1435 string.c       static VALUE
VALUE            1437 string.c           VALUE str;
VALUE            1444 string.c       VALUE
VALUE            1446 string.c           VALUE beg, end;
VALUE            1449 string.c           VALUE current, after_end;
VALUE            1493 string.c       static VALUE
VALUE            1495 string.c           VALUE beg, end;
VALUE            1500 string.c       static VALUE
VALUE            1502 string.c           VALUE str, re;
VALUE            1511 string.c       static VALUE
VALUE            1513 string.c           VALUE str;
VALUE            1514 string.c           VALUE indx;
VALUE            1543 string.c       	    VALUE tmp;
VALUE            1610 string.c       static VALUE
VALUE            1613 string.c           VALUE *argv;
VALUE            1614 string.c           VALUE str;
VALUE            1630 string.c           VALUE str;
VALUE            1632 string.c           VALUE val;
VALUE            1678 string.c           VALUE str;
VALUE            1680 string.c           VALUE val;
VALUE            1687 string.c           VALUE str, re;
VALUE            1689 string.c           VALUE val;
VALUE            1691 string.c           VALUE match;
VALUE            1718 string.c       static VALUE
VALUE            1720 string.c           VALUE str;
VALUE            1721 string.c           VALUE indx, val;
VALUE            1802 string.c       static VALUE
VALUE            1805 string.c           VALUE *argv;
VALUE            1806 string.c           VALUE str;
VALUE            1840 string.c       static VALUE
VALUE            1842 string.c           VALUE str, idx, str2;
VALUE            1878 string.c       static VALUE
VALUE            1881 string.c           VALUE *argv;
VALUE            1882 string.c           VALUE str;
VALUE            1884 string.c           VALUE result;
VALUE            1885 string.c           VALUE buf[3];
VALUE            1902 string.c       static VALUE
VALUE            1904 string.c           VALUE pat;
VALUE            1907 string.c           VALUE val;
VALUE            1942 string.c       static VALUE
VALUE            1945 string.c           VALUE *argv;
VALUE            1946 string.c           VALUE str;
VALUE            1948 string.c           VALUE pat, repl, match;
VALUE            2036 string.c       static VALUE
VALUE            2039 string.c           VALUE *argv;
VALUE            2040 string.c           VALUE str;
VALUE            2047 string.c       static VALUE
VALUE            2050 string.c           VALUE *argv;
VALUE            2051 string.c           VALUE str;
VALUE            2054 string.c           VALUE pat, val, repl, match, dest;
VALUE            2183 string.c       static VALUE
VALUE            2186 string.c           VALUE *argv;
VALUE            2187 string.c           VALUE str;
VALUE            2224 string.c       static VALUE
VALUE            2227 string.c           VALUE *argv;
VALUE            2228 string.c           VALUE str;
VALUE            2245 string.c       static VALUE
VALUE            2247 string.c           VALUE str, str2;
VALUE            2276 string.c       static VALUE
VALUE            2279 string.c           VALUE line;
VALUE            2297 string.c       static VALUE
VALUE            2300 string.c           VALUE *argv;
VALUE            2314 string.c       static VALUE
VALUE            2317 string.c           VALUE *argv;
VALUE            2319 string.c           VALUE str = rb_str_dup(uscore_get());
VALUE            2340 string.c       static VALUE
VALUE            2343 string.c           VALUE *argv;
VALUE            2361 string.c       static VALUE
VALUE            2364 string.c           VALUE *argv;
VALUE            2366 string.c           VALUE str = rb_str_dup(uscore_get());
VALUE            2382 string.c       static VALUE
VALUE            2384 string.c           VALUE str;
VALUE            2412 string.c       static VALUE
VALUE            2414 string.c           VALUE str;
VALUE            2416 string.c           VALUE obj;
VALUE            2447 string.c       static VALUE
VALUE            2449 string.c           VALUE str, arg;
VALUE            2488 string.c       static VALUE
VALUE            2491 string.c           VALUE *argv;
VALUE            2492 string.c           VALUE str;
VALUE            2494 string.c           VALUE b;
VALUE            2522 string.c       static VALUE
VALUE            2524 string.c           VALUE str;
VALUE            2538 string.c       static VALUE
VALUE            2540 string.c           VALUE str;
VALUE            2543 string.c       	VALUE dup = str_alloc(rb_cString);
VALUE            2562 string.c       VALUE
VALUE            2564 string.c           VALUE str;
VALUE            2567 string.c           VALUE result = rb_str_buf_new2("\"");
VALUE            2634 string.c       VALUE
VALUE            2636 string.c           VALUE str;
VALUE            2641 string.c           VALUE result;
VALUE            2738 string.c       static VALUE
VALUE            2740 string.c           VALUE str;
VALUE            2774 string.c       static VALUE
VALUE            2776 string.c           VALUE str;
VALUE            2792 string.c       static VALUE
VALUE            2794 string.c           VALUE str;
VALUE            2828 string.c       static VALUE
VALUE            2830 string.c           VALUE str;
VALUE            2851 string.c       static VALUE
VALUE            2853 string.c           VALUE str;
VALUE            2891 string.c       static VALUE
VALUE            2893 string.c           VALUE str;
VALUE            2909 string.c       static VALUE
VALUE            2911 string.c           VALUE str;
VALUE            2949 string.c       static VALUE
VALUE            2951 string.c           VALUE str;
VALUE            2999 string.c       static VALUE rb_str_delete_bang _((int,VALUE*,VALUE));
VALUE            3001 string.c       static VALUE
VALUE            3003 string.c           VALUE str, src, repl;
VALUE            3106 string.c       static VALUE
VALUE            3108 string.c           VALUE str, src, repl;
VALUE            3131 string.c       static VALUE
VALUE            3133 string.c           VALUE str, src, repl;
VALUE            3142 string.c           VALUE str;
VALUE            3183 string.c       static VALUE
VALUE            3186 string.c           VALUE *argv;
VALUE            3187 string.c           VALUE str;
VALUE            3199 string.c       	VALUE s = argv[i];
VALUE            3239 string.c       static VALUE
VALUE            3242 string.c           VALUE *argv;
VALUE            3243 string.c           VALUE str;
VALUE            3259 string.c       static VALUE
VALUE            3262 string.c           VALUE *argv;
VALUE            3263 string.c           VALUE str;
VALUE            3278 string.c       	    VALUE s = argv[i];
VALUE            3323 string.c       static VALUE
VALUE            3326 string.c           VALUE *argv;
VALUE            3327 string.c           VALUE str;
VALUE            3343 string.c       static VALUE
VALUE            3345 string.c           VALUE str, src, repl;
VALUE            3364 string.c       static VALUE
VALUE            3366 string.c           VALUE str, src, repl;
VALUE            3390 string.c       static VALUE
VALUE            3393 string.c           VALUE *argv;
VALUE            3394 string.c           VALUE str;
VALUE            3405 string.c       	VALUE s = argv[i];
VALUE            3466 string.c       static VALUE
VALUE            3469 string.c           VALUE *argv;
VALUE            3470 string.c           VALUE str;
VALUE            3472 string.c           VALUE spat;
VALUE            3473 string.c           VALUE limit;
VALUE            3477 string.c           VALUE result, tmp;
VALUE            3600 string.c       VALUE
VALUE            3602 string.c           VALUE str;
VALUE            3605 string.c           VALUE sep;
VALUE            3620 string.c       static VALUE
VALUE            3623 string.c           VALUE *argv;
VALUE            3661 string.c       static VALUE
VALUE            3664 string.c           VALUE *argv;
VALUE            3665 string.c           VALUE str;
VALUE            3667 string.c           VALUE rs;
VALUE            3672 string.c           VALUE line;
VALUE            3731 string.c       static VALUE
VALUE            3733 string.c           VALUE str;
VALUE            3753 string.c       static VALUE
VALUE            3755 string.c           VALUE str;
VALUE            3790 string.c       static VALUE
VALUE            3792 string.c           VALUE str;
VALUE            3817 string.c       static VALUE
VALUE            3819 string.c           VALUE str;
VALUE            3842 string.c       static VALUE
VALUE            3845 string.c           VALUE str = uscore_get();
VALUE            3864 string.c       static VALUE
VALUE            3867 string.c           VALUE *argv;
VALUE            3868 string.c           VALUE str;
VALUE            3870 string.c           VALUE rs;
VALUE            3956 string.c       static VALUE
VALUE            3959 string.c           VALUE *argv;
VALUE            3960 string.c           VALUE str;
VALUE            3982 string.c       static VALUE
VALUE            3985 string.c           VALUE *argv;
VALUE            4007 string.c       static VALUE
VALUE            4010 string.c           VALUE *argv;
VALUE            4012 string.c           VALUE str = uscore_get();
VALUE            4013 string.c           VALUE dup = rb_str_dup(str);
VALUE            4034 string.c       static VALUE
VALUE            4036 string.c           VALUE str;
VALUE            4068 string.c       static VALUE
VALUE            4070 string.c           VALUE str;
VALUE            4090 string.c       static VALUE
VALUE            4092 string.c           VALUE str;
VALUE            4127 string.c       static VALUE
VALUE            4129 string.c           VALUE str;
VALUE            4145 string.c       static VALUE
VALUE            4147 string.c           VALUE str;
VALUE            4149 string.c           VALUE l = rb_str_lstrip_bang(str);
VALUE            4150 string.c           VALUE r = rb_str_rstrip_bang(str);
VALUE            4167 string.c       static VALUE
VALUE            4169 string.c           VALUE str;
VALUE            4176 string.c       static VALUE
VALUE            4178 string.c           VALUE str, pat;
VALUE            4181 string.c           VALUE result, match;
VALUE            4245 string.c       static VALUE
VALUE            4247 string.c           VALUE str, pat;
VALUE            4249 string.c           VALUE result;
VALUE            4251 string.c           VALUE match = Qnil;
VALUE            4255 string.c       	VALUE ary = rb_ary_new();
VALUE            4284 string.c       static VALUE
VALUE            4286 string.c           VALUE self, pat;
VALUE            4306 string.c       static VALUE
VALUE            4308 string.c           VALUE str;
VALUE            4328 string.c       static VALUE
VALUE            4330 string.c           VALUE str;
VALUE            4346 string.c       static VALUE
VALUE            4348 string.c           VALUE str, salt;
VALUE            4351 string.c           VALUE result;
VALUE            4387 string.c       VALUE
VALUE            4389 string.c           VALUE s;
VALUE            4391 string.c           volatile VALUE str = s;
VALUE            4415 string.c       static VALUE
VALUE            4418 string.c           VALUE *argv;
VALUE            4419 string.c           VALUE str;
VALUE            4421 string.c           VALUE vbits;
VALUE            4435 string.c       	VALUE sum = INT2FIX(0);
VALUE            4443 string.c       	    VALUE mod;
VALUE            4466 string.c       static VALUE
VALUE            4469 string.c           VALUE *argv;
VALUE            4470 string.c           VALUE str;
VALUE            4473 string.c           VALUE w;
VALUE            4475 string.c           VALUE res;
VALUE            4478 string.c           VALUE pad;
VALUE            4549 string.c       static VALUE
VALUE            4552 string.c           VALUE *argv;
VALUE            4553 string.c           VALUE str;
VALUE            4572 string.c       static VALUE
VALUE            4575 string.c           VALUE *argv;
VALUE            4576 string.c           VALUE str;
VALUE            4595 string.c       static VALUE
VALUE            4598 string.c           VALUE *argv;
VALUE            4599 string.c           VALUE str;
VALUE            4606 string.c           VALUE val;
VALUE            4608 string.c           VALUE *var;
VALUE              16 struct.c       VALUE rb_cStruct;
VALUE              18 struct.c       static VALUE struct_alloc _((VALUE));
VALUE              20 struct.c       VALUE
VALUE              22 struct.c           VALUE c;
VALUE              37 struct.c       VALUE
VALUE              39 struct.c           VALUE klass;
VALUE              41 struct.c           VALUE members = rb_struct_iv_get(klass, "__members__");
VALUE              49 struct.c       VALUE
VALUE              51 struct.c           VALUE s;
VALUE              53 struct.c           VALUE members = rb_struct_s_members(rb_obj_class(s));
VALUE              62 struct.c       static VALUE
VALUE              64 struct.c           VALUE klass;
VALUE              66 struct.c           VALUE members, ary;
VALUE              67 struct.c           VALUE *p, *pend;
VALUE              92 struct.c       static VALUE
VALUE              94 struct.c           VALUE obj;
VALUE              99 struct.c       VALUE
VALUE             101 struct.c           VALUE obj;
VALUE             104 struct.c           VALUE members, slot;
VALUE             118 struct.c       static VALUE
VALUE             120 struct.c           VALUE obj;
VALUE             125 struct.c       static VALUE rb_struct_ref0(obj) VALUE obj; {return RSTRUCT(obj)->ptr[0];}
VALUE             126 struct.c       static VALUE rb_struct_ref1(obj) VALUE obj; {return RSTRUCT(obj)->ptr[1];}
VALUE             127 struct.c       static VALUE rb_struct_ref2(obj) VALUE obj; {return RSTRUCT(obj)->ptr[2];}
VALUE             128 struct.c       static VALUE rb_struct_ref3(obj) VALUE obj; {return RSTRUCT(obj)->ptr[3];}
VALUE             129 struct.c       static VALUE rb_struct_ref4(obj) VALUE obj; {return RSTRUCT(obj)->ptr[4];}
VALUE             130 struct.c       static VALUE rb_struct_ref5(obj) VALUE obj; {return RSTRUCT(obj)->ptr[5];}
VALUE             131 struct.c       static VALUE rb_struct_ref6(obj) VALUE obj; {return RSTRUCT(obj)->ptr[6];}
VALUE             132 struct.c       static VALUE rb_struct_ref7(obj) VALUE obj; {return RSTRUCT(obj)->ptr[7];}
VALUE             133 struct.c       static VALUE rb_struct_ref8(obj) VALUE obj; {return RSTRUCT(obj)->ptr[8];}
VALUE             134 struct.c       static VALUE rb_struct_ref9(obj) VALUE obj; {return RSTRUCT(obj)->ptr[9];}
VALUE             136 struct.c       static VALUE (*ref_func[10])() = {
VALUE             151 struct.c           VALUE s;
VALUE             158 struct.c       static VALUE
VALUE             160 struct.c           VALUE obj, val;
VALUE             162 struct.c           VALUE members, slot;
VALUE             180 struct.c       static VALUE
VALUE             182 struct.c           VALUE name, members, klass;
VALUE             184 struct.c           VALUE nstr;
VALUE             237 struct.c       VALUE
VALUE             247 struct.c           VALUE nm, ary;
VALUE             298 struct.c       static VALUE
VALUE             301 struct.c           VALUE *argv;
VALUE             302 struct.c           VALUE klass;
VALUE             304 struct.c           VALUE name, rest;
VALUE             306 struct.c           VALUE st;
VALUE             315 struct.c       	VALUE tmp = rb_check_string_type(name);
VALUE             334 struct.c       static VALUE
VALUE             336 struct.c           VALUE self, values;
VALUE             338 struct.c           VALUE klass = rb_obj_class(self);
VALUE             339 struct.c           VALUE size;
VALUE             348 struct.c           MEMCPY(RSTRUCT(self)->ptr, RARRAY(values)->ptr, VALUE, RARRAY(values)->len);
VALUE             356 struct.c       static VALUE
VALUE             358 struct.c           VALUE klass;
VALUE             360 struct.c           VALUE size;
VALUE             368 struct.c           st->ptr = ALLOC_N(VALUE, n);
VALUE             372 struct.c           return (VALUE)st;
VALUE             375 struct.c       VALUE
VALUE             377 struct.c           VALUE klass, values;
VALUE             382 struct.c       VALUE
VALUE             384 struct.c       rb_struct_new(VALUE klass, ...)
VALUE             387 struct.c           VALUE klass;
VALUE             391 struct.c           VALUE sz, *mem;
VALUE             397 struct.c           mem = ALLOCA_N(VALUE, size);
VALUE             400 struct.c       	mem[i] = va_arg(args, VALUE);
VALUE             425 struct.c       static VALUE
VALUE             427 struct.c           VALUE s;
VALUE             455 struct.c       static VALUE
VALUE             457 struct.c           VALUE s;
VALUE             459 struct.c           VALUE members;
VALUE             469 struct.c       static VALUE
VALUE             471 struct.c           VALUE s;
VALUE             474 struct.c           VALUE str, members;
VALUE             482 struct.c       	VALUE slot;
VALUE             515 struct.c       static VALUE
VALUE             517 struct.c           VALUE s;
VALUE             522 struct.c       	VALUE str = rb_str_new(0, len);
VALUE             543 struct.c       static VALUE
VALUE             545 struct.c           VALUE s;
VALUE             551 struct.c       static VALUE
VALUE             553 struct.c           VALUE copy, s;
VALUE             560 struct.c           RSTRUCT(copy)->ptr = ALLOC_N(VALUE, RSTRUCT(s)->len);
VALUE             562 struct.c           MEMCPY(RSTRUCT(copy)->ptr, RSTRUCT(s)->ptr, VALUE, RSTRUCT(copy)->len);
VALUE             567 struct.c       static VALUE
VALUE             569 struct.c           VALUE s;
VALUE             572 struct.c           VALUE members;
VALUE             605 struct.c       VALUE
VALUE             607 struct.c           VALUE s, idx;
VALUE             626 struct.c       static VALUE
VALUE             628 struct.c           VALUE s, val;
VALUE             631 struct.c           VALUE members;
VALUE             671 struct.c       VALUE
VALUE             673 struct.c           VALUE s, idx, val;
VALUE             695 struct.c       static VALUE struct_entry _((VALUE, long));
VALUE             696 struct.c       static VALUE
VALUE             698 struct.c           VALUE s;
VALUE             720 struct.c       static VALUE
VALUE             723 struct.c           VALUE *argv;
VALUE             724 struct.c           VALUE s;
VALUE             749 struct.c       static VALUE
VALUE             752 struct.c           VALUE *argv;
VALUE             753 struct.c           VALUE s;
VALUE             755 struct.c           VALUE result;
VALUE             788 struct.c       static VALUE
VALUE             790 struct.c           VALUE s, s2;
VALUE             814 struct.c       static VALUE
VALUE             816 struct.c           VALUE s;
VALUE             819 struct.c           VALUE n;
VALUE             838 struct.c       static VALUE
VALUE             840 struct.c           VALUE s, s2;
VALUE             869 struct.c       static VALUE
VALUE             871 struct.c           VALUE s;
VALUE              23 time.c         VALUE rb_cTime;
VALUE              44 time.c         static VALUE time_s_alloc _((VALUE));
VALUE              45 time.c         static VALUE
VALUE              47 time.c             VALUE klass;
VALUE              49 time.c             VALUE obj;
VALUE              62 time.c             VALUE time;
VALUE              91 time.c         static VALUE
VALUE              93 time.c             VALUE time;
VALUE             142 time.c         static VALUE
VALUE             144 time.c             VALUE klass;
VALUE             147 time.c             VALUE time = time_s_alloc(klass);
VALUE             158 time.c         VALUE
VALUE             167 time.c             VALUE time;
VALUE             217 time.c             VALUE time;
VALUE             224 time.c             VALUE time;
VALUE             252 time.c         static VALUE
VALUE             255 time.c             VALUE *argv;
VALUE             256 time.c             VALUE klass;
VALUE             259 time.c             VALUE time, t;
VALUE             286 time.c             VALUE obj;
VALUE             298 time.c             VALUE *argv;
VALUE             302 time.c             VALUE v[8];
VALUE             345 time.c         	VALUE s = rb_check_string_type(v[1]);
VALUE             399 time.c         static VALUE time_gmtime _((VALUE));
VALUE             400 time.c         static VALUE time_localtime _((VALUE));
VALUE             401 time.c         static VALUE time_get_tm _((VALUE, int));
VALUE             787 time.c         static VALUE
VALUE             790 time.c             VALUE *argv;
VALUE             792 time.c             VALUE klass;
VALUE             795 time.c             VALUE time;
VALUE             825 time.c         static VALUE
VALUE             828 time.c             VALUE *argv;
VALUE             829 time.c             VALUE klass;
VALUE             847 time.c         static VALUE
VALUE             850 time.c             VALUE *argv;
VALUE             851 time.c             VALUE klass;
VALUE             869 time.c         static VALUE
VALUE             871 time.c             VALUE time;
VALUE             891 time.c         static VALUE
VALUE             893 time.c             VALUE time;
VALUE             913 time.c         static VALUE
VALUE             915 time.c             VALUE time;
VALUE             939 time.c         static VALUE
VALUE             941 time.c             VALUE time1, time2;
VALUE             969 time.c         static VALUE
VALUE             971 time.c             VALUE time1, time2;
VALUE            1004 time.c         static VALUE
VALUE            1006 time.c             VALUE time;
VALUE            1022 time.c         static VALUE
VALUE            1024 time.c             VALUE time;
VALUE            1035 time.c         static VALUE
VALUE            1037 time.c             VALUE copy, time;
VALUE            1053 time.c         static VALUE
VALUE            1055 time.c             VALUE time;
VALUE            1057 time.c             VALUE dup = time_s_alloc(rb_cTime);
VALUE            1075 time.c         static VALUE
VALUE            1077 time.c             VALUE time;
VALUE            1119 time.c         static VALUE
VALUE            1121 time.c             VALUE time;
VALUE            1159 time.c         static VALUE
VALUE            1161 time.c             VALUE time;
VALUE            1181 time.c         static VALUE
VALUE            1183 time.c             VALUE time;
VALUE            1188 time.c         static VALUE
VALUE            1190 time.c             VALUE time;
VALUE            1207 time.c         static VALUE
VALUE            1209 time.c             VALUE time;
VALUE            1237 time.c         static VALUE
VALUE            1239 time.c             VALUE time;
VALUE            1268 time.c         static VALUE
VALUE            1271 time.c             VALUE offset;
VALUE            1278 time.c             VALUE result;
VALUE            1322 time.c         static VALUE
VALUE            1324 time.c             VALUE time1, time2;
VALUE            1350 time.c         static VALUE
VALUE            1352 time.c             VALUE time1, time2;
VALUE            1378 time.c         static VALUE
VALUE            1380 time.c             VALUE time;
VALUE            1401 time.c         static VALUE
VALUE            1403 time.c             VALUE time;
VALUE            1424 time.c         static VALUE
VALUE            1426 time.c             VALUE time;
VALUE            1447 time.c         static VALUE
VALUE            1449 time.c             VALUE time;
VALUE            1472 time.c         static VALUE
VALUE            1474 time.c             VALUE time;
VALUE            1497 time.c         static VALUE
VALUE            1499 time.c             VALUE time;
VALUE            1520 time.c         static VALUE
VALUE            1522 time.c             VALUE time;
VALUE            1544 time.c         static VALUE
VALUE            1546 time.c             VALUE time;
VALUE            1567 time.c         static VALUE
VALUE            1569 time.c             VALUE time;
VALUE            1594 time.c         static VALUE
VALUE            1596 time.c             VALUE time;
VALUE            1620 time.c         static VALUE
VALUE            1622 time.c             VALUE time;
VALUE            1663 time.c         static VALUE
VALUE            1665 time.c             VALUE time;
VALUE            1720 time.c         static VALUE
VALUE            1722 time.c             VALUE time;
VALUE            1817 time.c         static VALUE
VALUE            1819 time.c             VALUE time, format;
VALUE            1825 time.c             VALUE str;
VALUE            1871 time.c         static VALUE
VALUE            1873 time.c             VALUE obj;
VALUE            1883 time.c         static VALUE
VALUE            1885 time.c             VALUE time;
VALUE            1930 time.c         static VALUE
VALUE            1933 time.c             VALUE *argv;
VALUE            1934 time.c             VALUE time;
VALUE            1936 time.c             VALUE str;
VALUE            1952 time.c         static VALUE
VALUE            1954 time.c             VALUE time, str;
VALUE            2011 time.c         static VALUE
VALUE            2013 time.c             VALUE klass, str;
VALUE            2015 time.c             VALUE time = time_s_alloc(klass);
VALUE             159 util.c             VALUE str;
VALUE             318 util.c         push_element(const char *path, VALUE vinfo)
VALUE             359 util.c             rb_globi(buf, push_element, (VALUE)&info);
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              48 variable.c         VALUE path, tmp;
VALUE              73 variable.c         VALUE value;
VALUE             115 variable.c     static VALUE
VALUE             117 variable.c         VALUE klass;
VALUE             143 variable.c     static VALUE
VALUE             145 variable.c         VALUE klass;
VALUE             147 variable.c         VALUE path = Qnil;
VALUE             176 variable.c     VALUE
VALUE             178 variable.c         VALUE mod;
VALUE             180 variable.c         VALUE path = classname(mod);
VALUE             186 variable.c     VALUE
VALUE             188 variable.c         VALUE klass;
VALUE             190 variable.c         VALUE path = classname(klass);
VALUE             221 variable.c         VALUE klass, under;
VALUE             224 variable.c         VALUE str;
VALUE             237 variable.c     VALUE
VALUE             243 variable.c         VALUE c = rb_cObject;
VALUE             250 variable.c     	VALUE str;
VALUE             279 variable.c         VALUE klass;
VALUE             285 variable.c     VALUE
VALUE             287 variable.c         VALUE klass;
VALUE             294 variable.c         VALUE klass;
VALUE             301 variable.c         VALUE obj;
VALUE             309 variable.c         VALUE data;
VALUE             316 variable.c         VALUE (*getter)();
VALUE             328 variable.c     static VALUE undef_getter();
VALUE             332 variable.c     static VALUE val_getter();
VALUE             336 variable.c     static VALUE var_getter();
VALUE             365 variable.c     static VALUE
VALUE             376 variable.c         VALUE val;
VALUE             393 variable.c     static VALUE
VALUE             396 variable.c         VALUE val;
VALUE             403 variable.c         VALUE val;
VALUE             413 variable.c         VALUE data;
VALUE             418 variable.c     static VALUE
VALUE             421 variable.c         VALUE *var;
VALUE             429 variable.c         VALUE val;
VALUE             431 variable.c         VALUE *var;
VALUE             438 variable.c         VALUE *var;
VALUE             445 variable.c         VALUE val;
VALUE             496 variable.c         VALUE *var;
VALUE             497 variable.c         VALUE (*getter)();
VALUE             513 variable.c         VALUE *var;
VALUE             521 variable.c         VALUE *var;
VALUE             529 variable.c         VALUE (*getter)();
VALUE             539 variable.c         VALUE cmd, val;
VALUE             567 variable.c     VALUE
VALUE             570 variable.c         VALUE *argv;
VALUE             572 variable.c         VALUE var, cmd;
VALUE             630 variable.c     VALUE
VALUE             633 variable.c         VALUE *argv;
VALUE             635 variable.c         VALUE var, cmd;
VALUE             648 variable.c     	VALUE ary = rb_ary_new();
VALUE             652 variable.c     	    rb_ary_push(ary, (VALUE)trace->data);
VALUE             673 variable.c     VALUE
VALUE             683 variable.c         VALUE val;
VALUE             686 variable.c     static VALUE
VALUE             699 variable.c     static VALUE
VALUE             708 variable.c     VALUE
VALUE             711 variable.c         VALUE val;
VALUE             724 variable.c     	rb_ensure(trace_ev, (VALUE)&trace, trace_en, (VALUE)var);
VALUE             729 variable.c     VALUE
VALUE             732 variable.c         VALUE val;
VALUE             740 variable.c     VALUE
VALUE             750 variable.c     VALUE
VALUE             762 variable.c         VALUE ary;
VALUE             777 variable.c     VALUE
VALUE             780 variable.c         VALUE ary = rb_ary_new();
VALUE             838 variable.c         VALUE obj;
VALUE             848 variable.c     static VALUE
VALUE             850 variable.c         VALUE obj;
VALUE             855 variable.c         VALUE val;
VALUE             872 variable.c         VALUE obj;
VALUE             874 variable.c         VALUE val;
VALUE             895 variable.c     static VALUE
VALUE             897 variable.c         VALUE obj;
VALUE             901 variable.c         VALUE val;
VALUE             913 variable.c         VALUE obj;
VALUE             915 variable.c         VALUE *valp;
VALUE             932 variable.c         VALUE obj;
VALUE             945 variable.c         VALUE value;
VALUE             953 variable.c         VALUE obj;
VALUE             972 variable.c         VALUE obj;
VALUE             982 variable.c         VALUE clone, obj;
VALUE            1000 variable.c     static VALUE
VALUE            1002 variable.c         VALUE obj;
VALUE            1006 variable.c         VALUE val;
VALUE            1026 variable.c     VALUE
VALUE            1028 variable.c         VALUE obj;
VALUE            1034 variable.c     VALUE
VALUE            1036 variable.c         VALUE obj;
VALUE            1042 variable.c     VALUE
VALUE            1044 variable.c         VALUE obj;
VALUE            1046 variable.c         VALUE val;
VALUE            1065 variable.c     VALUE
VALUE            1067 variable.c         VALUE obj;
VALUE            1089 variable.c         VALUE ary;
VALUE            1114 variable.c     VALUE
VALUE            1116 variable.c         VALUE obj;
VALUE            1118 variable.c         VALUE ary;
VALUE            1165 variable.c     VALUE
VALUE            1167 variable.c         VALUE obj, name;
VALUE            1169 variable.c         VALUE val = Qnil;
VALUE            1199 variable.c     NORETURN(static void uninitialized_constant _((VALUE, ID)));
VALUE            1202 variable.c         VALUE klass;
VALUE            1214 variable.c     static VALUE
VALUE            1216 variable.c         VALUE klass;
VALUE            1251 variable.c     VALUE
VALUE            1253 variable.c         VALUE klass, name;
VALUE            1262 variable.c         VALUE av;
VALUE            1274 variable.c         VALUE mod;
VALUE            1278 variable.c         VALUE av, fn;
VALUE            1309 variable.c         VALUE mod;
VALUE            1312 variable.c         VALUE val;
VALUE            1334 variable.c     VALUE
VALUE            1336 variable.c         VALUE klass;
VALUE            1339 variable.c         VALUE file;
VALUE            1348 variable.c     static VALUE
VALUE            1350 variable.c         VALUE mod;
VALUE            1353 variable.c         VALUE val, file;
VALUE            1383 variable.c     VALUE
VALUE            1385 variable.c         VALUE mod;
VALUE            1389 variable.c         VALUE val;
VALUE            1397 variable.c     static VALUE
VALUE            1399 variable.c         VALUE klass;
VALUE            1403 variable.c         VALUE value, tmp;
VALUE            1432 variable.c     VALUE
VALUE            1434 variable.c         VALUE klass;
VALUE            1440 variable.c     VALUE
VALUE            1442 variable.c         VALUE klass;
VALUE            1448 variable.c     VALUE
VALUE            1450 variable.c         VALUE klass;
VALUE            1465 variable.c     VALUE
VALUE            1467 variable.c         VALUE mod, name;
VALUE            1470 variable.c         VALUE val;
VALUE            1498 variable.c         VALUE value;
VALUE            1511 variable.c         VALUE mod;
VALUE            1526 variable.c         VALUE mod;
VALUE            1529 variable.c         VALUE tmp = mod;
VALUE            1542 variable.c         VALUE ary;
VALUE            1548 variable.c     VALUE
VALUE            1553 variable.c         VALUE ary;
VALUE            1572 variable.c     VALUE
VALUE            1574 variable.c         VALUE mod;
VALUE            1581 variable.c         VALUE klass;
VALUE            1585 variable.c         VALUE value, tmp;
VALUE            1609 variable.c         VALUE klass;
VALUE            1617 variable.c         VALUE klass;
VALUE            1625 variable.c         VALUE klass;
VALUE            1633 variable.c         VALUE klass;
VALUE            1635 variable.c         VALUE val;
VALUE            1654 variable.c     	VALUE value = Qfalse;
VALUE            1669 variable.c         VALUE klass;
VALUE            1671 variable.c         VALUE val;
VALUE            1678 variable.c         VALUE klass;
VALUE            1680 variable.c         VALUE val;
VALUE            1696 variable.c         VALUE val;
VALUE            1701 variable.c     static VALUE
VALUE            1703 variable.c         VALUE c;
VALUE            1713 variable.c         VALUE a;
VALUE            1715 variable.c         VALUE base = original_module(a);
VALUE            1732 variable.c         VALUE klass;
VALUE            1734 variable.c         VALUE val;
VALUE            1737 variable.c         VALUE tmp;
VALUE            1760 variable.c     VALUE
VALUE            1762 variable.c         VALUE klass;
VALUE            1765 variable.c         VALUE value;
VALUE            1766 variable.c         VALUE tmp;
VALUE            1786 variable.c     VALUE
VALUE            1788 variable.c         VALUE klass;
VALUE            1791 variable.c         VALUE tmp;
VALUE            1806 variable.c         VALUE klass;
VALUE            1808 variable.c         VALUE val;
VALUE            1817 variable.c     VALUE
VALUE            1819 variable.c         VALUE klass;
VALUE            1831 variable.c         VALUE klass;
VALUE            1833 variable.c         VALUE val;
VALUE            1846 variable.c         VALUE value;
VALUE            1847 variable.c         VALUE ary;
VALUE            1850 variable.c     	VALUE kval = rb_str_new2(rb_id2name(key));
VALUE            1875 variable.c     VALUE
VALUE            1877 variable.c         VALUE obj;
VALUE            1879 variable.c         VALUE ary = rb_ary_new();
VALUE            1911 variable.c     VALUE
VALUE            1913 variable.c         VALUE mod, name;
VALUE            1916 variable.c         VALUE val;
VALUE            1937 variable.c     VALUE
VALUE            1939 variable.c         VALUE obj;
VALUE            1947 variable.c     VALUE
VALUE            1949 variable.c         VALUE obj;
VALUE            1951 variable.c         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             256 win32/win32.c  static VALUE
VALUE             257 win32/win32.c  flock_winnt(VALUE self, int argc, VALUE* argv)
VALUE             293 win32/win32.c  static VALUE
VALUE             294 win32/win32.c  flock_win95(VALUE self, int argc, VALUE* argv)
VALUE             340 win32/win32.c  			      (VALUE)_get_osfhandle(fd), oper, NULL,
VALUE             716 win32/win32.c  extern VALUE rb_last_status;
VALUE            1015 win32/win32.c  insert(const char *path, VALUE vinfo)
VALUE            1054 win32/win32.c      ruby_globi(buf, 0, insert, (VALUE)&tail);
VALUE            3077 win32/win32.c      RUBY_CRITICAL(rb_protect((VALUE (*)(VALUE))h->handler, (VALUE)h->arg, &h->status);
VALUE            3246 win32/win32.c      VALUE (*func)(VALUE self, int argc, VALUE* argv);
VALUE            3247 win32/win32.c      VALUE self;
VALUE            3249 win32/win32.c      VALUE* argv;
VALUE            3263 win32/win32.c  VALUE
VALUE            3264 win32/win32.c  rb_w32_asynchronize(asynchronous_func_t func, VALUE self,
VALUE            3265 win32/win32.c  		    int argc, VALUE* argv, VALUE intrval)


VALUE2ICONV

VALUE2ICONV       199 ext/iconv/iconv.c     iconv_close(VALUE2ICONV(cd));
VALUE2ICONV       213 ext/iconv/iconv.c     if (cd && iconv_close(VALUE2ICONV(cd)) == -1)
VALUE2ICONV       697 ext/iconv/iconv.c     return iconv_convert(VALUE2ICONV(cd), Qnil, 0, 0, NULL);
VALUE2ICONV       761 ext/iconv/iconv.c     return iconv_convert(VALUE2ICONV(cd), str,


VISI

VISI              523 class.c        #define VISI_CHECK(x,f) (VISI(x) == (f))
VISI              596 class.c        	else type = VISI(body->nd_noex);


VISI_CHECK

VISI_CHECK       4225 eval.c         	if (VISI_CHECK(noex, NOEX_PUBLIC))
VISI_CHECK       4265 eval.c         	if (VISI_CHECK(noex, NOEX_PRIVATE))
VISI_CHECK       4305 eval.c         	if (VISI_CHECK(noex, NOEX_PROTECTED))


VMS_RUBY_STREAM

VMS_RUBY_STREAM     3 vms/config.h   #ifndef VMS_RUBY_STREAM
VMS_RUBY_STREAM    70 vms/config.h   #define RUBY_SITE_ARCHLIB "/RUBY_LIBROOT/site_ruby/" VMS_RUBY_STREAM "/" RUBY_PLATFORM
VMS_RUBY_STREAM    72 vms/config.h   #define RUBY_LIB          "/RUBY_LIBROOT/" VMS_RUBY_STREAM
VMS_RUBY_STREAM    73 vms/config.h   #define RUBY_ARCHLIB      "/RUBY_LIBROOT/" VMS_RUBY_STREAM "/" RUBY_PLATFORM


VOIDP_ALIGN

VOIDP_ALIGN       212 ext/dl/dl.c          DLALIGN(0,size,VOIDP_ALIGN);
VOIDP_ALIGN       766 ext/dl/ptr.c   	  DLALIGN(data->ptr,offset,VOIDP_ALIGN);
VOIDP_ALIGN       896 ext/dl/ptr.c   	  DLALIGN(data->ptr,offset,VOIDP_ALIGN);


VOIDP_DLTYPE

VOIDP_DLTYPE      105 ext/dl/dl.h    # define PUSH_P(x) PUSH_ARG(x,VOIDP_DLTYPE)
VOIDP_DLTYPE      142 ext/dl/dl.h    # define CBPUSH_P(x) PUSH_ARG(x,VOIDP_DLTYPE)


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            831 ext/win32ole/win32ole.c         V_BOOL(var) = VARIANT_TRUE;
V_BOOL            835 ext/win32ole/win32ole.c         V_BOOL(var) = VARIANT_FALSE;
V_BOOL           1035 ext/win32ole/win32ole.c             obj = (V_BOOL(pvar) ? Qtrue : Qfalse);


V_UNION1

V_UNION1         1304 ext/win32ole/win32ole.c                 val = ole_variant2val(V_UNION1(pVarDesc, lpvarValue));
V_UNION1         3055 ext/win32ole/win32ole.c                                            V_UNION1(pTypeDesc, hreftype),
V_UNION1         3081 ext/win32ole/win32ole.c         p = V_UNION1(p, lptdesc);
V_UNION1         4115 ext/win32ole/win32ole.c         val = ole_variant2val(V_UNION1(pVarDesc, lpvarValue));
V_UNION1         5171 ext/win32ole/win32ole.c     if (V_UNION1((&(pFuncDesc->lprgelemdescParam[index])), paramdesc).wParamFlags &mask)
V_UNION1         5280 ext/win32ole/win32ole.c     wParamFlags = V_UNION1(pElemDesc, paramdesc).wParamFlags;
V_UNION1         5282 ext/win32ole/win32ole.c          pParamDescEx = V_UNION1(pElemDesc, paramdesc).pparamdescex;


V_VT

V_VT              745 ext/win32ole/win32ole.c         V_VT(var) = VT_DISPATCH;
V_VT              750 ext/win32ole/win32ole.c         V_VT(var) = VT_DATE;
V_VT              806 ext/win32ole/win32ole.c             V_VT(var) = VT_VARIANT | VT_ARRAY;
V_VT              814 ext/win32ole/win32ole.c         V_VT(var) = VT_BSTR;
V_VT              818 ext/win32ole/win32ole.c         V_VT(var) = VT_I4;
V_VT              822 ext/win32ole/win32ole.c         V_VT(var) = VT_R8;
V_VT              826 ext/win32ole/win32ole.c         V_VT(var) = VT_R8;
V_VT              830 ext/win32ole/win32ole.c         V_VT(var) = VT_BOOL;
V_VT              834 ext/win32ole/win32ole.c         V_VT(var) = VT_BOOL;
V_VT              839 ext/win32ole/win32ole.c             V_VT(var) = VT_ERROR;
V_VT              842 ext/win32ole/win32ole.c             V_VT(var) = VT_EMPTY;
V_VT              846 ext/win32ole/win32ole.c         V_VT(var) = VT_DISPATCH;
V_VT              908 ext/win32ole/win32ole.c     while ( V_VT(pvar) == (VT_BYREF | VT_VARIANT) )
V_VT              921 ext/win32ole/win32ole.c         V_VT(&variant) = (V_VT(pvar) & ~VT_ARRAY) | VT_BYREF;
V_VT              972 ext/win32ole/win32ole.c     switch(V_VT(pvar) & ~VT_BYREF){
V_VT             1096 ext/win32ole/win32ole.c         if (SUCCEEDED(hr) && V_VT(&variant) == VT_BSTR) {
V_VT             2072 ext/win32ole/win32ole.c             V_VT(&op.dp.rgvarg[n]) = VT_VARIANT | VT_BYREF;
V_VT             2224 ext/win32ole/win32ole.c         V_VT(&dispParams.rgvarg[i]) = vt;
V_VT             2229 ext/win32ole/win32ole.c             V_VT(&dispParams.rgvarg[i]) = V_VT(&realargs[i]) = VT_ERROR;
V_VT             2249 ext/win32ole/win32ole.c                 V_VT(&realargs[i]) = VT_ARRAY | v;
V_VT             2314 ext/win32ole/win32ole.c                     V_VT(&dispParams.rgvarg[i]) = VT_VARIANT | VT_BYREF;
V_VT             2636 ext/win32ole/win32ole.c     if (V_VT(&result) == VT_UNKNOWN)
V_VT             2640 ext/win32ole/win32ole.c     else if (V_VT(&result) == VT_DISPATCH)
V_VT             5470 ext/win32ole/win32ole.c         if (V_VT(var) == (VT_BSTR | VT_BYREF)) {
V_VT             5475 ext/win32ole/win32ole.c         switch(V_VT(var)) {
V_VT             5496 ext/win32ole/win32ole.c         switch(V_VT(var)) {
V_VT             5514 ext/win32ole/win32ole.c         if (V_VT(var) == (VT_R8 | VT_BYREF)) {
V_VT             5519 ext/win32ole/win32ole.c         if (V_VT(var) == (VT_BOOL | VT_BYREF)) {
V_VT             5524 ext/win32ole/win32ole.c         if (V_VT(var) == (VT_BOOL | VT_BYREF)) {


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          10272 eval.c         	if (((th->wait_for & WAIT_FD) && fd == th->fd) ||
WAIT_FD          10433 eval.c         	if (th->wait_for & WAIT_FD) {
WAIT_FD          10532 eval.c         		if ((th->wait_for&WAIT_FD) && FD_ISSET(th->fd, &readfds)) {
WAIT_FD          10585 eval.c         	    if (th->wait_for & WAIT_FD) warn_printf("F(%d)", th->fd);
WAIT_FD          10639 eval.c             curr_thread->wait_for = WAIT_FD;


WAIT_IN_PROGRESS

WAIT_IN_PROGRESS  924 ext/socket/socket.c #ifndef WAIT_IN_PROGRESS
WAIT_IN_PROGRESS  938 ext/socket/socket.c #if WAIT_IN_PROGRESS > 0
WAIT_IN_PROGRESS  981 ext/socket/socket.c #if WAIT_IN_PROGRESS > 0
WAIT_IN_PROGRESS  994 ext/socket/socket.c #if WAIT_IN_PROGRESS > 0
WAIT_IN_PROGRESS  995 ext/socket/socket.c 		wait_in_progress = WAIT_IN_PROGRESS;
WAIT_IN_PROGRESS 1004 ext/socket/socket.c #if WAIT_IN_PROGRESS > 0


WAIT_JOIN

WAIT_JOIN        10427 eval.c         	if (th->wait_for & WAIT_JOIN) {
WAIT_JOIN        10588 eval.c         	    if (th->wait_for & WAIT_JOIN)
WAIT_JOIN        10828 eval.c         	if ((th->wait_for & WAIT_JOIN) && th->join == curr_thread)
WAIT_JOIN        10836 eval.c         	curr_thread->wait_for = WAIT_JOIN;


WAIT_SELECT

WAIT_SELECT      10273 eval.c         	    ((th->wait_for & WAIT_SELECT) && (fd < th->fd) &&
WAIT_SELECT      10438 eval.c         	if (th->wait_for & WAIT_SELECT) {
WAIT_SELECT      10497 eval.c         		if (th->wait_for & WAIT_SELECT) {
WAIT_SELECT      10514 eval.c          		if (((th->wait_for&(WAIT_SELECT|WAIT_TIME)) == (WAIT_SELECT|WAIT_TIME)) &&
WAIT_SELECT      10540 eval.c         		if ((th->wait_for&WAIT_SELECT) &&
WAIT_SELECT      10586 eval.c         	    if (th->wait_for & WAIT_SELECT) warn_printf("S");
WAIT_SELECT      10657 eval.c             curr_thread->wait_for = WAIT_SELECT;
WAIT_SELECT      10801 eval.c             curr_thread->wait_for = WAIT_SELECT;


WAIT_TIME

WAIT_TIME        10444 eval.c         	    if (th->wait_for & WAIT_TIME) {
WAIT_TIME        10449 eval.c         	if (th->wait_for & WAIT_TIME) {
WAIT_TIME        10514 eval.c          		if (((th->wait_for&(WAIT_SELECT|WAIT_TIME)) == (WAIT_SELECT|WAIT_TIME)) &&
WAIT_TIME        10587 eval.c         	    if (th->wait_for & WAIT_TIME) warn_printf("T(%f)", th->delay);
WAIT_TIME        10712 eval.c             curr_thread->wait_for = WAIT_TIME;
WAIT_TIME        10805 eval.c         	curr_thread->wait_for |= WAIT_TIME;
WAIT_TIME        10838 eval.c         	if (limit < DELAY_INFTY) curr_thread->wait_for |= WAIT_TIME;
WAIT_TIME        11196 eval.c         	curr_thread->wait_for = WAIT_TIME;
WAIT_TIME        11229 eval.c             curr_thread->wait_for = WAIT_TIME;


WC2MBC1ST

WC2MBC1ST        3008 regex.c        	    beg = WC2MBC1ST(c);
WC2MBC1ST        3010 regex.c        	    end = WC2MBC1ST(c);
WC2MBC1ST        3063 regex.c        	    beg = WC2MBC1ST(cc);
WC2MBC1ST        3079 regex.c        	    c = WC2MBC1ST(cc);


WC2VSTR

WC2VSTR          1175 ext/win32ole/win32ole.c     vclsid = WC2VSTR(pbuf);
WC2VSTR          1653 ext/win32ole/win32ole.c         oletype_set_member(type, pTypeInfo, WC2VSTR(bstr));
WC2VSTR          2715 ext/win32ole/win32ole.c         fname = WC2VSTR(bstr);
WC2VSTR          2794 ext/win32ole/win32ole.c                                  i, WC2VSTR(bstr));
WC2VSTR          2857 ext/win32ole/win32ole.c     type = WC2VSTR(bstr);
WC2VSTR          2867 ext/win32ole/win32ole.c         if (SUCCEEDED(hr) && rb_str_cmp(WC2VSTR(bstr), type) == 0) {
WC2VSTR          3007 ext/win32ole/win32ole.c         oletype_set_member(type, pTypeInfo, WC2VSTR(bstr));
WC2VSTR          3065 ext/win32ole/win32ole.c     type = WC2VSTR(bstr);
WC2VSTR          3423 ext/win32ole/win32ole.c         typelib = WC2VSTR(bstr);
WC2VSTR          3610 ext/win32ole/win32ole.c         progid = WC2VSTR(pbuf);
WC2VSTR          3776 ext/win32ole/win32ole.c     return WC2VSTR(bhelpstr);
WC2VSTR          3843 ext/win32ole/win32ole.c     return WC2VSTR(bhelpfile);
WC2VSTR          3929 ext/win32ole/win32ole.c         rb_ivar_set(var, rb_intern("name"), WC2VSTR(bstr));
WC2VSTR          4675 ext/win32ole/win32ole.c             name = WC2VSTR(bstr);
WC2VSTR          4731 ext/win32ole/win32ole.c             return WC2VSTR(name);
WC2VSTR          4769 ext/win32ole/win32ole.c     return WC2VSTR(bhelpstring);
WC2VSTR          4803 ext/win32ole/win32ole.c     return WC2VSTR(bhelpfile);
WC2VSTR          5029 ext/win32ole/win32ole.c             rb_ivar_set(param, rb_intern("name"), WC2VSTR(bstrs[i]));
WC2VSTR          5586 ext/win32ole/win32ole.c     ev = WC2VSTR(bstr);


WEXITSTATUS

WEXITSTATUS        75 process.c      #ifndef WEXITSTATUS
WEXITSTATUS        82 process.c      #define WSTOPSIG        WEXITSTATUS
WEXITSTATUS       302 process.c      	snprintf(buf, sizeof(buf), ",exited(%d)", WEXITSTATUS(status));
WEXITSTATUS       508 process.c      	return INT2NUM(WEXITSTATUS(status));
WEXITSTATUS       529 process.c          return WEXITSTATUS(status) == EXIT_SUCCESS ? Qtrue : Qfalse;


WIFEXITED

WIFEXITED          66 process.c      #ifndef WIFEXITED
WIFEXITED         301 process.c          if (WIFEXITED(status)) {
WIFEXITED         475 process.c          if (WIFEXITED(status))
WIFEXITED         507 process.c          if (WIFEXITED(status))
WIFEXITED         527 process.c          if (!WIFEXITED(status))


WIFSIGNALED

WIFSIGNALED        69 process.c      #ifndef WIFSIGNALED
WIFSIGNALED       290 process.c          if (WIFSIGNALED(status)) {
WIFSIGNALED       432 process.c          if (WIFSIGNALED(status))
WIFSIGNALED       454 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         72 process.c      #ifndef WIFSTOPPED
WIFSTOPPED        279 process.c          if (WIFSTOPPED(status)) {
WIFSTOPPED        391 process.c          if (WIFSTOPPED(status))
WIFSTOPPED        412 process.c          if (WIFSTOPPED(status))


WIN32_FIND_DATA

WIN32_FIND_DATA  1366 win32/win32.c      WIN32_FIND_DATA fd;
WIN32_FIND_DATA  2882 win32/win32.c      WIN32_FIND_DATA wfd;


WIN95

WIN95             205 win32/win32.c  #ifdef WIN95
WIN95             292 win32/win32.c  #ifdef WIN95
WIN95             326 win32/win32.c  #ifdef WIN95
WIN95              83 win32/win32.h  #ifdef WIN95


WISH_TRUE

WISH_TRUE         713 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           170 defines.h      #ifndef WNOHANG
WNOHANG           572 process.c      	flags |= WNOHANG;
WNOHANG           591 process.c      	if (oflags & WNOHANG) return 0;
WNOHANG           847 process.c      	cpid = rb_waitpid(*pid_p, &status, WNOHANG);
WNOHANG          3373 process.c      #ifdef WNOHANG
WNOHANG          3374 process.c          rb_define_const(rb_mProcess, "WNOHANG", INT2FIX(WNOHANG));
WNOHANG          2445 win32/win32.c  #ifndef WNOHANG
WNOHANG          2480 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   225 pack.c         #ifdef WORDS_BIGENDIAN


WRITABLE

WRITABLE          119 ext/stringio/stringio.c     if (!WRITABLE(ptr)) {
WRITABLE          423 ext/stringio/stringio.c     if (!WRITABLE(ptr)) {
WRITABLE          471 ext/stringio/stringio.c     if (WRITABLE(ptr)) return Qfalse;


WSTOPSIG

WSTOPSIG           81 process.c      #ifndef WSTOPSIG
WSTOPSIG          280 process.c      	int stopsig = WSTOPSIG(status);
WSTOPSIG          413 process.c      	return INT2NUM(WSTOPSIG(status));


WTERMSIG

WTERMSIG           78 process.c      #ifndef WTERMSIG
WTERMSIG          291 process.c      	int termsig = WTERMSIG(status);
WTERMSIG          455 process.c      	return INT2NUM(WTERMSIG(status));


WUNTRACED

WUNTRACED         173 defines.h      #ifndef WUNTRACED
WUNTRACED         155 ext/pty/pty.c  	cpid = rb_waitpid(info->child_pid, &status, WUNTRACED);
WUNTRACED        3378 process.c      #ifdef WUNTRACED
WUNTRACED        3379 process.c          rb_define_const(rb_mProcess, "WUNTRACED", INT2FIX(WUNTRACED));


W_OK

W_OK             1158 file.c             if (eaccess(StringValueCStr(fname), W_OK) < 0) return Qfalse;
W_OK             1175 file.c             if (access(StringValueCStr(fname), W_OK) < 0) return Qfalse;


WaitForMultipleEvents

WaitForMultipleEvents 2502 win32/win32.c  	ret = WaitForMultipleEvents(count + 1, events, FALSE, timeout, TRUE);
WaitForMultipleEvents 3005 win32/win32.c      ret = WaitForMultipleEvents(count, events, FALSE, timeout, TRUE);


WaitForMultipleObjectsEx

WaitForMultipleObjectsEx   70 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  220 ext/win32ole/win32ole.c         Win32OLEIDispatch* p = (Win32OLEIDispatch*)This;
Win32OLEIDispatch  231 ext/win32ole/win32ole.c     Win32OLEIDispatch* p = (Win32OLEIDispatch*)This;
Win32OLEIDispatch  238 ext/win32ole/win32ole.c     Win32OLEIDispatch* p = (Win32OLEIDispatch*)This;
Win32OLEIDispatch  273 ext/win32ole/win32ole.c     Win32OLEIDispatch* p = (Win32OLEIDispatch*)This;
Win32OLEIDispatch  294 ext/win32ole/win32ole.c     Win32OLEIDispatch* p = (Win32OLEIDispatch*)This;
Win32OLEIDispatch  316 ext/win32ole/win32ole.c     Win32OLEIDispatch* pdisp;
Win32OLEIDispatch  320 ext/win32ole/win32ole.c         pdisp = (Win32OLEIDispatch *)(data & ~FIXNUM_FLAG);
Win32OLEIDispatch  324 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            1977 ext/nkf/nkf-utf8/nkf.c 			    c2 = X0201;
X0201            1990 ext/nkf/nkf-utf8/nkf.c 				c2 = X0201;
X0201            2016 ext/nkf/nkf-utf8/nkf.c 			    c2 = X0201;
X0201            2123 ext/nkf/nkf-utf8/nkf.c                             input_mode = X0201; shift_mode = X0201;
X0201            2144 ext/nkf/nkf-utf8/nkf.c                        c2 = X0201;
X0201            2294 ext/nkf/nkf-utf8/nkf.c             (*iconv)(X0201, c2, 0);
X0201            2394 ext/nkf/nkf-utf8/nkf.c     if (c2 == X0201) {
X0201            2411 ext/nkf/nkf-utf8/nkf.c     if (c2 == X0201) {
X0201            2434 ext/nkf/nkf-utf8/nkf.c         c2 = X0201;
X0201            2474 ext/nkf/nkf-utf8/nkf.c     } else if (c2 == X0201) {
X0201            2624 ext/nkf/nkf-utf8/nkf.c     if (c2 == SO) c2 = X0201;
X0201            2643 ext/nkf/nkf-utf8/nkf.c     if (c2 == X0201) {
X0201            2784 ext/nkf/nkf-utf8/nkf.c     } else if (c2 == X0201) {
X0201            2907 ext/nkf/nkf-utf8/nkf.c     } else if (c2 == X0201) {
X0201            2980 ext/nkf/nkf-utf8/nkf.c     } else if (c2==X0201) {
X0201            2981 ext/nkf/nkf-utf8/nkf.c         if (output_mode!=X0201) {
X0201            2982 ext/nkf/nkf-utf8/nkf.c             output_mode = X0201;
X0201            3042 ext/nkf/nkf-utf8/nkf.c             && (input_mode==ASCII || input_mode==X0201)) {
X0201            3054 ext/nkf/nkf-utf8/nkf.c             && (input_mode==X0208 || input_mode==X0201)) { /* ) */
X0201            3207 ext/nkf/nkf-utf8/nkf.c         if (c2 || c2==X0201)
X0201            3216 ext/nkf/nkf-utf8/nkf.c             } else if (c2==X0201) {
X0201            3313 ext/nkf/nkf-utf8/nkf.c     if (x0201_f && z_prev2==X0201) {  /* X0201 */
X0201            3333 ext/nkf/nkf-utf8/nkf.c     if (x0201_f && c2==X0201) {
X0201            3401 ext/nkf/nkf-utf8/nkf.c     if (c2==0 || c2==X0201 || c2==ISO8859_1) {
X0201            3500 ext/nkf/nkf-utf8/nkf.c     JAPANESE_EUC, SHIFT_JIS,ISO8859_1, ISO8859_1, X0208, X0201,


X0208

X0208            2023 ext/nkf/nkf-utf8/nkf.c                 } else if (input_mode == X0208) {
X0208            2071 ext/nkf/nkf-utf8/nkf.c                         input_mode = X0208;
X0208            2086 ext/nkf/nkf-utf8/nkf.c                             input_mode = X0208;
X0208            2105 ext/nkf/nkf-utf8/nkf.c                         input_mode = X0208;
X0208            2190 ext/nkf/nkf-utf8/nkf.c         if (input_mode == X0208)
X0208            3003 ext/nkf/nkf-utf8/nkf.c         if (output_mode != X0208) {
X0208            3004 ext/nkf/nkf-utf8/nkf.c             output_mode = X0208;
X0208            3054 ext/nkf/nkf-utf8/nkf.c             && (input_mode==X0208 || input_mode==X0201)) { /* ) */
X0208            3500 ext/nkf/nkf-utf8/nkf.c     JAPANESE_EUC, SHIFT_JIS,ISO8859_1, ISO8859_1, X0208, X0201,


X0212

X0212            2091 ext/nkf/nkf-utf8/nkf.c                             input_mode = X0212;
X0212            2193 ext/nkf/nkf-utf8/nkf.c         else if (input_mode == X0212)
X0212            2970 ext/nkf/nkf-utf8/nkf.c         if (output_mode!=X0212) {
X0212            2971 ext/nkf/nkf-utf8/nkf.c             output_mode = X0212;


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);


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              176 defines.h      #ifndef X_OK
X_OK             1814 dln.c          	    if (!S_ISDIR(st.st_mode) && eaccess(fbuf, X_OK) == 0)
X_OK             1822 dln.c          		if (!S_ISDIR(st.st_mode) && eaccess(mac_fullpath, X_OK) == 0)
X_OK              867 file.c         	if (!(mode & X_OK))
X_OK             1192 file.c             if (eaccess(StringValueCStr(fname), X_OK) < 0) return Qfalse;
X_OK             1209 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               239 ext/socket/getaddrinfo.c 	return YES;
YES               298 ext/socket/getaddrinfo.c 				translate = YES;


YIELD_FUNC_AVALUE

YIELD_FUNC_AVALUE 4882 eval.c         	    if (node->nd_state == YIELD_FUNC_AVALUE) {
YIELD_FUNC_AVALUE 9298 eval.c             data->body->nd_state = YIELD_FUNC_AVALUE;


YIELD_FUNC_SVALUE

YIELD_FUNC_SVALUE 4891 eval.c         		if (val == Qundef && node->nd_state != YIELD_FUNC_SVALUE)
YIELD_FUNC_SVALUE 9322 eval.c             bdata->body->nd_state = YIELD_FUNC_SVALUE;


YIELD_LAMBDA_CALL

YIELD_LAMBDA_CALL 4785 eval.c             int lambda = flags & YIELD_LAMBDA_CALL;
YIELD_LAMBDA_CALL 8360 eval.c             pcall = (data->flags & BLOCK_LAMBDA) ? YIELD_LAMBDA_CALL : 0;
YIELD_LAMBDA_CALL 11730 eval.c             return rb_yield_0(arg, 0, 0, YIELD_LAMBDA_CALL, Qtrue);


YIELD_PUBLIC_DEF

YIELD_PUBLIC_DEF 4803 eval.c             scope_vmode = (flags & YIELD_PUBLIC_DEF) ? SCOPE_PUBLIC : block->vmode;
YIELD_PUBLIC_DEF 6513 eval.c             return rb_yield_0(self, self, ruby_class, YIELD_PUBLIC_DEF, Qfalse);


YYABORT

YYABORT          1087 ext/syck/gram.c 	YYABORT;
YYABORT          1762 ext/syck/gram.c 		   YYABORT;
YYABORT          1821 ext/syck/gram.c 	YYABORT;
YYABORT          3503 parse.c        	YYABORT;
YYABORT          6353 parse.c        	YYABORT;
YYABORT          6389 parse.c            YYABORT;


YYACCEPT

YYACCEPT         1144 ext/syck/gram.c     YYACCEPT;
YYACCEPT         1831 ext/syck/gram.c     YYACCEPT;
YYACCEPT         3591 parse.c            YYACCEPT;
YYACCEPT         6431 parse.c            YYACCEPT;


YYCALLOC

YYCALLOC          133 parse.c        #define calloc	YYCALLOC
YYCALLOC           36 parse.y        #define calloc	YYCALLOC


YYCOPY

YYCOPY            214 ext/syck/gram.c # ifndef YYCOPY
YYCOPY            239 ext/syck/gram.c 	YYCOPY (&yyptr->Stack, Stack, yysize);				\
YYCOPY           3063 parse.c        # ifndef YYCOPY
YYCOPY           3088 parse.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
YYDEBUG           315 parse.c        #ifndef YYDEBUG
YYDEBUG           369 parse.c        #if YYDEBUG
YYDEBUG           583 parse.c        #if YYDEBUG
YYDEBUG           641 parse.c        #if (YYDEBUG) || defined YYERROR_VERBOSE
YYDEBUG          3183 parse.c        #if YYDEBUG
YYDEBUG          3550 parse.c        #if YYDEBUG
YYDEBUG          3649 parse.c        #if YYDEBUG
YYDEBUG          6251 parse.c        #if YYDEBUG
YYDEBUG          6396 parse.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, "));
YYDPRINTF        3399 parse.c          YYDPRINTF ((stderr, "Starting parse\n"));
YYDPRINTF        3499 parse.c              YYDPRINTF ((stderr, "Stack size increased to %lu\n",
YYDPRINTF        3506 parse.c          YYDPRINTF ((stderr, "Entering state %d\n", yystate));
YYDPRINTF        3533 parse.c              YYDPRINTF ((stderr, "Reading a token: "));
YYDPRINTF        3544 parse.c              YYDPRINTF ((stderr, "Now at end of input.\n"));
YYDPRINTF        3594 parse.c          YYDPRINTF ((stderr, "Shifting token %d (%s), ",
YYDPRINTF        6354 parse.c              YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
YYDPRINTF        6433 parse.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;
YYEMPTY          3115 parse.c        #define yyclearin	(yychar = YYEMPTY)
YYEMPTY          3128 parse.c          if (yychar == YYEMPTY && yylen == 1)				\
YYEMPTY          3404 parse.c          yychar = YYEMPTY;		/* Cause a token to be read.  */
YYEMPTY          3531 parse.c          if (yychar == YYEMPTY)
YYEMPTY          3599 parse.c            yychar = YYEMPTY;
YYEMPTY          6356 parse.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)
YYEOF            3542 parse.c              yychar = YYEOF;		/* Don't call YYLEX any more */
YYEOF            3598 parse.c          if (yychar != YYEOF)
YYEOF            6352 parse.c              if (yychar == YYEOF)


YYERROR

YYERROR           635 ext/syck/gram.c       YYERROR;							\
YYERROR          3139 parse.c              YYERROR;							\


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
YYERROR_VERBOSE   641 parse.c        #if (YYDEBUG) || defined YYERROR_VERBOSE
YYERROR_VERBOSE  3000 parse.c        #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
YYERROR_VERBOSE  3222 parse.c        #ifdef YYERROR_VERBOSE
YYERROR_VERBOSE  6291 parse.c        #ifdef 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)
YYFINAL          3590 parse.c          if (yyn == YYFINAL)
YYFINAL          6430 parse.c          if (yyn == YYFINAL)


YYFLAG

YYFLAG           3523 parse.c          if (yyn == YYFLAG)
YYFLAG           3582 parse.c              if (yyn == YYFLAG)
YYFLAG           6294 parse.c              if (yyn > YYFLAG && yyn < YYLAST)
YYFLAG           6412 parse.c          if (yyn == YYFLAG)
YYFLAG           6422 parse.c              if (yyn == YYFLAG)


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, ")");
YYFPRINTF        3185 parse.c        # ifndef YYFPRINTF
YYFPRINTF        3193 parse.c            YYFPRINTF Args;				\
YYFPRINTF        3555 parse.c        	  YYFPRINTF (stderr, "Next token is %d (%s",
YYFPRINTF        3562 parse.c        	  YYFPRINTF (stderr, ")\n");
YYFPRINTF        3656 parse.c              YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
YYFPRINTF        3661 parse.c        	YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
YYFPRINTF        3662 parse.c              YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
YYFPRINTF        6255 parse.c              YYFPRINTF (stderr, "state stack now");
YYFPRINTF        6257 parse.c        	YYFPRINTF (stderr, " %d", *++yyssp1);
YYFPRINTF        6258 parse.c              YYFPRINTF (stderr, "\n");
YYFPRINTF        6400 parse.c              YYFPRINTF (stderr, "Error: state stack now");
YYFPRINTF        6402 parse.c        	YYFPRINTF (stderr, " %d", *++yyssp1);
YYFPRINTF        6403 parse.c              YYFPRINTF (stderr, "\n");


YYFREE

YYFREE            155 ext/syck/gram.c # ifndef YYFREE
YYFREE            187 ext/syck/gram.c #  define YYSTACK_FREE YYFREE
YYFREE            134 parse.c        #define free	YYFREE
YYFREE             37 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;
YYINITDEPTH      3203 parse.c        #ifndef	YYINITDEPTH
YYINITDEPTH      3363 parse.c          short	yyssa[YYINITDEPTH];
YYINITDEPTH      3368 parse.c          YYSTYPE yyvsa[YYINITDEPTH];
YYINITDEPTH      3374 parse.c          YYLTYPE yylsa[YYINITDEPTH];
YYINITDEPTH      3385 parse.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)
YYLAST           3568 parse.c          if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
YYLAST           6274 parse.c          if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
YYLAST           6294 parse.c              if (yyn > YYFLAG && yyn < YYLAST)
YYLAST           6416 parse.c          if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)


YYLEX

YYLEX            1115 ext/syck/gram.c       yychar = YYLEX;
YYLEX            3534 parse.c              yychar = YYLEX;


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)
YYLEX_PARAM      3165 parse.c        #  ifdef YYLEX_PARAM
YYLEX_PARAM      3166 parse.c        #   define YYLEX		yylex (&yylval, &yylloc, YYLEX_PARAM)
YYLEX_PARAM      3171 parse.c        #  ifdef YYLEX_PARAM
YYLEX_PARAM      3172 parse.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 )


YYLLOC_DEFAULT

YYLLOC_DEFAULT    645 ext/syck/gram.c #ifndef YYLLOC_DEFAULT
YYLLOC_DEFAULT   3154 parse.c        #ifndef YYLLOC_DEFAULT
YYLLOC_DEFAULT   3646 parse.c          YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);


YYLSP_NEEDED

YYLSP_NEEDED     3041 parse.c        # if YYLSP_NEEDED
YYLSP_NEEDED     3051 parse.c        # if YYLSP_NEEDED
YYLSP_NEEDED     3164 parse.c        # if YYLSP_NEEDED
YYLSP_NEEDED     3319 parse.c        #if YYLSP_NEEDED
YYLSP_NEEDED     3372 parse.c        #if YYLSP_NEEDED
YYLSP_NEEDED     3379 parse.c        #if YYLSP_NEEDED
YYLSP_NEEDED     3391 parse.c        #if YYLSP_NEEDED
YYLSP_NEEDED     3413 parse.c        #if YYLSP_NEEDED
YYLSP_NEEDED     3445 parse.c        # if YYLSP_NEEDED
YYLSP_NEEDED     3483 parse.c        # if YYLSP_NEEDED
YYLSP_NEEDED     3495 parse.c        #if YYLSP_NEEDED
YYLSP_NEEDED     3602 parse.c        #if YYLSP_NEEDED
YYLSP_NEEDED     3642 parse.c        #if YYLSP_NEEDED
YYLSP_NEEDED     6247 parse.c        #if YYLSP_NEEDED
YYLSP_NEEDED     6263 parse.c        #if YYLSP_NEEDED
YYLSP_NEEDED     6392 parse.c        #if YYLSP_NEEDED
YYLSP_NEEDED     6436 parse.c        #if YYLSP_NEEDED


YYMALLOC

YYMALLOC          158 ext/syck/gram.c # ifndef YYMALLOC
YYMALLOC          186 ext/syck/gram.c #  define YYSTACK_ALLOC YYMALLOC
YYMALLOC          131 parse.c        #define malloc	YYMALLOC
YYMALLOC         6557 parse.c        #ifdef YYMALLOC
YYMALLOC         9772 parse.c        #if defined(YYMALLOC)
YYMALLOC         9782 parse.c        #if defined YYMALLOC
YYMALLOC         10237 parse.c        #ifdef YYMALLOC
YYMALLOC           34 parse.y        #define malloc	YYMALLOC
YYMALLOC         2559 parse.y        #ifdef YYMALLOC
YYMALLOC         5774 parse.y        #if defined(YYMALLOC)
YYMALLOC         5784 parse.y        #if defined YYMALLOC
YYMALLOC         6239 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        298 parse.c        #ifndef YYMAXDEPTH
YYMAXDEPTH       3214 parse.c        #if YYMAXDEPTH == 0
YYMAXDEPTH       3218 parse.c        #ifndef YYMAXDEPTH
YYMAXDEPTH       3469 parse.c              if (yystacksize >= YYMAXDEPTH)
YYMAXDEPTH       3472 parse.c              if (yystacksize > YYMAXDEPTH)
YYMAXDEPTH       3473 parse.c        	yystacksize = YYMAXDEPTH;
YYMAXDEPTH        201 parse.y        #ifndef YYMAXDEPTH


YYNTBASE

YYNTBASE         6273 parse.c          yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
YYNTBASE         6277 parse.c            yystate = yydefgoto[yyn - YYNTBASE];


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;
YYPARSE_PARAM    3284 parse.c        #ifdef YYPARSE_PARAM
YYPARSE_PARAM    3286 parse.c        #  define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
YYPARSE_PARAM    3289 parse.c        #  define YYPARSE_PARAM_ARG YYPARSE_PARAM
YYPARSE_PARAM    3290 parse.c        #  define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
YYPARSE_PARAM    3299 parse.c        # ifdef YYPARSE_PARAM


YYPOPSTACK

YYPOPSTACK        629 ext/syck/gram.c       YYPOPSTACK;						\
YYPOPSTACK       1760 ext/syck/gram.c 		 YYPOPSTACK;
YYPOPSTACK       1825 ext/syck/gram.c       YYPOPSTACK;
YYPOPSTACK       3133 parse.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           3163 parse.c        #if YYPURE
YYPURE           3333 parse.c        #if !YYPURE
YYPURE           3342 parse.c        #if YYPURE


YYREALLOC

YYREALLOC         132 parse.c        #define realloc	YYREALLOC
YYREALLOC          35 parse.y        #define realloc	YYREALLOC


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;
YYSIZE_T         3071 parse.c        	  register YYSIZE_T yyi;		\
YYSIZE_T         3087 parse.c        	YYSIZE_T yynewbytes;						\
YYSIZE_T         3098 parse.c        #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
YYSIZE_T         3101 parse.c        #if ! defined (YYSIZE_T) && defined (size_t)
YYSIZE_T         3104 parse.c        #if ! defined (YYSIZE_T)
YYSIZE_T         3110 parse.c        #if ! defined (YYSIZE_T)
YYSIZE_T         3229 parse.c        static YYSIZE_T
YYSIZE_T         3385 parse.c          YYSIZE_T yystacksize = YYINITDEPTH;
YYSIZE_T         3433 parse.c              YYSIZE_T yysize = yyssp - yyss + 1;
YYSIZE_T         6296 parse.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_ALLOC    3018 parse.c        # ifdef YYSTACK_ALLOC
YYSTACK_ALLOC    3478 parse.c        	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
YYSTACK_ALLOC    6309 parse.c        	  yymsg = (char *) YYSTACK_ALLOC (yysize);


YYSTACK_BYTES

YYSTACK_BYTES    1066 ext/syck/gram.c 	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
YYSTACK_BYTES    3478 parse.c        	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));


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_FREE     3488 parse.c        	  YYSTACK_FREE (yyss1);
YYSTACK_FREE     6330 parse.c        	      YYSTACK_FREE (yymsg);
YYSTACK_FREE     6469 parse.c            YYSTACK_FREE (yyss);


YYSTACK_GAP_MAX

YYSTACK_GAP_MAX  3054 parse.c              + 2 * YYSTACK_GAP_MAX)
YYSTACK_GAP_MAX  3058 parse.c              + YYSTACK_GAP_MAX)
YYSTACK_GAP_MAX  3090 parse.c        	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX;	\


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_RELOCATE 3465 parse.c        # ifndef YYSTACK_RELOCATE
YYSTACK_RELOCATE 3481 parse.c        	YYSTACK_RELOCATE (yyss);
YYSTACK_RELOCATE 3482 parse.c        	YYSTACK_RELOCATE (yyvs);
YYSTACK_RELOCATE 3484 parse.c        	YYSTACK_RELOCATE (yyls);


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
YYSTACK_USE_ALLOCA  114 parse.c        #ifndef YYSTACK_USE_ALLOCA
YYSTACK_USE_ALLOCA 3004 parse.c        # if YYSTACK_USE_ALLOCA
YYSTACK_USE_ALLOCA 3007 parse.c        #  ifndef YYSTACK_USE_ALLOCA
YYSTACK_USE_ALLOCA   17 parse.y        #ifndef 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           305 parse.c        #ifndef YYSTYPE
YYSTYPE          3040 parse.c          YYSTYPE yyvs;
YYSTYPE          3053 parse.c             ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE))	\
YYSTYPE          3057 parse.c             ((N) * (sizeof (short) + sizeof (YYSTYPE))				\
YYSTYPE          3314 parse.c        YYSTYPE yylval;						\
YYSTYPE          3368 parse.c          YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE          3369 parse.c          YYSTYPE *yyvs = yyvsa;
YYSTYPE          3370 parse.c          register YYSTYPE *yyvsp;
YYSTYPE          3390 parse.c          YYSTYPE yyval;
YYSTYPE          3440 parse.c        	YYSTYPE *yyvs1 = yyvs;
YYSTYPE          10238 parse.c        #define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE))
YYSTYPE          6240 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)


YYSTYPE_IS_TRIVIAL

YYSTYPE_IS_TRIVIAL  194 ext/syck/gram.c 	 || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
YYSTYPE_IS_TRIVIAL 3034 parse.c        	 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))


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)
YYTERROR         6415 parse.c          yyn += YYTERROR;
YYTERROR         6416 parse.c          if (yyn < 0 || 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);
YYTRANSLATE      3132 parse.c              yychar1 = YYTRANSLATE (yychar);				\
YYTRANSLATE      3548 parse.c              yychar1 = YYTRANSLATE (yychar);
YYTRANSLATE      6308 parse.c        	  yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
YYTRANSLATE      6313 parse.c        	      yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);


YY_DECL_NON_LSP_VARIABLES

YY_DECL_NON_LSP_VARIABLES 3321 parse.c        YY_DECL_NON_LSP_VARIABLES			\
YY_DECL_NON_LSP_VARIABLES 3327 parse.c        YY_DECL_NON_LSP_VARIABLES


YY_DECL_VARIABLES

YY_DECL_VARIABLES 3334 parse.c        YY_DECL_VARIABLES
YY_DECL_VARIABLES 3343 parse.c          YY_DECL_VARIABLES


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           632 missing/vsnprintf.c 			flags |= ZEROPAD;
ZEROPAD           862 missing/vsnprintf.c 				flags &= ~ZEROPAD;
ZEROPAD           918 missing/vsnprintf.c 		if ((flags & (LADJUST|ZEROPAD)) == 0)
ZEROPAD           931 missing/vsnprintf.c 		if ((flags & (LADJUST|ZEROPAD)) == ZEROPAD)


ZSTREAM_AVAIL_OUT_STEP_MAX

ZSTREAM_AVAIL_OUT_STEP_MAX  446 ext/zlib/zlib.c     if (RSTRING(z->buf)->len - z->buf_filled >= ZSTREAM_AVAIL_OUT_STEP_MAX) {
ZSTREAM_AVAIL_OUT_STEP_MAX  448 ext/zlib/zlib.c 	z->stream.avail_out = ZSTREAM_AVAIL_OUT_STEP_MAX;
ZSTREAM_AVAIL_OUT_STEP_MAX  456 ext/zlib/zlib.c 	z->stream.avail_out = (inc < ZSTREAM_AVAIL_OUT_STEP_MAX) ?
ZSTREAM_AVAIL_OUT_STEP_MAX  457 ext/zlib/zlib.c 	    inc : ZSTREAM_AVAIL_OUT_STEP_MAX;
ZSTREAM_AVAIL_OUT_STEP_MAX  559 ext/zlib/zlib.c     if (z->stream.avail_out > ZSTREAM_AVAIL_OUT_STEP_MAX) {
ZSTREAM_AVAIL_OUT_STEP_MAX  560 ext/zlib/zlib.c 	z->stream.avail_out = ZSTREAM_AVAIL_OUT_STEP_MAX;


ZSTREAM_AVAIL_OUT_STEP_MIN

ZSTREAM_AVAIL_OUT_STEP_MIN  452 ext/zlib/zlib.c 	if (inc < ZSTREAM_AVAIL_OUT_STEP_MIN) {
ZSTREAM_AVAIL_OUT_STEP_MIN  453 ext/zlib/zlib.c 	    inc = ZSTREAM_AVAIL_OUT_STEP_MIN;


ZSTREAM_FLAG_CLOSED

ZSTREAM_FLAG_CLOSED  374 ext/zlib/zlib.c #define ZSTREAM_IS_CLOSED(z)   ((z)->flags & ZSTREAM_FLAG_CLOSED)
ZSTREAM_FLAG_CLOSED 2201 ext/zlib/zlib.c     gz->z.flags |= ZSTREAM_FLAG_CLOSED;
ZSTREAM_FLAG_CLOSED 2234 ext/zlib/zlib.c     gz->z.flags |= ZSTREAM_FLAG_CLOSED;


ZSTREAM_FLAG_FINALIZE

ZSTREAM_FLAG_FINALIZE  373 ext/zlib/zlib.c #define ZSTREAM_IS_FINALIZE(z) ((z)->flags & ZSTREAM_FLAG_FINALIZE)
ZSTREAM_FLAG_FINALIZE  820 ext/zlib/zlib.c     z->flags |= ZSTREAM_FLAG_FINALIZE;
ZSTREAM_FLAG_FINALIZE 1750 ext/zlib/zlib.c     gz->z.flags |= ZSTREAM_FLAG_FINALIZE;


ZSTREAM_FLAG_FINISHED

ZSTREAM_FLAG_FINISHED  372 ext/zlib/zlib.c #define ZSTREAM_IS_FINISHED(z) ((z)->flags & ZSTREAM_FLAG_FINISHED)
ZSTREAM_FLAG_FINISHED  737 ext/zlib/zlib.c 	    z->flags |= ZSTREAM_FLAG_FINISHED;


ZSTREAM_FLAG_IN_STREAM

ZSTREAM_FLAG_IN_STREAM  684 ext/zlib/zlib.c     if (z->flags & ZSTREAM_FLAG_IN_STREAM) {
ZSTREAM_FLAG_IN_STREAM  736 ext/zlib/zlib.c 	    z->flags &= ~ZSTREAM_FLAG_IN_STREAM;
ZSTREAM_FLAG_IN_STREAM  743 ext/zlib/zlib.c 		z->flags |= ZSTREAM_FLAG_IN_STREAM;
ZSTREAM_FLAG_IN_STREAM  753 ext/zlib/zlib.c 	    z->flags |= ZSTREAM_FLAG_IN_STREAM;


ZSTREAM_FLAG_READY

ZSTREAM_FLAG_READY  370 ext/zlib/zlib.c #define ZSTREAM_READY(z)       ((z)->flags |= ZSTREAM_FLAG_READY)
ZSTREAM_FLAG_READY  371 ext/zlib/zlib.c #define ZSTREAM_IS_READY(z)    ((z)->flags & ZSTREAM_FLAG_READY)
ZSTREAM_FLAG_READY  664 ext/zlib/zlib.c     z->flags = ZSTREAM_FLAG_READY;


ZSTREAM_FLAG_UNUSED

ZSTREAM_FLAG_UNUSED 1726 ext/zlib/zlib.c #define GZFILE_FLAG_SYNC             ZSTREAM_FLAG_UNUSED
ZSTREAM_FLAG_UNUSED 1727 ext/zlib/zlib.c #define GZFILE_FLAG_HEADER_FINISHED  (ZSTREAM_FLAG_UNUSED << 1)
ZSTREAM_FLAG_UNUSED 1728 ext/zlib/zlib.c #define GZFILE_FLAG_FOOTER_FINISHED  (ZSTREAM_FLAG_UNUSED << 2)


ZSTREAM_INITIAL_BUFSIZE

ZSTREAM_INITIAL_BUFSIZE  438 ext/zlib/zlib.c 	z->buf = rb_str_new(0, ZSTREAM_INITIAL_BUFSIZE);
ZSTREAM_INITIAL_BUFSIZE  441 ext/zlib/zlib.c 	z->stream.avail_out = ZSTREAM_INITIAL_BUFSIZE;


ZSTREAM_IS_CLOSED

ZSTREAM_IS_CLOSED 2200 ext/zlib/zlib.c     if (ZSTREAM_IS_CLOSED(&gz->z)) return;
ZSTREAM_IS_CLOSED 2233 ext/zlib/zlib.c     if (ZSTREAM_IS_CLOSED(&gz->z)) return;


ZSTREAM_IS_FINALIZE

ZSTREAM_IS_FINALIZE  661 ext/zlib/zlib.c     if (err != Z_OK && !ZSTREAM_IS_FINALIZE(z)) {
ZSTREAM_IS_FINALIZE  678 ext/zlib/zlib.c     if (!ZSTREAM_IS_READY(z) && !ZSTREAM_IS_FINALIZE(z)) {
ZSTREAM_IS_FINALIZE  693 ext/zlib/zlib.c     if (err != Z_OK && !ZSTREAM_IS_FINALIZE(z)) {
ZSTREAM_IS_FINALIZE 2210 ext/zlib/zlib.c     if (ZSTREAM_IS_FINALIZE(&gz->z)) {
ZSTREAM_IS_FINALIZE 2237 ext/zlib/zlib.c 	&& !ZSTREAM_IS_FINALIZE(&gz->z)


ZSTREAM_IS_FINISHED

ZSTREAM_IS_FINISHED 1084 ext/zlib/zlib.c     return ZSTREAM_IS_FINISHED(get_zstream(obj)) ? Qtrue : Qfalse;
ZSTREAM_IS_FINISHED 1538 ext/zlib/zlib.c     if (ZSTREAM_IS_FINISHED(z)) {
ZSTREAM_IS_FINISHED 1551 ext/zlib/zlib.c 	if (ZSTREAM_IS_FINISHED(z)) {
ZSTREAM_IS_FINISHED 1575 ext/zlib/zlib.c     if (ZSTREAM_IS_FINISHED(z)) {
ZSTREAM_IS_FINISHED 1583 ext/zlib/zlib.c 	if (ZSTREAM_IS_FINISHED(z)) {
ZSTREAM_IS_FINISHED 1731 ext/zlib/zlib.c     (ZSTREAM_IS_FINISHED(&gz->z) && (gz)->z.buf_filled == 0)
ZSTREAM_IS_FINISHED 2093 ext/zlib/zlib.c     while (!ZSTREAM_IS_FINISHED(&gz->z)) {
ZSTREAM_IS_FINISHED 2096 ext/zlib/zlib.c 	    if (!ZSTREAM_IS_FINISHED(&gz->z)) {
ZSTREAM_IS_FINISHED 2136 ext/zlib/zlib.c     while (!ZSTREAM_IS_FINISHED(&gz->z) && gz->z.buf_filled < len) {
ZSTREAM_IS_FINISHED 2159 ext/zlib/zlib.c     while (!ZSTREAM_IS_FINISHED(&gz->z)) {
ZSTREAM_IS_FINISHED 3121 ext/zlib/zlib.c 	if (ZSTREAM_IS_FINISHED(&gz->z)) {
ZSTREAM_IS_FINISHED 3132 ext/zlib/zlib.c 	    if (ZSTREAM_IS_FINISHED(&gz->z)) break;


ZSTREAM_IS_READY

ZSTREAM_IS_READY  678 ext/zlib/zlib.c     if (!ZSTREAM_IS_READY(z) && !ZSTREAM_IS_FINALIZE(z)) {
ZSTREAM_IS_READY  849 ext/zlib/zlib.c     if (!ZSTREAM_IS_READY(z)) {
ZSTREAM_IS_READY 1096 ext/zlib/zlib.c     return ZSTREAM_IS_READY(z) ? Qfalse : Qtrue;
ZSTREAM_IS_READY 1751 ext/zlib/zlib.c     if (ZSTREAM_IS_READY(&gz->z)) {
ZSTREAM_IS_READY 2266 ext/zlib/zlib.c     if (!ZSTREAM_IS_READY(&gz->z)) return Qnil;
ZSTREAM_IS_READY 2285 ext/zlib/zlib.c     if (!ZSTREAM_IS_READY(&gz->z)) {
ZSTREAM_IS_READY 2312 ext/zlib/zlib.c     if (ZSTREAM_IS_READY(&gz->z)) {


ZSTREAM_READY

ZSTREAM_READY    1155 ext/zlib/zlib.c     ZSTREAM_READY(z);
ZSTREAM_READY    1230 ext/zlib/zlib.c     ZSTREAM_READY(&z);
ZSTREAM_READY    1442 ext/zlib/zlib.c     ZSTREAM_READY(z);
ZSTREAM_READY    1490 ext/zlib/zlib.c     ZSTREAM_READY(&z);
ZSTREAM_READY    2725 ext/zlib/zlib.c     ZSTREAM_READY(&gz->z);
ZSTREAM_READY    2920 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        691 file.c         	ZeroMemory(st, sizeof(*st));
ZeroMemory       3134 win32/win32.c  	ZeroMemory(&ctx, sizeof(CONTEXT));
ZeroMemory        171 wince/wince.h    VOID ZeroMemory(PVOID p, DWORD length);


_

_                  98 array.c        static VALUE ary_alloc _((VALUE));
_                 224 array.c        static VALUE rb_ary_replace _((VALUE, VALUE));
_                1740 array.c            VALUE (*func) _((VALUE,long));
_                1802 bignum.c       static VALUE rb_big_rshift _((VALUE,VALUE));
_                 607 class.c            int (*func) _((ID, long, VALUE));
_                  49 defines.h      void *xmalloc _((long));
_                  50 defines.h      void *xcalloc _((long,long));
_                  51 defines.h      void *xrealloc _((void*,long));
_                  52 defines.h      void xfree _((void*));
_                  59 dir.c          char *strchr _((char*,char));
_                 246 dir.c          static VALUE dir_close _((VALUE));
_                 248 dir.c          static VALUE dir_s_alloc _((VALUE));
_                 692 dir.c          static void check_dirname _((volatile VALUE *));
_                 791 dir.c              ((flags & GLOB_VERBOSE) && rb_protect((VALUE (*)_((VALUE)))rb_sys_warning, (VALUE)(val), 0))
_                 885 dir.c              void (*func) _((const char*, VALUE));
_                 890 dir.c          static VALUE glob_func_caller _((VALUE));
_                 904 dir.c          static int glob_helper _((const char *path, const char *sub, int flags, int (*func)(const char *,VALUE), VALUE arg));
_                 911 dir.c              int (*func) _((const char *, VALUE));
_                1087 dir.c              int (*func) _((const char *, VALUE));
_                1097 dir.c              int (*func) _((const char *, VALUE));
_                1103 dir.c          static int rb_glob_caller _((const char *, VALUE));
_                1122 dir.c              void (*func) _((const char *, VALUE));
_                1136 dir.c              void (*func) _((const char*, VALUE));
_                1146 dir.c              void (*func) _((const char*, VALUE));
_                  32 dln.h          char *dln_find_exe _((const char*,const char*));
_                  33 dln.h          char *dln_find_file _((const char*,const char*));
_                  39 dln.h          void *dln_load _((const char*));
_                  31 env.h          void rb_gc_mark_frame _((struct FRAME *));
_                  68 error.c        static void err_append _((const char*));
_                  75 eval.c         char *strrchr _((const char*,const char));
_                 186 eval.c         static VALUE proc_invoke _((VALUE,VALUE,VALUE,VALUE));
_                 187 eval.c         static VALUE rb_f_binding _((VALUE));
_                 188 eval.c         static void rb_f_END _((void));
_                 189 eval.c         static VALUE rb_f_block_given_p _((void));
_                 190 eval.c         static VALUE block_pass _((VALUE,NODE*));
_                 192 eval.c         static VALUE method_call _((int, VALUE*, VALUE));
_                 194 eval.c         static VALUE umethod_bind _((VALUE, VALUE));
_                 195 eval.c         static VALUE rb_mod_define_method _((int, VALUE*, VALUE));
_                 196 eval.c         NORETURN(static void rb_raise_jump _((VALUE)));
_                 197 eval.c         static VALUE rb_make_exception _((int argc, VALUE *argv));
_                 218 eval.c         static VALUE safe_getter _((void));
_                 219 eval.c         static void safe_setter _((VALUE val));
_                 270 eval.c         NORETURN(static void print_undef _((VALUE, ID)));
_                 412 eval.c             VALUE (*func) _((VALUE));
_                1037 eval.c         static void scope_dup _((struct SCOPE *));
_                1056 eval.c         static VALUE rb_eval _((VALUE,NODE*));
_                1057 eval.c         static VALUE eval _((VALUE,VALUE,VALUE,char*,int));
_                1058 eval.c         static NODE *compile _((VALUE, char*, int));
_                1060 eval.c         static VALUE rb_yield_0 _((VALUE, VALUE, VALUE, int, int));
_                1068 eval.c         static VALUE rb_call _((VALUE,VALUE,ID,int,const VALUE*,int));
_                1069 eval.c         static VALUE module_setup _((VALUE,NODE*));
_                1071 eval.c         static VALUE massign _((VALUE,NODE*,VALUE,int));
_                1072 eval.c         static void assign _((VALUE,NODE*,VALUE,int));
_                1094 eval.c         static void call_trace_func _((rb_event_t,NODE*,VALUE,ID,VALUE));
_                1282 eval.c         void rb_call_inits _((void));
_                1283 eval.c         void Init_stack _((VALUE*));
_                1284 eval.c         void Init_heap _((void));
_                1285 eval.c         void Init_ext _((void));
_                1373 eval.c         static void rb_thread_cleanup _((void));
_                1374 eval.c         static void rb_thread_wait_other_threads _((void));
_                1470 eval.c         void rb_exec_end_proc _((void));
_                1617 eval.c             return rb_protect((VALUE (*)_((VALUE)))rb_eval_string, (VALUE)str, state);
_                1714 eval.c         NORETURN(static void jump_tag_but_local_jump _((int,VALUE)));
_                2219 eval.c         static char* is_defined _((VALUE, NODE*, char*));
_                2445 eval.c         static int handle_rescue _((VALUE,NODE*));
_                2809 eval.c         NORETURN(static void return_jump _((VALUE)));
_                2810 eval.c         NORETURN(static void break_jump _((VALUE)));
_                2811 eval.c         NORETURN(static void unknown_node _((NODE * volatile)));
_                4311 eval.c         NORETURN(static VALUE terminate_process _((int, VALUE)));
_                4447 eval.c         NORETURN(static void rb_longjmp _((int, VALUE)));
_                4448 eval.c         static VALUE make_backtrace _((void));
_                5194 eval.c             VALUE (*it_proc) _((VALUE)), (*bl_proc)(ANYARGS);
_                5325 eval.c             VALUE (*proc) _((VALUE));
_                6639 eval.c         NORETURN(static void load_failed _((VALUE)));
_                7589 eval.c         static VALUE rb_f_catch _((VALUE,VALUE));
_                7590 eval.c         NORETURN(static VALUE rb_f_throw _((int,VALUE*)));
_                7603 eval.c             void (*func) _((VALUE));
_                7640 eval.c         static void call_end_proc _((VALUE data));
_                8461 eval.c         static VALUE bmcall _((VALUE, VALUE));
_                8462 eval.c         static VALUE method_arity _((VALUE));
_                9295 eval.c             VALUE proc = rb_iterate((VALUE(*)_((VALUE)))mproc, 0, func, val);
_                9317 eval.c             proc = rb_iterate((VALUE(*)_((VALUE)))mproc, 0, bmcall, method);
_                9785 eval.c         static void rb_thread_ready _((rb_thread_t));
_                9787 eval.c         static VALUE run_trap_eval _((VALUE));
_                10016 eval.c         static VALUE rb_thread_raise _((int, VALUE*, rb_thread_t));
_                10144 eval.c         NORETURN(static void rb_thread_restore_context _((rb_thread_t,int)));
_                10284 eval.c         NORETURN(static void rb_thread_main_jump _((VALUE, int)));
_                10296 eval.c         NORETURN(static void rb_thread_deadlock _((void)));
_                10716 eval.c         void rb_thread_sleep_forever _((void));
_                10814 eval.c         static int rb_thread_join _((rb_thread_t, double));
_                12529 eval.c         static VALUE thgroup_s_alloc _((VALUE));
_                12845 eval.c             return rb_iterate((VALUE(*)_((VALUE)))catch_i, ID2SYM(rb_intern(tag)), func, data);
_                  89 ext/dbm/dbm.c  static VALUE fdbm_alloc _((VALUE));
_                 461 ext/dbm/dbm.c  static VALUE each_pair _((VALUE));
_                 470 ext/dbm/dbm.c  static VALUE fdbm_store _((VALUE,VALUE,VALUE));
_                  61 ext/digest/digest.c static VALUE rb_digest_base_alloc _((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*));
_                 263 ext/enumerator/enumerator.c     val = rb_iterate((VALUE (*)_((VALUE)))enumerator_iter, obj, rb_yield, 0);
_                  90 ext/gdbm/gdbm.c static VALUE fgdbm_s_alloc _((VALUE));
_                 564 ext/gdbm/gdbm.c static VALUE each_pair _((VALUE));
_                 573 ext/gdbm/gdbm.c static VALUE fgdbm_store _((VALUE,VALUE,VALUE));
_                  83 ext/iconv/iconv.c     VALUE (*append)_((VALUE, VALUE));
_                  94 ext/iconv/iconv.c static VALUE iconv_fail _((VALUE error, VALUE success, VALUE failed, struct iconv_env_t* env, const char *mesg));
_                  95 ext/iconv/iconv.c static VALUE iconv_failure_initialize _((VALUE error, VALUE mesg, VALUE success, VALUE failed));
_                  96 ext/iconv/iconv.c static VALUE iconv_failure_success _((VALUE self));
_                  97 ext/iconv/iconv.c static VALUE iconv_failure_failed _((VALUE self));
_                  99 ext/iconv/iconv.c static iconv_t iconv_create _((VALUE to, VALUE from));
_                 100 ext/iconv/iconv.c static void iconv_dfree _((void *cd));
_                 101 ext/iconv/iconv.c static VALUE iconv_free _((VALUE cd));
_                 102 ext/iconv/iconv.c static VALUE iconv_try _((iconv_t cd, const char **inptr, size_t *inlen, char **outptr, size_t *outlen));
_                 103 ext/iconv/iconv.c static VALUE rb_str_derive _((VALUE str, const char* ptr, int len));
_                 104 ext/iconv/iconv.c static VALUE iconv_convert _((iconv_t cd, VALUE str, int start, int length, struct iconv_env_t* env));
_                 105 ext/iconv/iconv.c static VALUE iconv_s_allocate _((VALUE klass));
_                 106 ext/iconv/iconv.c static VALUE iconv_initialize _((VALUE self, VALUE to, VALUE from));
_                 107 ext/iconv/iconv.c static VALUE iconv_s_open _((VALUE self, VALUE to, VALUE from));
_                 108 ext/iconv/iconv.c static VALUE iconv_s_convert _((struct iconv_env_t* env));
_                 109 ext/iconv/iconv.c static VALUE iconv_s_iconv _((int argc, VALUE *argv, VALUE self));
_                 110 ext/iconv/iconv.c static VALUE iconv_init_state _((VALUE cd));
_                 111 ext/iconv/iconv.c static VALUE iconv_finish _((VALUE self));
_                 112 ext/iconv/iconv.c static VALUE iconv_iconv _((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));
_                  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,
_                  40 ext/openssl/ossl_bio.c      ret = (BIO*)rb_protect((VALUE(*)_((VALUE)))ossl_obj2bio, obj, status);
_                  59 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**));
_                 207 ext/openssl/ossl_ssl.c     success = rb_protect((VALUE(*)_((VALUE)))ossl_call_client_cert_cb,
_                 244 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));
_                  78 ext/readline/readline.c     buff = (char*)rb_protect((VALUE(*)_((VALUE)))readline, (VALUE)prompt,
_                  80 ext/sdbm/init.c static VALUE fsdbm_alloc _((VALUE));
_                 440 ext/sdbm/init.c static VALUE each_pair _((VALUE));
_                 449 ext/sdbm/init.c static VALUE fsdbm_store _((VALUE,VALUE,VALUE));
_                 521 ext/socket/socket.c static VALUE ipaddr _((struct sockaddr*));
_                 523 ext/socket/socket.c static VALUE unixaddr _((struct sockaddr_un*));
_                1212 ext/socket/socket.c     VALUE (*ipaddr)_((struct sockaddr*, size_t));
_                1221 ext/socket/socket.c     VALUE (*ipaddr)_((struct sockaddr*, size_t)) = arg->ipaddr;
_                1263 ext/socket/socket.c     VALUE (*ipaddr)_((struct sockaddr*, size_t));
_                  33 ext/stringio/stringio.c static struct StringIO* strio_alloc _((void));
_                  34 ext/stringio/stringio.c static void strio_mark _((struct StringIO *));
_                  35 ext/stringio/stringio.c static void strio_free _((struct StringIO *));
_                  36 ext/stringio/stringio.c static struct StringIO* check_strio _((VALUE));
_                  37 ext/stringio/stringio.c static struct StringIO* get_strio _((VALUE));
_                  38 ext/stringio/stringio.c static struct StringIO* readable _((struct StringIO *));
_                  39 ext/stringio/stringio.c static struct StringIO* writable _((struct StringIO *));
_                  40 ext/stringio/stringio.c static void check_modifiable _((struct StringIO *));
_                 137 ext/stringio/stringio.c static VALUE strio_s_allocate _((VALUE));
_                 138 ext/stringio/stringio.c static VALUE strio_s_open _((int, VALUE *, VALUE));
_                 139 ext/stringio/stringio.c static VALUE strio_initialize _((int, VALUE *, VALUE));
_                 140 ext/stringio/stringio.c static VALUE strio_finalize _((VALUE));
_                 141 ext/stringio/stringio.c static VALUE strio_self _((VALUE));
_                 142 ext/stringio/stringio.c static VALUE strio_false _((VALUE));
_                 143 ext/stringio/stringio.c static VALUE strio_nil _((VALUE));
_                 144 ext/stringio/stringio.c static VALUE strio_0 _((VALUE));
_                 145 ext/stringio/stringio.c static VALUE strio_first _((VALUE, VALUE));
_                 146 ext/stringio/stringio.c static VALUE strio_unimpl _((int, VALUE *, VALUE));
_                 147 ext/stringio/stringio.c static VALUE strio_get_string _((VALUE));
_                 148 ext/stringio/stringio.c static VALUE strio_set_string _((VALUE, VALUE));
_                 149 ext/stringio/stringio.c static VALUE strio_close _((VALUE));
_                 150 ext/stringio/stringio.c static VALUE strio_close_read _((VALUE));
_                 151 ext/stringio/stringio.c static VALUE strio_close_write _((VALUE));
_                 152 ext/stringio/stringio.c static VALUE strio_closed _((VALUE));
_                 153 ext/stringio/stringio.c static VALUE strio_closed_read _((VALUE));
_                 154 ext/stringio/stringio.c static VALUE strio_closed_write _((VALUE));
_                 155 ext/stringio/stringio.c static VALUE strio_eof _((VALUE));
_                 156 ext/stringio/stringio.c static VALUE strio_get_lineno _((VALUE));
_                 157 ext/stringio/stringio.c static VALUE strio_set_lineno _((VALUE, VALUE));
_                 158 ext/stringio/stringio.c static VALUE strio_get_pos _((VALUE));
_                 159 ext/stringio/stringio.c static VALUE strio_set_pos _((VALUE, VALUE));
_                 160 ext/stringio/stringio.c static VALUE strio_rewind _((VALUE));
_                 161 ext/stringio/stringio.c static VALUE strio_seek _((int, VALUE *, VALUE));
_                 162 ext/stringio/stringio.c static VALUE strio_get_sync _((VALUE));
_                 163 ext/stringio/stringio.c static VALUE strio_each_byte _((VALUE));
_                 164 ext/stringio/stringio.c static VALUE strio_getc _((VALUE));
_                 165 ext/stringio/stringio.c static VALUE strio_ungetc _((VALUE, VALUE));
_                 166 ext/stringio/stringio.c static VALUE strio_readchar _((VALUE));
_                 167 ext/stringio/stringio.c static VALUE strio_getline _((int, VALUE *, struct StringIO *));
_                 168 ext/stringio/stringio.c static VALUE strio_gets _((int, VALUE *, VALUE));
_                 169 ext/stringio/stringio.c static VALUE strio_readline _((int, VALUE *, VALUE));
_                 170 ext/stringio/stringio.c static VALUE strio_each _((int, VALUE *, VALUE));
_                 171 ext/stringio/stringio.c static VALUE strio_readlines _((int, VALUE *, VALUE));
_                 172 ext/stringio/stringio.c static VALUE strio_write _((VALUE, VALUE));
_                 173 ext/stringio/stringio.c static VALUE strio_putc _((VALUE, VALUE));
_                 174 ext/stringio/stringio.c static VALUE strio_read _((int, VALUE *, VALUE));
_                 175 ext/stringio/stringio.c static VALUE strio_size _((VALUE));
_                 176 ext/stringio/stringio.c static VALUE strio_truncate _((VALUE, VALUE));
_                 177 ext/stringio/stringio.c void Init_stringio _((void));
_                 180 ext/stringio/stringio.c static void bm_init_skip _((long *, const char *, long));
_                 181 ext/stringio/stringio.c static long bm_search _((const char *, long, const char *, long, const long *));
_                  72 ext/strscan/strscan.c static VALUE infect _((VALUE str, struct strscanner *p));
_                  73 ext/strscan/strscan.c static VALUE extract_range _((struct strscanner *p, long beg_i, long end_i));
_                  74 ext/strscan/strscan.c static VALUE extract_beg_len _((struct strscanner *p, long beg_i, long len));
_                  76 ext/strscan/strscan.c static void strscan_mark _((struct strscanner *p));
_                  77 ext/strscan/strscan.c static void strscan_free _((struct strscanner *p));
_                  78 ext/strscan/strscan.c static VALUE strscan_s_allocate _((VALUE klass));
_                  79 ext/strscan/strscan.c static VALUE strscan_initialize _((int argc, VALUE *argv, VALUE self));
_                  81 ext/strscan/strscan.c static VALUE strscan_s_mustc _((VALUE self));
_                  82 ext/strscan/strscan.c static VALUE strscan_terminate _((VALUE self));
_                  83 ext/strscan/strscan.c static VALUE strscan_clear _((VALUE self));
_                  84 ext/strscan/strscan.c static VALUE strscan_get_string _((VALUE self));
_                  85 ext/strscan/strscan.c static VALUE strscan_set_string _((VALUE self, VALUE str));
_                  86 ext/strscan/strscan.c static VALUE strscan_concat _((VALUE self, VALUE str));
_                  87 ext/strscan/strscan.c static VALUE strscan_get_pos _((VALUE self));
_                  88 ext/strscan/strscan.c static VALUE strscan_set_pos _((VALUE self, VALUE pos));
_                  89 ext/strscan/strscan.c static VALUE strscan_do_scan _((VALUE self, VALUE regex,
_                  91 ext/strscan/strscan.c static VALUE strscan_scan _((VALUE self, VALUE re));
_                  92 ext/strscan/strscan.c static VALUE strscan_match_p _((VALUE self, VALUE re));
_                  93 ext/strscan/strscan.c static VALUE strscan_skip _((VALUE self, VALUE re));
_                  94 ext/strscan/strscan.c static VALUE strscan_check _((VALUE self, VALUE re));
_                  95 ext/strscan/strscan.c static VALUE strscan_scan_full _((VALUE self, VALUE re,
_                  97 ext/strscan/strscan.c static VALUE strscan_scan_until _((VALUE self, VALUE re));
_                  98 ext/strscan/strscan.c static VALUE strscan_skip_until _((VALUE self, VALUE re));
_                  99 ext/strscan/strscan.c static VALUE strscan_check_until _((VALUE self, VALUE re));
_                 100 ext/strscan/strscan.c static VALUE strscan_search_full _((VALUE self, VALUE re,
_                 102 ext/strscan/strscan.c static void adjust_registers_to_matched _((struct strscanner *p));
_                 103 ext/strscan/strscan.c static VALUE strscan_getch _((VALUE self));
_                 104 ext/strscan/strscan.c static VALUE strscan_get_byte _((VALUE self));
_                 105 ext/strscan/strscan.c static VALUE strscan_getbyte _((VALUE self));
_                 106 ext/strscan/strscan.c static VALUE strscan_peek _((VALUE self, VALUE len));
_                 107 ext/strscan/strscan.c static VALUE strscan_peep _((VALUE self, VALUE len));
_                 108 ext/strscan/strscan.c static VALUE strscan_unscan _((VALUE self));
_                 109 ext/strscan/strscan.c static VALUE strscan_bol_p _((VALUE self));
_                 110 ext/strscan/strscan.c static VALUE strscan_eos_p _((VALUE self));
_                 111 ext/strscan/strscan.c static VALUE strscan_empty_p _((VALUE self));
_                 112 ext/strscan/strscan.c static VALUE strscan_rest_p _((VALUE self));
_                 113 ext/strscan/strscan.c static VALUE strscan_matched_p _((VALUE self));
_                 114 ext/strscan/strscan.c static VALUE strscan_matched _((VALUE self));
_                 115 ext/strscan/strscan.c static VALUE strscan_matched_size _((VALUE self));
_                 116 ext/strscan/strscan.c static VALUE strscan_aref _((VALUE self, VALUE idx));
_                 117 ext/strscan/strscan.c static VALUE strscan_pre_match _((VALUE self));
_                 118 ext/strscan/strscan.c static VALUE strscan_post_match _((VALUE self));
_                 119 ext/strscan/strscan.c static VALUE strscan_rest _((VALUE self));
_                 120 ext/strscan/strscan.c static VALUE strscan_rest_size _((VALUE self));
_                 122 ext/strscan/strscan.c static VALUE strscan_inspect _((VALUE self));
_                 123 ext/strscan/strscan.c static VALUE inspect1 _((struct strscanner *p));
_                 124 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));
_                1942 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));
_                 195 ext/win32ole/win32ole.c static VALUE folemethod_s_allocate _((VALUE));
_                 196 ext/win32ole/win32ole.c static VALUE olemethod_set_member _((VALUE, ITypeInfo *, ITypeInfo *, int, VALUE));
_                 197 ext/win32ole/win32ole.c static VALUE foletype_s_allocate _((VALUE));
_                 198 ext/win32ole/win32ole.c static VALUE oletype_set_member  _((VALUE, ITypeInfo *, VALUE));
_                 199 ext/win32ole/win32ole.c static VALUE olemethod_from_typeinfo _((VALUE, ITypeInfo *, VALUE));
_                 200 ext/win32ole/win32ole.c static HRESULT ole_docinfo_from_type _((ITypeInfo *, BSTR *, BSTR *, DWORD *, BSTR *));
_                 877 ext/win32ole/win32ole.c static VALUE fole_s_allocate _((VALUE));
_                5886 ext/win32ole/win32ole.c static VALUE fev_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 _((struct gzfile*));
_                 113 ext/zlib/zlib.c static int gzfile_read_raw_ensure _((struct gzfile*, int));
_                 114 ext/zlib/zlib.c static char *gzfile_read_raw_until_zero _((struct gzfile*, long));
_                 115 ext/zlib/zlib.c static unsigned int gzfile_get16 _((const unsigned char*));
_                 116 ext/zlib/zlib.c static unsigned long gzfile_get32 _((const unsigned char*));
_                 117 ext/zlib/zlib.c static void gzfile_set32 _((unsigned long n, unsigned char*));
_                 118 ext/zlib/zlib.c static void gzfile_make_header _((struct gzfile*));
_                 119 ext/zlib/zlib.c static void gzfile_make_footer _((struct gzfile*));
_                 120 ext/zlib/zlib.c static void gzfile_read_header _((struct gzfile*));
_                 121 ext/zlib/zlib.c static void gzfile_check_footer _((struct gzfile*));
_                 122 ext/zlib/zlib.c static void gzfile_write _((struct gzfile*, Bytef*, uInt));
_                 123 ext/zlib/zlib.c static long gzfile_read_more _((struct gzfile*));
_                 124 ext/zlib/zlib.c static void gzfile_calc_crc _((struct gzfile*, VALUE));
_                 125 ext/zlib/zlib.c static VALUE gzfile_read _((struct gzfile*, int));
_                 126 ext/zlib/zlib.c static VALUE gzfile_read_all _((struct gzfile*));
_                 127 ext/zlib/zlib.c static void gzfile_ungetc _((struct gzfile*, int));
_                 128 ext/zlib/zlib.c static VALUE gzfile_finalize _((VALUE));
_                 129 ext/zlib/zlib.c static void gzfile_writer_end _((struct gzfile*));
_                 130 ext/zlib/zlib.c static void gzfile_reader_end _((struct gzfile*));
_                 131 ext/zlib/zlib.c static void gzfile_reader_rewind _((struct gzfile*));
_                 132 ext/zlib/zlib.c static VALUE gzfile_reader_get_unused _((struct gzfile*));
_                 133 ext/zlib/zlib.c static struct gzfile *get_gzfile _((VALUE));
_                 134 ext/zlib/zlib.c static VALUE gzfile_ensure_close _((VALUE));
_                 135 ext/zlib/zlib.c static VALUE rb_gzfile_s_wrap _((int, VALUE*, VALUE));
_                 136 ext/zlib/zlib.c static VALUE gzfile_s_open _((int, VALUE*, VALUE, const char*));
_                 138 ext/zlib/zlib.c static VALUE rb_gzfile_to_io _((VALUE));
_                 139 ext/zlib/zlib.c static VALUE rb_gzfile_crc _((VALUE));
_                 140 ext/zlib/zlib.c static VALUE rb_gzfile_mtime _((VALUE));
_                 141 ext/zlib/zlib.c static VALUE rb_gzfile_level _((VALUE));
_                 142 ext/zlib/zlib.c static VALUE rb_gzfile_os_code _((VALUE));
_                 143 ext/zlib/zlib.c static VALUE rb_gzfile_orig_name _((VALUE));
_                 144 ext/zlib/zlib.c static VALUE rb_gzfile_comment _((VALUE));
_                 145 ext/zlib/zlib.c static VALUE rb_gzfile_lineno _((VALUE));
_                 146 ext/zlib/zlib.c static VALUE rb_gzfile_set_lineno _((VALUE, VALUE));
_                 147 ext/zlib/zlib.c static VALUE rb_gzfile_set_mtime _((VALUE, VALUE));
_                 148 ext/zlib/zlib.c static VALUE rb_gzfile_set_orig_name _((VALUE, VALUE));
_                 149 ext/zlib/zlib.c static VALUE rb_gzfile_set_comment _((VALUE, VALUE));
_                 150 ext/zlib/zlib.c static VALUE rb_gzfile_close _((VALUE));
_                 151 ext/zlib/zlib.c static VALUE rb_gzfile_finish _((VALUE));
_                 152 ext/zlib/zlib.c static VALUE rb_gzfile_closed_p _((VALUE));
_                 153 ext/zlib/zlib.c static VALUE rb_gzfile_eof_p _((VALUE));
_                 154 ext/zlib/zlib.c static VALUE rb_gzfile_sync _((VALUE));
_                 155 ext/zlib/zlib.c static VALUE rb_gzfile_set_sync _((VALUE, VALUE));
_                 156 ext/zlib/zlib.c static VALUE rb_gzfile_total_in _((VALUE));
_                 157 ext/zlib/zlib.c static VALUE rb_gzfile_total_out _((VALUE));
_                 159 ext/zlib/zlib.c static VALUE rb_gzwriter_s_allocate _((VALUE));
_                 160 ext/zlib/zlib.c static VALUE rb_gzwriter_s_open _((int, VALUE*, VALUE));
_                 161 ext/zlib/zlib.c static VALUE rb_gzwriter_initialize _((int, VALUE*, VALUE));
_                 162 ext/zlib/zlib.c static VALUE rb_gzwriter_flush _((int, VALUE*, VALUE));
_                 163 ext/zlib/zlib.c static VALUE rb_gzwriter_write _((VALUE, VALUE));
_                 164 ext/zlib/zlib.c static VALUE rb_gzwriter_putc _((VALUE, VALUE));
_                 166 ext/zlib/zlib.c static VALUE rb_gzreader_s_allocate _((VALUE));
_                 167 ext/zlib/zlib.c static VALUE rb_gzreader_s_open _((int, VALUE*, VALUE));
_                 168 ext/zlib/zlib.c static VALUE rb_gzreader_initialize _((VALUE, VALUE));
_                 169 ext/zlib/zlib.c static VALUE rb_gzreader_rewind _((VALUE));
_                 170 ext/zlib/zlib.c static VALUE rb_gzreader_unused _((VALUE));
_                 171 ext/zlib/zlib.c static VALUE rb_gzreader_read _((int, VALUE*, VALUE));
_                 172 ext/zlib/zlib.c static VALUE rb_gzreader_getc _((VALUE));
_                 173 ext/zlib/zlib.c static VALUE rb_gzreader_readchar _((VALUE));
_                 174 ext/zlib/zlib.c static VALUE rb_gzreader_each_byte _((VALUE));
_                 175 ext/zlib/zlib.c static VALUE rb_gzreader_ungetc _((VALUE, VALUE));
_                 176 ext/zlib/zlib.c static void gzreader_skip_linebreaks _((struct gzfile*));
_                 177 ext/zlib/zlib.c static VALUE gzreader_gets _((int, VALUE*, VALUE));
_                 178 ext/zlib/zlib.c static VALUE rb_gzreader_gets _((int, VALUE*, VALUE));
_                 179 ext/zlib/zlib.c static VALUE rb_gzreader_readline _((int, VALUE*, VALUE));
_                 180 ext/zlib/zlib.c static VALUE rb_gzreader_each _((int, VALUE*, VALUE));
_                 181 ext/zlib/zlib.c static VALUE rb_gzreader_readlines _((int, VALUE*, VALUE));
_                 185 ext/zlib/zlib.c void Init_zlib _((void));
_                 263 ext/zlib/zlib.c     uLong (*func) _((uLong, const Bytef *, uInt));
_                 357 ext/zlib/zlib.c 	int (*reset) _((z_streamp));
_                 358 ext/zlib/zlib.c 	int (*end) _((z_streamp));
_                 359 ext/zlib/zlib.c 	int (*run) _((z_streamp, int));
_                1761 ext/zlib/zlib.c     void (*endfunc) _((struct gzfile *));
_                  32 file.c         int flock _((int, int));
_                  44 file.c         VALUE rb_time_new _((time_t, time_t));
_                  57 file.c         char *strrchr _((const char*,const char));
_                 105 file.c         static long apply2files _((void (*)(const char *, void *), VALUE, void *));
_                 108 file.c             void (*func)_((const char *, void *));
_                 210 file.c         static VALUE rb_stat_dev _((VALUE));
_                 211 file.c         static VALUE rb_stat_ino _((VALUE));
_                 212 file.c         static VALUE rb_stat_mode _((VALUE));
_                 213 file.c         static VALUE rb_stat_nlink _((VALUE));
_                 214 file.c         static VALUE rb_stat_uid _((VALUE));
_                 215 file.c         static VALUE rb_stat_gid _((VALUE));
_                 216 file.c         static VALUE rb_stat_rdev _((VALUE));
_                 217 file.c         static VALUE rb_stat_size _((VALUE));
_                 218 file.c         static VALUE rb_stat_blksize _((VALUE));
_                 219 file.c         static VALUE rb_stat_blocks _((VALUE));
_                 220 file.c         static VALUE rb_stat_atime _((VALUE));
_                 221 file.c         static VALUE rb_stat_mtime _((VALUE));
_                 222 file.c         static VALUE rb_stat_ctime _((VALUE));
_                 594 file.c         	VALUE (*func)_((VALUE));
_                1689 file.c         static void chmod_internal _((const char *, void *));
_                1767 file.c         static void lchmod_internal _((const char *, void *));
_                1818 file.c         static void chown_internal _((const char *, void *));
_                1911 file.c         static void lchown_internal _((const char *, void *));
_                1973 file.c         static void utime_internal _((const char *, void *));
_                2056 file.c         NORETURN(static void sys_fail2 _((VALUE,VALUE)));
_                2175 file.c         static void unlink_internal _((const char *, void *));
_                2453 file.c         static int is_absolute_path _((const char*));
_                2900 file.c         static VALUE rb_file_join _((VALUE ary, VALUE sep));
_                3439 file.c         static VALUE rb_stat_s_alloc _((VALUE));
_                  51 gc.c           void re_free_registers _((struct re_registers*));
_                  52 gc.c           void rb_io_fptr_finalize _((struct OpenFile*));
_                 559 gc.c           static void gc_mark _((VALUE ptr, int lev));
_                 560 gc.c           static void gc_mark_children _((VALUE ptr, int lev));
_                 997 gc.c           static void obj_free _((VALUE));
_                1795 gc.c           	rb_protect((VALUE(*)_((VALUE)))run_single_final, (VALUE)args, &status);
_                1803 gc.c           	    rb_protect((VALUE(*)_((VALUE)))run_single_final, (VALUE)args, &status);
_                 226 hash.c         static VALUE hash_alloc _((VALUE));
_                  15 inits.c        void Init_Array _((void));
_                  16 inits.c        void Init_Bignum _((void));
_                  17 inits.c        void Init_Binding _((void));
_                  18 inits.c        void Init_Comparable _((void));
_                  19 inits.c        void Init_Dir _((void));
_                  20 inits.c        void Init_Enumerable _((void));
_                  21 inits.c        void Init_Exception _((void));
_                  22 inits.c        void Init_syserr _((void));
_                  23 inits.c        void Init_eval _((void));
_                  24 inits.c        void Init_load _((void));
_                  25 inits.c        void Init_Proc _((void));
_                  26 inits.c        void Init_Thread _((void));
_                  27 inits.c        void Init_File _((void));
_                  28 inits.c        void Init_GC _((void));
_                  29 inits.c        void Init_Hash _((void));
_                  30 inits.c        void Init_IO _((void));
_                  31 inits.c        void Init_Math _((void));
_                  32 inits.c        void Init_marshal _((void));
_                  33 inits.c        void Init_Numeric _((void));
_                  34 inits.c        void Init_Object _((void));
_                  35 inits.c        void Init_pack _((void));
_                  36 inits.c        void Init_Precision _((void));
_                  37 inits.c        void Init_sym _((void));
_                  38 inits.c        void Init_process _((void));
_                  39 inits.c        void Init_Random _((void));
_                  40 inits.c        void Init_Range _((void));
_                  41 inits.c        void Init_Regexp _((void));
_                  42 inits.c        void Init_signal _((void));
_                  43 inits.c        void Init_String _((void));
_                  44 inits.c        void Init_Struct _((void));
_                  45 inits.c        void Init_Time _((void));
_                  46 inits.c        void Init_var_tables _((void));
_                  47 inits.c        void Init_version _((void));
_                  23 intern.h       void rb_mem_clear _((register VALUE*, register long));
_                  24 intern.h       VALUE rb_assoc_new _((VALUE, VALUE));
_                  25 intern.h       VALUE rb_check_array_type _((VALUE));
_                  26 intern.h       VALUE rb_ary_new _((void));
_                  27 intern.h       VALUE rb_ary_new2 _((long));
_                  29 intern.h       VALUE rb_ary_new4 _((long, const VALUE *));
_                  30 intern.h       VALUE rb_ary_freeze _((VALUE));
_                  31 intern.h       VALUE rb_ary_aref _((int, VALUE*, VALUE));
_                  32 intern.h       void rb_ary_store _((VALUE, long, VALUE));
_                  33 intern.h       VALUE rb_ary_dup _((VALUE));
_                  34 intern.h       VALUE rb_ary_to_ary _((VALUE));
_                  35 intern.h       VALUE rb_ary_to_s _((VALUE));
_                  36 intern.h       VALUE rb_ary_push _((VALUE, VALUE));
_                  37 intern.h       VALUE rb_ary_pop _((VALUE));
_                  38 intern.h       VALUE rb_ary_shift _((VALUE));
_                  39 intern.h       VALUE rb_ary_unshift _((VALUE, VALUE));
_                  40 intern.h       VALUE rb_ary_entry _((VALUE, long));
_                  41 intern.h       VALUE rb_ary_each _((VALUE));
_                  42 intern.h       VALUE rb_ary_join _((VALUE, VALUE));
_                  43 intern.h       VALUE rb_ary_print_on _((VALUE, VALUE));
_                  44 intern.h       VALUE rb_ary_reverse _((VALUE));
_                  45 intern.h       VALUE rb_ary_sort _((VALUE));
_                  46 intern.h       VALUE rb_ary_sort_bang _((VALUE));
_                  47 intern.h       VALUE rb_ary_delete _((VALUE, VALUE));
_                  48 intern.h       VALUE rb_ary_delete_at _((VALUE, long));
_                  49 intern.h       VALUE rb_ary_clear _((VALUE));
_                  50 intern.h       VALUE rb_ary_plus _((VALUE, VALUE));
_                  51 intern.h       VALUE rb_ary_concat _((VALUE, VALUE));
_                  52 intern.h       VALUE rb_ary_assoc _((VALUE, VALUE));
_                  53 intern.h       VALUE rb_ary_rassoc _((VALUE, VALUE));
_                  54 intern.h       VALUE rb_ary_includes _((VALUE, VALUE));
_                  55 intern.h       VALUE rb_ary_cmp _((VALUE, VALUE));
_                  56 intern.h       VALUE rb_protect_inspect _((VALUE(*)(ANYARGS),VALUE,VALUE));
_                  57 intern.h       VALUE rb_inspecting_p _((VALUE));
_                  58 intern.h       VALUE rb_check_array_value _((VALUE));
_                  59 intern.h       VALUE rb_values_at _((VALUE, long, int, VALUE*, VALUE(*) _((VALUE,long))));
_                  61 intern.h       VALUE rb_big_clone _((VALUE));
_                  62 intern.h       void rb_big_2comp _((VALUE));
_                  63 intern.h       VALUE rb_big_norm _((VALUE));
_                  64 intern.h       VALUE rb_uint2big _((unsigned long));
_                  65 intern.h       VALUE rb_int2big _((long));
_                  66 intern.h       VALUE rb_uint2inum _((unsigned long));
_                  67 intern.h       VALUE rb_int2inum _((long));
_                  68 intern.h       VALUE rb_cstr_to_inum _((const char*, int, int));
_                  69 intern.h       VALUE rb_str_to_inum _((VALUE, int, int));
_                  70 intern.h       VALUE rb_cstr2inum _((const char*, int));
_                  71 intern.h       VALUE rb_str2inum _((VALUE, int));
_                  72 intern.h       VALUE rb_big2str _((VALUE, int));
_                  73 intern.h       long rb_big2long _((VALUE));
_                  75 intern.h       unsigned long rb_big2ulong _((VALUE));
_                  78 intern.h       VALUE rb_ll2inum _((LONG_LONG));
_                  79 intern.h       VALUE rb_ull2inum _((unsigned LONG_LONG));
_                  80 intern.h       LONG_LONG rb_big2ll _((VALUE));
_                  81 intern.h       unsigned LONG_LONG rb_big2ull _((VALUE));
_                  83 intern.h       void rb_quad_pack _((char*,VALUE));
_                  84 intern.h       VALUE rb_quad_unpack _((const char*,int));
_                  85 intern.h       VALUE rb_dbl2big _((double));
_                  86 intern.h       double rb_big2dbl _((VALUE));
_                  87 intern.h       VALUE rb_big_plus _((VALUE, VALUE));
_                  88 intern.h       VALUE rb_big_minus _((VALUE, VALUE));
_                  89 intern.h       VALUE rb_big_mul _((VALUE, VALUE));
_                  90 intern.h       VALUE rb_big_divmod _((VALUE, VALUE));
_                  91 intern.h       VALUE rb_big_pow _((VALUE, VALUE));
_                  92 intern.h       VALUE rb_big_and _((VALUE, VALUE));
_                  93 intern.h       VALUE rb_big_or _((VALUE, VALUE));
_                  94 intern.h       VALUE rb_big_xor _((VALUE, VALUE));
_                  95 intern.h       VALUE rb_big_lshift _((VALUE, VALUE));
_                  96 intern.h       VALUE rb_big_rand _((VALUE, double*));
_                  98 intern.h       VALUE rb_class_boot _((VALUE));
_                  99 intern.h       VALUE rb_class_new _((VALUE));
_                 100 intern.h       VALUE rb_mod_init_copy _((VALUE, VALUE));
_                 101 intern.h       VALUE rb_class_init_copy _((VALUE, VALUE));
_                 102 intern.h       VALUE rb_singleton_class_clone _((VALUE));
_                 103 intern.h       void rb_singleton_class_attached _((VALUE,VALUE));
_                 104 intern.h       VALUE rb_make_metaclass _((VALUE, VALUE));
_                 105 intern.h       void rb_check_inheritable _((VALUE));
_                 106 intern.h       VALUE rb_class_inherited _((VALUE, VALUE));
_                 107 intern.h       VALUE rb_define_class_id _((ID, VALUE));
_                 108 intern.h       VALUE rb_module_new _((void));
_                 109 intern.h       VALUE rb_define_module_id _((ID));
_                 110 intern.h       VALUE rb_mod_included_modules _((VALUE));
_                 111 intern.h       VALUE rb_mod_include_p _((VALUE, VALUE));
_                 112 intern.h       VALUE rb_mod_ancestors _((VALUE));
_                 113 intern.h       VALUE rb_class_instance_methods _((int, VALUE*, VALUE));
_                 114 intern.h       VALUE rb_class_public_instance_methods _((int, VALUE*, VALUE));
_                 115 intern.h       VALUE rb_class_protected_instance_methods _((int, VALUE*, VALUE));
_                 116 intern.h       VALUE rb_class_private_instance_methods _((int, VALUE*, VALUE));
_                 117 intern.h       VALUE rb_obj_singleton_methods _((int, VALUE*, VALUE));
_                 118 intern.h       void rb_define_method_id _((VALUE, ID, VALUE (*)(ANYARGS), int));
_                 119 intern.h       void rb_frozen_class_p _((VALUE));
_                 120 intern.h       void rb_undef _((VALUE, ID));
_                 121 intern.h       void rb_define_protected_method _((VALUE, const char*, VALUE (*)(ANYARGS), int));
_                 122 intern.h       void rb_define_private_method _((VALUE, const char*, VALUE (*)(ANYARGS), int));
_                 123 intern.h       void rb_define_singleton_method _((VALUE, const char*, VALUE(*)(ANYARGS), int));
_                 124 intern.h       VALUE rb_singleton_class _((VALUE));
_                 126 intern.h       int rb_cmpint _((VALUE, VALUE, VALUE));
_                 127 intern.h       NORETURN(void rb_cmperr _((VALUE, VALUE)));
_                 131 intern.h       VALUE rb_exc_new _((VALUE, const char*, long));
_                 132 intern.h       VALUE rb_exc_new2 _((VALUE, const char*));
_                 133 intern.h       VALUE rb_exc_new3 _((VALUE, VALUE));
_                 136 intern.h       NORETURN(void rb_invalid_str _((const char*, const char*)));
_                 139 intern.h       NORETURN(void rb_load_fail _((const char*)));
_                 140 intern.h       NORETURN(void rb_error_frozen _((const char*)));
_                 141 intern.h       void rb_check_frozen _((VALUE));
_                 144 intern.h       void ruby_set_current_source _((void));
_                 145 intern.h       NORETURN(void rb_exc_raise _((VALUE)));
_                 146 intern.h       NORETURN(void rb_exc_fatal _((VALUE)));
_                 147 intern.h       VALUE rb_f_exit _((int,VALUE*));
_                 148 intern.h       VALUE rb_f_abort _((int,VALUE*));
_                 149 intern.h       void rb_remove_method _((VALUE, const char*));
_                 153 intern.h       void rb_define_alloc_func _((VALUE, VALUE (*)(VALUE)));
_                 154 intern.h       void rb_undef_alloc_func _((VALUE));
_                 155 intern.h       void rb_clear_cache _((void));
_                 156 intern.h       void rb_clear_cache_by_class _((VALUE));
_                 157 intern.h       void rb_alias _((VALUE, ID, ID));
_                 158 intern.h       void rb_attr _((VALUE,ID,int,int,int));
_                 159 intern.h       int rb_method_boundp _((VALUE, ID, int));
_                 160 intern.h       VALUE rb_dvar_defined _((ID));
_                 161 intern.h       VALUE rb_dvar_curr _((ID));
_                 162 intern.h       VALUE rb_dvar_ref _((ID));
_                 163 intern.h       void rb_dvar_asgn _((ID, VALUE));
_                 164 intern.h       void rb_dvar_push _((ID, VALUE));
_                 165 intern.h       VALUE *rb_svar _((int));
_                 166 intern.h       VALUE rb_eval_cmd _((VALUE, VALUE, int));
_                 167 intern.h       int rb_obj_respond_to _((VALUE, ID, int));
_                 168 intern.h       int rb_respond_to _((VALUE, ID));
_                 169 intern.h       void rb_interrupt _((void));
_                 170 intern.h       VALUE rb_apply _((VALUE, ID, VALUE));
_                 171 intern.h       void rb_backtrace _((void));
_                 172 intern.h       ID rb_frame_last_func _((void));
_                 173 intern.h       VALUE rb_obj_instance_eval _((int, VALUE*, VALUE));
_                 174 intern.h       VALUE rb_mod_module_eval _((int, VALUE*, VALUE));
_                 175 intern.h       void rb_load _((VALUE, int));
_                 176 intern.h       void rb_load_protect _((VALUE, int, int*));
_                 177 intern.h       NORETURN(void rb_jump_tag _((int)));
_                 178 intern.h       int rb_provided _((const char*));
_                 179 intern.h       void rb_provide _((const char*));
_                 180 intern.h       VALUE rb_f_require _((VALUE, VALUE));
_                 181 intern.h       VALUE rb_require_safe _((VALUE, int));
_                 182 intern.h       void rb_obj_call_init _((VALUE, int, VALUE*));
_                 183 intern.h       VALUE rb_class_new_instance _((int, VALUE*, VALUE));
_                 184 intern.h       VALUE rb_block_proc _((void));
_                 185 intern.h       VALUE rb_f_lambda _((void));
_                 186 intern.h       VALUE rb_proc_new _((VALUE (*)(ANYARGS/* VALUE yieldarg[, VALUE procarg] */), VALUE));
_                 187 intern.h       VALUE rb_protect _((VALUE (*)(VALUE), VALUE, int*));
_                 188 intern.h       void rb_set_end_proc _((void (*)(VALUE), VALUE));
_                 189 intern.h       void rb_mark_end_proc _((void));
_                 190 intern.h       void rb_exec_end_proc _((void));
_                 191 intern.h       void ruby_finalize _((void));
_                 192 intern.h       NORETURN(void ruby_stop _((int)));
_                 193 intern.h       int ruby_cleanup _((int));
_                 194 intern.h       int ruby_exec _((void));
_                 195 intern.h       void rb_gc_mark_threads _((void));
_                 196 intern.h       void rb_thread_start_timer _((void));
_                 197 intern.h       void rb_thread_stop_timer _((void));
_                 198 intern.h       void rb_thread_schedule _((void));
_                 199 intern.h       void rb_thread_wait_fd _((int));
_                 200 intern.h       int rb_thread_fd_writable _((int));
_                 201 intern.h       void rb_thread_fd_close _((int));
_                 202 intern.h       int rb_thread_alone _((void));
_                 203 intern.h       void rb_thread_polling _((void));
_                 204 intern.h       void rb_thread_sleep _((int));
_                 205 intern.h       void rb_thread_sleep_forever _((void));
_                 206 intern.h       VALUE rb_thread_stop _((void));
_                 207 intern.h       VALUE rb_thread_wakeup _((VALUE));
_                 208 intern.h       VALUE rb_thread_run _((VALUE));
_                 209 intern.h       VALUE rb_thread_kill _((VALUE));
_                 210 intern.h       VALUE rb_thread_create _((VALUE (*)(ANYARGS), void*));
_                 211 intern.h       void rb_thread_interrupt _((void));
_                 212 intern.h       void rb_thread_trap_eval _((VALUE, int, int));
_                 213 intern.h       void rb_thread_signal_raise _((char*));
_                 214 intern.h       void rb_thread_signal_exit _((void));
_                 215 intern.h       int rb_thread_select _((int, fd_set *, fd_set *, fd_set *, struct timeval *));
_                 216 intern.h       void rb_thread_wait_for _((struct timeval));
_                 217 intern.h       VALUE rb_thread_current _((void));
_                 218 intern.h       VALUE rb_thread_main _((void));
_                 219 intern.h       VALUE rb_thread_local_aref _((VALUE, ID));
_                 220 intern.h       VALUE rb_thread_local_aset _((VALUE, ID, VALUE));
_                 221 intern.h       void rb_thread_atfork _((void));
_                 224 intern.h       int eaccess _((const char*, int));
_                 225 intern.h       VALUE rb_file_s_expand_path _((int, VALUE *));
_                 226 intern.h       VALUE rb_file_expand_path _((VALUE, VALUE));
_                 227 intern.h       void rb_file_const _((const char*, VALUE));
_                 228 intern.h       int rb_find_file_ext _((VALUE*, const char* const*));
_                 229 intern.h       VALUE rb_find_file _((VALUE));
_                 230 intern.h       char *rb_path_next _((const char *));
_                 231 intern.h       char *rb_path_skip_prefix _((const char *));
_                 232 intern.h       char *rb_path_last_separator _((const char *));
_                 233 intern.h       char *rb_path_end _((const char *));
_                 236 intern.h       int ruby_stack_check _((void));
_                 237 intern.h       int ruby_stack_length _((VALUE**));
_                 238 intern.h       char *rb_source_filename _((const char*));
_                 239 intern.h       void rb_gc_mark_locations _((VALUE*, VALUE*));
_                 240 intern.h       void rb_mark_tbl _((struct st_table*));
_                 241 intern.h       void rb_mark_hash _((struct st_table*));
_                 242 intern.h       void rb_gc_mark_maybe _((VALUE));
_                 243 intern.h       void rb_gc_mark _((VALUE));
_                 244 intern.h       void rb_gc_force_recycle _((VALUE));
_                 245 intern.h       void rb_gc _((void));
_                 246 intern.h       void rb_gc_copy_finalizer _((VALUE,VALUE));
_                 247 intern.h       void rb_gc_finalize_deferred _((void));
_                 248 intern.h       void rb_gc_call_finalizer_at_exit _((void));
_                 249 intern.h       VALUE rb_gc_enable _((void));
_                 250 intern.h       VALUE rb_gc_disable _((void));
_                 251 intern.h       VALUE rb_gc_start _((void));
_                 253 intern.h       void st_foreach_safe _((struct st_table *, int (*)(ANYARGS), unsigned long));
_                 254 intern.h       void rb_hash_foreach _((VALUE, int (*)(ANYARGS), VALUE));
_                 255 intern.h       VALUE rb_hash _((VALUE));
_                 256 intern.h       VALUE rb_hash_new _((void));
_                 257 intern.h       VALUE rb_hash_freeze _((VALUE));
_                 258 intern.h       VALUE rb_hash_aref _((VALUE, VALUE));
_                 259 intern.h       VALUE rb_hash_aset _((VALUE, VALUE, VALUE));
_                 260 intern.h       VALUE rb_hash_delete_if _((VALUE));
_                 261 intern.h       VALUE rb_hash_delete _((VALUE,VALUE));
_                 262 intern.h       int rb_path_check _((char*));
_                 263 intern.h       int rb_env_path_tainted _((void));
_                 271 intern.h       VALUE rb_io_write _((VALUE, VALUE));
_                 272 intern.h       VALUE rb_io_gets _((VALUE));
_                 273 intern.h       VALUE rb_io_getc _((VALUE));
_                 274 intern.h       VALUE rb_io_ungetc _((VALUE, VALUE));
_                 275 intern.h       VALUE rb_io_close _((VALUE));
_                 276 intern.h       VALUE rb_io_eof _((VALUE));
_                 277 intern.h       VALUE rb_io_binmode _((VALUE));
_                 278 intern.h       VALUE rb_io_addstr _((VALUE, VALUE));
_                 279 intern.h       VALUE rb_io_printf _((int, VALUE*, VALUE));
_                 280 intern.h       VALUE rb_io_print _((int, VALUE*, VALUE));
_                 281 intern.h       VALUE rb_io_puts _((int, VALUE*, VALUE));
_                 282 intern.h       VALUE rb_file_open _((const char*, const char*));
_                 283 intern.h       VALUE rb_gets _((void));
_                 284 intern.h       void rb_write_error _((const char*));
_                 285 intern.h       void rb_write_error2 _((const char*, long));
_                 287 intern.h       VALUE rb_marshal_dump _((VALUE, VALUE));
_                 288 intern.h       VALUE rb_marshal_load _((VALUE));
_                 290 intern.h       void rb_num_zerodiv _((void));
_                 291 intern.h       VALUE rb_num_coerce_bin _((VALUE, VALUE));
_                 292 intern.h       VALUE rb_num_coerce_cmp _((VALUE, VALUE));
_                 293 intern.h       VALUE rb_num_coerce_relop _((VALUE, VALUE));
_                 294 intern.h       VALUE rb_float_new _((double));
_                 295 intern.h       VALUE rb_num2fix _((VALUE));
_                 296 intern.h       VALUE rb_fix2str _((VALUE, int));
_                 297 intern.h       VALUE rb_dbl_cmp _((double, double));
_                 299 intern.h       int rb_eql _((VALUE, VALUE));
_                 300 intern.h       VALUE rb_any_to_s _((VALUE));
_                 301 intern.h       VALUE rb_inspect _((VALUE));
_                 302 intern.h       VALUE rb_obj_is_instance_of _((VALUE, VALUE));
_                 303 intern.h       VALUE rb_obj_is_kind_of _((VALUE, VALUE));
_                 304 intern.h       VALUE rb_obj_alloc _((VALUE));
_                 305 intern.h       VALUE rb_obj_clone _((VALUE));
_                 306 intern.h       VALUE rb_obj_dup _((VALUE));
_                 307 intern.h       VALUE rb_obj_init_copy _((VALUE,VALUE));
_                 308 intern.h       VALUE rb_obj_taint _((VALUE));
_                 309 intern.h       VALUE rb_obj_tainted _((VALUE));
_                 310 intern.h       VALUE rb_obj_untaint _((VALUE));
_                 311 intern.h       VALUE rb_obj_freeze _((VALUE));
_                 312 intern.h       VALUE rb_obj_id _((VALUE));
_                 313 intern.h       VALUE rb_obj_class _((VALUE));
_                 314 intern.h       VALUE rb_class_real _((VALUE));
_                 315 intern.h       VALUE rb_class_inherited_p _((VALUE, VALUE));
_                 316 intern.h       VALUE rb_convert_type _((VALUE,int,const char*,const char*));
_                 317 intern.h       VALUE rb_check_convert_type _((VALUE,int,const char*,const char*));
_                 318 intern.h       VALUE rb_to_int _((VALUE));
_                 319 intern.h       VALUE rb_Integer _((VALUE));
_                 320 intern.h       VALUE rb_Float _((VALUE));
_                 321 intern.h       VALUE rb_String _((VALUE));
_                 322 intern.h       VALUE rb_Array _((VALUE));
_                 323 intern.h       double rb_cstr_to_dbl _((const char*, int));
_                 324 intern.h       double rb_str_to_dbl _((VALUE, int));
_                 328 intern.h       int ruby_yyparse _((void));
_                 329 intern.h       ID rb_id_attrset _((ID));
_                 330 intern.h       void rb_parser_append_print _((void));
_                 331 intern.h       void rb_parser_while_loop _((int, int));
_                 332 intern.h       int ruby_parser_stack_on_heap _((void));
_                 333 intern.h       void rb_gc_mark_parser _((void));
_                 334 intern.h       int rb_is_const_id _((ID));
_                 335 intern.h       int rb_is_instance_id _((ID));
_                 336 intern.h       int rb_is_class_id _((ID));
_                 337 intern.h       int rb_is_local_id _((ID));
_                 338 intern.h       int rb_is_junk_id _((ID));
_                 339 intern.h       int rb_symname_p _((const char*));
_                 340 intern.h       VALUE rb_backref_get _((void));
_                 341 intern.h       void rb_backref_set _((VALUE));
_                 342 intern.h       VALUE rb_lastline_get _((void));
_                 343 intern.h       void rb_lastline_set _((VALUE));
_                 344 intern.h       VALUE rb_sym_all_symbols _((void));
_                 346 intern.h       int rb_proc_exec _((const char*));
_                 347 intern.h       VALUE rb_f_exec _((int,VALUE*));
_                 348 intern.h       int rb_waitpid _((int,int*,int));
_                 349 intern.h       void rb_syswait _((int));
_                 350 intern.h       VALUE rb_proc_times _((VALUE));
_                 351 intern.h       VALUE rb_detach_process _((int));
_                 353 intern.h       VALUE rb_range_new _((VALUE, VALUE, int));
_                 354 intern.h       VALUE rb_range_beg_len _((VALUE, long*, long*, long, int));
_                 355 intern.h       VALUE rb_length_by_each _((VALUE));
_                 357 intern.h       int rb_memcmp _((char*,char*,long));
_                 358 intern.h       int rb_memcicmp _((char*,char*,long));
_                 359 intern.h       long rb_memsearch _((char*,long,char*,long));
_                 360 intern.h       VALUE rb_reg_nth_defined _((int, VALUE));
_                 361 intern.h       VALUE rb_reg_nth_match _((int, VALUE));
_                 362 intern.h       VALUE rb_reg_last_match _((VALUE));
_                 363 intern.h       VALUE rb_reg_match_pre _((VALUE));
_                 364 intern.h       VALUE rb_reg_match_post _((VALUE));
_                 365 intern.h       VALUE rb_reg_match_last _((VALUE));
_                 366 intern.h       VALUE rb_reg_new _((const char*, long, int));
_                 367 intern.h       VALUE rb_reg_match _((VALUE, VALUE));
_                 368 intern.h       VALUE rb_reg_match2 _((VALUE));
_                 369 intern.h       int rb_reg_options _((VALUE));
_                 370 intern.h       void rb_set_kcode _((const char*));
_                 371 intern.h       const char* rb_get_kcode _((void));
_                 375 intern.h       void rb_load_file _((const char*));
_                 376 intern.h       void ruby_script _((const char*));
_                 377 intern.h       void ruby_prog_init _((void));
_                 378 intern.h       void ruby_set_argv _((int, char**));
_                 379 intern.h       void ruby_process_options _((int, char**));
_                 380 intern.h       void ruby_load_script _((void));
_                 381 intern.h       void ruby_init_loadpath _((void));
_                 382 intern.h       void ruby_incpush _((const char*));
_                 384 intern.h       VALUE rb_f_kill _((int, VALUE*));
_                 385 intern.h       void rb_gc_mark_trap_list _((void));
_                 388 intern.h       void posix_signal _((int, RETSIGTYPE (*)(int)));
_                 390 intern.h       void rb_trap_exit _((void));
_                 391 intern.h       void rb_trap_exec _((void));
_                 392 intern.h       const char *ruby_signal_name _((int));
_                 394 intern.h       VALUE rb_f_sprintf _((int, VALUE*));
_                 396 intern.h       VALUE rb_str_new _((const char*, long));
_                 397 intern.h       VALUE rb_str_new2 _((const char*));
_                 398 intern.h       VALUE rb_str_new3 _((VALUE));
_                 399 intern.h       VALUE rb_str_new4 _((VALUE));
_                 400 intern.h       VALUE rb_str_new5 _((VALUE, const char*, long));
_                 401 intern.h       VALUE rb_tainted_str_new _((const char*, long));
_                 402 intern.h       VALUE rb_tainted_str_new2 _((const char*));
_                 403 intern.h       VALUE rb_str_buf_new _((long));
_                 404 intern.h       VALUE rb_str_buf_new2 _((const char*));
_                 405 intern.h       VALUE rb_str_buf_append _((VALUE, VALUE));
_                 406 intern.h       VALUE rb_str_buf_cat _((VALUE, const char*, long));
_                 407 intern.h       VALUE rb_str_buf_cat2 _((VALUE, const char*));
_                 408 intern.h       VALUE rb_obj_as_string _((VALUE));
_                 409 intern.h       VALUE rb_check_string_type _((VALUE));
_                 410 intern.h       VALUE rb_str_dup _((VALUE));
_                 411 intern.h       VALUE rb_str_locktmp _((VALUE));
_                 412 intern.h       VALUE rb_str_unlocktmp _((VALUE));
_                 413 intern.h       VALUE rb_str_dup_frozen _((VALUE));
_                 414 intern.h       VALUE rb_str_plus _((VALUE, VALUE));
_                 415 intern.h       VALUE rb_str_times _((VALUE, VALUE));
_                 416 intern.h       VALUE rb_str_substr _((VALUE, long, long));
_                 417 intern.h       void rb_str_modify _((VALUE));
_                 418 intern.h       VALUE rb_str_freeze _((VALUE));
_                 419 intern.h       VALUE rb_str_resize _((VALUE, long));
_                 420 intern.h       VALUE rb_str_cat _((VALUE, const char*, long));
_                 421 intern.h       VALUE rb_str_cat2 _((VALUE, const char*));
_                 422 intern.h       VALUE rb_str_append _((VALUE, VALUE));
_                 423 intern.h       VALUE rb_str_concat _((VALUE, VALUE));
_                 424 intern.h       int rb_str_hash _((VALUE));
_                 425 intern.h       int rb_str_cmp _((VALUE, VALUE));
_                 426 intern.h       VALUE rb_str_upto _((VALUE, VALUE, int));
_                 427 intern.h       void rb_str_update _((VALUE, long, long, VALUE));
_                 428 intern.h       VALUE rb_str_inspect _((VALUE));
_                 429 intern.h       VALUE rb_str_dump _((VALUE));
_                 430 intern.h       VALUE rb_str_split _((VALUE, const char*));
_                 431 intern.h       void rb_str_associate _((VALUE, VALUE));
_                 432 intern.h       VALUE rb_str_associated _((VALUE));
_                 433 intern.h       void rb_str_setter _((VALUE, ID, VALUE*));
_                 434 intern.h       VALUE rb_str_intern _((VALUE));
_                 438 intern.h       VALUE rb_struct_alloc _((VALUE, VALUE));
_                 439 intern.h       VALUE rb_struct_aref _((VALUE, VALUE));
_                 440 intern.h       VALUE rb_struct_aset _((VALUE, VALUE, VALUE));
_                 441 intern.h       VALUE rb_struct_getmember _((VALUE, ID));
_                 442 intern.h       VALUE rb_struct_iv_get _((VALUE, char*));
_                 443 intern.h       VALUE rb_struct_s_members _((VALUE));
_                 444 intern.h       VALUE rb_struct_members _((VALUE));
_                 446 intern.h       VALUE rb_time_new _((time_t, time_t));
_                 448 intern.h       VALUE rb_mod_name _((VALUE));
_                 449 intern.h       VALUE rb_class_path _((VALUE));
_                 450 intern.h       void rb_set_class_path _((VALUE, VALUE, const char*));
_                 451 intern.h       VALUE rb_path2class _((const char*));
_                 452 intern.h       void rb_name_class _((VALUE, ID));
_                 453 intern.h       VALUE rb_class_name _((VALUE));
_                 454 intern.h       void rb_autoload _((VALUE, ID, const char*));
_                 455 intern.h       VALUE rb_autoload_load _((VALUE, ID));
_                 456 intern.h       VALUE rb_autoload_p _((VALUE, ID));
_                 457 intern.h       void rb_gc_mark_global_tbl _((void));
_                 458 intern.h       VALUE rb_f_trace_var _((int, VALUE*));
_                 459 intern.h       VALUE rb_f_untrace_var _((int, VALUE*));
_                 460 intern.h       VALUE rb_f_global_variables _((void));
_                 461 intern.h       void rb_alias_variable _((ID, ID));
_                 462 intern.h       struct st_table* rb_generic_ivar_table _((VALUE));
_                 463 intern.h       void rb_copy_generic_ivar _((VALUE,VALUE));
_                 464 intern.h       void rb_mark_generic_ivar _((VALUE));
_                 465 intern.h       void rb_mark_generic_ivar_tbl _((void));
_                 466 intern.h       void rb_free_generic_ivar _((VALUE));
_                 467 intern.h       VALUE rb_ivar_get _((VALUE, ID));
_                 468 intern.h       VALUE rb_ivar_set _((VALUE, ID, VALUE));
_                 469 intern.h       VALUE rb_ivar_defined _((VALUE, ID));
_                 470 intern.h       VALUE rb_iv_set _((VALUE, const char*, VALUE));
_                 471 intern.h       VALUE rb_iv_get _((VALUE, const char*));
_                 472 intern.h       VALUE rb_attr_get _((VALUE, ID));
_                 473 intern.h       VALUE rb_obj_instance_variables _((VALUE));
_                 474 intern.h       VALUE rb_obj_remove_instance_variable _((VALUE, VALUE));
_                 475 intern.h       void *rb_mod_const_at _((VALUE, void*));
_                 476 intern.h       void *rb_mod_const_of _((VALUE, void*));
_                 477 intern.h       VALUE rb_const_list _((void*));
_                 478 intern.h       VALUE rb_mod_constants _((VALUE));
_                 479 intern.h       VALUE rb_mod_remove_const _((VALUE, VALUE));
_                 480 intern.h       int rb_const_defined _((VALUE, ID));
_                 481 intern.h       int rb_const_defined_at _((VALUE, ID));
_                 482 intern.h       int rb_const_defined_from _((VALUE, ID));
_                 483 intern.h       VALUE rb_const_get _((VALUE, ID));
_                 484 intern.h       VALUE rb_const_get_at _((VALUE, ID));
_                 485 intern.h       VALUE rb_const_get_from _((VALUE, ID));
_                 486 intern.h       void rb_const_set _((VALUE, ID, VALUE));
_                 487 intern.h       VALUE rb_mod_constants _((VALUE));
_                 488 intern.h       VALUE rb_mod_const_missing _((VALUE,VALUE));
_                 489 intern.h       VALUE rb_cvar_defined _((VALUE, ID));
_                 491 intern.h       void rb_cvar_set _((VALUE, ID, VALUE, int));
_                 492 intern.h       VALUE rb_cvar_get _((VALUE, ID));
_                 493 intern.h       void rb_cv_set _((VALUE, const char*, VALUE));
_                 494 intern.h       VALUE rb_cv_get _((VALUE, const char*));
_                 495 intern.h       void rb_define_class_variable _((VALUE, const char*, VALUE));
_                 496 intern.h       VALUE rb_mod_class_variables _((VALUE));
_                 497 intern.h       VALUE rb_mod_remove_cvar _((VALUE, VALUE));
_                 499 intern.h       void ruby_show_version _((void));
_                 500 intern.h       void ruby_show_copyright _((void));
_                  84 io.c           extern void Init_File _((void));
_                 130 io.c           struct timeval rb_time_interval _((VALUE));
_                 222 io.c           static void io_fflush _((FILE *, OpenFile *));
_                 315 io.c           static VALUE io_alloc _((VALUE));
_                2833 io.c           static void pipe_finalize _((OpenFile *fptr,int));
_                4966 io.c           static VALUE io_new_instance _((VALUE));
_                 119 marshal.c      static void w_long _((long, struct dump_arg*));
_                 356 marshal.c      static void w_object _((VALUE,struct dump_arg*,int));
_                 790 marshal.c      static VALUE r_object _((struct load_arg *arg));
_                  29 missing.h      extern double acosh _((double));
_                  30 missing.h      extern double asinh _((double));
_                  31 missing.h      extern double atanh _((double));
_                  35 missing.h      extern char *crypt _((char *, char *));
_                  39 missing.h      extern int dup2 _((int, int));
_                  43 missing.h      extern int finite _((double));
_                  47 missing.h      extern int flock _((int, int));
_                  57 missing.h      extern double hypot _((double, double));
_                  61 missing.h      extern double erf _((double));
_                  62 missing.h      extern double erfc _((double));
_                  69 missing.h      extern int isinf _((double));
_                  74 missing.h      extern int isnan _((double));
_                  84 missing.h      extern void *memmove _((void *, void *, int));
_                  94 missing.h      extern int strcasecmp _((char *, char *));
_                  98 missing.h      extern int strncasecmp _((char *, char *, int));
_                 102 missing.h      extern char *strchr _((char *, int));
_                 103 missing.h      extern char *strrchr _((char *, int));
_                 107 missing.h      extern char *strerror _((int));
_                 111 missing.h      extern size_t strftime _((char *, size_t, const char *, const struct tm *));
_                 115 missing.h      extern char *strstr _((char *, char *));
_                 125 missing.h      extern unsigned long strtoul _((char *, char **, int));
_                 135 missing.h      extern int vsnprintf _((char *, size_t n, char const *, va_list));
_                 346 node.h         NODE *rb_compile_cstr _((const char*, const char*, int, int));
_                 347 node.h         NODE *rb_compile_string _((const char*, VALUE, int));
_                 348 node.h         NODE *rb_compile_file _((const char*, VALUE, int));
_                 350 node.h         void rb_add_method _((VALUE, ID, NODE *, int));
_                 351 node.h         NODE *rb_node_newnode _((enum node_type,VALUE,VALUE,VALUE));
_                 353 node.h         NODE* rb_method_node _((VALUE klass, ID id));
_                 355 node.h         struct global_entry *rb_global_entry _((ID));
_                 356 node.h         VALUE rb_gvar_get _((struct global_entry *));
_                 357 node.h         VALUE rb_gvar_set _((struct global_entry *, VALUE));
_                 358 node.h         VALUE rb_gvar_defined _((struct global_entry *));
_                 374 node.h         void rb_add_event_hook _((rb_event_hook_func_t,rb_event_t));
_                 375 node.h         int rb_remove_event_hook _((rb_event_hook_func_t));
_                2429 numeric.c      static VALUE fix_rshift _((VALUE, VALUE));
_                1461 object.c       static VALUE rb_module_s_alloc _((VALUE));
_                1472 object.c       static VALUE rb_class_s_alloc _((VALUE));
_                1576 object.c       static VALUE rb_class_allocate_instance _((VALUE));
_                 334 pack.c         unsigned long rb_big2ulong_pack _((VALUE x));
_                 369 pack.c         static void encodes _((VALUE,char*,long,int));
_                 370 pack.c         static void qpencode _((VALUE,VALUE,long));
_                 372 pack.c         static int uv_to_utf8 _((char*,unsigned long));
_                 373 pack.c         static unsigned long utf8_to_uv _((char*,long*));
_                 135 parse.c        static void *rb_parser_malloc _((size_t));
_                 136 parse.c        static void *rb_parser_realloc _((void *, size_t));
_                 137 parse.c        static void *rb_parser_calloc _((size_t, size_t));
_                 138 parse.c        static void rb_parser_free _((void *));
_                  38 parse.y        static void *rb_parser_malloc _((size_t));
_                  39 parse.y        static void *rb_parser_realloc _((void *, size_t));
_                  40 parse.y        static void *rb_parser_calloc _((size_t, size_t));
_                  41 parse.y        static void rb_parser_free _((void *));
_                  40 process.c      struct timeval rb_time_interval _((VALUE));
_                1357 process.c          RETSIGTYPE (*hfunc)_((int));
_                1360 process.c          RETSIGTYPE (*qfunc)_((int));
_                1362 process.c          RETSIGTYPE (*ifunc)_((int));
_                 235 range.c            void (*func) _((VALUE, void*));
_                 337 range.c        	    rb_iterate((VALUE(*)_((VALUE)))str_step, (VALUE)args, step_i,
_                 420 range.c        	rb_iterate((VALUE(*)_((VALUE)))str_step, (VALUE)args, step_i,
_                 667 re.c           static VALUE match_alloc _((VALUE));
_                1206 re.c           static VALUE match_entry _((VALUE, long));
_                1376 re.c           static VALUE rb_reg_s_alloc _((VALUE));
_                  31 re.h           VALUE rb_reg_regcomp _((VALUE));
_                  32 re.h           long rb_reg_search _((VALUE, VALUE, long, long));
_                  33 re.h           VALUE rb_reg_regsub _((VALUE, VALUE, struct re_registers *));
_                  34 re.h           long rb_reg_adjust_startpos _((VALUE, VALUE, long, long));
_                  35 re.h           void rb_match_busy _((VALUE));
_                  36 re.h           VALUE rb_reg_quote _((VALUE));
_                  40 re.h           int rb_reg_mbclen2 _((unsigned int, VALUE));
_                  70 regex.c        void rb_trap_exec _((void));
_                 160 regex.c        static void store_jump _((char*, int, char*));
_                 161 regex.c        static void insert_jump _((int, char*, char*, char*));
_                 162 regex.c        static void store_jump_n _((char*, int, char*, unsigned));
_                 163 regex.c        static void insert_jump_n _((int, char*, char*, char*, unsigned));
_                 164 regex.c        static void insert_op _((int, char*, char*));
_                 165 regex.c        static void insert_op_2 _((int, char*, char*, int, int));
_                 166 regex.c        static int memcmp_translate _((unsigned char*, unsigned char*, int));
_                 178 regex.c        static void init_syntax_once _((void));
_                 180 regex.c        static void init_regs _((struct re_registers*, unsigned int));
_                 181 regex.c        static void bm_init_skip _((int *, unsigned char*, int, const unsigned char*));
_                 188 regex.c        void rb_warn _((const char*, ...));
_                 480 regex.c        static unsigned int asc_startpos _((const char *string, unsigned int pos));
_                 481 regex.c        static unsigned int euc_startpos _((const char *string, unsigned int pos));
_                 482 regex.c        static unsigned int sjis_startpos _((const char *string, unsigned int pos));
_                 483 regex.c        static unsigned int utf8_startpos _((const char *string, unsigned int pos));
_                3140 regex.c        static int re_match_exec _((struct re_pattern_buffer *, const char *, int, int, int,
_                  38 ruby.c         char *strchr _((const char*,const char));
_                  39 ruby.c         char *strrchr _((const char*,const char));
_                  40 ruby.c         char *strstr _((const char*,const char*));
_                  57 ruby.c         static void load_stdin _((void));
_                  58 ruby.c         static void load_file _((const char *, int));
_                  59 ruby.c         static void forbid_setid _((const char *));
_                 216 ruby.c         static inline void translate_char _((char *, int, int));
_                 332 ruby.c         extern void Init_ext _((void));
_                 431 ruby.c         static void proc_options _((int argc, char **argv));
_                 135 ruby.h         VALUE rb_int2inum _((long));
_                 139 ruby.h         VALUE rb_uint2inum _((unsigned long));
_                 145 ruby.h         VALUE rb_ll2inum _((LONG_LONG));
_                 147 ruby.h         VALUE rb_ull2inum _((unsigned LONG_LONG));
_                 218 ruby.h         void rb_check_type _((VALUE,int));
_                 221 ruby.h         VALUE rb_str_to_str _((VALUE));
_                 222 ruby.h         VALUE rb_string_value _((volatile VALUE*));
_                 223 ruby.h         char *rb_string_value_ptr _((volatile VALUE*));
_                 224 ruby.h         char *rb_string_value_cstr _((volatile VALUE*));
_                 230 ruby.h         void rb_check_safe_obj _((VALUE));
_                 231 ruby.h         void rb_check_safe_str _((VALUE));
_                 239 ruby.h         void rb_secure _((int));
_                 242 ruby.h         void rb_set_safe_level _((int));
_                 243 ruby.h         void rb_secure_update _((VALUE));
_                 245 ruby.h         long rb_num2long _((VALUE));
_                 246 ruby.h         unsigned long rb_num2ulong _((VALUE));
_                 250 ruby.h         long rb_num2int _((VALUE));
_                 252 ruby.h         long rb_fix2int _((VALUE));
_                 254 ruby.h         unsigned long rb_num2uint _((VALUE));
_                 256 ruby.h         unsigned long rb_fix2uint _((VALUE));
_                 266 ruby.h         LONG_LONG rb_num2ll _((VALUE));
_                 267 ruby.h         unsigned LONG_LONG rb_num2ull _((VALUE));
_                 277 ruby.h         double rb_num2dbl _((VALUE));
_                 281 ruby.h         char *rb_str2cstr _((VALUE,long*));
_                 289 ruby.h         VALUE rb_newobj _((void));
_                 371 ruby.h             void (*dmark) _((void*));
_                 372 ruby.h             void (*dfree) _((void*));
_                 383 ruby.h         VALUE rb_data_object_alloc _((VALUE,void*,RUBY_DATA_FUNC,RUBY_DATA_FUNC));
_                 473 ruby.h         void rb_obj_infect _((VALUE,VALUE));
_                 475 ruby.h         void rb_glob _((const char*,void(*)(const char*,VALUE),VALUE));
_                 476 ruby.h         void rb_globi _((const char*,void(*)(const char*,VALUE),VALUE));
_                 478 ruby.h         VALUE rb_define_class _((const char*,VALUE));
_                 479 ruby.h         VALUE rb_define_module _((const char*));
_                 480 ruby.h         VALUE rb_define_class_under _((VALUE, const char*, VALUE));
_                 481 ruby.h         VALUE rb_define_module_under _((VALUE, const char*));
_                 483 ruby.h         void rb_include_module _((VALUE,VALUE));
_                 484 ruby.h         void rb_extend_object _((VALUE,VALUE));
_                 486 ruby.h         void rb_define_variable _((const char*,VALUE*));
_                 487 ruby.h         void rb_define_virtual_variable _((const char*,VALUE(*)(ANYARGS),void(*)(ANYARGS)));
_                 488 ruby.h         void rb_define_hooked_variable _((const char*,VALUE*,VALUE(*)(ANYARGS),void(*)(ANYARGS)));
_                 489 ruby.h         int ruby_glob _((const char*,int,int(*)(const char*,VALUE),VALUE));
_                 490 ruby.h         int ruby_globi _((const char*,int,int(*)(const char*,VALUE),VALUE));
_                 491 ruby.h         void rb_define_readonly_variable _((const char*,VALUE*));
_                 492 ruby.h         void rb_define_const _((VALUE,const char*,VALUE));
_                 493 ruby.h         void rb_define_global_const _((const char*,VALUE));
_                 496 ruby.h         void rb_define_method _((VALUE,const char*,VALUE(*)(ANYARGS),int));
_                 497 ruby.h         void rb_define_module_function _((VALUE,const char*,VALUE(*)(ANYARGS),int));
_                 498 ruby.h         void rb_define_global_function _((const char*,VALUE(*)(ANYARGS),int));
_                 500 ruby.h         void rb_undef_method _((VALUE,const char*));
_                 501 ruby.h         void rb_define_alias _((VALUE,const char*,const char*));
_                 502 ruby.h         void rb_define_attr _((VALUE,const char*,int,int));
_                 504 ruby.h         void rb_global_variable _((VALUE*));
_                 505 ruby.h         void rb_gc_register_address _((VALUE*));
_                 506 ruby.h         void rb_gc_unregister_address _((VALUE*));
_                 508 ruby.h         ID rb_intern _((const char*));
_                 509 ruby.h         char *rb_id2name _((ID));
_                 510 ruby.h         ID rb_to_id _((VALUE));
_                 512 ruby.h         char *rb_class2name _((VALUE));
_                 513 ruby.h         char *rb_obj_classname _((VALUE));
_                 515 ruby.h         void rb_p _((VALUE));
_                 517 ruby.h         VALUE rb_eval_string _((const char*));
_                 518 ruby.h         VALUE rb_eval_string_protect _((const char*, int*));
_                 519 ruby.h         VALUE rb_eval_string_wrap _((const char*, int*));
_                 521 ruby.h         VALUE rb_funcall2 _((VALUE, ID, int, const VALUE*));
_                 522 ruby.h         VALUE rb_funcall3 _((VALUE, ID, int, const VALUE*));
_                 524 ruby.h         VALUE rb_call_super _((int, const VALUE*));
_                 526 ruby.h         VALUE rb_gv_set _((const char*, VALUE));
_                 527 ruby.h         VALUE rb_gv_get _((const char*));
_                 528 ruby.h         VALUE rb_iv_get _((VALUE, const char*));
_                 529 ruby.h         VALUE rb_iv_set _((VALUE, const char*, VALUE));
_                 531 ruby.h         VALUE rb_equal _((VALUE,VALUE));
_                 538 ruby.h         NORETURN(void rb_sys_fail _((const char*)));
_                 539 ruby.h         NORETURN(void rb_iter_break _((void)));
_                 540 ruby.h         NORETURN(void rb_exit _((int)));
_                 541 ruby.h         NORETURN(void rb_notimplement _((void)));
_                 547 ruby.h         VALUE rb_each _((VALUE));
_                 548 ruby.h         VALUE rb_yield _((VALUE));
_                 550 ruby.h         VALUE rb_yield_splat _((VALUE));
_                 551 ruby.h         int rb_block_given_p _((void));
_                 552 ruby.h         void rb_need_block _((void));
_                 553 ruby.h         VALUE rb_iterate _((VALUE(*)(VALUE),VALUE,VALUE(*)(ANYARGS),VALUE));
_                 554 ruby.h         VALUE rb_rescue _((VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE));
_                 556 ruby.h         VALUE rb_ensure _((VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE));
_                 557 ruby.h         VALUE rb_catch _((const char*,VALUE(*)(ANYARGS),VALUE));
_                 558 ruby.h         NORETURN(void rb_throw _((const char*,VALUE)));
_                 560 ruby.h         VALUE rb_require _((const char*));
_                 562 ruby.h         void ruby_init _((void));
_                 563 ruby.h         void ruby_options _((int, char**));
_                 564 ruby.h         NORETURN(void ruby_run _((void)));
_                  30 rubyio.h           void (*finalize) _((struct OpenFile*,int)); /* finalize proc */
_                  66 rubyio.h       FILE *rb_fopen _((const char*, const char*));
_                  67 rubyio.h       FILE *rb_fdopen _((int, const char*));
_                  68 rubyio.h       int rb_getc _((FILE*));
_                  69 rubyio.h       long rb_io_fread _((char *, long, FILE *));
_                  70 rubyio.h       long rb_io_fwrite _((const char *, long, FILE *));
_                  71 rubyio.h       int  rb_io_mode_flags _((const char*));
_                  72 rubyio.h       int  rb_io_modenum_flags _((int));
_                  73 rubyio.h       void rb_io_check_writable _((OpenFile*));
_                  74 rubyio.h       void rb_io_check_readable _((OpenFile*));
_                  75 rubyio.h       void rb_io_fptr_finalize _((OpenFile*));
_                  76 rubyio.h       void rb_io_synchronized _((OpenFile*));
_                  77 rubyio.h       void rb_io_check_initialized _((OpenFile*));
_                  78 rubyio.h       void rb_io_check_closed _((OpenFile*));
_                  79 rubyio.h       int rb_io_wait_readable _((int));
_                  80 rubyio.h       int rb_io_wait_writable _((int));
_                  82 rubyio.h       VALUE rb_io_taint_check _((VALUE));
_                  83 rubyio.h       NORETURN(void rb_eof_error _((void)));
_                  85 rubyio.h       void rb_read_check _((FILE*));
_                  86 rubyio.h       int rb_read_pending _((FILE*));
_                  75 rubysig.h      VALUE rb_with_disable_interrupt _((VALUE(*)(ANYARGS),VALUE));
_                  78 rubysig.h      void rb_trap_restore_mask _((void));
_                  81 rubysig.h      void rb_thread_schedule _((void));
_                 368 signal.c       static void signal_exec _((int sig));
_                 402 signal.c       static RETSIGTYPE sighandler _((int));
_                 432 signal.c       static RETSIGTYPE sigbus _((int));
_                 442 signal.c       static RETSIGTYPE sigsegv _((int));
_                 452 signal.c       static RETSIGTYPE sigpipe _((int));
_                 507 signal.c       static RETSIGTYPE sigexit _((int));
_                  21 sprintf.c      static void fmt_setup _((char*,int,int,int,int));
_                  30 st.h           #ifndef _
_                  41 st.h           st_table *st_init_table _((struct st_hash_type *));
_                  42 st.h           st_table *st_init_table_with_size _((struct st_hash_type *, int));
_                  43 st.h           st_table *st_init_numtable _((void));
_                  44 st.h           st_table *st_init_numtable_with_size _((int));
_                  45 st.h           st_table *st_init_strtable _((void));
_                  46 st.h           st_table *st_init_strtable_with_size _((int));
_                  47 st.h           int st_delete _((st_table *, st_data_t *, st_data_t *));
_                  48 st.h           int st_delete_safe _((st_table *, st_data_t *, st_data_t *, st_data_t));
_                  49 st.h           int st_insert _((st_table *, st_data_t, st_data_t));
_                  50 st.h           int st_lookup _((st_table *, st_data_t, st_data_t *));
_                  51 st.h           int st_foreach _((st_table *, int (*)(ANYARGS), st_data_t));
_                  52 st.h           void st_add_direct _((st_table *, st_data_t, st_data_t));
_                  53 st.h           void st_free_table _((st_table *));
_                  54 st.h           void st_cleanup_safe _((st_table *, st_data_t));
_                  55 st.h           st_table *st_copy _((st_table *));
_                  62 string.c       static VALUE str_alloc _((VALUE));
_                 307 string.c       static VALUE rb_str_replace _((VALUE, VALUE));
_                1309 string.c       static VALUE get_pat _((VALUE, int));
_                2999 string.c       static VALUE rb_str_delete_bang _((int,VALUE*,VALUE));
_                  18 struct.c       static VALUE struct_alloc _((VALUE));
_                 695 struct.c       static VALUE struct_entry _((VALUE, long));
_                  35 time.c         static void time_free _((void *));
_                  44 time.c         static VALUE time_s_alloc _((VALUE));
_                 399 time.c         static VALUE time_gmtime _((VALUE));
_                 400 time.c         static VALUE time_localtime _((VALUE));
_                 401 time.c         static VALUE time_get_tm _((VALUE, int));
_                  25 util.c         char *strchr _((char*,char));
_                  16 util.h         #ifndef _
_                  38 util.h         unsigned long scan_oct _((const char*, int, int*));
_                  40 util.h         unsigned long scan_hex _((const char*, int, int*));
_                  46 util.h         void ruby_qsort _((void*, const int, const int, int (*)(), void*));
_                  49 util.h         void ruby_setenv _((const char*, const char*));
_                  50 util.h         void ruby_unsetenv _((const char*));
_                  56 util.h         char *ruby_strdup _((const char*));
_                  60 util.h         char *ruby_getcwd _((void));
_                  63 util.h         double ruby_strtod _((const char*, char **));
_                1199 variable.c     NORETURN(static void uninitialized_constant _((VALUE, ID)));


_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_      81 missing/vsnprintf.c #ifndef _BSD_VA_LIST_
_BSD_VA_LIST_    1081 missing/vsnprintf.c 	_BSD_VA_LIST_ ap;


_CRTIMP

_CRTIMP          1562 win32/win32.c  #if !defined _CRTIMP || defined __MINGW32__
_CRTIMP          1568 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));


_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         673 win32/win32.c  				       (_O_RDONLY | pipemode));
_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            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         693 win32/win32.c  				       (_O_WRONLY | pipemode));
_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     113 ext/socket/socket.c #define _SS_PAD1SIZE	(_SS_ALIGNSIZE - sizeof(unsigned char) * 2)
_SS_ALIGNSIZE     115 ext/socket/socket.c 				_SS_PAD1SIZE - _SS_ALIGNSIZE)


_SS_PAD1SIZE

_SS_PAD1SIZE      115 ext/socket/socket.c 				_SS_PAD1SIZE - _SS_ALIGNSIZE)
_SS_PAD1SIZE      124 ext/socket/socket.c 	char	__ss_pad1[_SS_PAD1SIZE];


_S_IFIFO

_S_IFIFO          241 win32/win32.h  #if !defined S_IFIFO && defined _S_IFIFO
_S_IFIFO          242 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             89 defines.h      #if defined(MSDOS) || defined(_WIN32) || defined(__human68k__) || defined(__EMX__)
_WIN32            182 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             51 dln.c          #if defined(_WIN32) || defined(__VMS)
_WIN32             72 dln.c          #ifndef _WIN32
_WIN32           1155 dln.c          #if defined _WIN32 && !defined __CYGWIN__
_WIN32           1196 dln.c          #if defined _WIN32 && !defined __CYGWIN__
_WIN32           1295 dln.c          #if defined _WIN32 && !defined __CYGWIN__
_WIN32           1662 dln.c          #if defined(MSDOS) || defined(_WIN32) || defined(__human68k__) || defined(__MACOS__)
_WIN32           1835 dln.c          #elif defined(__EMX__) || defined(_WIN32)
_WIN32            882 error.c        #if !defined(_WIN32) && !defined(__VMS)
_WIN32           1277 eval.c         #elif !defined(_WIN32) && !defined(__MACOS__) || defined(_WIN32_WCE)
_WIN32           9568 eval.c         #if defined _WIN32 || defined __CYGWIN__
_WIN32           9647 eval.c         # if defined _WIN32 && !defined __CYGWIN__
_WIN32              5 ext/Win32API/Win32API.c #if !defined _MSC_VER && !defined _WIN32
_WIN32            812 ext/dl/sym.c   #ifdef _WIN32
_WIN32            817 ext/dl/sym.c   #ifdef _WIN32
_WIN32            987 ext/dl/sym.c   #ifdef _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             56 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            569 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 #if !defined(_WIN32) && !defined(__VMS)
_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           1100 ext/socket/socket.c #if !defined(_WIN32) && !defined(__CYGWIN__)
_WIN32           2032 ext/socket/socket.c #if !defined(_WIN32) && !defined(__BEOS__) && !defined(__EMX__) && !defined(__QNXNTO__) && !defined(__VMS)
_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            665 file.c         #ifdef _WIN32
_WIN32            822 file.c         #ifndef _WIN32
_WIN32            857 file.c         #if defined(S_IXGRP) && !defined(_WIN32) && !defined(__CYGWIN__)
_WIN32           1318 file.c         #ifndef _WIN32
_WIN32           1425 file.c         #ifdef _WIN32
_WIN32           1431 file.c         #ifdef _WIN32
_WIN32           1898 file.c         #if defined(DJGPP) || defined(__CYGWIN32__) || defined(_WIN32) || defined(__EMX__)
_WIN32           2230 file.c         #elif defined DOSISH && !defined _WIN32
_WIN32           3025 file.c         #  ifdef _WIN32
_WIN32           3702 file.c         #ifndef _WIN32
_WIN32             47 gc.c           #if defined _WIN32 || defined __CYGWIN__
_WIN32           1451 gc.c           #if defined(_WIN32) || defined(__CYGWIN__)
_WIN32           1611 hash.c         #ifdef _WIN32
_WIN32           1796 hash.c         #if defined(_WIN32)
_WIN32             27 io.c           #if defined(MSDOS) || defined(__BOW__) || defined(__CYGWIN__) || defined(_WIN32) || defined(__human68k__) || defined(__EMX__) || defined(__BEOS__)
_WIN32             31 io.c           #if defined(MSDOS) || defined(__CYGWIN__) || defined(_WIN32)
_WIN32             44 io.c           #if defined(HAVE_SYS_IOCTL_H) && !defined(DJGPP) && !defined(_WIN32) && !defined(__human68k__)
_WIN32             47 io.c           #if defined(HAVE_FCNTL_H) || defined(_WIN32)
_WIN32            486 io.c           #elif defined(_WIN32) && !defined(__BORLANDC__)
_WIN32           2446 io.c           #if defined(_WIN32) || defined(DJGPP) || defined(__CYGWIN__) || defined(__human68k__) || defined(__EMX__)
_WIN32           2709 io.c           #ifdef _WIN32
_WIN32           2778 io.c           #if defined (_WIN32) || defined(DJGPP) || defined(__CYGWIN__) || defined(__human68k__) || defined(__VMS)
_WIN32           2840 io.c           #if !defined (__CYGWIN__) && !defined(_WIN32)
_WIN32           2909 io.c           #ifdef _WIN32
_WIN32           5018 io.c           #ifdef _WIN32
_WIN32           5737 io.c           #if defined (_WIN32) || defined(DJGPP) || defined(__CYGWIN__) || defined(__human68k__)
_WIN32             37 main.c         #ifdef _WIN32
_WIN32             17 missing.h      #elif !defined(_WIN32)
_WIN32              9 missing/erf.c  #ifdef _WIN32
_WIN32            125 missing/flock.c #elif !defined _WIN32
_WIN32             62 process.c      #if defined(HAVE_TIMES) || defined(_WIN32)
_WIN32            152 process.c      #ifdef _WIN32
_WIN32           1025 process.c      #ifdef _WIN32
_WIN32           1077 process.c      #if defined(__human68k__) || defined(__DJGPP__) || defined(_WIN32)
_WIN32           1118 process.c      #if defined(_WIN32)
_WIN32           1149 process.c      #if !defined(_WIN32)
_WIN32           1268 process.c      #if !defined(__human68k__) && !defined(_WIN32) && !defined(__MACOS__) && !defined(__EMX__) && !defined(__VMS)
_WIN32           1440 process.c      #elif defined(__human68k__) || defined(__DJGPP__) || defined(_WIN32)
_WIN32           1459 process.c      #if defined(_WIN32)
_WIN32           1469 process.c      #if !defined(_WIN32)
_WIN32           3372 process.c      #if !defined(_WIN32) && !defined(DJGPP)
_WIN32           3455 process.c      #if defined(HAVE_TIMES) || defined(_WIN32)
_WIN32             92 regex.h        #if defined _WIN32 && !defined __GNUC__ && !defined RUBY_EXPORT
_WIN32             15 ruby.c         #if defined _WIN32 || defined __CYGWIN__
_WIN32            114 ruby.c         #if defined _WIN32 || defined __CYGWIN__ || defined __DJGPP__
_WIN32            242 ruby.c         #if defined _WIN32 || defined __CYGWIN__
_WIN32            693 ruby.h         #elif defined(_WIN32) || defined(_WIN32_WCE)
_WIN32             17 rubysig.h      #ifdef _WIN32
_WIN32            407 signal.c       #ifdef _WIN32
_WIN32            491 signal.c       #ifndef _WIN32
_WIN32            637 signal.c       #ifndef _WIN32
_WIN32            647 signal.c       #ifndef _WIN32
_WIN32            666 signal.c       #ifndef _WIN32
_WIN32            726 signal.c       #ifndef _WIN32
_WIN32            780 signal.c       #ifndef _WIN32
_WIN32            788 signal.c       #ifndef _WIN32
_WIN32            805 signal.c       #ifndef _WIN32
_WIN32            703 sprintf.c      #if defined(_WIN32) && !defined(__BORLANDC__)
_WIN32             19 util.c         #ifdef _WIN32
_WIN32             78 util.c         #if defined(MSDOS) || defined(__CYGWIN32__) || defined(_WIN32)
_WIN32            172 util.c         #if defined(DJGPP) || defined(__CYGWIN32__) || defined(_WIN32)
_WIN32            228 util.c         #if defined(__CYGWIN32__) || defined(_WIN32)
_WIN32             42 util.h         #if defined(MSDOS) || defined(__CYGWIN32__) || defined(_WIN32)


__

__                 28 intern.h       VALUE rb_ary_new3 __((long,...));
__                134 intern.h       NORETURN(void rb_loaderror __((const char*, ...)));
__                135 intern.h       NORETURN(void rb_name_error __((ID, const char*, ...)));
__                137 intern.h       void rb_compile_error __((const char*, ...));
__                138 intern.h       void rb_compile_error_append __((const char*, ...));
__                222 intern.h       VALUE rb_funcall_rescue __((VALUE, ID, int, ...));
__                235 intern.h       NORETURN(void rb_memerror __((void)));
__                436 intern.h       VALUE rb_struct_new __((VALUE, ...));
__                437 intern.h       VALUE rb_struct_define __((const char*, ...));
__                134 missing.h      extern int snprintf __((char *, size_t n, char const *, ...));
__                520 ruby.h         VALUE rb_funcall __((VALUE, ID, int, ...));
__                523 ruby.h         int rb_scan_args __((int, const VALUE*, const char*, ...));
__                535 ruby.h         NORETURN(void rb_raise __((VALUE, const char*, ...)));
__                536 ruby.h         NORETURN(void rb_fatal __((const char*, ...)));
__                537 ruby.h         NORETURN(void rb_bug __((const char*, ...)));
__                543 ruby.h         void rb_warning __((const char*, ...));		/* reports if `-w' specified */
__                544 ruby.h         void rb_sys_warning __((const char*, ...));	/* reports if `-w' specified */
__                545 ruby.h         void rb_warn __((const char*, ...));		/* reports always */
__                549 ruby.h         VALUE rb_yield_values __((int n, ...));
__                555 ruby.h         VALUE rb_rescue2 __((VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE,...));


__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__        85 process.c      #if defined(__APPLE__) && ( defined(__MACH__) || defined(__DARWIN__) ) && !defined(__MacOS_X__)
__MacOS_X__        99 process.c      #if defined(__MacOS_X__) || defined(__bsdi__)
__MacOS_X__       104 process.c      #if defined(HAVE_44BSD_SETUID) || defined(__MacOS_X__)


__SEOF

__SEOF            183 missing/vsnprintf.c #define	__sfeof(p)	(((p)->_flags & __SEOF) != 0)
__SEOF            185 missing/vsnprintf.c #define	__sclearerr(p)	((void)((p)->_flags &= ~(__SERR|__SEOF)))


__SERR

__SERR            184 missing/vsnprintf.c #define	__sferror(p)	(((p)->_flags & __SERR) != 0)
__SERR            185 missing/vsnprintf.c #define	__sclearerr(p)	((void)((p)->_flags &= ~(__SERR|__SEOF)))
__SERR            289 missing/vsnprintf.c 	fp->_flags |= __SERR;


__SNBF

__SNBF            247 missing/vsnprintf.c 	if (fp->_flags & __SNBF) {
__SNBF            552 missing/vsnprintf.c 	if ((fp->_flags & (__SNBF|__SWR|__SRW)) == (__SNBF|__SWR) &&


__SSTR

__SSTR            266 missing/vsnprintf.c 			if (fp->_flags & __SSTR) {
__SSTR           1088 missing/vsnprintf.c 	f._flags = __SWR | __SSTR;
__SSTR           1128 missing/vsnprintf.c 	f._flags = __SWR | __SSTR;


__SWR

__SWR             552 missing/vsnprintf.c 	if ((fp->_flags & (__SNBF|__SWR|__SRW)) == (__SNBF|__SWR) &&
__SWR            1088 missing/vsnprintf.c 	f._flags = __SWR | __SSTR;
__SWR            1128 missing/vsnprintf.c 	f._flags = __SWR | __SSTR;


__WIN16__

__WIN16__         139 ext/nkf/nkf-utf8/nkf.c #ifndef __WIN16__
__WIN16__        4779 ext/nkf/nkf-utf8/nkf.c #if defined(MSDOS) && !defined(__WIN32__) && !defined(__WIN16__)
__WIN16__        4782 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__         137 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__         838 ext/nkf/nkf-utf8/nkf.c #if defined(MSDOS) && !defined(__MINGW32__) && !defined(__WIN32__)
__WIN32__         858 ext/nkf/nkf-utf8/nkf.c #if defined(MSDOS) && !defined(__MINGW32__) && !defined(__WIN32__)
__WIN32__        4779 ext/nkf/nkf-utf8/nkf.c #if defined(MSDOS) && !defined(__WIN32__) && !defined(__WIN16__)
__WIN32__        4785 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__)


__libc_ia64_register_backing_store_base

__libc_ia64_register_backing_store_base 9562 eval.c         extern unsigned long __libc_ia64_register_backing_store_base;
__libc_ia64_register_backing_store_base 10060 eval.c         	bot = (VALUE*)__libc_ia64_register_backing_store_base;
__libc_ia64_register_backing_store_base 10068 eval.c         	MEMCPY(th->bstr_ptr, (VALUE*)__libc_ia64_register_backing_store_base, VALUE, th->bstr_len);
__libc_ia64_register_backing_store_base 10213 eval.c             MEMCPY((VALUE*)__libc_ia64_register_backing_store_base, tmp->bstr_ptr, VALUE, tmp->bstr_len);
__libc_ia64_register_backing_store_base   43 gc.c           extern unsigned long __libc_ia64_register_backing_store_base;
__libc_ia64_register_backing_store_base 1372 gc.c           	bot = (VALUE*)__libc_ia64_register_backing_store_base;


__sferror

__sferror         189 missing/vsnprintf.c #define	ferror(p)	__sferror(p)
__sferror         997 missing/vsnprintf.c 	return (__sferror(fp) ? EOF : ret);


_access

_access           238 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            247 util.c         	_close(fd);
_close            687 win32/win32.c  		_close(fd);
_close            706 win32/win32.c  		_close(fd);
_close           3412 win32/win32.c  	return _close(fd);
_close           3415 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     82 win32/win32.c  #define TO_SOCKET(x)	_get_osfhandle(x)
_get_osfhandle    340 win32/win32.c  			      (VALUE)_get_osfhandle(fd), oper, NULL,
_get_osfhandle    576 win32/win32.c      return _get_osfhandle(fh);
_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             246 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    93 win32/win32.c  #define rb_w32_open_osfhandle(osfhandle, flags) _open_osfhandle(osfhandle, flags)
_open_osfhandle  1607 win32/win32.c      fh = _open_osfhandle((long)hF, 0);
_open_osfhandle  1637 win32/win32.c      int fd = _open_osfhandle(osfhandle, flags);
_open_osfhandle    42 wince/io.h     int _open_osfhandle ( long osfhandle, int flags);


_osfile

_osfile          1578 win32/win32.c  #define _set_osflags(fh, flags) (_osfile(fh) = (flags))
_osfile          3569 win32/win32.c      if (!(_osfile(fd) & FOPEN)) {
_osfile          3573 win32/win32.c      if (!(_osfile(fd) & FDEV)) {


_pioinfo

_pioinfo         1573 win32/win32.c  #define _osfhnd(i)  (_pioinfo(i)->osfhnd)
_pioinfo         1574 win32/win32.c  #define _osfile(i)  (_pioinfo(i)->osfile)
_pioinfo         1575 win32/win32.c  #define _pipech(i)  (_pioinfo(i)->pipech)
_pioinfo         1615 win32/win32.c  	MTHREAD_ONLY(EnterCriticalSection(&(_pioinfo(fh)->lock)));
_pioinfo         1622 win32/win32.c  	MTHREAD_ONLY(LeaveCriticalSection(&_pioinfo(fh)->lock));


_pipe

_pipe            5019 io.c               if (_pipe(pipes, 1024, O_BINARY) == -1)
_pipe              40 wince/io.h     int _pipe(int *phandles, unsigned int psize, int textmode);
_pipe              69 wince/io.h     #define pipe       _pipe


_read

_read             125 win32/win32.h  #define read(h, b, l)		_read(h, b, l)
_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      1617 win32/win32.c  	_set_osfhnd(fh, osfhandle);
_set_osfhnd      3396 win32/win32.c      _set_osfhnd(fd, (SOCKET)INVALID_HANDLE_VALUE);
_set_osfhnd      3414 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           248 util.c         	_unlink(s);	/* don't leave it laying around */
_unlink           127 win32/win32.h  #define unlink(p)		_unlink(p)
_unlink            34 wince/io.h     int _unlink(const char *file);
_unlink            60 wince/io.h     #define unlink	   _unlink


_vmsruby_init

_vmsruby_init    1339 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            128 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             214 error.c            abort();
abort             108 eval.c             abort();			/* ensure noreturn */
abort            9706 eval.c             int abort;
abort            11386 eval.c             return rb_thread_check(thread)->abort?Qtrue:Qfalse;
abort            11404 eval.c             rb_thread_check(thread)->abort = RTEST(val);
abort            11472 eval.c             th->abort = 0;\
abort            11685 eval.c         	else if (th->safe < 4 && (ruby_thread_abort || th->abort || RTEST(ruby_debug))) {
abort             689 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           1318 ext/socket/socket.c     fd2 = accept(fd, sockaddr, len);
accept           1321 ext/socket/socket.c     fd2 = accept(fd, sockaddr, len);
accept           1995 win32/win32.c  	r = accept(TO_SOCKET(s), addr, addrlen);
accept            372 win32/win32.h  #ifdef accept


access

access            887 file.c             return access(path, mode);
access           1140 file.c             if (access(StringValueCStr(fname), R_OK) < 0) return Qfalse;
access           1175 file.c             if (access(StringValueCStr(fname), W_OK) < 0) return Qfalse;
access           1209 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             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             244 math.c             d = acosh(RFLOAT(x)->value);
acosh              29 missing.h      extern double acosh _((double));


add_heap

add_heap         1115 gc.c           	add_heap();
add_heap         1323 gc.c           	    add_heap();
add_heap         1525 gc.c               add_heap();


add_modules

add_modules       583 ruby.c         		add_modules(s);
add_modules       586 ruby.c         		add_modules(argv[1]);


adjust_registers_to_matched

adjust_registers_to_matched  102 ext/strscan/strscan.c static void adjust_registers_to_matched _((struct strscanner *p));
adjust_registers_to_matched  693 ext/strscan/strscan.c     adjust_registers_to_matched(p);
adjust_registers_to_matched  720 ext/strscan/strscan.c     adjust_registers_to_matched(p);


after_exec

after_exec        985 process.c          after_exec();
after_exec       1028 process.c          after_exec();
after_exec       1036 process.c      	    after_exec();
after_exec       1048 process.c      	    after_exec();
after_exec       1054 process.c      	    after_exec();
after_exec       1123 process.c          after_exec();
after_exec       1166 process.c      	    after_exec();
after_exec       1281 process.c      	after_exec();


aix_loaderror

aix_loaderror    1402 dln.c          	    aix_loaderror(file);
aix_loaderror    1405 dln.c          	    aix_loaderror(file);


algo_t

algo_t             43 ext/digest/digest.c static algo_t *
algo_t             48 ext/digest/digest.c     algo_t *algo;
algo_t             56 ext/digest/digest.c     Data_Get_Struct(obj, algo_t, algo);
algo_t             66 ext/digest/digest.c     algo_t *algo;
algo_t             90 ext/digest/digest.c     algo_t *algo;
algo_t            119 ext/digest/digest.c     algo_t *algo;
algo_t            147 ext/digest/digest.c     algo_t *algo;
algo_t            167 ext/digest/digest.c     algo_t *algo;
algo_t            198 ext/digest/digest.c     algo_t *algo;
algo_t            229 ext/digest/digest.c     algo_t *algo;
algo_t            260 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             832 dir.c              char *alloc;
alloc             836 dir.c              alloc = ALLOC_N(char, len+1);
alloc             837 dir.c              memcpy(alloc, p, len);
alloc             843 dir.c          	alloc[len-1] = 0;
alloc             846 dir.c          	alloc[len] = 0;
alloc             849 dir.c              return alloc;
alloc             154 st.c               tbl = alloc(st_table);
alloc             265 st.c               entry = alloc(st_table_entry);\
alloc             344 st.c               new_table = alloc(st_table);
alloc             362 st.c           	    entry = alloc(st_table_entry);


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            966 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             61 gc.c           #  ifndef alloca
alloca             72 gc.c           #   ifndef alloca /* predefined by HP cc +Olibcalls */
alloca             73 gc.c           void *alloca ();
alloca            431 gc.c           # define SET_STACK_END VALUE stack_end; alloca(0);
alloca            445 gc.c           #  define  SET_STACK_END    VALUE *stack_end = alloca(1)
alloca           3005 parse.c        #  define YYSTACK_ALLOC alloca
alloca           3008 parse.c        #   if defined (alloca) || defined (_ALLOCA_H)
alloca           3009 parse.c        #    define YYSTACK_ALLOC alloca
alloca             82 regex.c        #  ifndef alloca
alloca             89 regex.c        # elif !defined(alloca)
alloca             90 regex.c        char *alloca();
alloca            105 regex.c        #define FREE_VARIABLES() alloca(0)
alloca            138 regex.c        #define RE_TALLOC(n,t)  ((t*)alloca((n)*sizeof(t)))
alloca           3298 regex.c            alloca(0);
alloca            466 ruby.h         #define ALLOCA_N(type,n) (type*)alloca(sizeof(type)*(n))


anode

anode            2177 eval.c         	    n = anode;\
anode            2199 eval.c         #define SETUP_ARGS(anode) SETUP_ARGS0(anode, anode->nd_alen)


appendline

appendline       1523 io.c               while ((c = appendline(fptr, delim, &str)) != EOF && c != delim);
appendline       1584 io.c           	while ((c = appendline(fptr, newline, &str)) != EOF &&


apply2files

apply2files       105 file.c         static long apply2files _((void (*)(const char *, void *), VALUE, void *));
apply2files      1726 file.c             n = apply2files(chmod_internal, rest, (void *)(long)mode);
apply2files      1800 file.c             n = apply2files(lchmod_internal, rest, (void *)(long)mode);
apply2files      1868 file.c             n = apply2files(chown_internal, rest, &arg);
apply2files      1958 file.c             n = apply2files(lchown_internal, rest, &arg);
apply2files      2010 file.c             n = apply2files(utime_internal, rest, tvp);
apply2files      2050 file.c             n = apply2files(utime_internal, rest, &utbuf);
apply2files      2202 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          9010 parse.c        	lhs->nd_args = arg_add(lhs->nd_args, rhs);
arg_add          5012 parse.y        	lhs->nd_args = arg_add(lhs->nd_args, rhs);


arg_ambiguous

arg_ambiguous    7715 parse.c        	    if (IS_ARG()) arg_ambiguous();
arg_ambiguous    7745 parse.c        	    if (IS_ARG()) arg_ambiguous();
arg_ambiguous    8042 parse.c        		arg_ambiguous();
arg_ambiguous    3717 parse.y        	    if (IS_ARG()) arg_ambiguous();
arg_ambiguous    3747 parse.y        	    if (IS_ARG()) arg_ambiguous();
arg_ambiguous    4044 parse.y        		arg_ambiguous();


arg_blk_pass

arg_blk_pass      250 parse.c        static NODE *arg_blk_pass();
arg_blk_pass     4910 parse.c        			yyval.node = arg_blk_pass(yyvsp[-1].node, yyvsp[0].node);
arg_blk_pass     4917 parse.c        			yyval.node = arg_blk_pass(yyval.node, yyvsp[0].node);
arg_blk_pass     4924 parse.c        			yyval.node = arg_blk_pass(yyval.node, yyvsp[0].node);
arg_blk_pass     4931 parse.c        			yyval.node = arg_blk_pass(yyval.node, yyvsp[0].node);
arg_blk_pass     4938 parse.c        			yyval.node = arg_blk_pass(yyval.node, yyvsp[0].node);
arg_blk_pass     4946 parse.c        			yyval.node = arg_blk_pass(yyval.node, yyvsp[0].node);
arg_blk_pass     4952 parse.c        			yyval.node = arg_blk_pass(NEW_SPLAT(yyvsp[-1].node), yyvsp[0].node);
arg_blk_pass     4958 parse.c        			yyval.node = arg_blk_pass(list_concat(NEW_LIST(yyvsp[-3].node),yyvsp[-1].node), yyvsp[0].node);
arg_blk_pass     4964 parse.c                                yyval.node = arg_blk_pass(yyvsp[-2].node, yyvsp[0].node);
arg_blk_pass     4971 parse.c        			yyval.node = arg_blk_pass(yyval.node, yyvsp[0].node);
arg_blk_pass     4978 parse.c        			yyval.node = arg_blk_pass(yyval.node, yyvsp[0].node);
arg_blk_pass     4985 parse.c        			yyval.node = arg_blk_pass(yyval.node, yyvsp[0].node);
arg_blk_pass     4992 parse.c        			yyval.node = arg_blk_pass(yyval.node, yyvsp[0].node);
arg_blk_pass     4999 parse.c        			yyval.node = arg_blk_pass(yyval.node, yyvsp[0].node);
arg_blk_pass     5006 parse.c        			yyval.node = arg_blk_pass(yyval.node, yyvsp[0].node);
arg_blk_pass     5013 parse.c        			yyval.node = arg_blk_pass(yyval.node, yyvsp[0].node);
arg_blk_pass     5020 parse.c        			yyval.node = arg_blk_pass(yyval.node, yyvsp[0].node);
arg_blk_pass     5026 parse.c        			yyval.node = arg_blk_pass(NEW_SPLAT(yyvsp[-1].node), yyvsp[0].node);
arg_blk_pass      153 parse.y        static NODE *arg_blk_pass();
arg_blk_pass     1300 parse.y        			$$ = arg_blk_pass($1, $2);
arg_blk_pass     1305 parse.y        			$$ = arg_blk_pass($$, $5);
arg_blk_pass     1310 parse.y        			$$ = arg_blk_pass($$, $2);
arg_blk_pass     1315 parse.y        			$$ = arg_blk_pass($$, $5);
arg_blk_pass     1320 parse.y        			$$ = arg_blk_pass($$, $4);
arg_blk_pass     1326 parse.y        			$$ = arg_blk_pass($$, $7);
arg_blk_pass     1330 parse.y        			$$ = arg_blk_pass(NEW_SPLAT($2), $3);
arg_blk_pass     1337 parse.y        			$$ = arg_blk_pass(list_concat(NEW_LIST($1),$3), $4);
arg_blk_pass     1341 parse.y                                $$ = arg_blk_pass($1, $3);
arg_blk_pass     1346 parse.y        			$$ = arg_blk_pass($$, $5);
arg_blk_pass     1351 parse.y        			$$ = arg_blk_pass($$, $7);
arg_blk_pass     1356 parse.y        			$$ = arg_blk_pass($$, $2);
arg_blk_pass     1361 parse.y        			$$ = arg_blk_pass($$, $5);
arg_blk_pass     1366 parse.y        			$$ = arg_blk_pass($$, $4);
arg_blk_pass     1371 parse.y        			$$ = arg_blk_pass($$, $6);
arg_blk_pass     1376 parse.y        			$$ = arg_blk_pass($$, $7);
arg_blk_pass     1381 parse.y        			$$ = arg_blk_pass($$, $9);
arg_blk_pass     1385 parse.y        			$$ = arg_blk_pass(NEW_SPLAT($2), $3);


arg_concat

arg_concat        240 parse.c        static NODE *arg_concat();
arg_concat       4858 parse.c        			yyval.node = arg_concat(yyvsp[-4].node, yyvsp[-1].node);
arg_concat       4916 parse.c        			yyval.node = arg_concat(yyvsp[-4].node, yyvsp[-1].node);
arg_concat       4930 parse.c        			yyval.node = arg_concat(NEW_LIST(NEW_HASH(yyvsp[-4].node)), yyvsp[-1].node);
arg_concat       4945 parse.c        			yyval.node = arg_concat(list_append(yyvsp[-6].node, NEW_HASH(yyvsp[-4].node)), yyvsp[-1].node);
arg_concat       4970 parse.c        			yyval.node = arg_concat(NEW_LIST(yyvsp[-4].node), yyvsp[-1].node);
arg_concat       4977 parse.c                               yyval.node = arg_concat(list_concat(NEW_LIST(yyvsp[-6].node),yyvsp[-4].node), yyvsp[-1].node);
arg_concat       4991 parse.c        			yyval.node = arg_concat(NEW_LIST(NEW_HASH(yyvsp[-4].node)), yyvsp[-1].node);
arg_concat       5012 parse.c        			yyval.node = arg_concat(list_append(NEW_LIST(yyvsp[-6].node), NEW_HASH(yyvsp[-4].node)), yyvsp[-1].node);
arg_concat       5019 parse.c        			yyval.node = arg_concat(list_append(list_concat(NEW_LIST(yyvsp[-8].node), yyvsp[-6].node), NEW_HASH(yyvsp[-4].node)), yyvsp[-1].node);
arg_concat       5099 parse.c        			yyval.node = arg_concat(yyvsp[-3].node, yyvsp[0].node);
arg_concat       9525 parse.c        	return arg_concat(node1, node2->nd_head);
arg_concat        143 parse.y        static NODE *arg_concat();
arg_concat       1256 parse.y        			$$ = arg_concat($1, $4);
arg_concat       1304 parse.y        			$$ = arg_concat($1, $4);
arg_concat       1314 parse.y        			$$ = arg_concat(NEW_LIST(NEW_HASH($1)), $4);
arg_concat       1325 parse.y        			$$ = arg_concat(list_append($1, NEW_HASH($3)), $6);
arg_concat       1345 parse.y        			$$ = arg_concat(NEW_LIST($1), $4);
arg_concat       1350 parse.y                               $$ = arg_concat(list_concat(NEW_LIST($1),$3), $6);
arg_concat       1360 parse.y        			$$ = arg_concat(NEW_LIST(NEW_HASH($1)), $4);
arg_concat       1375 parse.y        			$$ = arg_concat(list_append(NEW_LIST($1), NEW_HASH($3)), $6);
arg_concat       1380 parse.y        			$$ = arg_concat(list_append(list_concat(NEW_LIST($1), $3), NEW_HASH($5)), $8);
arg_concat       1444 parse.y        			$$ = arg_concat($1, $4);
arg_concat       5527 parse.y        	return arg_concat(node1, node2->nd_head);


arg_defined

arg_defined      2267 eval.c         		return arg_defined(self, node->nd_args, buf, "super");
arg_defined      2310 eval.c         	    return arg_defined(self, node->nd_args, buf,


arg_prepend

arg_prepend       241 parse.c        static NODE *arg_prepend();
arg_prepend      9528 parse.c        	node2->nd_body = arg_prepend(node1, node2->nd_body);
arg_prepend       144 parse.y        static NODE *arg_prepend();
arg_prepend      5530 parse.y        	node2->nd_body = arg_prepend(node1, node2->nd_body);


argf_close

argf_close       4351 io.c           	argf_close(current_file);
argf_close       4422 io.c           	argf_close(current_file);
argf_close       5295 io.c           	    argf_close(current_file);
argf_close       5324 io.c           	argf_close(current_file);
argf_close       5405 io.c           	argf_close(current_file);
argf_close       5415 io.c               argf_close(current_file);


argf_each_line

argf_each_line   5701 io.c               rb_define_singleton_method(argf, "each",  argf_each_line, -1);
argf_each_line   5702 io.c               rb_define_singleton_method(argf, "each_line",  argf_each_line, -1);


argf_eof

argf_eof         5717 io.c               rb_define_singleton_method(argf, "eof", argf_eof, 0);
argf_eof         5718 io.c               rb_define_singleton_method(argf, "eof?", argf_eof, 0);


argf_filename

argf_filename    5721 io.c               rb_define_singleton_method(argf, "filename", argf_filename, 0);
argf_filename    5722 io.c               rb_define_singleton_method(argf, "path", argf_filename, 0);


argf_fileno

argf_fileno      5698 io.c               rb_define_singleton_method(argf, "fileno", argf_fileno, 0);
argf_fileno      5699 io.c               rb_define_singleton_method(argf, "to_i", argf_fileno, 0);


argf_forward

argf_forward     4190 io.c           #define ARGF_FORWARD() do { if (TYPE(current_file) != T_FILE) return argf_forward(); } while (0)
argf_forward     5286 io.c           	tmp = argf_forward();


argf_getc

argf_getc        5338 io.c               c = argf_getc();
argf_getc        5371 io.c               while (!NIL_P(byte = argf_getc())) {
argf_getc        5710 io.c               rb_define_singleton_method(argf, "getc", argf_getc, 0);


argf_getline

argf_getline     4403 io.c           	line = argf_getline(argc, argv);
argf_getline     4491 io.c               while (!NIL_P(line = argf_getline(argc, argv))) {
argf_getline     5360 io.c               while (!NIL_P(str = argf_getline(argc, argv))) {


argf_tell

argf_tell        5712 io.c               rb_define_singleton_method(argf, "tell", argf_tell, 0);
argf_tell        5715 io.c               rb_define_singleton_method(argf, "pos", argf_tell, 0);


ary2cary

ary2cary          912 ext/dl/ptr.c   	memimg = ary2cary(data->stype[i], val, &memsize);
ary2cary          982 ext/dl/ptr.c   	memimg = ary2cary(data->stype[i], val, NULL);


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          98 array.c        static VALUE ary_alloc _((VALUE));
ary_alloc         118 array.c            VALUE ary = ary_alloc(klass);
ary_alloc         335 array.c            VALUE ary = ary_alloc(klass);
ary_alloc         609 array.c            ary2 = ary_alloc(klass);
ary_alloc        2970 array.c            rb_define_alloc_func(rb_cArray, ary_alloc);


ary_make_hash

ary_make_hash    2645 array.c            hash = ary_make_hash(to_ary(ary2), 0);
ary_make_hash    2676 array.c            hash = ary_make_hash(ary2, 0);
ary_make_hash    2709 array.c            hash = ary_make_hash(ary1, ary2);
ary_make_hash    2747 array.c            hash = ary_make_hash(ary, 0);


ary_make_shared

ary_make_shared   502 array.c            ary_make_shared(ary);
ary_make_shared   607 array.c            shared = ary_make_shared(ary);
ary_make_shared  2161 array.c            shared = ary_make_shared(orig);


ary_new

ary_new           137 array.c            return ary_new(rb_cArray, len);
ary_new           605 array.c            if (len == 0) return ary_new(klass, 0);
ary_new          2364 array.c            if (len == 0) return ary_new(rb_obj_class(ary), 0);
ary_new          2373 array.c            ary2 = ary_new(rb_obj_class(ary), len);


ary_sort_check

ary_sort_check   1572 array.c            ary_sort_check(data);
ary_sort_check   1596 array.c            ary_sort_check(data);


aryset

aryset            258 parse.c        static NODE *aryset();
aryset           4223 parse.c        			yyval.node = aryset(yyvsp[-3].node, yyvsp[-1].node);
aryset           4276 parse.c        			yyval.node = aryset(yyvsp[-3].node, yyvsp[-1].node);
aryset            161 parse.y        static NODE *aryset();
aryset            811 parse.y        			$$ = aryset($1, $3);
aryset            850 parse.y        			$$ = aryset($1, $3);


asc_startpos

asc_startpos      480 regex.c        static unsigned int asc_startpos _((const char *string, unsigned int pos));
asc_startpos      486 regex.c          asc_startpos, euc_startpos, sjis_startpos, utf8_startpos


asctime

asctime          1218 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             263 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            120 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            261 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           1072 eval.c         static void assign _((VALUE,NODE*,VALUE,int));
assign           4865 eval.c         		assign(self, block->var, val, lambda);
assign           5060 eval.c         	assign(self, list->nd_head, RARRAY(val)->ptr[i], pcall);
assign           5069 eval.c         	    assign(self, node->nd_args, rb_ary_new4(len-i, RARRAY(val)->ptr+i), pcall);
assign           5072 eval.c         	    assign(self, node->nd_args, rb_ary_new2(0), pcall);
assign           5081 eval.c         	assign(self, list->nd_head, Qnil, pcall);
assign           5802 eval.c         				assign(recv, opt->nd_head, *argv, 1);


assign_in_cond

assign_in_cond   9246 parse.c            if (assign_in_cond(node->nd_value) == 0) {
assign_in_cond   9329 parse.c            assign_in_cond(node);
assign_in_cond   5248 parse.y            if (assign_in_cond(node->nd_value) == 0) {
assign_in_cond   5331 parse.y            assign_in_cond(node);


assignable

assignable        257 parse.c        static NODE *assignable();
assignable       4217 parse.c        			yyval.node = assignable(yyvsp[0].id, 0);
assignable       4270 parse.c        			yyval.node = assignable(yyvsp[0].id, 0);
assignable       5972 parse.c        			yyval.node = assignable(yyvsp[0].id, 0);
assignable       6112 parse.c        			yyval.node = assignable(yyvsp[-2].id, yyvsp[0].node);
assignable        160 parse.y        static NODE *assignable();
assignable        807 parse.y        			$$ = assignable($1, 0);
assignable        846 parse.y        			$$ = assignable($1, 0);
assignable       2205 parse.y        			$$ = assignable($1, 0);
assignable       2317 parse.y        			$$ = assignable($1, $3);


atanh

atanh             281 math.c             d = atanh(RFLOAT(x)->value);
atanh              31 missing.h      extern double atanh _((double));


attrset

attrset           259 parse.c        static NODE *attrset();
attrset          4229 parse.c        			yyval.node = attrset(yyvsp[-2].node, yyvsp[0].id);
attrset          4235 parse.c        			yyval.node = attrset(yyvsp[-2].node, yyvsp[0].id);
attrset          4241 parse.c        			yyval.node = attrset(yyvsp[-2].node, yyvsp[0].id);
attrset          4282 parse.c        			yyval.node = attrset(yyvsp[-2].node, yyvsp[0].id);
attrset          4288 parse.c        			yyval.node = attrset(yyvsp[-2].node, yyvsp[0].id);
attrset          4294 parse.c        			yyval.node = attrset(yyvsp[-2].node, yyvsp[0].id);
attrset           162 parse.y        static NODE *attrset();
attrset           815 parse.y        			$$ = attrset($1, $3);
attrset           819 parse.y        			$$ = attrset($1, $3);
attrset           823 parse.y        			$$ = attrset($1, $3);
attrset           854 parse.y        			$$ = attrset($1, $3);
attrset           858 parse.y        			$$ = attrset($1, $3);
attrset           862 parse.y        			$$ = attrset($1, $3);


autoload_delete

autoload_delete  1340 variable.c         NODE *load = autoload_delete(klass, id);
autoload_delete  1481 variable.c     	    autoload_delete(mod, id);
autoload_delete  1658 variable.c     		autoload_delete(klass, id);


autoload_file

autoload_file    1394 variable.c         return autoload_file(mod, id);
autoload_file    1592 variable.c     	    if (value == Qundef && NIL_P(autoload_file(klass, id)))


backtrace

backtrace        6187 eval.c             return backtrace(lev);
backtrace        6196 eval.c             ary = backtrace(-1);
backtrace        6205 eval.c             return backtrace(-1);
backtrace        6361 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));


bad

bad               332 bignum.c       	if (badcheck) goto bad;
bad               350 bignum.c       	if (badcheck) goto bad;
bad               432 bignum.c       	    if (end == str) goto bad; /* no number */
bad               434 bignum.c       	    if (*end) goto bad;	      /* trailing garbage */
bad               452 bignum.c           if (badcheck && *str == '_') goto bad;
bad               460 bignum.c       		if (nondigit) goto bad;
bad               499 bignum.c       	if (s+1 < str && str[-1] == '_') goto bad;
bad               502 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               200 ext/socket/getaddrinfo.c #define ERR(err) { error = (err); goto bad; }
bad               540 ext/socket/getaddrinfo.c  bad:
bad               634 ext/socket/getaddrinfo.c 		goto bad;
bad               695 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              2272 object.c       	  bad:
bad              2286 object.c       		    if (n == buf || !ISDIGIT(n[-1])) goto bad;
bad              2288 object.c       		    if (!ISDIGIT(*p)) goto bad;
bad              2305 object.c       	    if (p == end) goto bad;
bad              2307 object.c       	    if (*end) goto bad;


base64_conv

base64_conv       318 ext/nkf/nkf-utf8/nkf.c STATIC  void    base64_conv PROTO((int c2,int c1));
base64_conv      1812 ext/nkf/nkf-utf8/nkf.c 	    o_base64conv = oconv; oconv = base64_conv;


base64decode

base64decode      342 ext/nkf/nkf-utf8/nkf.c STATIC  int     base64decode PROTO((int c));
base64decode     4113 ext/nkf/nkf-utf8/nkf.c     t1 = 0x3f & base64decode(c1);
base64decode     4114 ext/nkf/nkf-utf8/nkf.c     t2 = 0x3f & base64decode(c2);
base64decode     4115 ext/nkf/nkf-utf8/nkf.c     t3 = 0x3f & base64decode(c3);
base64decode     4116 ext/nkf/nkf-utf8/nkf.c     t4 = 0x3f & base64decode(c4);


before_exec

before_exec       983 process.c          before_exec();
before_exec      1026 process.c          before_exec();
before_exec      1034 process.c      	    before_exec();
before_exec      1043 process.c      	    before_exec();
before_exec      1052 process.c      	    before_exec();
before_exec      1117 process.c          before_exec();
before_exec      1164 process.c      	    before_exec();


big2ull

big2ull           814 bignum.c           unsigned LONG_LONG num = big2ull(x, "unsigned long long");
big2ull           824 bignum.c           unsigned LONG_LONG num = big2ull(x, "long long");


big2ulong

big2ulong         753 bignum.c           unsigned long num = big2ulong(x, "unsigned long");
big2ulong         764 bignum.c           unsigned long num = big2ulong(x, "unsigned long");
big2ulong         779 bignum.c           unsigned long num = big2ulong(x, "long");


bigadd

bigadd           1173 bignum.c       	return bignorm(bigadd(x, y, 1));
bigadd           1199 bignum.c       	return bignorm(bigadd(x, y, 0));
bigadd           1402 bignum.c       	if (divp) *divp = bigadd(*divp, rb_int2big(1), 0);
bigadd           1403 bignum.c       	if (modp) *modp = bigadd(mod, y, 1);


bigdivmod

bigdivmod        1439 bignum.c           bigdivmod(x, y, &z, 0);
bigdivmod        1470 bignum.c           bigdivmod(x, y, 0, &z);
bigdivmod        1530 bignum.c           bigdivmod(x, y, &div, &mod);


bigdivrem

bigdivrem        1400 bignum.c           bigdivrem(x, y, divp, &mod);
bigdivrem        1501 bignum.c           bigdivrem(x, y, 0, &z);


bignew

bignew            141 bignum.c           big = bignew(DIGSPERLONG, 1);
bignew            242 bignum.c           big = bignew(DIGSPERLL, 1);
bignew            296 bignum.c           VALUE big = bignew(QUAD_SIZE/SIZEOF_BDIGITS, 1);
bignew            454 bignum.c           z = bignew(len, sign);
bignew            550 bignum.c           big = bignew(DIGSPERLL, 1);
bignew            857 bignum.c           z = bignew(i, d>=0);
bignew           1091 bignum.c           z = bignew(RBIGNUM(x)->len, z==0);
bignew           1134 bignum.c           z = bignew(len, sign);
bignew           1242 bignum.c           z = bignew(j, RBIGNUM(x)->sign==RBIGNUM(y)->sign);
bignew           1302 bignum.c           z = bignew(nx==ny?nx+2:nx+1, RBIGNUM(x)->sign==RBIGNUM(y)->sign);
bignew           1672 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           1788 bignum.c           z = bignew(l2, !(RBIGNUM(x)->sign ^ RBIGNUM(y)->sign));
bignew           1825 bignum.c           z = bignew(len+s1+1, RBIGNUM(x)->sign);
bignew           1874 bignum.c           z = bignew(j, RBIGNUM(x)->sign);
bignew           2015 bignum.c           v = bignew(len,1);


bignew_1

bignew_1           56 bignum.c       #define bignew(len,sign) bignew_1(rb_cBignum,len,sign)
bignew_1           62 bignum.c           VALUE z = bignew_1(CLASS_OF(x), RBIGNUM(x)->len, RBIGNUM(x)->sign);


bignorm

bignorm           129 bignum.c           return bignorm(x);
bignorm           256 bignum.c           return bignorm(big);
bignorm           310 bignum.c           return bignorm(big);
bignorm           447 bignum.c       	    return bignorm(big);
bignorm           507 bignum.c           return bignorm(z);
bignorm           873 bignum.c           return bignorm(dbl2big(d));
bignorm          1032 bignum.c           return bignorm(z);
bignorm          1062 bignum.c           return bignorm(z);
bignorm          1173 bignum.c       	return bignorm(bigadd(x, y, 1));
bignorm          1199 bignum.c       	return bignorm(bigadd(x, y, 0));
bignorm          1260 bignum.c           return bignorm(z);
bignorm          1441 bignum.c           return bignorm(z);
bignorm          1472 bignum.c           return bignorm(z);
bignorm          1503 bignum.c           return bignorm(z);
bignorm          1532 bignum.c           return rb_assoc_new(bignorm(div), bignorm(mod));
bignorm          1618 bignum.c       	    return bignorm(z);
bignorm          1682 bignum.c           return bignorm(z);
bignorm          1739 bignum.c           return bignorm(z);
bignorm          1799 bignum.c           return bignorm(z);
bignorm          1837 bignum.c           return bignorm(z);
bignorm          1887 bignum.c           return bignorm(z);


bigsub

bigsub           1123 bignum.c       	if (sign) return bigsub(y, x);
bigsub           1124 bignum.c       	return bigsub(x, y);


bind

bind             8101 eval.c             VALUE bind;
bind             8104 eval.c             bind = Data_Make_Struct(rb_obj_class(self),struct BLOCK,blk_mark,blk_free,data);
bind             8105 eval.c             CLONESETUP(bind, self);
bind             8108 eval.c             return bind;
bind             8120 eval.c             VALUE bind;
bind             8123 eval.c             bind = Data_Make_Struct(rb_obj_class(self),struct BLOCK,blk_mark,blk_free,data);
bind             8126 eval.c             return bind;
bind             8151 eval.c             VALUE bind;
bind             8154 eval.c             bind = Data_Make_Struct(rb_cBinding,struct BLOCK,blk_mark,blk_free,data);
bind             8182 eval.c             return bind;
bind             8622 eval.c             VALUE bind;
bind             8625 eval.c             bind = Data_Make_Struct(rb_cBinding,struct BLOCK,blk_mark,blk_free,data);
bind             8636 eval.c             return bind;
bind             1105 ext/socket/socket.c 	    status = bind(fd, res->ai_addr, res->ai_addrlen);
bind             1110 ext/socket/socket.c 		status = bind(fd, arg->local.res->ai_addr, arg->local.res->ai_addrlen);
bind             1408 ext/socket/socket.c         status = bind(fd, (struct sockaddr*)&sockaddr, sizeof(sockaddr));
bind             1562 ext/socket/socket.c 	if (bind(fileno(fptr->f), res->ai_addr, res->ai_addrlen) < 0) {
bind             2288 ext/socket/socket.c     if (bind(fileno(fptr->f), (struct sockaddr*)RSTRING(addr)->ptr, RSTRING(addr)->len) < 0)
bind             2018 win32/win32.c  	r = bind(TO_SOCKET(s), addr, addrlen);
bind              377 win32/win32.h  #ifdef bind


blk

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    8085 eval.c         	blk_copy_prev(dup);
blk_copy_prev    8167 eval.c         	blk_copy_prev(data);
blk_copy_prev    8242 eval.c         	blk_copy_prev(data);
blk_copy_prev    8630 eval.c         	blk_copy_prev(data);
blk_copy_prev    11629 eval.c         	blk_copy_prev(&dummy);


blk_dup

blk_dup          8106 eval.c             blk_dup(data, orig);
blk_dup          8124 eval.c             blk_dup(data, orig);


blk_free

blk_free         2447 eval.c         static void blk_free();
blk_free         2453 eval.c             if (TYPE(proc) == T_DATA && RDATA(proc)->dfree == (RUBY_DATA_FUNC)blk_free) {
blk_free         8104 eval.c             bind = Data_Make_Struct(rb_obj_class(self),struct BLOCK,blk_mark,blk_free,data);
blk_free         8123 eval.c             bind = Data_Make_Struct(rb_obj_class(self),struct BLOCK,blk_mark,blk_free,data);
blk_free         8154 eval.c             bind = Data_Make_Struct(rb_cBinding,struct BLOCK,blk_mark,blk_free,data);
blk_free         8233 eval.c             block = Data_Make_Struct(klass, struct BLOCK, blk_mark, blk_free, data);
blk_free         8625 eval.c             bind = Data_Make_Struct(rb_cBinding,struct BLOCK,blk_mark,blk_free,data);
blk_free         11663 eval.c         	blk_free(saved_block);


blk_mark

blk_mark         8104 eval.c             bind = Data_Make_Struct(rb_obj_class(self),struct BLOCK,blk_mark,blk_free,data);
blk_mark         8123 eval.c             bind = Data_Make_Struct(rb_obj_class(self),struct BLOCK,blk_mark,blk_free,data);
blk_mark         8154 eval.c             bind = Data_Make_Struct(rb_cBinding,struct BLOCK,blk_mark,blk_free,data);
blk_mark         8233 eval.c             block = Data_Make_Struct(klass, struct BLOCK, blk_mark, blk_free, data);
blk_mark         8533 eval.c             if (RDATA(other)->dmark != (RUBY_DATA_FUNC)blk_mark) return Qfalse;
blk_mark         8625 eval.c             bind = Data_Make_Struct(rb_cBinding,struct BLOCK,blk_mark,blk_free,data);
blk_mark         9403 eval.c             else if (RDATA(body)->dmark == (RUBY_DATA_FUNC)blk_mark) {


block_append

block_append      242 node.h         #define NEW_RFUNC(b1,b2) NEW_SCOPE(block_append(b1,b2))
block_append      237 parse.c        static NODE *block_append();
block_append     3691 parse.c        			ruby_eval_tree = block_append(ruby_eval_tree, yyvsp[0].node);
block_append     3705 parse.c        			    yyval.node = block_append(yyval.node, yyvsp[-1].node);
block_append     3729 parse.c        			yyval.node = block_append(yyvsp[-2].node, newline_node(yyvsp[0].node));
block_append     3844 parse.c        			ruby_eval_tree_begin = block_append(ruby_eval_tree_begin,
block_append     4371 parse.c        			yyval.node = block_append(yyvsp[-3].node, NEW_UNDEF(yyvsp[0].id));
block_append     5644 parse.c        			    yyvsp[-1].node = block_append(yyvsp[-3].node, yyvsp[-1].node);
block_append     6013 parse.c        			yyval.node = block_append(NEW_ARGS(yyvsp[-5].num, yyvsp[-3].node, yyvsp[-1].id), yyvsp[0].node);
block_append     6019 parse.c        			yyval.node = block_append(NEW_ARGS(yyvsp[-3].num, yyvsp[-1].node, -1), yyvsp[0].node);
block_append     6025 parse.c        			yyval.node = block_append(NEW_ARGS(yyvsp[-3].num, 0, yyvsp[-1].id), yyvsp[0].node);
block_append     6031 parse.c        			yyval.node = block_append(NEW_ARGS(yyvsp[-1].num, 0, -1), yyvsp[0].node);
block_append     6037 parse.c        			yyval.node = block_append(NEW_ARGS(0, yyvsp[-3].node, yyvsp[-1].id), yyvsp[0].node);
block_append     6043 parse.c        			yyval.node = block_append(NEW_ARGS(0, yyvsp[-1].node, -1), yyvsp[0].node);
block_append     6049 parse.c        			yyval.node = block_append(NEW_ARGS(0, 0, yyvsp[-1].id), yyvsp[0].node);
block_append     6055 parse.c        			yyval.node = block_append(NEW_ARGS(0, 0, -1), yyvsp[0].node);
block_append     6125 parse.c        			yyval.node = block_append(yyvsp[-2].node, yyvsp[0].node);
block_append     9766 parse.c            return block_append(var, node);
block_append     9801 parse.c        	block_append(ruby_eval_tree,
block_append     9812 parse.c        	    block_append(NEW_GASGN(rb_intern("$F"),
block_append     9819 parse.c        	    block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")),
block_append      140 parse.y        static NODE *block_append();
block_append      364 parse.y        			ruby_eval_tree = block_append(ruby_eval_tree, $2);
block_append      381 parse.y        			    $$ = block_append($$, $3);
block_append      404 parse.y        			$$ = block_append($1, newline_node($3));
block_append      491 parse.y        			ruby_eval_tree_begin = block_append(ruby_eval_tree_begin,
block_append      929 parse.y        			$$ = block_append($1, NEW_UNDEF($4));
block_append     1896 parse.y        			    $5 = block_append($3, $5);
block_append     2241 parse.y        			$$ = block_append(NEW_ARGS($1, $3, $5), $6);
block_append     2245 parse.y        			$$ = block_append(NEW_ARGS($1, $3, -1), $4);
block_append     2249 parse.y        			$$ = block_append(NEW_ARGS($1, 0, $3), $4);
block_append     2253 parse.y        			$$ = block_append(NEW_ARGS($1, 0, -1), $2);
block_append     2257 parse.y        			$$ = block_append(NEW_ARGS(0, $1, $3), $4);
block_append     2261 parse.y        			$$ = block_append(NEW_ARGS(0, $1, -1), $2);
block_append     2265 parse.y        			$$ = block_append(NEW_ARGS(0, 0, $1), $2);
block_append     2269 parse.y        			$$ = block_append(NEW_ARGS(0, 0, -1), $1);
block_append     2328 parse.y        			$$ = block_append($1, $3);
block_append     5768 parse.y            return block_append(var, node);
block_append     5803 parse.y        	block_append(ruby_eval_tree,
block_append     5814 parse.y        	    block_append(NEW_GASGN(rb_intern("$F"),
block_append     5821 parse.y        	    block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")),


block_pass

block_pass        190 eval.c         static VALUE block_pass _((VALUE,NODE*));
block_pass       3095 eval.c         	result = block_pass(self, node);


bm_init_skip

bm_init_skip      180 ext/stringio/stringio.c static void bm_init_skip _((long *, const char *, long));
bm_init_skip      895 ext/stringio/stringio.c 		bm_init_skip(skip, p, n);
bm_init_skip      181 regex.c        static void bm_init_skip _((int *, unsigned char*, int, const unsigned char*));
bm_init_skip     2451 regex.c              bm_init_skip(bufp->must_skip, (unsigned char*)bufp->must+1,


bm_mark

bm_mark          8775 eval.c             method = Data_Make_Struct(mklass, struct METHOD, bm_mark, free, data);
bm_mark          8828 eval.c             if (TYPE(other) != T_DATA || RDATA(other)->dmark != (RUBY_DATA_FUNC)bm_mark)
bm_mark          8860 eval.c             method = Data_Make_Struct(rb_cUnboundMethod, struct METHOD, bm_mark, free, data);
bm_mark          8960 eval.c             clone = Data_Make_Struct(CLASS_OF(self),struct METHOD, bm_mark, free, data);
bm_mark          9123 eval.c             method = Data_Make_Struct(rb_cMethod,struct METHOD,bm_mark,free,bound);
bm_mark          9331 eval.c             if (TYPE(m) == T_DATA && RDATA(m)->dmark == (RUBY_DATA_FUNC)bm_mark) {
bm_mark          9400 eval.c             if (RDATA(body)->dmark == (RUBY_DATA_FUNC)bm_mark) {


bm_search

bm_search         181 ext/stringio/stringio.c static long bm_search _((const char *, long, const char *, long, const long *));
bm_search         896 ext/stringio/stringio.c 		if ((pos = bm_search(p, n, s, e - s, skip)) >= 0) {
bm_search        3227 regex.c              pos = bm_search(bufp->must+1, len,


bmcall

bmcall           8461 eval.c         static VALUE bmcall _((VALUE, VALUE));
bmcall           8495 eval.c         	    data->body->nd_cfnc == bmcall) {
bmcall           9317 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);


bool

bool              309 ext/openssl/ossl_asn1.c     int bool;
bool              313 ext/openssl/ossl_asn1.c     if((bool = d2i_ASN1_BOOLEAN(NULL, &p, length)) < 0)
bool              316 ext/openssl/ossl_asn1.c     return bool ? Qtrue : Qfalse;
bool               46 win32/win32.c  #ifndef bool
bool               84 win32/win32.c  bool NtSyncProcess = TRUE;
bool               87 win32/win32.c  static bool has_redirection(const char *);
bool             1070 win32/win32.c  static bool


boot_defclass

boot_defclass    2589 object.c           rb_cObject = boot_defclass("Object", 0);
boot_defclass    2590 object.c           rb_cModule = boot_defclass("Module", rb_cObject);
boot_defclass    2591 object.c           rb_cClass =  boot_defclass("Class",  rb_cModule);


break_jump

break_jump       3144 eval.c         	break_jump(rb_eval(self, node->nd_stts));
break_jump       4444 eval.c             break_jump(Qnil);


broken_getc

broken_getc       330 ext/nkf/nkf-utf8/nkf.c STATIC  int     broken_getc PROTO((FILE *f));
broken_getc      1861 ext/nkf/nkf-utf8/nkf.c 	i_bgetc = i_getc; i_getc = broken_getc;


broken_ungetc

broken_ungetc     331 ext/nkf/nkf-utf8/nkf.c STATIC  int     broken_ungetc PROTO((int c,FILE *f));
broken_ungetc    1862 ext/nkf/nkf-utf8/nkf.c 	i_bungetc = i_ungetc; i_ungetc = broken_ungetc;


bsock_send

bsock_send       1586 ext/socket/socket.c 	return bsock_send(argc, argv, sock);
bsock_send       3154 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;


c_parray

c_parray          493 ext/dl/dl.c        return (void*)c_parray(v,size);
c_parray          504 ext/dl/dl.c          return (void*)c_parray(v,size);
c_parray          509 ext/dl/dl.c            return (void*)c_parray(v,size);
c_parray          514 ext/dl/dl.c        return (void*)c_parray(v, size);


caddr_t

caddr_t          1708 ext/socket/socket.c     msg.msg_control = (caddr_t)&cmsg;
caddr_t          1716 ext/socket/socket.c     msg.msg_accrights = (caddr_t)&fd;
caddr_t          1783 ext/socket/socket.c     msg.msg_control = (caddr_t)&cmsg;
caddr_t          1791 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       5683 eval.c         		    result = call_cfunc(body->nd_cfnc, recv, len, argc, argv);
call_cfunc       5692 eval.c         		result = call_cfunc(body->nd_cfnc, recv, len, argc, argv);


call_end_proc

call_end_proc    7640 eval.c         static void call_end_proc _((VALUE data));
call_end_proc    7663 eval.c             rb_set_end_proc(call_end_proc, rb_block_proc());
call_end_proc    7697 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           245 parse.c        static NODE *call_op();
call_op          3893 parse.c        				yyval.node->nd_value = call_op(gettable(vid),yyvsp[-1].id,1,yyvsp[0].node);
call_op          4509 parse.c        				yyval.node->nd_value = call_op(gettable(vid),yyvsp[-1].id,1,yyvsp[0].node);
call_op          4634 parse.c        			yyval.node = call_op(yyvsp[-2].node, '+', 1, yyvsp[0].node);
call_op          4640 parse.c        		        yyval.node = call_op(yyvsp[-2].node, '-', 1, yyvsp[0].node);
call_op          4646 parse.c        		        yyval.node = call_op(yyvsp[-2].node, '*', 1, yyvsp[0].node);
call_op          4652 parse.c        			yyval.node = call_op(yyvsp[-2].node, '/', 1, yyvsp[0].node);
call_op          4658 parse.c        			yyval.node = call_op(yyvsp[-2].node, '%', 1, yyvsp[0].node);
call_op          4664 parse.c        			yyval.node = call_op(yyvsp[-2].node, tPOW, 1, yyvsp[0].node);
call_op          4670 parse.c        			yyval.node = call_op(call_op(yyvsp[-2].node, tPOW, 1, yyvsp[0].node), tUMINUS, 0, 0);
call_op          4676 parse.c        			yyval.node = call_op(call_op(yyvsp[-2].node, tPOW, 1, yyvsp[0].node), tUMINUS, 0, 0);
call_op          4686 parse.c        			    yyval.node = call_op(yyvsp[0].node, tUPLUS, 0, 0);
call_op          4693 parse.c        			yyval.node = call_op(yyvsp[0].node, tUMINUS, 0, 0);
call_op          4699 parse.c        		        yyval.node = call_op(yyvsp[-2].node, '|', 1, yyvsp[0].node);
call_op          4705 parse.c        			yyval.node = call_op(yyvsp[-2].node, '^', 1, yyvsp[0].node);
call_op          4711 parse.c        			yyval.node = call_op(yyvsp[-2].node, '&', 1, yyvsp[0].node);
call_op          4717 parse.c        			yyval.node = call_op(yyvsp[-2].node, tCMP, 1, yyvsp[0].node);
call_op          4723 parse.c        			yyval.node = call_op(yyvsp[-2].node, '>', 1, yyvsp[0].node);
call_op          4729 parse.c        			yyval.node = call_op(yyvsp[-2].node, tGEQ, 1, yyvsp[0].node);
call_op          4735 parse.c        			yyval.node = call_op(yyvsp[-2].node, '<', 1, yyvsp[0].node);
call_op          4741 parse.c        			yyval.node = call_op(yyvsp[-2].node, tLEQ, 1, yyvsp[0].node);
call_op          4747 parse.c        			yyval.node = call_op(yyvsp[-2].node, tEQ, 1, yyvsp[0].node);
call_op          4753 parse.c        			yyval.node = call_op(yyvsp[-2].node, tEQQ, 1, yyvsp[0].node);
call_op          4759 parse.c        			yyval.node = NEW_NOT(call_op(yyvsp[-2].node, tEQ, 1, yyvsp[0].node));
call_op          4783 parse.c        			yyval.node = call_op(yyvsp[0].node, '~', 0, 0);
call_op          4789 parse.c        			yyval.node = call_op(yyvsp[-2].node, tLSHFT, 1, yyvsp[0].node);
call_op          4795 parse.c        			yyval.node = call_op(yyvsp[-2].node, tRSHFT, 1, yyvsp[0].node);
call_op          9297 parse.c        	return call_op(node,tEQ,1,NEW_GVAR(rb_intern("$.")));
call_op           148 parse.y        static NODE *call_op();
call_op           532 parse.y        				$$->nd_value = call_op(gettable(vid),$2,1,$3);
call_op           996 parse.y        				$$->nd_value = call_op(gettable(vid),$2,1,$3);
call_op          1101 parse.y        			$$ = call_op($1, '+', 1, $3);
call_op          1105 parse.y        		        $$ = call_op($1, '-', 1, $3);
call_op          1109 parse.y        		        $$ = call_op($1, '*', 1, $3);
call_op          1113 parse.y        			$$ = call_op($1, '/', 1, $3);
call_op          1117 parse.y        			$$ = call_op($1, '%', 1, $3);
call_op          1121 parse.y        			$$ = call_op($1, tPOW, 1, $3);
call_op          1125 parse.y        			$$ = call_op(call_op($2, tPOW, 1, $4), tUMINUS, 0, 0);
call_op          1129 parse.y        			$$ = call_op(call_op($2, tPOW, 1, $4), tUMINUS, 0, 0);
call_op          1137 parse.y        			    $$ = call_op($2, tUPLUS, 0, 0);
call_op          1142 parse.y        			$$ = call_op($2, tUMINUS, 0, 0);
call_op          1146 parse.y        		        $$ = call_op($1, '|', 1, $3);
call_op          1150 parse.y        			$$ = call_op($1, '^', 1, $3);
call_op          1154 parse.y        			$$ = call_op($1, '&', 1, $3);
call_op          1158 parse.y        			$$ = call_op($1, tCMP, 1, $3);
call_op          1162 parse.y        			$$ = call_op($1, '>', 1, $3);
call_op          1166 parse.y        			$$ = call_op($1, tGEQ, 1, $3);
call_op          1170 parse.y        			$$ = call_op($1, '<', 1, $3);
call_op          1174 parse.y        			$$ = call_op($1, tLEQ, 1, $3);
call_op          1178 parse.y        			$$ = call_op($1, tEQ, 1, $3);
call_op          1182 parse.y        			$$ = call_op($1, tEQQ, 1, $3);
call_op          1186 parse.y        			$$ = NEW_NOT(call_op($1, tEQ, 1, $3));
call_op          1202 parse.y        			$$ = call_op($2, '~', 0, 0);
call_op          1206 parse.y        			$$ = call_op($1, tLSHFT, 1, $3);
call_op          1210 parse.y        			$$ = call_op($1, tRSHFT, 1, $3);
call_op          5299 parse.y        	return call_op(node,tEQ,1,NEW_GVAR(rb_intern("$.")));


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  1094 eval.c         static void call_trace_func _((rb_event_t,NODE*,VALUE,ID,VALUE));
call_trace_func  2551 eval.c         	rb_remove_event_hook(call_trace_func);
call_trace_func  2559 eval.c         	if (hook->func == call_trace_func)
call_trace_func  2562 eval.c             rb_add_event_hook(call_trace_func, RUBY_EVENT_ALL);


cap_getc

cap_getc          409 ext/nkf/nkf-utf8/nkf.c STATIC int cap_getc PROTO((FILE *f));
cap_getc         1842 ext/nkf/nkf-utf8/nkf.c         i_cgetc = i_getc; i_getc = cap_getc;


cap_ungetc

cap_ungetc        410 ext/nkf/nkf-utf8/nkf.c STATIC int cap_ungetc PROTO((int c,FILE *f));
cap_ungetc       1843 ext/nkf/nkf-utf8/nkf.c         i_cungetc = i_ungetc; i_ungetc= cap_ungetc;


cary2ary

cary2ary          782 ext/dl/ptr.c   	return cary2ary((char *)data->ptr + offset, data->stype[i], data->ssize[i]);
cary2ary          815 ext/dl/ptr.c   	return cary2ary((char *)data->ptr + offset, data->stype[i], data->ssize[i]);


catch_interrupt

catch_interrupt  3215 win32/win32.c  	catch_interrupt();
catch_interrupt  3235 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      11504 eval.c             signal(sig, catch_timer);
catch_timer      11552 eval.c             signal(sig, catch_timer);
catch_timer      11608 eval.c         	posix_signal(SIGVTALRM, catch_timer);
catch_timer      11610 eval.c         	signal(SIGVTALRM, catch_timer);


char2type

char2type          87 ext/dl/sym.c       if( ! char2type(*ptype) ){
char2type         179 ext/dl/sym.c     type = char2type(StringValuePtr(ch)[0]);
char2type         218 ext/dl/sym.c       typestr = char2type(*ptype++);
char2type         234 ext/dl/sym.c         const char *ty = char2type(*ptype++);


char_size

char_size        3209 ext/nkf/nkf-utf8/nkf.c         f_line += char_size(c2,c1);
char_size        3214 ext/nkf/nkf-utf8/nkf.c                 f_line = char_size(c2,c1);
char_size        3246 ext/nkf/nkf-utf8/nkf.c 		    f_line = char_size(c2,c1);
char_size        3251 ext/nkf/nkf-utf8/nkf.c 		    f_line = char_size(c2,c1);
char_size        3273 ext/nkf/nkf-utf8/nkf.c 			f_line = char_size(c2,c1);
char_size        3277 ext/nkf/nkf-utf8/nkf.c 		    f_line = char_size(c2,c1);


chdir

chdir             550 dir.c              if (chdir(RSTRING(path)->ptr) < 0)
chdir            2333 file.c             if (chdir(drive) == 0) {
chdir            2335 file.c         	chdir(oldcwd);
chdir             600 ruby.c         	    if (*s && chdir(s) < 0) {
chdir             615 ruby.c         	    if (chdir(s) < 0) {


check3rdbyte

check3rdbyte     1354 file.c             return check3rdbyte(fname, S_ISUID);
check3rdbyte     1372 file.c             return check3rdbyte(fname, S_ISGID);
check3rdbyte     1390 file.c             return check3rdbyte(fname, S_ISVTX);


check_autoload_table

check_autoload_table 1294 variable.c     	tbl = check_autoload_table(av);
check_autoload_table 1317 variable.c     	struct st_table *tbl = check_autoload_table(val);
check_autoload_table 1358 variable.c     	!(tbl = check_autoload_table(val)) || !st_lookup(tbl, id, &load)) {


check_dirname

check_dirname     692 dir.c          static void check_dirname _((volatile VALUE *));
check_dirname     721 dir.c              check_dirname(&path);
check_dirname     762 dir.c              check_dirname(&path);
check_dirname     782 dir.c              check_dirname(&dir);


check_gid_switch

check_gid_switch 2212 process.c          check_gid_switch();
check_gid_switch 2235 process.c          check_gid_switch();
check_gid_switch 2259 process.c          check_gid_switch();
check_gid_switch 2284 process.c          check_gid_switch();
check_gid_switch 2308 process.c          check_gid_switch();
check_gid_switch 2380 process.c          check_gid_switch();
check_gid_switch 2613 process.c          check_gid_switch();
check_gid_switch 2893 process.c          check_gid_switch();
check_gid_switch 2921 process.c          check_gid_switch();
check_gid_switch 3071 process.c          check_gid_switch();
check_gid_switch 3250 process.c          check_gid_switch();
check_gid_switch 3290 process.c          check_gid_switch();


check_int

check_int        1582 numeric.c          check_int(num);
check_int        1592 numeric.c          check_int(num);


check_modifiable

check_modifiable   40 ext/stringio/stringio.c static void check_modifiable _((struct StringIO *));
check_modifiable  732 ext/stringio/stringio.c     check_modifiable(ptr);
check_modifiable 1006 ext/stringio/stringio.c     check_modifiable(ptr);
check_modifiable 1062 ext/stringio/stringio.c     check_modifiable(ptr);


check_strio

check_strio        36 ext/stringio/stringio.c static struct StringIO* check_strio _((VALUE));
check_strio        91 ext/stringio/stringio.c     struct StringIO *ptr = check_strio(self);
check_strio       219 ext/stringio/stringio.c     struct StringIO *ptr = check_strio(self);
check_strio       502 ext/stringio/stringio.c     if (check_strio(copy)) {


check_uid_switch

check_uid_switch 1868 process.c          check_uid_switch();
check_uid_switch 1892 process.c          check_uid_switch();
check_uid_switch 1915 process.c          check_uid_switch();
check_uid_switch 1940 process.c          check_uid_switch();
check_uid_switch 1965 process.c          check_uid_switch();
check_uid_switch 2008 process.c          check_uid_switch();
check_uid_switch 2063 process.c          check_uid_switch();
check_uid_switch 2780 process.c          check_uid_switch();
check_uid_switch 2807 process.c          check_uid_switch();
check_uid_switch 3013 process.c          check_uid_switch();
check_uid_switch 3139 process.c          check_uid_switch();
check_uid_switch 3180 process.c          check_uid_switch();


check_uint

check_uint       1603 numeric.c      	check_uint(num);
check_uint       1619 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             853 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            1695 file.c             if (chmod(path, (int)mode) < 0)
chmod            1759 file.c             if (chmod(fptr->path, mode) == -1)
chmod            2236 file.c         	    if (chmod(dst, 0666) == 0 &&
chmod            4295 io.c           		    chmod(fn, st.st_mode);
chmod            3516 win32/win32.c  	if (chmod(path, mode) == -1) {


chmod_internal

chmod_internal   1689 file.c         static void chmod_internal _((const char *, void *));
chmod_internal   1726 file.c             n = apply2files(chmod_internal, rest, (void *)(long)mode);


chompdirsep

chompdirsep      2544 file.c         	    p = chompdirsep(skiproot(buf));
chompdirsep      2571 file.c         	    p = chompdirsep(skiproot(buf));
chompdirsep      2702 file.c             l1 = chompdirsep(p) - p;
chompdirsep      2777 file.c         	    f = chompdirsep(name) - name;
chompdirsep      2785 file.c         	    f = chompdirsep(p) - p;
chompdirsep      2874 file.c              extname = rb_str_new(e, chompdirsep(e) - e);	/* keep the dot, too! */
chompdirsep      2958 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              84 file.c             return chown(path, owner, group);
chown            1825 file.c             if (chown(path, args->owner, args->group) < 0)
chown            1900 file.c             if (chown(fptr->path, o, g) == -1)
chown             202 win32/win32.h  extern int chown(const char *, int, int);


chown_internal

chown_internal   1818 file.c         static void chown_internal _((const char *, void *));
chown_internal   1868 file.c             n = apply2files(chown_internal, rest, &arg);


chsize

chsize           3034 file.c         	if (chsize(tmpfd, pos) < 0) {
chsize           3083 file.c             if (chsize(fileno(f), pos) < 0)


class2path

class2path        403 marshal.c          path = RSTRING(class2path(rb_class_real(klass)))->ptr;
class2path        418 marshal.c      	w_unique(RSTRING(class2path(klass))->ptr, arg);
class2path        538 marshal.c      		VALUE path = class2path(obj);
class2path        546 marshal.c      		VALUE path = class2path(obj);


class_instance_method_list

class_instance_method_list  669 class.c            return class_instance_method_list(argc, argv, mod, ins_methods_i);
class_instance_method_list  687 class.c            return class_instance_method_list(argc, argv, mod, ins_methods_prot_i);
class_instance_method_list  713 class.c            return class_instance_method_list(argc, argv, mod, ins_methods_priv_i);
class_instance_method_list  731 class.c            return class_instance_method_list(argc, argv, mod, ins_methods_pub_i);


class_prefix

class_prefix     3578 eval.c         	    rb_const_set(class_prefix(self, node->nd_else), node->nd_else->nd_mid, result);
class_prefix     3912 eval.c         	    cbase = class_prefix(self, node->nd_cpath);
class_prefix     3970 eval.c         	    cbase = class_prefix(self, node->nd_cpath);
class_prefix     5131 eval.c         	    rb_const_set(class_prefix(self, lhs->nd_else), lhs->nd_else->nd_mid, val);


classname

classname          40 compar.c           const char *classname;
classname          44 compar.c       	classname = StringValuePtr(y);
classname          47 compar.c       	classname = rb_obj_classname(y);
classname          50 compar.c       	     rb_obj_classname(x), classname);
classname         180 variable.c         VALUE path = classname(mod);
classname         190 variable.c         VALUE path = classname(klass);


clearerr

clearerr          497 io.c           		clearerr(f);
clearerr          670 io.c               clearerr(fptr->f);
clearerr          734 io.c               clearerr(fptr->f);
clearerr          761 io.c               clearerr(fptr->f);
clearerr          815 io.c               clearerr(fptr->f);
clearerr          825 io.c               clearerr(fptr->f);
clearerr         1057 io.c           	clearerr(fptr->f);
clearerr         1069 io.c           		    clearerr(fptr->f);
clearerr         1076 io.c           			clearerr(fptr->f);
clearerr         1425 io.c           	clearerr(f);
clearerr         1431 io.c           		clearerr(f);
clearerr         1503 io.c           	clearerr(f);
clearerr         1868 io.c           	clearerr(f);
clearerr         1874 io.c           		clearerr(f);
clearerr         1913 io.c               clearerr(f);
clearerr         1920 io.c           	    clearerr(f);
clearerr         1939 io.c               clearerr(f);
clearerr         2314 io.c               clearerr(fptr->f);
clearerr         3394 io.c           	    clearerr(fptr->f);
clearerr         3211 win32/win32.c  	    clearerr(stream);


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            2981 win32/win32.c  	tmbuf->tms_utime = clock();
clock              55 wince/time.h   int clock(void);


clone_method

clone_method       82 class.c        	st_foreach(RCLASS(orig)->m_tbl, clone_method,
clone_method      130 class.c        	st_foreach(RCLASS(klass)->m_tbl, clone_method,


close

close             377 dln.c          	close(fd);
close             423 dln.c              close(fd);
close             427 dln.c              close(fd);
close            1071 dln.c              close(fd);
close            1077 dln.c              if (fd >= 0) close(fd);
close            1102 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             693 ext/nkf/nkf-utf8/nkf.c                     close(fds[0]);
close             696 ext/nkf/nkf-utf8/nkf.c                     close(fds[1]);
close             702 ext/nkf/nkf-utf8/nkf.c                 close(fds[1]);
close             705 ext/nkf/nkf-utf8/nkf.c                 close(fds[0]);
close             845 ext/nkf/nkf-utf8/nkf.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             448 ext/socket/getaddrinfo.c 			close(s);
close            1066 ext/socket/socket.c 	close(arg->fd);
close            1122 ext/socket/socket.c 	    close(fd);
close            1417 ext/socket/socket.c 	    close(fd);
close            1423 ext/socket/socket.c 	close(fd);
close            3035 file.c         	    close(tmpfd);
close            3038 file.c         	close(tmpfd);
close            2964 io.c           	    close(pr[0]);
close            2967 io.c           		close(pr[1]);
close            2971 io.c           	    close(pw[1]);
close            2974 io.c           		close(pw[0]);
close            2982 io.c           		close(fd);
close            2997 io.c           	close(pr[0]); close(pw[1]);
close            3012 io.c           		close(pr[1]);
close            3018 io.c           		close(pw[0]);
close            5030 io.c           	close(pipes[0]);
close            5031 io.c           	close(pipes[1]);
close            5038 io.c           	close(pipes[1]);
close              36 missing/dup2.c 			close(fd2);
close              38 missing/dup2.c 		close(fd2);
close              49 missing/dup2.c 	close(fd2);
close              55 missing/dup2.c 	    	close(fds[i--]);
close            1743 process.c          close(fd);
close             292 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        346 ext/nkf/nkf-utf8/nkf.c STATIC  void    close_mime PROTO(());
close_mime       4298 ext/nkf/nkf-utf8/nkf.c 	    close_mime();
close_mime       4434 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          240 dir.c          	if (dir->dir) closedir(dir->dir);
closedir          276 dir.c              if (dp->dir) closedir(dp->dir);
closedir          540 dir.c              closedir(dirp->dir);
closedir         1046 dir.c          	    closedir(dirp);


cmp_gt

cmp_gt            190 compar.c           if (RTEST(cmp_gt(x, max))) return Qfalse;
cmp_gt            236 compar.c           rb_define_method(rb_mComparable, ">", cmp_gt, 1);


cmp_lt

cmp_lt            189 compar.c           if (RTEST(cmp_lt(x, min))) return Qfalse;
cmp_lt            238 compar.c           rb_define_method(rb_mComparable, "<", cmp_lt, 1);


cmperr

cmperr            107 compar.c           if (NIL_P(c)) return cmperr();
cmperr            126 compar.c           if (NIL_P(c)) return cmperr();
cmperr            145 compar.c           if (NIL_P(c)) return cmperr();
cmperr            165 compar.c           if (NIL_P(c)) return cmperr();


code_score

code_score        323 ext/nkf/nkf-utf8/nkf.c STATIC  void    code_score PROTO((struct input_code *ptr));
code_score       1463 ext/nkf/nkf-utf8/nkf.c     code_score(ptr);
code_score       1522 ext/nkf/nkf-utf8/nkf.c               code_score(ptr);
code_score       1546 ext/nkf/nkf-utf8/nkf.c               code_score(ptr);
code_score       1600 ext/nkf/nkf-utf8/nkf.c               code_score(ptr);
code_score       1702 ext/nkf/nkf-utf8/nkf.c                       code_score(ptr);


code_status

code_status       324 ext/nkf/nkf-utf8/nkf.c STATIC  void    code_status PROTO((int c));
code_status      1913 ext/nkf/nkf-utf8/nkf.c         code_status(c1);
code_status      1984 ext/nkf/nkf-utf8/nkf.c                         code_status(c1);
code_status      2201 ext/nkf/nkf-utf8/nkf.c                 code_status(c0);
code_status      2251 ext/nkf/nkf-utf8/nkf.c         code_status(c1);
code_status      2261 ext/nkf/nkf-utf8/nkf.c             code_status(c1);
code_status      2305 ext/nkf/nkf-utf8/nkf.c             code_status(c1);
code_status      2317 ext/nkf/nkf-utf8/nkf.c                 code_status(c0);


collect_all

collect_all       230 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? collect_i : collect_all, ary);
collect_all       251 enum.c             rb_iterate(rb_each, obj, collect_all, ary);


compile

compile          1058 eval.c         static NODE *compile _((VALUE, char*, int));
compile          6308 eval.c         	node = compile(src, file, line);
compile            42 missing/alloca.c -- must know STACK_DIRECTION at compile-time


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             2435 file.c             while (cond) {\
cond              223 parse.c        static NODE *cond();
cond             3779 parse.c        			yyval.node = NEW_IF(cond(yyvsp[0].node), yyvsp[-2].node, 0);
cond             3790 parse.c        			yyval.node = NEW_UNLESS(cond(yyvsp[0].node), yyvsp[-2].node, 0);
cond             3802 parse.c        			    yyval.node = NEW_WHILE(cond(yyvsp[0].node), yyvsp[-2].node->nd_body, 0);
cond             3805 parse.c        			    yyval.node = NEW_WHILE(cond(yyvsp[0].node), yyvsp[-2].node, 1);
cond             3816 parse.c        			    yyval.node = NEW_UNTIL(cond(yyvsp[0].node), yyvsp[-2].node->nd_body, 0);
cond             3819 parse.c        			    yyval.node = NEW_UNTIL(cond(yyvsp[0].node), yyvsp[-2].node, 1);
cond             4006 parse.c        			yyval.node = NEW_NOT(cond(yyvsp[0].node));
cond             4012 parse.c        			yyval.node = NEW_NOT(cond(yyvsp[0].node));
cond             4777 parse.c        			yyval.node = NEW_NOT(cond(yyvsp[0].node));
cond             4824 parse.c        			yyval.node = NEW_IF(cond(yyvsp[-4].node), yyvsp[-2].node, yyvsp[0].node);
cond             5243 parse.c        			yyval.node = NEW_IF(cond(yyvsp[-4].node), yyvsp[-2].node, yyvsp[-1].node);
cond             5255 parse.c        			yyval.node = NEW_UNLESS(cond(yyvsp[-4].node), yyvsp[-2].node, yyvsp[-1].node);
cond             5275 parse.c        			yyval.node = NEW_WHILE(cond(yyvsp[-4].node), yyvsp[-1].node, 1);
cond             5293 parse.c        			yyval.node = NEW_UNTIL(cond(yyvsp[-4].node), yyvsp[-1].node, 1);
cond             5474 parse.c        			yyval.node = NEW_IF(cond(yyvsp[-3].node), yyvsp[-1].node, yyvsp[0].node);
cond             9025 parse.c            int cond = 0;
cond             9039 parse.c        	    if (!cond) yyerror("void value expression");
cond             9061 parse.c        	    cond = 1;
cond              126 parse.y        static NODE *cond();
cond              438 parse.y        			$$ = NEW_IF(cond($3), $1, 0);
cond              447 parse.y        			$$ = NEW_UNLESS(cond($3), $1, 0);
cond              457 parse.y        			    $$ = NEW_WHILE(cond($3), $1->nd_body, 0);
cond              460 parse.y        			    $$ = NEW_WHILE(cond($3), $1, 1);
cond              469 parse.y        			    $$ = NEW_UNTIL(cond($3), $1->nd_body, 0);
cond              472 parse.y        			    $$ = NEW_UNTIL(cond($3), $1, 1);
cond              627 parse.y        			$$ = NEW_NOT(cond($2));
cond              631 parse.y        			$$ = NEW_NOT(cond($2));
cond             1198 parse.y        			$$ = NEW_NOT(cond($2));
cond             1227 parse.y        			$$ = NEW_IF(cond($1), $3, $5);
cond             1557 parse.y        			$$ = NEW_IF(cond($2), $4, $5);
cond             1570 parse.y        			$$ = NEW_UNLESS(cond($2), $4, $5);
cond             1582 parse.y        			$$ = NEW_WHILE(cond($3), $6, 1);
cond             1592 parse.y        			$$ = NEW_UNTIL(cond($3), $6, 1);
cond             1748 parse.y        			$$ = NEW_IF(cond($2), $4, $5);
cond             5027 parse.y            int cond = 0;
cond             5041 parse.y        	    if (!cond) yyerror("void value expression");
cond             5063 parse.y        	    cond = 1;


cond0

cond0            9277 parse.c        static NODE *cond0();
cond0            9289 parse.c            node = cond0(node);
cond0            9347 parse.c        	node->nd_1st = cond0(node->nd_1st);
cond0            9348 parse.c        	node->nd_2nd = cond0(node->nd_2nd);
cond0            9394 parse.c        	node->nd_next = cond0(node->nd_next);
cond0            9397 parse.c            return cond0(node);
cond0            5279 parse.y        static NODE *cond0();
cond0            5291 parse.y            node = cond0(node);
cond0            5349 parse.y        	node->nd_1st = cond0(node->nd_1st);
cond0            5350 parse.y        	node->nd_2nd = cond0(node->nd_2nd);
cond0            5396 parse.y        	node->nd_next = cond0(node->nd_next);
cond0            5399 parse.y            return cond0(node);


cond_negative

cond_negative     225 parse.c        static int cond_negative();
cond_negative    3781 parse.c        			if (cond_negative(&yyval.node->nd_cond)) {
cond_negative    3792 parse.c        			if (cond_negative(&yyval.node->nd_cond)) {
cond_negative    3807 parse.c        			if (cond_negative(&yyval.node->nd_cond)) {
cond_negative    3821 parse.c        			if (cond_negative(&yyval.node->nd_cond)) {
cond_negative    5245 parse.c        			if (cond_negative(&yyval.node->nd_cond)) {
cond_negative    5257 parse.c        			if (cond_negative(&yyval.node->nd_cond)) {
cond_negative    5277 parse.c        			if (cond_negative(&yyval.node->nd_cond)) {
cond_negative    5295 parse.c        			if (cond_negative(&yyval.node->nd_cond)) {
cond_negative     128 parse.y        static int cond_negative();
cond_negative     440 parse.y        			if (cond_negative(&$$->nd_cond)) {
cond_negative     449 parse.y        			if (cond_negative(&$$->nd_cond)) {
cond_negative     462 parse.y        			if (cond_negative(&$$->nd_cond)) {
cond_negative     474 parse.y        			if (cond_negative(&$$->nd_cond)) {
cond_negative    1559 parse.y        			if (cond_negative(&$$->nd_cond)) {
cond_negative    1572 parse.y        			if (cond_negative(&$$->nd_cond)) {
cond_negative    1584 parse.y        			if (cond_negative(&$$->nd_cond)) {
cond_negative    1594 parse.y        			if (cond_negative(&$$->nd_cond)) {


connect

connect           973 ext/socket/socket.c 	    status = connect(fd, sockaddr, len);
connect          2035 win32/win32.c  	r = connect(TO_SOCKET(s), addr, addrlen);
connect           382 win32/win32.h  #ifdef connect


convert_type

convert_type     2145 object.c           v = convert_type(val, tname, method, Qtrue);
convert_type     2163 object.c           v = convert_type(val, tname, method, Qfalse);
convert_type     2178 object.c           VALUE v = convert_type(val, "Integer", method, Qtrue);
convert_type     2217 object.c           tmp = convert_type(val, "Integer", "to_int", Qfalse);


copy_fds

copy_fds         10439 eval.c         	    copy_fds(&readfds, &th->readfds, th->fd);
copy_fds         10440 eval.c         	    copy_fds(&writefds, &th->writefds, th->fd);
copy_fds         10441 eval.c         	    copy_fds(&exceptfds, &th->exceptfds, th->fd);


copy_node_scope

copy_node_scope  3842 eval.c         	    defn = copy_node_scope(node->nd_defn, ruby_cref);
copy_node_scope  3878 eval.c         	    defn = copy_node_scope(node->nd_defn, ruby_cref);


cosh

cosh              176 math.c             return rb_float_new(cosh(RFLOAT(x)->value));
cosh              209 math.c             return sinh(x) / cosh(x);


cr_conv

cr_conv           314 ext/nkf/nkf-utf8/nkf.c STATIC  void    cr_conv PROTO((int c2,int c1));
cr_conv          1818 ext/nkf/nkf-utf8/nkf.c 	o_crconv = oconv; oconv = cr_conv;
cr_conv          3090 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 1049 ext/win32ole/win32ole.c             obj = create_win32ole_object(cWIN32OLE, pDispatch, 0, 0);
create_win32ole_object 1071 ext/win32ole/win32ole.c                obj = create_win32ole_object(cWIN32OLE, pDispatch, 0, 0);
create_win32ole_object 1463 ext/win32ole/win32ole.c     return create_win32ole_object(self, pDispatch, argc, argv);
create_win32ole_object 1526 ext/win32ole/win32ole.c     return create_win32ole_object(self, pDispatch, argc, argv);


crypt

crypt              35 missing.h      extern char *crypt _((char *, char *));
crypt            4350 string.c           extern char *crypt();
crypt            4360 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) );


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       2376 eval.c         	if (rb_cvar_defined(cvar_cbase(), node->nd_vid)) {
cvar_cbase       3593 eval.c         	rb_cvar_set(cvar_cbase(), node->nd_vid, result, Qtrue);
cvar_cbase       3598 eval.c         	rb_cvar_set(cvar_cbase(), node->nd_vid, result, Qfalse);
cvar_cbase       3625 eval.c         	result = rb_cvar_get(cvar_cbase(), node->nd_vid);
cvar_cbase       5142 eval.c         	rb_cvar_set(cvar_cbase(), lhs->nd_vid, val, Qtrue);
cvar_cbase       5146 eval.c         	rb_cvar_set(cvar_cbase(), lhs->nd_vid, val, Qfalse);


cvar_override_check

cvar_override_check 1750 variable.c     		cvar_override_check(id, tmp);
cvar_override_check 1773 variable.c     		    cvar_override_check(id, tmp);


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               431 missing/vsnprintf.c static char *cvt __P((double, int, int, char *, int *, int, int *));
cvt               717 missing/vsnprintf.c 			cp = cvt(_double, prec, flags, &softsign,


datum

datum             550 dln.c              int datum;
datum             558 dln.c              datum = arg->value;
datum             560 dln.c              if (R_PCREL(&(undef->reloc))) datum -= undef->base;
datum             562 dln.c              datum += undef->reloc.r_addend;
datum             563 dln.c              datum >>= R_RIGHTSHIFT(&(undef->reloc));
datum             566 dln.c              datum &= mask;
datum             571 dln.c          	*address |= datum;
datum             576 dln.c          	*(short *)address |= datum;
datum             581 dln.c          	*(long *)address |= datum;
datum             588 dln.c          	    *address = datum - *address;
datum             589 dln.c          	else *address = undef->u.c + datum;
datum             593 dln.c          	    *(short*)address = datum - *(short*)address;
datum             594 dln.c          	else *(short*)address = undef->u.s + datum;
datum             598 dln.c          	    *(long*)address = datum - *(long*)address;
datum             599 dln.c          	else *(long*)address = undef->u.l + datum;
datum             792 dln.c          	    long datum = 0;
datum             807 dln.c          		    datum = sym->n_value;
datum             817 dln.c          		    datum = block;
datum             820 dln.c          		    datum = block +  new_common;
datum             826 dln.c          	    if (R_PCREL(rel)) datum -= block;
datum             829 dln.c          	    datum += rel->r_addend;
datum             830 dln.c          	    datum >>= R_RIGHTSHIFT(rel);
datum             833 dln.c          	    datum &= mask;
datum             838 dln.c          		*address |= datum;
datum             842 dln.c          		*(short *)address |= datum;
datum             846 dln.c          		*(long *)address |= datum;
datum             852 dln.c          		if (datum < -128 || datum > 127) goto err_exit;
datum             853 dln.c          		*address += datum;
datum             856 dln.c          		*(short *)address += datum;
datum             859 dln.c          		*(long *)address += datum;
datum             176 ext/dbm/dbm.c      datum key, value;
datum             221 ext/dbm/dbm.c      datum key, val;
datum             267 ext/dbm/dbm.c          datum key, val;
datum             326 ext/dbm/dbm.c      datum key, value;
datum             360 ext/dbm/dbm.c      datum key, val;
datum             383 ext/dbm/dbm.c      datum key, val;
datum             424 ext/dbm/dbm.c      datum key;
datum             445 ext/dbm/dbm.c      datum key, val;
datum             505 ext/dbm/dbm.c      datum key, val;
datum             536 ext/dbm/dbm.c      datum key;
datum             556 ext/dbm/dbm.c      datum key;
datum             580 ext/dbm/dbm.c      datum key, val;
datum             597 ext/dbm/dbm.c      datum key;
datum             613 ext/dbm/dbm.c      datum key, val;
datum             635 ext/dbm/dbm.c      datum key;
datum             654 ext/dbm/dbm.c      datum key, val;
datum             673 ext/dbm/dbm.c      datum key, val;
datum             691 ext/dbm/dbm.c      datum key, val;
datum             713 ext/dbm/dbm.c      datum key, val;
datum             733 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             421 ext/gdbm/gdbm.c     datum key;
datum             511 ext/gdbm/gdbm.c     datum key, nextkey;
datum             608 ext/gdbm/gdbm.c     datum key, val;
datum             636 ext/gdbm/gdbm.c     datum key, nextkey;
datum             658 ext/gdbm/gdbm.c     datum key;
datum             756 ext/gdbm/gdbm.c     datum key, nextkey;
datum             777 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             244 ext/sdbm/init.c         datum key, val;
datum             303 ext/sdbm/init.c     datum key, value;
datum             339 ext/sdbm/init.c     datum key, val;
datum             363 ext/sdbm/init.c     datum key, val;
datum             403 ext/sdbm/init.c     datum key;
datum             424 ext/sdbm/init.c     datum key, val;
datum             484 ext/sdbm/init.c     datum key, val;
datum             520 ext/sdbm/init.c     datum key;
datum             540 ext/sdbm/init.c     datum key;
datum             564 ext/sdbm/init.c     datum key, val;
datum             581 ext/sdbm/init.c     datum key;
datum             597 ext/sdbm/init.c     datum key, val;
datum             618 ext/sdbm/init.c     datum key;
datum             636 ext/sdbm/init.c     datum key, val;
datum             655 ext/sdbm/init.c     datum key, val;
datum             673 ext/sdbm/init.c     datum key, val;
datum             695 ext/sdbm/init.c     datum key, val;
datum             715 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             429 ext/nkf/nkf-utf8/nkf.c STATIC void debug PROTO((char *str));
debug            1383 ext/nkf/nkf-utf8/nkf.c             debug(input_codename);
debug            2074 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 4337 file.c             define_filetest_function("directory?", test_d, 1);
define_filetest_function 4338 file.c             define_filetest_function("exist?", test_e, 1);
define_filetest_function 4339 file.c             define_filetest_function("exists?", test_e, 1); /* temporary */
define_filetest_function 4340 file.c             define_filetest_function("readable?", test_r, 1);
define_filetest_function 4341 file.c             define_filetest_function("readable_real?", test_R, 1);
define_filetest_function 4342 file.c             define_filetest_function("writable?", test_w, 1);
define_filetest_function 4343 file.c             define_filetest_function("writable_real?", test_W, 1);
define_filetest_function 4344 file.c             define_filetest_function("executable?", test_x, 1);
define_filetest_function 4345 file.c             define_filetest_function("executable_real?", test_X, 1);
define_filetest_function 4346 file.c             define_filetest_function("file?", test_f, 1);
define_filetest_function 4347 file.c             define_filetest_function("zero?", test_z, 1);
define_filetest_function 4348 file.c             define_filetest_function("size?", test_s, 1);
define_filetest_function 4349 file.c             define_filetest_function("size", rb_file_s_size, 1);
define_filetest_function 4350 file.c             define_filetest_function("owned?", test_owned, 1);
define_filetest_function 4351 file.c             define_filetest_function("grpowned?", test_grpowned, 1);
define_filetest_function 4353 file.c             define_filetest_function("pipe?", test_p, 1);
define_filetest_function 4354 file.c             define_filetest_function("symlink?", test_l, 1);
define_filetest_function 4355 file.c             define_filetest_function("socket?", test_S, 1);
define_filetest_function 4357 file.c             define_filetest_function("blockdev?", test_b, 1);
define_filetest_function 4358 file.c             define_filetest_function("chardev?", test_c, 1);
define_filetest_function 4360 file.c             define_filetest_function("setuid?", test_suid, 1);
define_filetest_function 4361 file.c             define_filetest_function("setgid?", test_sgid, 1);
define_filetest_function 4362 file.c             define_filetest_function("sticky?", test_sticky, 1);
define_filetest_function 4364 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      1234 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         566 dir.c              dir_chdir(args->new_path);
dir_chdir         582 dir.c          	dir_chdir(args->old_path);
dir_chdir         661 dir.c              dir_chdir(path);


dir_close

dir_close         246 dir.c          static VALUE dir_close _((VALUE));
dir_close         316 dir.c          	return rb_ensure(rb_yield, dir, dir_close, dir);
dir_close        1409 dir.c              rb_ensure(dir_each, dir, dir_close, dir);
dir_close        1431 dir.c              return rb_ensure(rb_Array, dir, dir_close, dir);
dir_close        1548 dir.c              rb_define_method(rb_cDir,"close", dir_close, 0);


dir_closed

dir_closed        330 dir.c              if (dirp->dir == NULL) dir_closed();\
dir_closed        415 dir.c          	if (dirp->dir == NULL) dir_closed();


dir_each

dir_each         1409 dir.c              rb_ensure(dir_each, dir, dir_close, dir);
dir_each         1542 dir.c              rb_define_method(rb_cDir,"each", dir_each, 0);


dir_initialize

dir_initialize    314 dir.c              dir_initialize(dir, dirname);
dir_initialize   1539 dir.c              rb_define_method(rb_cDir,"initialize", dir_initialize, 1);


dir_open_dir

dir_open_dir     1408 dir.c              dir = dir_open_dir(dirname);
dir_open_dir     1430 dir.c              dir = dir_open_dir(dirname);


dir_s_alloc

dir_s_alloc       248 dir.c          static VALUE dir_s_alloc _((VALUE));
dir_s_alloc      1534 dir.c              rb_define_alloc_func(rb_cDir, dir_s_alloc);


dir_s_getwd

dir_s_getwd      1551 dir.c              rb_define_singleton_method(rb_cDir,"getwd", dir_s_getwd, 0);
dir_s_getwd      1552 dir.c              rb_define_singleton_method(rb_cDir,"pwd", dir_s_getwd, 0);


dir_s_rmdir

dir_s_rmdir      1555 dir.c              rb_define_singleton_method(rb_cDir,"rmdir", dir_s_rmdir, 1);
dir_s_rmdir      1556 dir.c              rb_define_singleton_method(rb_cDir,"delete", dir_s_rmdir, 1);
dir_s_rmdir      1557 dir.c              rb_define_singleton_method(rb_cDir,"unlink", dir_s_rmdir, 1);


dir_seek

dir_seek          497 dir.c              dir_seek(dir, pos);
dir_seek         1545 dir.c              rb_define_method(rb_cDir,"seek", dir_seek, 1);


dir_tell

dir_tell         1544 dir.c              rb_define_method(rb_cDir,"tell", dir_tell, 0);
dir_tell         1546 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)


dispose_string

dispose_string   7232 parse.c            dispose_string(here->nd_lit);
dispose_string   7300 parse.c        		if (str) dispose_string(str);
dispose_string   3234 parse.y            dispose_string(here->nd_lit);
dispose_string   3302 parse.y        		if (str) dispose_string(str);


dlclose

dlclose          1359 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            79 ext/dl/handle.c     dlclose(dlhandle->ptr);


dlerror

dlerror          1193 dln.c              return (char*)dlerror();
dlerror            68 ext/dl/handle.c   if (!ptr && (err = dlerror())) {
dlerror            73 ext/dl/handle.c     err = dlerror();
dlerror           170 ext/dl/handle.c   if (!func && (err = dlerror()))
dlerror           185 ext/dl/handle.c       if (!func && (err = dlerror()))


dlfree

dlfree            530 ext/dl/dl.c      return rb_dlptr_new((void*)ptr,len,dlfree);
dlfree            548 ext/dl/dl.c      return ptr ? rb_dlptr_new(ptr, size, dlfree) : Qnil;
dlfree            574 ext/dl/dl.c      return rb_dlptr_malloc(DLNUM2LONG(size), dlfree);
dlfree            581 ext/dl/dl.c      return rb_dlptr_new(strdup(RSTRING(str)->ptr), RSTRING(str)->len, dlfree);
dlfree            723 ext/dl/dl.c      rb_define_const(rb_mDL, "FREE", rb_dlsym_new(dlfree, "free", "0P"));
dlfree            287 ext/dl/dl.h    void dlfree(void*);
dlfree            183 ext/dl/handle.c       dlfree(name_a);
dlfree             69 ext/dl/ptr.c     if (data->stype) dlfree(data->stype);
dlfree             70 ext/dl/ptr.c     if (data->ssize) dlfree(data->ssize);
dlfree             71 ext/dl/ptr.c     if (data->ids) dlfree(data->ids);
dlfree            407 ext/dl/ptr.c   		  rb_dlptr_new(((void**)(data->ptr))[i],0,dlfree));
dlfree            534 ext/dl/ptr.c   	dlfree(data->stype);
dlfree            538 ext/dl/ptr.c   	dlfree(data->ids);
dlfree            559 ext/dl/ptr.c     if (data->stype) dlfree(data->stype);
dlfree            561 ext/dl/ptr.c     if (data->ssize) dlfree(data->ssize);
dlfree            563 ext/dl/ptr.c     if (data->ids) dlfree(data->ids);
dlfree            274 ext/dl/sym.c     dlfree(str);
dlfree            840 ext/dl/sym.c       val = rb_dlptr_new((void*)(ANY2P(ret)), 0, dlfree);
dlfree            880 ext/dl/sym.c         dlfree((void*)(ANY2S(ret)));
dlfree            924 ext/dl/sym.c   	dlfree((void*)ANY2S(args[i]));
dlfree            937 ext/dl/sym.c   	dlfree((void*)ANY2P(args[i]));


dlmalloc

dlmalloc          150 ext/dl/dl.c      newstr = (char*)dlmalloc(strlen(str)+1);
dlmalloc          236 ext/dl/dl.c      ary = dlmalloc(*size);
dlmalloc          264 ext/dl/dl.c      ary = dlmalloc(*size);
dlmalloc          292 ext/dl/dl.c      ary = dlmalloc(*size);
dlmalloc          321 ext/dl/dl.c      ary = dlmalloc(*size);
dlmalloc          350 ext/dl/dl.c      ary = dlmalloc(*size);
dlmalloc          379 ext/dl/dl.c      ary = dlmalloc(*size);
dlmalloc          408 ext/dl/dl.c      ary = dlmalloc(*size);
dlmalloc          527 ext/dl/dl.c      ptr = (char*)dlmalloc(len + 1);
dlmalloc          288 ext/dl/dl.h    void *dlmalloc(size_t);
dlmalloc          178 ext/dl/handle.c       char *name_a = (char*)dlmalloc(len+2);
dlmalloc          137 ext/dl/ptr.c     ptr = dlmalloc((size_t)size);
dlmalloc          560 ext/dl/ptr.c     data->stype = (char*)dlmalloc(sizeof(char) * num);
dlmalloc          562 ext/dl/ptr.c     data->ssize = (int*)dlmalloc(sizeof(int) * num);
dlmalloc          564 ext/dl/ptr.c     data->ids  = (ID*)dlmalloc(sizeof(ID) * data->ids_num);
dlmalloc          269 ext/dl/sym.c     str = dlmalloc(str_size);
dlmalloc          591 ext/dl/sym.c   	ANY2S(args[i]) = DLSTR(dlmalloc(RSTRING(str)->len + 1));


dln_find_1

dln_find_1       1650 dln.c          static char *dln_find_1();
dln_find_1       1668 dln.c              return dln_find_1(fname, path, 1);
dln_find_1       1678 dln.c              return dln_find_1(fname, path, 0);
dln_find_1       1681 dln.c              return _macruby_path_conv_posix_to_macos(dln_find_1(fname, path, 0));


dln_find_exe

dln_find_exe      368 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      921 process.c      extern char *dln_find_exe();
dln_find_exe      942 process.c          prog = dln_find_exe(prog, 0);
dln_find_exe      975 process.c      	    prog = dln_find_exe(argv[0], 0);
dln_find_exe     1041 process.c      	    char *shell = dln_find_exe("sh", 0);
dln_find_exe     1089 process.c          prog = dln_find_exe(prog, 0);
dln_find_exe     1110 process.c      	prog = dln_find_exe(argv[0], 0);
dln_find_exe     1163 process.c      	    char *shell = dln_find_exe("sh", 0);
dln_find_exe      905 win32/win32.c  	if (!(p = dln_find_exe(prog, NULL))) {
dln_find_exe      941 win32/win32.c  		    p = dln_find_exe(cmd, NULL);
dln_find_exe      958 win32/win32.c  		    p = dln_find_exe(p, NULL);


dln_find_file

dln_find_file     978 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    4199 file.c         	    found = dln_find_file(StringValueCStr(fname), path);
dln_find_file    4276 file.c             f = dln_find_file(f, lpath);
dln_find_file     789 ruby.c         		    script = dln_find_file(argv[0], path);
dln_find_file     792 ruby.c         		    script = dln_find_file(argv[0], getenv(PATH_ENV));


dln_init

dln_init          419 dln.c          	return dln_init(buf);
dln_init         1089 dln.c          	if (dln_init(dln_argv0) == -1) return -1;


dln_load

dln_load         1404 dln.c          	if (loadbind(0, (void*)dln_load, (void*)init_fct) == -1) {
dln_load           39 dln.h          void *dln_load _((const char*));
dln_load         7044 eval.c         		    handle = (long)dln_load(RSTRING(path)->ptr);


dln_strerror

dln_strerror     1292 dln.c          #define DLN_ERROR() (error = dln_strerror(), strcpy(ALLOCA_N(char, strlen(error) + 1), error))
dln_strerror     1310 dln.c          	error = dln_strerror();
dln_strerror     1315 dln.c          	rb_loaderror("%s - %s\n%s", dln_strerror(), buf, file);
dln_strerror     1324 dln.c          	error = dln_strerror();
dln_strerror     1352 dln.c          	    error = dln_strerror();
dln_strerror     1621 dln.c          	    error = dln_strerror();


dln_undefined

dln_undefined     730 dln.c          		    sym->n_value = (long)dln_undefined;
dln_undefined     755 dln.c          		&& new_sym->n_value != (long)dln_undefined) {


dlopen

dlopen           1351 dln.c          	if ((handle = (void*)dlopen(file, RTLD_LAZY|RTLD_GLOBAL)) == NULL) {
dlopen             66 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        301 ext/dl/dl.h    void dlptr_free(struct ptr_data *data);
dlptr_free         99 ext/dl/ptr.c   			     0, dlptr_free, data);
dlptr_free        169 ext/dl/ptr.c     obj = Data_Make_Struct(klass, struct ptr_data, 0, dlptr_free, data);


dlptr_init

dlptr_init        302 ext/dl/dl.h    void dlptr_init(VALUE val);
dlptr_init        109 ext/dl/ptr.c         dlptr_init(val);


dlsizeof

dlsizeof          587 ext/dl/dl.c      return INT2NUM(dlsizeof(StringValuePtr(str)));
dlsizeof          291 ext/dl/dl.h    size_t dlsizeof(const char *);
dlsizeof          591 ext/dl/ptr.c       data->size = dlsizeof(RSTRING(type)->ptr);


dlstrdup

dlstrdup          424 ext/dl/dl.c    	str = dlstrdup(src);
dlstrdup          290 ext/dl/dl.h    char *dlstrdup(const char *);


dlsym

dlsym            1356 dln.c          	init_fct = (void(*)())dlsym(handle, buf);
dlsym             168 ext/dl/handle.c   func = dlsym(handle, name);
dlsym             182 ext/dl/handle.c       func = dlsym(handle, name_a);
dlsym              78 ext/tk/stubs.c # define DL_SYM dlsym


dlsym_free

dlsym_free         93 ext/dl/sym.c       val = Data_Make_Struct(rb_cDLSymbol, struct sym_data, 0, dlsym_free, data);
dlsym_free        137 ext/dl/sym.c     obj = Data_Make_Struct(klass, struct sym_data, 0, dlsym_free, data);


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_aspawn

do_aspawn        1119 process.c          status = do_aspawn(P_WAIT, prog, argv);
do_aspawn         142 win32/win32.h  #define execv(path,argv)	do_aspawn(P_OVERLAY,path,argv)
do_aspawn         207 win32/win32.h  extern int do_aspawn(int, char *, char **);


do_checksum

do_checksum        36 ext/zlib/zlib.c static VALUE do_checksum _((int, VALUE*, uLong (*) _((uLong, const Bytef*, uInt))));
do_checksum       305 ext/zlib/zlib.c     return do_checksum(argc, argv, adler32);
do_checksum       323 ext/zlib/zlib.c     return do_checksum(argc, argv, crc32);


do_coerce

do_coerce         156 numeric.c          do_coerce(&x, &y, Qtrue);
do_coerce         164 numeric.c          if (do_coerce(&x, &y, Qfalse))
do_coerce         175 numeric.c          if (!do_coerce(&x, &y, Qfalse) ||
do_coerce         239 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       1281 ext/zlib/zlib.c     do_deflate(z, src, ARG_FLUSH(flush));
do_deflate       1300 ext/zlib/zlib.c     do_deflate(get_zstream(obj), src, Z_NO_FLUSH);


do_hash

do_hash            57 st.c           #define do_hash_bin(key,table) (do_hash(key, table)%(table)->num_bins)
do_hash           245 st.c               hash_val = do_hash(key, table);
do_hash           284 st.c               hash_val = do_hash(key, table);
do_hash           305 st.c               hash_val = do_hash(key, table);


do_hash_bin

do_hash_bin       387 st.c               hash_val = do_hash_bin(*key, table);
do_hash_bin       429 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       1549 ext/zlib/zlib.c 	do_inflate(z, src);
do_inflate       1582 ext/zlib/zlib.c 	do_inflate(z, src);


do_spawn

do_spawn         1027 process.c          do_spawn(P_OVERLAY, (char *)str);
do_spawn         1438 process.c          status = do_spawn(RSTRING(cmd)->ptr);
do_spawn         1461 process.c      	status = do_spawn(P_WAIT, RSTRING(argv[0])->ptr);
do_spawn          206 win32/win32.h  extern int do_spawn(int, char *);


double_ne

double_ne           3 missing/isnan.c static int double_ne();
double_ne           9 missing/isnan.c     return double_ne(n, n);


downcase

downcase          108 dir.c              test = downcase(test);
downcase          125 dir.c          	if (downcase(cstart) <= test && test <= downcase(cend))
downcase          178 dir.c          	    test = downcase(test);
downcase          181 dir.c          		if ((c == '?' || c == '[' || downcase(*s) == test) &&
downcase          219 dir.c          	    if(downcase(c) != downcase(*s))


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              1228 array.c            VALUE dup = rb_ary_new2(RARRAY(ary)->len);
dup              1230 array.c            DUPSETUP(dup, ary);
dup              1231 array.c            MEMCPY(RARRAY(dup)->ptr, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
dup              1232 array.c            RARRAY(dup)->len = RARRAY(ary)->len;
dup              1233 array.c            return dup;
dup              1471 array.c        	VALUE dup = rb_ary_new2(RARRAY(ary)->len);
dup              1472 array.c        	rb_ary_replace(dup, ary);
dup              1473 array.c        	return dup;
dup              8081 eval.c             MEMCPY(dup, orig, struct BLOCK, 1);
dup              8082 eval.c             frame_dup(&dup->frame);
dup              8084 eval.c             if (dup->iter) {
dup              8085 eval.c         	blk_copy_prev(dup);
dup              8088 eval.c         	dup->prev = 0;
dup               790 ext/nkf/nkf-utf8/nkf.c                           || (fd_backup = dup(fileno(stdout))) < 0
dup               432 ext/pty/pty.c      wfptr->f = fdopen(dup(info.fd), "w");
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               302 io.c               fd = dup(orig);
dup               306 io.c           	    fd = dup(orig);
dup                51 missing/dup2.c 		fd = fds[i] = dup(fd1);
dup               295 object.c           VALUE dup;
dup               300 object.c           dup = rb_obj_alloc(rb_obj_class(obj));
dup               301 object.c           init_copy(dup, obj);
dup               303 object.c           return dup;
dup               302 ruby.h             OBJSETUP(dup,rb_obj_class(obj),(RBASIC(obj)->flags)&(T_MASK|FL_EXIVAR|FL_TAINT));\
dup               303 ruby.h             if (FL_TEST(obj, FL_EXIVAR)) rb_copy_generic_ivar((VALUE)dup,(VALUE)obj);\
dup               313 string.c           VALUE dup = str_alloc(rb_obj_class(str));
dup               314 string.c           rb_str_replace(dup, str);
dup               315 string.c           return dup;
dup              2543 string.c       	VALUE dup = str_alloc(rb_cString);
dup              2544 string.c       	rb_str_replace(dup, str);
dup              2545 string.c       	return dup;
dup              4013 string.c           VALUE dup = rb_str_dup(str);
dup              4015 string.c           if (NIL_P(rb_str_chomp_bang(argc, argv, dup)))
dup              4017 string.c           rb_lastline_set(dup);
dup              4018 string.c           return dup;
dup              1057 time.c             VALUE dup = time_s_alloc(rb_cTime);
dup              1058 time.c             time_init_copy(dup, time);
dup              1059 time.c             return dup;
dup                37 wince/io.h     int dup( int handle );


dup2

dup2              694 ext/nkf/nkf-utf8/nkf.c                     dup2(fds[1], 1);
dup2              697 ext/nkf/nkf-utf8/nkf.c                     dup2(fds[0], 0);
dup2              703 ext/nkf/nkf-utf8/nkf.c                 dup2(fds[0], 0);
dup2              706 ext/nkf/nkf-utf8/nkf.c                 dup2(fds[1], 1);
dup2              791 ext/nkf/nkf-utf8/nkf.c                           || dup2(fd, fileno(stdout)) < 0
dup2              846 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             2966 io.c           		dup2(pr[1], 1);
dup2             2973 io.c           		dup2(pw[0], 0);
dup2             3396 io.c           	    if (dup2(fd2, fd) < 0)
dup2             3406 io.c           	    if (dup2(fd2, fd) < 0)
dup2             3434 io.c           	    if (dup2(fd2, fd) < 0)
dup2               39 missing.h      extern int dup2 _((int, int));


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        3557 eval.c         	dvar_asgn(node->nd_vid, result);
dvar_asgn        5122 eval.c         	dvar_asgn(lhs->nd_vid, val);


dvar_asgn_curr

dvar_asgn_curr   3562 eval.c         	dvar_asgn_curr(node->nd_vid, result);
dvar_asgn_curr   5126 eval.c         	dvar_asgn_curr(lhs->nd_vid, val);


dvar_asgn_internal

dvar_asgn_internal  901 eval.c             dvar_asgn_internal(id, value, 0);
dvar_asgn_internal  909 eval.c             dvar_asgn_internal(id, value, 1);


dyna_in_block

dyna_in_block     274 parse.c        static int dyna_in_block();
dyna_in_block    8481 parse.c        	    ((dyna_in_block() && rb_dvar_defined(yylval.id)) || local_id(yylval.id))) {
dyna_in_block    8833 parse.c        	if (dyna_in_block() && rb_dvar_defined(id)) return NEW_DVAR(id);
dyna_in_block    8890 parse.c        	else if (local_id(id) || !dyna_in_block()) {
dyna_in_block     177 parse.y        static int dyna_in_block();
dyna_in_block    4483 parse.y        	    ((dyna_in_block() && rb_dvar_defined(yylval.id)) || local_id(yylval.id))) {
dyna_in_block    4835 parse.y        	if (dyna_in_block() && rb_dvar_defined(id)) return NEW_DVAR(id);
dyna_in_block    4892 parse.y        	else if (local_id(id) || !dyna_in_block()) {


dyna_init

dyna_init         275 parse.c        static NODE *dyna_init();
dyna_init        4066 parse.c        			yyval.node = NEW_ITER(yyvsp[-3].node, 0, dyna_init(yyvsp[-1].node, yyvsp[-2].vars));
dyna_init        5516 parse.c        			yyval.node = NEW_ITER(yyvsp[-3].node, 0, dyna_init(yyvsp[-1].node, yyvsp[-2].vars));
dyna_init        5597 parse.c        			yyval.node = NEW_ITER(yyvsp[-3].node, 0, dyna_init(yyvsp[-1].node, yyvsp[-2].vars));
dyna_init        5616 parse.c        			yyval.node = NEW_ITER(yyvsp[-3].node, 0, dyna_init(yyvsp[-1].node, yyvsp[-2].vars));
dyna_init         178 parse.y        static NODE *dyna_init();
dyna_init         679 parse.y        			$$ = NEW_ITER($3, 0, dyna_init($5, $<vars>4));
dyna_init        1788 parse.y        			$$ = NEW_ITER($3, 0, dyna_init($5, $<vars>4));
dyna_init        1850 parse.y        			$$ = NEW_ITER($3, 0, dyna_init($5, $<vars>4));
dyna_init        1862 parse.y        			$$ = NEW_ITER($3, 0, dyna_init($5, $<vars>4));


dyna_pop

dyna_pop          273 parse.c        static void dyna_pop();
dyna_pop         4068 parse.c        			dyna_pop(yyvsp[-4].vars);
dyna_pop         5518 parse.c        			dyna_pop(yyvsp[-4].vars);
dyna_pop         5599 parse.c        			dyna_pop(yyvsp[-4].vars);
dyna_pop         5618 parse.c        			dyna_pop(yyvsp[-4].vars);
dyna_pop          176 parse.y        static void dyna_pop();
dyna_pop          681 parse.y        			dyna_pop($<vars>2);
dyna_pop         1790 parse.y        			dyna_pop($<vars>2);
dyna_pop         1852 parse.y        			dyna_pop($<vars>2);
dyna_pop         1864 parse.y        			dyna_pop($<vars>2);


dyna_push

dyna_push         272 parse.c        static struct RVarmap *dyna_push();
dyna_push        4055 parse.c        			yyval.vars = dyna_push();
dyna_push        5505 parse.c        		        yyval.vars = dyna_push();
dyna_push        5586 parse.c        		        yyval.vars = dyna_push();
dyna_push        5605 parse.c        		        yyval.vars = dyna_push();
dyna_push         175 parse.y        static struct RVarmap *dyna_push();
dyna_push         672 parse.y        			$<vars>$ = dyna_push();
dyna_push        1781 parse.y        		        $<vars>$ = dyna_push();
dyna_push        1844 parse.y        		        $<vars>$ = dyna_push();
dyna_push        1856 parse.y        		        $<vars>$ = dyna_push();


e2s_conv

e2s_conv          310 ext/nkf/nkf-utf8/nkf.c STATIC  int     e2s_conv PROTO((int c2, int c1, int *p2, int *p1));
e2s_conv         2423 ext/nkf/nkf-utf8/nkf.c             if (e2s_conv(c2, c1, &s2, &s1) == 0){
e2s_conv         2796 ext/nkf/nkf-utf8/nkf.c             if (e2s_conv(c2, c1, &s2, &s1) == 0){
e2s_conv         2916 ext/nkf/nkf-utf8/nkf.c         if (e2s_conv(c2, c1, &c2, &c1) == 0){
e2s_conv         2928 ext/nkf/nkf-utf8/nkf.c         e2s_conv(c2, c1, &c2, &c1);


e2w_conv

e2w_conv          305 ext/nkf/nkf-utf8/nkf.c STATIC  int     e2w_conv PROTO((int c2,int c1));
e2w_conv         1446 ext/nkf/nkf-utf8/nkf.c     }else if (!e2w_conv(c2, c1)){
e2w_conv         2708 ext/nkf/nkf-utf8/nkf.c         val = e2w_conv(c2, c1);
e2w_conv         2750 ext/nkf/nkf-utf8/nkf.c         unsigned short val = e2w_conv(c2, c1);


e_iconv

e_iconv           296 ext/nkf/nkf-utf8/nkf.c STATIC  int     e_iconv PROTO((int c2,int c1,int c0));
e_iconv           472 ext/nkf/nkf-utf8/nkf.c     {"EUC-JP",    0, 0, 0, {0, 0, 0}, e_status, e_iconv, 0},
e_iconv          1865 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, e_iconv);
e_iconv          1877 ext/nkf/nkf-utf8/nkf.c         set_iconv(FALSE, e_iconv);
e_iconv          3492 ext/nkf/nkf-utf8/nkf.c     e_iconv, s_iconv, 0, 0, 0, 0,


e_oconv

e_oconv           309 ext/nkf/nkf-utf8/nkf.c STATIC  void    e_oconv PROTO((int c2,int c1));
e_oconv           511 ext/nkf/nkf-utf8/nkf.c #   define  DEFAULT_CONV e_oconv
e_oconv          1106 ext/nkf/nkf-utf8/nkf.c             output_conv = e_oconv;


e_option_supplied

e_option_supplied 9266 parse.c            if (!e_option_supplied()) parser_warn(node, str);
e_option_supplied 9274 parse.c            if (!e_option_supplied()) parser_warning(node, str);
e_option_supplied 9285 parse.c            if (!e_option_supplied()) return node;
e_option_supplied 9358 parse.c        	if (!e_option_supplied()) {
e_option_supplied 5268 parse.y            if (!e_option_supplied()) parser_warn(node, str);
e_option_supplied 5276 parse.y            if (!e_option_supplied()) parser_warning(node, str);
e_option_supplied 5287 parse.y            if (!e_option_supplied()) return node;
e_option_supplied 5360 parse.y        	if (!e_option_supplied()) {


e_status

e_status          462 ext/nkf/nkf-utf8/nkf.c STATIC void e_status PROTO((struct input_code *, int));
e_status          472 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();
eaccess          1814 dln.c          	    if (!S_ISDIR(st.st_mode) && eaccess(fbuf, X_OK) == 0)
eaccess          1822 dln.c          		if (!S_ISDIR(st.st_mode) && eaccess(mac_fullpath, X_OK) == 0)
eaccess          1123 file.c             if (eaccess(StringValueCStr(fname), R_OK) < 0) return Qfalse;
eaccess          1158 file.c             if (eaccess(StringValueCStr(fname), W_OK) < 0) return Qfalse;
eaccess          1192 file.c             if (eaccess(StringValueCStr(fname), X_OK) < 0) return Qfalse;
eaccess           224 intern.h       int eaccess _((const char*, int));


each_i

each_i           1137 hash.c             rb_hash_foreach(hash, each_i, 0);
each_i            424 range.c        	range_each_func(range, each_i, beg, end, NULL);


each_pair

each_pair         461 ext/dbm/dbm.c  static VALUE each_pair _((VALUE));
each_pair         488 ext/dbm/dbm.c      rb_iterate(each_pair, other, update_i, obj);
each_pair         497 ext/dbm/dbm.c      rb_iterate(each_pair, other, update_i, obj);
each_pair         564 ext/gdbm/gdbm.c static VALUE each_pair _((VALUE));
each_pair         591 ext/gdbm/gdbm.c     rb_iterate(each_pair, other, update_i, obj);
each_pair         600 ext/gdbm/gdbm.c     rb_iterate(each_pair, other, update_i, obj);
each_pair         440 ext/sdbm/init.c static VALUE each_pair _((VALUE));
each_pair         467 ext/sdbm/init.c     rb_iterate(each_pair, other, update_i, obj);
each_pair         476 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 );


encodes

encodes           369 pack.c         static void encodes _((VALUE,char*,long,int));
encodes           903 pack.c         		encodes(res, ptr, todo, type);


enum_collect

enum_collect      914 enum.c             rb_define_method(rb_mEnumerable,"collect", enum_collect, 0);
enum_collect      915 enum.c             rb_define_method(rb_mEnumerable,"map", enum_collect, 0);


enum_find

enum_find         909 enum.c             rb_define_method(rb_mEnumerable,"find", enum_find, -1);
enum_find         910 enum.c             rb_define_method(rb_mEnumerable,"detect", enum_find, -1);


enum_find_all

enum_find_all     911 enum.c             rb_define_method(rb_mEnumerable,"find_all", enum_find_all, 0);
enum_find_all     912 enum.c             rb_define_method(rb_mEnumerable,"select", enum_find_all, 0);


enum_member

enum_member       922 enum.c             rb_define_method(rb_mEnumerable,"member?", enum_member, 1);
enum_member       923 enum.c             rb_define_method(rb_mEnumerable,"include?", enum_member, 1);


enum_to_a

enum_to_a         374 enum.c             return rb_ary_sort(enum_to_a(obj));
enum_to_a         903 enum.c             rb_define_method(rb_mEnumerable,"to_a", enum_to_a, 0);
enum_to_a         904 enum.c             rb_define_method(rb_mEnumerable,"entries", enum_to_a, 0);


env_aset

env_aset         2349 hash.c         	env_aset(Qnil, key, val);
env_aset         2382 hash.c         	env_aset(Qnil, key, val);
env_aset         2484 hash.c             rb_define_singleton_method(envtbl,"[]=", env_aset, 2);
env_aset         2485 hash.c             rb_define_singleton_method(envtbl,"store", env_aset, 2);


env_delete

env_delete       1683 hash.c             val = env_delete(obj, name);
env_delete       1891 hash.c         	env_delete(obj, nm);
env_delete       2044 hash.c         		env_delete(Qnil, RARRAY(keys)->ptr[i]);
env_delete       2115 hash.c         	    env_delete(Qnil, RARRAY(keys)->ptr[i]);
env_delete       2330 hash.c         	    env_delete(Qnil, key);
env_delete       2369 hash.c         	env_delete(env, RARRAY(keys)->ptr[i]);


env_each_i

env_each_i       2019 hash.c             return env_each_i(ehash, Qfalse);
env_each_i       2026 hash.c             return env_each_i(ehash, Qtrue);


env_has_key

env_has_key      2513 hash.c             rb_define_singleton_method(envtbl,"include?", env_has_key, 1);
env_has_key      2514 hash.c             rb_define_singleton_method(envtbl,"member?", env_has_key, 1);
env_has_key      2515 hash.c             rb_define_singleton_method(envtbl,"has_key?", env_has_key, 1);
env_has_key      2517 hash.c             rb_define_singleton_method(envtbl,"key?", env_has_key, 1);


env_has_value

env_has_value    2516 hash.c             rb_define_singleton_method(envtbl,"has_value?", env_has_value, 1);
env_has_value    2518 hash.c             rb_define_singleton_method(envtbl,"value?", env_has_value, 1);


env_indexes

env_indexes      2505 hash.c             rb_define_singleton_method(envtbl,"indexes", env_indexes, -1);
env_indexes      2506 hash.c             rb_define_singleton_method(envtbl,"indices", env_indexes, -1);


env_keys

env_keys         1944 hash.c             VALUE keys = env_keys();
env_keys         2037 hash.c             keys = env_keys();
env_keys         2110 hash.c             keys = env_keys();
env_keys         2361 hash.c             volatile VALUE keys = env_keys();
env_keys         2510 hash.c             rb_define_singleton_method(envtbl,"keys", env_keys, 0);


env_reject_bang

env_reject_bang  2056 hash.c             env_reject_bang();
env_reject_bang  2494 hash.c             rb_define_singleton_method(envtbl,"reject!", env_reject_bang, 0);


env_size

env_size         2507 hash.c             rb_define_singleton_method(envtbl,"size", env_size, 0);
env_size         2508 hash.c             rb_define_singleton_method(envtbl,"length", env_size, 0);


env_str_new

env_str_new      1644 hash.c             return env_str_new(ptr, strlen(ptr));
env_str_new      1932 hash.c         	    rb_ary_push(ary, env_str_new(*env, s-*env));
env_str_new      1997 hash.c         	    rb_ary_push(ary, env_str_new(*env, s-*env));
env_str_new      2090 hash.c         	    VALUE k = env_str_new(*env, s-*env);
env_str_new      2167 hash.c         	    rb_ary_push(ary, rb_assoc_new(env_str_new(*env, s-*env),
env_str_new      2259 hash.c         		str = env_str_new(*env, s-*env-1);
env_str_new      2304 hash.c         	    rb_hash_aset(hash, env_str_new(*env, s-*env),
env_str_new      2328 hash.c         	    VALUE key = env_str_new(*env, s-*env);


env_str_new2

env_str_new2     1661 hash.c         	VALUE value = env_str_new2(val);
env_str_new2     1712 hash.c         	return env_str_new2(env);
env_str_new2     1750 hash.c             return env_str_new2(env);
env_str_new2     1963 hash.c         	    rb_ary_push(ary, env_str_new2(s+1));
env_str_new2     1998 hash.c         	    rb_ary_push(ary, env_str_new2(s+1));
env_str_new2     2091 hash.c         	    VALUE v = env_str_new2(s+1);
env_str_new2     2168 hash.c         					  env_str_new2(s+1)));
env_str_new2     2286 hash.c         	    RARRAY(indexes)->ptr[i] = env_str_new2(getenv(RSTRING(tmp)->ptr));
env_str_new2     2305 hash.c         			       env_str_new2(s+1));
env_str_new2     2329 hash.c         	    VALUE val = env_str_new2(getenv(RSTRING(key)->ptr));


env_to_hash

env_to_hash      2316 hash.c             return rb_hash_delete_if(env_to_hash());
env_to_hash      2341 hash.c             return rb_hash_invert(env_to_hash());
env_to_hash      2519 hash.c             rb_define_singleton_method(envtbl,"to_hash", env_to_hash, 0);


env_values

env_values       1975 hash.c             VALUE values = env_values();
env_values       2511 hash.c             rb_define_singleton_method(envtbl,"values", env_values, 0);


environ

environ          1278 eval.c         extern char **environ;
environ          1316 eval.c             rb_origenviron = environ;
environ          1623 hash.c         extern char **environ;
environ          1776 hash.c             env = GET_ENVIRON(environ);
environ          1787 hash.c             FREE_ENVIRON(environ);
environ          1826 hash.c             if (environ == origenviron) {	/* need we copy environment? */
environ          1831 hash.c         	for (max = i; environ[max]; max++) ;
environ          1834 hash.c         	    tmpenv[j] = strdup(environ[j]);
environ          1836 hash.c         	environ = tmpenv;		/* tell exec where it is now */
environ          1838 hash.c             if (environ[i]) {
environ          1840 hash.c         	while (*envp && *envp != environ[i]) envp++;
environ          1842 hash.c         	    free(environ[i]);
environ          1844 hash.c         	    while (environ[i]) {
environ          1845 hash.c         		environ[i] = environ[i+1];
environ          1853 hash.c         	REALLOC_N(environ, char*, i+2);	/* just expand it a bit */
environ          1854 hash.c         	environ[i+1] = 0;	/* make sure it's null terminated */
environ          1857 hash.c             environ[i] = ALLOC_N(char, len);
environ          1859 hash.c             snprintf(environ[i],len,"%s=%s",name,value); /* all that work just for this */
environ          1866 hash.c             strcpy(environ[i],name); strupr(environ[i]);
environ          1867 hash.c             sprintf(environ[i] + strlen(name),"=%s", value);
environ          1928 hash.c             env = GET_ENVIRON(environ);
environ          1936 hash.c             FREE_ENVIRON(environ);
environ          1959 hash.c             env = GET_ENVIRON(environ);
environ          1967 hash.c             FREE_ENVIRON(environ);
environ          1993 hash.c             env = GET_ENVIRON(environ);
environ          2002 hash.c             FREE_ENVIRON(environ);
environ          2086 hash.c             env = GET_ENVIRON(environ);
environ          2098 hash.c             FREE_ENVIRON(environ);
environ          2134 hash.c             env = GET_ENVIRON(environ);
environ          2138 hash.c         	if (env != environ) {
environ          2150 hash.c             FREE_ENVIRON(environ);
environ          2163 hash.c             env = GET_ENVIRON(environ);
environ          2172 hash.c             FREE_ENVIRON(environ);
environ          2188 hash.c             env = GET_ENVIRON(environ);
environ          2191 hash.c             FREE_ENVIRON(environ);
environ          2200 hash.c             env = GET_ENVIRON(environ);
environ          2202 hash.c         	FREE_ENVIRON(environ);
environ          2205 hash.c             FREE_ENVIRON(environ);
environ          2229 hash.c             env = GET_ENVIRON(environ);
environ          2235 hash.c         		FREE_ENVIRON(environ);
environ          2241 hash.c             FREE_ENVIRON(environ);
environ          2253 hash.c             env = GET_ENVIRON(environ);
environ          2260 hash.c         		FREE_ENVIRON(environ);
environ          2266 hash.c             FREE_ENVIRON(environ);
environ          2300 hash.c             env = GET_ENVIRON(environ);
environ          2309 hash.c             FREE_ENVIRON(environ);
environ          2324 hash.c             env = GET_ENVIRON(environ);
environ          2334 hash.c             FREE_ENVIRON(environ);
environ          2478 hash.c             origenviron = environ;
environ           978 ruby.c         extern char **environ;
environ           986 ruby.c             if (!environ || (s = environ[0]) == NULL) return;
environ           989 ruby.c             for (i = 1; environ[i]; i++) {
environ           990 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              1050 io.c                   if (c < 0) goto eof;
eof              1062 io.c           	  eof:
eof              6838 parse.c        	else if (c == -1) goto eof;
eof              6855 parse.c        	else if (c == -1) goto eof;
eof              6858 parse.c              eof:
eof              6887 parse.c        		if (c == -1) goto eof;
eof              6937 parse.c        	else if (c == -1) goto eof;
eof              6941 parse.c              eof:
eof              2840 parse.y        	else if (c == -1) goto eof;
eof              2857 parse.y        	else if (c == -1) goto eof;
eof              2860 parse.y              eof:
eof              2889 parse.y        		if (c == -1) goto eof;
eof              2939 parse.y        	else if (c == -1) goto eof;
eof              2943 parse.y              eof:


eof_mime

eof_mime         4397 ext/nkf/nkf-utf8/nkf.c                 eof_mime();
eof_mime         4402 ext/nkf/nkf-utf8/nkf.c                 eof_mime();
eof_mime         4423 ext/nkf/nkf-utf8/nkf.c         eof_mime();
eof_mime         4510 ext/nkf/nkf-utf8/nkf.c                     eof_mime();
eof_mime         4521 ext/nkf/nkf-utf8/nkf.c                         eof_mime();
eof_mime         4531 ext/nkf/nkf-utf8/nkf.c                     eof_mime();
eof_mime         4562 ext/nkf/nkf-utf8/nkf.c 	    eof_mime();


eql

eql                77 hash.c             return !rb_with_disable_interrupt(eql, (VALUE)args);
eql              1462 hash.c             if (eql) {


erf

erf               452 math.c             return rb_float_new(erf(RFLOAT(x)->value));
erf                61 missing.h      extern double erf _((double));


erfc

erfc              467 math.c             return rb_float_new(erfc(RFLOAT(x)->value));
erfc               62 missing.h      extern double erfc _((double));


err_append

err_append         68 error.c        static void err_append _((const char*));
err_append         77 error.c            err_append(buf);
err_append        112 error.c            err_append(buf);


err_position

err_position       62 error.c            n = err_position(buf, len);
err_position      203 error.c            int len = err_position(buf, BUFSIZ);


err_snprintf

err_snprintf       76 error.c            err_snprintf(buf, BUFSIZ, fmt, args);
err_snprintf      123 error.c            err_snprintf(buf, BUFSIZ, fmt, args);


error_handle

error_handle     1465 eval.c         	exit(error_handle(state));
error_handle     1522 eval.c             ex = error_handle(ex);
error_handle     7719 eval.c         		error_handle(status);
error_handle     7737 eval.c         		error_handle(status);


error_inval

error_inval       604 ext/stringio/stringio.c 	error_inval(0);
error_inval       661 ext/stringio/stringio.c 	error_inval(0);
error_inval      1231 ext/stringio/stringio.c 	error_inval("negative legnth");


error_pos

error_pos        1194 eval.c         	error_pos();
error_pos        1199 eval.c         	if (NIL_P(mesg)) error_pos();
error_pos        1403 eval.c         	error_pos();
error_pos        1407 eval.c         	error_pos();
error_pos        1411 eval.c         	error_pos();
error_pos        1415 eval.c         	error_pos();
error_pos        1419 eval.c         	error_pos();
error_pos        1429 eval.c         	    error_pos();


error_print

error_print      1346 eval.c         	error_print();
error_print      1439 eval.c         	    error_print();
error_print      4426 eval.c         	    error_print();
error_print      4509 eval.c         	error_print();
error_print      11687 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 ));


euc_startpos

euc_startpos      481 regex.c        static unsigned int euc_startpos _((const char *string, unsigned int pos));
euc_startpos      486 regex.c          asc_startpos, euc_startpos, sjis_startpos, utf8_startpos


ev_on_event

ev_on_event      6058 ext/win32ole/win32ole.c     return ev_on_event(argc, argv, self, Qfalse);
ev_on_event      6075 ext/win32ole/win32ole.c     return ev_on_event(argc, argv, self, Qtrue);


eval

eval             1057 eval.c         static VALUE eval _((VALUE,VALUE,VALUE,char*,int));
eval             1606 eval.c             v = eval(ruby_top_self, rb_str_new2(str), Qnil, 0, 0);
eval             1786 eval.c         	val = eval(ruby_top_self, cmd, Qnil, 0, 0);
eval             6427 eval.c         	val = eval(self, src, scope, file, line);
eval             6432 eval.c             return eval(self, src, scope, file, line);
eval             6484 eval.c             return eval(args[0], args[1], Qnil, (char*)args[2], (int)args[3]);


eval_node

eval_node        1543 eval.c         	eval_node(ruby_top_self, ruby_eval_tree);
eval_node        6314 eval.c         	result = eval_node(self, node);
eval_node        6715 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        244 parse.c        static NODE *evstr2dstr();
evstr2dstr       5686 parse.c        			    node = evstr2dstr(node);
evstr2dstr       5780 parse.c        			yyval.node = list_append(yyvsp[-2].node, evstr2dstr(yyvsp[-1].node));
evstr2dstr        147 parse.y        static NODE *evstr2dstr();
evstr2dstr       1945 parse.y        			    node = evstr2dstr(node);
evstr2dstr       2036 parse.y        			$$ = list_append($1, evstr2dstr($2));


exc_initialize

exc_initialize    387 error.c            exc_initialize(argc, argv, exc);
exc_initialize    990 error.c            rb_define_method(rb_eException, "initialize", exc_initialize, -1);


exc_to_str

exc_to_str        992 error.c            rb_define_method(rb_eException, "to_str", exc_to_str, 0);
exc_to_str        993 error.c            rb_define_method(rb_eException, "message", exc_to_str, 0);


except

except           10735 eval.c             if (!read && !write && !except) {
except           10766 eval.c         	    n = select(max, read, write, except, tvp);
except           10798 eval.c             if (except) curr_thread->exceptfds = *except;
except           10810 eval.c             if (except) *except = curr_thread->exceptfds;
except           4551 io.c               VALUE read, write, except, timeout, res, list;
except           4561 io.c               rb_scan_args(argc, argv, "13", &read, &write, &except, &timeout);
except           4609 io.c               if (!NIL_P(except)) {
except           4610 io.c           	Check_Type(except, T_ARRAY);
except           4613 io.c           	for (i=0; i<RARRAY(except)->len; i++) {
except           4614 io.c           	    GetOpenFile(rb_io_get_io(RARRAY(except)->ptr[i]), fptr);
except           4667 io.c           	    for (i=0; i< RARRAY(except)->len; i++) {
except           4668 io.c           		GetOpenFile(rb_io_get_io(RARRAY(except)->ptr[i]), fptr);
except           4670 io.c           		    rb_ary_push(list, rb_ary_entry(except, i));
except           4673 io.c           		    rb_ary_push(list, rb_ary_entry(except, i));


exec_under

exec_under       6506 eval.c             return exec_under(eval_under_i, under, under, args);
exec_under       6521 eval.c             return exec_under(yield_under_i, under, 0, self);


execl

execl            1045 process.c      		execl(shell, "sh", "-c", str, (char *) NULL);
execl            1053 process.c      	    execl("/bin/sh", "sh", "-c", str, (char *)NULL);


execv

execv             984 process.c          execv(prog, argv);
execv             917 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          432 missing/vsnprintf.c static int exponent __P((char *, int, int));
exponent          727 missing/vsnprintf.c 				expsize = exponent(expstr, expt, ch);


ext

ext              6807 eval.c             if (ext) {
ext              6808 eval.c         	len = ext - feature;
ext              6809 eval.c         	elen = strlen(ext);
ext              6820 eval.c         	    if (ext) continue;
ext              6824 eval.c         	if ((!rb || !ext) && (IS_SOEXT(e) || IS_DLEXT(e))) {
ext              6827 eval.c         	if ((rb || !ext) && (strcmp(e, ".rb") == 0)) {
ext              6926 eval.c             char *ext, *ftptr;
ext              6931 eval.c             ext = strrchr(ftptr = RSTRING(fname)->ptr, '.');
ext              6932 eval.c             if (ext && !strchr(ext, '/')) {
ext              6933 eval.c         	if (strcmp(".rb", ext) == 0) {
ext              6934 eval.c         	    if (rb_feature_p(ftptr, ext, Qtrue)) return 'r';
ext              6938 eval.c         	else if (IS_SOEXT(ext)) {
ext              6939 eval.c         	    if (rb_feature_p(ftptr, ext, Qfalse)) return 's';
ext              6940 eval.c         	    tmp = rb_str_new(RSTRING(fname)->ptr, ext-RSTRING(fname)->ptr);
ext              6957 eval.c         	else if (IS_DLEXT(ext)) {
ext              6958 eval.c         	    if (rb_feature_p(ftptr, ext, Qfalse)) return 's';
ext              6965 eval.c         	if ((ext = rb_feature_p(ftptr, 0, Qfalse))) {
ext              6966 eval.c         	    type = strcmp(".rb", ext);
ext              6973 eval.c         	ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
ext              6974 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              4174 file.c         	for (i=0; ext[i]; i++) {
ext              4176 file.c         	    rb_str_cat2(fname, ext[i]);
ext              4195 file.c         	for (j=0; ext[j]; j++) {
ext              4197 file.c         	    rb_str_cat2(fname, ext[j]);
ext               857 ruby.c         	    char *ext = strrchr(fname, '.');
ext               858 ruby.c         	    if (ext && strcasecmp(ext, ".exe") == 0)
ext               195 util.c             t = ext; extlen = 0;
ext               197 util.c             if (extlen == 0) { ext[0] = '.'; ext[1] = 0; extlen++; }
ext               200 util.c                 if (strEQ(ext, suffix)) goto fallback;
ext               205 util.c         	    ext[extlen] = *suffix;
ext               206 util.c         	    ext[++extlen] = '\0';
ext               211 util.c         	else if (ext[3] != *suffix) {
ext               212 util.c         	    ext[3] = *suffix;
ext               218 util.c         	strcpy(p, ext);
ext               222 util.c         	(void)memcpy(p, strEQ(ext, suffix1) ? suffix2 : suffix1, 5);


extract_beg_len

extract_beg_len    74 ext/strscan/strscan.c static VALUE extract_beg_len _((struct strscanner *p, long beg_i, long len));
extract_beg_len   437 ext/strscan/strscan.c         return extract_beg_len(p, p->prev, p->regs.end[0]);
extract_beg_len   763 ext/strscan/strscan.c     return extract_beg_len(p, p->curr, len);


extract_file_fd

extract_file_fd  1906 win32/win32.c      file_nfds = extract_file_fd(rd, &file_rd);
extract_file_fd  1907 win32/win32.c      file_nfds += extract_file_fd(wr, &file_wr);


extract_path

extract_path      861 dir.c              return extract_path(path, pend);
extract_path      967 dir.c          	    base = extract_path(path, p);


extract_range

extract_range      73 ext/strscan/strscan.c static VALUE extract_range _((struct strscanner *p, long beg_i, long end_i));
extract_range     694 ext/strscan/strscan.c     return extract_range(p, p->prev + p->regs.beg[0],
extract_range     721 ext/strscan/strscan.c     return extract_range(p, p->prev + p->regs.beg[0],
extract_range     922 ext/strscan/strscan.c     return extract_range(p, p->prev + p->regs.beg[0],
extract_range     991 ext/strscan/strscan.c     return extract_range(p, p->prev + p->regs.beg[i],
extract_range    1013 ext/strscan/strscan.c     return extract_range(p, 0, p->prev + p->regs.beg[0]);
extract_range    1034 ext/strscan/strscan.c     return extract_range(p, p->prev + p->regs.end[0], S_LEN(p));
extract_range    1051 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        2674 object.c           rb_define_method(rb_cNilClass, "&", false_and, 1);
false_and        2771 object.c           rb_define_method(rb_cFalseClass, "&", false_and, 1);


false_or

false_or         2675 object.c           rb_define_method(rb_cNilClass, "|", false_or, 1);
false_or         2772 object.c           rb_define_method(rb_cFalseClass, "|", false_or, 1);


false_xor

false_xor        2676 object.c           rb_define_method(rb_cNilClass, "^", false_xor, 1);
false_xor        2773 object.c           rb_define_method(rb_cFalseClass, "^", false_xor, 1);


fc_i

fc_i              101 variable.c     	    st_foreach_safe(RCLASS(value)->iv_tbl, fc_i, (st_data_t)&arg);
fc_i              127 variable.c     	st_foreach_safe(RCLASS(rb_cObject)->iv_tbl, fc_i, (st_data_t)&arg);
fc_i              130 variable.c     	st_foreach(rb_class_tbl, fc_i, (st_data_t)&arg);


fchown

fchown             96 file.c             return fchown(fd, owner, group);
fchown           1903 file.c             if (fchown(fileno(fptr->f), o, g) == -1)
fchown           4298 io.c           			fchown(fileno(fw), st.st_uid, st.st_gid);


fclose

fclose            177 ext/dl/test/test.c   fclose(file);
fclose            834 ext/nkf/nkf-utf8/nkf.c               fclose(fin);
fclose            890 ext/nkf/nkf-utf8/nkf.c         fclose(stdout);
fclose            893 ext/nkf/nkf-utf8/nkf.c         fclose(stdout);
fclose             76 ext/openssl/ossl_pkey.c     fclose(fp);
fclose             80 ext/openssl/ossl_x509cert.c     fclose(fp);
fclose           4147 file.c             fclose(f);
fclose           2041 io.c           	if (fclose(fptr->f2) < 0 && n2 == 0) {
fclose           2055 io.c           	if (fclose(fptr->f) < 0 && n1 == 0) {
fclose           2224 io.c               n = fclose(fptr->f);
fclose           2269 io.c               n = fclose(fptr->f2);
fclose           3402 io.c           	    fclose(fptr->f);
fclose           3427 io.c           	    fclose(fptr->f2);
fclose           3432 io.c           	    fclose(fptr->f2);
fclose           3504 io.c           	    fclose(fptr->f2);
fclose           4264 io.c           			(void)fclose(fr);
fclose           4272 io.c           			    fclose(fr);
fclose           4284 io.c           			    fclose(fr);
fclose            852 ruby.c         	fclose(fp);
fclose           1154 ruby.c             (void)fclose(stdaux);
fclose           1155 ruby.c             (void)fclose(stdprn);
fclose            134 st.c               fclose(f);
fclose            699 win32/win32.c  		    fclose(*fpr);
fclose           3394 win32/win32.c  	return fclose(fp);
fclose           3397 win32/win32.c      fclose(fp);


fcntl

fcntl             945 ext/socket/socket.c     mode = fcntl(fd, F_GETFL, 0);
fcntl             962 ext/socket/socket.c     fcntl(fd, F_SETFL, mode|NONBLOCKING);
fcntl            1036 ext/socket/socket.c 	fcntl(fd, F_SETFL, mode);
fcntl             419 io.c                       && (r = fcntl(fileno(f), F_GETFL)) != -1 &&
fcntl            4073 io.c           	flags = fcntl(fd, F_GETFL);
fcntl            4693 io.c               retval = io_p?ioctl(fd, cmd, (void*)narg):fcntl(fd, cmd, narg);
fcntl            4695 io.c               retval = io_p?ioctl(fd, cmd, narg):fcntl(fd, cmd, narg);
fcntl              33 missing/dup2.c 		if (fcntl(fd1, F_GETFL) < 0)
fcntl              35 missing/dup2.c 		if (fcntl(fd2, F_GETFL) >= 0)
fcntl              40 missing/dup2.c 		if (fcntl(fd1, F_DUPFD, fd2) < 0)
fcntl              49 missing/flock.c     return fcntl(fd, (operation & LOCK_NB) ? F_SETLK : F_SETLKW, &lock);
fcntl             209 win32/win32.h  extern int fcntl(int, int, ...);


fdbm_alloc

fdbm_alloc         89 ext/dbm/dbm.c  static VALUE fdbm_alloc _((VALUE));
fdbm_alloc        763 ext/dbm/dbm.c      rb_define_alloc_func(rb_cDBM, fdbm_alloc);


fdbm_clear

fdbm_clear        496 ext/dbm/dbm.c      fdbm_clear(obj);
fdbm_clear        792 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        767 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "close", fdbm_close, 0);


fdbm_delete_if

fdbm_delete_if    789 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "delete_if", fdbm_delete_if, 0);
fdbm_delete_if    790 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "reject!", fdbm_delete_if, 0);


fdbm_each_pair

fdbm_each_pair    781 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "each", fdbm_each_pair, 0);
fdbm_each_pair    784 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        251 ext/dbm/dbm.c  	rb_ary_push(new, fdbm_fetch(obj, argv[i], Qnil));
fdbm_fetch        291 ext/dbm/dbm.c              rb_ary_push(new, fdbm_fetch(obj, argv[i], Qnil));
fdbm_fetch        308 ext/dbm/dbm.c          rb_ary_push(new, fdbm_fetch(obj, argv[i], Qnil));


fdbm_has_key

fdbm_has_key      797 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "include?", fdbm_has_key, 1);
fdbm_has_key      798 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "has_key?", fdbm_has_key, 1);
fdbm_has_key      799 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "member?", fdbm_has_key, 1);
fdbm_has_key      801 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "key?", fdbm_has_key, 1);


fdbm_has_value

fdbm_has_value    800 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "has_value?", fdbm_has_value, 1);
fdbm_has_value    802 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "value?", fdbm_has_value, 1);


fdbm_indexes

fdbm_indexes      774 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "indexes",  fdbm_indexes, -1);
fdbm_indexes      775 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "indices",  fdbm_indexes, -1);


fdbm_initialize

fdbm_initialize   161 ext/dbm/dbm.c      if (NIL_P(fdbm_initialize(argc, argv, obj))) {
fdbm_initialize   766 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "initialize", fdbm_initialize, -1);


fdbm_length

fdbm_length       778 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "length", fdbm_length, 0);
fdbm_length       779 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "size", fdbm_length, 0);


fdbm_modify

fdbm_modify       331 ext/dbm/dbm.c      fdbm_modify(obj);
fdbm_modify       365 ext/dbm/dbm.c      fdbm_modify(obj);
fdbm_modify       390 ext/dbm/dbm.c      fdbm_modify(obj);
fdbm_modify       428 ext/dbm/dbm.c      fdbm_modify(obj);
fdbm_modify       509 ext/dbm/dbm.c      fdbm_modify(obj);
fdbm_modify       308 ext/sdbm/init.c     fdbm_modify(obj);
fdbm_modify       344 ext/sdbm/init.c     fdbm_modify(obj);
fdbm_modify       370 ext/sdbm/init.c     fdbm_modify(obj);
fdbm_modify       407 ext/sdbm/init.c     fdbm_modify(obj);
fdbm_modify       493 ext/sdbm/init.c     fdbm_modify(obj);


fdbm_store

fdbm_store        470 ext/dbm/dbm.c  static VALUE fdbm_store _((VALUE,VALUE,VALUE));
fdbm_store        480 ext/dbm/dbm.c      fdbm_store(dbm, RARRAY(pair)->ptr[0], RARRAY(pair)->ptr[1]);
fdbm_store        771 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "[]=", fdbm_store, 2);
fdbm_store        772 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "store", fdbm_store, 2);


fdbm_to_hash

fdbm_to_hash      753 ext/dbm/dbm.c      return rb_hash_delete_if(fdbm_to_hash(obj));
fdbm_to_hash      805 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "to_hash", fdbm_to_hash, 0);


fdopen

fdopen            428 ext/pty/pty.c      rfptr->f = fdopen(info.fd, "r");
fdopen            432 ext/pty/pty.c      wfptr->f = fdopen(dup(info.fd), "w");
fdopen           2695 io.c               file = fdopen(fd, mode);
fdopen           2706 io.c           	    file = fdopen(fd, mode);
fdopen            686 win32/win32.c  	    if ((*fpr = (FILE *)fdopen(fd, modes)) == NULL) {
fdopen            705 win32/win32.c  	    if ((*fpw = (FILE *)fdopen(fd, modes)) == NULL) {
fdopen            103 wince/wince.h  FILE *fdopen( int handle, const char *mode );


feof

feof               67 ext/io/wait/wait.c     if (feof(fp)) return Qfalse;
feof              107 ext/io/wait/wait.c     if (feof(fp)) return Qfalse;
feof              162 io.c           #  define READ_DATA_PENDING(fp) (!feof(fp))
feof              256 io.c           	!feof(fptr->f) &&
feof              272 io.c               if ((fptr->mode & FMODE_RBUF) && !feof(fptr->f) && !fptr->f2) {
feof              812 io.c               if (feof(fptr->f)) return Qtrue;
feof             1115 io.c               if (feof(fptr->f)) return 0;
feof             1156 io.c           	    if (feof(fptr->f)) break;
feof             1345 io.c               if (feof(fptr->f)) return Qnil;
feof             1357 io.c           	if (feof(fptr->f)) {


ferror

ferror            473 io.c           	    if (ferror(f)) return -1L;
ferror            479 io.c           	if (ferror(f)
ferror           1063 io.c           	    if (ferror(fptr->f)) {
ferror           1157 io.c           	    if (!ferror(fptr->f)) break;
ferror           1430 io.c           	    if (ferror(f)) {
ferror           1873 io.c           	    if (ferror(f)) {
ferror           1883 io.c               if (ferror(f)) rb_sys_fail(fptr->path);
ferror           1919 io.c           	if (ferror(f)) {


fev_s_allocate

fev_s_allocate   5886 ext/win32ole/win32ole.c static VALUE fev_s_allocate _((VALUE));
fev_s_allocate   6241 ext/win32ole/win32ole.c     rb_define_alloc_func(cWIN32OLE_EVENT, fev_s_allocate);


fgdbm_clear

fgdbm_clear       599 ext/gdbm/gdbm.c     fgdbm_clear(obj);
fgdbm_clear       983 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       958 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "close", fgdbm_close, 0);


fgdbm_delete_if

fgdbm_delete_if   980 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "delete_if", fgdbm_delete_if, 0);
fgdbm_delete_if   981 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "reject!", fgdbm_delete_if, 0);


fgdbm_each_pair

fgdbm_each_pair   972 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "each", fgdbm_each_pair, 0);
fgdbm_each_pair   975 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       451 ext/gdbm/gdbm.c     valstr = fgdbm_fetch(obj, keystr, Qnil);


fgdbm_has_key

fgdbm_has_key     994 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "include?", fgdbm_has_key, 1);
fgdbm_has_key     995 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "has_key?", fgdbm_has_key, 1);
fgdbm_has_key     996 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "member?", fgdbm_has_key, 1);
fgdbm_has_key     998 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "key?", fgdbm_has_key, 1);


fgdbm_has_value

fgdbm_has_value   997 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "has_value?", fgdbm_has_value, 1);
fgdbm_has_value   999 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "value?", fgdbm_has_value, 1);


fgdbm_indexes

fgdbm_indexes     965 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "indexes",  fgdbm_indexes, -1);
fgdbm_indexes     966 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "indices",  fgdbm_indexes, -1);


fgdbm_initialize

fgdbm_initialize  171 ext/gdbm/gdbm.c     if (NIL_P(fgdbm_initialize(argc, argv, obj))) {
fgdbm_initialize  957 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "initialize", fgdbm_initialize, -1);


fgdbm_length

fgdbm_length      969 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "length", fgdbm_length, 0);
fgdbm_length      970 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     954 ext/gdbm/gdbm.c     rb_define_alloc_func(rb_cGDBM, fgdbm_s_alloc);


fgdbm_set_fastmode

fgdbm_set_fastmode  901 ext/gdbm/gdbm.c     fgdbm_set_fastmode(obj, RTEST(val) ? Qfalse : Qtrue);
fgdbm_set_fastmode  991 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM,"fastmode=", fgdbm_set_fastmode, 1);


fgdbm_store

fgdbm_store       573 ext/gdbm/gdbm.c static VALUE fgdbm_store _((VALUE,VALUE,VALUE));
fgdbm_store       583 ext/gdbm/gdbm.c     fgdbm_store(dbm, RARRAY(pair)->ptr[0], RARRAY(pair)->ptr[1]);
fgdbm_store       962 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "[]=", fgdbm_store, 2);
fgdbm_store       963 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "store", fgdbm_store, 2);


fgdbm_to_hash

fgdbm_to_hash     943 ext/gdbm/gdbm.c     return rb_hash_delete_if(fgdbm_to_hash(obj));
fgdbm_to_hash    1002 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "to_hash", fgdbm_to_hash, 0);


file_expand_path

file_expand_path 2528 file.c         		file_expand_path(dname, Qnil, result);
file_expand_path 2551 file.c         	    file_expand_path(dname, Qnil, result);
file_expand_path 2659 file.c             return file_expand_path(fname, dname, rb_str_new(0, MAXPATHLEN + 2));


file_load_ok

file_load_ok     4178 file.c         	    if (file_load_ok(StringValueCStr(fname))) {
file_load_ok     4200 file.c         	    if (found && file_load_ok(found)) {
file_load_ok     4231 file.c         	if (file_load_ok(f)) return path;
file_load_ok     4239 file.c         	if (file_load_ok(f)) return path;
file_load_ok     4280 file.c             if (file_load_ok(f)) {


file_s_fnmatch

file_s_fnmatch   1562 dir.c              rb_define_singleton_method(rb_cFile,"fnmatch", file_s_fnmatch, -1);
file_s_fnmatch   1563 dir.c              rb_define_singleton_method(rb_cFile,"fnmatch?", file_s_fnmatch, -1);


fileattr_to_unixmode

fileattr_to_unixmode 2894 win32/win32.c  	st->st_mode  = fileattr_to_unixmode(wfd.dwFileAttributes, path);
fileattr_to_unixmode 2908 win32/win32.c  	st->st_mode  = fileattr_to_unixmode(attr, path);


fileno

fileno             65 ext/io/wait/wait.c     if (!FIONREAD_POSSIBLE_P(fileno(fptr->f))) return Qfalse;
fileno             69 ext/io/wait/wait.c     if (ioctl(fileno(fp), FIONREAD, &n)) rb_sys_fail(0);
fileno            109 ext/io/wait/wait.c     fd = fileno(fp);
fileno            115 ext/io/wait/wait.c     if (!FIONREAD_POSSIBLE_P(fileno(fptr->f))) return Qfalse;
fileno            116 ext/io/wait/wait.c     if (ioctl(fileno(fp), FIONREAD, &n)) rb_sys_fail(0);
fileno            124 ext/nkf/nkf-utf8/nkf.c #define setbinmode(fp) setmode(fileno(fp), O_BINARY)
fileno            790 ext/nkf/nkf-utf8/nkf.c                           || (fd_backup = dup(fileno(stdout))) < 0
fileno            791 ext/nkf/nkf-utf8/nkf.c                           || dup2(fd, fileno(stdout)) < 0
fileno            846 ext/nkf/nkf-utf8/nkf.c                   if (dup2(fd_backup, fileno(stdout)) < 0){
fileno            556 ext/openssl/ossl_ssl.c         SSL_set_fd(ssl, TO_SOCKET(fileno(fptr->f)));
fileno            589 ext/openssl/ossl_ssl.c             rb_io_wait_writable(fileno(fptr->f));
fileno            592 ext/openssl/ossl_ssl.c             rb_io_wait_readable(fileno(fptr->f));
fileno            640 ext/openssl/ossl_ssl.c 	    rb_thread_wait_fd(fileno(fptr->f));
fileno            649 ext/openssl/ossl_ssl.c                 rb_io_wait_writable(fileno(fptr->f));
fileno            652 ext/openssl/ossl_ssl.c                 rb_io_wait_readable(fileno(fptr->f));
fileno            694 ext/openssl/ossl_ssl.c                 rb_io_wait_writable(fileno(fptr->f));
fileno            697 ext/openssl/ossl_ssl.c                 rb_io_wait_readable(fileno(fptr->f));
fileno            256 ext/socket/socket.c     if (shutdown(fileno(fptr->f), how) == -1)
fileno            272 ext/socket/socket.c     shutdown(fileno(fptr->f), 0);
fileno            294 ext/socket/socket.c     shutdown(fileno(fptr->f2), 1);
fileno            379 ext/socket/socket.c     if (setsockopt(fileno(fptr->f), level, option, v, vlen) < 0)
fileno            442 ext/socket/socket.c     if (getsockopt(fileno(fptr->f), level, option, buf, &len) < 0)
fileno            460 ext/socket/socket.c     if (getsockname(fileno(fptr->f), (struct sockaddr*)buf, &len) < 0)
fileno            474 ext/socket/socket.c     if (getpeername(fileno(fptr->f), (struct sockaddr*)buf, &len) < 0)
fileno            498 ext/socket/socket.c     fd = fileno(f);
fileno            559 ext/socket/socket.c     fd = fileno(fptr->f);
fileno           1202 ext/socket/socket.c     shutdown(fileno(fptr->f), 2);
fileno           1203 ext/socket/socket.c     shutdown(fileno(fptr->f2), 2);
fileno           1355 ext/socket/socket.c     return s_accept(rb_cTCPSocket, fileno(fptr->f),
fileno           1369 ext/socket/socket.c     return s_accept(0, fileno(fptr->f), (struct sockaddr*)&from, &fromlen);
fileno           1447 ext/socket/socket.c     if (getsockname(fileno(fptr->f), (struct sockaddr*)&addr, &len) < 0)
fileno           1462 ext/socket/socket.c     if (getpeername(fileno(fptr->f), (struct sockaddr*)&addr, &len) < 0)
fileno           1544 ext/socket/socket.c     arg.fd = fileno(fptr->f);
fileno           1562 ext/socket/socket.c 	if (bind(fileno(fptr->f), res->ai_addr, res->ai_addrlen) < 0) {
fileno           1597 ext/socket/socket.c 	n = sendto(fileno(f), RSTRING(mesg)->ptr, RSTRING(mesg)->len, NUM2INT(flags),
fileno           1603 ext/socket/socket.c 	if (rb_io_wait_writable(fileno(f))) {
fileno           1630 ext/socket/socket.c 	if (getsockname(fileno(fptr->f), (struct sockaddr*)&addr, &len) < 0)
fileno           1686 ext/socket/socket.c 	fd = fileno(valfptr->f);
fileno           1720 ext/socket/socket.c     if (sendmsg(fileno(fptr->f), &msg, 0) == -1)
fileno           1772 ext/socket/socket.c     thread_read_select(fileno(fptr->f));
fileno           1796 ext/socket/socket.c     if (recvmsg(fileno(fptr->f), &msg, 0) == -1)
fileno           1861 ext/socket/socket.c     return s_accept(rb_cUNIXSocket, fileno(fptr->f),
fileno           1875 ext/socket/socket.c     return s_accept(0, fileno(fptr->f), (struct sockaddr*)&from, &fromlen);
fileno           1896 ext/socket/socket.c     if (getsockname(fileno(fptr->f), (struct sockaddr*)&addr, &len) < 0)
fileno           1913 ext/socket/socket.c     if (getpeername(fileno(fptr->f), (struct sockaddr*)&addr, &len) < 0)
fileno           2193 ext/socket/socket.c     fd = fileno(fptr->f);
fileno           2288 ext/socket/socket.c     if (bind(fileno(fptr->f), (struct sockaddr*)RSTRING(addr)->ptr, RSTRING(addr)->len) < 0)
fileno           2374 ext/socket/socket.c     if (listen(fileno(fptr->f), backlog) < 0)
fileno           2586 ext/socket/socket.c     sock2 = s_accept(rb_cSocket,fileno(fptr->f),(struct sockaddr*)buf,&len);
fileno           2639 ext/socket/socket.c     sock2 = s_accept(0,fileno(fptr->f),(struct sockaddr*)buf,&len);
fileno            659 file.c         	return fstat(fileno(fptr->f), st);
fileno            679 file.c         	f = (HANDLE)rb_w32_get_osfhandle(fileno(fptr->f));
fileno            746 file.c             if (fstat(fileno(fptr->f), &st) == -1) {
fileno           1590 file.c             if (fstat(fileno(fptr->f), &st) == -1) {
fileno           1635 file.c             if (fstat(fileno(fptr->f), &st) == -1) {
fileno           1683 file.c             if (fstat(fileno(fptr->f), &st) == -1) {
fileno           1755 file.c             if (fchmod(fileno(fptr->f), mode) == -1)
fileno           1903 file.c             if (fchown(fileno(fptr->f), o, g) == -1)
fileno           3079 file.c             if (ftruncate(fileno(f), pos) < 0)
fileno           3083 file.c             if (chsize(fileno(f), pos) < 0)
fileno           3184 file.c             if (flock(fileno(fptr->f), op) < 0) {
fileno            182 io.c           	rb_thread_wait_fd(fileno(fp));\
fileno            292 io.c           	rb_thread_wait_fd(fileno(fp));
fileno            335 io.c               if (!rb_thread_fd_writable(fileno(f))) {
fileno            343 io.c           	if (!rb_io_wait_writable(fileno(f)))
fileno            416 io.c                   if (fstat(fileno(f), &buf) == 0 &&
fileno            419 io.c                       && (r = fcntl(fileno(f), F_GETFL)) != -1 &&
fileno            443 io.c           	if (!rb_thread_fd_writable(fileno(f))) {
fileno            455 io.c           	r = write(fileno(f), RSTRING(str)->ptr+offset, l);
fileno            463 io.c                   if (rb_io_wait_writable(fileno(f))) {
fileno            495 io.c           	    if (rb_io_wait_writable(fileno(f))) {
fileno            907 io.c               if (fsync(fileno(f)) < 0)
fileno            936 io.c               fd = fileno(fptr->f);
fileno           1055 io.c                   rb_thread_wait_fd(fileno(fptr->f));
fileno           1116 io.c               if (fstat(fileno(fptr->f), &st) == 0  && S_ISREG(st.st_mode)
fileno           1210 io.c                   n = read(fileno(fptr->f), RSTRING(str)->ptr, len);
fileno           1213 io.c                       if (rb_io_wait_readable(fileno(fptr->f)))
fileno           1420 io.c           	rb_thread_wait_fd(fileno(f));
fileno           1432 io.c           		if (!rb_io_wait_readable(fileno(f)))
fileno           1498 io.c           	rb_thread_wait_fd(fileno(f));
fileno           1875 io.c           		if (!rb_io_wait_readable(fileno(f)))
fileno           1921 io.c           	    if (!rb_io_wait_readable(fileno(f)))
fileno           1937 io.c           	rb_thread_wait_fd(fileno(f));
fileno           2020 io.c               if (isatty(fileno(fptr->f)) == 0)
fileno           2033 io.c           	f2 = fileno(fptr->f2);
fileno           2047 io.c           	f1 = fileno(fptr->f);
fileno           2091 io.c               if (fileno(fptr->f) < 3) return;
fileno           2106 io.c           	fd2 = fileno(fptr->f2);
fileno           2113 io.c               fd = fileno(fptr->f);
fileno           2312 io.c               pos = lseek(fileno(fptr->f), pos, whence);
fileno           2351 io.c               if (!rb_thread_fd_writable(fileno(f))) {
fileno           2355 io.c               n = write(fileno(f), RSTRING(str)->ptr, RSTRING(str)->len);
fileno           2408 io.c               n = fileno(fptr->f);
fileno           2409 io.c               rb_thread_wait_fd(fileno(fptr->f));
fileno           2415 io.c               n = read(fileno(fptr->f), RSTRING(str)->ptr, ilen);
fileno           2456 io.c               if (fptr->f && setmode(fileno(fptr->f), O_BINARY) == -1)
fileno           2458 io.c               if (fptr->f2 && setmode(fileno(fptr->f2), O_BINARY) == -1)
fileno           3390 io.c               fd = fileno(fptr->f);
fileno           3391 io.c               fd2 = fileno(orig->f);
fileno           3424 io.c               if (fptr->f2 && fd != fileno(fptr->f2)) {
fileno           3425 io.c           	fd = fileno(fptr->f2);
fileno           3431 io.c           	else if (fd != (fd2 = fileno(orig->f2))) {
fileno           3570 io.c               fd = ruby_dup(fileno(orig->f));
fileno           3574 io.c           	if (fileno(orig->f) != fileno(orig->f2)) {
fileno           3575 io.c           	    fd = ruby_dup(fileno(orig->f2));
fileno           4008 io.c               if (!isatty(fileno(f))) {
fileno           4010 io.c           	setmode(fileno(f), O_BINARY);
fileno           4255 io.c           		    fstat(fileno(fr), &st);
fileno           4291 io.c           		    fstat(fileno(fw), &st2);
fileno           4293 io.c           		    fchmod(fileno(fw), st.st_mode);
fileno           4298 io.c           			fchown(fileno(fw), st.st_uid, st.st_gid);
fileno           4577 io.c           	    FD_SET(fileno(fptr->f), rp);
fileno           4580 io.c           		FD_SET(fileno(fptr->f), &pset);
fileno           4582 io.c           	    if (max < fileno(fptr->f)) max = fileno(fptr->f);
fileno           4598 io.c           	    FD_SET(fileno(fptr->f), wp);
fileno           4599 io.c           	    if (max < fileno(fptr->f)) max = fileno(fptr->f);
fileno           4601 io.c           		FD_SET(fileno(fptr->f2), wp);
fileno           4602 io.c           		if (max < fileno(fptr->f2)) max = fileno(fptr->f2);
fileno           4615 io.c           	    FD_SET(fileno(fptr->f), ep);
fileno           4616 io.c           	    if (max < fileno(fptr->f)) max = fileno(fptr->f);
fileno           4618 io.c           		FD_SET(fileno(fptr->f2), ep);
fileno           4619 io.c           		if (max < fileno(fptr->f2)) max = fileno(fptr->f2);
fileno           4645 io.c           		if (FD_ISSET(fileno(fptr->f), rp)
fileno           4646 io.c           		    || FD_ISSET(fileno(fptr->f), &pset)) {
fileno           4656 io.c           		if (FD_ISSET(fileno(fptr->f), wp)) {
fileno           4659 io.c           		else if (fptr->f2 && FD_ISSET(fileno(fptr->f2), wp)) {
fileno           4669 io.c           		if (FD_ISSET(fileno(fptr->f), ep)) {
fileno           4672 io.c           		else if (fptr->f2 && FD_ISSET(fileno(fptr->f2), ep)) {
fileno           4764 io.c               retval = io_cntl(fileno(fptr->f), cmd, narg, io_p);
fileno           4770 io.c               if (fptr->f2 && fileno(fptr->f) != fileno(fptr->f2)) {
fileno           4772 io.c           	io_cntl(fileno(fptr->f2), cmd, narg, io_p);
fileno           3388 win32/win32.c      int fd = fileno(fp);


filetime_to_clock

filetime_to_clock 2975 win32/win32.c  	tmbuf->tms_utime = filetime_to_clock(&user);
filetime_to_clock 2976 win32/win32.c  	tmbuf->tms_stime = filetime_to_clock(&kernel);


filetime_to_unixtime

filetime_to_unixtime 2895 win32/win32.c  	st->st_atime = filetime_to_unixtime(&wfd.ftLastAccessTime);
filetime_to_unixtime 2896 win32/win32.c  	st->st_mtime = filetime_to_unixtime(&wfd.ftLastWriteTime);
filetime_to_unixtime 2897 win32/win32.c  	st->st_ctime = filetime_to_unixtime(&wfd.ftCreationTime);


finalize_list

finalize_list    1816 gc.c           	finalize_list(p);
finalize_list    1831 gc.c           	finalize_list(p);


find_bad_fds

find_bad_fds     10500 eval.c         		    v |= find_bad_fds(&readfds, &th->readfds, th->fd);
find_bad_fds     10501 eval.c         		    v |= find_bad_fds(&writefds, &th->writefds, th->fd);
find_bad_fds     10502 eval.c         		    v |= find_bad_fds(&exceptfds, &th->exceptfds, th->fd);


find_class_path

find_class_path   155 variable.c     		return find_class_path(klass);
find_class_path   166 variable.c         return find_class_path(klass);


find_iid

find_iid         5799 ext/win32ole/win32ole.c         return find_iid(ole, NULL, piid, ppTypeInfo);
find_iid         5941 ext/win32ole/win32ole.c         hr = find_iid(ole, pitf, &iid, &pTypeInfo);


find_inputcode_byfunc

find_inputcode_byfunc 1380 ext/nkf/nkf-utf8/nkf.c         struct input_code *p = find_inputcode_byfunc(iconv);
find_inputcode_byfunc 3589 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             67 missing.h      # define isinf(x) (!finite(x) && !isnan(x))
finite             18 missing/erf.c  #  ifndef finite
finite             75 missing/erf.c      if (!finite(x)) {
finite             86 missing/erf.c      if (!finite(x)) {
finite             35 missing/isinf.c     return (!finite(n) && !isnan(n));
finite           1199 numeric.c          if (!finite(value))
finite            230 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_div

fix_div          2851 numeric.c          rb_define_method(rb_cFixnum, "/", fix_div, 1);
fix_div          2852 numeric.c          rb_define_method(rb_cFixnum, "div", fix_div, 1);


fix_lshift

fix_lshift       2471 numeric.c      	return fix_lshift(x, LONG2FIX(-i));
fix_lshift       2874 numeric.c          rb_define_method(rb_cFixnum, "<<", fix_lshift, 1);


fix_mod

fix_mod          2853 numeric.c          rb_define_method(rb_cFixnum, "%", fix_mod, 1);
fix_mod          2854 numeric.c          rb_define_method(rb_cFixnum, "modulo", fix_mod, 1);


fix_rshift

fix_rshift       2429 numeric.c      static VALUE fix_rshift _((VALUE, VALUE));
fix_rshift       2447 numeric.c      	return fix_rshift(x, LONG2FIX(-width));
fix_rshift       2875 numeric.c          rb_define_method(rb_cFixnum, ">>", fix_rshift, 1);


fixdivmod

fixdivmod        2130 numeric.c      	fixdivmod(FIX2LONG(x), FIX2LONG(y), &div, 0);
fixdivmod        2152 numeric.c      	fixdivmod(FIX2LONG(x), FIX2LONG(y), 0, &mod);
fixdivmod        2171 numeric.c      	fixdivmod(FIX2LONG(x), FIX2LONG(y), &div, &mod);


fixpos

fixpos            228 parse.c        static void fixpos();
fixpos           3710 parse.c        			fixpos(yyval.node, yyvsp[-3].node);
fixpos           3780 parse.c        		        fixpos(yyval.node, yyvsp[0].node);
fixpos           3791 parse.c        		        fixpos(yyval.node, yyvsp[0].node);
fixpos           3919 parse.c        		        fixpos(yyval.node, yyvsp[-5].node);
fixpos           3933 parse.c        		        fixpos(yyval.node, yyvsp[-4].node);
fixpos           3947 parse.c        		        fixpos(yyval.node, yyvsp[-4].node);
fixpos           3961 parse.c        		        fixpos(yyval.node, yyvsp[-4].node);
fixpos           4075 parse.c        		        fixpos(yyval.node, yyvsp[0].node);
fixpos           4089 parse.c        		        fixpos(yyval.node, yyvsp[-1].node);
fixpos           4096 parse.c        		        fixpos(yyval.node, yyvsp[-3].node);
fixpos           4110 parse.c        		        fixpos(yyval.node, yyvsp[-4].node);
fixpos           4117 parse.c        		        fixpos(yyval.node, yyvsp[-3].node);
fixpos           4131 parse.c        		        fixpos(yyval.node, yyvsp[-4].node);
fixpos           4138 parse.c        		        fixpos(yyval.node, yyvsp[0].node);
fixpos           4145 parse.c        		        fixpos(yyval.node, yyvsp[0].node);
fixpos           4535 parse.c        		        fixpos(yyval.node, yyvsp[-5].node);
fixpos           4549 parse.c        		        fixpos(yyval.node, yyvsp[-4].node);
fixpos           4563 parse.c        		        fixpos(yyval.node, yyvsp[-4].node);
fixpos           4577 parse.c        		        fixpos(yyval.node, yyvsp[-4].node);
fixpos           4825 parse.c        		        fixpos(yyval.node, yyvsp[-4].node);
fixpos           5166 parse.c        			fixpos(yyval.node, yyvsp[-3].node);
fixpos           5226 parse.c        			fixpos(yyvsp[0].node->nd_iter, yyvsp[0].node);
fixpos           5237 parse.c        		        fixpos(yyval.node, yyvsp[-1].node);
fixpos           5244 parse.c        		        fixpos(yyval.node, yyvsp[-4].node);
fixpos           5256 parse.c        		        fixpos(yyval.node, yyvsp[-4].node);
fixpos           5276 parse.c        		        fixpos(yyval.node, yyvsp[-4].node);
fixpos           5294 parse.c        		        fixpos(yyval.node, yyvsp[-4].node);
fixpos           5304 parse.c        		        fixpos(yyval.node, yyvsp[-3].node);
fixpos           5331 parse.c        		        fixpos(yyval.node, yyvsp[-7].node);
fixpos           5373 parse.c        		        fixpos(yyval.node, yyvsp[-5].node);
fixpos           5413 parse.c        		        fixpos(yyval.node, yyvsp[-2].node);
fixpos           5435 parse.c        		        fixpos(yyval.node, yyvsp[-7].node);
fixpos           5475 parse.c        		        fixpos(yyval.node, yyvsp[-3].node);
fixpos           5529 parse.c        		        fixpos(yyval.node, yyvsp[-1].node);
fixpos           5548 parse.c        		        fixpos(yyval.node, yyvsp[0].node);
fixpos           5555 parse.c        		        fixpos(yyval.node, yyvsp[-3].node);
fixpos           5562 parse.c        		        fixpos(yyval.node, yyvsp[-3].node);
fixpos           5647 parse.c        		        fixpos(yyval.node, yyvsp[-4].node?yyvsp[-4].node:yyvsp[-1].node);
fixpos           8529 parse.c                fixpos(nl, node);
fixpos           8589 parse.c        	fixpos(end, head);
fixpos            131 parse.y        static void fixpos();
fixpos            386 parse.y        			fixpos($$, $1);
fixpos            439 parse.y        		        fixpos($$, $3);
fixpos            448 parse.y        		        fixpos($$, $3);
fixpos            556 parse.y        		        fixpos($$, $1);
fixpos            568 parse.y        		        fixpos($$, $1);
fixpos            580 parse.y        		        fixpos($$, $1);
fixpos            592 parse.y        		        fixpos($$, $1);
fixpos            688 parse.y        		        fixpos($$, $2);
fixpos            700 parse.y        		        fixpos($$, $2);
fixpos            705 parse.y        		        fixpos($$, $1);
fixpos            717 parse.y        		        fixpos($$, $1);
fixpos            722 parse.y        		        fixpos($$, $1);
fixpos            734 parse.y        		        fixpos($$, $1);
fixpos            739 parse.y        		        fixpos($$, $2);
fixpos            744 parse.y        		        fixpos($$, $2);
fixpos           1020 parse.y        		        fixpos($$, $1);
fixpos           1032 parse.y        		        fixpos($$, $1);
fixpos           1044 parse.y        		        fixpos($$, $1);
fixpos           1056 parse.y        		        fixpos($$, $1);
fixpos           1228 parse.y        		        fixpos($$, $1);
fixpos           1500 parse.y        			fixpos($$, $1);
fixpos           1540 parse.y        			fixpos($2->nd_iter, $2);
fixpos           1550 parse.y        		        fixpos($$, $1);
fixpos           1558 parse.y        		        fixpos($$, $2);
fixpos           1571 parse.y        		        fixpos($$, $2);
fixpos           1583 parse.y        		        fixpos($$, $3);
fixpos           1593 parse.y        		        fixpos($$, $3);
fixpos           1603 parse.y        		        fixpos($$, $2);
fixpos           1618 parse.y        		        fixpos($$, $2);
fixpos           1652 parse.y        		        fixpos($$, $3);
fixpos           1687 parse.y        		        fixpos($$, $4);
fixpos           1703 parse.y        		        fixpos($$, $2);
fixpos           1749 parse.y        		        fixpos($$, $2);
fixpos           1801 parse.y        		        fixpos($$, $1);
fixpos           1816 parse.y        		        fixpos($$, $2);
fixpos           1821 parse.y        		        fixpos($$, $1);
fixpos           1826 parse.y        		        fixpos($$, $1);
fixpos           1899 parse.y        		        fixpos($$, $2?$2:$5);
fixpos           4531 parse.y                fixpos(nl, node);
fixpos           4591 parse.y        	fixpos(end, head);


flatten

flatten          2883 array.c        	    n = flatten(ary, i, tmp, memo);
flatten          2924 array.c        	    i += flatten(ary, i, tmp, memo);


flo_ceil

flo_ceil         1362 numeric.c          return flo_ceil(rb_Float(num));
flo_ceil         2927 numeric.c          rb_define_method(rb_cFloat, "ceil", flo_ceil, 0);


flo_floor

flo_floor        1339 numeric.c          return flo_floor(rb_Float(num));
flo_floor        2926 numeric.c          rb_define_method(rb_cFloat, "floor", flo_floor, 0);


flo_mod

flo_mod          2908 numeric.c          rb_define_method(rb_cFloat, "%", flo_mod, 1);
flo_mod          2909 numeric.c          rb_define_method(rb_cFloat, "modulo", flo_mod, 1);


flo_round

flo_round        1378 numeric.c          return flo_round(rb_Float(num));
flo_round        2928 numeric.c          rb_define_method(rb_cFloat, "round", flo_round, 0);


flo_truncate

flo_truncate     1394 numeric.c          return flo_truncate(rb_Float(num));
flo_truncate     2924 numeric.c          rb_define_method(rb_cFloat, "to_i", flo_truncate, 0);
flo_truncate     2925 numeric.c          rb_define_method(rb_cFloat, "to_int", flo_truncate, 0);
flo_truncate     2929 numeric.c          rb_define_method(rb_cFloat, "truncate", flo_truncate, 0);


flock

flock              32 file.c         int flock _((int, int));
flock            3114 file.c         	ret = flock(fd, op);
flock            3119 file.c             while (flock(fd, op) < 0) {
flock            3184 file.c             if (flock(fileno(fptr->f), op) < 0) {
flock              47 missing.h      extern int flock _((int, int));
flock               6 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       331 win32/win32.c  	    locker = flock_winnt;
flock_winnt       336 win32/win32.c      const asynchronous_func_t locker = flock_winnt;


flodivmod

flodivmod         703 numeric.c          flodivmod(RFLOAT(x)->value, fy, 0, &mod);
flodivmod         734 numeric.c          flodivmod(RFLOAT(x)->value, fy, &div, &mod);


flush_before_seek

flush_before_seek  234 io.c           #define io_seek(fptr, ofs, whence) fseeko(flush_before_seek(fptr)->f, ofs, whence)
flush_before_seek  235 io.c           #define io_tell(fptr) ftello(flush_before_seek(fptr)->f)


flush_register_windows

flush_register_windows  223 defines.h      #  define FLUSH_REGISTER_WINDOWS flush_register_windows()
flush_register_windows  225 defines.h      void flush_register_windows(void)
flush_register_windows  230 defines.h      #  define FLUSH_REGISTER_WINDOWS flush_register_windows()


fmt_setup

fmt_setup          21 sprintf.c      static void fmt_setup _((char*,int,int,int,int));
fmt_setup         760 sprintf.c      		fmt_setup(fbuf, *p, flags, width, prec);


fnmatch

fnmatch           182 dir.c          		    !fnmatch(pat, s, flags | FNM_DOTMATCH))
fnmatch          1012 dir.c          		    if (fnmatch("*", dp->d_name, flags) != 0)
fnmatch          1031 dir.c          		if (fnmatch(magic, dp->d_name, flags) == 0) {
fnmatch          1510 dir.c              if (fnmatch(RSTRING(pattern)->ptr, RSTRING(path)->ptr, flags) == 0)


fold_conv

fold_conv         313 ext/nkf/nkf-utf8/nkf.c STATIC  void    fold_conv PROTO((int c2,int c1));
fold_conv        1830 ext/nkf/nkf-utf8/nkf.c 	o_fconv = oconv; oconv = fold_conv;


fole_s_allocate

fole_s_allocate   877 ext/win32ole/win32ole.c static VALUE fole_s_allocate _((VALUE));
fole_s_allocate   897 ext/win32ole/win32ole.c     VALUE obj = fole_s_allocate(klass);
fole_s_allocate  6098 ext/win32ole/win32ole.c     rb_define_alloc_func(cWIN32OLE, fole_s_allocate);


fole_setproperty

fole_setproperty 6119 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "[]=", fole_setproperty, -1);
fole_setproperty 6127 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "setproperty", fole_setproperty, -1);


folemethod_event

folemethod_event 4728 ext/win32ole/win32ole.c     if(folemethod_event(self) == Qtrue) {
folemethod_event 6216 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "event?", folemethod_event, 0);


folemethod_s_allocate

folemethod_s_allocate  195 ext/win32ole/win32ole.c static VALUE folemethod_s_allocate _((VALUE));
folemethod_s_allocate 2792 ext/win32ole/win32ole.c             method = folemethod_s_allocate(cWIN32OLE_METHOD);
folemethod_s_allocate 3240 ext/win32ole/win32ole.c     method = folemethod_s_allocate(cWIN32OLE_METHOD);
folemethod_s_allocate 6206 ext/win32ole/win32ole.c     rb_define_alloc_func(cWIN32OLE_METHOD, folemethod_s_allocate);


foletype_s_allocate

foletype_s_allocate  197 ext/win32ole/win32ole.c static VALUE foletype_s_allocate _((VALUE));
foletype_s_allocate 1652 ext/win32ole/win32ole.c         type = foletype_s_allocate(cWIN32OLE_TYPE);
foletype_s_allocate 3006 ext/win32ole/win32ole.c         type = foletype_s_allocate(cWIN32OLE_TYPE);
foletype_s_allocate 6176 ext/win32ole/win32ole.c     rb_define_alloc_func(cWIN32OLE_TYPE, foletype_s_allocate);


fopen

fopen             170 ext/dl/test/test.c   file = fopen(filename,mode);
fopen             749 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            4145 file.c             f = fopen(file, "r");
fopen            2665 io.c               file = fopen(fname, mode);
fopen            2669 io.c           	    file = fopen(fname, mode);
fopen             847 ruby.c         	FILE *fp = fopen(fname, "r");
fopen             132 st.c               FILE *f = fopen("/tmp/col", "w");
fopen            3600 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      541 ruby.c         	    forbid_setid("-s");
forbid_setid      557 ruby.c         	    forbid_setid("-S");
forbid_setid      563 ruby.c         	    forbid_setid("-e");
forbid_setid      581 ruby.c         	    forbid_setid("-r");
forbid_setid      592 ruby.c         	    forbid_setid("-i");
forbid_setid      648 ruby.c         	    forbid_setid("-I");
forbid_setid      870 ruby.c         	    forbid_setid("-x");
forbid_setid      966 ruby.c             forbid_setid("program input from stdin");


fpath_check

fpath_check      4228 file.c         	if (rb_safe_level() >= 1 && !fpath_check(f)) {
fpath_check      4236 file.c         	if (rb_safe_level() >= 1 && !fpath_check(f)) {
fpath_check      4277 file.c             if (rb_safe_level() >= 1 && !fpath_check(f)) {


fprintf

fprintf           474 dln.c              fprintf(stderr, "  %s\n", key);
fprintf           481 dln.c              fprintf(stderr, " Undefined symbols:\n");
fprintf           489 dln.c          	fprintf(stderr, "dln: Calling undefined function\n");
fprintf          1707 dln.c          	fprintf(stderr, "PATH length too long: %s\n", first);
fprintf          1802 dln.c          	    fprintf(stderr, "openpath: pathname too long (ignored)\n");
fprintf          1804 dln.c          	    fprintf(stderr, "\tDirectory \"%s\"\n", fbuf);
fprintf          1805 dln.c          	    fprintf(stderr, "\tFile \"%s\"\n", fname);
fprintf          1848 dln.c          		    fprintf(stderr, "openpath: pathname too long (ignored)\n");
fprintf          1849 dln.c          		    fprintf(stderr, "\tDirectory \"%.*s\"\n", (int) (bp - fbuf), fbuf);
fprintf          1850 dln.c          		    fprintf(stderr, "\tFile \"%s%s\"\n", fname, extension[j]);
fprintf           211 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           850 ext/nkf/nkf-utf8/nkf.c                       fprintf(stderr, "Can't stat %s\n", origfname);
fprintf           854 ext/nkf/nkf-utf8/nkf.c                       fprintf(stderr, "Can't set permission %s\n", outfname);
fprintf           861 ext/nkf/nkf-utf8/nkf.c                       fprintf(stderr, "Can't set timestamp %s\n", outfname);
fprintf           867 ext/nkf/nkf-utf8/nkf.c                       fprintf(stderr, "Can't set timestamp %s\n", outfname);
fprintf           877 ext/nkf/nkf-utf8/nkf.c                       fprintf(stderr, "Can't rename %s to %s\n",
fprintf          3695 ext/nkf/nkf-utf8/nkf.c         fprintf(stderr, "%s\n", str);
fprintf          4698 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"nkf internal module connection failure.\n");
fprintf          4710 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"USAGE:  nkf(nkf32,wnkf,nkf2) -[flags] [in file] .. [out file for -O flag]\n");
fprintf          4711 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"Flags:\n");
fprintf          4712 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"b,u      Output is buffered (DEFAULT),Output is unbuffered\n");
fprintf          4714 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-8\n");
fprintf          4717 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-8\n");
fprintf          4720 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-8\n");
fprintf          4723 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-8 (DEFAULT)\n");
fprintf          4726 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"         After 'w' you can add more options. (80?|16((B|L)0?)?) \n");
fprintf          4728 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          4730 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"         After 'W' you can add more options. (8|16(B|L)?) \n");
fprintf          4732 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"t        no conversion\n");
fprintf          4733 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"i_/o_    Output sequence to designate JIS-kanji/ASCII (DEFAULT B)\n");
fprintf          4734 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"r        {de/en}crypt ROT13/47\n");
fprintf          4735 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"h        1 hirakana->katakana, 2 katakana->hirakana,3 both\n");
fprintf          4736 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"v        Show this usage. V: show version\n");
fprintf          4737 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"m[BQN0]  MIME decode [B:base64,Q:quoted,N:non-strict,0:no decode]\n");
fprintf          4738 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"M[BQ]    MIME encode [B:base64 Q:quoted]\n");
fprintf          4739 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"l        ISO8859-1 (Latin-1) support\n");
fprintf          4740 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          4741 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          4742 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"                                          3: Convert HTML Entity\n");
fprintf          4743 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"X,x      Assume X0201 kana in MS-Kanji, -x preserves X0201\n");
fprintf          4744 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          4746 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"T        Text mode output\n");
fprintf          4748 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"O        Output to File (DEFAULT 'nkf.out')\n");
fprintf          4749 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"d,c      Delete \\r in line feed and \\032, Add \\r in line feed\n");
fprintf          4750 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"I        Convert non ISO-2022-JP charactor to GETA\n");
fprintf          4751 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"-L[uwm]  line mode u:LF w:CRLF m:CR (DEFAULT noconversion)\n");
fprintf          4752 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"long name options\n");
fprintf          4753 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr," --fj,--unix,--mac,--windows                        convert for the system\n");
fprintf          4754 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr," --jis,--euc,--sjis,--utf8,--utf16,--mime,--base64  convert for the code\n");
fprintf          4755 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr," --hiragana, --katakana    Hiragana/Katakana Conversion\n");
fprintf          4756 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr," --x0212                   Convert JISX0212\n");
fprintf          4757 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr," --cp932, --no-cp932       CP932 compatibility\n");
fprintf          4759 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr," --cap-input, --url-input  Convert hex after ':' or '%%'\n");
fprintf          4762 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr," --numchar-input   Convert Unicode Character Reference\n");
fprintf          4765 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr," --ms-ucs-map      Microsoft UCS Mapping Compatible\n");
fprintf          4768 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr," --overwrite       Overwrite original listed files by filtered result\n");
fprintf          4770 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr," -g, --guess       Guess the input code\n");
fprintf          4771 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr," --help,--version\n");
fprintf          4778 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"Network Kanji Filter Version %s (%s) "
fprintf          4792 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           165 ext/openssl/ossl.h     fprintf(stderr, "OSSL_DEBUG: "); \
fprintf           166 ext/openssl/ossl.h     fprintf(stderr, fmt, ##__VA_ARGS__); \
fprintf           167 ext/openssl/ossl.h     fprintf(stderr, " [in %s (%s:%d)]\n", __func__, __FILE__, __LINE__); \
fprintf           405 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            33 ext/win32ole/win32ole.c #define DOUT fprintf(stderr,"[%d]\n",__LINE__)
fprintf            34 ext/win32ole/win32ole.c #define DOUTS(x) fprintf(stderr,"[%d]:" #x "=%s\n",__LINE__,x)
fprintf            35 ext/win32ole/win32ole.c #define DOUTMSG(x) fprintf(stderr, "[%d]:" #x "\n",__LINE__)
fprintf            36 ext/win32ole/win32ole.c #define DOUTI(x) fprintf(stderr, "[%ld]:" #x "=%d\n",__LINE__,x)
fprintf            37 ext/win32ole/win32ole.c #define DOUTD(x) fprintf(stderr, "[%d]:" #x "=%f\n",__LINE__,x)
fprintf            99 gc.c           	fprintf(stderr, "[FATAL] failed to allocate memory\n");
fprintf          2984 io.c           	    fprintf(stderr, "%s:%d: command not found: %s\n",
fprintf            42 missing/erf.c      fprintf(stderr, "erf.c:%d:p_gamma() could not converge.", __LINE__);
fprintf            66 missing/erf.c      fprintf(stderr, "erf.c:%d:q_gamma() could not converge.", __LINE__);
fprintf          3187 parse.c        #  define YYFPRINTF fprintf
fprintf          3616 regex.c          fprintf(stderr, "Entering re_match(%s)\n", string_arg);
fprintf          3653 regex.c            fprintf(stderr,
fprintf           569 ruby.c         		fprintf(stderr, "%s: no code specified for -e\n", origargv[0]);
fprintf           701 ruby.c         		fprintf(stderr, "%s: invalid option --%s  (-h will show valid options)\n",
fprintf           719 ruby.c         		fprintf(stderr, format, origargv[0], (int)(unsigned char)*s);
fprintf           133 st.c               fprintf(f, "collision: %d\n", collision);
fprintf          3303 win32/win32.c  		    Debug(fprintf(stderr, "couldn't get stack base:%p:%d\n",
fprintf          3307 win32/win32.c  		    Debug(fprintf(stderr, "couldn't release stack:%p:%d\n",


fptr_finalize

fptr_finalize    2078 io.c           	fptr_finalize(fptr, noraise);
fptr_finalize    2855 io.c               fptr_finalize(fptr, noraise);


fputc

fputc             472 io.c           	if (fputc(RSTRING(str)->ptr[offset++], f) == EOF) {
fputc              51 wince/wince.h  #define _fputc fputc


frame_dup

frame_dup        8064 eval.c         	frame_dup(&tmp->frame);
frame_dup        8082 eval.c             frame_dup(&dup->frame);
frame_dup        8160 eval.c             frame_dup(&data->frame);
frame_dup        8240 eval.c             frame_dup(&data->frame);
frame_dup        8627 eval.c             frame_dup(&data->frame);


free

free             2163 array.c        	free(RARRAY(copy)->ptr);
free              241 dir.c          	if (dir->path) free(dir->path);
free              243 dir.c              free(dir);
free              277 dir.c              if (dp->path) free(dp->path);
free              656 dir.c          	args.old_path = rb_tainted_str_new2(cwd); free(cwd);
free              688 dir.c              free(path);
free              975 dir.c          	        free(base);
free              976 dir.c          	        free(magic);
free              991 dir.c          		    free(base);
free              992 dir.c          		    free(magic);
free              997 dir.c          		free(base);
free              998 dir.c          		free(magic);
free             1049 dir.c          	    free(base);
free             1050 dir.c          	    free(magic);
free             1070 dir.c          		    free(tmp->path);
free             1071 dir.c          		    free(tmp);
free              141 dln.c          	free(*buf);\
free              145 dln.c              free(*buf);\
free              284 dln.c          	free(reloc);
free              316 dln.c          	free(buffer);
free              386 dln.c          	free(syms);
free              456 dln.c          	free(addr);
free              603 dln.c              free(undef->name);
free              604 dln.c              free(undef);
free              632 dln.c          	free(undef->name);
free              665 dln.c          	free(reloc);
free              682 dln.c          		    free(key);
free              694 dln.c          		    free(key);
free              763 dln.c          		free(key);
free              898 dln.c              free(reloc);
free              899 dln.c              free(syms);
free              916 dln.c              if (syms) free(syms);
free              917 dln.c              if (reloc) free(reloc);
free              918 dln.c              if (block) free((char*)block);
free             1017 dln.c          		free(data);
free             1022 dln.c          	free(data);
free             1060 dln.c          		    free(syms);
free             1882 dln.c          	free(vms_filespec);
free             6724 eval.c         	    free(ruby_scope->local_tbl);
free             7060 eval.c         	    free(ftptr);
free             7723 eval.c         	    free(tmp);
free             7741 eval.c         	    free(tmp);
free             8004 eval.c                 free(frame->argv);
free             8008 eval.c         	    free(frame->argv);
free             8011 eval.c         	free(tmp);
free             8025 eval.c         	free(tmp);
free             8775 eval.c             method = Data_Make_Struct(mklass, struct METHOD, bm_mark, free, data);
free             8860 eval.c             method = Data_Make_Struct(rb_cUnboundMethod, struct METHOD, bm_mark, free, data);
free             8960 eval.c             clone = Data_Make_Struct(CLASS_OF(self),struct METHOD, bm_mark, free, data);
free             9123 eval.c             method = Data_Make_Struct(rb_cMethod,struct METHOD,bm_mark,free,bound);
free             9991 eval.c             if (th->stk_ptr) free(th->stk_ptr);
free             9994 eval.c             if (th->bstr_ptr) free(th->bstr_ptr);
free             10002 eval.c             if (th != main_thread) free(th);
free             10242 eval.c             if (th->stk_ptr) free(th->stk_ptr);
free             12537 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               80 ext/digest/digest.c     obj = Data_Wrap_Struct(klass, 0, free, pctx);
free              109 ext/digest/digest.c     free(digest);
free              138 ext/digest/digest.c     free(hexdigest);
free              219 ext/digest/digest.c     free(digest);
free              220 ext/digest/digest.c     free(pctx2);
free              250 ext/digest/digest.c     free(hexdigest);
free              251 ext/digest/digest.c     free(pctx2);
free              274 ext/dl/dl.h      freefunc_t free; /* free() */
free               62 ext/dl/ptr.c       if (data->free) {
free               64 ext/dl/ptr.c   	printf("dlptr_free(): 0x%x(data->ptr:0x%x)\n",data->free,data->ptr);
free               66 ext/dl/ptr.c         (*(data->free))(data->ptr);
free              101 ext/dl/ptr.c         data->free = func;
free              114 ext/dl/ptr.c   	data->free = func;
free              171 ext/dl/ptr.c     data->free = 0;
free              211 ext/dl/ptr.c       if (data->ptr && data->free) {
free              213 ext/dl/ptr.c         (*(data->free))(data->ptr);
free              217 ext/dl/ptr.c       data->free = f;
free              290 ext/dl/ptr.c     data->free = DLFREEFUNC(rb_dlsym2csym(val));
free              302 ext/dl/ptr.c     return rb_dlsym_new(pdata->free,"(free)","0P");
free              470 ext/dl/ptr.c   	   rb_class2name(CLASS_OF(self)), data, data->ptr, data->size, data->free);
free               64 ext/dl/sym.c       free(data->name);
free               70 ext/dl/sym.c       free(data->type);
free              163 ext/dl/sym.c       if( data->name ) free(data->name);
free              164 ext/dl/sym.c       if( data->type ) free(data->type);
free               58 ext/gdbm/gdbm.c 	free(dbmp);
free              522 ext/gdbm/gdbm.c 	    free(key.dptr);
free              525 ext/gdbm/gdbm.c 	free(key.dptr);
free              532 ext/gdbm/gdbm.c                 free(key.dptr);
free              533 ext/gdbm/gdbm.c                 if (nextkey.dptr) free(nextkey.dptr);
free              536 ext/gdbm/gdbm.c             free(key.dptr);
free              646 ext/gdbm/gdbm.c         free(key.dptr);
free              668 ext/gdbm/gdbm.c             free(key.dptr);
free              766 ext/gdbm/gdbm.c         free(key.dptr);
free              880 ext/nkf/nkf-utf8/nkf.c                   free(outfname);
free             3948 ext/nkf/nkf-utf8/nkf.c 			    free(lwsp_buf);
free             3969 ext/nkf/nkf-utf8/nkf.c 	    free(lwsp_buf);
free             4067 ext/nkf/nkf-utf8/nkf.c 			free(lwsp_buf);
free             4088 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              100 ext/readline/readline.c     if (buff) free(buff);
free              586 ext/readline/readline.c         free(entry->line);
free              587 ext/readline/readline.c         free(entry);
free              686 ext/readline/readline.c 	    free(matches[i]);
free              688 ext/readline/readline.c 	free(matches);
free              713 ext/readline/readline.c 	    free(matches[i]);
free              715 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              178 ext/socket/getaddrinfo.c 		goto free;\
free              188 ext/socket/getaddrinfo.c 		goto free;\
free              223 ext/socket/getaddrinfo.c 			free(ai->ai_canonname);
free              225 ext/socket/getaddrinfo.c 		free(ai);
free              537 ext/socket/getaddrinfo.c  free:
free              579 ext/socket/getaddrinfo.c  free:
free              688 ext/socket/getaddrinfo.c  free:
free              179 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              243 ext/win32ole/win32ole.c         free(p);
free              276 ext/win32ole/win32ole.c     free(psz);
free              560 ext/win32ole/win32ole.c     if(pSource) free(pSource);
free              561 ext/win32ole/win32ole.c     if(pDescription) free(pDescription);
free              689 ext/win32ole/win32ole.c     free(p);
free              776 ext/win32ole/win32ole.c             if(pub) free(pub);
free              777 ext/win32ole/win32ole.c             if(psab) free(psab);
free              778 ext/win32ole/win32ole.c             if(pid) free(pid);
free              801 ext/win32ole/win32ole.c         if(pub) free(pub);
free              802 ext/win32ole/win32ole.c         if(psab) free(psab);
free              803 ext/win32ole/win32ole.c         if(pid) free(pid);
free              928 ext/win32ole/win32ole.c             if(pID) free(pID);
free              929 ext/win32ole/win32ole.c             if(pLB) free(pLB);
free              930 ext/win32ole/win32ole.c             if(pUB) free(pUB);
free              967 ext/win32ole/win32ole.c         if(pID) free(pID);
free              968 ext/win32ole/win32ole.c         if(pLB) free(pLB);
free              969 ext/win32ole/win32ole.c         if(pUB) free(pUB);
free             1020 ext/win32ole/win32ole.c         if(p) free(p);
free             1099 ext/win32ole/win32ole.c             if(p) free(p);
free             1315 ext/win32ole/win32ole.c                     free(pName);
free             5651 ext/win32ole/win32ole.c         free(pEVObj);
free             5752 ext/win32ole/win32ole.c                 free(pstr);
free              403 ext/zlib/zlib.c     free(address);
free              822 ext/zlib/zlib.c     free(z);
free             1754 ext/zlib/zlib.c     free(gz);
free              160 file.c             return Data_Wrap_Struct(klass, NULL, free, nst);
free             2162 file.c         	free(buf);
free             2166 file.c             free(buf);
free             2336 file.c         	free(oldcwd);
free             2542 file.c         		free(dir);
free             2561 file.c         	    free(dir);
free             3468 file.c         	free(DATA_PTR(obj));
free             3492 file.c         	free(DATA_PTR(copy));
free             4061 file.c         	free(buf);
free              175 gc.c           	RUBY_CRITICAL(free(x));
free              255 gc.c           	RUBY_CRITICAL(free(tmp));
free              263 gc.c           	    RUBY_CRITICAL(free(t));
free              284 gc.c           	} free;
free              368 gc.c           	p->as.free.flags = 0;
free              369 gc.c           	p->as.free.next = freelist;
free              384 gc.c               freelist = freelist->as.free.next;
free              554 gc.c           	free(value);
free             1004 gc.c           	RVALUE *tmp = p->as.free.next;
free             1007 gc.c           	    p->as.free.flags = 0;
free             1008 gc.c           	    p->as.free.next = freelist;
free             1022 gc.c           	    free(heaps[i].slot);
free             1065 gc.c           	RVALUE *free = freelist;
free             1075 gc.c           		    p->as.free.flags = FL_MARK; /* remain marked */
free             1076 gc.c           		    p->as.free.next = final_list;
free             1080 gc.c           		    p->as.free.flags = 0;
free             1081 gc.c           		    p->as.free.next = freelist;
free             1100 gc.c           	    for (pp = final_list; pp != final; pp = pp->as.free.next) {
free             1101 gc.c           		p->as.free.flags |= FL_SINGLETON; /* freeing page mark */
free             1103 gc.c           	    freelist = free;	/* cancel this page from freelist */
free             1131 gc.c               RANY(p)->as.free.flags = 0;
free             1132 gc.c               RANY(p)->as.free.next = freelist;
free             1169 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.string.ptr));
free             1174 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.array.ptr));
free             1187 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.regexp.str));
free             1193 gc.c           		RUBY_CRITICAL(free(DATA_PTR(obj)));
free             1203 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.match.regs));
free             1209 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.file.fptr));
free             1223 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.bignum.digits));
free             1230 gc.c           		RUBY_CRITICAL(free(RANY(obj)->as.node.u1.tbl));
free             1234 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.node.u1.node));
free             1244 gc.c           		RUBY_CRITICAL(free(RANY(obj)->as.scope.local_tbl));
free             1246 gc.c           		RUBY_CRITICAL(free(vars));
free             1252 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.rstruct.ptr));
free             1850 gc.c           		p->as.free.flags = 0;
free             1852 gc.c           		    RUBY_CRITICAL(free(DATA_PTR(p)));
free             1859 gc.c           		p->as.free.flags = 0;
free             1842 hash.c         	    free(environ[i]);
free             2088 io.c           	free(fptr->path);
free             2805 io.c           	free(list);
free             2813 io.c           	    free(tmp);
free             3384 io.c               if (fptr->path) free(fptr->path);
free             3495 io.c           	free(fptr->path);
free             5449 io.c           	if (ruby_inplace_mode) free(ruby_inplace_mode);
free             5454 io.c               if (ruby_inplace_mode) free(ruby_inplace_mode);
free              105 missing/os2.c  	    free(argv);
free              106 missing/os2.c  	    free(cmd2);
free              110 missing/os2.c      free(cmd2);
free              111 missing/os2.c      free(argv);
free               71 pack.c             free(t);				\
free               72 pack.c             free(zp);				\
free             3027 parse.c        #  define YYSTACK_FREE free
free              251 random.c           free(buf);
free             1336 re.c               if (re->str) free(re->str);
free              359 ruby.c         	free(list->name);
free              360 ruby.c         	free(list);
free              593 ruby.c         	    if (ruby_inplace_mode) free(ruby_inplace_mode);
free              386 ruby.h             rb_data_object_alloc(klass,sval,(RUBY_DATA_FUNC)mark,(RUBY_DATA_FUNC)free)
free              391 ruby.h             Data_Wrap_Struct(klass,mark,free,sval)\
free               50 rubyio.h       	free(RFILE(obj)->fptr);\
free              207 st.c           	    free(ptr);
free              211 st.c               free(table->bins);
free              212 st.c               free(table);
free              331 st.c               free(table->bins);
free              354 st.c           	free(new_table);
free              364 st.c           		free(new_table->bins);
free              365 st.c           		free(new_table);
free              400 st.c           	free(ptr);
free              411 st.c           	    free(tmp);
free              511 st.c           		free(tmp);
free              264 string.c           if (!FL_TEST(str, ELTS_SHARED)) free(RSTRING(str)->ptr);
free             2154 string.c       	    free(RSTRING(str)->ptr);
free             2254 string.c       	    free(RSTRING(str)->ptr);
free               41 time.c             if (tobj) free(tobj);
free             1771 time.c         	free(*buf);
free             1848 time.c         		free(buf);
free             1860 time.c             if (buf != buffer) free(buf);
free              647 util.c         	    free(buf);
free              660 util.c         	free(buf);
free              611 variable.c     	    free(next);
free              820 variable.c     		free(trace);
free              823 variable.c     	    free(var);
free              464 win32/win32.c  	free(p);
free             1056 win32/win32.c  	free(buf);
free             1060 win32/win32.c  	free(patt->str);
free             1061 win32/win32.c      free(patt);
free             1335 win32/win32.c  	if (curr->flags & NTMALLOC) free(curr->str);
free             1336 win32/win32.c  	free(curr);
free             1341 win32/win32.c      free(cmdline);
free             1530 win32/win32.c  	free(dirp->start);
free             1531 win32/win32.c  	free(dirp);
free             3368 win32/win32.c      while (*t) free(*t++);
free             3369 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          254 dir.c              VALUE obj = Data_Make_Struct(klass, struct dir_data, 0, free_dir, dirp);
free_dir          312 dir.c              VALUE dir = Data_Make_Struct(klass, struct dir_data, 0, free_dir, dp);
free_dir         1377 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 1124 gc.c               free_unused_heaps();
free_unused_heaps 1817 gc.c           	free_unused_heaps();


freeaddrinfo

freeaddrinfo      158 ext/socket/addrinfo.h extern void freeaddrinfo __P((struct addrinfo *));
freeaddrinfo      539 ext/socket/getaddrinfo.c 		freeaddrinfo(top);
freeaddrinfo      581 ext/socket/getaddrinfo.c 		freeaddrinfo(cur);
freeaddrinfo      690 ext/socket/getaddrinfo.c 		freeaddrinfo(top);
freeaddrinfo     1058 ext/socket/socket.c 	freeaddrinfo(arg->remote.res);
freeaddrinfo     1062 ext/socket/socket.c 	freeaddrinfo(arg->local.res);
freeaddrinfo     1271 ext/socket/socket.c 		     RUBY_METHOD_FUNC(freeaddrinfo), (VALUE)addr);
freeaddrinfo     1485 ext/socket/socket.c     freeaddrinfo(res);
freeaddrinfo     1546 ext/socket/socket.c 		    RUBY_METHOD_FUNC(freeaddrinfo), (VALUE)arg.res);
freeaddrinfo     1565 ext/socket/socket.c 	freeaddrinfo(res0);
freeaddrinfo     1568 ext/socket/socket.c     freeaddrinfo(res0);
freeaddrinfo     1600 ext/socket/socket.c 	    freeaddrinfo(res0);
freeaddrinfo     1607 ext/socket/socket.c     freeaddrinfo(res0);
freeaddrinfo     2886 ext/socket/socket.c     freeaddrinfo(res);
freeaddrinfo     3017 ext/socket/socket.c 		freeaddrinfo(res);
freeaddrinfo     3021 ext/socket/socket.c 	freeaddrinfo(res);
freeaddrinfo     3026 ext/socket/socket.c     if (res) freeaddrinfo(res);
freeaddrinfo     3030 ext/socket/socket.c     if (res) freeaddrinfo(res);
freeaddrinfo     3041 ext/socket/socket.c     freeaddrinfo(res);


freehostent

freehostent       157 ext/socket/addrinfo.h extern void freehostent __P((struct hostent *));
freehostent       575 ext/socket/getaddrinfo.c 		freehostent(hp);
freehostent       584 ext/socket/getaddrinfo.c 		freehostent(hp);
freehostent       684 ext/socket/getaddrinfo.c 	freehostent(hp);
freehostent       693 ext/socket/getaddrinfo.c 		freehostent(hp);
freehostent       248 ext/socket/getnameinfo.c 				freehostent(hp);
freehostent       254 ext/socket/getnameinfo.c 			freehostent(hp);


freopen

freopen           718 ext/nkf/nkf-utf8/nkf.c     if (freopen("","wb",stdout) == NULL)
freopen           732 ext/nkf/nkf-utf8/nkf.c       if (freopen("","rb",stdin) == NULL) return (-1);
freopen           805 ext/nkf/nkf-utf8/nkf.c 		  if(freopen(outfname, "w", stdout) == NULL) {
freopen           811 ext/nkf/nkf-utf8/nkf.c                       if (freopen("","wb",stdout) == NULL)
freopen           820 ext/nkf/nkf-utf8/nkf.c                  if (freopen("","rb",fin) == NULL)
freopen          3510 io.c               if (freopen(RSTRING(fname)->ptr, mode, fptr->f) == 0) {
freopen          3519 io.c           	if (freopen(RSTRING(fname)->ptr, "w", fptr->f2) == 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       745 ext/sdbm/init.c     rb_define_alloc_func(rb_cDBM, fsdbm_alloc);


fsdbm_clear

fsdbm_clear       475 ext/sdbm/init.c     fsdbm_clear(obj);
fsdbm_clear       774 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       749 ext/sdbm/init.c     rb_define_method(rb_cDBM, "close", fsdbm_close, 0);


fsdbm_delete

fsdbm_delete      489 ext/sdbm/init.c 	fsdbm_delete(obj, keystr);
fsdbm_delete      770 ext/sdbm/init.c     rb_define_method(rb_cDBM, "delete", fsdbm_delete, 1);


fsdbm_delete_if

fsdbm_delete_if   771 ext/sdbm/init.c     rb_define_method(rb_cDBM, "delete_if", fsdbm_delete_if, 0);
fsdbm_delete_if   772 ext/sdbm/init.c     rb_define_method(rb_cDBM, "reject!", fsdbm_delete_if, 0);


fsdbm_each_pair

fsdbm_each_pair   763 ext/sdbm/init.c     rb_define_method(rb_cDBM, "each", fsdbm_each_pair, 0);
fsdbm_each_pair   766 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       228 ext/sdbm/init.c 	rb_ary_push(new, fsdbm_fetch(obj, argv[i], Qnil));
fsdbm_fetch       268 ext/sdbm/init.c             rb_ary_push(new, fsdbm_fetch(obj, argv[i], Qnil));
fsdbm_fetch       285 ext/sdbm/init.c         rb_ary_push(new, fsdbm_fetch(obj, argv[i], Qnil));


fsdbm_has_key

fsdbm_has_key     779 ext/sdbm/init.c     rb_define_method(rb_cDBM, "include?", fsdbm_has_key, 1);
fsdbm_has_key     780 ext/sdbm/init.c     rb_define_method(rb_cDBM, "has_key?", fsdbm_has_key, 1);
fsdbm_has_key     781 ext/sdbm/init.c     rb_define_method(rb_cDBM, "member?", fsdbm_has_key, 1);
fsdbm_has_key     783 ext/sdbm/init.c     rb_define_method(rb_cDBM, "key?", fsdbm_has_key, 1);


fsdbm_has_value

fsdbm_has_value   782 ext/sdbm/init.c     rb_define_method(rb_cDBM, "has_value?", fsdbm_has_value, 1);
fsdbm_has_value   784 ext/sdbm/init.c     rb_define_method(rb_cDBM, "value?", fsdbm_has_value, 1);


fsdbm_indexes

fsdbm_indexes     756 ext/sdbm/init.c     rb_define_method(rb_cDBM, "indexes",  fsdbm_indexes, -1);
fsdbm_indexes     757 ext/sdbm/init.c     rb_define_method(rb_cDBM, "indices",  fsdbm_indexes, -1);


fsdbm_initialize

fsdbm_initialize  139 ext/sdbm/init.c     if (NIL_P(fsdbm_initialize(argc, argv, obj))) {
fsdbm_initialize  748 ext/sdbm/init.c     rb_define_method(rb_cDBM, "initialize", fsdbm_initialize, -1);


fsdbm_length

fsdbm_length      760 ext/sdbm/init.c     rb_define_method(rb_cDBM, "length", fsdbm_length, 0);
fsdbm_length      761 ext/sdbm/init.c     rb_define_method(rb_cDBM, "size", fsdbm_length, 0);


fsdbm_store

fsdbm_store       449 ext/sdbm/init.c static VALUE fsdbm_store _((VALUE,VALUE,VALUE));
fsdbm_store       459 ext/sdbm/init.c     fsdbm_store(dbm, RARRAY(pair)->ptr[0], RARRAY(pair)->ptr[1]);
fsdbm_store       753 ext/sdbm/init.c     rb_define_method(rb_cDBM, "[]=", fsdbm_store, 2);
fsdbm_store       754 ext/sdbm/init.c     rb_define_method(rb_cDBM, "store", fsdbm_store, 2);


fsdbm_to_hash

fsdbm_to_hash     735 ext/sdbm/init.c     return rb_hash_delete_if(fsdbm_to_hash(obj));
fsdbm_to_hash     787 ext/sdbm/init.c     rb_define_method(rb_cDBM, "to_hash", fsdbm_to_hash, 0);


fseeko

fseeko             70 file.c         #if !HAVE_FSEEKO && !defined(fseeko)
fseeko           3077 file.c             fseeko(f, (off_t)0, SEEK_CUR);
fseeko             56 io.c           #if !HAVE_FSEEKO && !defined(fseeko)
fseeko            234 io.c           #define io_seek(fptr, ofs, whence) fseeko(flush_before_seek(fptr)->f, ofs, whence)
fseeko           3543 io.c           	fseeko(orig->f, 0L, SEEK_CUR);
fseeko           3549 io.c           	fseeko(orig->f, 0L, SEEK_CUR);
fseeko           3572 io.c               fseeko(fptr->f, ftello(orig->f), SEEK_SET);
fseeko           3578 io.c           	fseeko(fptr->f2, ftello(orig->f2), SEEK_SET);


fstat

fstat             213 ext/sdbm/_sdbm.c 			if (fstat(db->dirf, &dstat) == 0) {
fstat              92 file.c         	if (fstat(fd, &st) < 0) return -1;
fstat             659 file.c         	return fstat(fileno(fptr->f), st);
fstat             746 file.c             if (fstat(fileno(fptr->f), &st) == -1) {
fstat            1590 file.c             if (fstat(fileno(fptr->f), &st) == -1) {
fstat            1635 file.c             if (fstat(fileno(fptr->f), &st) == -1) {
fstat            1683 file.c             if (fstat(fileno(fptr->f), &st) == -1) {
fstat             416 io.c                   if (fstat(fileno(f), &buf) == 0 &&
fstat            1116 io.c               if (fstat(fileno(fptr->f), &st) == 0  && S_ISREG(st.st_mode)
fstat            4255 io.c           		    fstat(fileno(fr), &st);
fstat            4291 io.c           		    fstat(fileno(fw), &st2);
fstat             289 random.c               if (fstat(fd, &statbuf) == 0 && S_ISCHR(statbuf.st_mode)) {
fstat              60 wince/sys/stat.h int fstat(int file, struct stat *sbuf);


ftello

ftello             59 io.c           #if !HAVE_FTELLO && !defined(ftello)
ftello            235 io.c           #define io_tell(fptr) ftello(flush_before_seek(fptr)->f)
ftello           3572 io.c               fseeko(fptr->f, ftello(orig->f), SEEK_SET);
ftello           3578 io.c           	fseeko(fptr->f2, ftello(orig->f2), SEEK_SET);


gai_strerror

gai_strerror      162 ext/socket/addrinfo.h extern char *gai_strerror __P((int));
gai_strerror      640 ext/socket/socket.c 	rb_raise(rb_eSocket, "getnameinfo: %s", gai_strerror(error));
gai_strerror      781 ext/socket/socket.c 	rb_raise(rb_eSocket, "getaddrinfo: %s", gai_strerror(error));
gai_strerror      850 ext/socket/socket.c 	rb_raise(rb_eSocket, "getnameinfo: %s", gai_strerror(error));
gai_strerror     2882 ext/socket/socket.c 	rb_raise(rb_eSocket, "getaddrinfo: %s", gai_strerror(error));
gai_strerror     3027 ext/socket/socket.c     rb_raise(rb_eSocket, "getaddrinfo: %s", gai_strerror(error));
gai_strerror     3031 ext/socket/socket.c     rb_raise(rb_eSocket, "getnameinfo: %s", gai_strerror(error));


garbage_collect

garbage_collect    91 gc.c           static void garbage_collect();
garbage_collect   119 gc.c           	garbage_collect();
garbage_collect   123 gc.c           	garbage_collect();
garbage_collect   160 gc.c           	garbage_collect();
garbage_collect   381 gc.c               if (!freelist) garbage_collect();
garbage_collect  1417 gc.c               garbage_collect();


gc_mark

gc_mark           559 gc.c           static void gc_mark _((VALUE ptr, int lev));
gc_mark           626 gc.c           	    gc_mark(v, 0);
gc_mark           648 gc.c               gc_mark(value, lev);
gc_mark           674 gc.c               gc_mark(key, lev);
gc_mark           675 gc.c               gc_mark(value, lev);
gc_mark           700 gc.c           	gc_mark(obj, 0);
gc_mark           738 gc.c               gc_mark(ptr, 0);
gc_mark           780 gc.c           	    gc_mark((VALUE)obj->as.node.u2.node, lev);
gc_mark           793 gc.c           	    gc_mark((VALUE)obj->as.node.u1.node, lev);
gc_mark           817 gc.c           	    gc_mark((VALUE)obj->as.node.u1.node, lev);
gc_mark           855 gc.c           	    gc_mark((VALUE)obj->as.node.u3.node, lev);
gc_mark           891 gc.c           		gc_mark((VALUE)obj->as.node.u1.node, lev);
gc_mark           894 gc.c           		gc_mark((VALUE)obj->as.node.u2.node, lev);
gc_mark           897 gc.c           		gc_mark((VALUE)obj->as.node.u3.node, lev);
gc_mark           903 gc.c               gc_mark(obj->as.basic.klass, lev);
gc_mark           923 gc.c           		gc_mark(*ptr++, lev);
gc_mark           964 gc.c           	gc_mark(obj->as.varmap.val, lev);
gc_mark           974 gc.c           		gc_mark(*vars++, lev);
gc_mark           985 gc.c           		gc_mark(*ptr++, lev);
gc_mark          1049 gc.c           		    gc_mark((VALUE)p, 0);
gc_mark          1267 gc.c               gc_mark((VALUE)frame->node, 0);
gc_mark          1343 gc.c               gc_mark((VALUE)ruby_scope, 0);
gc_mark          1344 gc.c               gc_mark((VALUE)ruby_dyna_vars, 0);


gc_mark_children

gc_mark_children  560 gc.c           static void gc_mark_children _((VALUE ptr, int lev));
gc_mark_children  574 gc.c           		gc_mark_children((VALUE)p, 0);
gc_mark_children  593 gc.c           	gc_mark_children(*p, 0);
gc_mark_children  731 gc.c               gc_mark_children(ptr, lev+1);


genrand_int32

genrand_int32     170 random.c           unsigned long a=genrand_int32()>>5, b=genrand_int32()>>6;
genrand_int32     364 random.c                   val |= genrand_int32() << (i * 32);
genrand_int32     402 random.c                   rnd = genrand_int32() & mask;


genrand_real

genrand_real      473 random.c                           return rb_float_new(genrand_real());
genrand_real      490 random.c       	return rb_float_new(genrand_real());


get2comp

get2comp           95 bignum.c           get2comp(x);
get2comp         1055 bignum.c           if (!RBIGNUM(x)->sign) get2comp(z);
get2comp         1060 bignum.c           if (RBIGNUM(x)->sign) get2comp(z);
get2comp         1652 bignum.c       	get2comp(y);
get2comp         1656 bignum.c       	get2comp(x);
get2comp         1681 bignum.c           if (!RBIGNUM(z)->sign) get2comp(z);
get2comp         1708 bignum.c       	get2comp(y);
get2comp         1712 bignum.c       	get2comp(x);
get2comp         1737 bignum.c           if (!RBIGNUM(z)->sign) get2comp(z);
get2comp         1766 bignum.c       	get2comp(y);
get2comp         1770 bignum.c       	get2comp(x);
get2comp         1797 bignum.c           if (!RBIGNUM(z)->sign) get2comp(z);
get2comp         1870 bignum.c       	get2comp(x);
get2comp         1885 bignum.c       	get2comp(z);
get2comp         1930 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          150 ext/socket/getaddrinfo.c static int get_addr __P((const char *, int, struct addrinfo **,
get_addr          528 ext/socket/getaddrinfo.c 	error = get_addr(hostname, pai->ai_family, &top, pai, port);


get_backtrace

get_backtrace    1180 eval.c         	errat = get_backtrace(ruby_errinfo);
get_backtrace    4468 eval.c         	at = get_backtrace(mesg);
get_backtrace    6354 eval.c         		errat = get_backtrace(ruby_errinfo);
get_backtrace    7533 eval.c             return get_backtrace(ruby_errinfo);
get_backtrace    10845 eval.c         	VALUE oldbt = get_backtrace(th->errinfo);


get_digest_base_metadata

get_digest_base_metadata   74 ext/digest/digest.c     algo = get_digest_base_metadata(klass);
get_digest_base_metadata   96 ext/digest/digest.c     algo = get_digest_base_metadata(klass);
get_digest_base_metadata  125 ext/digest/digest.c     algo = get_digest_base_metadata(klass);
get_digest_base_metadata  152 ext/digest/digest.c     algo = get_digest_base_metadata(rb_obj_class(copy));
get_digest_base_metadata  153 ext/digest/digest.c     if (algo != get_digest_base_metadata(rb_obj_class(obj))) {
get_digest_base_metadata  171 ext/digest/digest.c     algo = get_digest_base_metadata(rb_obj_class(self));
get_digest_base_metadata  204 ext/digest/digest.c     algo = get_digest_base_metadata(rb_obj_class(self));
get_digest_base_metadata  235 ext/digest/digest.c     algo = get_digest_base_metadata(rb_obj_class(self));
get_digest_base_metadata  265 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        133 ext/zlib/zlib.c static struct gzfile *get_gzfile _((VALUE));
get_gzfile       2367 ext/zlib/zlib.c     return get_gzfile(obj)->io;
get_gzfile       2377 ext/zlib/zlib.c     return rb_uint2inum(get_gzfile(obj)->crc);
get_gzfile       2387 ext/zlib/zlib.c     return rb_time_new(get_gzfile(obj)->mtime, (time_t)0);
get_gzfile       2397 ext/zlib/zlib.c     return INT2FIX(get_gzfile(obj)->level);
get_gzfile       2407 ext/zlib/zlib.c     return INT2FIX(get_gzfile(obj)->os_code);
get_gzfile       2418 ext/zlib/zlib.c     VALUE str = get_gzfile(obj)->orig_name;
get_gzfile       2434 ext/zlib/zlib.c     VALUE str = get_gzfile(obj)->comment;
get_gzfile       2449 ext/zlib/zlib.c     return INT2NUM(get_gzfile(obj)->lineno);
get_gzfile       2459 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       2471 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       2495 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       2518 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       2542 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       2559 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       2586 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       2597 ext/zlib/zlib.c     return (get_gzfile(obj)->z.flags & GZFILE_FLAG_SYNC) ? Qtrue : Qfalse;
get_gzfile       2611 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       2629 ext/zlib/zlib.c     return rb_uint2inum(get_gzfile(obj)->z.stream.total_in);
get_gzfile       2639 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       2743 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       2768 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       2784 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       2934 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       2961 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       2984 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       3030 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       3083 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);


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_inspect_tbl

get_inspect_tbl  1382 array.c            inspect_tbl = get_inspect_tbl(Qfalse);
get_inspect_tbl  1398 array.c            inspect_tbl = get_inspect_tbl(Qtrue);
get_inspect_tbl  1417 array.c            inspect_tbl = get_inspect_tbl(Qfalse);


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_name

get_name           10 ext/dl/sample/c++sample.C   const char * get_name();
get_name          147 ext/socket/getaddrinfo.c static int get_name __P((const char *, const struct afd *,
get_name          517 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          1309 string.c       static VALUE get_pat _((VALUE, int));
get_pat          1329 string.c           return rb_funcall(get_pat(re, 0), rb_intern("match"), 1, str);
get_pat          1966 string.c           pat = get_pat(argv[0], 1);
get_pat          2074 string.c           pat = get_pat(argv[0], 1);
get_pat          3508 string.c       	    spat = get_pat(spat, 1);
get_pat          4253 string.c           pat = get_pat(pat, 1);


get_pid

get_pid          3362 process.c          rb_define_virtual_variable("$$", get_pid, 0);
get_pid          3420 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          198 file.c         	time_t t1 = get_stat(self)->st_mtime;
get_stat          199 file.c         	time_t t2 = get_stat(other)->st_mtime;
get_stat          238 file.c             return INT2NUM(get_stat(self)->st_dev);
get_stat          257 file.c             long dev = get_stat(self)->st_dev;
get_stat          280 file.c             long dev = get_stat(self)->st_dev;
get_stat          303 file.c             return ULL2NUM(get_stat(self)->st_ino);
get_stat          305 file.c             return ULONG2NUM(get_stat(self)->st_ino);
get_stat          327 file.c             return UINT2NUM((unsigned short)(get_stat(self)->st_mode));
get_stat          329 file.c             return UINT2NUM(get_stat(self)->st_mode);
get_stat          349 file.c             return UINT2NUM(get_stat(self)->st_nlink);
get_stat          367 file.c             return UINT2NUM(get_stat(self)->st_uid);
get_stat          384 file.c             return UINT2NUM(get_stat(self)->st_gid);
get_stat          405 file.c             return ULONG2NUM(get_stat(self)->st_rdev);
get_stat          427 file.c             long rdev = get_stat(self)->st_rdev;
get_stat          450 file.c             long rdev = get_stat(self)->st_rdev;
get_stat          470 file.c             return OFFT2NUM(get_stat(self)->st_size);
get_stat          489 file.c             return ULONG2NUM(get_stat(self)->st_blksize);
get_stat          511 file.c             return ULONG2NUM(get_stat(self)->st_blocks);
get_stat          533 file.c             return rb_time_new(get_stat(self)->st_atime, 0);
get_stat          550 file.c             return rb_time_new(get_stat(self)->st_mtime, 0);
get_stat          569 file.c             return rb_time_new(get_stat(self)->st_ctime, 0);
get_stat         3522 file.c             return rb_file_ftype(get_stat(obj));
get_stat         3540 file.c             if (S_ISDIR(get_stat(obj)->st_mode)) return Qtrue;
get_stat         3557 file.c             if (S_ISFIFO(get_stat(obj)->st_mode)) return Qtrue;
get_stat         3585 file.c             if (S_ISLNK(get_stat(obj)->st_mode)) return Qtrue;
get_stat         3607 file.c             if (S_ISSOCK(get_stat(obj)->st_mode)) return Qtrue;
get_stat         3631 file.c             if (S_ISBLK(get_stat(obj)->st_mode)) return Qtrue;
get_stat         3653 file.c             if (S_ISCHR(get_stat(obj)->st_mode)) return Qtrue;
get_stat         3674 file.c             if (get_stat(obj)->st_uid == geteuid()) return Qtrue;
get_stat         3682 file.c             if (get_stat(obj)->st_uid == getuid()) return Qtrue;
get_stat         3703 file.c             if (get_stat(obj)->st_gid == getegid()) return Qtrue;
get_stat         3723 file.c             struct stat *st = get_stat(obj);
get_stat         3756 file.c             struct stat *st = get_stat(obj);
get_stat         3763 file.c             if (group_member(get_stat(obj)->st_gid))
get_stat         3787 file.c             struct stat *st = get_stat(obj);
get_stat         3818 file.c             struct stat *st = get_stat(obj);
get_stat         3825 file.c             if (group_member(get_stat(obj)->st_gid))
get_stat         3851 file.c             struct stat *st = get_stat(obj);
get_stat         3880 file.c             struct stat *st = get_stat(obj);
get_stat         3887 file.c             if (group_member(get_stat(obj)->st_gid))
get_stat         3911 file.c             if (S_ISREG(get_stat(obj)->st_mode)) return Qtrue;
get_stat         3930 file.c             if (get_stat(obj)->st_size == 0) return Qtrue;
get_stat         3949 file.c             off_t size = get_stat(obj)->st_size;
get_stat         3971 file.c             if (get_stat(obj)->st_mode & S_ISUID) return Qtrue;
get_stat         3993 file.c             if (get_stat(obj)->st_mode & S_ISGID) return Qtrue;
get_stat         4015 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          37 ext/stringio/stringio.c static struct StringIO* get_strio _((VALUE));
get_strio          99 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       927 ext/zlib/zlib.c     zstream_end(get_zstream(obj));
get_zstream       939 ext/zlib/zlib.c     zstream_reset(get_zstream(obj));
get_zstream       951 ext/zlib/zlib.c     struct zstream *z = get_zstream(obj);
get_zstream      1016 ext/zlib/zlib.c     struct zstream *z = get_zstream(obj);
get_zstream      1042 ext/zlib/zlib.c     return rb_uint2inum(get_zstream(obj)->stream.total_in);
get_zstream      1052 ext/zlib/zlib.c     return rb_uint2inum(get_zstream(obj)->stream.total_out);
get_zstream      1064 ext/zlib/zlib.c     return INT2FIX(get_zstream(obj)->stream.data_type);
get_zstream      1074 ext/zlib/zlib.c 	return rb_uint2inum(get_zstream(obj)->stream.adler);
get_zstream      1084 ext/zlib/zlib.c     return ZSTREAM_IS_FINISHED(get_zstream(obj)) ? Qtrue : Qfalse;
get_zstream      1167 ext/zlib/zlib.c     struct zstream *z1 = get_zstream(self);
get_zstream      1168 ext/zlib/zlib.c     struct zstream *z2 = get_zstream(orig);
get_zstream      1276 ext/zlib/zlib.c     struct zstream *z = get_zstream(obj);
get_zstream      1300 ext/zlib/zlib.c     do_deflate(get_zstream(obj), src, Z_NO_FLUSH);
get_zstream      1319 ext/zlib/zlib.c     struct zstream *z = get_zstream(obj);
get_zstream      1347 ext/zlib/zlib.c     struct zstream *z = get_zstream(obj);
get_zstream      1382 ext/zlib/zlib.c     struct zstream *z = get_zstream(obj);
get_zstream      1533 ext/zlib/zlib.c     struct zstream *z = get_zstream(obj);
get_zstream      1571 ext/zlib/zlib.c     struct zstream *z = get_zstream(obj);
get_zstream      1603 ext/zlib/zlib.c     struct zstream *z = get_zstream(obj);
get_zstream      1621 ext/zlib/zlib.c     struct zstream *z = get_zstream(obj);
get_zstream      1644 ext/zlib/zlib.c     struct zstream *z = get_zstream(obj);


getaddrinfo

getaddrinfo       143 ext/socket/addrinfo.h extern int getaddrinfo __P((
getaddrinfo       153 ext/socket/socket.c 	return getaddrinfo(nodename, servname, hints, res);
getaddrinfo       160 ext/socket/socket.c 	error = getaddrinfo(nodename, servname, &tmp_hints, res);
getaddrinfo       184 ext/socket/socket.c     int error = getaddrinfo(nodename, servname, hints, res);
getaddrinfo       776 ext/socket/socket.c     error = getaddrinfo(hostp, portp, &hints, &res);
getaddrinfo      2880 ext/socket/socket.c     error = getaddrinfo(hptr, pptr, &hints, &res);
getaddrinfo      2996 ext/socket/socket.c 	error = getaddrinfo(hptr, pptr, &hints, &res);


getc

getc             1756 ext/nkf/nkf-utf8/nkf.c     return getc(f);
getc              817 io.c               ch = getc(fptr->f);
getc             1031 io.c               for (n = 0; n < len && READ_DATA_PENDING(f) && (c = getc(f)) != EOF; ++n) {
getc             1059 io.c           	c = getc(fptr->f);
getc             1427 io.c           	c = getc(f);
getc             1505 io.c           	c = getc(f);
getc             1870 io.c           	c = getc(f);
getc             1915 io.c               c = getc(f);
getc             1941 io.c               c = getc(f);
getc              105 win32/win32.h  #define fgetc(_stream)		getc(_stream)


getchar

getchar          1421 ext/bigdecimal/bigdecimal.c             getchar();
getchar          1425 ext/bigdecimal/bigdecimal.c             getchar();
getchar           109 win32/win32.h  #define fgetchar()		getchar()


getcwd

getcwd            645 util.c             while (!getcwd(buf, size)) {
getcwd           2567 win32/win32.c      if (getcwd(buffer, size) == NULL) {
getcwd            499 win32/win32.h  #ifdef getcwd
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           880 file.c             else if (getegid() == st.st_gid || group_member(st.st_gid))
getegid          1322 file.c             if (st.st_gid == getegid()) return Qtrue;
getegid          3703 file.c             if (get_stat(obj)->st_gid == getegid()) return Qtrue;
getegid          2389 process.c      	if (getegid() == gid) {
getegid          2675 process.c      		      (getegid() == gid)? -1: gid,
getegid          2681 process.c      			 (getegid() == gid)? -1: gid) < 0) rb_sys_fail(0);
getegid          2683 process.c      	    if (setregid(gid, (getegid() == gid)? -1: gid) < 0) rb_sys_fail(0);
getegid          2685 process.c      	} else if (/* getgid() == gid && */ getegid() != gid) {
getegid          2686 process.c      	    if (setregid(getegid(), gid) < 0) rb_sys_fail(0);
getegid          2697 process.c      	    if (getegid() != gid && setegid(gid) < 0) rb_sys_fail(0);
getegid          2699 process.c      	} else if (/* SAVED_GROUP_ID != gid && */ getegid() == gid) {
getegid          2875 process.c          int egid = getegid();
getegid          3074 process.c          egid = getegid();
getegid          3253 process.c          egid = getegid();
getegid          3293 process.c          egid = getegid();
getegid          3460 process.c          SAVED_GROUP_ID = getegid();
getegid          1095 ruby.c             egid = (int)getegid();
getegid           303 win32/win32.h  extern rb_gid_t  getegid (void);


getenv

getenv             55 dir.c          char *getenv();
getenv            639 dir.c          	const char *dist = getenv("HOME");
getenv            641 dir.c          	    dist = getenv("LOGDIR");
getenv             73 dln.c          char *getenv();
getenv            975 dln.c              path = getenv("DLN_LIBRARY_PATH");
getenv           1658 dln.c          	path = getenv(PATH_ENV);
getenv           1775 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            296 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           2469 file.c         	    char *dir = getenv("HOME");
getenv           1659 hash.c             val = getenv(nam);
getenv           1699 hash.c             env = getenv(nam);
getenv           1736 hash.c             env = getenv(nam);
getenv           1764 hash.c         	path_tainted_p(getenv(PATH_ENV));
getenv           2218 hash.c             if (getenv(s)) return Qtrue;
getenv           2286 hash.c         	    RARRAY(indexes)->ptr[i] = env_str_new2(getenv(RSTRING(tmp)->ptr));
getenv           2329 hash.c         	    VALUE val = env_str_new2(getenv(RSTRING(key)->ptr));
getenv             38 missing/os2.c      if ((shell = getenv("RUBYSHELL")) != NULL && *shell != '\0') {
getenv             47 missing/os2.c      } else if ((shell = getenv("SHELL")) != NULL && *shell != '\0') {
getenv             56 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            125 ruby.c         	newp = getenv("RUBYLIB_PREFIX");
getenv            287 ruby.c         	ruby_incpush(getenv("RUBYLIB"));
getenv            731 ruby.c             if (rb_safe_level() == 0 && (s = getenv("RUBYOPT"))) {
getenv            785 ruby.c         		char *path = getenv("RUBYPATH");
getenv            792 ruby.c         		    script = dln_find_file(argv[0], getenv(PATH_ENV));
getenv            924 win32/win32.c  	if ((shell = getenv("RUBYSHELL")) && (redir = has_redirection(cmd))) {
getenv            929 win32/win32.c  	else if ((shell = getenv("COMSPEC")) &&
getenv            504 win32/win32.h  #ifdef getenv
getenv            108 wince/wince.h  char *getenv(const char *charstuff);


geteuid

geteuid           863 file.c             euid = geteuid();
geteuid          1290 file.c             if (st.st_uid == geteuid()) return Qtrue;
geteuid          3674 file.c             if (get_stat(obj)->st_uid == geteuid()) return Qtrue;
geteuid          2017 process.c      	if (geteuid() == uid) {
geteuid          2067 process.c          if (geteuid() == 0) { /* root-user */
geteuid          2124 process.c      		      (geteuid() == uid)? -1: uid,
geteuid          2130 process.c      			 (geteuid() == uid)? -1: uid) < 0) rb_sys_fail(0);
geteuid          2132 process.c      	    if (setreuid(uid, (geteuid() == uid)? -1: uid) < 0) rb_sys_fail(0);
geteuid          2134 process.c      	} else if (/* getuid() == uid && */ geteuid() != uid) {
geteuid          2135 process.c      	    if (setreuid(geteuid(), uid) < 0) rb_sys_fail(0);
geteuid          2146 process.c      	    if (geteuid() != uid && seteuid(uid) < 0) rb_sys_fail(0);
geteuid          2148 process.c      	} else if (/* SAVED_USER_ID != uid && */ geteuid() == uid) {
geteuid          2617 process.c          if (geteuid() == 0) { /* root-user */
geteuid          2763 process.c          int euid = geteuid();
geteuid          2828 process.c          if (geteuid() == 0) rb_sys_fail(0);
geteuid          2942 process.c          if (geteuid() == 0 /* root user */) rb_sys_fail(0);
geteuid          3016 process.c          euid = geteuid();
geteuid          3142 process.c          euid = geteuid();
geteuid          3183 process.c          euid = geteuid();
geteuid          3459 process.c          SAVED_USER_ID = geteuid();
geteuid          1093 ruby.c             euid = (int)geteuid();
geteuid           301 win32/win32.h  extern rb_uid_t  geteuid (void);


getgid

getgid            388 ext/pty/pty.c  		chown(SlaveName, getuid(), getgid());
getgid            823 file.c             if (getgid() ==  gid)
getgid           2362 process.c          int gid = getgid();
getgid           2625 process.c      	if (getgid() == gid) {
getgid           2647 process.c      	if (getgid() == gid) {
getgid           2674 process.c      	if (setresgid((getgid() == gid)? -1: gid,
getgid           2680 process.c      	    if (setregid((getgid() == gid)? -1: gid,
getgid           2682 process.c      	} else if (getgid() != gid) {
getgid           2698 process.c      	    if (getgid() != gid && setrgid(gid) < 0) rb_sys_fail(0);
getgid           2700 process.c      	    if (getgid() != gid) {
getgid           2708 process.c      	} else if (/* getegid() != gid && */ getgid() == gid) {
getgid           2718 process.c      	if (getgid() == gid) {
getgid           2727 process.c      	if (getgid() == gid && SAVED_GROUP_ID == gid) {
getgid           2734 process.c      	if (getgid() == gid && SAVED_GROUP_ID == gid) {
getgid           2903 process.c          if (egid == getgid()) {
getgid           2923 process.c          gid = getgid();
getgid           3073 process.c          gid = getgid();
getgid           3252 process.c          gid = getgid();
getgid           3292 process.c          gid = getgid();
getgid           1094 ruby.c             gid = (int)getgid();
getgid            302 win32/win32.h  extern rb_gid_t  getgid (void);


gethostbyaddr

gethostbyaddr     565 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    2759 ext/socket/socket.c     h = gethostbyaddr(RSTRING(addr)->ptr, RSTRING(addr)->len, t);
gethostbyaddr    2272 win32/win32.c  	r = gethostbyaddr(addr, len, type);
gethostbyaddr     459 win32/win32.h  #ifdef gethostbyaddr


gethostbyname

gethostbyname     617 ext/socket/getaddrinfo.c 	hp = gethostbyname((char*)hostname);
gethostbyname    1239 ext/socket/socket.c     if (addr->ai_canonname && (h = gethostbyname(addr->ai_canonname))) {
gethostbyname    2289 win32/win32.c  	r = gethostbyname(name);
gethostbyname     464 win32/win32.h  #ifdef gethostbyname


gethostname

gethostname      2652 ext/socket/socket.c     if (gethostname(buf, (int)sizeof buf - 1) < 0)
gethostname      2306 win32/win32.c  	r = gethostname(name, len);
gethostname       469 win32/win32.h  #ifdef gethostname


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       638 ext/socket/socket.c     error = getnameinfo(addr, SA_LEN(addr), buf, len, NULL, 0, NI_NUMERICHOST);
getnameinfo       841 ext/socket/socket.c 	error = getnameinfo(sockaddr, SA_LEN(sockaddr), hbuf, sizeof(hbuf),
getnameinfo       847 ext/socket/socket.c     error = getnameinfo(sockaddr, SA_LEN(sockaddr), hbuf, sizeof(hbuf),
getnameinfo      3005 ext/socket/socket.c     error = getnameinfo(sap, SA_LEN(sap), hbuf, sizeof(hbuf),
getnameinfo      3013 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       474 ext/socket/socket.c     if (getpeername(fileno(fptr->f), (struct sockaddr*)buf, &len) < 0)
getpeername      1462 ext/socket/socket.c     if (getpeername(fileno(fptr->f), (struct sockaddr*)&addr, &len) < 0)
getpeername      1913 ext/socket/socket.c     if (getpeername(fileno(fptr->f), (struct sockaddr*)&addr, &len) < 0)
getpeername      2061 win32/win32.c  	r = getpeername(TO_SOCKET(s), addr, addrlen);
getpeername       399 win32/win32.h  #ifdef getpeername


getpid

getpid            226 ext/pty/pty.c      currentPid = getpid();
getpid            234 ext/pty/pty.c  	currentPid = getpid();
getpid            128 process.c          return INT2FIX(getpid());
getpid           1730 process.c        pid = getpid();
getpid            299 random.c           seed[2] ^= getpid() ^ (n++ << 16);
getpid           3378 win32/win32.c      pid = getpid();


getprotobyname

getprotobyname   2323 win32/win32.c  	r = getprotobyname(name);
getprotobyname    474 win32/win32.h  #ifdef getprotobyname
getprotobyname    321 wince/winsock2.c 	pe1 = *getprotobyname("UDP");


getprotobynumber

getprotobynumber 2340 win32/win32.c  	r = getprotobynumber(num);
getprotobynumber  479 win32/win32.h  #ifdef getprotobynumber


getservbyname

getservbyname     408 ext/socket/getaddrinfo.c 			if ((sp = getservbyname((char*)servname, proto)) == NULL)
getservbyname    2803 ext/socket/socket.c     sp = getservbyname(StringValueCStr(service),  StringValueCStr(proto));
getservbyname    2357 win32/win32.c  	r = getservbyname(name, proto);
getservbyname     484 win32/win32.h  #ifdef getservbyname


getservbyport

getservbyport     191 ext/socket/getnameinfo.c 		sp = getservbyport(port, (flags & NI_DGRAM) ? "udp" : "tcp");
getservbyport    2374 win32/win32.c  	r = getservbyport(port, proto);
getservbyport     489 win32/win32.h  #ifdef getservbyport
getservbyport     330 wince/winsock2.c 	se1 = *getservbyport(0x1327, "tcp");


getsockname

getsockname       460 ext/socket/socket.c     if (getsockname(fileno(fptr->f), (struct sockaddr*)buf, &len) < 0)
getsockname      1447 ext/socket/socket.c     if (getsockname(fileno(fptr->f), (struct sockaddr*)&addr, &len) < 0)
getsockname      1630 ext/socket/socket.c 	if (getsockname(fileno(fptr->f), (struct sockaddr*)&addr, &len) < 0)
getsockname      1896 ext/socket/socket.c     if (getsockname(fileno(fptr->f), (struct sockaddr*)&addr, &len) < 0)
getsockname      2078 win32/win32.c  	r = getsockname(TO_SOCKET(s), addr, addrlen);
getsockname       404 win32/win32.h  #ifdef getsockname


getsockopt

getsockopt        442 ext/socket/socket.c     if (getsockopt(fileno(fptr->f), level, option, buf, &len) < 0)
getsockopt        901 ext/socket/socket.c 	    if (getsockopt(fd, SOL_SOCKET, SO_ERROR, (void *)&sockerr,
getsockopt        983 ext/socket/socket.c 		status = getsockopt(fd, SOL_SOCKET, SO_ERROR, (void *)&sockerr, &sockerrlen);
getsockopt       1013 ext/socket/socket.c 		    status = getsockopt(fd, SOL_SOCKET, SO_ERROR, (void *)&sockerr, &sockerrlen);
getsockopt       1658 win32/win32.c  	retval = getsockopt(fd, SOL_SOCKET, SO_TYPE, sockbuf, &optlen);
getsockopt       2093 win32/win32.c  	r = getsockopt(TO_SOCKET(s), level, optname, optval, optlen);
getsockopt        409 win32/win32.h  #ifdef getsockopt


gettable

gettable          256 parse.c        static NODE *gettable();
gettable         3882 parse.c        				yyval.node = NEW_OP_ASGN_OR(gettable(vid), yyvsp[-2].node);
gettable         3889 parse.c        				yyval.node = NEW_OP_ASGN_AND(gettable(vid), yyvsp[-2].node);
gettable         3893 parse.c        				yyval.node->nd_value = call_op(gettable(vid),yyvsp[-1].id,1,yyvsp[0].node);
gettable         4498 parse.c        				yyval.node = NEW_OP_ASGN_OR(gettable(vid), yyvsp[-2].node);
gettable         4505 parse.c        				yyval.node = NEW_OP_ASGN_AND(gettable(vid), yyvsp[-2].node);
gettable         4509 parse.c        				yyval.node->nd_value = call_op(gettable(vid),yyvsp[-1].id,1,yyvsp[0].node);
gettable         5966 parse.c        			yyval.node = gettable(yyvsp[0].id);
gettable          159 parse.y        static NODE *gettable();
gettable          521 parse.y        				$$ = NEW_OP_ASGN_OR(gettable(vid), $1);
gettable          528 parse.y        				$$ = NEW_OP_ASGN_AND(gettable(vid), $1);
gettable          532 parse.y        				$$->nd_value = call_op(gettable(vid),$2,1,$3);
gettable          985 parse.y        				$$ = NEW_OP_ASGN_OR(gettable(vid), $1);
gettable          992 parse.y        				$$ = NEW_OP_ASGN_AND(gettable(vid), $1);
gettable          996 parse.y        				$$->nd_value = call_op(gettable(vid),$2,1,$3);
gettable         2199 parse.y        			$$ = gettable($1);


gettimeofday

gettimeofday     9885 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      296 random.c           gettimeofday(&tv, 0);
gettimeofday      102 time.c             if (gettimeofday(&tobj->tv, 0) < 0) {
gettimeofday      204 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           1301 file.c             if (st.st_uid == getuid()) return Qtrue;
getuid           3682 file.c             if (get_stat(obj)->st_uid == getuid()) return Qtrue;
getuid           1989 process.c          int uid = getuid();
getuid           2075 process.c      	if (getuid() == uid) {
getuid           2097 process.c      	if (getuid() == uid) {
getuid           2123 process.c      	if (setresuid((getuid() == uid)? -1: uid,
getuid           2129 process.c      	    if (setreuid((getuid() == uid)? -1: uid,
getuid           2131 process.c      	} else if (getuid() != uid) {
getuid           2147 process.c      	    if (getuid() != uid && setruid(uid) < 0) rb_sys_fail(0);
getuid           2149 process.c      	    if (getuid() != uid) {
getuid           2157 process.c      	} else if (/* geteuid() != uid && */ getuid() == uid) {
getuid           2167 process.c      	if (getuid() == uid) {
getuid           2176 process.c      	if (getuid() == uid && SAVED_USER_ID == uid) {
getuid           2183 process.c      	if (getuid() == uid && SAVED_USER_ID == uid) {
getuid           2789 process.c          if (euid == getuid()) {
getuid           2809 process.c          uid = getuid();
getuid           3015 process.c          uid = getuid();
getuid           3141 process.c          uid = getuid();
getuid           3182 process.c          uid = getuid();
getuid           1092 ruby.c             uid = (int)getuid();
getuid            300 win32/win32.h  extern rb_uid_t  getuid (void);


glob_call_func

glob_call_func    942 dir.c          	    status = glob_call_func(func, path, arg);
glob_call_func   1035 dir.c          			status = glob_call_func(func, buf, arg);


glob_func_caller

glob_func_caller  890 dir.c          static VALUE glob_func_caller _((VALUE));
glob_func_caller 1114 dir.c              rb_protect(glob_func_caller, a, &status);


glob_helper

glob_helper       904 dir.c          static int glob_helper _((const char *path, const char *sub, int flags, int (*func)(const char *,VALUE), VALUE arg));
glob_helper       985 dir.c          		    status = glob_helper(buf, buf+n, flags, func, arg);
glob_helper      1025 dir.c          			status = glob_helper(buf, t, flags, func, arg);
glob_helper      1061 dir.c          				status = glob_helper(buf, buf+len, flags, func, arg);
glob_helper      1090 dir.c              return glob_helper(path, 0, flags & ~GLOB_VERBOSE, func, arg);
glob_helper      1100 dir.c              return glob_helper(path, 0, flags | FNM_CASEFOLD, func, arg);
glob_helper      1130 dir.c              return glob_helper(path, 0, flags | GLOB_VERBOSE, rb_glob_caller, (VALUE)&args);


global_id

global_id         501 variable.c         ID id = global_id(name);
global_id         736 variable.c         entry = rb_global_entry(global_id(name));
global_id         746 variable.c         entry = rb_global_entry(global_id(name));


gmtime

gmtime            511 time.c             tm = (utc_p ? gmtime : localtime)(&guess);
gmtime            524 time.c                     (tm = (utc_p ? gmtime : localtime)(&guess)) != NULL) {
gmtime            534 time.c             tm = (utc_p ? gmtime : localtime)(&guess_lo);
gmtime            541 time.c             tm = (utc_p ? gmtime : localtime)(&guess_hi);
gmtime            638 time.c               tm = (utc_p ? gmtime : localtime)(&guess);
gmtime            756 time.c                 if ((tmp = gmtime(&t)) &&
gmtime           1136 time.c             tm_tmp = gmtime(&t);
gmtime           1686 time.c         	u = gmtime(&t);
gmtime           1897 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      880 file.c             else if (getegid() == st.st_gid || group_member(st.st_gid))
group_member     3763 file.c             if (group_member(get_stat(obj)->st_gid))
group_member     3825 file.c             if (group_member(get_stat(obj)->st_gid))
group_member     3887 file.c             if (group_member(get_stat(obj)->st_gid))


gzfile_calc_crc

gzfile_calc_crc   124 ext/zlib/zlib.c static void gzfile_calc_crc _((struct gzfile*, VALUE));
gzfile_calc_crc  2147 ext/zlib/zlib.c     gzfile_calc_crc(gz, dst);
gzfile_calc_crc  2170 ext/zlib/zlib.c     gzfile_calc_crc(gz, dst);
gzfile_calc_crc  3053 ext/zlib/zlib.c 	    gzfile_calc_crc(gz, str);
gzfile_calc_crc  3064 ext/zlib/zlib.c     gzfile_calc_crc(gz, str);


gzfile_check_footer

gzfile_check_footer  121 ext/zlib/zlib.c static void gzfile_check_footer _((struct gzfile*));
gzfile_check_footer 2141 ext/zlib/zlib.c 	    gzfile_check_footer(gz);
gzfile_check_footer 2164 ext/zlib/zlib.c 	    gzfile_check_footer(gz);
gzfile_check_footer 2239 ext/zlib/zlib.c 	gzfile_check_footer(gz);
gzfile_check_footer 2269 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     2313 ext/zlib/zlib.c 	gzfile_close(gz, 1);
gzfile_close     2546 ext/zlib/zlib.c     gzfile_close(gz, 1);
gzfile_close     2563 ext/zlib/zlib.c     gzfile_close(gz, 0);


gzfile_ensure_close

gzfile_ensure_close  134 ext/zlib/zlib.c static VALUE gzfile_ensure_close _((VALUE));
gzfile_ensure_close 2330 ext/zlib/zlib.c 	return rb_ensure(rb_yield, obj, gzfile_ensure_close, obj);


gzfile_finalize

gzfile_finalize   128 ext/zlib/zlib.c static VALUE gzfile_finalize _((VALUE));
gzfile_finalize  2217 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      1766 ext/zlib/zlib.c     obj = Data_Make_Struct(klass, struct gzfile, gzfile_mark, gzfile_free, gz);


gzfile_get16

gzfile_get16      115 ext/zlib/zlib.c static unsigned int gzfile_get16 _((const unsigned char*));
gzfile_get16     2017 ext/zlib/zlib.c 	len = gzfile_get16(RSTRING(gz->z.input)->ptr);


gzfile_get32

gzfile_get32      116 ext/zlib/zlib.c static unsigned long gzfile_get32 _((const unsigned char*));
gzfile_get32     2009 ext/zlib/zlib.c     gz->mtime = gzfile_get32(&head[4]);
gzfile_get32     2055 ext/zlib/zlib.c     crc = gzfile_get32(RSTRING(gz->z.input)->ptr);
gzfile_get32     2056 ext/zlib/zlib.c     length = gzfile_get32(RSTRING(gz->z.input)->ptr + 4);


gzfile_make_footer

gzfile_make_footer  119 ext/zlib/zlib.c static void gzfile_make_footer _((struct gzfile*));
gzfile_make_footer 2208 ext/zlib/zlib.c     gzfile_make_footer(gz);


gzfile_make_header

gzfile_make_header  118 ext/zlib/zlib.c static void gzfile_make_header _((struct gzfile*));
gzfile_make_header 2076 ext/zlib/zlib.c 	gzfile_make_header(gz);
gzfile_make_header 2204 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      1766 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       1782 ext/zlib/zlib.c #define gzfile_writer_new(gz) gzfile_new((gz),&deflate_funcs,gzfile_writer_end)
gzfile_new       1783 ext/zlib/zlib.c #define gzfile_reader_new(gz) gzfile_new((gz),&inflate_funcs,gzfile_reader_end)


gzfile_read

gzfile_read       125 ext/zlib/zlib.c static VALUE gzfile_read _((struct gzfile*, int));
gzfile_read      2974 ext/zlib/zlib.c     return gzfile_read(gz, len);
gzfile_read      2987 ext/zlib/zlib.c     dst = gzfile_read(gz, 1);
gzfile_read      3123 ext/zlib/zlib.c 	    return gzfile_read(gz, rslen);
gzfile_read      3149 ext/zlib/zlib.c     dst = gzfile_read(gz, n);


gzfile_read_all

gzfile_read_all   126 ext/zlib/zlib.c static VALUE gzfile_read_all _((struct gzfile*));
gzfile_read_all  2967 ext/zlib/zlib.c 	return gzfile_read_all(gz);
gzfile_read_all  3101 ext/zlib/zlib.c 	dst = gzfile_read_all(gz);


gzfile_read_header

gzfile_read_header  120 ext/zlib/zlib.c static void gzfile_read_header _((struct gzfile*));
gzfile_read_header 2921 ext/zlib/zlib.c     gzfile_read_header(gz);


gzfile_read_more

gzfile_read_more  123 ext/zlib/zlib.c static long gzfile_read_more _((struct gzfile*));
gzfile_read_more 2137 ext/zlib/zlib.c 	gzfile_read_more(gz);
gzfile_read_more 2160 ext/zlib/zlib.c 	gzfile_read_more(gz);
gzfile_read_more 3045 ext/zlib/zlib.c 	gzfile_read_more(gz);
gzfile_read_more 3056 ext/zlib/zlib.c 		gzfile_read_more(gz);
gzfile_read_more 3125 ext/zlib/zlib.c 	gzfile_read_more(gz);
gzfile_read_more 3133 ext/zlib/zlib.c 	    gzfile_read_more(gz);


gzfile_read_raw

gzfile_read_raw   112 ext/zlib/zlib.c static VALUE gzfile_read_raw _((struct gzfile*));
gzfile_read_raw  1848 ext/zlib/zlib.c 	str = gzfile_read_raw(gz);
gzfile_read_raw  1867 ext/zlib/zlib.c 	str = gzfile_read_raw(gz);
gzfile_read_raw  2094 ext/zlib/zlib.c 	str = gzfile_read_raw(gz);


gzfile_read_raw_ensure

gzfile_read_raw_ensure  113 ext/zlib/zlib.c static int gzfile_read_raw_ensure _((struct gzfile*, int));
gzfile_read_raw_ensure 1975 ext/zlib/zlib.c     if (!gzfile_read_raw_ensure(gz, 10)) {  /* 10 is the size of gzip header */
gzfile_read_raw_ensure 2014 ext/zlib/zlib.c 	if (!gzfile_read_raw_ensure(gz, 2)) {
gzfile_read_raw_ensure 2018 ext/zlib/zlib.c 	if (!gzfile_read_raw_ensure(gz, 2 + len)) {
gzfile_read_raw_ensure 2051 ext/zlib/zlib.c     if (!gzfile_read_raw_ensure(gz, 8)) { /* 8 is the size of gzip footer */


gzfile_read_raw_until_zero

gzfile_read_raw_until_zero  114 ext/zlib/zlib.c static char *gzfile_read_raw_until_zero _((struct gzfile*, long));
gzfile_read_raw_until_zero 2024 ext/zlib/zlib.c 	p = gzfile_read_raw_until_zero(gz, 0);
gzfile_read_raw_until_zero 2031 ext/zlib/zlib.c 	p = gzfile_read_raw_until_zero(gz, 0);


gzfile_reader_end

gzfile_reader_end  130 ext/zlib/zlib.c static void gzfile_reader_end _((struct gzfile*));
gzfile_reader_end 1783 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  132 ext/zlib/zlib.c static VALUE gzfile_reader_get_unused _((struct gzfile*));
gzfile_reader_get_unused 2949 ext/zlib/zlib.c     return gzfile_reader_get_unused(gz);


gzfile_reader_rewind

gzfile_reader_rewind  131 ext/zlib/zlib.c static void gzfile_reader_rewind _((struct gzfile*));
gzfile_reader_rewind 2935 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     2257 ext/zlib/zlib.c     gzfile_reset(gz);


gzfile_s_open

gzfile_s_open     136 ext/zlib/zlib.c static VALUE gzfile_s_open _((int, VALUE*, VALUE, const char*));
gzfile_s_open    2693 ext/zlib/zlib.c     return gzfile_s_open(argc, argv, klass, "wb");
gzfile_s_open    2892 ext/zlib/zlib.c     return gzfile_s_open(argc, argv, klass, "rb");


gzfile_set32

gzfile_set32      117 ext/zlib/zlib.c static void gzfile_set32 _((unsigned long n, unsigned char*));
gzfile_set32     1938 ext/zlib/zlib.c     gzfile_set32(gz->mtime, &buf[4]);
gzfile_set32     1961 ext/zlib/zlib.c     gzfile_set32(gz->crc, buf);
gzfile_set32     1962 ext/zlib/zlib.c     gzfile_set32(gz->z.stream.total_in, &buf[4]);


gzfile_ungetc

gzfile_ungetc     127 ext/zlib/zlib.c static void gzfile_ungetc _((struct gzfile*, int));
gzfile_ungetc    3031 ext/zlib/zlib.c     gzfile_ungetc(gz, NUM2CHR(ch));


gzfile_write

gzfile_write      122 ext/zlib/zlib.c static void gzfile_write _((struct gzfile*, Bytef*, uInt));
gzfile_write     2773 ext/zlib/zlib.c     gzfile_write(gz, RSTRING(str)->ptr, RSTRING(str)->len);
gzfile_write     2787 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 2084 ext/zlib/zlib.c     gzfile_write_raw(gz);
gzfile_write_raw 2190 ext/zlib/zlib.c     gzfile_write_raw(gz);
gzfile_write_raw 2225 ext/zlib/zlib.c     gzfile_write_raw(gz);
gzfile_write_raw 2754 ext/zlib/zlib.c     gzfile_write_raw(gz);


gzfile_writer_end

gzfile_writer_end  129 ext/zlib/zlib.c static void gzfile_writer_end _((struct gzfile*));
gzfile_writer_end 1782 ext/zlib/zlib.c #define gzfile_writer_new(gz) gzfile_new((gz),&deflate_funcs,gzfile_writer_end)


gzreader_gets

gzreader_gets     177 ext/zlib/zlib.c static VALUE gzreader_gets _((int, VALUE*, VALUE));
gzreader_gets    3167 ext/zlib/zlib.c     dst = gzreader_gets(argc, argv, obj);
gzreader_gets    3201 ext/zlib/zlib.c     while (!NIL_P(str = gzreader_gets(argc, argv, obj))) {
gzreader_gets    3218 ext/zlib/zlib.c     while (!NIL_P(str = gzreader_gets(argc, argv, obj))) {


gzreader_skip_linebreaks

gzreader_skip_linebreaks  176 ext/zlib/zlib.c static void gzreader_skip_linebreaks _((struct gzfile*));
gzreader_skip_linebreaks 3117 ext/zlib/zlib.c 	gzreader_skip_linebreaks(gz);
gzreader_skip_linebreaks 3151 ext/zlib/zlib.c 	gzreader_skip_linebreaks(gz);


h_conv

h_conv            291 ext/nkf/nkf-utf8/nkf.c STATIC  int     h_conv PROTO((FILE *f,int c2,int c1));
h_conv           1921 ext/nkf/nkf-utf8/nkf.c                     if (h_conv(f, c2, c1)==EOF)


handle_rescue

handle_rescue    2445 eval.c         static int handle_rescue _((VALUE,NODE*));
handle_rescue    3217 eval.c         		    if (handle_rescue(self, resq)) {


has_drive_letter

has_drive_letter 2351 file.c             if (has_drive_letter(path)) path += 2;
has_drive_letter 2388 file.c             if (has_drive_letter(path))
has_drive_letter 2515 file.c             else if (has_drive_letter(s)) {
has_drive_letter 2530 file.c         		if (has_drive_letter(p) && TOLOWER(p[0]) == TOLOWER(s[0])) {
has_drive_letter 2828 file.c             if (has_drive_letter(name) && isdirsep(*(name + 2))) {
has_drive_letter 2836 file.c             if (has_drive_letter(name) && root == name + 2 && p - name == 2)
has_drive_letter 4035 file.c             if (has_drive_letter(path) && isdirsep(path[2])) return 1;


has_magic

has_magic         921 dir.c              if (!has_magic(p, 0, flags)) {
has_magic         956 dir.c          	if (has_magic(p, m, flags)) {


has_redirection

has_redirection    87 win32/win32.c  static bool has_redirection(const char *);
has_redirection   924 win32/win32.c  	if ((shell = getenv("RUBYSHELL")) && (redir = has_redirection(cmd))) {
has_redirection   930 win32/win32.c  		 ((redir < 0 ? has_redirection(cmd) : redir) ||


hash

hash             2611 array.c            VALUE hash = rb_hash_new();
hash             2615 array.c        	rb_hash_aset(hash, RARRAY(ary1)->ptr[i], Qtrue);
hash             2619 array.c        	    rb_hash_aset(hash, RARRAY(ary2)->ptr[i], Qtrue);
hash             2622 array.c            return hash;
hash             2642 array.c            volatile VALUE hash;
hash             2645 array.c            hash = ary_make_hash(to_ary(ary2), 0);
hash             2649 array.c        	if (st_lookup(RHASH(hash)->tbl, RARRAY(ary1)->ptr[i], 0)) continue;
hash             2670 array.c            VALUE hash, ary3, v, vv;
hash             2676 array.c            hash = ary_make_hash(ary2, 0);
hash             2680 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
hash             2703 array.c            VALUE hash, ary3;
hash             2709 array.c            hash = ary_make_hash(ary1, ary2);
hash             2713 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
hash             2719 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
hash             2744 array.c            VALUE hash, v, vv;
hash             2747 array.c            hash = ary_make_hash(ary, 0);
hash             2749 array.c            if (RARRAY(ary)->len == RHASH(hash)->tbl->num_entries) {
hash             2754 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
hash             3693 eval.c         	    VALUE hash = rb_hash_new();
hash             3704 eval.c         		rb_hash_aset(hash, key, val);
hash             3706 eval.c         	    result = hash;
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              449 ext/dbm/dbm.c      VALUE hash = rb_hash_new();
hash              456 ext/dbm/dbm.c  	rb_hash_aset(hash, valstr, keystr);
hash              458 ext/dbm/dbm.c      return hash;
hash              736 ext/dbm/dbm.c      VALUE hash;
hash              739 ext/dbm/dbm.c      hash = rb_hash_new();
hash              742 ext/dbm/dbm.c  	rb_hash_aset(hash, rb_tainted_str_new(key.dptr, key.dsize),
hash              746 ext/dbm/dbm.c      return hash;
hash               22 ext/dl/ptr.c     return rb_funcall(hash, rb_intern("delete"), 1, key);
hash              552 ext/gdbm/gdbm.c     VALUE hash = rb_hash_new();
hash              559 ext/gdbm/gdbm.c 	rb_hash_aset(hash, valstr, keystr);
hash              561 ext/gdbm/gdbm.c     return hash;
hash              926 ext/gdbm/gdbm.c     VALUE keystr, hash;
hash              929 ext/gdbm/gdbm.c     hash = rb_hash_new();
hash              933 ext/gdbm/gdbm.c         rb_hash_aset(hash, keystr, rb_gdbm_fetch2(dbm, keystr));
hash              936 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              428 ext/sdbm/init.c     VALUE hash = rb_hash_new();
hash              435 ext/sdbm/init.c 	rb_hash_aset(hash, valstr, keystr);
hash              437 ext/sdbm/init.c     return hash;
hash              718 ext/sdbm/init.c     VALUE hash;
hash              721 ext/sdbm/init.c     hash = rb_hash_new();
hash              724 ext/sdbm/init.c 	rb_hash_aset(hash, rb_tainted_str_new(key.dptr, key.dsize),
hash              728 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              292 gc.c           	struct RHash   hash;
hash              929 gc.c           	mark_hash(obj->as.hash.tbl, lev);
hash              930 gc.c           	ptr = obj->as.hash.ifnone;
hash             1178 gc.c           	if (RANY(obj)->as.hash.tbl) {
hash             1179 gc.c           	    st_free_table(RANY(obj)->as.hash.tbl);
hash               31 hash.c             if (!RHASH(hash)->tbl) rb_raise(rb_eTypeError, "uninitialized Hash");
hash               32 hash.c             if (OBJ_FROZEN(hash)) rb_error_frozen("hash");
hash               33 hash.c             if (!OBJ_TAINTED(hash) && rb_safe_level() >= 4)
hash               41 hash.c             return rb_obj_freeze(hash);
hash              155 hash.c             VALUE hash;
hash              168 hash.c             tbl = RHASH(arg->hash)->tbl;
hash              171 hash.c             if (RHASH(arg->hash)->tbl != tbl) {
hash              177 hash.c         	FL_SET(arg->hash, HASH_DELETED);
hash              190 hash.c             RHASH(hash)->iter_lev--;
hash              192 hash.c             if (RHASH(hash)->iter_lev == 0) {
hash              193 hash.c         	if (FL_TEST(hash, HASH_DELETED)) {
hash              194 hash.c         	    st_cleanup_safe(RHASH(hash)->tbl, Qundef);
hash              195 hash.c         	    FL_UNSET(hash, HASH_DELETED);
hash              205 hash.c             if (st_foreach(RHASH(arg->hash)->tbl, hash_foreach_iter, (st_data_t)arg)) {
hash              219 hash.c             RHASH(hash)->iter_lev++;
hash              220 hash.c             arg.hash = hash;
hash              223 hash.c             rb_ensure(hash_foreach_call, (VALUE)&arg, hash_foreach_ensure, hash);
hash              231 hash.c             NEWOBJ(hash, struct RHash);
hash              232 hash.c             OBJSETUP(hash, klass, T_HASH);
hash              234 hash.c             hash->ifnone = Qnil;
hash              235 hash.c             hash->tbl = st_init_table(&objhash);
hash              237 hash.c             return (VALUE)hash;
hash              289 hash.c             rb_hash_modify(hash);
hash              294 hash.c         	RHASH(hash)->ifnone = rb_block_proc();
hash              295 hash.c         	FL_SET(hash, HASH_PROC_DEFAULT);
hash              299 hash.c         	RHASH(hash)->ifnone = ifnone;
hash              302 hash.c             return hash;
hash              324 hash.c             VALUE hash;
hash              328 hash.c         	hash = hash_alloc(klass);
hash              330 hash.c         	RHASH(hash)->ifnone = Qnil;
hash              331 hash.c         	RHASH(hash)->tbl = st_copy(RHASH(argv[0])->tbl);
hash              333 hash.c         	return hash;
hash              340 hash.c             hash = hash_alloc(klass);
hash              342 hash.c                 rb_hash_aset(hash, argv[i], argv[i + 1]);
hash              345 hash.c             return hash;
hash              352 hash.c             return rb_convert_type(hash, T_HASH, "Hash", "to_hash");
hash              390 hash.c             rb_hash_modify(hash);
hash              391 hash.c             tbl = st_init_table_with_size(&objhash, RHASH(hash)->tbl->num_entries);
hash              392 hash.c             rb_hash_foreach(hash, rb_hash_rehash_i, (st_data_t)tbl);
hash              393 hash.c             st_free_table(RHASH(hash)->tbl);
hash              394 hash.c             RHASH(hash)->tbl = tbl;
hash              396 hash.c             return hash;
hash              419 hash.c             if (!st_lookup(RHASH(hash)->tbl, key, &val)) {
hash              420 hash.c         	return rb_funcall(hash, id_default, 1, key);
hash              470 hash.c             if (!st_lookup(RHASH(hash)->tbl, key, &val)) {
hash              510 hash.c             if (FL_TEST(hash, HASH_PROC_DEFAULT)) {
hash              511 hash.c         	return rb_funcall(RHASH(hash)->ifnone, id_call, 2, hash, key);
hash              513 hash.c             return RHASH(hash)->ifnone;
hash              540 hash.c             rb_hash_modify(hash);
hash              541 hash.c             RHASH(hash)->ifnone = ifnone;
hash              542 hash.c             FL_UNSET(hash, HASH_PROC_DEFAULT);
hash              565 hash.c             if (FL_TEST(hash, HASH_PROC_DEFAULT)) {
hash              566 hash.c         	return RHASH(hash)->ifnone;
hash              604 hash.c             rb_hash_foreach(hash, index_i, (st_data_t)args);
hash              631 hash.c         	RARRAY(indexes)->ptr[i] = rb_hash_aref(hash, argv[i]);
hash              661 hash.c             rb_hash_modify(hash);
hash              662 hash.c             if (RHASH(hash)->iter_lev > 0) {
hash              663 hash.c         	if (st_delete_safe(RHASH(hash)->tbl, (st_data_t*)&key, &val, Qundef)) {
hash              664 hash.c         	    FL_SET(hash, HASH_DELETED);
hash              668 hash.c             else if (st_delete(RHASH(hash)->tbl, (st_data_t*)&key, &val))
hash              714 hash.c             rb_hash_modify(hash);
hash              716 hash.c             rb_hash_foreach(hash, shift_i, (st_data_t)&var);
hash              721 hash.c             else if (FL_TEST(hash, HASH_PROC_DEFAULT)) {
hash              722 hash.c         	return rb_funcall(RHASH(hash)->ifnone, id_call, 2, hash, Qnil);
hash              725 hash.c         	return RHASH(hash)->ifnone;
hash              735 hash.c         	rb_hash_delete(hash, key);
hash              756 hash.c             rb_hash_modify(hash);
hash              757 hash.c             rb_hash_foreach(hash, delete_if_i, hash);
hash              758 hash.c             return hash;
hash              773 hash.c             int n = RHASH(hash)->tbl->num_entries;
hash              774 hash.c             rb_hash_delete_if(hash);
hash              775 hash.c             if (n == RHASH(hash)->tbl->num_entries) return Qnil;
hash              776 hash.c             return hash;
hash              793 hash.c             return rb_hash_delete_if(rb_obj_dup(hash));
hash              827 hash.c         	rb_ary_push(result, rb_hash_aref(hash, argv[i]));
hash              857 hash.c             rb_hash_foreach(hash, select_i, result);
hash              883 hash.c             rb_hash_modify(hash);
hash              884 hash.c             if (RHASH(hash)->tbl->num_entries > 0) {
hash              885 hash.c         	rb_hash_foreach(hash, clear_i, 0);
hash              888 hash.c             return hash;
hash              913 hash.c             rb_hash_modify(hash);
hash              914 hash.c             if (TYPE(key) != T_STRING || st_lookup(RHASH(hash)->tbl, key, 0)) {
hash              915 hash.c         	st_insert(RHASH(hash)->tbl, key, val);
hash              918 hash.c         	st_add_direct(RHASH(hash)->tbl, rb_str_new4(key), val);
hash              928 hash.c         	rb_hash_aset(hash, key, val);
hash              951 hash.c             if (hash == hash2) return hash;
hash              952 hash.c             rb_hash_clear(hash);
hash              953 hash.c             rb_hash_foreach(hash2, replace_i, hash);
hash              954 hash.c             RHASH(hash)->ifnone = RHASH(hash2)->ifnone;
hash              956 hash.c         	FL_SET(hash, HASH_PROC_DEFAULT);
hash              959 hash.c         	FL_UNSET(hash, HASH_PROC_DEFAULT);
hash              962 hash.c             return hash;
hash              982 hash.c             return INT2FIX(RHASH(hash)->tbl->num_entries);
hash             1000 hash.c             if (RHASH(hash)->tbl->num_entries == 0)
hash             1034 hash.c             rb_hash_foreach(hash, each_value_i, 0);
hash             1035 hash.c             return hash;
hash             1066 hash.c             rb_hash_foreach(hash, each_key_i, 0);
hash             1067 hash.c             return hash;
hash             1100 hash.c             rb_hash_foreach(hash, each_pair_i, 0);
hash             1101 hash.c             return hash;
hash             1137 hash.c             rb_hash_foreach(hash, each_i, 0);
hash             1138 hash.c             return hash;
hash             1168 hash.c             rb_hash_foreach(hash, to_a_i, ary);
hash             1169 hash.c             if (OBJ_TAINTED(hash)) OBJ_TAINT(ary);
hash             1193 hash.c             VALUE entries = rb_hash_to_a(hash);
hash             1226 hash.c             rb_hash_foreach(hash, inspect_i, str);
hash             1228 hash.c             OBJ_INFECT(str, hash);
hash             1244 hash.c             if (RHASH(hash)->tbl == 0 || RHASH(hash)->tbl->num_entries == 0)
hash             1246 hash.c             if (rb_inspecting_p(hash)) return rb_str_new2("{...}");
hash             1247 hash.c             return rb_protect_inspect(inspect_hash, hash, 0);
hash             1254 hash.c             return rb_ary_to_s(rb_hash_to_a(hash));
hash             1274 hash.c             if (rb_inspecting_p(hash)) return rb_str_new2("{...}");
hash             1275 hash.c             return rb_protect_inspect(to_s_hash, hash, 0);
hash             1289 hash.c             return hash;
hash             1320 hash.c             rb_hash_foreach(hash, keys_i, ary);
hash             1353 hash.c             rb_hash_foreach(hash, values_i, ary);
hash             1378 hash.c             if (st_lookup(RHASH(hash)->tbl, key, 0)) {
hash             1418 hash.c             rb_hash_foreach(hash, rb_hash_search_value, (st_data_t)data);
hash             1507 hash.c             rb_hash_aset(hash, value, key);
hash             1529 hash.c             rb_hash_foreach(hash, rb_hash_invert_i, h);
hash             1539 hash.c             rb_hash_aset(hash, key, value);
hash             1549 hash.c             if (rb_hash_has_key(hash, key)) {
hash             1550 hash.c         	value = rb_yield_values(3, key, rb_hash_aref(hash, key), value);
hash             1552 hash.c             rb_hash_aset(hash, key, value);
hash             2298 hash.c             VALUE hash = rb_hash_new();
hash             2304 hash.c         	    rb_hash_aset(hash, env_str_new(*env, s-*env),
hash             2310 hash.c             return hash;
hash             2364 hash.c             if (env == hash) return env;
hash             2365 hash.c             hash = to_hash(hash);
hash             2366 hash.c             rb_hash_foreach(hash, env_replace_i, keys);
hash             2391 hash.c             if (env == hash) return env;
hash             2392 hash.c             hash = to_hash(hash);
hash             2393 hash.c             rb_hash_foreach(hash, env_update_i, 0);
hash              125 lex.c                register int key = hash (str, len);
hash              859 numeric.c          int i, hash;
hash              864 numeric.c          for (hash=0, i=0; i<sizeof(double);i++) {
hash              865 numeric.c      	hash += c[i] * 971;
hash              867 numeric.c          if (hash < 0) hash = -hash;
hash              868 numeric.c          return INT2FIX(hash);
hash             6573 parse.c        	VALUE hash, fname;
hash             6575 parse.c        	hash = rb_const_get(rb_cObject, rb_intern("SCRIPT_LINES__"));
hash             6576 parse.c        	if (TYPE(hash) == T_HASH) {
hash             6578 parse.c        	    ruby_debug_lines = rb_hash_aref(hash, fname);
hash             6581 parse.c        		rb_hash_aset(hash, fname, ruby_debug_lines);
hash             2575 parse.y        	VALUE hash, fname;
hash             2577 parse.y        	hash = rb_const_get(rb_cObject, rb_intern("SCRIPT_LINES__"));
hash             2578 parse.y        	if (TYPE(hash) == T_HASH) {
hash             2580 parse.y        	    ruby_debug_lines = rb_hash_aref(hash, fname);
hash             2583 parse.y        		rb_hash_aset(hash, fname, ruby_debug_lines);
hash              213 range.c            long hash = EXCL(range);
hash              217 range.c            hash ^= v << 1;
hash              219 range.c            hash ^= v << 9;
hash              220 range.c            hash ^= EXCL(range) << 24;
hash              222 range.c            return LONG2FIX(hash);
hash               17 st.c               unsigned int hash;
hash               56 st.c           #define do_hash(key,table) (unsigned int)(*(table)->type->hash)((key))
hash              216 st.c           ((ptr) != 0 && (ptr->hash != (hash_val) || !EQUAL((table), (key), (ptr)->key)))
hash              267 st.c               entry->hash = hash_val;\
hash              325 st.c           	    hash_val = ptr->hash % new_num_bins;
hash               16 st.h               int (*hash)();
hash             1027 time.c             long hash;
hash             1030 time.c             hash = tobj->tv.tv_sec ^ tobj->tv.tv_usec;
hash             1031 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        226 hash.c         static VALUE hash_alloc _((VALUE));
hash_alloc        243 hash.c             return hash_alloc(rb_cHash);
hash_alloc        328 hash.c         	hash = hash_alloc(klass);
hash_alloc        340 hash.c             hash = hash_alloc(klass);
hash_alloc       2421 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));


here_document

here_document    7357 parse.c        	    token = here_document(lex_strterm);
here_document    3359 parse.y        	    token = here_document(lex_strterm);


heredoc_identifier

heredoc_identifier 7508 parse.c        	    int token = heredoc_identifier();
heredoc_identifier 3510 parse.y        	    int token = heredoc_identifier();


heredoc_restore

heredoc_restore  7269 parse.c        	heredoc_restore(lex_strterm);
heredoc_restore  7274 parse.c        	heredoc_restore(lex_strterm);
heredoc_restore  7330 parse.c            heredoc_restore(lex_strterm);
heredoc_restore  3271 parse.y        	heredoc_restore(lex_strterm);
heredoc_restore  3276 parse.y        	heredoc_restore(lex_strterm);
heredoc_restore  3332 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              3990 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               834 missing/vsnprintf.c 			goto hex;
hex               837 missing/vsnprintf.c hex:


hex2bin

hex2bin          3770 ext/nkf/nkf-utf8/nkf.c     return (hex2bin(c2) << 4) | hex2bin(c3);
hex2bin          3831 ext/nkf/nkf-utf8/nkf.c                     c |= hex2bin(buf[i]);
hex2bin          3845 ext/nkf/nkf-utf8/nkf.c                     c += hex2bin(buf[i]);


hex2num

hex2num          1838 pack.c         			    if ((c1 = hex2num(*s)) == -1) break;
hex2num          1840 pack.c         			    if ((c2 = hex2num(*s)) == -1) break;


hex_getc

hex_getc         3777 ext/nkf/nkf-utf8/nkf.c     return hex_getc(':', f, i_cgetc, i_cungetc);
hex_getc         3792 ext/nkf/nkf-utf8/nkf.c     return hex_getc('%', f, i_ugetc, i_uungetc);


hira_conv

hira_conv         317 ext/nkf/nkf-utf8/nkf.c STATIC  void    hira_conv PROTO((int c2,int c1));
hira_conv        1827 ext/nkf/nkf-utf8/nkf.c 	o_hira_conv = oconv; oconv = hira_conv;


hist_length

hist_length       788 ext/readline/readline.c     rb_define_singleton_method(history,"length", hist_length, 0);
hist_length       789 ext/readline/readline.c     rb_define_singleton_method(history,"size", hist_length, 0);


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          765 ext/socket/socket.c     hostp = host_str(host, hbuf, sizeof(hbuf));
host_str         1235 ext/socket/socket.c 	hostp = host_str(host, hbuf, sizeof(hbuf));


htond

htond             311 pack.c         			 y = htond((DOUBLE_SWAPPER)y),	\
htond             328 pack.c         #define HTOND(x,y)	htond(x)


htonf

htonf             285 pack.c         			 y = htonf((FLOAT_SWAPPER)y),	\
htonf             302 pack.c         #define HTONF(x,y)	htonf(x)


htonl

htonl             262 ext/socket/getaddrinfo.c 	    in.s_addr = htonl(
htonl             697 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)


htons

htons             388 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             315 pack.c         			 y = htovd((DOUBLE_SWAPPER)y),	\
htovd             329 pack.c         #define HTOVD(x,y)	htovd(x)


htovf

htovf             289 pack.c         			 y = htovf((FLOAT_SWAPPER)y),	\
htovf             303 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             437 math.c             return rb_float_new(hypot(RFLOAT(x)->value, RFLOAT(y)->value));
hypot              57 missing.h      extern double hypot _((double, double));


index

index             280 ext/nkf/nkf-utf8/nkf.c     int index;
index            1471 ext/nkf/nkf-utf8/nkf.c     ptr->buf[ptr->index++] = c;
index            1478 ext/nkf/nkf-utf8/nkf.c     ptr->index = 0;
index            1696 ext/nkf/nkf-utf8/nkf.c               if (ptr->index > ptr->stat){
index             508 ext/readline/readline.c     i = NUM2INT(index);
index             530 ext/readline/readline.c     i = NUM2INT(index);
index             583 ext/readline/readline.c     entry = remove_history(index);
index             662 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             171 ext/win32ole/win32ole.c     UINT index;
index             176 ext/win32ole/win32ole.c     UINT index;
index             182 ext/win32ole/win32ole.c     UINT index;
index            1268 ext/win32ole/win32ole.c     unsigned int index;
index            1282 ext/win32ole/win32ole.c     for (index = 0; index < count; index++) {
index            1283 ext/win32ole/win32ole.c         hr = pTypeLib->lpVtbl->GetTypeInfo(pTypeLib, index, &pTypeInfo);
index            1569 ext/win32ole/win32ole.c     unsigned int index;
index            1589 ext/win32ole/win32ole.c         hr = pTypeInfo->lpVtbl->GetContainingTypeLib(pTypeInfo, &pTypeLib, &index);
index            1914 ext/win32ole/win32ole.c     unsigned int index, i;
index            1916 ext/win32ole/win32ole.c     index = pOp->dp.cNamedArgs;
index            1924 ext/win32ole/win32ole.c         for(i = 1; i < index + 1; i++) {
index            1928 ext/win32ole/win32ole.c         for(i = 0; i < index; i++ ) {
index            1936 ext/win32ole/win32ole.c     pOp->pNamedArgs[index + 1] = ole_mb2wc(StringValuePtr(key), -1);
index            1939 ext/win32ole/win32ole.c     VariantInit(&(pOp->dp.rgvarg[index]));
index            1940 ext/win32ole/win32ole.c     ole_val2variant(value, &(pOp->dp.rgvarg[index]));
index            2491 ext/win32ole/win32ole.c     unsigned int index;
index            2531 ext/win32ole/win32ole.c     for(index = 0; index < dispParams.cArgs; ++index) {
index            2532 ext/win32ole/win32ole.c         VariantClear(&propertyValue[index]);
index            2983 ext/win32ole/win32ole.c     unsigned int index;
index            2998 ext/win32ole/win32ole.c     hr = pTypeInfo->lpVtbl->GetContainingTypeLib( pTypeInfo, &pTypeLib, &index );
index            3003 ext/win32ole/win32ole.c     hr = pTypeLib->lpVtbl->GetDocumentation( pTypeLib, index,
index            3928 ext/win32ole/win32ole.c         pvar->index = i;
index            4065 ext/win32ole/win32ole.c     return ole_variable_ole_type(pvar->pTypeInfo, pvar->index);
index            4101 ext/win32ole/win32ole.c     return ole_variable_ole_type_detail(pvar->pTypeInfo, pvar->index);
index            4147 ext/win32ole/win32ole.c     return ole_variable_value(pvar->pTypeInfo, pvar->index);
index            4195 ext/win32ole/win32ole.c     return ole_variable_visible(pvar->pTypeInfo, pvar->index);
index            4254 ext/win32ole/win32ole.c     return ole_variable_kind(pvar->pTypeInfo, pvar->index);
index            4297 ext/win32ole/win32ole.c     return ole_variable_varkind(pvar->pTypeInfo, pvar->index);
index            4320 ext/win32ole/win32ole.c     pmethod->index = index;
index            4336 ext/win32ole/win32ole.c     pmethod->index = 0;
index            4428 ext/win32ole/win32ole.c     return ole_method_return_type(pmethod->pTypeInfo, pmethod->index);
index            4465 ext/win32ole/win32ole.c     return ole_method_return_vtype(pmethod->pTypeInfo, pmethod->index);
index            4502 ext/win32ole/win32ole.c     return ole_method_return_type_detail(pmethod->pTypeInfo, pmethod->index);
index            4559 ext/win32ole/win32ole.c     return ole_method_invkind(pmethod->pTypeInfo, pmethod->index);
index            4579 ext/win32ole/win32ole.c     return ole_method_invoke_kind(pmethod->pTypeInfo, pmethod->index);
index            4619 ext/win32ole/win32ole.c     return ole_method_visible(pmethod->pTypeInfo, pmethod->index);
index            4707 ext/win32ole/win32ole.c                             pmethod->index,
index            4789 ext/win32ole/win32ole.c     return ole_method_helpstring(pmethod->pTypeInfo, pmethod->index);
index            4823 ext/win32ole/win32ole.c     return ole_method_helpfile(pmethod->pTypeInfo, pmethod->index);
index            4855 ext/win32ole/win32ole.c     return ole_method_helpcontext(pmethod->pTypeInfo, pmethod->index);
index            4889 ext/win32ole/win32ole.c     return ole_method_dispid(pmethod->pTypeInfo, pmethod->index);
index            4923 ext/win32ole/win32ole.c     return ole_method_offset_vtbl(pmethod->pTypeInfo, pmethod->index);
index            4958 ext/win32ole/win32ole.c     return ole_method_size_params(pmethod->pTypeInfo, pmethod->index);
index            4992 ext/win32ole/win32ole.c     return ole_method_size_opt_params(pmethod->pTypeInfo, pmethod->index);
index            5028 ext/win32ole/win32ole.c             pparam->index = i - 1;
index            5055 ext/win32ole/win32ole.c     return ole_method_params(pmethod->pTypeInfo, pmethod->index);
index            5095 ext/win32ole/win32ole.c                             &(pFuncDesc->lprgelemdescParam[index].tdesc), Qnil);
index            5117 ext/win32ole/win32ole.c                               pparam->index);
index            5133 ext/win32ole/win32ole.c                      &(pFuncDesc->lprgelemdescParam[index].tdesc), typedetail);
index            5155 ext/win32ole/win32ole.c                                      pparam->index);
index            5171 ext/win32ole/win32ole.c     if (V_UNION1((&(pFuncDesc->lprgelemdescParam[index])), paramdesc).wParamFlags &mask)
index            5193 ext/win32ole/win32ole.c                                pparam->index, PARAMFLAG_FIN);
index            5221 ext/win32ole/win32ole.c                                pparam->index, PARAMFLAG_FOUT);
index            5240 ext/win32ole/win32ole.c                                pparam->index, PARAMFLAG_FOPT);
index            5260 ext/win32ole/win32ole.c                                pparam->index, PARAMFLAG_FRETVAL);
index            5279 ext/win32ole/win32ole.c     pElemDesc = &pFuncDesc->lprgelemdescParam[index];
index            5324 ext/win32ole/win32ole.c                              pparam->index);
index            5672 ext/win32ole/win32ole.c     unsigned int index;
index            5691 ext/win32ole/win32ole.c                                                  &index);
index            5704 ext/win32ole/win32ole.c     for (index = 0; index < count; index++) {
index            5706 ext/win32ole/win32ole.c                                            index,
index              73 missing/os2.c  	    !isalpha(*s) && index("$&*(){}[]'\";\\|?<>~`\n",*s)) {
index              80 missing/os2.c  	    !isalpha(*s) && index("^()<>|&\n",*s)) {
index              36 win32/win32.c  #ifndef index
index            1396 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         297 ext/socket/getaddrinfo.c 			if (q && inet_pton(AF_INET6, q, &faith_prefix) == 1)
inet_pton         474 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                58 missing/isinf.c 	pinf = inf();


infect

infect             72 ext/strscan/strscan.c static VALUE infect _((VALUE str, struct strscanner *p));
infect            147 ext/strscan/strscan.c     return infect(rb_str_new(S_PBEG(p) + beg_i, end_i - beg_i), p);
infect            158 ext/strscan/strscan.c     return infect(rb_str_new(S_PBEG(p) + beg_i, len), p);
infect            759 ext/strscan/strscan.c         return infect(rb_str_new("", 0), p);
infect           1049 ext/strscan/strscan.c         return infect(rb_str_new("", 0), p);
infect           1112 ext/strscan/strscan.c         return infect(rb_str_new(buf, len), p);
infect           1117 ext/strscan/strscan.c         return infect(rb_str_new(buf, len), p);
infect           1125 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);


infected_str_new

infected_str_new 1380 pack.c         		rb_ary_push(ary, infected_str_new(s, len, str));
infected_str_new 1391 pack.c         		rb_ary_push(ary, infected_str_new(s, t-s, str));
infected_str_new 1399 pack.c         	    rb_ary_push(ary, infected_str_new(s, len, str));
infected_str_new 1730 pack.c         		VALUE buf = infected_str_new(0, (send - s)*3/4, str);
infected_str_new 1786 pack.c         		VALUE buf = infected_str_new(0, (send - s)*3/4, str);
infected_str_new 1830 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      1494 ext/zlib/zlib.c     dst = rb_ensure(inflate_run, (VALUE)args, zstream_end, (VALUE)&z);


init_copy

init_copy         267 object.c           init_copy(clone, obj);
init_copy         301 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     876 dln.c          	init_funcname(&buf, need_init);
init_funcname    1304 dln.c              init_funcname(&buf, file);
init_funcname    1332 dln.c              init_funcname(&buf, file);


init_genrand

init_genrand      103 random.c           init_genrand(19650218UL);
init_genrand      134 random.c           if (initf==0) init_genrand(5489UL);
init_genrand      241 random.c               init_genrand(buf[0]);


init_inetsock

init_inetsock    1172 ext/socket/socket.c     return init_inetsock(sock, remote_host, remote_serv,
init_inetsock    1188 ext/socket/socket.c     return init_inetsock(sock, host, serv, Qnil, Qnil, INET_SOCKS);
init_inetsock    1299 ext/socket/socket.c 	return init_inetsock(sock, arg1, arg2, Qnil, Qnil, INET_SERVER);
init_inetsock    1301 ext/socket/socket.c 	return init_inetsock(sock, Qnil, arg1, Qnil, Qnil, INET_SERVER);


init_mark_stack

init_mark_stack   568 gc.c               init_mark_stack();
init_mark_stack   590 gc.c               init_mark_stack();
init_mark_stack  1330 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_regs

init_regs         180 regex.c        static void init_regs _((struct re_registers*, unsigned int));
init_regs        3606 regex.c            init_regs(regs, num_regs);


init_sigchld

init_sigchld      892 signal.c           init_sigchld(SIGCLD);
init_sigchld      895 signal.c           init_sigchld(SIGCHLD);


init_sock

init_sock         226 ext/socket/socket.c     VALUE sock = init_sock(rb_obj_alloc(klass), NUM2INT(fd));
init_sock        1138 ext/socket/socket.c     return init_sock(arg->sock, fd);
init_sock        1342 ext/socket/socket.c     return init_sock(rb_obj_alloc(klass), fd2);
init_sock        1429 ext/socket/socket.c     init_sock(sock, fd);
init_sock        1509 ext/socket/socket.c     return init_sock(sock, fd);
init_sock        2025 ext/socket/socket.c     return init_sock(sock, fd);
init_sock        2045 ext/socket/socket.c     return rb_assoc_new(init_sock(rb_obj_alloc(klass), sp[0]),
init_sock        2046 ext/socket/socket.c 			init_sock(rb_obj_alloc(klass), sp[1]));


init_syntax_once

init_syntax_once  178 regex.c        static void init_syntax_once _((void));
init_syntax_once 1299 regex.c          init_syntax_once();


init_unixsock

init_unixsock    1617 ext/socket/socket.c     return init_unixsock(sock, path, 0);
init_unixsock    1641 ext/socket/socket.c     return init_unixsock(sock, path, 1);


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              11 win32/dir.h        ino_t d_ino;
ino_t              43 wince/sys/stat.h   ino_t st_ino;


ins_methods_i

ins_methods_i     669 class.c            return class_instance_method_list(argc, argv, mod, ins_methods_i);
ins_methods_i     792 class.c            st_foreach(list, ins_methods_i, ary);


ins_methods_push

ins_methods_push  555 class.c            return ins_methods_push(name, type, ary, -1); /* everything but private */
ins_methods_push  564 class.c            return ins_methods_push(name, type, ary, NOEX_PROTECTED);
ins_methods_push  573 class.c            return ins_methods_push(name, type, ary, NOEX_PRIVATE);
ins_methods_push  582 class.c            return ins_methods_push(name, type, ary, NOEX_PUBLIC);


insert_jump

insert_jump       161 regex.c        static void insert_jump _((int, char*, char*, char*));
insert_jump      1401 regex.c              insert_jump(on_failure_jump, laststart, b + 3, b);
insert_jump      1407 regex.c        	  insert_jump(try_next, laststart, b + 3, b);
insert_jump      1418 regex.c        	insert_jump(dummy_failure_jump, laststart, laststart + 6, b);
insert_jump      1973 regex.c              insert_jump(on_failure_jump, begalt, b + 6, b);
insert_jump      2077 regex.c        	insert_jump(jump, laststart, b + 3, b);


insert_jump_n

insert_jump_n     163 regex.c        static void insert_jump_n _((int, char*, char*, char*, unsigned));
insert_jump_n    2139 regex.c        	insert_jump_n(succeed_n, laststart, b + (nbytes/2),


insert_op_2

insert_op_2       165 regex.c        static void insert_op_2 _((int, char*, char*, int, int));
insert_op_2      2147 regex.c        	insert_op_2(set_number_at, laststart, b, 5, lower_bound);
insert_op_2      2177 regex.c        	  insert_op_2(set_number_at, laststart, b, b - laststart,


inspect1

inspect1          123 ext/strscan/strscan.c static VALUE inspect1 _((struct strscanner *p));
inspect1         1127 ext/strscan/strscan.c     a = inspect1(p);


inspect2

inspect2          124 ext/strscan/strscan.c static VALUE inspect2 _((struct strscanner *p));
inspect2         1120 ext/strscan/strscan.c         b = inspect2(p);
inspect2         1128 ext/strscan/strscan.c     b = inspect2(p);


inspect_i

inspect_i        1226 hash.c             rb_hash_foreach(hash, inspect_i, str);
inspect_i         410 object.c           st_foreach_safe(ROBJECT(obj)->iv_tbl, inspect_i, str);


install_sighandler

install_sighandler  864 signal.c           install_sighandler(SIGINT, sighandler);
install_sighandler  866 signal.c           install_sighandler(SIGHUP, sighandler);
install_sighandler  869 signal.c           install_sighandler(SIGQUIT, sighandler);
install_sighandler  872 signal.c           install_sighandler(SIGALRM, sighandler);
install_sighandler  875 signal.c           install_sighandler(SIGUSR1, sighandler);
install_sighandler  878 signal.c           install_sighandler(SIGUSR2, sighandler);
install_sighandler  882 signal.c           install_sighandler(SIGBUS, sigbus);
install_sighandler  885 signal.c           install_sighandler(SIGSEGV, sigsegv);
install_sighandler  888 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          2829 numeric.c          rb_define_method(rb_cInteger, "chr", int_chr, 0);


int_succ

int_succ         2827 numeric.c          rb_define_method(rb_cInteger, "succ", int_succ, 0);
int_succ         2828 numeric.c          rb_define_method(rb_cInteger, "next", int_succ, 0);


int_to_i

int_to_i         2830 numeric.c          rb_define_method(rb_cInteger, "to_i", int_to_i, 0);
int_to_i         2831 numeric.c          rb_define_method(rb_cInteger, "to_int", int_to_i, 0);
int_to_i         2832 numeric.c          rb_define_method(rb_cInteger, "floor", int_to_i, 0);
int_to_i         2833 numeric.c          rb_define_method(rb_cInteger, "ceil", int_to_i, 0);
int_to_i         2834 numeric.c          rb_define_method(rb_cInteger, "round", int_to_i, 0);
int_to_i         2835 numeric.c          rb_define_method(rb_cInteger, "truncate", int_to_i, 0);


internal_id

internal_id       270 parse.c        static ID   internal_id();
internal_id      9357 parse.c        	node->nd_cnt = local_append(internal_id());
internal_id       173 parse.y        static ID   internal_id();
internal_id      5359 parse.y        	node->nd_cnt = local_append(internal_id());


intersect_fds

intersect_fds    10520 eval.c         		    intersect_fds(&readfds, &th->readfds, max);
intersect_fds    10521 eval.c         		    intersect_fds(&writefds, &th->writefds, max);
intersect_fds    10522 eval.c         		    intersect_fds(&exceptfds, &th->exceptfds, max);
intersect_fds    10547 eval.c         		    n = intersect_fds(&readfds, &th->readfds, max) +
intersect_fds    10548 eval.c         			intersect_fds(&writefds, &th->writefds, max) +
intersect_fds    10549 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          315 io.c           static VALUE io_alloc _((VALUE));
io_alloc         2746 io.c               return rb_file_open_internal(io_alloc(rb_cFile), fname, mode);
io_alloc         2775 io.c               return rb_file_sysopen_internal(io_alloc(rb_cFile), fname, flags, mode);
io_alloc         2893 io.c           	VALUE port = io_alloc(rb_cIO);
io_alloc         2925 io.c                   VALUE port = io_alloc(rb_cIO);
io_alloc         3004 io.c           	    VALUE port = io_alloc(rb_cIO);
io_alloc         4004 io.c               VALUE io = io_alloc(klass);
io_alloc         5580 io.c               rb_define_alloc_func(rb_cIO, io_alloc);


io_close

io_close         3106 io.c           	return rb_ensure(rb_yield, port, io_close, port);
io_close         3165 io.c           	return rb_ensure(rb_yield, io, io_close, io);


io_cntl

io_cntl          4764 io.c               retval = io_cntl(fileno(fptr->f), cmd, narg, io_p);
io_cntl          4772 io.c           	io_cntl(fileno(fptr->f2), cmd, narg, io_p);


io_fflush

io_fflush         222 io.c           static void io_fflush _((FILE *, OpenFile *));
io_fflush         229 io.c           	io_fflush(GetWriteFile(fptr), fptr);
io_fflush         442 io.c           	io_fflush(f, fptr);
io_fflush         627 io.c               io_fflush(f, fptr);
io_fflush         906 io.c               io_fflush(f, fptr);
io_fflush        3371 io.c           	io_fflush(orig->f2, orig);
io_fflush        3374 io.c           	io_fflush(orig->f, orig);
io_fflush        3377 io.c           	io_fflush(GetWriteFile(fptr), fptr);
io_fflush        3542 io.c           	io_fflush(orig->f2, orig);
io_fflush        3546 io.c           	io_fflush(orig->f, orig);


io_fread

io_fread         1102 io.c               return io_fread(ptr, len, &of);
io_fread         1152 io.c           	n = io_fread(RSTRING(str)->ptr+bytes, siz-bytes, fptr);
io_fread         1353 io.c               n = io_fread(RSTRING(str)->ptr, len, fptr);


io_fwrite

io_fwrite         520 io.c               return io_fwrite(rb_str_new(ptr, len), &of);
io_fwrite         561 io.c               n = io_fwrite(str, fptr);


io_new_instance

io_new_instance  4966 io.c           static VALUE io_new_instance _((VALUE));
io_new_instance  5028 io.c               r = rb_protect(io_new_instance, (VALUE)args, &state);
io_new_instance  5036 io.c               w = rb_protect(io_new_instance, (VALUE)args, &state);


io_read

io_read          5151 io.c               return io_read(arg->argc, &arg->sep, arg->io);
io_read          5289 io.c           	tmp = io_read(argc, argv, current_file);
io_read          5637 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        124 ext/io/wait/wait.c     rb_define_method(rb_cIO, "ready?", io_ready_p, 0);


io_seek

io_seek           258 io.c           	io_seek(fptr, 0, SEEK_CUR);
io_seek           273 io.c           	io_seek(fptr, 0, SEEK_CUR);
io_seek           668 io.c               pos = io_seek(fptr, pos, whence);
io_seek           732 io.c               pos = io_seek(fptr, pos, SEEK_SET);
io_seek           760 io.c               if (io_seek(fptr, 0L, 0) != 0) rb_sys_fail(fptr->path);
io_seek          3419 io.c           	    io_seek(fptr, pos, SEEK_SET);
io_seek          3420 io.c           	    io_seek(orig, pos, SEEK_SET);


io_tell

io_tell           653 io.c               pos = io_tell(fptr);
io_tell          1122 io.c           	pos = io_tell(fptr);
io_tell          3368 io.c           	pos = io_tell(orig);


io_wait

io_wait            38 ext/io/wait/wait.c static VALUE io_wait _((int argc, VALUE *argv, VALUE io));
io_wait           125 ext/io/wait/wait.c     rb_define_method(rb_cIO, "wait", io_wait, -1);


ioctl

ioctl              69 ext/io/wait/wait.c     if (ioctl(fileno(fp), FIONREAD, &n)) rb_sys_fail(0);
ioctl             116 ext/io/wait/wait.c     if (ioctl(fileno(fp), 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            4693 io.c               retval = io_p?ioctl(fd, cmd, (void*)narg):fcntl(fd, cmd, narg);
ioctl            4695 io.c               retval = io_p?ioctl(fd, cmd, narg):fcntl(fd, cmd, narg);
ioctl            4703 io.c               retval = ioctl(fd, cmd, narg);
ioctl            1742 process.c          ioctl(fd, TIOCNOTTY, NULL);
ioctl             298 win32/win32.h  extern int       ioctl (int, unsigned int, long);


ioctl_arg

ioctl_arg          61 ext/io/wait/wait.c     ioctl_arg n;
ioctl_arg          91 ext/io/wait/wait.c     ioctl_arg n;


ioctlsocket

ioctlsocket        23 ext/io/wait/wait.c #define ioctl ioctlsocket
ioctlsocket      2110 win32/win32.c  	r = ioctlsocket(TO_SOCKET(s), cmd, argp);
ioctlsocket      2436 win32/win32.c  	ret = ioctlsocket(sock, FIONBIO, &ioctlArg);
ioctlsocket       414 win32/win32.h  #ifdef ioctlsocket


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            521 ext/socket/socket.c static VALUE ipaddr _((struct sockaddr*));
ipaddr            592 ext/socket/socket.c 	  return rb_assoc_new(str, ipaddr((struct sockaddr*)buf));
ipaddr           1212 ext/socket/socket.c     VALUE (*ipaddr)_((struct sockaddr*, size_t));
ipaddr           1221 ext/socket/socket.c     VALUE (*ipaddr)_((struct sockaddr*, size_t)) = arg->ipaddr;
ipaddr           1253 ext/socket/socket.c 	rb_ary_push(ary, (*ipaddr)(ai->ai_addr, ai->ai_addrlen));
ipaddr           1269 ext/socket/socket.c     arg.ipaddr = ipaddr;
ipaddr           1449 ext/socket/socket.c     return ipaddr((struct sockaddr*)&addr);
ipaddr           1464 ext/socket/socket.c     return ipaddr((struct sockaddr*)&addr);
ipaddr           2695 ext/socket/socket.c 	ary = ipaddr(res->ai_addr);


is_absolute_path

is_absolute_path 2453 file.c         static int is_absolute_path _((const char*));
is_absolute_path 2549 file.c             else if (!is_absolute_path(s)) {
is_absolute_path 4056 file.c             if (!is_absolute_path(p0)) {
is_absolute_path 4173 file.c             if (is_absolute_path(f)) {
is_absolute_path 4235 file.c             if (is_absolute_path(f)) {


is_alnum

is_alnum         3245 ext/nkf/nkf-utf8/nkf.c 		} else if (!is_alnum(prev0)) {
is_alnum         3642 ext/nkf/nkf-utf8/nkf.c                 c1=='-'||c1=='_'||is_alnum(c1) ) continue;
is_alnum         4168 ext/nkf/nkf-utf8/nkf.c         if (!( (c=='+'||c=='/'|| c=='=' || c=='?' || is_alnum(c))))
is_alnum         1625 regex.c        	    char is_alnum = STREQ(str, "alnum");
is_alnum         1651 regex.c        	      if (   (is_alnum  && ISALNUM(ch))


is_asgn_or_id

is_asgn_or_id    3883 parse.c        				if (is_asgn_or_id(vid)) {
is_asgn_or_id    4499 parse.c        				if (is_asgn_or_id(vid)) {
is_asgn_or_id     522 parse.y        				if (is_asgn_or_id(vid)) {
is_asgn_or_id     986 parse.y        				if (is_asgn_or_id(vid)) {


is_attrset_id

is_attrset_id    10035 parse.c        	    if (id > tLAST_TOKEN && !is_attrset_id(id)) {
is_attrset_id    10082 parse.c            if (is_attrset_id(id)) {
is_attrset_id    6037 parse.y        	    if (id > tLAST_TOKEN && !is_attrset_id(id)) {
is_attrset_id    6084 parse.y            if (is_attrset_id(id)) {


is_class_id

is_class_id      8852 parse.c            else if (is_class_id(id)) {
is_class_id      8909 parse.c            else if (is_class_id(id)) {
is_class_id      10150 parse.c            if (is_class_id(id)) return Qtrue;
is_class_id      4854 parse.y            else if (is_class_id(id)) {
is_class_id      4911 parse.y            else if (is_class_id(id)) {
is_class_id      6152 parse.y            if (is_class_id(id)) return Qtrue;


is_const_id

is_const_id      8849 parse.c            else if (is_const_id(id)) {
is_const_id      8904 parse.c            else if (is_const_id(id)) {
is_const_id      10142 parse.c            if (is_const_id(id)) return Qtrue;
is_const_id      4851 parse.y            else if (is_const_id(id)) {
is_const_id      4906 parse.y            else if (is_const_id(id)) {
is_const_id      6144 parse.y            if (is_const_id(id)) return Qtrue;


is_defined

is_defined       2219 eval.c         static char* is_defined _((VALUE, NODE*, char*));
is_defined       2236 eval.c         		if (!is_defined(self, node->nd_head, buf))
is_defined       2242 eval.c             else if (!is_defined(self, node, buf)) {
is_defined       3537 eval.c         	if ((node->nd_aid && !is_defined(self, node->nd_head, 0)) ||
is_defined       4021 eval.c         	    char *desc = is_defined(self, node->nd_head, buf);


is_digit

is_digit          620 missing/vsnprintf.c 			while (is_digit(ch)) {
is_digit          640 missing/vsnprintf.c 			} while (is_digit(ch));
is_digit         1629 regex.c        	    char is_digit = STREQ(str, "digit");
is_digit         1655 regex.c        		  || (is_digit  && ISDIGIT(ch))


is_global_id

is_global_id     8843 parse.c            else if (is_global_id(id)) {
is_global_id     8898 parse.c            else if (is_global_id(id)) {
is_global_id     4845 parse.y            else if (is_global_id(id)) {
is_global_id     4900 parse.y            else if (is_global_id(id)) {


is_identchar

is_identchar     7193 parse.c        	if (!is_identchar(c)) {
is_identchar     7206 parse.c        	} while ((c = nextc()) != -1 && is_identchar(c));
is_identchar     7627 parse.c        	else if ((ISALNUM(c) || c == '_') && lex_p < lex_pend && is_identchar(*lex_p)) {
is_identchar     8247 parse.c        	    if (is_identchar(c)) {
is_identchar     8283 parse.c        	    if (is_identchar(c)) {
is_identchar     8322 parse.c        	    if (!is_identchar(c)) {
is_identchar     8347 parse.c        	if (!is_identchar(c)) {
is_identchar     8363 parse.c        	if (!is_identchar(c)) {
is_identchar     8383 parse.c            } while (is_identchar(c));
is_identchar     8384 parse.c            if ((c == '!' || c == '?') && is_identchar(tok()[0]) && !peek('=')) {
is_identchar     9903 parse.c        	if (is_identchar(*m)) m += mbclen(*m);
is_identchar     9975 parse.c        	while (is_identchar(*m)) m += mbclen(*m);
is_identchar     10050 parse.c        	while (m <= name + last && is_identchar(*m)) {
is_identchar     3195 parse.y        	if (!is_identchar(c)) {
is_identchar     3208 parse.y        	} while ((c = nextc()) != -1 && is_identchar(c));
is_identchar     3629 parse.y        	else if ((ISALNUM(c) || c == '_') && lex_p < lex_pend && is_identchar(*lex_p)) {
is_identchar     4249 parse.y        	    if (is_identchar(c)) {
is_identchar     4285 parse.y        	    if (is_identchar(c)) {
is_identchar     4324 parse.y        	    if (!is_identchar(c)) {
is_identchar     4349 parse.y        	if (!is_identchar(c)) {
is_identchar     4365 parse.y        	if (!is_identchar(c)) {
is_identchar     4385 parse.y            } while (is_identchar(c));
is_identchar     4386 parse.y            if ((c == '!' || c == '?') && is_identchar(tok()[0]) && !peek('=')) {
is_identchar     5905 parse.y        	if (is_identchar(*m)) m += mbclen(*m);
is_identchar     5977 parse.y        	while (is_identchar(*m)) m += mbclen(*m);
is_identchar     6052 parse.y        	while (m <= name + last && is_identchar(*m)) {


is_in_list

is_in_list       3876 regex.c        	      not = is_in_list(c, p);
is_in_list       3882 regex.c        	    not = is_in_list(c, p);
is_in_list       4012 regex.c        	    not = is_in_list(c, p2 + 4);


is_in_list_mbc

is_in_list_mbc    749 regex.c          return is_in_list_sbc(c, b) || (current_mbctype ? is_in_list_mbc(c, b) : 0);
is_in_list_mbc   3871 regex.c        	      not = is_in_list_mbc(c, p);


is_in_list_sbc

is_in_list_sbc    749 regex.c          return is_in_list_sbc(c, b) || (current_mbctype ? is_in_list_mbc(c, b) : 0);
is_in_list_sbc   3873 regex.c        		part = not = is_in_list_sbc(cc, p);


is_instance_id

is_instance_id   8846 parse.c            else if (is_instance_id(id)) {
is_instance_id   8901 parse.c            else if (is_instance_id(id)) {
is_instance_id   10158 parse.c            if (is_instance_id(id)) return Qtrue;
is_instance_id   4848 parse.y            else if (is_instance_id(id)) {
is_instance_id   4903 parse.y            else if (is_instance_id(id)) {
is_instance_id   6160 parse.y            if (is_instance_id(id)) return Qtrue;


is_junk_id

is_junk_id       10174 parse.c            if (is_junk_id(id)) return Qtrue;
is_junk_id       6176 parse.y            if (is_junk_id(id)) return Qtrue;


is_local_id

is_local_id      6091 parse.c        			if (!is_local_id(yyvsp[0].id))
is_local_id      6108 parse.c        			if (!is_local_id(yyvsp[-2].id))
is_local_id      6131 parse.c        			if (!is_local_id(yyvsp[0].id))
is_local_id      6147 parse.c        			if (!is_local_id(yyvsp[0].id))
is_local_id      8479 parse.c        	if (is_local_id(yylval.id) &&
is_local_id      8832 parse.c            else if (is_local_id(id)) {
is_local_id      8883 parse.c            else if (is_local_id(id)) {
is_local_id      10095 parse.c        	if (is_local_id(id2)) {
is_local_id      10166 parse.c            if (is_local_id(id)) return Qtrue;
is_local_id      2295 parse.y        			if (!is_local_id($1))
is_local_id      2313 parse.y        			if (!is_local_id($1))
is_local_id      2338 parse.y        			if (!is_local_id($2))
is_local_id      2356 parse.y        			if (!is_local_id($2))
is_local_id      4481 parse.y        	if (is_local_id(yylval.id) &&
is_local_id      4834 parse.y            else if (is_local_id(id)) {
is_local_id      4885 parse.y            else if (is_local_id(id)) {
is_local_id      6097 parse.y        	if (is_local_id(id2)) {
is_local_id      6168 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_notop_id

is_notop_id       159 parse.c        #define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL)
is_notop_id       160 parse.c        #define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL)
is_notop_id       161 parse.c        #define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE)
is_notop_id       162 parse.c        #define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET)
is_notop_id       163 parse.c        #define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST)
is_notop_id       164 parse.c        #define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS)
is_notop_id       165 parse.c        #define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK)
is_notop_id       167 parse.c        #define is_asgn_or_id(id) ((is_notop_id(id)) && \
is_notop_id        62 parse.y        #define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL)
is_notop_id        63 parse.y        #define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL)
is_notop_id        64 parse.y        #define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE)
is_notop_id        65 parse.y        #define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET)
is_notop_id        66 parse.y        #define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST)
is_notop_id        67 parse.y        #define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS)
is_notop_id        68 parse.y        #define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK)
is_notop_id        70 parse.y        #define is_asgn_or_id(id) ((is_notop_id(id)) && \


is_pointer_to_heap

is_pointer_to_heap  625 gc.c           	if (is_pointer_to_heap((void *)v)) {
is_pointer_to_heap  699 gc.c               if (is_pointer_to_heap((void *)obj)) {
is_pointer_to_heap  890 gc.c           	    if (is_pointer_to_heap(obj->as.node.u1.node)) {
is_pointer_to_heap  893 gc.c           	    if (is_pointer_to_heap(obj->as.node.u2.node)) {
is_pointer_to_heap  896 gc.c           	    if (is_pointer_to_heap(obj->as.node.u3.node)) {
is_pointer_to_heap  993 gc.c           	       is_pointer_to_heap(obj) ? "corrupted object" : "non object");
is_pointer_to_heap 1897 gc.c               if (!is_pointer_to_heap((void *)ptr)|| BUILTIN_TYPE(ptr) >= T_BLKTAG) {


is_ruby_native_thread

is_ruby_native_thread 10398 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 1317 gc.c               if (!is_ruby_native_thread()) {
is_ruby_native_thread  700 ruby.h         RUBY_EXTERN int is_ruby_native_thread();


is_socket

is_socket        1863 win32/win32.c  	if (!is_socket(fd)) {
is_socket        2417 win32/win32.c      if (!is_socket(sock)) {
is_socket        3392 win32/win32.c      if (!is_socket(sock)) {
is_socket        3410 win32/win32.c      if (!is_socket(sock)) {


is_special_global_name

is_special_global_name 9925 parse.c        	if (is_special_global_name(++m)) return Qtrue;
is_special_global_name 10002 parse.c        	if (is_special_global_name(++m)) goto new_id;
is_special_global_name 5927 parse.y        	if (is_special_global_name(++m)) return Qtrue;
is_special_global_name 6004 parse.y        	if (is_special_global_name(++m)) goto new_id;


isalnum

isalnum           208 regex.c             if (isalnum(c))
isalnum           213 regex.c             if (isalnum(c))
isalnum           258 regex.c        #define ISALNUM(c) (ISASCII(c) && isalnum(c))
isalnum            52 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            73 missing/os2.c  	    !isalpha(*s) && index("$&*(){}[]'\";\\|?<>~`\n",*s)) {
isalpha            80 missing/os2.c  	    !isalpha(*s) && index("^()<>|&\n",*s)) {
isalpha           259 regex.c        #define ISALPHA(c) (ISASCII(c) && isalpha(c))
isalpha            53 ruby.h         #define ISALPHA(c) (ISASCII(c) && isalpha((int)(unsigned char)(c)))
isalpha           548 win32/win32.c      while (isalpha(c)) {
isalpha          2911 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 )


isascii

isascii           238 regex.c        #if defined STDC_HEADERS || (!defined isascii && !defined HAVE_ISASCII)
isascii           241 regex.c        # define ISASCII(c) isascii(c)
isascii            46 ruby.h         #define ISASCII(c) isascii((int)(unsigned char)(c))


isatty

isatty             70 ext/readline/readline.c     if (!isatty(0) && errno == EBADF) rb_raise(rb_eIOError, "stdin closed");
isatty           2020 io.c               if (isatty(fileno(fptr->f)) == 0)
isatty           4008 io.c               if (!isatty(fileno(f))) {
isatty             85 x68/select.c   	    if (isatty (fd))


isdelim

isdelim          1252 dir.c          	while (p < pend && isdelim(*p)) p++;
isdelim          1254 dir.c          	while (p < pend && !isdelim(*p)) {


isdigit

isdigit           468 bignum.c       	else if (isdigit(c)) {
isdigit          1257 dln.c          	while (isdigit(*message[i])) message[i]++;
isdigit           167 ext/dl/dl.c        if (isdigit(cstr[i+1])) {
isdigit           169 ext/dl/dl.c          while (isdigit(cstr[i+dlen])) { dlen ++; };
isdigit           572 ext/dl/ptr.c       if (isdigit(*ctype)) {
isdigit           574 ext/dl/ptr.c         for (p=ctype; isdigit(*p); p++) ;
isdigit           235 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           257 regex.c        #define ISDIGIT(c) (ISASCII(c) && isdigit(c))
isdigit            54 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          131 dir.c          #define ISDIRSEP(c) (pathname && isdirsep(c))
isdirsep          215 dir.c          	    if (ISDIRSEP(c) && isdirsep(*s))
isdirsep         1003 dir.c          #define BASE (*base && !((isdirsep(*base) && !base[1]) || (base[1] == ':' && isdirsep(base[2]) && !base[3])))
isdirsep         1005 dir.c          #define BASE (*base && !(isdirsep(*base) && !base[1]))
isdirsep         2353 file.c             while (isdirsep(*path)) path++;
isdirsep         2362 file.c             while (*s && !isdirsep(*s)) {
isdirsep         2379 file.c             if (isdirsep(path[0]) && isdirsep(path[1])) {
isdirsep         2381 file.c         	while (isdirsep(*path)) path++;
isdirsep         2382 file.c         	if (*(path = nextdirsep(path)) && path[1] && !isdirsep(path[1]))
isdirsep         2402 file.c         	if (isdirsep(*path)) {
isdirsep         2404 file.c         	    while (isdirsep(*path)) path++;
isdirsep         2421 file.c         	if (isdirsep(*path)) {
isdirsep         2423 file.c         	    while (isdirsep(*path)) path++;
isdirsep         2468 file.c         	if (isdirsep(s[1]) || s[1] == '\0') {
isdirsep         2516 file.c         	if (isdirsep(s[2])) {
isdirsep         2564 file.c         	if (isdirsep(*s)) {
isdirsep         2575 file.c         	do s++; while (isdirsep(*s));
isdirsep         2598 file.c         		    if (*(s+1) == '\0' || isdirsep(*(s+1))) {
isdirsep         2753 file.c             while (isdirsep(*name))
isdirsep         2783 file.c         	while (isdirsep(*p)) p++; /* skip last / */
isdirsep         2815 file.c             if (root > name + 1 && isdirsep(*name))
isdirsep         2828 file.c             if (has_drive_letter(name) && isdirsep(*(name + 2))) {
isdirsep         2959 file.c         	    if (RSTRING(tmp)->ptr && isdirsep(RSTRING(tmp)->ptr[0])) {
isdirsep         4035 file.c             if (has_drive_letter(path) && isdirsep(path[2])) return 1;
isdirsep         4038 file.c             if (isdirsep(path[0]) && isdirsep(path[1])) return 1;
isdirsep          541 win32/win32.c      if ((i == 0 || i > 0 && isdirsep(interp[i-1])) &&


isinf

isinf             846 bignum.c           if (isinf(d)) {
isinf             887 bignum.c           if (isinf(d)) {
isinf            3488 ext/bigdecimal/bigdecimal.c     if(isinf(d)) {
isinf             303 marshal.c          if (isinf(d)) {
isinf              69 missing.h      extern int isinf _((double));
isinf              15 missing/erf.c  #  ifndef isinf
isinf               7 missing/finite.c     return !isnan(n) && !isinf(n);
isinf             704 missing/vsnprintf.c 			if (isinf(_double)) {
isinf             497 numeric.c          if (isinf(value))
isinf            1175 numeric.c          if (isinf(value)) {
isinf            1202 numeric.c          if (isinf(value) || isnan(value))
isinf             704 sprintf.c      		if (isnan(fval) || isinf(fval)) {
isinf               4 vms/vms.h      extern int isinf(double);


islower

islower           471 bignum.c       	else if (islower(c)) {
islower           530 missing/strftime.c 				if (islower(tbuf[i]))
islower           261 regex.c        #define ISLOWER(c) (ISASCII(c) && islower(c))
islower            51 ruby.h         #define ISLOWER(c) (ISASCII(c) && islower((int)(unsigned char)(c)))


isnan

isnan             849 bignum.c           if (isnan(d)) {
isnan             982 bignum.c       	    if (isnan(a)) return Qfalse;
isnan            3484 ext/bigdecimal/bigdecimal.c     if(isnan(d)) {
isnan             307 marshal.c          else if (isnan(d)) {
isnan              67 missing.h      # define isinf(x) (!finite(x) && !isnan(x))
isnan              74 missing.h      extern int isnan _((double));
isnan              12 missing/erf.c  #  ifndef isnan
isnan              76 missing/erf.c          if (isnan(x)) return x;      /* erf(NaN)   = NaN   */
isnan              87 missing/erf.c          if (isnan(x)) return x;      /* erfc(NaN)   = NaN      */
isnan               7 missing/finite.c     return !isnan(n) && !isinf(n);
isnan              35 missing/isinf.c     return (!finite(n) && !isnan(n));
isnan             711 missing/vsnprintf.c 			if (isnan(_double)) {
isnan             499 numeric.c          else if(isnan(value))
isnan             836 numeric.c      	if (isnan(b)) return Qfalse;
isnan             842 numeric.c          if (isnan(a)) return Qfalse;
isnan             875 numeric.c          if (isnan(a) || isnan(b)) return Qnil;
isnan             942 numeric.c      	if (isnan(b)) return Qfalse;
isnan             948 numeric.c          if (isnan(a)) return Qfalse;
isnan             978 numeric.c      	if (isnan(b)) return Qfalse;
isnan             984 numeric.c          if (isnan(a)) return Qfalse;
isnan            1013 numeric.c      	if (isnan(b)) return Qfalse;
isnan            1019 numeric.c          if (isnan(a)) return Qfalse;
isnan            1049 numeric.c      	if (isnan(b)) return Qfalse;
isnan            1055 numeric.c          if (isnan(a)) return Qfalse;
isnan            1078 numeric.c      	if (isnan(a) || isnan(b)) return Qfalse;
isnan            1154 numeric.c          return isnan(value) ? Qtrue : Qfalse;
isnan            1202 numeric.c          if (isinf(value) || isnan(value))
isnan            2367 object.c       	  if (isnan(RFLOAT(f)->value)) {
isnan             704 sprintf.c      		if (isnan(fval) || isinf(fval)) {
isnan             707 sprintf.c      		    if  (isnan(fval)) {
isnan             714 sprintf.c      		    if ((!isnan(fval) && fval < 0.0) || (flags & FPLUS))
isnan             722 sprintf.c      			if (!isnan(fval) && fval < 0.0)
isnan             731 sprintf.c      			if (!isnan(fval) && fval < 0.0) {
isnan             749 sprintf.c      			if (!isnan(fval) && fval < 0.0)
isnan               5 vms/vms.h      extern int isnan(double);
isnan             227 win32/win32.h  #ifndef isnan


iso2022jp_check_conv

iso2022jp_check_conv  319 ext/nkf/nkf-utf8/nkf.c STATIC  void    iso2022jp_check_conv PROTO((int c2,int c1));
iso2022jp_check_conv 1824 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           252 regex.c        # define ISGRAPH(c) (ISASCII(c) && isprint(c) && !isspace(c))
isprint           256 regex.c        #define ISPRINT(c) (ISASCII(c) && isprint(c))
isprint            48 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            95 missing/os2.c  	while (*s && isspace(*s)) s++;
isspace            98 missing/os2.c  	while (*s && !isspace(*s)) s++;
isspace           124 missing/strtod.c     while (isspace(*p)) {
isspace            14 missing/strtol.c     while (isspace(*p)) {
isspace            81 missing/strtoul.c     while (isspace(*p)) {
isspace           252 regex.c        # define ISGRAPH(c) (ISASCII(c) && isprint(c) && !isspace(c))
isspace           263 regex.c        #define ISSPACE(c) (ISASCII(c) && isspace(c))
isspace            49 ruby.h         #define ISSPACE(c) (ISASCII(c) && isspace((int)(unsigned char)(c)))
isspace           547 win32/win32.c      } while (isspace(c));
isspace           182 wince/wince.h    #define ispunct(c) ( !(isalnum(c)||isspace(c))?1:0 )


isupper

isupper           474 bignum.c       	else if (isupper(c)) {
isupper            28 ext/readline/readline.c #define TOLOWER(c) (isupper(c) ? tolower(c) : c)
isupper            41 missing/os2.c  	    *s = isupper(*s) ? tolower(*s) : *s;
isupper            50 missing/os2.c  	    *s = isupper(*s) ? tolower(*s) : *s;
isupper            59 missing/os2.c  	    *s = isupper(*s) ? tolower(*s) : *s;
isupper           264 regex.c        #define ISUPPER(c) (ISASCII(c) && isupper(c))
isupper            50 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))


isxdigit

isxdigit          265 regex.c        #define ISXDIGIT(c) (ISASCII(c) && isxdigit(c))
isxdigit           55 ruby.h         #define ISXDIGIT(c) (ISASCII(c) && isxdigit((int)(unsigned char)(c)))


itoh4

itoh4            4318 ext/nkf/nkf-utf8/nkf.c 	    (*o_mputc)(itoh4(((c>>4)&0xf)));
itoh4            4319 ext/nkf/nkf-utf8/nkf.c 	    (*o_mputc)(itoh4((c&0xf)));


ivar_get

ivar_get         1031 variable.c         return ivar_get(obj, id, Qtrue);
ivar_get         1039 variable.c         return ivar_get(obj, id, Qfalse);


ivar_i

ivar_i           1126 variable.c     	    st_foreach_safe(ROBJECT(obj)->iv_tbl, ivar_i, ary);
ivar_i           1135 variable.c     		st_foreach_safe(tbl, ivar_i, ary);


j_oconv

j_oconv           312 ext/nkf/nkf-utf8/nkf.c STATIC  void    j_oconv PROTO((int c2,int c1));
j_oconv           505 ext/nkf/nkf-utf8/nkf.c #   define  DEFAULT_CONV j_oconv
j_oconv          1103 ext/nkf/nkf-utf8/nkf.c             output_conv = j_oconv;


jmp_buf

jmp_buf           147 eval.c         static jmp_buf function_call_may_return_twice_jmp_buf;
jmp_buf           160 eval.c         typedef jmp_buf rb_jmpbuf_t;
jmp_buf          1313 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));


jump_tag_but_local_jump

jump_tag_but_local_jump 1795 eval.c             jump_tag_but_local_jump(state, val);
jump_tag_but_local_jump 5854 eval.c         		jump_tag_but_local_jump(state, result);
jump_tag_but_local_jump 6739 eval.c             if (state) jump_tag_but_local_jump(state, Qundef);


kALIAS

kALIAS            120 lex.c                {"alias", {kALIAS, kALIAS}, EXPR_FNAME}
kALIAS            256 parse.y        	kALIAS
kALIAS            412 parse.y        stmt		: kALIAS fitem {lex_state = EXPR_FNAME;} fitem
kALIAS            416 parse.y        		| kALIAS tGVAR tGVAR
kALIAS            420 parse.y        		| kALIAS tGVAR tBACK_REF
kALIAS            427 parse.y        		| kALIAS tGVAR tNTH_REF
kALIAS            962 parse.y        		| kALIAS | kAND | kBEGIN | kBREAK | kCASE | kCLASS | kDEF


kAND

kAND              110 lex.c                {"and", {kAND, kAND}, EXPR_BEG},
kAND              248 parse.y        	kAND
kAND              322 parse.y        %left  kOR kAND
kAND              617 parse.y        		| expr kAND expr
kAND              962 parse.y        		| kALIAS | kAND | kBEGIN | kBREAK | kCASE | kCLASS | kDEF


kBEGIN

kBEGIN            111 lex.c                {"begin", {kBEGIN, kBEGIN}, EXPR_BEG},
kBEGIN            219 parse.y        	kBEGIN
kBEGIN            962 parse.y        		| kALIAS | kAND | kBEGIN | kBREAK | kCASE | kCLASS | kDEF
kBEGIN           1464 parse.y        		| kBEGIN


kBREAK

kBREAK            100 lex.c                {"break", {kBREAK, kBREAK}, EXPR_MID},
kBREAK            233 parse.y        	kBREAK
kBREAK            649 parse.y        		| kBREAK call_args
kBREAK            962 parse.y        		| kALIAS | kAND | kBEGIN | kBREAK | kCASE | kCLASS | kDEF
kBREAK           1707 parse.y        		| kBREAK


kCASE

kCASE              81 lex.c                {"case", {kCASE, kCASE}, EXPR_BEG},
kCASE             228 parse.y        	kCASE
kCASE             962 parse.y        		| kALIAS | kAND | kBEGIN | kBREAK | kCASE | kCLASS | kDEF
kCASE            1598 parse.y        		| kCASE expr_value opt_terms
kCASE            1605 parse.y        		| kCASE opt_terms case_body kEND
kCASE            1609 parse.y        		| kCASE opt_terms kELSE compstmt kEND


kCLASS

kCLASS            113 lex.c                {"class", {kCLASS, kCLASS}, EXPR_CLASS},
kCLASS            215 parse.y        %token  kCLASS
kCLASS            962 parse.y        		| kALIAS | kAND | kBEGIN | kBREAK | kCASE | kCLASS | kDEF
kCLASS           1620 parse.y        		| kCLASS cpath superclass
kCLASS           1636 parse.y        		| kCLASS tLSHFT expr


kDEF

kDEF               85 lex.c                {"def", {kDEF, kDEF}, EXPR_FNAME},
kDEF              217 parse.y        	kDEF
kDEF              962 parse.y        		| kALIAS | kAND | kBEGIN | kBREAK | kCASE | kCLASS | kDEF
kDEF             1674 parse.y        		| kDEF fname
kDEF             1692 parse.y        		| kDEF singleton dot_or_colon {lex_state = EXPR_FNAME;} fname


kDEFINED

kDEFINED           97 lex.c                {"defined?", {kDEFINED, kDEFINED}, EXPR_ARG},
kDEFINED          257 parse.y        	kDEFINED
kDEFINED          324 parse.y        %nonassoc kDEFINED
kDEFINED          963 parse.y        		| kDEFINED | kDO | kELSE | kELSIF | kEND | kENSURE | kFALSE
kDEFINED         1220 parse.y        		| kDEFINED opt_nl {in_defined = 1;} arg
kDEFINED         1531 parse.y        		| kDEFINED opt_nl '(' {in_defined = 1;} expr ')'


kDO

kDO               102 lex.c                {"do", {kDO, kDO}, EXPR_BEG},
kDO              8444 parse.c        		    if (kw->id[0] == kDO) {
kDO              8450 parse.c        			return kDO;
kDO               238 parse.y        	kDO
kDO               963 parse.y        		| kDEFINED | kDO | kELSE | kELSIF | kEND | kENSURE | kFALSE
kDO              1854 parse.y        		| kDO
kDO              4446 parse.y        		    if (kw->id[0] == kDO) {
kDO              4452 parse.y        			return kDO;


kDO_BLOCK

kDO_BLOCK        8447 parse.c        			    return kDO_BLOCK;
kDO_BLOCK        8449 parse.c        			    return kDO_BLOCK;
kDO_BLOCK         240 parse.y        	kDO_BLOCK
kDO_BLOCK        1779 parse.y        do_block	: kDO_BLOCK
kDO_BLOCK        4449 parse.y        			    return kDO_BLOCK;
kDO_BLOCK        4451 parse.y        			    return kDO_BLOCK;


kDO_COND

kDO_COND         8445 parse.c        			if (COND_P()) return kDO_COND;
kDO_COND          239 parse.y        	kDO_COND
kDO_COND         1740 parse.y        		| kDO_COND
kDO_COND         4447 parse.y        			if (COND_P()) return kDO_COND;


kELSE

kELSE              80 lex.c                {"else", {kELSE, kELSE}, EXPR_BEG},
kELSE             227 parse.y        	kELSE
kELSE             963 parse.y        		| kDEFINED | kDO | kELSE | kELSIF | kEND | kENSURE | kFALSE
kELSE            1609 parse.y        		| kCASE opt_terms kELSE compstmt kEND
kELSE            1754 parse.y        		| kELSE compstmt


kELSIF

kELSIF             84 lex.c                {"elsif", {kELSIF, kELSIF}, EXPR_BEG},
kELSIF            226 parse.y        	kELSIF
kELSIF            963 parse.y        		| kDEFINED | kDO | kELSE | kELSIF | kEND | kENSURE | kFALSE
kELSIF           1744 parse.y        		| kELSIF expr_value then


kEND

kEND               79 lex.c                {"end", {kEND, kEND}, EXPR_END},
kEND              222 parse.y        	kEND
kEND              963 parse.y        		| kDEFINED | kDO | kELSE | kELSIF | kEND | kENSURE | kFALSE
kEND             1469 parse.y        		  kEND
kEND             1555 parse.y        		  kEND
kEND             1568 parse.y        		  kEND
kEND             1580 parse.y        		  kEND
kEND             1590 parse.y        		  kEND
kEND             1600 parse.y        		  kEND
kEND             1605 parse.y        		| kCASE opt_terms case_body kEND
kEND             1609 parse.y        		| kCASE opt_terms kELSE compstmt kEND
kEND             1615 parse.y        		  kEND
kEND             1629 parse.y        		  kEND
kEND             1649 parse.y        		  kEND
kEND             1667 parse.y        		  kEND
kEND             1683 parse.y        		  kEND
kEND             1700 parse.y        		  kEND
kEND             1786 parse.y        		  kEND
kEND             1860 parse.y        		  compstmt kEND


kENSURE

kENSURE            82 lex.c                {"ensure", {kENSURE, kENSURE}, EXPR_BEG},
kENSURE           221 parse.y        	kENSURE
kENSURE           963 parse.y        		| kDEFINED | kDO | kELSE | kELSIF | kEND | kENSURE | kFALSE
kENSURE          1919 parse.y        opt_ensure	: kENSURE compstmt


kFALSE

kFALSE             92 lex.c                {"false", {kFALSE, kFALSE}, EXPR_END},
kFALSE           5953 parse.c        {yyval.id = kFALSE;}
kFALSE           8823 parse.c            else if (id == kFALSE) {
kFALSE           8874 parse.c            else if (id == kFALSE) {
kFALSE            247 parse.y        	kFALSE
kFALSE            963 parse.y        		| kDEFINED | kDO | kELSE | kELSIF | kEND | kENSURE | kFALSE
kFALSE           2192 parse.y        		| kFALSE {$$ = kFALSE;}
kFALSE           4825 parse.y            else if (id == kFALSE) {
kFALSE           4876 parse.y            else if (id == kFALSE) {


kFOR

kFOR               90 lex.c                {"for", {kFOR, kFOR}, EXPR_BEG},
kFOR              232 parse.y        	kFOR
kFOR              964 parse.y        		| kFOR | kIN | kMODULE | kNEXT | kNIL | kNOT
kFOR             1613 parse.y        		| kFOR block_var kIN {COND_PUSH(1);} expr_value do {COND_POP();}


kIF

kIF                96 lex.c                {"if", {kIF, kIF_MOD}, EXPR_BEG},
kIF               223 parse.y        	kIF
kIF              1552 parse.y        		| kIF expr_value then


kIF_MOD

kIF_MOD            96 lex.c                {"if", {kIF, kIF_MOD}, EXPR_BEG},
kIF_MOD           251 parse.y        	kIF_MOD
kIF_MOD           321 parse.y        %nonassoc  kIF_MOD kUNLESS_MOD kWHILE_MOD kUNTIL_MOD
kIF_MOD           436 parse.y        		| stmt kIF_MOD expr_value
kIF_MOD           967 parse.y        		| kIF_MOD | kUNLESS_MOD | kWHILE_MOD | kUNTIL_MOD | kRESCUE_MOD


kIN

kIN               101 lex.c                {"in", {kIN, kIN}, EXPR_BEG},
kIN               237 parse.y        	kIN
kIN               964 parse.y        		| kFOR | kIN | kMODULE | kNEXT | kNIL | kNOT
kIN              1613 parse.y        		| kFOR block_var kIN {COND_PUSH(1);} expr_value do {COND_POP();}


kMODULE

kMODULE            83 lex.c                {"module", {kMODULE, kMODULE}, EXPR_BEG},
kMODULE           216 parse.y        	kMODULE
kMODULE           964 parse.y        		| kFOR | kIN | kMODULE | kNEXT | kNIL | kNOT
kMODULE          1658 parse.y        		| kMODULE cpath


kNEXT

kNEXT             107 lex.c                {"next", {kNEXT, kNEXT}, EXPR_MID},
kNEXT             234 parse.y        	kNEXT
kNEXT             653 parse.y        		| kNEXT call_args
kNEXT             964 parse.y        		| kFOR | kIN | kMODULE | kNEXT | kNIL | kNOT
kNEXT            1711 parse.y        		| kNEXT


kNIL

kNIL              103 lex.c                {"nil", {kNIL, kNIL}, EXPR_END},
kNIL             5941 parse.c        {yyval.id = kNIL;}
kNIL             8817 parse.c            else if (id == kNIL) {
kNIL             8868 parse.c            else if (id == kNIL) {
kNIL              245 parse.y        	kNIL
kNIL              964 parse.y        		| kFOR | kIN | kMODULE | kNEXT | kNIL | kNOT
kNIL             2189 parse.y        		| kNIL {$$ = kNIL;}
kNIL             4819 parse.y            else if (id == kNIL) {
kNIL             4870 parse.y            else if (id == kNIL) {


kNOT

kNOT               87 lex.c                {"not", {kNOT, kNOT}, EXPR_BEG},
kNOT              250 parse.y        	kNOT
kNOT              323 parse.y        %right kNOT
kNOT              625 parse.y        		| kNOT expr
kNOT              964 parse.y        		| kFOR | kIN | kMODULE | kNEXT | kNIL | kNOT


kOR

kOR               106 lex.c                {"or", {kOR, kOR}, EXPR_BEG},
kOR               249 parse.y        	kOR
kOR               322 parse.y        %left  kOR kAND
kOR               621 parse.y        		| expr kOR expr
kOR               965 parse.y        		| kOR | kREDO | kRESCUE | kRETRY | kRETURN | kSELF | kSUPER


kREDO

kREDO             109 lex.c                {"redo", {kREDO, kREDO}, EXPR_END},
kREDO             235 parse.y        	kREDO
kREDO             965 parse.y        		| kOR | kREDO | kRESCUE | kRETRY | kRETURN | kSELF | kSUPER
kREDO            1715 parse.y        		| kREDO


kRESCUE

kRESCUE            86 lex.c                {"rescue", {kRESCUE, kRESCUE_MOD}, EXPR_MID},
kRESCUE           220 parse.y        	kRESCUE
kRESCUE           965 parse.y        		| kOR | kREDO | kRESCUE | kRETRY | kRETURN | kSELF | kSUPER
kRESCUE          1890 parse.y        opt_rescue	: kRESCUE exc_list exc_var then


kRESCUE_MOD

kRESCUE_MOD        86 lex.c                {"rescue", {kRESCUE, kRESCUE_MOD}, EXPR_MID},
kRESCUE_MOD       255 parse.y        	kRESCUE_MOD
kRESCUE_MOD       326 parse.y        %left kRESCUE_MOD
kRESCUE_MOD       478 parse.y        		| stmt kRESCUE_MOD stmt
kRESCUE_MOD       967 parse.y        		| kIF_MOD | kUNLESS_MOD | kWHILE_MOD | kUNTIL_MOD | kRESCUE_MOD
kRESCUE_MOD       974 parse.y        		| lhs '=' arg kRESCUE_MOD arg


kRETRY

kRETRY             93 lex.c                {"retry", {kRETRY, kRETRY}, EXPR_END},
kRETRY            236 parse.y        	kRETRY
kRETRY            965 parse.y        		| kOR | kREDO | kRESCUE | kRETRY | kRETURN | kSELF | kSUPER
kRETRY           1719 parse.y        		| kRETRY


kRETURN

kRETURN            94 lex.c                {"return", {kRETURN, kRETURN}, EXPR_MID},
kRETURN           241 parse.y        	kRETURN
kRETURN           645 parse.y        		| kRETURN call_args
kRETURN           965 parse.y        		| kOR | kREDO | kRESCUE | kRETRY | kRETURN | kSELF | kSUPER
kRETURN          1515 parse.y        		| kRETURN


kSELF

kSELF              91 lex.c                {"self", {kSELF, kSELF}, EXPR_END},
kSELF            5945 parse.c        {yyval.id = kSELF;}
kSELF            8814 parse.c            if (id == kSELF) {
kSELF            8865 parse.c            if (id == kSELF) {
kSELF             244 parse.y        	kSELF
kSELF             965 parse.y        		| kOR | kREDO | kRESCUE | kRETRY | kRETURN | kSELF | kSUPER
kSELF            2190 parse.y        		| kSELF {$$ = kSELF;}
kSELF            4816 parse.y            if (id == kSELF) {
kSELF            4867 parse.y            if (id == kSELF) {


kSUPER

kSUPER             98 lex.c                {"super", {kSUPER, kSUPER}, EXPR_ARG},
kSUPER            243 parse.y        	kSUPER
kSUPER            736 parse.y        		| kSUPER command_args
kSUPER            965 parse.y        		| kOR | kREDO | kRESCUE | kRETRY | kRETURN | kSELF | kSUPER
kSUPER           1832 parse.y        		| kSUPER paren_args
kSUPER           1836 parse.y        		| kSUPER


kTHEN

kTHEN              88 lex.c                {"then", {kTHEN, kTHEN}, EXPR_BEG},
kTHEN             225 parse.y        	kTHEN
kTHEN             966 parse.y        		| kTHEN | kTRUE | kUNDEF | kWHEN | kYIELD
kTHEN            1734 parse.y        		| kTHEN
kTHEN            1735 parse.y        		| term kTHEN


kTRUE

kTRUE              95 lex.c                {"true", {kTRUE, kTRUE}, EXPR_END},
kTRUE            5949 parse.c        {yyval.id = kTRUE;}
kTRUE            8820 parse.c            else if (id == kTRUE) {
kTRUE            8871 parse.c            else if (id == kTRUE) {
kTRUE             246 parse.y        	kTRUE
kTRUE             966 parse.y        		| kTHEN | kTRUE | kUNDEF | kWHEN | kYIELD
kTRUE            2191 parse.y        		| kTRUE {$$ = kTRUE;}
kTRUE            4822 parse.y            else if (id == kTRUE) {
kTRUE            4873 parse.y            else if (id == kTRUE) {


kUNDEF

kUNDEF             99 lex.c                {"undef", {kUNDEF, kUNDEF}, EXPR_FNAME},
kUNDEF            218 parse.y        	kUNDEF
kUNDEF            432 parse.y        		| kUNDEF undef_list
kUNDEF            966 parse.y        		| kTHEN | kTRUE | kUNDEF | kWHEN | kYIELD


kUNLESS

kUNLESS           105 lex.c                {"unless", {kUNLESS, kUNLESS_MOD}, EXPR_BEG},
kUNLESS           224 parse.y        	kUNLESS
kUNLESS          1565 parse.y        		| kUNLESS expr_value then


kUNLESS_MOD

kUNLESS_MOD       105 lex.c                {"unless", {kUNLESS, kUNLESS_MOD}, EXPR_BEG},
kUNLESS_MOD       252 parse.y        	kUNLESS_MOD
kUNLESS_MOD       321 parse.y        %nonassoc  kIF_MOD kUNLESS_MOD kWHILE_MOD kUNTIL_MOD
kUNLESS_MOD       445 parse.y        		| stmt kUNLESS_MOD expr_value
kUNLESS_MOD       967 parse.y        		| kIF_MOD | kUNLESS_MOD | kWHILE_MOD | kUNTIL_MOD | kRESCUE_MOD


kUNTIL

kUNTIL            104 lex.c                {"until", {kUNTIL, kUNTIL_MOD}, EXPR_BEG},
kUNTIL            231 parse.y        	kUNTIL
kUNTIL           1588 parse.y        		| kUNTIL {COND_PUSH(1);} expr_value do {COND_POP();}


kUNTIL_MOD

kUNTIL_MOD        104 lex.c                {"until", {kUNTIL, kUNTIL_MOD}, EXPR_BEG},
kUNTIL_MOD        254 parse.y        	kUNTIL_MOD
kUNTIL_MOD        321 parse.y        %nonassoc  kIF_MOD kUNLESS_MOD kWHILE_MOD kUNTIL_MOD
kUNTIL_MOD        466 parse.y        		| stmt kUNTIL_MOD expr_value
kUNTIL_MOD        967 parse.y        		| kIF_MOD | kUNLESS_MOD | kWHILE_MOD | kUNTIL_MOD | kRESCUE_MOD


kWHEN

kWHEN             108 lex.c                {"when", {kWHEN, kWHEN}, EXPR_BEG},
kWHEN             229 parse.y        	kWHEN
kWHEN             966 parse.y        		| kTHEN | kTRUE | kUNDEF | kWHEN | kYIELD
kWHEN            1868 parse.y        case_body	: kWHEN when_args then


kWHILE

kWHILE            117 lex.c                {"while", {kWHILE, kWHILE_MOD}, EXPR_BEG},
kWHILE            230 parse.y        	kWHILE
kWHILE           1578 parse.y        		| kWHILE {COND_PUSH(1);} expr_value do {COND_POP();}


kWHILE_MOD

kWHILE_MOD        117 lex.c                {"while", {kWHILE, kWHILE_MOD}, EXPR_BEG},
kWHILE_MOD        253 parse.y        	kWHILE_MOD
kWHILE_MOD        321 parse.y        %nonassoc  kIF_MOD kUNLESS_MOD kWHILE_MOD kUNTIL_MOD
kWHILE_MOD        454 parse.y        		| stmt kWHILE_MOD expr_value
kWHILE_MOD        967 parse.y        		| kIF_MOD | kUNLESS_MOD | kWHILE_MOD | kUNTIL_MOD | kRESCUE_MOD


kYIELD

kYIELD             89 lex.c                {"yield", {kYIELD, kYIELD}, EXPR_ARG},
kYIELD            242 parse.y        	kYIELD
kYIELD            741 parse.y        		| kYIELD command_args
kYIELD            966 parse.y        		| kTHEN | kTRUE | kUNDEF | kWHEN | kYIELD
kYIELD           1519 parse.y        		| kYIELD '(' call_args ')'
kYIELD           1523 parse.y        		| kYIELD '(' ')'
kYIELD           1527 parse.y        		| kYIELD


k__FILE__

k__FILE__         114 lex.c                {"__FILE__", {k__FILE__, k__FILE__}, EXPR_END},
k__FILE__        5957 parse.c        {yyval.id = k__FILE__;}
k__FILE__        8826 parse.c            else if (id == k__FILE__) {
k__FILE__        8877 parse.c            else if (id == k__FILE__) {
k__FILE__         261 parse.y        	k__FILE__
k__FILE__         961 parse.y        reswords	: k__LINE__ | k__FILE__  | klBEGIN | klEND
k__FILE__        2193 parse.y        		| k__FILE__ {$$ = k__FILE__;}
k__FILE__        4828 parse.y            else if (id == k__FILE__) {
k__FILE__        4879 parse.y            else if (id == k__FILE__) {


k__LINE__

k__LINE__         112 lex.c                {"__LINE__", {k__LINE__, k__LINE__}, EXPR_END},
k__LINE__        5961 parse.c        {yyval.id = k__LINE__;}
k__LINE__        8829 parse.c            else if (id == k__LINE__) {
k__LINE__        8880 parse.c            else if (id == k__LINE__) {
k__LINE__         260 parse.y        	k__LINE__
k__LINE__         961 parse.y        reswords	: k__LINE__ | k__FILE__  | klBEGIN | klEND
k__LINE__        2194 parse.y        		| k__LINE__ {$$ = k__LINE__;}
k__LINE__        4831 parse.y            else if (id == k__LINE__) {
k__LINE__        4882 parse.y            else if (id == k__LINE__) {


kanji_convert

kanji_convert     290 ext/nkf/nkf-utf8/nkf.c STATIC  int     kanji_convert PROTO((FILE *f));
kanji_convert     740 ext/nkf/nkf-utf8/nkf.c           kanji_convert(stdin);
kanji_convert     830 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     2248 re.c               rb_define_virtual_variable("$KCODE", kcode_getter, kcode_setter);
kcode_getter     2249 re.c               rb_define_virtual_variable("$-K", kcode_getter, kcode_setter);


kcode_reset_option

kcode_reset_option  256 re.c               kcode_reset_option();
kcode_reset_option  491 re.c           	    kcode_reset_option();
kcode_reset_option  873 re.c           	kcode_reset_option();
kcode_reset_option  907 re.c           	kcode_reset_option();
kcode_reset_option  919 re.c           	kcode_reset_option();
kcode_reset_option 1372 re.c           	kcode_reset_option();
kcode_reset_option 1835 re.c               kcode_reset_option();


kcode_set_option

kcode_set_option  254 re.c               kcode_set_option(re);
kcode_set_option  487 re.c           	    kcode_set_option(re);
kcode_set_option  850 re.c           	    kcode_set_option(re);
kcode_set_option  871 re.c           	kcode_set_option(re);
kcode_set_option  905 re.c           	kcode_set_option(re);
kcode_set_option 1360 re.c           	kcode_set_option((VALUE)re);


kcode_setter

kcode_setter     2248 re.c               rb_define_virtual_variable("$KCODE", kcode_getter, kcode_setter);
kcode_setter     2249 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              287 signal.c       	    if (kill(-pid, sig) < 0)
kill              295 signal.c       	    if (kill(FIX2INT(argv[i]), sig) < 0)
kill              208 win32/win32.h  extern int kill(int, int);


klBEGIN

klBEGIN           116 lex.c                {"BEGIN", {klBEGIN, klBEGIN}, EXPR_END},
klBEGIN           258 parse.y        	klBEGIN
klBEGIN           482 parse.y        		| klBEGIN
klBEGIN           961 parse.y        reswords	: k__LINE__ | k__FILE__  | klBEGIN | klEND


klEND

klEND             115 lex.c                {"END", {klEND, klEND}, EXPR_END},
klEND             259 parse.y        	klEND
klEND             496 parse.y        		| klEND '{' compstmt '}'
klEND             961 parse.y        reswords	: k__LINE__ | k__FILE__  | klBEGIN | klEND


last_status_set

last_status_set   598 process.c      	last_status_set(*st, pid);
last_status_set   628 process.c      	last_status_set(*st, result);
last_status_set   656 process.c          last_status_set(status, pid);
last_status_set   822 process.c      	last_status_set(status, pid);
last_status_set  1439 process.c          last_status_set(status, 0);
last_status_set  1470 process.c          last_status_set(status == -1 ? 127 : status, 0);
last_status_set  1490 process.c          last_status_set((status & 0xff) << 8, 0);


lchmod_internal

lchmod_internal  1767 file.c         static void lchmod_internal _((const char *, void *));
lchmod_internal  1800 file.c             n = apply2files(lchmod_internal, rest, (void *)(long)mode);


lchown_internal

lchown_internal  1911 file.c         static void lchown_internal _((const char *, void *));
lchown_internal  1958 file.c             n = apply2files(lchown_internal, rest, &arg);


lesser

lesser            911 string.c           len = lesser(RSTRING(str1)->len, RSTRING(str2)->len);
lesser            967 string.c       	       lesser(RSTRING(str1)->len, RSTRING(str2)->len)) == 0)
lesser           1047 string.c           len = lesser(RSTRING(str1)->len, RSTRING(str2)->len);


lex_get_str

lex_get_str      6662 parse.c            lex_gets = lex_get_str;
lex_get_str      2664 parse.y            lex_gets = lex_get_str;


lex_getline

lex_getline      6701 parse.c        	    VALUE v = lex_getline();
lex_getline      2703 parse.y        	    VALUE v = lex_getline();


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      474 random.c                       return LONG2NUM(limited_rand(FIX2LONG((VALUE)limit)));
limited_rand      493 random.c           val = limited_rand(max-1);


link

link              965 dir.c          	    } *tmp, *link, **tail = &link;
link             1051 dir.c          	    if (link) {
link             1052 dir.c          		while (link) {
link             1054 dir.c          			if (stat(link->path, &st) == 0) {
link             1056 dir.c          				int len = strlen(link->path);
link             1060 dir.c          				sprintf(buf, "%s%s", link->path, m);
link             1065 dir.c          			    sys_warning(link->path);
link             1068 dir.c          		    tmp = link;
link             1069 dir.c          		    link = link->next;
link             7606 eval.c             struct end_proc_data *link = ALLOC(struct end_proc_data);
link             7611 eval.c             link->next = *list;
link             7612 eval.c             link->func = func;
link             7613 eval.c             link->data = data;
link             7614 eval.c             link->safe = ruby_safe_level;
link             7615 eval.c             *list = link;
link             7621 eval.c             struct end_proc_data *link;
link             7623 eval.c             link = end_procs;
link             7624 eval.c             while (link) {
link             7625 eval.c         	rb_gc_mark(link->data);
link             7626 eval.c         	link = link->next;
link             7628 eval.c             link = ephemeral_end_procs;
link             7629 eval.c             while (link) {
link             7630 eval.c         	rb_gc_mark(link->data);
link             7631 eval.c         	link = link->next;
link             7633 eval.c             link = tmp_end_procs;
link             7634 eval.c             while (link) {
link             7635 eval.c         	rb_gc_mark(link->data);
link             7636 eval.c         	link = link->next;
link             7704 eval.c             struct end_proc_data *link, *tmp;
link             7709 eval.c         	tmp_end_procs = link = ephemeral_end_procs;
link             7711 eval.c         	while (link) {
link             7714 eval.c         		ruby_safe_level = link->safe;
link             7715 eval.c         		(*link->func)(link->data);
link             7721 eval.c         	    tmp = link;
link             7722 eval.c         	    tmp_end_procs = link = link->next;
link             7727 eval.c         	tmp_end_procs = link = end_procs;
link             7729 eval.c         	while (link) {
link             7732 eval.c         		ruby_safe_level = link->safe;
link             7733 eval.c         		(*link->func)(link->data);
link             7739 eval.c         	    tmp = link;
link             7740 eval.c         	    tmp_end_procs = link = link->next;
link             2090 file.c             if (link(StringValueCStr(from), StringValueCStr(to)) < 0) {
link              203 win32/win32.h  extern int link(char *, char *);


list_append

list_append       238 parse.c        static NODE *list_append();
list_append      3910 parse.c        			yyvsp[-3].node = list_append(yyvsp[-3].node, NEW_NIL());
list_append      4169 parse.c        			yyval.node = NEW_MASGN(list_append(yyvsp[-1].node,yyvsp[0].node), 0);
list_append      4211 parse.c        			yyval.node = list_append(yyvsp[-2].node, yyvsp[-1].node);
list_append      4526 parse.c        			yyvsp[-3].node = list_append(yyvsp[-3].node, NEW_NIL());
list_append      4897 parse.c        			yyval.node = list_append(yyvsp[-4].node, yyvsp[-2].node);
list_append      4937 parse.c        			yyval.node = list_append(yyvsp[-3].node, NEW_HASH(yyvsp[-1].node));
list_append      4945 parse.c        			yyval.node = arg_concat(list_append(yyvsp[-6].node, NEW_HASH(yyvsp[-4].node)), yyvsp[-1].node);
list_append      4998 parse.c        			yyval.node = list_append(NEW_LIST(yyvsp[-3].node), NEW_HASH(yyvsp[-1].node));
list_append      5005 parse.c        			yyval.node = list_append(list_concat(NEW_LIST(yyvsp[-5].node),yyvsp[-3].node), NEW_HASH(yyvsp[-1].node));
list_append      5012 parse.c        			yyval.node = arg_concat(list_append(NEW_LIST(yyvsp[-6].node), NEW_HASH(yyvsp[-4].node)), yyvsp[-1].node);
list_append      5019 parse.c        			yyval.node = arg_concat(list_append(list_concat(NEW_LIST(yyvsp[-8].node), yyvsp[-6].node), NEW_HASH(yyvsp[-4].node)), yyvsp[-1].node);
list_append      5087 parse.c        			yyval.node = list_append(yyvsp[-2].node, yyvsp[0].node);
list_append      5093 parse.c        			yyval.node = list_append(yyvsp[-2].node, yyvsp[0].node);
list_append      5630 parse.c        			yyval.node = list_append(yyvsp[-3].node, NEW_WHEN(yyvsp[0].node, 0, 0));
list_append      5780 parse.c        			yyval.node = list_append(yyvsp[-2].node, evstr2dstr(yyvsp[-1].node));
list_append      5810 parse.c        			yyval.node = list_append(yyvsp[-2].node, yyvsp[-1].node);
list_append      6225 parse.c        			yyval.node = list_append(NEW_LIST(yyvsp[-2].node), yyvsp[0].node);
list_append      8687 parse.c        	head = list_append(node, head);
list_append      8696 parse.c        	    list_append(head, tail);
list_append      8719 parse.c        	list_append(head, tail);
list_append      8730 parse.c        	node = list_append(NEW_DSTR(rb_str_new(0, 0)), node);
list_append      8981 parse.c        	return list_append(node1, node2);
list_append       141 parse.y        static NODE *list_append();
list_append       547 parse.y        			$3 = list_append($3, NEW_NIL());
list_append       768 parse.y        			$$ = NEW_MASGN(list_append($1,$2), 0);
list_append       801 parse.y        			$$ = list_append($1, $2);
list_append      1011 parse.y        			$3 = list_append($3, NEW_NIL());
list_append      1285 parse.y        			$$ = list_append($2, $4);
list_append      1319 parse.y        			$$ = list_append($1, NEW_HASH($3));
list_append      1325 parse.y        			$$ = arg_concat(list_append($1, NEW_HASH($3)), $6);
list_append      1365 parse.y        			$$ = list_append(NEW_LIST($1), NEW_HASH($3));
list_append      1370 parse.y        			$$ = list_append(list_concat(NEW_LIST($1),$3), NEW_HASH($5));
list_append      1375 parse.y        			$$ = arg_concat(list_append(NEW_LIST($1), NEW_HASH($3)), $6);
list_append      1380 parse.y        			$$ = arg_concat(list_append(list_concat(NEW_LIST($1), $3), NEW_HASH($5)), $8);
list_append      1434 parse.y        			$$ = list_append($1, $3);
list_append      1440 parse.y        			$$ = list_append($1, $3);
list_append      1878 parse.y        			$$ = list_append($1, NEW_WHEN($4, 0, 0));
list_append      2036 parse.y        			$$ = list_append($1, evstr2dstr($2));
list_append      2063 parse.y        			$$ = list_append($1, $2);
list_append      2429 parse.y        			$$ = list_append(NEW_LIST($1), $3);
list_append      4689 parse.y        	head = list_append(node, head);
list_append      4698 parse.y        	    list_append(head, tail);
list_append      4721 parse.y        	list_append(head, tail);
list_append      4732 parse.y        	node = list_append(NEW_DSTR(rb_str_new(0, 0)), node);
list_append      4983 parse.y        	return list_append(node1, node2);


list_concat

list_concat       239 parse.c        static NODE *list_concat();
list_concat      3911 parse.c        			list_concat(args, yyvsp[-3].node);
list_concat      4527 parse.c        			list_concat(args, yyvsp[-3].node);
list_concat      4958 parse.c        			yyval.node = arg_blk_pass(list_concat(NEW_LIST(yyvsp[-3].node),yyvsp[-1].node), yyvsp[0].node);
list_concat      4977 parse.c                               yyval.node = arg_concat(list_concat(NEW_LIST(yyvsp[-6].node),yyvsp[-4].node), yyvsp[-1].node);
list_concat      5005 parse.c        			yyval.node = list_append(list_concat(NEW_LIST(yyvsp[-5].node),yyvsp[-3].node), NEW_HASH(yyvsp[-1].node));
list_concat      5019 parse.c        			yyval.node = arg_concat(list_append(list_concat(NEW_LIST(yyvsp[-8].node), yyvsp[-6].node), NEW_HASH(yyvsp[-4].node)), yyvsp[-1].node);
list_concat      6219 parse.c        			yyval.node = list_concat(yyvsp[-2].node, yyvsp[0].node);
list_concat      8710 parse.c        	    list_concat(head, tail);
list_concat      9522 parse.c        	return list_concat(NEW_LIST(node1), node2);
list_concat       142 parse.y        static NODE *list_concat();
list_concat       548 parse.y        			list_concat(args, $3);
list_concat      1012 parse.y        			list_concat(args, $3);
list_concat      1337 parse.y        			$$ = arg_blk_pass(list_concat(NEW_LIST($1),$3), $4);
list_concat      1350 parse.y                               $$ = arg_concat(list_concat(NEW_LIST($1),$3), $6);
list_concat      1370 parse.y        			$$ = list_append(list_concat(NEW_LIST($1),$3), NEW_HASH($5));
list_concat      1380 parse.y        			$$ = arg_concat(list_append(list_concat(NEW_LIST($1), $3), NEW_HASH($5)), $8);
list_concat      2423 parse.y        			$$ = list_concat($1, $3);
list_concat      4712 parse.y        	    list_concat(head, tail);
list_concat      5524 parse.y        	return list_concat(NEW_LIST(node1), node2);


listen

listen           1135 ext/socket/socket.c 	listen(fd, 5);
listen           1427 ext/socket/socket.c     if (server) listen(fd, 5);
listen           2374 ext/socket/socket.c     if (listen(fileno(fptr->f), backlog) < 0)
listen           2127 win32/win32.c  	r = listen(TO_SOCKET(s), backlog);
listen            419 win32/win32.h  #ifdef listen


literal_concat

literal_concat    242 parse.c        static NODE *literal_concat();
literal_concat   5694 parse.c        			yyval.node = literal_concat(yyvsp[-1].node, yyvsp[0].node);
literal_concat   5786 parse.c        			yyval.node = literal_concat(yyvsp[-1].node, yyvsp[0].node);
literal_concat   5822 parse.c        			yyval.node = literal_concat(yyvsp[-1].node, yyvsp[0].node);
literal_concat   5834 parse.c        			yyval.node = literal_concat(yyvsp[-1].node, yyvsp[0].node);
literal_concat    145 parse.y        static NODE *literal_concat();
literal_concat   1954 parse.y        			$$ = literal_concat($1, $2);
literal_concat   2043 parse.y        			$$ = literal_concat($1, $2);
literal_concat   2073 parse.y        			$$ = literal_concat($1, $2);
literal_concat   2083 parse.y        			$$ = literal_concat($1, $2);


literal_node

literal_node     9359 parse.c        	    int b = literal_node(node->nd_beg);
literal_node     9360 parse.c        	    int e = literal_node(node->nd_end);
literal_node     5361 parse.y        	    int b = literal_node(node->nd_beg);
literal_node     5362 parse.y        	    int e = literal_node(node->nd_end);


load

load             1323 dln.c              if (load(file) == -1) {
load             1400 dln.c          	init_fct = (void(*)())load((char*)file, 1, 0);
load             1429 marshal.c          v = rb_ensure(load, (VALUE)&arg, load_ensure, (VALUE)&arg);
load             1313 variable.c         st_data_t load = 0;
load             1319 variable.c     	st_delete(tbl, (st_data_t*)&id, &load);
load             1331 variable.c         return (NODE *)load;
load             1340 variable.c         NODE *load = autoload_delete(klass, id);
load             1342 variable.c         if (!load || !(file = load->nd_lit) || rb_provided(RSTRING(file)->ptr)) {
load             1345 variable.c         return rb_require_safe(file, load->nd_nth);
load             1355 variable.c         st_data_t load;
load             1358 variable.c     	!(tbl = check_autoload_table(val)) || !st_lookup(tbl, id, &load)) {
load             1361 variable.c         file = ((NODE *)load)->nd_lit;


load_1

load_1           1015 dln.c          	    if (load_1(fd, target_offset, 0) == -1) {
load_1           1061 dln.c          		    if (load_1(fd, offset, 0) == -1) {
load_1           1101 dln.c              result = load_1(fd, 0, file);


load_failed

load_failed      6665 eval.c         	load_failed(fname);
load_failed      7065 eval.c         	load_failed(fname);


load_file

load_file          58 ruby.c         static void load_file _((const char *, int));
load_file         819 ruby.c         	load_file(script, 1);
load_file         960 ruby.c             load_file(fname, 0);
load_file         967 ruby.c             load_file("-", 1);


load_header

load_header       374 dln.c              if (load_header(fd, &hdr, 0) == -1) return -1;
load_header       655 dln.c              if (load_header(fd, &hdr, disp) == -1) return -1;
load_header      1045 dln.c          		if (load_header(fd, &hdr, offset) == -1)


load_lib

load_lib          190 dln.c          static int load_lib();
load_lib          873 dln.c          	    if (load_lib(libc) == -1) goto err_exit;
load_lib          893 dln.c          		load_lib(*libs_to_be_linked);
load_lib          906 dln.c          	    if (load_lib(libc) == -1) goto err_exit;
load_lib         1093 dln.c          	return load_lib(file);


load_stdin

load_stdin         57 ruby.c         static void load_stdin _((void));
load_stdin        816 ruby.c         	load_stdin();


load_sym

load_sym          375 dln.c              syms = load_sym(fd, &hdr, 0);
load_sym          663 dln.c              syms = load_sym(fd, &hdr, disp);
load_sym         1047 dln.c          		syms = load_sym(fd, &hdr, offset);


local_append

local_append      266 parse.c        static int  local_append();
local_append     9357 parse.c        	node->nd_cnt = local_append(internal_id());
local_append     9656 parse.c            return local_append(id);
local_append      169 parse.y        static int  local_append();
local_append     5359 parse.y        	node->nd_cnt = local_append(internal_id());
local_append     5658 parse.y            return local_append(id);


local_cnt

local_cnt         271 node.h         #define NEW_LASGN(v,val) NEW_NODE(NODE_LASGN,v,val,local_cnt(v))
local_cnt         284 node.h         #define NEW_LVAR(v) NEW_NODE(NODE_LVAR,v,0,local_cnt(v))
local_cnt         289 node.h         #define NEW_NTH_REF(n)  NEW_NODE(NODE_NTH_REF,0,n,local_cnt('~'))
local_cnt         290 node.h         #define NEW_BACK_REF(n) NEW_NODE(NODE_BACK_REF,0,n,local_cnt('~'))
local_cnt         312 node.h         #define NEW_BLOCK_ARG(v) NEW_NODE(NODE_BLOCK_ARG,v,0,local_cnt(v))
local_cnt         267 parse.c        static int  local_cnt();
local_cnt        6095 parse.c        			local_cnt(yyvsp[0].id);
local_cnt        6135 parse.c        			yyval.id = local_cnt(yyvsp[0].id);
local_cnt        8256 parse.c        	    local_cnt(c);
local_cnt        8777 parse.c            local_cnt('~');
local_cnt        9341 parse.c        	local_cnt('_');
local_cnt        9342 parse.c        	local_cnt('~');
local_cnt        9375 parse.c        	    local_cnt('_');
local_cnt        9376 parse.c        	    local_cnt('~');
local_cnt        10186 parse.c            cnt = local_cnt(c);
local_cnt         170 parse.y        static int  local_cnt();
local_cnt        2299 parse.y        			local_cnt($1);
local_cnt        2342 parse.y        			$$ = local_cnt($2);
local_cnt        4258 parse.y        	    local_cnt(c);
local_cnt        4779 parse.y            local_cnt('~');
local_cnt        5343 parse.y        	local_cnt('_');
local_cnt        5344 parse.y        	local_cnt('~');
local_cnt        5377 parse.y        	    local_cnt('_');
local_cnt        5378 parse.y        	    local_cnt('~');
local_cnt        6188 parse.y            cnt = local_cnt(c);


local_id

local_id          268 parse.c        static int  local_id();
local_id         6093 parse.c        			else if (local_id(yyvsp[0].id))
local_id         6110 parse.c        			else if (local_id(yyvsp[-2].id))
local_id         6133 parse.c        			else if (local_id(yyvsp[0].id))
local_id         6149 parse.c        			else if (local_id(yyvsp[0].id))
local_id         8481 parse.c        	    ((dyna_in_block() && rb_dvar_defined(yylval.id)) || local_id(yylval.id))) {
local_id         8834 parse.c        	if (local_id(id)) return NEW_LVAR(id);
local_id         8890 parse.c        	else if (local_id(id) || !dyna_in_block()) {
local_id          171 parse.y        static int  local_id();
local_id         2297 parse.y        			else if (local_id($1))
local_id         2315 parse.y        			else if (local_id($1))
local_id         2340 parse.y        			else if (local_id($2))
local_id         2358 parse.y        			else if (local_id($2))
local_id         4483 parse.y        	    ((dyna_in_block() && rb_dvar_defined(yylval.id)) || local_id(yylval.id))) {
local_id         4836 parse.y        	if (local_id(id)) return NEW_LVAR(id);
local_id         4892 parse.y        	else if (local_id(id) || !dyna_in_block()) {


local_pop

local_pop         265 parse.c        static void local_pop();
local_pop        3846 parse.c        		        local_pop();
local_pop        5349 parse.c        		        local_pop();
local_pop        5374 parse.c        		        local_pop();
local_pop        5395 parse.c        		        local_pop();
local_pop        5414 parse.c        		        local_pop();
local_pop        5436 parse.c        		        local_pop();
local_pop        9727 parse.c            local_pop();
local_pop         168 parse.y        static void local_pop();
local_pop         493 parse.y        		        local_pop();
local_pop        1633 parse.y        		        local_pop();
local_pop        1653 parse.y        		        local_pop();
local_pop        1671 parse.y        		        local_pop();
local_pop        1688 parse.y        		        local_pop();
local_pop        1704 parse.y        		        local_pop();
local_pop        5729 parse.y            local_pop();


local_push

local_push        264 parse.c        static void local_push();
local_push       3838 parse.c        			local_push(0);
local_push       5340 parse.c        			local_push(0);
local_push       5366 parse.c        			local_push(0);
local_push       5386 parse.c        			local_push(0);
local_push       5405 parse.c        			local_push(0);
local_push       5427 parse.c        			local_push(0);
local_push       9675 parse.c            local_push(1);
local_push        167 parse.y        static void local_push();
local_push        487 parse.y        			local_push(0);
local_push       1625 parse.y        			local_push(0);
local_push       1646 parse.y        			local_push(0);
local_push       1663 parse.y        			local_push(0);
local_push       1679 parse.y        			local_push(0);
local_push       1695 parse.y        			local_push(0);
local_push       5677 parse.y            local_push(1);


local_tbl

local_tbl          38 env.h              ID *local_tbl;
local_tbl         919 eval.c             if (!ruby_scope->local_tbl) return NULL;
local_tbl         920 eval.c             if (cnt >= ruby_scope->local_tbl[0]) return NULL;
local_tbl         921 eval.c             id = ruby_scope->local_tbl[cnt+1];
local_tbl        1027 eval.c             _scope->local_tbl = 0;		\
local_tbl        1045 eval.c         	ruby_scope->local_tbl  = 0;	\
local_tbl        1323 eval.c             ruby_scope->local_tbl  = 0;
local_tbl        3457 eval.c         		ruby_scope->local_tbl = node->nd_tbl;
local_tbl        3461 eval.c         		ruby_scope->local_tbl  = 0;
local_tbl        4072 eval.c         	ruby_scope->local_tbl = node->nd_tbl;
local_tbl        4076 eval.c         	ruby_scope->local_tbl  = 0;
local_tbl        5735 eval.c         		ruby_scope->local_tbl = body->nd_tbl;
local_tbl        5740 eval.c         		ruby_scope->local_tbl  = 0;
local_tbl        6723 eval.c         	if (ruby_scope->local_tbl) /* toplevel was empty */
local_tbl        6724 eval.c         	    free(ruby_scope->local_tbl);
local_tbl        7569 eval.c             tbl = ruby_scope->local_tbl;
local_tbl        7969 eval.c             if (scope->local_tbl) {
local_tbl        7970 eval.c         	tbl = scope->local_tbl;
local_tbl        11717 eval.c             tbl = ruby_scope->local_tbl;
local_tbl         970 gc.c           	    int n = obj->as.scope.local_tbl[0]+1;
local_tbl        1244 gc.c           		RUBY_CRITICAL(free(RANY(obj)->as.scope.local_tbl));
local_tbl         243 node.h         #define NEW_SCOPE(b) NEW_NODE(NODE_SCOPE,local_tbl(),0,(b))
local_tbl         269 parse.c        static ID  *local_tbl();
local_tbl        9676 parse.c            lvtbl->cnt = ruby_scope->local_tbl?ruby_scope->local_tbl[0]:0;
local_tbl        9679 parse.c        	MEMCPY(lvtbl->tbl, ruby_scope->local_tbl, ID, lvtbl->cnt+1);
local_tbl        9697 parse.c        	i = ruby_scope->local_tbl?ruby_scope->local_tbl[0]:0;
local_tbl        9720 parse.c        	    if (ruby_scope->local_tbl && ruby_scope->local_vars[-1] == 0) {
local_tbl        9721 parse.c        		xfree(ruby_scope->local_tbl);
local_tbl        9724 parse.c        	    ruby_scope->local_tbl = local_tbl();
local_tbl         172 parse.y        static ID  *local_tbl();
local_tbl        5678 parse.y            lvtbl->cnt = ruby_scope->local_tbl?ruby_scope->local_tbl[0]:0;
local_tbl        5681 parse.y        	MEMCPY(lvtbl->tbl, ruby_scope->local_tbl, ID, lvtbl->cnt+1);
local_tbl        5699 parse.y        	i = ruby_scope->local_tbl?ruby_scope->local_tbl[0]:0;
local_tbl        5722 parse.y        	    if (ruby_scope->local_tbl && ruby_scope->local_vars[-1] == 0) {
local_tbl        5723 parse.y        		xfree(ruby_scope->local_tbl);
local_tbl        5726 parse.y        	    ruby_scope->local_tbl = local_tbl();


localjump_error

localjump_error  1726 eval.c         	localjump_error("unexpected return", val, state);
localjump_error  1729 eval.c         	localjump_error("unexpected break", val, state);
localjump_error  1732 eval.c         	localjump_error("unexpected next", val, state);
localjump_error  1735 eval.c         	localjump_error("unexpected redo", Qnil, state);
localjump_error  1738 eval.c         	localjump_error("retry outside of rescue clause", Qnil, state);
localjump_error  4701 eval.c             localjump_error(mesg, result, state);
localjump_error  4732 eval.c             localjump_error("unexpected return", retval, TAG_RETURN);
localjump_error  4760 eval.c             localjump_error("unexpected break", retval, TAG_BREAK);
localjump_error  4767 eval.c         	localjump_error("no block given", Qnil, 0);


localtime

localtime         898 missing/strftime.c 	tm = localtime(&clock);
localtime         511 time.c             tm = (utc_p ? gmtime : localtime)(&guess);
localtime         524 time.c                     (tm = (utc_p ? gmtime : localtime)(&guess)) != NULL) {
localtime         534 time.c             tm = (utc_p ? gmtime : localtime)(&guess_lo);
localtime         541 time.c             tm = (utc_p ? gmtime : localtime)(&guess_hi);
localtime         638 time.c               tm = (utc_p ? gmtime : localtime)(&guess);
localtime         669 time.c         	    tm = localtime(&guess2);
localtime         680 time.c         		  tm = localtime(&guess2);
localtime         693 time.c         	    tm = localtime(&guess2);
localtime         704 time.c         		  tm = localtime(&guess2);
localtime         773 time.c                 if ((tmp = localtime(&t)) &&
localtime        1092 time.c             tm_tmp = localtime(&t);
localtime        3430 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              2372 ext/socket/socket.c     backlog = NUM2INT(log);
log               308 math.c         # define log(x) ((x) < 0.0 ? nan("") : log(x))
log               327 math.c             d = log(RFLOAT(x)->value);
log                47 missing/acosh.c     return log(x);
log                65 missing/acosh.c 	z = log(z + z);
log                68 missing/acosh.c 	z = log(z + sqrt(z * z + 1));
log                84 missing/acosh.c     z = log(z > 1 ? -1 : (1 + z) / (1 - z)) / 2;
log                36 missing/erf.c      result = term = exp(a * log(x) - x - loggamma_a) / a;
log                56 missing/erf.c      w = exp(a * log(x) - x - loggamma_a);


log10

log10             309 math.c         # define log10(x) ((x) < 0.0 ? nan("") : log10(x))
log10             349 math.c             d = log10(RFLOAT(x)->value);


logop

logop             224 parse.c        static NODE *logop();
logop            3994 parse.c        			yyval.node = logop(NODE_AND, yyvsp[-2].node, yyvsp[0].node);
logop            4000 parse.c        			yyval.node = logop(NODE_OR, yyvsp[-2].node, yyvsp[0].node);
logop            4801 parse.c        			yyval.node = logop(NODE_AND, yyvsp[-2].node, yyvsp[0].node);
logop            4807 parse.c        			yyval.node = logop(NODE_OR, yyvsp[-2].node, yyvsp[0].node);
logop             127 parse.y        static NODE *logop();
logop             619 parse.y        			$$ = logop(NODE_AND, $1, $3);
logop             623 parse.y        			$$ = logop(NODE_OR, $1, $3);
logop            1214 parse.y        			$$ = logop(NODE_AND, $1, $3);
logop            1218 parse.y        			$$ = logop(NODE_OR, $1, $3);


long_toobig

long_toobig       844 marshal.c      	if (c > sizeof(long)) long_toobig(c);
long_toobig       855 marshal.c      	if (c > sizeof(long)) long_toobig(c);


lseek

lseek             200 dln.c              lseek(fd, disp, 0);
lseek             274 dln.c              lseek(fd, disp + N_TXTOFF(*hdrp) + hdrp->a_text + hdrp->a_data, 0);
lseek             303 dln.c              lseek(fd, N_SYMOFF(*hdrp) + hdrp->a_syms + disp, 0);
lseek             314 dln.c              lseek(fd, disp + N_SYMOFF(*hdrp), 0);
lseek             387 dln.c          	lseek(fd, 0L, 0);
lseek             442 dln.c              lseek(fd, disp + N_TXTOFF(*hdrp), 0);
lseek            1036 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            2312 io.c               pos = lseek(fileno(fptr->f), pos, whence);


lstat

lstat              66 dir.c          #if !defined HAVE_LSTAT && !defined lstat
lstat             941 dir.c          	if (lstat(path, &st) == 0) {
lstat            1016 dir.c          		    if (lstat(buf, &st) < 0) {
lstat              67 file.c         #if !defined HAVE_LSTAT && !defined lstat
lstat             774 file.c             if (lstat(StringValueCStr(fname), &st) == -1) {
lstat             809 file.c             if (lstat(fptr->path, &st) == -1) {
lstat             990 file.c             if (lstat(StringValueCStr(fname), &st) < 0) return Qfalse;
lstat            1543 file.c             if (lstat(StringValueCStr(fname), &st) == -1) {


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   4448 eval.c         static VALUE make_backtrace _((void));
make_backtrace   4470 eval.c         	    at = make_backtrace();
make_backtrace   10846 eval.c         	VALUE errat = make_backtrace();


make_hostent

make_hostent     1287 ext/socket/socket.c     return make_hostent(host, sock_addrinfo(host, Qnil, SOCK_STREAM, AI_CANONNAME), tcp_sockaddr);
make_hostent     2734 ext/socket/socket.c     return make_hostent(host, sock_addrinfo(host, Qnil, SOCK_STREAM, AI_CANONNAME), sock_sockaddr);


make_inetaddr

make_inetaddr     697 ext/socket/socket.c 	make_inetaddr(htonl(i), hbuf, len);
make_inetaddr     706 ext/socket/socket.c 	    make_inetaddr(INADDR_ANY, hbuf, len);
make_inetaddr     709 ext/socket/socket.c 	    make_inetaddr(INADDR_BROADCAST, hbuf, len);


make_ipaddr

make_ipaddr      1279 ext/socket/socket.c     return make_ipaddr(addr);
make_ipaddr      1487 ext/socket/socket.c     return make_ipaddr((struct sockaddr*)&addr);
make_ipaddr      3056 ext/socket/socket.c     host = make_ipaddr((struct sockaddr*)sockaddr);


make_ipaddr0

make_ipaddr0      650 ext/socket/socket.c     make_ipaddr0(addr, buf, sizeof(buf));
make_ipaddr0      666 ext/socket/socket.c     make_ipaddr0((struct sockaddr*)&sin, buf, len);


make_mask

make_mask         356 random.c           unsigned long mask = make_mask(limit);
make_mask         400 random.c               mask = mask ? 0xffffffff : make_mask(lim);


make_struct

make_struct       261 struct.c           return make_struct(nm, ary, rb_cStruct);
make_struct       323 struct.c           st = make_struct(name, rest, klass);


make_time_t

make_time_t       799 time.c             time = time_new_internal(klass, make_time_t(&tm, utc_p), usec);
make_time_t      1992 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           1883 dln.c              vms_filespec = malloc(strlen(filespec)+1);
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             54 ext/dl/test/test.c   data = (struct test_struct *)malloc(sizeof(struct test_struct));
malloc            144 ext/dl/test/test.c     str = (char*)malloc(size1 + size2 + 1);
malloc            216 ext/dl/test/test.c   data = (struct test_data *)malloc(sizeof(struct test_data));
malloc            228 ext/dl/test/test.c   data = (struct test_data *)malloc(sizeof(struct test_data));
malloc            762 ext/nkf/nkf-utf8/nkf.c                       outfname = malloc(strlen(origfname)
malloc           3909 ext/nkf/nkf-utf8/nkf.c 	    lwsp_buf = malloc((lwsp_size+5)*sizeof(char));
malloc           4025 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            174 ext/socket/getaddrinfo.c 	if (((ai)->ai_canonname = (char *)malloc(strlen(str) + 1)) != NULL) {\
malloc            184 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            121 gc.c               RUBY_CRITICAL(mem = malloc(size));
malloc            124 gc.c           	RUBY_CRITICAL(mem = malloc(size));
malloc            344 gc.c           		p = heaps = (struct heaps_slot *)malloc(length);
malloc            350 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           3026 parse.c        #  define YYSTACK_ALLOC malloc
malloc             51 st.c           #define alloc(type) (type*)malloc((unsigned)sizeof(type))
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_errno

map_errno         620 win32/win32.c  		errno = map_errno(GetLastError());
map_errno         625 win32/win32.c  		errno = map_errno(GetLastError());
map_errno         636 win32/win32.c  		errno = map_errno(GetLastError());
map_errno         646 win32/win32.c  		errno = map_errno(GetLastError());
map_errno         978 win32/win32.c  	errno = map_errno(GetLastError());
map_errno        1407 win32/win32.c  	errno = map_errno(GetLastError());
map_errno        1931 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        1997 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2020 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2039 win32/win32.c  		errno = map_errno(r);
map_errno        2063 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2080 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2095 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2112 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2129 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2146 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2164 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2181 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2199 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2216 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2233 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2252 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2274 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2291 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2308 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2325 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2342 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2359 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2376 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2438 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2461 win32/win32.c  	    errno = map_errno(GetLastError());
map_errno        2510 win32/win32.c  	    errno = map_errno(GetLastError());
map_errno        2636 win32/win32.c  		    errno = map_errno(GetLastError());
map_errno        2686 win32/win32.c  		myerrno = map_errno(GetLastError());
map_errno        2691 win32/win32.c  	    myerrno = map_errno(GetLastError());
map_errno        2700 win32/win32.c  	errno = map_errno(GetLastError());
map_errno        2751 win32/win32.c  	errno = map_errno(GetLastError());
map_errno        2783 win32/win32.c  	    errno = map_errno(GetLastError());
map_errno        2905 win32/win32.c  	    errno = map_errno(GetLastError());
map_errno        3399 win32/win32.c  	errno = map_errno(WSAGetLastError());
map_errno        3417 win32/win32.c  	errno = map_errno(WSAGetLastError());
map_errno        3441 win32/win32.c  	errno = map_errno(GetLastError());
map_errno        3472 win32/win32.c  	    errno = map_errno(GetLastError());
map_errno        3477 win32/win32.c  		errno = map_errno(GetLastError());
map_errno        3513 win32/win32.c  	    errno = map_errno(GetLastError());
map_errno        3535 win32/win32.c  	    errno = map_errno(GetLastError());
map_errno        3555 win32/win32.c  	    errno = map_errno(GetLastError());


mark_hash

mark_hash         692 gc.c               mark_hash(tbl, 0);
mark_hash         929 gc.c           	mark_hash(obj->as.hash.tbl, lev);


mark_locations_array

mark_locations_array  639 gc.c               mark_locations_array(start,n);
mark_locations_array  884 gc.c           	    mark_locations_array((VALUE*)obj->as.node.u1.value,
mark_locations_array 1266 gc.c               mark_locations_array(frame->argv, frame->argc);
mark_locations_array 1352 gc.c               mark_locations_array((VALUE*)save_regs_gc_mark, sizeof(save_regs_gc_mark) / sizeof(VALUE *));
mark_locations_array 1370 gc.c           	mark_locations_array((VALUE*)&ctx.uc_mcontext,


mark_source_filename

mark_source_filename  769 gc.c           	mark_source_filename(obj->as.node.nd_file);
mark_source_filename 1055 gc.c               mark_source_filename(ruby_sourcefile);


mark_tbl

mark_tbl          665 gc.c               mark_tbl(tbl, 0);
mark_tbl          908 gc.c           	mark_tbl(obj->as.klass.m_tbl, lev);
mark_tbl          909 gc.c           	mark_tbl(obj->as.klass.iv_tbl, lev);
mark_tbl          946 gc.c           	mark_tbl(obj->as.object.iv_tbl, lev);
mark_tbl         1346 gc.c           	mark_tbl(finalizer_table, 0);


marshal_dump

marshal_dump     1484 marshal.c          rb_define_module_function(rb_mMarshal, "dump", marshal_dump, -1);
marshal_dump     1502 marshal.c          return marshal_dump(argc, argv);


marshal_load

marshal_load     1485 marshal.c          rb_define_module_function(rb_mMarshal, "load", marshal_load, -1);
marshal_load     1486 marshal.c          rb_define_module_function(rb_mMarshal, "restore", marshal_load, -1);
marshal_load     1509 marshal.c          return marshal_load(1, &port);


massign

massign          1071 eval.c         static VALUE massign _((VALUE,NODE*,VALUE,int));
massign          3545 eval.c         	result = massign(self, node, rb_eval(self, node->nd_value), 0);
massign          4838 eval.c         		massign(self, block->var, val, lambda);
massign          5150 eval.c         	massign(self, lhs, svalue_to_mrhs(val, lhs->nd_head), pcall);


match_alloc

match_alloc       667 re.c           static VALUE match_alloc _((VALUE));
match_alloc       933 re.c           	match = match_alloc(rb_cMatch);
match_alloc      2283 re.c               rb_define_alloc_func(rb_cMatch, match_alloc);


match_array

match_array      1147 re.c               return match_array(match, 0);
match_array      1167 re.c               return match_array(match, 1);


match_entry

match_entry      1206 re.c           static VALUE match_entry _((VALUE, long));
match_entry      1234 re.c               return rb_values_at(match, RMATCH(match)->regs->num_regs, argc, argv, match_entry);


match_fds

match_fds        10541 eval.c         		    (match_fds(&readfds, &th->readfds, max) ||
match_fds        10542 eval.c         		     match_fds(&writefds, &th->writefds, max) ||
match_fds        10543 eval.c         		     match_fds(&exceptfds, &th->exceptfds, max))) {


match_gen

match_gen         263 parse.c        static NODE *match_gen();
match_gen        4765 parse.c        			yyval.node = match_gen(yyvsp[-2].node, yyvsp[0].node);
match_gen        4771 parse.c        			yyval.node = NEW_NOT(match_gen(yyvsp[-2].node, yyvsp[0].node));
match_gen         166 parse.y        static NODE *match_gen();
match_gen        1190 parse.y        			$$ = match_gen($1, $3);
match_gen        1194 parse.y        			$$ = NEW_NOT(match_gen($1, $3));


match_getter

match_getter     2207 re.c               return match_getter();
match_getter     2241 re.c               rb_define_virtual_variable("$~", match_getter, match_setter);


match_size

match_size       2287 re.c               rb_define_method(rb_cMatch, "size", match_size, 0);
match_size       2288 re.c               rb_define_method(rb_cMatch, "length", match_size, 0);


match_to_a

match_to_a       1201 re.c           	return rb_ary_aref(argc, argv, match_to_a(match));
match_to_a       2292 re.c               rb_define_method(rb_cMatch, "to_a", match_to_a, 0);


max

max              2010 bignum.c           long len = RBIGNUM(max)->len;
max              2012 bignum.c           if (BIGZEROP(max)) {
max              2017 bignum.c           BDIGITS(v)[len] = BDIGITS(max)[len] * rand_buf[len];
max               190 compar.c           if (RTEST(cmp_gt(x, max))) return Qfalse;
max              10319 eval.c             for (i=0; i<=max; i++) {
max              10334 eval.c             for (i=0; i<=max; i++) {
max              10349 eval.c             for (i=0; i<=max; i++) {
max              10371 eval.c             for (i=0; i<=max; i++) {
max              10393 eval.c             int n, max;
max              10415 eval.c             max = -1;
max              10435 eval.c         	    if (max < th->fd) max = th->fd;
max              10442 eval.c         	    if (max < th->fd) max = th->fd;
max              10487 eval.c         	n = select(max+1, &readfds, &writefds, &exceptfds, delay_ptr);
max              10505 eval.c         			n = max;
max              10520 eval.c         		    intersect_fds(&readfds, &th->readfds, max);
max              10521 eval.c         		    intersect_fds(&writefds, &th->writefds, max);
max              10522 eval.c         		    intersect_fds(&exceptfds, &th->exceptfds, max);
max              10541 eval.c         		    (match_fds(&readfds, &th->readfds, max) ||
max              10542 eval.c         		     match_fds(&writefds, &th->writefds, max) ||
max              10543 eval.c         		     match_fds(&exceptfds, &th->exceptfds, max))) {
max              10547 eval.c         		    n = intersect_fds(&readfds, &th->readfds, max) +
max              10548 eval.c         			intersect_fds(&writefds, &th->writefds, max) +
max              10549 eval.c         			intersect_fds(&exceptfds, &th->exceptfds, max);
max              10766 eval.c         	    n = select(max, read, write, except, tvp);
max              10800 eval.c             curr_thread->fd = max;
max              1828 hash.c         	int max;
max              1831 hash.c         	for (max = i; environ[max]; max++) ;
max              1832 hash.c         	tmpenv = ALLOC_N(char*, max+2);
max              1833 hash.c         	for (j=0; j<max; j++)		/* copy environment */
max              1835 hash.c         	tmpenv[max] = 0;
max              4557 io.c               int max = 0, n;
max              4582 io.c           	    if (max < fileno(fptr->f)) max = fileno(fptr->f);
max              4599 io.c           	    if (max < fileno(fptr->f)) max = fileno(fptr->f);
max              4602 io.c           		if (max < fileno(fptr->f2)) max = fileno(fptr->f2);
max              4616 io.c           	    if (max < fileno(fptr->f)) max = fileno(fptr->f);
max              4619 io.c           		if (max < fileno(fptr->f2)) max = fileno(fptr->f2);
max              4627 io.c               max++;
max              4629 io.c               n = rb_thread_select(max, rp, wp, ep, tp);
max              9649 parse.c            int cnt, max;
max              9653 parse.c            for (cnt=1, max=lvtbl->cnt+1; cnt<max;cnt++) {
max              9663 parse.c            int i, max;
max              9666 parse.c            for (i=3, max=lvtbl->cnt+1; i<max; i++) {
max              5651 parse.y            int cnt, max;
max              5655 parse.y            for (cnt=1, max=lvtbl->cnt+1; cnt<max;cnt++) {
max              5665 parse.y            int i, max;
max              5668 parse.y            for (i=3, max=lvtbl->cnt+1; i<max; i++) {
max               445 random.c           long val, max;
max               454 random.c       	    max = (long)RFLOAT(vmax)->value;
max               479 random.c       	max = 0;
max               485 random.c       	max = FIX2LONG(vmax);
max               489 random.c           if (max == 0) {
max               492 random.c           if (max < 0) max = -max;
max               493 random.c           val = limited_rand(max-1);
max              1013 regex.c          int max = 0;
max              1028 regex.c              if (mcnt > max) {
max              1030 regex.c        	max = mcnt;
max              2961 string.c           int gen, now, max;
max              2984 string.c       		    t->max = *(USTR)t->p++;
max              2989 string.c       	else if (++t->now < t->max) {
max              2994 string.c       	    return t->max;
max              3027 string.c           trsrc.max = trrepl.max = 0;
max              3152 string.c           tr.gen = tr.now = tr.max = 0;


mbc_len

mbc_len          4577 regex.c        #define euc_mbclen(c)  mbc_len(mbctab_euc, (c))
mbc_len          4597 regex.c        #define sjis_mbclen(c)  mbc_len(mbctab_sjis, (c))
mbc_len          4621 regex.c        #define utf8_mbclen(c)  mbc_len(mbctab_utf8, (c))


mbclen2

mbclen2          2129 string.c       	    len = mbclen2(RSTRING(str)->ptr[END(0)], pat);
mbclen2          3558 string.c       		    rb_ary_push(result, rb_str_substr(str, beg, mbclen2(RSTRING(str)->ptr[beg],spat)));
mbclen2          3562 string.c       		    start += mbclen2(RSTRING(str)->ptr[start],spat);
mbclen2          4193 string.c       		*start = END(0)+mbclen2(RSTRING(str)->ptr[END(0)],pat);


mblen

mblen              82 dir.c          #   define CharNext(p) ((p) + mblen(p, MB_CUR_MAX))
mblen            2292 file.c         #   define CharNext(p) ((p) + mblen(p, MB_CUR_MAX))
mblen             229 ruby.c         	p += mblen(p, MB_CUR_MAX);
mblen             352 util.c             for (p = buf; *p; p += mblen(p, MB_CUR_MAX))


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              515 util.c         	  m1 = med3(p1, p2, p3);
med3              519 util.c         	  m3 = med3(p1, p2, p3);
med3              527 util.c               m = med3(m1, m, m3);


memcmp

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            703 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            808 ext/gdbm/gdbm.c             memcmp(RSTRING(valstr)->ptr, RSTRING(valstr2)->ptr,
memcmp            446 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            685 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           3143 ext/zlib/zlib.c 	    if (rslen == 1 || memcmp(p, rsptr, rslen) == 0) break;
memcmp           1782 hash.c         	    memcmp(env[i],nam,len) == 0
memcmp           1587 io.c           		memcmp(RSTRING(str)->ptr+RSTRING(str)->len-rslen,rsptr,rslen)));
memcmp             61 missing/isinf.c     return memcmp(&n, &pinf, sizeof n) == 0
memcmp             62 missing/isinf.c 	|| memcmp(&n, &ninf, sizeof n) == 0;
memcmp             92 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           1415 re.c           	&& memcmp(RREGEXP(reg_cache)->str, RSTRING(str)->ptr, RSTRING(str)->len) == 0)
memcmp           1483 re.c               if (memcmp(RREGEXP(re1)->str, RREGEXP(re2)->str, RREGEXP(re1)->len) == 0 &&
memcmp           3787 regex.c        		: memcmp((char*)d, (char*)d2, mcnt))
memcmp            471 ruby.h         #define MEMCMP(p1,p2,type,n) memcmp((p1), (p2), sizeof(type)*(n))
memcmp            966 string.c           if (memcmp(RSTRING(str1)->ptr, RSTRING(str2)->ptr,
memcmp            284 wince/time_wce.c 	if( 0==memcmp( &tm1, &tm2, sizeof(struct tm) ) )


memcmp_translate

memcmp_translate  166 regex.c        static int memcmp_translate _((unsigned char*, unsigned char*, int));
memcmp_translate 3786 regex.c        		? memcmp_translate(d, d2, mcnt)


memcpy

memcpy            215 bignum.c           memcpy(buf, (char*)&q, SIZEOF_LONG_LONG);
memcpy            229 bignum.c           memcpy(&q, buf, SIZEOF_LONG_LONG);
memcpy            279 bignum.c           memcpy(buf, (char*)BDIGITS(val), len);
memcpy            298 bignum.c           memcpy((char*)BDIGITS(big), buf, QUAD_SIZE);
memcpy            837 dir.c              memcpy(alloc, p, len);
memcpy           1216 dir.c          	    memcpy(buf, s, lbrace-s);
memcpy           1218 dir.c          	    memcpy(b, t, p-t);
memcpy           1780 dln.c          		    memcpy(bp, home, i);
memcpy           1789 dln.c          		memcpy(bp, dp, l);
memcpy           1808 dln.c          	memcpy(bp, fname, i + 1);
memcpy           2031 ext/bigdecimal/bigdecimal.c         memcpy(c->frac, a->frac, n * sizeof(U_LONG));
memcpy            158 ext/digest/digest.c     memcpy(pctx2, pctx1, algo->ctx_size);
memcpy            210 ext/digest/digest.c     memcpy(pctx2, pctx1, len);
memcpy            241 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             64 ext/dl/dl.c    	memcpy(&v, sp, sizeof(float));
memcpy             72 ext/dl/dl.c    	memcpy(&v, sp, sizeof(double));
memcpy             80 ext/dl/dl.c    	memcpy(&v, sp, sizeof(void*));
memcpy             88 ext/dl/dl.c    	memcpy(&v, sp, sizeof(void*));
memcpy            528 ext/dl/dl.c      memcpy(ptr, RSTRING(self)->ptr, len);
memcpy            184 ext/dl/dl.h    # define DLSTACK_PUSH_C(x)  {long v=(long)x; memcpy(sp,&v,sizeof(long)); sp++;}
memcpy            185 ext/dl/dl.h    # define DLSTACK_PUSH_H(x)  {long v=(long)x; memcpy(sp,&v,sizeof(long)); sp++;}
memcpy            186 ext/dl/dl.h    # define DLSTACK_PUSH_I(x)  {long v=(long)x; memcpy(sp,&v,sizeof(long)); sp++;}
memcpy            187 ext/dl/dl.h    # define DLSTACK_PUSH_L(x)  memcpy(sp,&x,sizeof(long)); sp++;
memcpy            188 ext/dl/dl.h    # define DLSTACK_PUSH_P(x)  memcpy(sp,&x,sizeof(void*)); sp++;
memcpy            189 ext/dl/dl.h    # define DLSTACK_PUSH_F(x)  memcpy(sp,&x,sizeof(float)); sp+=sizeof(float)/sizeof(long);
memcpy            190 ext/dl/dl.h    # define DLSTACK_PUSH_D(x)  memcpy(sp,&x,sizeof(double)); sp+=sizeof(double)/sizeof(long);
memcpy            870 ext/dl/ptr.c         memcpy(dst, src, len);
memcpy            874 ext/dl/ptr.c         memcpy(dst, src, n < len ? n : len);
memcpy            913 ext/dl/ptr.c   	memcpy((char *)data->ptr + offset, memimg, memsize);
memcpy            983 ext/dl/ptr.c   	memcpy(data->ptr, memimg, memsize);
memcpy            592 ext/dl/sym.c   	memcpy((char*)(ANY2S(args[i])), RSTRING(str)->ptr, RSTRING(str)->len + 1);
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            190 ext/socket/getaddrinfo.c 	memcpy(ai, pai, sizeof(struct addrinfo));\
memcpy            197 ext/socket/getaddrinfo.c 	memcpy(p + (afd)->a_off, (addr), (afd)->a_addrlen);\
memcpy            270 ext/socket/getaddrinfo.c 	memcpy(pton, &in, sizeof(in));
memcpy            337 ext/socket/getaddrinfo.c 		memcpy(pai, hints, sizeof(*pai));
memcpy            671 ext/socket/getaddrinfo.c 			memcpy(&in6->s6_addr32[0], &faith_prefix,
memcpy            673 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           1484 ext/socket/socket.c     memcpy(&addr, res->ai_addr, res->ai_addrlen);
memcpy           2918 ext/socket/socket.c 	memcpy(&ss, RSTRING(sa)->ptr, RSTRING(sa)->len);
memcpy           1153 ext/strscan/strscan.c     memcpy(bp, CURPTR(p) - len, len); bp += len;
memcpy           1169 ext/strscan/strscan.c         memcpy(bp, CURPTR(p), len); bp += len;
memcpy           1173 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            511 ext/zlib/zlib.c     memcpy(RSTRING(z->buf)->ptr + z->buf_filled, src, len);
memcpy           2496 file.c         	    memcpy(p, b, s-b);
memcpy           2520 file.c         	    memcpy(p, s, 2);
memcpy           2630 file.c         		memcpy(++p, b, s-b);
memcpy           2644 file.c         	memcpy(++p, b, s-b);
memcpy            234 missing/vsnprintf.c #define	COPY(n)	  (void)memcpy((void *)fp->_p, (void *)p, (size_t)(n))
memcpy            146 pack.c             memcpy(utmp,&dtmp,sizeof(double));
memcpy            150 pack.c             memcpy(&dtmp,utmp,sizeof(double));
memcpy            164 pack.c             memcpy(utmp,&dtmp,sizeof(double));
memcpy            168 pack.c             memcpy(&dtmp,utmp,sizeof(double));
memcpy            284 pack.c         #define HTONF(x,y)	(memcpy(&y,&x,sizeof(float)),	\
memcpy            286 pack.c         			 memcpy(&x,&y,sizeof(float)),	\
memcpy            288 pack.c         #define HTOVF(x,y)	(memcpy(&y,&x,sizeof(float)),	\
memcpy            290 pack.c         			 memcpy(&x,&y,sizeof(float)),	\
memcpy            292 pack.c         #define NTOHF(x,y)	(memcpy(&y,&x,sizeof(float)),	\
memcpy            294 pack.c         			 memcpy(&x,&y,sizeof(float)),	\
memcpy            296 pack.c         #define VTOHF(x,y)	(memcpy(&y,&x,sizeof(float)),	\
memcpy            298 pack.c         			 memcpy(&x,&y,sizeof(float)),	\
memcpy            310 pack.c         #define HTOND(x,y)	(memcpy(&y,&x,sizeof(double)),	\
memcpy            312 pack.c         			 memcpy(&x,&y,sizeof(double)),	\
memcpy            314 pack.c         #define HTOVD(x,y)	(memcpy(&y,&x,sizeof(double)),	\
memcpy            316 pack.c         			 memcpy(&x,&y,sizeof(double)),	\
memcpy            318 pack.c         #define NTOHD(x,y)	(memcpy(&y,&x,sizeof(double)),	\
memcpy            320 pack.c         			 memcpy(&x,&y,sizeof(double)),	\
memcpy            322 pack.c         #define VTOHD(x,y)	(memcpy(&y,&x,sizeof(double)),	\
memcpy            324 pack.c         			 memcpy(&x,&y,sizeof(double)),	\
memcpy           1511 pack.c         		memcpy(OFF16(&tmp), s, NATINT_LEN(short,2));
memcpy           1523 pack.c         		memcpy(OFF16(&tmp), s, NATINT_LEN(unsigned short,2));
memcpy           1534 pack.c         		memcpy(&tmp, s, sizeof(int));
memcpy           1545 pack.c         		memcpy(&tmp, s, sizeof(unsigned int));
memcpy           1556 pack.c         		memcpy(OFF32(&tmp), s, NATINT_LEN(long,4));
memcpy           1567 pack.c         		memcpy(OFF32(&tmp), s, NATINT_LEN(unsigned long,4));
memcpy           1596 pack.c         		memcpy(OFF16B(&tmp), s, NATINT_LEN(unsigned short,2));
memcpy           1607 pack.c         		memcpy(OFF32B(&tmp), s, NATINT_LEN(unsigned long,4));
memcpy           1618 pack.c         		memcpy(OFF16(&tmp), s, NATINT_LEN(unsigned short,2));
memcpy           1629 pack.c         		memcpy(OFF32(&tmp), s, NATINT_LEN(long,4));
memcpy           1641 pack.c         		memcpy(&tmp, s, sizeof(float));
memcpy           1654 pack.c         		memcpy(&tmp, s, sizeof(float));
memcpy           1668 pack.c         		memcpy(&tmp, s, sizeof(double));
memcpy           1681 pack.c         		memcpy(&tmp, s, sizeof(double));
memcpy           1694 pack.c         		memcpy(&tmp, s, sizeof(float));
memcpy           1708 pack.c         		memcpy(&tmp, s, sizeof(double));
memcpy           1768 pack.c         			memcpy(ptr, hunk, mlen);
memcpy           1878 pack.c         		memcpy(&t, s, sizeof(char *));
memcpy           1920 pack.c         		    memcpy(&t, s, sizeof(char *));
memcpy           1368 re.c               memcpy(re->str, s, len);
memcpy           1756 re.c               memcpy(t, RSTRING(str)->ptr, s - RSTRING(str)->ptr);
memcpy            127 regex.c            memcpy(stackx, stackb, xlen * sizeof (type));			\
memcpy           2098 regex.c        	    memcpy(b, laststart+2, mcnt);
memcpy           2111 regex.c        	    memcpy(b, laststart, mcnt);
memcpy           1061 ruby.c         	memcpy(origargv[0], s, i);
memcpy           1065 ruby.c         	memcpy(origargv[0], s, i);
memcpy            469 ruby.h         #define MEMCPY(p1,p2,type,n) memcpy((p1), (p2), sizeof(type)*(n))
memcpy             95 sprintf.c          memcpy(&buf[blen], s, l);\
memcpy            425 sprintf.c      			memcpy(&buf[blen], RSTRING(str)->ptr, len);
memcpy             94 string.c       	memcpy(RSTRING(str)->ptr, ptr, len);
memcpy            390 string.c           memcpy(RSTRING(str3)->ptr, RSTRING(str1)->ptr, RSTRING(str1)->len);
memcpy            391 string.c           memcpy(RSTRING(str3)->ptr + RSTRING(str1)->len,
memcpy            428 string.c       	memcpy(RSTRING(str2)->ptr + i,
memcpy            493 string.c       	memcpy(ptr, RSTRING(str)->ptr, RSTRING(str)->len);
memcpy            721 string.c           memcpy(RSTRING(str)->ptr + RSTRING(str)->len, ptr, len);
memcpy            748 string.c       	memcpy(RSTRING(str)->ptr + RSTRING(str)->len, ptr, len);
memcpy            786 string.c           memcpy(RSTRING(str)->ptr + RSTRING(str)->len,
memcpy            805 string.c       	    memcpy(RSTRING(str)->ptr + RSTRING(str)->len,
memcpy           1994 string.c       	memcpy(RSTRING(str)->ptr + BEG(0),
memcpy           2118 string.c       	memcpy(bp, cp, len);
memcpy           2120 string.c       	memcpy(bp, RSTRING(val)->ptr, RSTRING(val)->len);
memcpy           2130 string.c       	    memcpy(bp, RSTRING(str)->ptr+END(0), len);
memcpy           2146 string.c       	memcpy(bp, cp, RSTRING(str)->len - offset);
memcpy           2265 string.c       	memcpy(RSTRING(str)->ptr, RSTRING(str2)->ptr, RSTRING(str2)->len);
memcpy           4504 string.c       		memcpy(p,f,flen);
memcpy           4512 string.c           memcpy(p, RSTRING(str)->ptr, RSTRING(str)->len);
memcpy           4522 string.c       		memcpy(p,f,flen);
memcpy            222 util.c         	(void)memcpy(p, strEQ(ext, suffix1) ? suffix2 : suffix1, 5);
memcpy            225 util.c             memcpy(RSTRING(str)->ptr, buf, RSTRING(str)->len);
memcpy            633 util.c             memcpy(tmp, str, len);
memcpy            808 win32/win32.c  		memcpy(q, s, n = p - s); q += n; s = p;
memcpy            817 win32/win32.c  	memcpy(q, s, n = p - s);
memcpy            947 win32/win32.c  			memcpy(tmp, cmd, len);
memcpy            956 win32/win32.c  		    memcpy(p, cmd, len);
memcpy           1269 win32/win32.c  			memcpy(p - ((slashes + 1) >> 1), p + (~slashes & 1), base + len - p);


memmove

memmove           694 bignum.c           memmove(RBIGNUM(x)->sign?s:s+1, s+j, RSTRING(ss)->len);
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           555 ext/zlib/zlib.c     memmove(RSTRING(z->buf)->ptr, RSTRING(z->buf)->ptr + len,
memmove           575 ext/zlib/zlib.c     memmove(RSTRING(z->buf)->ptr + 1, RSTRING(z->buf)->ptr, z->buf_filled);
memmove           614 ext/zlib/zlib.c 	memmove(RSTRING(z->input)->ptr, RSTRING(z->input)->ptr + len,
memmove            84 missing.h      extern void *memmove _((void *, void *, int));
memmove           515 numeric.c          memmove(p, e, strlen(e)+1);
memmove           699 regex.c            memmove(&b[(beg + 1)*8], &b[end*8], (mbc_size - end)*8);
memmove          1725 regex.c        	memmove(&b[(unsigned char)b[-1]], &b[(1 << BYTEWIDTH) / BYTEWIDTH],
memmove          2238 regex.c        	  memmove(&b[(unsigned char)b[-1]], &b[(1 << BYTEWIDTH) / BYTEWIDTH],
memmove           470 ruby.h         #define MEMMOVE(p1,p2,type,n) memmove((p1), (p2), sizeof(type)*(n))
memmove           576 sprintf.c      			    memmove(s+1, s, strlen(s)+1);
memmove          1416 string.c       	memmove(s+1, s, RSTRING(str)->len - n);
memmove          1659 string.c       	memmove(RSTRING(str)->ptr + beg + RSTRING(val)->len,
memmove          1667 string.c       	memmove(RSTRING(str)->ptr+beg, RSTRING(val)->ptr, RSTRING(val)->len);
memmove          1990 string.c       	    memmove(RSTRING(str)->ptr + BEG(0) + RSTRING(repl)->len,
memmove          4049 string.c       	memmove(RSTRING(str)->ptr, s, RSTRING(str)->len);
memmove          1717 win32/win32.c  	memmove(p, p + 1, strlen(p));


memset

memset            270 bignum.c           memset(buf, 0, QUAD_SIZE);
memset            461 dln.c          	memset(addr +  hdrp->a_text + hdrp->a_data, 0, hdrp->a_bss);
memset            464 dln.c          	memset(addr +  hdrp->a_text + hdrp->a_data, 0, bss);
memset           10156 eval.c             memset(space, 0, 1);	/* prevent array from optimization */
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            138 ext/dl/ptr.c     memset(ptr,0,(size_t)size);
memset            218 ext/dl/test/test.c   memset(data->name, 0, 1024);
memset            229 ext/dl/test/test.c   memset(data->name, 0, 1024);
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            192 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           1405 ext/win32ole/win32ole.c     memset(&serverinfo, 0, sizeof(COSERVERINFO));
memset           1407 ext/win32ole/win32ole.c     memset(&multi_qi, 0, sizeof(MULTI_QI));
memset           1990 ext/win32ole/win32ole.c     memset(&excepinfo, 0, sizeof(EXCEPINFO));
memset           2098 ext/win32ole/win32ole.c             memset(&excepinfo, 0, sizeof(EXCEPINFO));
memset           2117 ext/win32ole/win32ole.c                 memset(&excepinfo, 0, sizeof(EXCEPINFO));
memset           2135 ext/win32ole/win32ole.c             memset(&excepinfo, 0, sizeof(EXCEPINFO));
memset           2210 ext/win32ole/win32ole.c     memset(&excepinfo, 0, sizeof(EXCEPINFO));
memset           2211 ext/win32ole/win32ole.c     memset(&dispParams, 0, sizeof(DISPPARAMS));
memset           2509 ext/win32ole/win32ole.c     memset(&excepinfo, 0, sizeof(excepinfo));
memset           2622 ext/win32ole/win32ole.c     memset(&excepinfo, 0, sizeof(excepinfo));
memset           2578 file.c         	memset(buf, '/', p - buf);
memset            140 gc.c               memset(mem, 0, n * size);
memset           1453 gc.c               memset(&m, 0, sizeof(m));
memset            220 random.c           memset(buf, 0, len * sizeof(long));
memset            275 random.c           memset(digits, 0, big->len * SIZEOF_BDIGITS);
memset            205 regex.c           memset(re_syntax_table, 0, sizeof re_syntax_table);
memset           1446 regex.c              memset(b, 0, (1 << BYTEWIDTH) / BYTEWIDTH + 2);
memset           2219 regex.c        	memset(b, 0, (1 << BYTEWIDTH) / BYTEWIDTH + 2);
memset           2788 regex.c          memset(fastmap, 0, (1 << BYTEWIDTH));
memset            247 ruby.c             memset(&m, 0, sizeof(m));
memset            390 ruby.h             memset(sval, 0, sizeof(type)),\
memset            468 ruby.h         #define MEMZERO(p,type,n) memset((p), 0, sizeof(type)*(n))
memset            272 util.c             memset(&r, 0, sizeof(r));
memset            214 win32/win32.c  	memset(&osver, 0, sizeof(OSVERSIONINFO));
memset            264 win32/win32.c      memset(&o, 0, sizeof(o));
memset            809 win32/win32.c  		memset(q, '\\', ++bs); q += bs; bs = 0;
memset            877 win32/win32.c      memset(&aStartupInfo, 0, sizeof (STARTUPINFO));
memset            878 win32/win32.c      memset(&aProcessInformation, 0, sizeof (PROCESS_INFORMATION));
memset           2826 win32/win32.c      memset(&tm, 0, sizeof(tm));
memset           2884 win32/win32.c      memset(st, 0, sizeof(struct stat));
memset           3301 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     8462 eval.c         static VALUE method_arity _((VALUE));
method_arity     8496 eval.c         	    return method_arity(data->body->nd_tval);
method_arity     9189 eval.c         	return method_arity(body->nd_cval);
method_arity     9489 eval.c             rb_define_method(rb_cMethod, "arity", method_arity, 0);
method_arity     9501 eval.c             rb_define_method(rb_cUnboundMethod, "arity", method_arity, 0);


method_call

method_call       192 eval.c         static VALUE method_call _((int, VALUE*, VALUE));
method_call      5712 eval.c         	result = method_call(argc, argv, umethod_bind(body->nd_cval, recv));
method_call      9284 eval.c             ret = method_call(RARRAY(a)->len, RARRAY(a)->ptr, method);
method_call      9487 eval.c             rb_define_method(rb_cMethod, "call", method_call, -1);
method_call      9488 eval.c             rb_define_method(rb_cMethod, "[]", method_call, -1);
method_call       272 parse.y        %type <node> bodystmt compstmt stmts stmt expr arg primary command command_call method_call
method_call      1542 parse.y        		| method_call
method_call      1543 parse.y        		| method_call brace_block
method_call      1813 parse.y        method_call	: operation paren_args


method_clone

method_clone     9486 eval.c             rb_define_method(rb_cMethod, "clone", method_clone, 0);
method_clone     9500 eval.c             rb_define_method(rb_cUnboundMethod, "clone", method_clone, 0);


method_entry

method_entry      624 class.c        	st_foreach(RCLASS(mod)->m_tbl, method_entry, (st_data_t)list);
method_entry      782 class.c        	st_foreach(RCLASS(klass)->m_tbl, method_entry, (st_data_t)list);
method_entry      787 class.c        	    st_foreach(RCLASS(klass)->m_tbl, method_entry, (st_data_t)list);


method_eq

method_eq        9485 eval.c             rb_define_method(rb_cMethod, "==", method_eq, 1);
method_eq        9499 eval.c             rb_define_method(rb_cUnboundMethod, "==", method_eq, 1);


method_inspect

method_inspect   9490 eval.c             rb_define_method(rb_cMethod, "inspect", method_inspect, 0);
method_inspect   9491 eval.c             rb_define_method(rb_cMethod, "to_s", method_inspect, 0);
method_inspect   9502 eval.c             rb_define_method(rb_cUnboundMethod, "inspect", method_inspect, 0);
method_inspect   9503 eval.c             rb_define_method(rb_cUnboundMethod, "to_s", method_inspect, 0);


method_missing

method_missing   5890 eval.c         	    return method_missing(recv, mid, argc, argv, scope==2?CSTAT_VCALL:0);
method_missing   5898 eval.c         	    return method_missing(recv, mid, argc, argv, CSTAT_SUPER);
method_missing   5900 eval.c         	return method_missing(recv, mid, argc, argv, scope==2?CSTAT_VCALL:0);
method_missing   5906 eval.c         	    return method_missing(recv, mid, argc, argv, CSTAT_PRIV);
method_missing   5916 eval.c         		return method_missing(recv, mid, argc, argv, CSTAT_PROT);
method_missing   6084 eval.c         	return method_missing(self, ruby_frame->orig_func, argc, argv, CSTAT_SUPER);


method_unbind

method_unbind    9401 eval.c         	node = NEW_DMETHOD(method_unbind(body));
method_unbind    9493 eval.c             rb_define_method(rb_cMethod, "unbind", method_unbind, 0);


mime_begin

mime_begin        333 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_begin PROTO((FILE *f));
mime_begin       2040 ext/nkf/nkf-utf8/nkf.c 			} else if (mime_begin(f) == EOF)


mime_begin_strict

mime_begin_strict  337 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_begin_strict PROTO((FILE *f));
mime_begin_strict 2036 ext/nkf/nkf-utf8/nkf.c 			    if (mime_begin_strict(f) == EOF)


mime_getc

mime_getc         334 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_getc PROTO((FILE *f));
mime_getc        1857 ext/nkf/nkf-utf8/nkf.c 	i_mgetc = i_getc; i_getc = mime_getc;
mime_getc        3532 ext/nkf/nkf-utf8/nkf.c     if (i_getc!=mime_getc) {
mime_getc        3533 ext/nkf/nkf-utf8/nkf.c 	i_mgetc = i_getc; i_getc = mime_getc;


mime_getc_buf

mime_getc_buf     338 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_getc_buf PROTO((FILE *f));
mime_getc_buf    3536 ext/nkf/nkf-utf8/nkf.c 	    i_mgetc_buf = i_mgetc; i_mgetc = mime_getc_buf;


mime_integrity

mime_integrity    340 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_integrity PROTO((FILE *f,unsigned char *p));
mime_integrity   3595 ext/nkf/nkf-utf8/nkf.c             return mime_integrity(f,mime_pattern[j]);


mime_prechar

mime_prechar      343 ext/nkf/nkf-utf8/nkf.c STATIC  void    mime_prechar PROTO((int c2, int c1));
mime_prechar     3023 ext/nkf/nkf-utf8/nkf.c     mime_prechar(c2, c1);


mime_putc

mime_putc         344 ext/nkf/nkf-utf8/nkf.c STATIC  void    mime_putc PROTO((int c));
mime_putc        1810 ext/nkf/nkf-utf8/nkf.c 	o_putc = mime_putc;
mime_putc        4264 ext/nkf/nkf-utf8/nkf.c 	mime_putc(mimeout_buf[i]);


mime_ungetc

mime_ungetc       335 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_ungetc PROTO((int c,FILE *f));
mime_ungetc      1858 ext/nkf/nkf-utf8/nkf.c 	i_mungetc = i_ungetc; i_ungetc = mime_ungetc;
mime_ungetc      3534 ext/nkf/nkf-utf8/nkf.c 	i_mungetc = i_ungetc; i_ungetc = mime_ungetc;


mime_ungetc_buf

mime_ungetc_buf   339 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_ungetc_buf  PROTO((int c,FILE *f));
mime_ungetc_buf  3537 ext/nkf/nkf-utf8/nkf.c 	    i_mungetc_buf = i_mungetc; i_mungetc = mime_ungetc_buf;


mimeout_addchar

mimeout_addchar  4406 ext/nkf/nkf-utf8/nkf.c             mimeout_addchar(c);
mimeout_addchar  4421 ext/nkf/nkf-utf8/nkf.c 	    mimeout_addchar(mimeout_buf[i]);
mimeout_addchar  4506 ext/nkf/nkf-utf8/nkf.c                         mimeout_addchar(mimeout_buf[i]);
mimeout_addchar  4546 ext/nkf/nkf-utf8/nkf.c                         mimeout_addchar(mimeout_buf[i]);
mimeout_addchar  4559 ext/nkf/nkf-utf8/nkf.c 	    mimeout_addchar(mimeout_buf[i]);
mimeout_addchar  4570 ext/nkf/nkf-utf8/nkf.c     mimeout_addchar(c);


mktime

mktime            770 time.c         	if ((t = mktime(&buf)) != -1)
mktime           2553 win32/win32.c      t = mktime(&tm);
mktime           2833 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             428 util.c         #define mmswap(a,b) mmswap_((a),(b),mmarg)
mmarg             454 util.c         #define mmrot3(a,b,c) mmrot3_((a),(b),(c),mmarg)


mmrot3

mmrot3            542 util.c         	mmrot3(r,m,l); goto loopA;                           /*3-5-2*/
mmrot3            560 util.c         	mmrot3(l,m,r); goto loopA;                           /*7-5-6*/


mmswap

mmswap            499 util.c               if ((*cmp)(L,R,d) > 0) mmswap(L,R); goto nxt;
mmswap            541 util.c         	if ((*cmp)(l,r,d) <= 0) {mmswap(m,r); goto loopA;}     /*3-5-4*/
mmswap            553 util.c         	  while (l<r) {mmswap(l,r); l+=size; r-=size;}  /* reverse region */
mmswap            556 util.c         	fail2: mmswap(l,r); goto loopA;                      /*7-5-3*/
mmswap            559 util.c         	if ((*cmp)(l,r,d) <= 0) {mmswap(l,m); goto loopB;}   /*7-5-8*/
mmswap            562 util.c               mmswap(l,r); goto loopA;                               /*7-5-5*/
mmswap            566 util.c             if (t > 0) {mmswap(l,r); goto loopB;}                    /*5-5-3*/
mmswap            572 util.c               if ((t = (*cmp)(l,m,d)) > 0) {mmswap(l,r); l = L; goto loopA;}/*575-5*/
mmswap            573 util.c               if (t < 0)                 {mmswap(L,l); l = L; goto loopB;}  /*535-5*/
mmswap            580 util.c         	  {l -= size; if (l != m) mmswap(m,l); l -= size; goto fin;}
mmswap            587 util.c         	  {l -= size; if (l != m) mmswap(m,l); l -= size; goto fin;}
mmswap            592 util.c               mmswap(l,r);    /* swap left and right */
mmswap            599 util.c         	  {r += size; if (r != m) mmswap(r,m); r += size; goto fin;}
mmswap            606 util.c         	  {r += size; if (r != m) mmswap(r,m); r += size; goto fin;}
mmswap            611 util.c               mmswap(l,r);    /* swap left and right */


mnew

mnew             8905 eval.c             return mnew(CLASS_OF(obj), obj, rb_to_id(vid), rb_cMethod);
mnew             8945 eval.c             return mnew(mod, Qundef, rb_to_id(vid), rb_cUnboundMethod);


mod_av_set

mod_av_set       1673 variable.c         mod_av_set(klass, id, val, Qtrue);
mod_av_set       1757 variable.c         mod_av_set(klass, id, val, Qfalse);


module_setup

module_setup     1069 eval.c         static VALUE module_setup _((VALUE,NODE*));
module_setup     3958 eval.c         	    result = module_setup(klass, node);
module_setup     3992 eval.c         	    result = module_setup(module, node);
module_setup     4014 eval.c         	    result = module_setup(klass, node);


moreswitches

moreswitches      756 ruby.c         		s = moreswitches(s);
moreswitches      932 ruby.c         			p = moreswitches(p+1);


mproc

mproc            9295 eval.c             VALUE proc = rb_iterate((VALUE(*)_((VALUE)))mproc, 0, func, val);
mproc            9317 eval.c             proc = rb_iterate((VALUE(*)_((VALUE)))mproc, 0, bmcall, method);


my_getcwd

my_getcwd         654 dir.c          	char *cwd = my_getcwd();
my_getcwd         685 dir.c              path = my_getcwd();
my_getcwd        2332 file.c             oldcwd = my_getcwd();
my_getcwd        2334 file.c         	drvcwd = my_getcwd();
my_getcwd        2555 file.c         	    char *dir = my_getcwd();
my_getcwd        4057 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  694 error.c            name_err_initialize(argc, argv, self);
name_err_initialize 1013 error.c            rb_define_method(rb_eNameError, "initialize", name_err_initialize, -1);


name_err_mesg_to_str

name_err_mesg_to_str 1018 error.c            rb_define_method(rb_cNameErrorMesg, "to_str", name_err_mesg_to_str, 0);
name_err_mesg_to_str 1019 error.c            rb_define_method(rb_cNameErrorMesg, "_dump", name_err_mesg_to_str, 1);


nan

nan               306 math.c         #  define nan(x) nan()
nan               308 math.c         # define log(x) ((x) < 0.0 ? nan("") : log(x))
nan               309 math.c         # define log10(x) ((x) < 0.0 ? nan("") : log10(x))


nd_1st

nd_1st           3260 eval.c         	result = rb_eval(self, node->nd_1st);
nd_1st           3266 eval.c         	result = rb_eval(self, node->nd_1st);
nd_1st           9347 parse.c        	node->nd_1st = cond0(node->nd_1st);
nd_1st           5349 parse.y        	node->nd_1st = cond0(node->nd_1st);


nd_2nd

nd_2nd           3262 eval.c         	node = node->nd_2nd;
nd_2nd           3268 eval.c         	node = node->nd_2nd;
nd_2nd           9062 parse.c        	    node = node->nd_2nd;
nd_2nd           9348 parse.c        	node->nd_2nd = cond0(node->nd_2nd);
nd_2nd           9408 parse.c        	while ((second = node->nd_2nd) != 0 && nd_type(second) == type) {
nd_2nd           9411 parse.c        	node->nd_2nd = NEW_NODE(type, second, right, 0);
nd_2nd           5064 parse.y        	    node = node->nd_2nd;
nd_2nd           5350 parse.y        	node->nd_2nd = cond0(node->nd_2nd);
nd_2nd           5410 parse.y        	while ((second = node->nd_2nd) != 0 && nd_type(second) == type) {
nd_2nd           5413 parse.y        	node->nd_2nd = NEW_NODE(type, second, right, 0);


nd_aid

nd_aid           3525 eval.c         	    rb_funcall2(recv, node->nd_next->nd_aid, 1, &val);
nd_aid           3537 eval.c         	if ((node->nd_aid && !is_defined(self, node->nd_head, 0)) ||
nd_aid           3884 parse.c        				    yyval.node->nd_aid = vid;
nd_aid           4500 parse.c        				    yyval.node->nd_aid = vid;
nd_aid            523 parse.y        				    $$->nd_aid = vid;
nd_aid            987 parse.y        				    $$->nd_aid = vid;


nd_alen

nd_alen          2199 eval.c         #define SETUP_ARGS(anode) SETUP_ARGS0(anode, anode->nd_alen)
nd_alen          2233 eval.c         	argc=node->nd_alen;
nd_alen          3484 eval.c         	    SETUP_ARGS0(node->nd_args->nd_next, node->nd_args->nd_alen - 1);
nd_alen          3719 eval.c         	    i = node->nd_alen;
nd_alen          6210 parse.c        			if (yyvsp[-1].node->nd_alen%2 != 0) {
nd_alen          8642 parse.c            list->nd_alen += 1;
nd_alen          8662 parse.c            head->nd_alen += tail->nd_alen;
nd_alen          8717 parse.c        	    head->nd_alen = 1;
nd_alen          2413 parse.y        			if ($1->nd_alen%2 != 0) {
nd_alen          4644 parse.y            list->nd_alen += 1;
nd_alen          4664 parse.y            head->nd_alen += tail->nd_alen;
nd_alen          4719 parse.y        	    head->nd_alen = 1;


nd_argc

nd_argc          5670 eval.c         	    int len = body->nd_argc;
nd_argc          9178 eval.c         	if (body->nd_argc < 0) return INT2FIX(-1);
nd_argc          9179 eval.c         	return INT2FIX(body->nd_argc);


nd_args

nd_args          2267 eval.c         		return arg_defined(self, node->nd_args, buf, "super");
nd_args          2310 eval.c         	    return arg_defined(self, node->nd_args, buf,
nd_args          3358 eval.c         	    SETUP_ARGS(node->nd_args);
nd_args          3376 eval.c         	    SETUP_ARGS(node->nd_args);
nd_args          3391 eval.c         	    SETUP_ARGS(node->nd_args);
nd_args          3427 eval.c         		SETUP_ARGS(node->nd_args);
nd_args          3483 eval.c         	    rval = node->nd_args->nd_head;
nd_args          3484 eval.c         	    SETUP_ARGS0(node->nd_args->nd_next, node->nd_args->nd_alen - 1);
nd_args          5064 eval.c             if (node->nd_args) {
nd_args          5065 eval.c         	if ((long)(node->nd_args) == -1) {
nd_args          5069 eval.c         	    assign(self, node->nd_args, rb_ary_new4(len-i, RARRAY(val)->ptr+i), pcall);
nd_args          5072 eval.c         	    assign(self, node->nd_args, rb_ary_new2(0), pcall);
nd_args          5166 eval.c         	    if (!lhs->nd_args) {
nd_args          5176 eval.c         		args = rb_eval(self, lhs->nd_args);
nd_args          5239 eval.c             if (!node->nd_args) {
nd_args          5244 eval.c             SETUP_ARGS(node->nd_args);
nd_args          8512 eval.c         	if (data->var->nd_args) return INT2FIX(-n-1);
nd_args          9010 parse.c        	lhs->nd_args = arg_add(lhs->nd_args, rhs);
nd_args          5012 parse.y        	lhs->nd_args = arg_add(lhs->nd_args, rhs);


nd_beg

nd_beg           3279 eval.c         	    VALUE beg = rb_eval(self, node->nd_beg);
nd_beg           3290 eval.c         		if (RTEST(rb_eval(self, node->nd_beg))) {
nd_beg           3312 eval.c         		result = RTEST(rb_eval(self, node->nd_beg)) ? Qtrue : Qfalse;
nd_beg           9353 parse.c        	node->nd_beg = range_op(node->nd_beg);
nd_beg           9359 parse.c        	    int b = literal_node(node->nd_beg);
nd_beg           5355 parse.y        	node->nd_beg = range_op(node->nd_beg);
nd_beg           5361 parse.y        	    int b = literal_node(node->nd_beg);


nd_body

nd_body            57 class.c            st_insert(tbl, mid, (st_data_t)NEW_METHOD(body->nd_body, body->nd_noex));
nd_body           595 class.c        	if (!body->nd_body) type = -1; /* none */
nd_body           455 eval.c             if ((body = search_method(klass, id, &origin)) == 0 || !body->nd_body) {
nd_body           473 eval.c         	body = body->nd_body;
nd_body           490 eval.c         	body = body->nd_body;
nd_body           532 eval.c         	!body->nd_body) {
nd_body           610 eval.c             if (!body || !body->nd_body) {
nd_body          1972 eval.c             if (!body || !body->nd_body) {
nd_body          2074 eval.c             if (!orig || !orig->nd_body) {
nd_body          2079 eval.c             if (!orig || !orig->nd_body) {
nd_body          2085 eval.c             body = orig->nd_body;
nd_body          2095 eval.c         	if (node->nd_cnt == 0 && node->nd_body) {
nd_body          2866 eval.c         	node = node->nd_body;
nd_body          2905 eval.c         		rb_eval(self, node->nd_body);
nd_body          2941 eval.c         	    node = node->nd_body;
nd_body          2965 eval.c         			    node = node->nd_body;
nd_body          2973 eval.c         		    node = node->nd_body;
nd_body          2987 eval.c         	    node = node->nd_body;
nd_body          3006 eval.c         				node = node->nd_body;
nd_body          3014 eval.c         			node = node->nd_body;
nd_body          3033 eval.c         		rb_eval(self, node->nd_body);
nd_body          3068 eval.c         		rb_eval(self, node->nd_body);
nd_body          3102 eval.c         	    PUSH_BLOCK(node->nd_var, node->nd_body);
nd_body          3220 eval.c         			result = rb_eval(self, resq->nd_body);
nd_body          3272 eval.c         	if (RTEST(rb_eval(self, node->nd_body))) result = Qfalse;
nd_body          3331 eval.c         	    result = rb_ary_concat(args, splat_value(rb_eval(self, node->nd_body)));
nd_body          3338 eval.c         	    result = rb_ary_push(args, rb_eval(self, node->nd_body));
nd_body          3735 eval.c         	result = rb_obj_as_string(rb_eval(self, node->nd_body));
nd_body          3824 eval.c         		if (RTEST(ruby_verbose) && ruby_class == origin && body->nd_cnt == 0 && body->nd_body) {
nd_body          3838 eval.c         	    if (body && origin == ruby_class && body->nd_body == 0) {
nd_body          4053 eval.c             NODE * volatile node = n->nd_body;
nd_body          7328 eval.c         	    if (body == 0 || body->nd_body == 0) {
nd_body          7331 eval.c         	    if (nd_type(body->nd_body) != NODE_ZSUPER) {
nd_body          7337 eval.c         	rb_add_method(rb_singleton_class(module), id, body->nd_body, NOEX_PUBLIC);
nd_body          8644 eval.c             VALUE proc = rb_eval(self, node->nd_body);	/* OK */
nd_body          3782 parse.c        		            yyval.node->nd_else = yyval.node->nd_body;
nd_body          3783 parse.c        		            yyval.node->nd_body = 0;
nd_body          3793 parse.c        		            yyval.node->nd_body = yyval.node->nd_else;
nd_body          3802 parse.c        			    yyval.node = NEW_WHILE(cond(yyvsp[0].node), yyvsp[-2].node->nd_body, 0);
nd_body          3816 parse.c        			    yyval.node = NEW_UNTIL(cond(yyvsp[0].node), yyvsp[-2].node->nd_body, 0);
nd_body          5246 parse.c        		            NODE *tmp = yyval.node->nd_body;
nd_body          5247 parse.c        		            yyval.node->nd_body = yyval.node->nd_else;
nd_body          5258 parse.c        		            NODE *tmp = yyval.node->nd_body;
nd_body          5259 parse.c        		            yyval.node->nd_body = yyval.node->nd_else;
nd_body          9051 parse.c        	    node = node->nd_body;
nd_body          9055 parse.c        	    if (!value_expr(node->nd_body)) return Qfalse;
nd_body          9199 parse.c        	    *n = (*n)->nd_body;
nd_body          9426 parse.c        	*nodep = c->nd_body;
nd_body          9430 parse.c        	    c->nd_next = c->nd_next->nd_body;
nd_body          9528 parse.c        	node2->nd_body = arg_prepend(node1, node2->nd_body);
nd_body           441 parse.y        		            $$->nd_else = $$->nd_body;
nd_body           442 parse.y        		            $$->nd_body = 0;
nd_body           450 parse.y        		            $$->nd_body = $$->nd_else;
nd_body           457 parse.y        			    $$ = NEW_WHILE(cond($3), $1->nd_body, 0);
nd_body           469 parse.y        			    $$ = NEW_UNTIL(cond($3), $1->nd_body, 0);
nd_body          1560 parse.y        		            NODE *tmp = $$->nd_body;
nd_body          1561 parse.y        		            $$->nd_body = $$->nd_else;
nd_body          1573 parse.y        		            NODE *tmp = $$->nd_body;
nd_body          1574 parse.y        		            $$->nd_body = $$->nd_else;
nd_body          5053 parse.y        	    node = node->nd_body;
nd_body          5057 parse.y        	    if (!value_expr(node->nd_body)) return Qfalse;
nd_body          5201 parse.y        	    *n = (*n)->nd_body;
nd_body          5428 parse.y        	*nodep = c->nd_body;
nd_body          5432 parse.y        	    c->nd_next = c->nd_next->nd_body;
nd_body          5530 parse.y        	node2->nd_body = arg_prepend(node1, node2->nd_body);


nd_cflag

nd_cflag         3766 eval.c         				    node->nd_cflag);
nd_cflag         3770 eval.c         				    node->nd_cflag);
nd_cflag         5753 parse.c        			    node->nd_cflag = options & ~RE_OPTION_ONCE;
nd_cflag         2013 parse.y        			    node->nd_cflag = options & ~RE_OPTION_ONCE;


nd_cfnc

nd_cfnc          4894 eval.c         	    result = (*node->nd_cfnc)(val, node->nd_tval, self);
nd_cfnc          5683 eval.c         		    result = call_cfunc(body->nd_cfnc, recv, len, argc, argv);
nd_cfnc          5692 eval.c         		result = call_cfunc(body->nd_cfnc, recv, len, argc, argv);
nd_cfnc          8495 eval.c         	    data->body->nd_cfnc == bmcall) {


nd_clss

nd_clss          1799 eval.c         #define ruby_cbase (ruby_cref->nd_clss)
nd_clss          1811 eval.c         	struct RClass *klass = RCLASS(cbase->nd_clss);
nd_clss          1822 eval.c             return rb_const_defined(cref->nd_clss, id);
nd_clss          1835 eval.c         	VALUE klass = cbase->nd_clss;
nd_clss          1847 eval.c             return rb_const_get(cref->nd_clss, id);
nd_clss          1855 eval.c             while (cref && cref->nd_next && (NIL_P(cref->nd_clss) || FL_TEST(cref->nd_clss, FL_SINGLETON))) {
nd_clss          1861 eval.c             if (NIL_P(cref->nd_clss)) {
nd_clss          1864 eval.c             return cref->nd_clss;
nd_clss          1889 eval.c         	if (!NIL_P(cbase->nd_clss)) rb_ary_push(ary, cbase->nd_clss);
nd_clss          1919 eval.c         	if (!NIL_P(cbase->nd_clss)) {
nd_clss          1920 eval.c         	    data = rb_mod_const_at(cbase->nd_clss, data);


nd_cnt

nd_cnt           2086 eval.c             orig->nd_cnt++;
nd_cnt           2095 eval.c         	if (node->nd_cnt == 0 && node->nd_body) {
nd_cnt           2217 eval.c         #define MATCH_DATA *rb_svar(node->nd_cnt)
nd_cnt           3287 eval.c         	    VALUE *flip = rb_svar(node->nd_cnt);
nd_cnt           3309 eval.c         	    VALUE *flip = rb_svar(node->nd_cnt);
nd_cnt           3552 eval.c         	ruby_scope->local_vars[node->nd_cnt] = result;
nd_cnt           3605 eval.c         	result = ruby_scope->local_vars[node->nd_cnt];
nd_cnt           3633 eval.c         	    ruby_scope->local_vars[node->nd_cnt] = result;
nd_cnt           3824 eval.c         		if (RTEST(ruby_verbose) && ruby_class == origin && body->nd_cnt == 0 && body->nd_body) {
nd_cnt           5118 eval.c         	ruby_scope->local_vars[lhs->nd_cnt] = val;
nd_cnt           5771 eval.c         		    i = node->nd_cnt;
nd_cnt           9195 eval.c         	n = body->nd_cnt;
nd_cnt           9357 parse.c        	node->nd_cnt = local_append(internal_id());
nd_cnt           5359 parse.y        	node->nd_cnt = local_append(internal_id());


nd_cond

nd_cond          2940 eval.c         	if (RTEST(rb_eval(self, node->nd_cond))) {
nd_cond          3029 eval.c         	    if (node->nd_state && !RTEST(rb_eval(self, node->nd_cond)))
nd_cond          3036 eval.c         	    } while (RTEST(rb_eval(self, node->nd_cond)));
nd_cond          3064 eval.c         	    if (node->nd_state && RTEST(rb_eval(self, node->nd_cond)))
nd_cond          3071 eval.c         	    } while (!RTEST(rb_eval(self, node->nd_cond)));
nd_cond          3781 parse.c        			if (cond_negative(&yyval.node->nd_cond)) {
nd_cond          3792 parse.c        			if (cond_negative(&yyval.node->nd_cond)) {
nd_cond          3807 parse.c        			if (cond_negative(&yyval.node->nd_cond)) {
nd_cond          3821 parse.c        			if (cond_negative(&yyval.node->nd_cond)) {
nd_cond          5245 parse.c        			if (cond_negative(&yyval.node->nd_cond)) {
nd_cond          5257 parse.c        			if (cond_negative(&yyval.node->nd_cond)) {
nd_cond          5277 parse.c        			if (cond_negative(&yyval.node->nd_cond)) {
nd_cond          5295 parse.c        			if (cond_negative(&yyval.node->nd_cond)) {
nd_cond           440 parse.y        			if (cond_negative(&$$->nd_cond)) {
nd_cond           449 parse.y        			if (cond_negative(&$$->nd_cond)) {
nd_cond           462 parse.y        			if (cond_negative(&$$->nd_cond)) {
nd_cond           474 parse.y        			if (cond_negative(&$$->nd_cond)) {
nd_cond          1559 parse.y        			if (cond_negative(&$$->nd_cond)) {
nd_cond          1572 parse.y        			if (cond_negative(&$$->nd_cond)) {
nd_cond          1584 parse.y        			if (cond_negative(&$$->nd_cond)) {
nd_cond          1594 parse.y        			if (cond_negative(&$$->nd_cond)) {


nd_cpath

nd_cpath         3912 eval.c         	    cbase = class_prefix(self, node->nd_cpath);
nd_cpath         3913 eval.c         	    cname = node->nd_cpath->nd_mid;
nd_cpath         3970 eval.c         	    cbase = class_prefix(self, node->nd_cpath);
nd_cpath         3971 eval.c         	    cname = node->nd_cpath->nd_mid;


nd_cval

nd_cval          5712 eval.c         	result = method_call(argc, argv, umethod_bind(body->nd_cval, recv));
nd_cval          5716 eval.c         	result = proc_invoke(body->nd_cval, rb_ary_new4(argc, argv), recv, klass);
nd_cval          9187 eval.c         	return proc_arity(body->nd_cval);
nd_cval          9189 eval.c         	return method_arity(body->nd_cval);


nd_defn

nd_defn          3806 eval.c         	if (node->nd_defn) {
nd_defn          3842 eval.c         	    defn = copy_node_scope(node->nd_defn, ruby_cref);
nd_defn          3853 eval.c         	if (node->nd_defn) {
nd_defn          3878 eval.c         	    defn = copy_node_scope(node->nd_defn, ruby_cref);


nd_else

nd_else          2944 eval.c         	    node = node->nd_else;
nd_else          3236 eval.c         	    if (!rescuing && (node = node->nd_else)) { /* else clause given */
nd_else          3578 eval.c         	    rb_const_set(class_prefix(self, node->nd_else), node->nd_else->nd_mid, result);
nd_else          5131 eval.c         	    rb_const_set(class_prefix(self, lhs->nd_else), lhs->nd_else->nd_mid, val);
nd_else          3782 parse.c        		            yyval.node->nd_else = yyval.node->nd_body;
nd_else          3793 parse.c        		            yyval.node->nd_body = yyval.node->nd_else;
nd_else          3794 parse.c        		            yyval.node->nd_else = 0;
nd_else          5247 parse.c        		            yyval.node->nd_body = yyval.node->nd_else;
nd_else          5248 parse.c        		            yyval.node->nd_else = tmp;
nd_else          5259 parse.c        		            yyval.node->nd_body = yyval.node->nd_else;
nd_else          5260 parse.c        		            yyval.node->nd_else = tmp;
nd_else          9056 parse.c        	    node = node->nd_else;
nd_else           441 parse.y        		            $$->nd_else = $$->nd_body;
nd_else           450 parse.y        		            $$->nd_body = $$->nd_else;
nd_else           451 parse.y        		            $$->nd_else = 0;
nd_else          1561 parse.y        		            $$->nd_body = $$->nd_else;
nd_else          1562 parse.y        		            $$->nd_else = tmp;
nd_else          1574 parse.y        		            $$->nd_body = $$->nd_else;
nd_else          1575 parse.y        		            $$->nd_else = tmp;
nd_else          5058 parse.y        	    node = node->nd_else;


nd_end

nd_end           3280 eval.c         	    VALUE end = rb_eval(self, node->nd_end);
nd_end           3291 eval.c         		    *flip = RTEST(rb_eval(self, node->nd_end))?Qfalse:Qtrue;
nd_end           3299 eval.c         		if (RTEST(rb_eval(self, node->nd_end))) {
nd_end           3316 eval.c         		if (RTEST(rb_eval(self, node->nd_end))) {
nd_end           6119 parse.c        			yyval.node->nd_end = yyval.node;
nd_end           8588 parse.c        	end->nd_end = end;
nd_end           8593 parse.c        	end = h->nd_end;
nd_end           8620 parse.c        	tail->nd_end = tail;
nd_end           8623 parse.c            h->nd_end = tail->nd_end;
nd_end           8636 parse.c        	last = list->nd_next->nd_end;
nd_end           8644 parse.c            list->nd_next->nd_end = last->nd_next;
nd_end           8656 parse.c        	last = head->nd_next->nd_end;
nd_end           8665 parse.c        	head->nd_next->nd_end = tail->nd_next->nd_end;
nd_end           8668 parse.c        	head->nd_next->nd_end = tail;
nd_end           9354 parse.c        	node->nd_end = range_op(node->nd_end);
nd_end           9360 parse.c        	    int e = literal_node(node->nd_end);
nd_end           2324 parse.y        			$$->nd_end = $$;
nd_end           4590 parse.y        	end->nd_end = end;
nd_end           4595 parse.y        	end = h->nd_end;
nd_end           4622 parse.y        	tail->nd_end = tail;
nd_end           4625 parse.y            h->nd_end = tail->nd_end;
nd_end           4638 parse.y        	last = list->nd_next->nd_end;
nd_end           4646 parse.y            list->nd_next->nd_end = last->nd_next;
nd_end           4658 parse.y        	last = head->nd_next->nd_end;
nd_end           4667 parse.y        	head->nd_next->nd_end = tail->nd_next->nd_end;
nd_end           4670 parse.y        	head->nd_next->nd_end = tail;
nd_end           5356 parse.y        	node->nd_end = range_op(node->nd_end);
nd_end           5362 parse.y        	    int e = literal_node(node->nd_end);


nd_ensr

nd_ensr          3248 eval.c         	if (node->nd_ensr) {
nd_ensr          3252 eval.c         	    rb_eval(self, node->nd_ensr);


nd_entry

nd_entry         2358 eval.c         	if (rb_gvar_defined(node->nd_entry)) {
nd_entry         3567 eval.c         	rb_gvar_set(node->nd_entry, result);
nd_entry         3613 eval.c         	result = rb_gvar_get(node->nd_entry);
nd_entry         5108 eval.c         	rb_gvar_set(lhs->nd_entry, val);


nd_func

nd_func          7114 parse.c            int func = quote->nd_func;
nd_func          7127 parse.c        	    quote->nd_func = -1;
nd_func          3116 parse.y            int func = quote->nd_func;
nd_func          3129 parse.y        	    quote->nd_func = -1;


nd_head

nd_head           479 eval.c         	    body = ent->method = body->nd_head;
nd_head           494 eval.c         	    body = body->nd_head;
nd_head          2090 eval.c         	body = body->nd_head;
nd_head          2161 eval.c              (void*)tmp__protect_tmp->nd_head)
nd_head          2180 eval.c         		argv[i] = rb_eval(self,n->nd_head);\
nd_head          2236 eval.c         		if (!is_defined(self, node->nd_head, buf))
nd_head          2384 eval.c         	    val = rb_eval(self, node->nd_head);
nd_head          2780 eval.c             if (cpath->nd_head) {
nd_head          2781 eval.c         	VALUE c = rb_eval(self, cpath->nd_head);
nd_head          2855 eval.c         	node = node->nd_head;
nd_head          2953 eval.c         	    tag = node->nd_head;
nd_head          2958 eval.c         		if (tag->nd_head && nd_type(tag->nd_head) == NODE_WHEN) {
nd_head          2959 eval.c         		    VALUE v = rb_eval(self, tag->nd_head->nd_head);
nd_head          2972 eval.c         		if (RTEST(rb_eval(self, tag->nd_head))) {
nd_head          2986 eval.c         	    val = rb_eval(self, node->nd_head);
nd_head          2994 eval.c         		tag = node->nd_head;
nd_head          2999 eval.c         		    if (tag->nd_head && nd_type(tag->nd_head) == NODE_WHEN) {
nd_head          3000 eval.c         			VALUE v = rb_eval(self, tag->nd_head->nd_head);
nd_head          3013 eval.c         		    if (RTEST(rb_funcall2(rb_eval(self, tag->nd_head), eqq, 1, &val))) {
nd_head          3164 eval.c         	result = splat_value(rb_eval(self, node->nd_head));
nd_head          3168 eval.c         	result = rb_ary_to_ary(rb_eval(self, node->nd_head));
nd_head          3172 eval.c         	result = avalue_splat(rb_eval(self, node->nd_head));
nd_head          3177 eval.c         	if (node->nd_head) {
nd_head          3178 eval.c         	    result = rb_eval(self, node->nd_head);
nd_head          3196 eval.c         		result = rb_eval(self, node->nd_head);
nd_head          3223 eval.c         		    resq = resq->nd_head; /* next rescue */
nd_head          3245 eval.c         	    result = rb_eval(self, node->nd_head);
nd_head          3330 eval.c         	    VALUE args = rb_eval(self, node->nd_head);
nd_head          3337 eval.c         	    VALUE args = rb_ary_dup(rb_eval(self, node->nd_head));
nd_head          3483 eval.c         	    rval = node->nd_args->nd_head;
nd_head          3531 eval.c         	result = rb_eval(self, node->nd_head);
nd_head          3537 eval.c         	if ((node->nd_aid && !is_defined(self, node->nd_head, 0)) ||
nd_head          3538 eval.c         	    !RTEST(result = rb_eval(self, node->nd_head))) {
nd_head          3644 eval.c         	    klass = rb_eval(self, node->nd_head);
nd_head          3696 eval.c         	    list = node->nd_head;
nd_head          3698 eval.c         		key = rb_eval(self, list->nd_head);
nd_head          3702 eval.c         		val = rb_eval(self, list->nd_head);
nd_head          3722 eval.c         		RARRAY(ary)->ptr[i++] = rb_eval(self, node->nd_head);
nd_head          3749 eval.c         		if (list->nd_head) {
nd_head          3750 eval.c         		    switch (nd_type(list->nd_head)) {
nd_head          3752 eval.c         			str2 = list->nd_head->nd_lit;
nd_head          3755 eval.c         			str2 = rb_eval(self, list->nd_head);
nd_head          4021 eval.c         	    char *desc = is_defined(self, node->nd_head, buf);
nd_head          4836 eval.c         		    val = svalue_to_mrhs(val, block->var->nd_head);
nd_head          5058 eval.c             list = node->nd_head;
nd_head          5060 eval.c         	assign(self, list->nd_head, RARRAY(val)->ptr[i], pcall);
nd_head          5081 eval.c         	assign(self, list->nd_head, Qnil, pcall);
nd_head          5150 eval.c         	massign(self, lhs, svalue_to_mrhs(val, lhs->nd_head), pcall);
nd_head          5763 eval.c         		    node = body->nd_head;
nd_head          5802 eval.c         				assign(recv, opt->nd_head, *argv, 1);
nd_head          8506 eval.c         	list = data->var->nd_head;
nd_head          9193 eval.c         	    body = body->nd_head;
nd_head          3688 parse.c        				void_expr(node->nd_head);
nd_head          3870 parse.c        			yyvsp[-2].node->nd_value = (yyvsp[-2].node->nd_head) ? NEW_TO_ARY(yyvsp[0].node) : NEW_ARRAY(yyvsp[0].node);
nd_head          3980 parse.c        			yyvsp[-2].node->nd_value = (yyvsp[-2].node->nd_head) ? NEW_TO_ARY(yyvsp[0].node) : NEW_ARRAY(yyvsp[0].node);
nd_head          8598 parse.c        	NODE *nd = end->nd_head;
nd_head          8709 parse.c        	    tail->nd_head = NEW_STR(tail->nd_lit);
nd_head          9047 parse.c        	    node = node->nd_head;
nd_head          9183 parse.c        	void_expr(node->nd_head);
nd_head          9453 parse.c        	    node = node->nd_head;
nd_head          9471 parse.c                    node = node->nd_head;
nd_head          9510 parse.c        	node2->nd_head = node1;
nd_head          9525 parse.c        	return arg_concat(node1, node2->nd_head);
nd_head          9544 parse.c        	a->nd_iter = NEW_CALL(r,m,a->nd_head);
nd_head          9556 parse.c        	a->nd_iter = NEW_FCALL(m,a->nd_head);
nd_head          9567 parse.c        	a->nd_iter = NEW_SUPER(a->nd_head);
nd_head           361 parse.y        				void_expr(node->nd_head);
nd_head           511 parse.y        			$1->nd_value = ($1->nd_head) ? NEW_TO_ARY($3) : NEW_ARRAY($3);
nd_head           605 parse.y        			$1->nd_value = ($1->nd_head) ? NEW_TO_ARY($3) : NEW_ARRAY($3);
nd_head          4600 parse.y        	NODE *nd = end->nd_head;
nd_head          4711 parse.y        	    tail->nd_head = NEW_STR(tail->nd_lit);
nd_head          5049 parse.y        	    node = node->nd_head;
nd_head          5185 parse.y        	void_expr(node->nd_head);
nd_head          5455 parse.y        	    node = node->nd_head;
nd_head          5473 parse.y                    node = node->nd_head;
nd_head          5512 parse.y        	node2->nd_head = node1;
nd_head          5527 parse.y        	return arg_concat(node1, node2->nd_head);
nd_head          5546 parse.y        	a->nd_iter = NEW_CALL(r,m,a->nd_head);
nd_head          5558 parse.y        	a->nd_iter = NEW_FCALL(m,a->nd_head);
nd_head          5569 parse.y        	a->nd_iter = NEW_SUPER(a->nd_head);


nd_iter

nd_iter          3109 eval.c         		    result = rb_eval(self, node->nd_iter);
nd_iter          3116 eval.c         		    recv = rb_eval(self, node->nd_iter);
nd_iter          8656 eval.c         	result = rb_eval(self, node->nd_iter);
nd_iter          8676 eval.c         	result = rb_eval(self, node->nd_iter);
nd_iter          8701 eval.c         	result = rb_eval(self, node->nd_iter);
nd_iter          4086 parse.c        			    yyvsp[0].node->nd_iter = yyval.node;
nd_iter          4107 parse.c        			    yyvsp[0].node->nd_iter = yyval.node;
nd_iter          4128 parse.c        			    yyvsp[0].node->nd_iter = yyval.node;
nd_iter          5224 parse.c        			yyvsp[0].node->nd_iter = NEW_FCALL(yyvsp[-1].id, 0);
nd_iter          5226 parse.c        			fixpos(yyvsp[0].node->nd_iter, yyvsp[0].node);
nd_iter          5235 parse.c        			yyvsp[0].node->nd_iter = yyvsp[-1].node;
nd_iter          5527 parse.c        			yyvsp[0].node->nd_iter = yyvsp[-1].node;
nd_iter          9544 parse.c        	a->nd_iter = NEW_CALL(r,m,a->nd_head);
nd_iter          9556 parse.c        	a->nd_iter = NEW_FCALL(m,a->nd_head);
nd_iter          9567 parse.c        	a->nd_iter = NEW_SUPER(a->nd_head);
nd_iter           697 parse.y        			    $3->nd_iter = $$;
nd_iter           714 parse.y        			    $5->nd_iter = $$;
nd_iter           731 parse.y        			    $5->nd_iter = $$;
nd_iter          1538 parse.y        			$2->nd_iter = NEW_FCALL($1, 0);
nd_iter          1540 parse.y        			fixpos($2->nd_iter, $2);
nd_iter          1548 parse.y        			$2->nd_iter = $1;
nd_iter          1799 parse.y        			$2->nd_iter = $1;
nd_iter          5546 parse.y        	a->nd_iter = NEW_CALL(r,m,a->nd_head);
nd_iter          5558 parse.y        	a->nd_iter = NEW_FCALL(m,a->nd_head);
nd_iter          5569 parse.y        	a->nd_iter = NEW_SUPER(a->nd_head);


nd_line

nd_line          1098 eval.c         			      ruby_sourceline = nd_line(ruby_current_node))
nd_line          1108 eval.c         	ruby_sourceline = nd_line(ruby_current_node);
nd_line          1426 eval.c         		    tag->nd_file, nd_line(tag));
nd_line          2624 eval.c         	ruby_sourceline = nd_line(node);
nd_line          4861 eval.c         				len, cnode->nd_file, nd_line(cnode));
nd_line          6136 eval.c         		     n->nd_file, nd_line(n),
nd_line          6140 eval.c         	    snprintf(buf, BUFSIZ, "%s:%d", n->nd_file, nd_line(n));
nd_line          6280 eval.c         	    line = nd_line(data->frame.node);
nd_line          8571 eval.c         		 node->nd_file, nd_line(node));
nd_line          9321 eval.c             nd_set_line(bdata->body, nd_line(mdata->body));
nd_line          10594 eval.c         			th->node->nd_file, nd_line(th->node));
nd_line          11805 eval.c         		 node->nd_file, nd_line(node));
nd_line          7152 parse.c        	ruby_sourceline = nd_line(quote);
nd_line          7231 parse.c            ruby_sourceline = nd_line(here);
nd_line          8518 parse.c            return nd_line(node);
nd_line          8530 parse.c                nl->nd_nth = nd_line(node);
nd_line          8543 parse.c            nd_set_line(node, nd_line(orig));
nd_line          8552 parse.c            ruby_sourceline = nd_line(node);
nd_line          8563 parse.c            ruby_sourceline = nd_line(node);
nd_line          9167 parse.c        	ruby_sourceline = nd_line(node);
nd_line          3154 parse.y        	ruby_sourceline = nd_line(quote);
nd_line          3233 parse.y            ruby_sourceline = nd_line(here);
nd_line          4520 parse.y            return nd_line(node);
nd_line          4532 parse.y                nl->nd_nth = nd_line(node);
nd_line          4545 parse.y            nd_set_line(node, nd_line(orig));
nd_line          4554 parse.y            ruby_sourceline = nd_line(node);
nd_line          4565 parse.y            ruby_sourceline = nd_line(node);
nd_line          5169 parse.y        	ruby_sourceline = nd_line(node);


nd_lit

nd_lit           2871 eval.c         	result = rb_reg_match2(node->nd_lit);
nd_lit           3731 eval.c         	result = rb_str_new3(node->nd_lit);
nd_lit           3747 eval.c         	    str = rb_str_new3(node->nd_lit);
nd_lit           3752 eval.c         			str2 = list->nd_head->nd_lit;
nd_lit           3772 eval.c         		node->nd_lit = result;
nd_lit           3791 eval.c         	result = rb_funcall(self, '`', 1, rb_str_new3(node->nd_lit));
nd_lit           3795 eval.c         	result = node->nd_lit;
nd_lit           4606 parse.c        			if (nd_type(yyvsp[-2].node) == NODE_LIT && FIXNUM_P(yyvsp[-2].node->nd_lit) &&
nd_lit           4607 parse.c        			    nd_type(yyvsp[0].node) == NODE_LIT && FIXNUM_P(yyvsp[0].node->nd_lit)) {
nd_lit           4608 parse.c        			    yyvsp[-2].node->nd_lit = rb_range_new(yyvsp[-2].node->nd_lit, yyvsp[0].node->nd_lit, Qfalse);
nd_lit           4621 parse.c        			if (nd_type(yyvsp[-2].node) == NODE_LIT && FIXNUM_P(yyvsp[-2].node->nd_lit) &&
nd_lit           4622 parse.c        			    nd_type(yyvsp[0].node) == NODE_LIT && FIXNUM_P(yyvsp[0].node->nd_lit)) {
nd_lit           4623 parse.c        			    yyvsp[-2].node->nd_lit = rb_range_new(yyvsp[-2].node->nd_lit, yyvsp[0].node->nd_lit, Qtrue);
nd_lit           5737 parse.c        				VALUE src = node->nd_lit;
nd_lit           5739 parse.c        				node->nd_lit = rb_reg_new(RSTRING(src)->ptr,
nd_lit           5909 parse.c        				lit = yyval.node->nd_lit;
nd_lit           5915 parse.c        				    yyval.node->nd_lit = ID2SYM(rb_intern(RSTRING(yyval.node->nd_lit)->ptr));
nd_lit           7232 parse.c            dispose_string(here->nd_lit);
nd_lit           7262 parse.c            eos = RSTRING(here->nd_lit)->ptr;
nd_lit           7263 parse.c            len = RSTRING(here->nd_lit)->len - 1;
nd_lit           8692 parse.c        	    rb_str_concat(head->nd_lit, tail->nd_lit);
nd_lit           8702 parse.c        	    rb_str_concat(head->nd_lit, tail->nd_lit);
nd_lit           8703 parse.c        	    tail->nd_lit = head->nd_lit;
nd_lit           8709 parse.c        	    tail->nd_head = NEW_STR(tail->nd_lit);
nd_lit           8788 parse.c        	    if (TYPE(node1->nd_lit) == T_REGEXP) {
nd_lit           8801 parse.c        	    if (TYPE(node2->nd_lit) == T_REGEXP) {
nd_lit           9295 parse.c            if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) {
nd_lit           9372 parse.c        	if (TYPE(node->nd_lit) == T_REGEXP) {
nd_lit           9488 parse.c            switch (TYPE(node->nd_lit)) {
nd_lit           9490 parse.c        	node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit));
nd_lit           9493 parse.c        	node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0);
nd_lit           9496 parse.c        	RFLOAT(node->nd_lit)->value = -RFLOAT(node->nd_lit)->value;
nd_lit           1077 parse.y        			if (nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) &&
nd_lit           1078 parse.y        			    nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) {
nd_lit           1079 parse.y        			    $1->nd_lit = rb_range_new($1->nd_lit, $3->nd_lit, Qfalse);
nd_lit           1090 parse.y        			if (nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) &&
nd_lit           1091 parse.y        			    nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) {
nd_lit           1092 parse.y        			    $1->nd_lit = rb_range_new($1->nd_lit, $3->nd_lit, Qtrue);
nd_lit           1997 parse.y        				VALUE src = node->nd_lit;
nd_lit           1999 parse.y        				node->nd_lit = rb_reg_new(RSTRING(src)->ptr,
nd_lit           2153 parse.y        				lit = $$->nd_lit;
nd_lit           2159 parse.y        				    $$->nd_lit = ID2SYM(rb_intern(RSTRING($$->nd_lit)->ptr));
nd_lit           3234 parse.y            dispose_string(here->nd_lit);
nd_lit           3264 parse.y            eos = RSTRING(here->nd_lit)->ptr;
nd_lit           3265 parse.y            len = RSTRING(here->nd_lit)->len - 1;
nd_lit           4694 parse.y        	    rb_str_concat(head->nd_lit, tail->nd_lit);
nd_lit           4704 parse.y        	    rb_str_concat(head->nd_lit, tail->nd_lit);
nd_lit           4705 parse.y        	    tail->nd_lit = head->nd_lit;
nd_lit           4711 parse.y        	    tail->nd_head = NEW_STR(tail->nd_lit);
nd_lit           4790 parse.y        	    if (TYPE(node1->nd_lit) == T_REGEXP) {
nd_lit           4803 parse.y        	    if (TYPE(node2->nd_lit) == T_REGEXP) {
nd_lit           5297 parse.y            if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) {
nd_lit           5374 parse.y        	if (TYPE(node->nd_lit) == T_REGEXP) {
nd_lit           5490 parse.y            switch (TYPE(node->nd_lit)) {
nd_lit           5492 parse.y        	node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit));
nd_lit           5495 parse.y        	node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0);
nd_lit           5498 parse.y        	RFLOAT(node->nd_lit)->value = -RFLOAT(node->nd_lit)->value;
nd_lit           1342 variable.c         if (!load || !(file = load->nd_lit) || rb_provided(RSTRING(file)->ptr)) {
nd_lit           1361 variable.c         file = ((NODE *)load)->nd_lit;


nd_mid

nd_mid            478 eval.c         	    *idp = ent->mid0 = body->nd_mid;
nd_mid            493 eval.c         	    *idp = body->nd_mid;
nd_mid           2088 eval.c         	def = body->nd_mid;
nd_mid           2298 eval.c         		ID id = node->nd_mid;
nd_mid           2308 eval.c         	    else if (!rb_method_boundp(val, node->nd_mid, call))
nd_mid           2395 eval.c         		if (rb_const_defined_from(val, node->nd_mid))
nd_mid           2399 eval.c         		if (rb_method_boundp(CLASS_OF(val), node->nd_mid, 1)) {
nd_mid           2407 eval.c         	if (rb_const_defined_from(rb_cObject, node->nd_mid)) {
nd_mid           3363 eval.c         	    rb_call(CLASS_OF(recv),recv,node->nd_mid,argc,argv,scope);
nd_mid           3381 eval.c         	    result = rb_call(CLASS_OF(recv),recv,node->nd_mid,argc,argv,0);
nd_mid           3396 eval.c         	    result = rb_call(CLASS_OF(self),self,node->nd_mid,argc,argv,1);
nd_mid           3402 eval.c         	result = rb_call(CLASS_OF(self),self,node->nd_mid,0,0,2);
nd_mid           3486 eval.c         	    switch (node->nd_mid) {
nd_mid           3496 eval.c         		val = rb_funcall(val, node->nd_mid, 1, rb_eval(self, rval));
nd_mid           3511 eval.c         	    switch (node->nd_next->nd_mid) {
nd_mid           3521 eval.c         		val = rb_funcall(val, node->nd_next->nd_mid, 1,
nd_mid           3578 eval.c         	    rb_const_set(class_prefix(self, node->nd_else), node->nd_else->nd_mid, result);
nd_mid           3645 eval.c         	    if (rb_is_const_id(node->nd_mid)) {
nd_mid           3649 eval.c         		    result = rb_const_get_from(klass, node->nd_mid);
nd_mid           3658 eval.c         		result = rb_funcall(klass, node->nd_mid, 0, 0);
nd_mid           3664 eval.c         	result = rb_const_get_from(rb_cObject, node->nd_mid);
nd_mid           3814 eval.c         	    if (ruby_class == rb_cObject && node->nd_mid == init) {
nd_mid           3817 eval.c         	    if (node->nd_mid == __id__ || node->nd_mid == __send__) {
nd_mid           3819 eval.c         			rb_id2name(node->nd_mid));
nd_mid           3822 eval.c         	    body = search_method(ruby_class, node->nd_mid, &origin);
nd_mid           3825 eval.c         		    rb_warning("method redefined; discarding old %s", rb_id2name(node->nd_mid));
nd_mid           3829 eval.c         	    if (SCOPE_TEST(SCOPE_PRIVATE) || node->nd_mid == init) {
nd_mid           3843 eval.c         	    rb_add_method(ruby_class, node->nd_mid, defn, noex);
nd_mid           3846 eval.c         			      node->nd_mid, defn, NOEX_PUBLIC);
nd_mid           3864 eval.c         			 rb_id2name(node->nd_mid),
nd_mid           3870 eval.c         	    if (st_lookup(RCLASS(klass)->m_tbl, node->nd_mid, (st_data_t *)&body)) {
nd_mid           3875 eval.c         		    rb_warning("redefine %s", rb_id2name(node->nd_mid));
nd_mid           3879 eval.c         	    rb_add_method(klass, node->nd_mid, defn,
nd_mid           3889 eval.c         	rb_undef(ruby_class, node->nd_mid);
nd_mid           3913 eval.c         	    cname = node->nd_cpath->nd_mid;
nd_mid           3971 eval.c         	    cname = node->nd_cpath->nd_mid;
nd_mid           5131 eval.c         	    rb_const_set(class_prefix(self, lhs->nd_else), lhs->nd_else->nd_mid, val);
nd_mid           5170 eval.c         		rb_call(CLASS_OF(recv), recv, lhs->nd_mid, 1, &val, scope);
nd_mid           5180 eval.c         		rb_call(CLASS_OF(recv), recv, lhs->nd_mid,
nd_mid           9093 parse.c        	switch (node->nd_mid) {
nd_mid           9112 parse.c        	    useless = rb_id2name(node->nd_mid);
nd_mid           5095 parse.y        	switch (node->nd_mid) {
nd_mid           5114 parse.y        	    useless = rb_id2name(node->nd_mid);


nd_nest

nd_nest          7125 parse.c            if (c == term && !quote->nd_nest) {
nd_nest          7151 parse.c            if (tokadd_string(func, term, paren, &quote->nd_nest) == -1) {
nd_nest          3127 parse.y            if (c == term && !quote->nd_nest) {
nd_nest          3153 parse.y            if (tokadd_string(func, term, paren, &quote->nd_nest) == -1) {


nd_new

nd_new           3897 eval.c         	rb_alias(ruby_class, node->nd_new, node->nd_old);
nd_new           3902 eval.c         	rb_alias_variable(node->nd_new, node->nd_old);


nd_next

nd_next          1020 eval.c         #define POP_CREF() ruby_cref = ruby_cref->nd_next
nd_next          1810 eval.c             while (cbase && cbase->nd_next) {
nd_next          1820 eval.c         	cbase = cbase->nd_next;
nd_next          1834 eval.c             while (cbase && cbase->nd_next) {
nd_next          1845 eval.c         	cbase = cbase->nd_next;
nd_next          1855 eval.c             while (cref && cref->nd_next && (NIL_P(cref->nd_clss) || FL_TEST(cref->nd_clss, FL_SINGLETON))) {
nd_next          1856 eval.c         	cref = cref->nd_next;
nd_next          1857 eval.c         	if (!cref->nd_next) {
nd_next          1888 eval.c             while (cbase && cbase->nd_next) {
nd_next          1890 eval.c         	cbase = cbase->nd_next;
nd_next          1922 eval.c         	cbase = cbase->nd_next;
nd_next          2144 eval.c             NODE *copy = NEW_NODE(NODE_SCOPE,0,rval,node->nd_next);
nd_next          2181 eval.c         		n=n->nd_next;\
nd_next          2238 eval.c         		node = node->nd_next;
nd_next          2427 eval.c         	node = node->nd_next;
nd_next          2854 eval.c         	contnode = node->nd_next;
nd_next          2969 eval.c         		    tag = tag->nd_next;
nd_next          2976 eval.c         		tag = tag->nd_next;
nd_next          2978 eval.c         	    node = node->nd_next;
nd_next          3010 eval.c         			tag = tag->nd_next;
nd_next          3017 eval.c         		    tag = tag->nd_next;
nd_next          3019 eval.c         		node = node->nd_next;
nd_next          3464 eval.c         		result = rb_eval(self, node->nd_next);
nd_next          3484 eval.c         	    SETUP_ARGS0(node->nd_args->nd_next, node->nd_args->nd_alen - 1);
nd_next          3506 eval.c         	    ID id = node->nd_next->nd_vid;
nd_next          3511 eval.c         	    switch (node->nd_next->nd_mid) {
nd_next          3521 eval.c         		val = rb_funcall(val, node->nd_next->nd_mid, 1,
nd_next          3525 eval.c         	    rb_funcall2(recv, node->nd_next->nd_aid, 1, &val);
nd_next          3699 eval.c         		list = list->nd_next;
nd_next          3703 eval.c         		list = list->nd_next;
nd_next          3721 eval.c         	    for (i=0;node;node=node->nd_next) {
nd_next          3745 eval.c         	    NODE *list = node->nd_next;
nd_next          3761 eval.c         		list = list->nd_next;
nd_next          4032 eval.c         	node = node->nd_next;
nd_next          4084 eval.c         	result = rb_eval(ruby_cbase, node->nd_next);
nd_next          5061 eval.c         	list = list->nd_next;
nd_next          5082 eval.c         	list = list->nd_next;
nd_next          5089 eval.c         	list = list->nd_next;
nd_next          5742 eval.c         	    b2 = body = body->nd_next;
nd_next          5764 eval.c         		    body = body->nd_next;
nd_next          5782 eval.c         			    optnode = optnode->nd_next;
nd_next          5804 eval.c         				opt = opt->nd_next;
nd_next          8510 eval.c         	    list = list->nd_next;
nd_next          9191 eval.c         	body = body->nd_next;	/* skip NODE_SCOPE */
nd_next          3685 parse.c        				while (node->nd_next) {
nd_next          3686 parse.c        				    node = node->nd_next;
nd_next          5869 parse.c        			    yyval.node = yyval.node->nd_next;
nd_next          8580 parse.c        	h = h->nd_next;
nd_next          8610 parse.c        	    nd = nd->nd_next;
nd_next          8622 parse.c            end->nd_next = tail;
nd_next          8635 parse.c            if (list->nd_next) {
nd_next          8636 parse.c        	last = list->nd_next->nd_end;
nd_next          8643 parse.c            last->nd_next = NEW_LIST(item);
nd_next          8644 parse.c            list->nd_next->nd_end = last->nd_next;
nd_next          8655 parse.c            if (head->nd_next) {
nd_next          8656 parse.c        	last = head->nd_next->nd_end;
nd_next          8663 parse.c            last->nd_next = tail;
nd_next          8664 parse.c            if (tail->nd_next) {
nd_next          8665 parse.c        	head->nd_next->nd_end = tail->nd_next->nd_end;
nd_next          8668 parse.c        	head->nd_next->nd_end = tail;
nd_next          8747 parse.c        	    node = node->nd_next;
nd_next          9044 parse.c        	    while (node->nd_next) {
nd_next          9045 parse.c        		node = node->nd_next;
nd_next          9066 parse.c        	    node = node->nd_next;
nd_next          9089 parse.c        	node = node->nd_next;
nd_next          9182 parse.c        	if (!node->nd_next) return;
nd_next          9184 parse.c        	node = node->nd_next;
nd_next          9196 parse.c        	    n = &(*n)->nd_next;
nd_next          9292 parse.c        	node = node->nd_next;
nd_next          9394 parse.c        	node->nd_next = cond0(node->nd_next);
nd_next          9429 parse.c        	if (c->nd_next && nd_type(c->nd_next) == NODE_NOT) {
nd_next          9430 parse.c        	    c->nd_next = c->nd_next->nd_body;
nd_next          9452 parse.c        	if (nd_type(node) == NODE_ARRAY && node->nd_next == 0) {
nd_next          9470 parse.c                if (nd_type(node) == NODE_ARRAY && node->nd_next == 0) {
nd_next           358 parse.y        				while (node->nd_next) {
nd_next           359 parse.y        				    node = node->nd_next;
nd_next          2113 parse.y        			    $$ = $$->nd_next;
nd_next          4582 parse.y        	h = h->nd_next;
nd_next          4612 parse.y        	    nd = nd->nd_next;
nd_next          4624 parse.y            end->nd_next = tail;
nd_next          4637 parse.y            if (list->nd_next) {
nd_next          4638 parse.y        	last = list->nd_next->nd_end;
nd_next          4645 parse.y            last->nd_next = NEW_LIST(item);
nd_next          4646 parse.y            list->nd_next->nd_end = last->nd_next;
nd_next          4657 parse.y            if (head->nd_next) {
nd_next          4658 parse.y        	last = head->nd_next->nd_end;
nd_next          4665 parse.y            last->nd_next = tail;
nd_next          4666 parse.y            if (tail->nd_next) {
nd_next          4667 parse.y        	head->nd_next->nd_end = tail->nd_next->nd_end;
nd_next          4670 parse.y        	head->nd_next->nd_end = tail;
nd_next          4749 parse.y        	    node = node->nd_next;
nd_next          5046 parse.y        	    while (node->nd_next) {
nd_next          5047 parse.y        		node = node->nd_next;
nd_next          5068 parse.y        	    node = node->nd_next;
nd_next          5091 parse.y        	node = node->nd_next;
nd_next          5184 parse.y        	if (!node->nd_next) return;
nd_next          5186 parse.y        	node = node->nd_next;
nd_next          5198 parse.y        	    n = &(*n)->nd_next;
nd_next          5294 parse.y        	node = node->nd_next;
nd_next          5396 parse.y        	node->nd_next = cond0(node->nd_next);
nd_next          5431 parse.y        	if (c->nd_next && nd_type(c->nd_next) == NODE_NOT) {
nd_next          5432 parse.y        	    c->nd_next = c->nd_next->nd_body;
nd_next          5454 parse.y        	if (nd_type(node) == NODE_ARRAY && node->nd_next == 0) {
nd_next          5472 parse.y                if (nd_type(node) == NODE_ARRAY && node->nd_next == 0) {


nd_noex

nd_noex            57 class.c            st_insert(tbl, mid, (st_data_t)NEW_METHOD(body->nd_body, body->nd_noex));
nd_noex           596 class.c        	else type = VISI(body->nd_noex);
nd_noex           471 eval.c         	ent->noex   = body->nd_noex;
nd_noex           472 eval.c         	if (noexp) *noexp = body->nd_noex;
nd_noex           489 eval.c         	if (noexp) *noexp = body->nd_noex;
nd_noex           613 eval.c             if (body->nd_noex != noex) {
nd_noex           615 eval.c         	    body->nd_noex = noex;
nd_noex          2100 eval.c               (st_data_t)NEW_METHOD(NEW_FBODY(body, def, origin), orig->nd_noex));
nd_noex          3880 eval.c         			  NOEX_PUBLIC|(body?body->nd_noex&NOEX_UNDEF:0));


nd_nth

nd_nth           2413 eval.c         	if (RTEST(rb_reg_nth_defined(node->nd_nth, MATCH_DATA))) {
nd_nth           2414 eval.c         	    sprintf(buf, "$%d", (int)node->nd_nth);
nd_nth           2421 eval.c         	    sprintf(buf, "$%c", (char)node->nd_nth);
nd_nth           3668 eval.c         	result = rb_reg_nth_match(node->nd_nth, MATCH_DATA);
nd_nth           3672 eval.c         	switch (node->nd_nth) {
nd_nth           3759 parse.c        			sprintf(buf, "$%c", (char)yyvsp[0].node->nd_nth);
nd_nth           7229 parse.c            lex_p = lex_pbeg + here->nd_nth;
nd_nth           8530 parse.c                nl->nd_nth = nd_line(node);
nd_nth           8957 parse.c        	rb_compile_error("Can't set variable $%d", node->nd_nth);
nd_nth           8960 parse.c        	rb_compile_error("Can't set variable $%c", (int)node->nd_nth);
nd_nth            424 parse.y        			sprintf(buf, "$%c", (char)$3->nd_nth);
nd_nth           3231 parse.y            lex_p = lex_pbeg + here->nd_nth;
nd_nth           4532 parse.y                nl->nd_nth = nd_line(node);
nd_nth           4959 parse.y        	rb_compile_error("Can't set variable $%d", node->nd_nth);
nd_nth           4962 parse.y        	rb_compile_error("Can't set variable $%c", (int)node->nd_nth);
nd_nth           1345 variable.c         return rb_require_safe(file, load->nd_nth);


nd_old

nd_old           3897 eval.c         	rb_alias(ruby_class, node->nd_new, node->nd_old);
nd_old           3902 eval.c         	rb_alias_variable(node->nd_new, node->nd_old);


nd_opt

nd_opt           5778 eval.c         			NODE *optnode = node->nd_opt;
nd_opt           5798 eval.c         			if (node->nd_opt) {
nd_opt           5799 eval.c         			    NODE *opt = node->nd_opt;
nd_opt           9196 eval.c         	if (body->nd_opt || body->nd_rest != -1)


nd_orig

nd_orig           476 eval.c         	    *klassp = body->nd_orig;
nd_orig           477 eval.c         	    ent->origin = body->nd_orig;
nd_orig           492 eval.c         	    *klassp = body->nd_orig;
nd_orig          2089 eval.c         	origin = body->nd_orig;
nd_orig          7225 parse.c            VALUE line = here->nd_orig;
nd_orig          3227 parse.y            VALUE line = here->nd_orig;


nd_paren

nd_paren         7116 parse.c            int paren = nd_paren(quote);
nd_paren         3118 parse.y            int paren = nd_paren(quote);


nd_recv

nd_recv          2280 eval.c         	if (node->nd_recv == (NODE *)1) goto check_bound;
nd_recv          2284 eval.c         	    val = rb_eval(self, node->nd_recv);
nd_recv          2877 eval.c         	    VALUE l = rb_eval(self,node->nd_recv);
nd_recv          2886 eval.c         	    VALUE r = rb_eval(self,node->nd_recv);
nd_recv          3350 eval.c         	    if (node->nd_recv == (NODE *)1) {
nd_recv          3355 eval.c         		recv = rb_eval(self, node->nd_recv);
nd_recv          3375 eval.c         	    recv = rb_eval(self, node->nd_recv);
nd_recv          3482 eval.c         	    recv = rb_eval(self, node->nd_recv);
nd_recv          3509 eval.c         	    recv = rb_eval(self, node->nd_recv);
nd_recv          3854 eval.c         	    VALUE recv = rb_eval(self, node->nd_recv);
nd_recv          4000 eval.c         	    result = rb_eval(self, node->nd_recv);
nd_recv          5158 eval.c         	    if (lhs->nd_recv == (NODE *)1) {
nd_recv          5163 eval.c         		recv = rb_eval(self, lhs->nd_recv);


nd_rest

nd_rest          5776 eval.c         		    if ((long)node->nd_rest == -1) {
nd_rest          5811 eval.c         			if ((long)node->nd_rest >= 0) {
nd_rest          5818 eval.c         			    ruby_scope->local_vars[node->nd_rest] = v;
nd_rest          9196 eval.c         	if (body->nd_opt || body->nd_rest != -1)


nd_rval

nd_rval          3448 eval.c         	    if (node->nd_rval) {
nd_rval          3450 eval.c         		ruby_cref = (NODE*)node->nd_rval;
nd_rval          5726 eval.c         	    if (body->nd_rval) {
nd_rval          5728 eval.c         		ruby_cref = (NODE*)body->nd_rval;


nd_set_line

nd_set_line      9321 eval.c             nd_set_line(bdata->body, nd_line(mdata->body));
nd_set_line      4067 parse.c        			nd_set_line(yyval.node, yyvsp[-5].num);
nd_set_line      5127 parse.c        			nd_set_line(yyval.node, yyvsp[-3].num);
nd_set_line      5348 parse.c        		        nd_set_line(yyval.node, yyvsp[-2].num);
nd_set_line      5394 parse.c        		        nd_set_line(yyval.node, yyvsp[-2].num);
nd_set_line      5517 parse.c        			nd_set_line(yyval.node, yyvsp[-5].num);
nd_set_line      5598 parse.c        			nd_set_line(yyval.node, yyvsp[-5].num);
nd_set_line      5617 parse.c        			nd_set_line(yyval.node, yyvsp[-5].num);
nd_set_line      8497 parse.c            nd_set_line(n, ruby_sourceline);
nd_set_line      8543 parse.c            nd_set_line(node, nd_line(orig));
nd_set_line       680 parse.y        			nd_set_line($$, $<num>1);
nd_set_line      1475 parse.y        			nd_set_line($$, $<num>1);
nd_set_line      1632 parse.y        		        nd_set_line($$, $<num>4);
nd_set_line      1670 parse.y        		        nd_set_line($$, $<num>3);
nd_set_line      1789 parse.y        			nd_set_line($$, $<num>1);
nd_set_line      1851 parse.y        			nd_set_line($$, $<num>1);
nd_set_line      1863 parse.y        			nd_set_line($$, $<num>1);
nd_set_line      4499 parse.y            nd_set_line(n, ruby_sourceline);
nd_set_line      4545 parse.y            nd_set_line(node, nd_line(orig));


nd_set_type

nd_set_type      2860 eval.c         	nd_set_type(node, NODE_NIL); /* exec just once */
nd_set_type      3771 eval.c         		nd_set_type(node, NODE_LIT);
nd_set_type      3808 parse.c        			    nd_set_type(yyval.node, NODE_UNTIL);
nd_set_type      3822 parse.c        			    nd_set_type(yyval.node, NODE_WHILE);
nd_set_type      5278 parse.c        			    nd_set_type(yyval.node, NODE_UNTIL);
nd_set_type      5296 parse.c        			    nd_set_type(yyval.node, NODE_WHILE);
nd_set_type      5713 parse.c        				nd_set_type(node, NODE_XSTR);
nd_set_type      5716 parse.c        				nd_set_type(node, NODE_DXSTR);
nd_set_type      5738 parse.c        				nd_set_type(node, NODE_LIT);
nd_set_type      5748 parse.c        				nd_set_type(node, NODE_DREGX_ONCE);
nd_set_type      5751 parse.c        				nd_set_type(node, NODE_DREGX);
nd_set_type      5906 parse.c        				nd_set_type(yyval.node, NODE_DSYM);
nd_set_type      5916 parse.c        				    nd_set_type(yyval.node, NODE_LIT);
nd_set_type      8496 parse.c            nd_set_type(n, type);
nd_set_type      8708 parse.c        	    nd_set_type(tail, NODE_ARRAY);
nd_set_type      8716 parse.c        	    nd_set_type(head, NODE_DSTR);
nd_set_type      9355 parse.c        	if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2);
nd_set_type      9356 parse.c        	else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3);
nd_set_type      9374 parse.c        	    nd_set_type(node, NODE_MATCH);
nd_set_type       463 parse.y        			    nd_set_type($$, NODE_UNTIL);
nd_set_type       475 parse.y        			    nd_set_type($$, NODE_WHILE);
nd_set_type      1585 parse.y        			    nd_set_type($$, NODE_UNTIL);
nd_set_type      1595 parse.y        			    nd_set_type($$, NODE_WHILE);
nd_set_type      1973 parse.y        				nd_set_type(node, NODE_XSTR);
nd_set_type      1976 parse.y        				nd_set_type(node, NODE_DXSTR);
nd_set_type      1998 parse.y        				nd_set_type(node, NODE_LIT);
nd_set_type      2008 parse.y        				nd_set_type(node, NODE_DREGX_ONCE);
nd_set_type      2011 parse.y        				nd_set_type(node, NODE_DREGX);
nd_set_type      2150 parse.y        				nd_set_type($$, NODE_DSYM);
nd_set_type      2160 parse.y        				    nd_set_type($$, NODE_LIT);
nd_set_type      4498 parse.y            nd_set_type(n, type);
nd_set_type      4710 parse.y        	    nd_set_type(tail, NODE_ARRAY);
nd_set_type      4718 parse.y        	    nd_set_type(head, NODE_DSTR);
nd_set_type      5357 parse.y        	if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2);
nd_set_type      5358 parse.y        	else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3);
nd_set_type      5376 parse.y        	    nd_set_type(node, NODE_MATCH);


nd_state

nd_state         3029 eval.c         	    if (node->nd_state && !RTEST(rb_eval(self, node->nd_cond)))
nd_state         3064 eval.c         	    if (node->nd_state && RTEST(rb_eval(self, node->nd_cond)))
nd_state         3185 eval.c         	result = rb_yield_0(result, 0, 0, 0, node->nd_state);
nd_state         4882 eval.c         	    if (node->nd_state == YIELD_FUNC_AVALUE) {
nd_state         4891 eval.c         		if (val == Qundef && node->nd_state != YIELD_FUNC_SVALUE)
nd_state         9298 eval.c             data->body->nd_state = YIELD_FUNC_AVALUE;
nd_state         9322 eval.c             bdata->body->nd_state = YIELD_FUNC_SVALUE;


nd_stts

nd_stts          3144 eval.c         	break_jump(rb_eval(self, node->nd_stts));
nd_stts          3149 eval.c         	return_value(rb_eval(self, node->nd_stts));
nd_stts          3325 eval.c         	return_jump(rb_eval(self, node->nd_stts));


nd_super

nd_super         3918 eval.c         	    if (node->nd_super) {
nd_super         3919 eval.c         	       super = rb_eval(self, node->nd_super);


nd_tbl

nd_tbl           2146 eval.c             if (node->nd_tbl) {
nd_tbl           2147 eval.c         	copy->nd_tbl = ALLOC_N(ID, node->nd_tbl[0]+1);
nd_tbl           2148 eval.c         	MEMCPY(copy->nd_tbl, node->nd_tbl, ID, node->nd_tbl[0]+1);
nd_tbl           2151 eval.c         	copy->nd_tbl = 0;
nd_tbl           3452 eval.c         	    if (node->nd_tbl) {
nd_tbl           3453 eval.c         		VALUE *vars = ALLOCA_N(VALUE, node->nd_tbl[0]+1);
nd_tbl           3456 eval.c         		rb_mem_clear(ruby_scope->local_vars, node->nd_tbl[0]);
nd_tbl           3457 eval.c         		ruby_scope->local_tbl = node->nd_tbl;
nd_tbl           4067 eval.c             if (node->nd_tbl) {
nd_tbl           4068 eval.c         	VALUE *vars = TMP_ALLOC(node->nd_tbl[0]+1);
nd_tbl           4071 eval.c         	rb_mem_clear(ruby_scope->local_vars, node->nd_tbl[0]);
nd_tbl           4072 eval.c         	ruby_scope->local_tbl = node->nd_tbl;
nd_tbl           5731 eval.c         	    if (body->nd_tbl) {
nd_tbl           5732 eval.c         		local_vars = TMP_ALLOC(body->nd_tbl[0]+1);
nd_tbl           5734 eval.c         		rb_mem_clear(local_vars, body->nd_tbl[0]);
nd_tbl           5735 eval.c         		ruby_scope->local_tbl = body->nd_tbl;


nd_term

nd_term          7115 parse.c            int term = nd_term(quote);
nd_term          3117 parse.y            int term = nd_term(quote);


nd_tval

nd_tval          4894 eval.c         	    result = (*node->nd_cfnc)(val, node->nd_tval, self);
nd_tval          8496 eval.c         	    return method_arity(data->body->nd_tval);


nd_type

nd_type           385 eval.c         	node && nd_type(node) != NODE_ZSUPER &&
nd_type           389 eval.c             else if (FL_TEST(klass, FL_SINGLETON) && node && nd_type(node) == NODE_CFUNC &&
nd_type           474 eval.c         	if (nd_type(body) == NODE_FBODY) {
nd_type           491 eval.c         	if (nd_type(body) == NODE_FBODY) {
nd_type          2087 eval.c             if (nd_type(body) == NODE_FBODY) { /* was alias */
nd_type          2173 eval.c             else if (nd_type(n) == NODE_ARRAY) {\
nd_type          2232 eval.c             if (nd_type(node) == NODE_ARRAY) {
nd_type          2259 eval.c             switch (nd_type(node)) {
nd_type          2266 eval.c         	    if (nd_type(node) == NODE_SUPER) {
nd_type          2293 eval.c         	    int call = nd_type(node)==NODE_CALL;
nd_type          2311 eval.c         			       nd_type(node) == NODE_ATTRASGN ?
nd_type          2792 eval.c             else if (nd_type(cpath) == NODE_COLON2) {
nd_type          2825 eval.c                 rb_bug("unknown node type %d (0x%lx)", nd_type(node), node);
nd_type          2848 eval.c             switch (nd_type(node)) {
nd_type          2952 eval.c         	    if (nd_type(node) != NODE_WHEN) goto again;
nd_type          2958 eval.c         		if (tag->nd_head && nd_type(tag->nd_head) == NODE_WHEN) {
nd_type          2991 eval.c         		if (nd_type(node) != NODE_WHEN) {
nd_type          2999 eval.c         		    if (tag->nd_head && nd_type(tag->nd_head) == NODE_WHEN) {
nd_type          3108 eval.c         		if (nd_type(node) == NODE_ITER) {
nd_type          3281 eval.c         	    result = rb_range_new(beg, end, nd_type(node) == NODE_DOT3);
nd_type          3421 eval.c         	    if (nd_type(node) == NODE_ZSUPER) {
nd_type          3750 eval.c         		    switch (nd_type(list->nd_head)) {
nd_type          3763 eval.c         	    switch (nd_type(node)) {
nd_type          4834 eval.c         	    else if (nd_type(block->var) == NODE_MASGN) {
nd_type          4881 eval.c         	if (nd_type(node) == NODE_CFUNC || nd_type(node) == NODE_IFUNC) {
nd_type          5106 eval.c             switch (nd_type(lhs)) {
nd_type          5667 eval.c             switch (nd_type(body)) {
nd_type          5758 eval.c         		if (nd_type(body) == NODE_ARGS) {
nd_type          5762 eval.c         		else if (nd_type(body) == NODE_BLOCK) {
nd_type          5767 eval.c         		    if (nd_type(node) != NODE_ARGS) {
nd_type          7331 eval.c         	    if (nd_type(body->nd_body) != NODE_ZSUPER) {
nd_type          8494 eval.c         	if (data->body && nd_type(data->body) == NODE_IFUNC &&
nd_type          8502 eval.c             switch (nd_type(data->var)) {
nd_type          8765 eval.c             if (nd_type(body) == NODE_ZSUPER) {
nd_type          9176 eval.c             switch (nd_type(body)) {
nd_type          9192 eval.c         	if (nd_type(body) == NODE_BLOCK)
nd_type           770 gc.c           	switch (nd_type(obj)) {
nd_type          1227 gc.c           	switch (nd_type(obj)) {
nd_type          3682 parse.c        			    if (nd_type(yyvsp[0].node) != NODE_BLOCK) void_expr(yyvsp[0].node);
nd_type          3801 parse.c        			if (yyvsp[-2].node && nd_type(yyvsp[-2].node) == NODE_BEGIN) {
nd_type          3815 parse.c        			if (yyvsp[-2].node && nd_type(yyvsp[-2].node) == NODE_BEGIN) {
nd_type          3908 parse.c        			if (yyvsp[-3].node && nd_type(yyvsp[-3].node) != NODE_ARRAY)
nd_type          4083 parse.c        			    if (nd_type(yyval.node) == NODE_BLOCK_PASS) {
nd_type          4104 parse.c        			    if (nd_type(yyval.node) == NODE_BLOCK_PASS) {
nd_type          4125 parse.c        			    if (nd_type(yyval.node) == NODE_BLOCK_PASS) {
nd_type          4524 parse.c        			if (yyvsp[-3].node && nd_type(yyvsp[-3].node) != NODE_ARRAY)
nd_type          4606 parse.c        			if (nd_type(yyvsp[-2].node) == NODE_LIT && FIXNUM_P(yyvsp[-2].node->nd_lit) &&
nd_type          4607 parse.c        			    nd_type(yyvsp[0].node) == NODE_LIT && FIXNUM_P(yyvsp[0].node->nd_lit)) {
nd_type          4621 parse.c        			if (nd_type(yyvsp[-2].node) == NODE_LIT && FIXNUM_P(yyvsp[-2].node->nd_lit) &&
nd_type          4622 parse.c        			    nd_type(yyvsp[0].node) == NODE_LIT && FIXNUM_P(yyvsp[0].node->nd_lit)) {
nd_type          4682 parse.c        			if (yyvsp[0].node && nd_type(yyvsp[0].node) == NODE_LIT) {
nd_type          5162 parse.c        			if (yyvsp[-3].node && nd_type(yyvsp[-3].node) == NODE_SELF)
nd_type          5232 parse.c        			if (yyvsp[-1].node && nd_type(yyvsp[-1].node) == NODE_BLOCK_PASS) {
nd_type          5524 parse.c        			if (yyvsp[-1].node && nd_type(yyvsp[-1].node) == NODE_BLOCK_PASS) {
nd_type          5711 parse.c        			    switch (nd_type(node)) {
nd_type          5734 parse.c        			else switch (nd_type(node)) {
nd_type          5868 parse.c        			if ((yyval.node = yyvsp[-1].node) && nd_type(yyval.node) == NODE_NEWLINE) {
nd_type          5904 parse.c        			    switch (nd_type(yyval.node)) {
nd_type          6163 parse.c        			if (nd_type(yyvsp[0].node) == NODE_SELF) {
nd_type          6183 parse.c        			    switch (nd_type(yyvsp[-2].node)) {
nd_type          7356 parse.c        	if (nd_type(lex_strterm) == NODE_HEREDOC) {
nd_type          8511 parse.c            return (enum node_type)nd_type(node);
nd_type          8527 parse.c        	if (nd_type(node) == NODE_NEWLINE) return node;
nd_type          8578 parse.c            switch (nd_type(h)) {
nd_type          8600 parse.c        	switch (nd_type(nd)) {
nd_type          8618 parse.c            if (nd_type(tail) != NODE_BLOCK) {
nd_type          8684 parse.c            htype = nd_type(head);
nd_type          8689 parse.c            switch (nd_type(tail)) {
nd_type          8729 parse.c            if (nd_type(node) == NODE_EVSTR) {
nd_type          8743 parse.c        	switch (nd_type(node)) {
nd_type          8782 parse.c        	switch (nd_type(node1)) {
nd_type          8795 parse.c        	switch (nd_type(node2)) {
nd_type          8923 parse.c            if (recv && nd_type(recv) == NODE_SELF)
nd_type          8944 parse.c            if (recv && nd_type(recv) == NODE_SELF)
nd_type          8955 parse.c            switch (nd_type(node)) {
nd_type          8980 parse.c            if (nd_type(node1) == NODE_ARRAY) {
nd_type          8995 parse.c            switch (nd_type(lhs)) {
nd_type          9028 parse.c        	switch (nd_type(node)) {
nd_type          9087 parse.c            switch (nd_type(node)) {
nd_type          9179 parse.c            if (nd_type(node) != NODE_BLOCK) return;
nd_type          9194 parse.c        	switch (nd_type(*n)) {
nd_type          9211 parse.c            switch (nd_type(node)) {
nd_type          9227 parse.c            switch (nd_type(node->nd_value)) {
nd_type          9290 parse.c            type = nd_type(node);
nd_type          9293 parse.c        	type = nd_type(node);
nd_type          9307 parse.c            switch (nd_type(node)) {
nd_type          9331 parse.c            switch (nd_type(node)) {
nd_type          9355 parse.c        	if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2);
nd_type          9356 parse.c        	else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3);
nd_type          9393 parse.c            if (nd_type(node) == NODE_NEWLINE){
nd_type          9406 parse.c            if (left && nd_type(left) == type) {
nd_type          9408 parse.c        	while ((second = node->nd_2nd) != 0 && nd_type(second) == type) {
nd_type          9424 parse.c            switch (nd_type(c)) {
nd_type          9429 parse.c        	if (c->nd_next && nd_type(c->nd_next) == NODE_NOT) {
nd_type          9441 parse.c            if (node && nd_type(node) == NODE_BLOCK_PASS) {
nd_type          9452 parse.c        	if (nd_type(node) == NODE_ARRAY && node->nd_next == 0) {
nd_type          9455 parse.c        	if (node && nd_type(node) == NODE_SPLAT) {
nd_type          9470 parse.c                if (nd_type(node) == NODE_ARRAY && node->nd_next == 0) {
nd_type          9474 parse.c                if (node && nd_type(node) == NODE_SPLAT) {
nd_type          9520 parse.c            switch (nd_type(node2)) {
nd_type          9532 parse.c        	rb_bug("unknown nodetype(%d) for arg_prepend", nd_type(node2));
nd_type          9543 parse.c            if (a && nd_type(a) == NODE_BLOCK_PASS) {
nd_type          9555 parse.c            if (a && nd_type(a) == NODE_BLOCK_PASS) {
nd_type          9566 parse.c            if (a && nd_type(a) == NODE_BLOCK_PASS) {
nd_type           355 parse.y        			    if (nd_type($2) != NODE_BLOCK) void_expr($2);
nd_type           456 parse.y        			if ($1 && nd_type($1) == NODE_BEGIN) {
nd_type           468 parse.y        			if ($1 && nd_type($1) == NODE_BEGIN) {
nd_type           545 parse.y        			if ($3 && nd_type($3) != NODE_ARRAY)
nd_type           694 parse.y        			    if (nd_type($$) == NODE_BLOCK_PASS) {
nd_type           711 parse.y        			    if (nd_type($$) == NODE_BLOCK_PASS) {
nd_type           728 parse.y        			    if (nd_type($$) == NODE_BLOCK_PASS) {
nd_type          1009 parse.y        			if ($3 && nd_type($3) != NODE_ARRAY)
nd_type          1077 parse.y        			if (nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) &&
nd_type          1078 parse.y        			    nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) {
nd_type          1090 parse.y        			if (nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) &&
nd_type          1091 parse.y        			    nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) {
nd_type          1133 parse.y        			if ($2 && nd_type($2) == NODE_LIT) {
nd_type          1496 parse.y        			if ($1 && nd_type($1) == NODE_SELF)
nd_type          1545 parse.y        			if ($1 && nd_type($1) == NODE_BLOCK_PASS) {
nd_type          1796 parse.y        			if ($1 && nd_type($1) == NODE_BLOCK_PASS) {
nd_type          1971 parse.y        			    switch (nd_type(node)) {
nd_type          1994 parse.y        			else switch (nd_type(node)) {
nd_type          2112 parse.y        			if (($$ = $3) && nd_type($$) == NODE_NEWLINE) {
nd_type          2148 parse.y        			    switch (nd_type($$)) {
nd_type          2373 parse.y        			if (nd_type($1) == NODE_SELF) {
nd_type          2387 parse.y        			    switch (nd_type($3)) {
nd_type          3358 parse.y        	if (nd_type(lex_strterm) == NODE_HEREDOC) {
nd_type          4513 parse.y            return (enum node_type)nd_type(node);
nd_type          4529 parse.y        	if (nd_type(node) == NODE_NEWLINE) return node;
nd_type          4580 parse.y            switch (nd_type(h)) {
nd_type          4602 parse.y        	switch (nd_type(nd)) {
nd_type          4620 parse.y            if (nd_type(tail) != NODE_BLOCK) {
nd_type          4686 parse.y            htype = nd_type(head);
nd_type          4691 parse.y            switch (nd_type(tail)) {
nd_type          4731 parse.y            if (nd_type(node) == NODE_EVSTR) {
nd_type          4745 parse.y        	switch (nd_type(node)) {
nd_type          4784 parse.y        	switch (nd_type(node1)) {
nd_type          4797 parse.y        	switch (nd_type(node2)) {
nd_type          4925 parse.y            if (recv && nd_type(recv) == NODE_SELF)
nd_type          4946 parse.y            if (recv && nd_type(recv) == NODE_SELF)
nd_type          4957 parse.y            switch (nd_type(node)) {
nd_type          4982 parse.y            if (nd_type(node1) == NODE_ARRAY) {
nd_type          4997 parse.y            switch (nd_type(lhs)) {
nd_type          5030 parse.y        	switch (nd_type(node)) {
nd_type          5089 parse.y            switch (nd_type(node)) {
nd_type          5181 parse.y            if (nd_type(node) != NODE_BLOCK) return;
nd_type          5196 parse.y        	switch (nd_type(*n)) {
nd_type          5213 parse.y            switch (nd_type(node)) {
nd_type          5229 parse.y            switch (nd_type(node->nd_value)) {
nd_type          5292 parse.y            type = nd_type(node);
nd_type          5295 parse.y        	type = nd_type(node);
nd_type          5309 parse.y            switch (nd_type(node)) {
nd_type          5333 parse.y            switch (nd_type(node)) {
nd_type          5357 parse.y        	if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2);
nd_type          5358 parse.y        	else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3);
nd_type          5395 parse.y            if (nd_type(node) == NODE_NEWLINE){
nd_type          5408 parse.y            if (left && nd_type(left) == type) {
nd_type          5410 parse.y        	while ((second = node->nd_2nd) != 0 && nd_type(second) == type) {
nd_type          5426 parse.y            switch (nd_type(c)) {
nd_type          5431 parse.y        	if (c->nd_next && nd_type(c->nd_next) == NODE_NOT) {
nd_type          5443 parse.y            if (node && nd_type(node) == NODE_BLOCK_PASS) {
nd_type          5454 parse.y        	if (nd_type(node) == NODE_ARRAY && node->nd_next == 0) {
nd_type          5457 parse.y        	if (node && nd_type(node) == NODE_SPLAT) {
nd_type          5472 parse.y                if (nd_type(node) == NODE_ARRAY && node->nd_next == 0) {
nd_type          5476 parse.y                if (node && nd_type(node) == NODE_SPLAT) {
nd_type          5522 parse.y            switch (nd_type(node2)) {
nd_type          5534 parse.y        	rb_bug("unknown nodetype(%d) for arg_prepend", nd_type(node2));
nd_type          5545 parse.y            if (a && nd_type(a) == NODE_BLOCK_PASS) {
nd_type          5557 parse.y            if (a && nd_type(a) == NODE_BLOCK_PASS) {
nd_type          5568 parse.y            if (a && nd_type(a) == NODE_BLOCK_PASS) {


nd_value

nd_value         2878 eval.c         	    VALUE r = rb_eval(self,node->nd_value);
nd_value         2887 eval.c         	    VALUE l = rb_eval(self,node->nd_value);
nd_value         3514 eval.c         		val = rb_eval(self, node->nd_value);
nd_value         3518 eval.c         		val = rb_eval(self, node->nd_value);
nd_value         3522 eval.c         				 rb_eval(self, node->nd_value));
nd_value         3533 eval.c         	node = node->nd_value;
nd_value         3539 eval.c         	    node = node->nd_value;
nd_value         3545 eval.c         	result = massign(self, node, rb_eval(self, node->nd_value), 0);
nd_value         3551 eval.c         	result = rb_eval(self, node->nd_value);
nd_value         3556 eval.c         	result = rb_eval(self, node->nd_value);
nd_value         3561 eval.c         	result = rb_eval(self, node->nd_value);
nd_value         3566 eval.c         	result = rb_eval(self, node->nd_value);
nd_value         3571 eval.c         	result = rb_eval(self, node->nd_value);
nd_value         3576 eval.c         	result = rb_eval(self, node->nd_value);
nd_value         3592 eval.c         	result = rb_eval(self, node->nd_value);
nd_value         3597 eval.c         	result = rb_eval(self, node->nd_value);
nd_value         3870 parse.c        			yyvsp[-2].node->nd_value = (yyvsp[-2].node->nd_head) ? NEW_TO_ARY(yyvsp[0].node) : NEW_ARRAY(yyvsp[0].node);
nd_value         3881 parse.c        				yyvsp[-2].node->nd_value = yyvsp[0].node;
nd_value         3888 parse.c        				yyvsp[-2].node->nd_value = yyvsp[0].node;
nd_value         3893 parse.c        				yyval.node->nd_value = call_op(gettable(vid),yyvsp[-1].id,1,yyvsp[0].node);
nd_value         3980 parse.c        			yyvsp[-2].node->nd_value = (yyvsp[-2].node->nd_head) ? NEW_TO_ARY(yyvsp[0].node) : NEW_ARRAY(yyvsp[0].node);
nd_value         3987 parse.c        			yyvsp[-2].node->nd_value = yyvsp[0].node;
nd_value         4497 parse.c        				yyvsp[-2].node->nd_value = yyvsp[0].node;
nd_value         4504 parse.c        				yyvsp[-2].node->nd_value = yyvsp[0].node;
nd_value         4509 parse.c        				yyval.node->nd_value = call_op(gettable(vid),yyvsp[-1].id,1,yyvsp[0].node);
nd_value         9005 parse.c        	lhs->nd_value = rhs;
nd_value         9227 parse.c            switch (nd_type(node->nd_value)) {
nd_value         9234 parse.c        	parser_warn(node->nd_value, "found = in conditional, should be ==");
nd_value         9246 parse.c            if (assign_in_cond(node->nd_value) == 0) {
nd_value         9247 parse.c        	parser_warning(node->nd_value, "assignment in condition");
nd_value          511 parse.y        			$1->nd_value = ($1->nd_head) ? NEW_TO_ARY($3) : NEW_ARRAY($3);
nd_value          520 parse.y        				$1->nd_value = $3;
nd_value          527 parse.y        				$1->nd_value = $3;
nd_value          532 parse.y        				$$->nd_value = call_op(gettable(vid),$2,1,$3);
nd_value          605 parse.y        			$1->nd_value = ($1->nd_head) ? NEW_TO_ARY($3) : NEW_ARRAY($3);
nd_value          610 parse.y        			$1->nd_value = $3;
nd_value          984 parse.y        				$1->nd_value = $3;
nd_value          991 parse.y        				$1->nd_value = $3;
nd_value          996 parse.y        				$$->nd_value = call_op(gettable(vid),$2,1,$3);
nd_value         5007 parse.y        	lhs->nd_value = rhs;
nd_value         5229 parse.y            switch (nd_type(node->nd_value)) {
nd_value         5236 parse.y        	parser_warn(node->nd_value, "found = in conditional, should be ==");
nd_value         5248 parse.y            if (assign_in_cond(node->nd_value) == 0) {
nd_value         5249 parse.y        	parser_warning(node->nd_value, "assignment in condition");


nd_vid

nd_vid           2364 eval.c         	if (rb_ivar_defined(self, node->nd_vid)) {
nd_vid           2370 eval.c         	if (ev_const_defined(ruby_cref, node->nd_vid, self)) {
nd_vid           2376 eval.c         	if (rb_cvar_defined(cvar_cbase(), node->nd_vid)) {
nd_vid           3506 eval.c         	    ID id = node->nd_next->nd_vid;
nd_vid           3557 eval.c         	dvar_asgn(node->nd_vid, result);
nd_vid           3562 eval.c         	dvar_asgn_curr(node->nd_vid, result);
nd_vid           3572 eval.c         	rb_ivar_set(self, node->nd_vid, result);
nd_vid           3577 eval.c         	if (node->nd_vid == 0) {
nd_vid           3584 eval.c         	    rb_const_set(ruby_cbase, node->nd_vid, result);
nd_vid           3593 eval.c         	rb_cvar_set(cvar_cbase(), node->nd_vid, result, Qtrue);
nd_vid           3598 eval.c         	rb_cvar_set(cvar_cbase(), node->nd_vid, result, Qfalse);
nd_vid           3609 eval.c         	result = rb_dvar_ref(node->nd_vid);
nd_vid           3617 eval.c         	result = rb_ivar_get(self, node->nd_vid);
nd_vid           3621 eval.c         	result = ev_const_get(ruby_cref, node->nd_vid, self);
nd_vid           3625 eval.c         	result = rb_cvar_get(cvar_cbase(), node->nd_vid);
nd_vid           3802 eval.c         	result = rb_ivar_set(self, node->nd_vid, ruby_frame->argv[0]);
nd_vid           5112 eval.c         	rb_ivar_set(self, lhs->nd_vid, val);
nd_vid           5122 eval.c         	dvar_asgn(lhs->nd_vid, val);
nd_vid           5126 eval.c         	dvar_asgn_curr(lhs->nd_vid, val);
nd_vid           5130 eval.c         	if (lhs->nd_vid == 0) {
nd_vid           5134 eval.c         	    rb_const_set(ruby_cbase, lhs->nd_vid, val);
nd_vid           5142 eval.c         	rb_cvar_set(cvar_cbase(), lhs->nd_vid, val, Qtrue);
nd_vid           5146 eval.c         	rb_cvar_set(cvar_cbase(), lhs->nd_vid, val, Qfalse);
nd_vid           5702 eval.c         	result = rb_attr_get(recv, body->nd_vid);
nd_vid           3879 parse.c        			    ID vid = yyvsp[-2].node->nd_vid;
nd_vid           4495 parse.c        			    ID vid = yyvsp[-2].node->nd_vid;
nd_vid            518 parse.y        			    ID vid = $1->nd_vid;
nd_vid            982 parse.y        			    ID vid = $1->nd_vid;


negate_lit

negate_lit        248 parse.c        static NODE *negate_lit();
negate_lit       5930 parse.c        			yyval.node = negate_lit(yyvsp[0].node);
negate_lit       5936 parse.c        			yyval.node = negate_lit(yyvsp[0].node);
negate_lit        151 parse.y        static NODE *negate_lit();
negate_lit       2176 parse.y        			$$ = negate_lit($2);
negate_lit       2180 parse.y        			$$ = negate_lit($2);


new_call

new_call          251 parse.c        static NODE *new_call();
new_call         4043 parse.c        			yyval.node = new_call(yyvsp[-3].node, yyvsp[-1].id, yyvsp[0].node);
new_call         4049 parse.c        			yyval.node = new_call(yyvsp[-3].node, yyvsp[-1].id, yyvsp[0].node);
new_call         4095 parse.c        			yyval.node = new_call(yyvsp[-3].node, yyvsp[-1].id, yyvsp[0].node);
new_call         4102 parse.c        			yyval.node = new_call(yyvsp[-4].node, yyvsp[-2].id, yyvsp[-1].node);
new_call         4116 parse.c        			yyval.node = new_call(yyvsp[-3].node, yyvsp[-1].id, yyvsp[0].node);
new_call         4123 parse.c        			yyval.node = new_call(yyvsp[-4].node, yyvsp[-2].id, yyvsp[-1].node);
new_call         5535 parse.c        			yyval.node = new_call(yyvsp[-3].node, yyvsp[-1].id, yyvsp[0].node);
new_call         5541 parse.c        			yyval.node = new_call(yyvsp[-3].node, yyvsp[-1].id, yyvsp[0].node);
new_call         5554 parse.c        			yyval.node = new_call(yyvsp[-3].node, yyvsp[-1].id, yyvsp[0].node);
new_call         5561 parse.c        			yyval.node = new_call(yyvsp[-3].node, yyvsp[-1].id, yyvsp[0].node);
new_call         5568 parse.c        			yyval.node = new_call(yyvsp[-2].node, yyvsp[0].id, 0);
new_call          154 parse.y        static NODE *new_call();
new_call          662 parse.y        			$$ = new_call($1, $3, $4);
new_call          666 parse.y        			$$ = new_call($1, $3, $4);
new_call          704 parse.y        			$$ = new_call($1, $3, $4);
new_call          709 parse.y        			$$ = new_call($1, $3, $4);
new_call          721 parse.y        			$$ = new_call($1, $3, $4);
new_call          726 parse.y        			$$ = new_call($1, $3, $4);
new_call         1805 parse.y        			$$ = new_call($1, $3, $4);
new_call         1809 parse.y        			$$ = new_call($1, $3, $4);
new_call         1820 parse.y        			$$ = new_call($1, $3, $4);
new_call         1825 parse.y        			$$ = new_call($1, $3, $4);
new_call         1830 parse.y        			$$ = new_call($1, $3, 0);


new_dvar

new_dvar          863 eval.c             ruby_dyna_vars = new_dvar(id, value, ruby_dyna_vars);
new_dvar          888 eval.c         	ruby_dyna_vars = new_dvar(id, value, 0);
new_dvar          891 eval.c         	vars = new_dvar(id, value, ruby_dyna_vars->next);
new_dvar         4807 eval.c         	ruby_dyna_vars = new_dvar(0, 0, block->dyna_vars);


new_evstr

new_evstr         243 parse.c        static NODE *new_evstr();
new_evstr        5872 parse.c        			yyval.node = new_evstr(yyval.node);
new_evstr         146 parse.y        static NODE *new_evstr();
new_evstr        2116 parse.y        			$$ = new_evstr($$);


new_fcall

new_fcall         252 parse.c        static NODE *new_fcall();
new_fcall        4074 parse.c        			yyval.node = new_fcall(yyvsp[-1].id, yyvsp[0].node);
new_fcall        4081 parse.c        			yyval.node = new_fcall(yyvsp[-2].id, yyvsp[-1].node);
new_fcall        5547 parse.c        			yyval.node = new_fcall(yyvsp[-1].id, yyvsp[0].node);
new_fcall         155 parse.y        static NODE *new_fcall();
new_fcall         687 parse.y        			$$ = new_fcall($1, $2);
new_fcall         692 parse.y        			$$ = new_fcall($1, $2);
new_fcall        1815 parse.y        			$$ = new_fcall($1, $2);


new_size

new_size          152 st.c               size = new_size(size);	/* round up to prime number */
new_size          318 st.c               new_num_bins = new_size(old_num_bins+1);


new_super

new_super         253 parse.c        static NODE *new_super();
new_super        4137 parse.c        			yyval.node = new_super(yyvsp[0].node);
new_super        5574 parse.c        			yyval.node = new_super(yyvsp[0].node);
new_super         156 parse.y        static NODE *new_super();
new_super         738 parse.y        			$$ = new_super($2);
new_super        1834 parse.y        			$$ = new_super($2);


new_yield

new_yield         254 parse.c        static NODE *new_yield();
new_yield        4144 parse.c        			yyval.node = new_yield(yyvsp[0].node);
new_yield        5195 parse.c        			yyval.node = new_yield(yyvsp[-1].node);
new_yield         157 parse.y        static NODE *new_yield();
new_yield         743 parse.y        			$$ = new_yield($2);
new_yield        1521 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      227 parse.c        static NODE *newline_node();
newline_node     3723 parse.c        			yyval.node = newline_node(yyvsp[0].node);
newline_node     3729 parse.c        			yyval.node = block_append(yyvsp[-2].node, newline_node(yyvsp[0].node));
newline_node      130 parse.y        static NODE *newline_node();
newline_node      400 parse.y        			$$ = newline_node($1);
newline_node      404 parse.y        			$$ = block_append($1, newline_node($3));


newtok

newtok           6961 parse.c            newtok();
newtok           7138 parse.c            newtok();
newtok           7179 parse.c        	newtok();
newtok           7200 parse.c        	newtok();
newtok           7306 parse.c        	newtok();
newtok           7781 parse.c        	    newtok();
newtok           8242 parse.c        	newtok();
newtok           8333 parse.c        	newtok();
newtok           8359 parse.c        	newtok();
newtok           8368 parse.c        	newtok();
newtok           2963 parse.y            newtok();
newtok           3140 parse.y            newtok();
newtok           3181 parse.y        	newtok();
newtok           3202 parse.y        	newtok();
newtok           3308 parse.y        	newtok();
newtok           3783 parse.y        	    newtok();
newtok           4244 parse.y        	newtok();
newtok           4335 parse.y        	newtok();
newtok           4361 parse.y        	newtok();
newtok           4370 parse.y        	newtok();


next_argv

next_argv        4192 io.c                if (!next_argv()) return Qnil;\
next_argv        4334 io.c               if (!next_argv()) return Qnil;
next_argv        4398 io.c               if (!next_argv()) return Qnil;
next_argv        4419 io.c               if (!next_argv()) return Qnil;
next_argv        4450 io.c               if (!next_argv()) rb_eof_error();
next_argv        5191 io.c               if (!next_argv()) {
next_argv        5204 io.c               if (!next_argv()) {
next_argv        5215 io.c               if (!next_argv()) {
next_argv        5225 io.c               if (!next_argv()) {
next_argv        5235 io.c               if (!next_argv()) {
next_argv        5245 io.c               next_argv();
next_argv        5282 io.c               if (!next_argv()) {
next_argv        5316 io.c               if (!next_argv()) return Qnil;
next_argv        5352 io.c               if (!next_argv()) return Qnil;
next_argv        5355 io.c           	    if (!next_argv()) return argf;
next_argv        5380 io.c               next_argv();
next_argv        5387 io.c               next_argv();
next_argv        5395 io.c               next_argv();
next_argv        5414 io.c               next_argv();
next_argv        5426 io.c               next_argv();


nextc

nextc            6774 parse.c            switch (c = nextc()) {
nextc            6830 parse.c        	if ((c = nextc()) != '-') {
nextc            6835 parse.c        	if ((c = nextc()) == '\\') {
nextc            6844 parse.c        	if ((c = nextc()) != '-') {
nextc            6850 parse.c        	if ((c = nextc())== '\\') {
nextc            6874 parse.c            switch (c = nextc()) {
nextc            6886 parse.c        		c = nextc();
nextc            6909 parse.c        		tokadd(nextc());
nextc            6914 parse.c        	if ((c = nextc()) != '-') {
nextc            6923 parse.c        	if ((c = nextc()) != '-') {
nextc            6934 parse.c        	if ((c = nextc()) == '\\') {
nextc            6962 parse.c            while (c = nextc(), ISALPHA(c)) {
nextc            7034 parse.c            while ((c = nextc()) != -1) {
nextc            7053 parse.c        	    c = nextc();
nextc            7090 parse.c        		c = nextc();
nextc            7120 parse.c            c = nextc();
nextc            7122 parse.c        	do {c = nextc();} while (ISSPACE(c));
nextc            7140 parse.c        	switch (c = nextc()) {
nextc            7165 parse.c            int c = nextc(), term, func = 0, len;
nextc            7168 parse.c        	c = nextc();
nextc            7182 parse.c        	while ((c = nextc()) != -1 && c != term) {
nextc            7184 parse.c        	    do {tokadd(c);} while (--len > 0 && (c = nextc()) != -1);
nextc            7205 parse.c        	    do {tokadd(c);} while (--len > 0 && (c = nextc()) != -1);
nextc            7206 parse.c        	} while ((c = nextc()) != -1 && is_identchar(c));
nextc            7266 parse.c            if ((c = nextc()) == -1) {
nextc            7299 parse.c        	    if (nextc() == -1) {
nextc            7308 parse.c        	    switch (c = nextc()) {
nextc            7325 parse.c        	    tokadd(nextc());
nextc            7326 parse.c        	    if ((c = nextc()) == -1) goto error;
nextc            7376 parse.c            switch (c = nextc()) {
nextc            7390 parse.c        	while ((c = nextc()) != '\n') {
nextc            7410 parse.c        	if ((c = nextc()) == '*') {
nextc            7411 parse.c        	    if ((c = nextc()) == '=') {
nextc            7447 parse.c        	if ((c = nextc()) == '=') {
nextc            7462 parse.c        		    c = nextc();
nextc            7484 parse.c        	if ((c = nextc()) == '=') {
nextc            7485 parse.c        	    if ((c = nextc()) == '=') {
nextc            7501 parse.c        	c = nextc();
nextc            7518 parse.c        	    if ((c = nextc()) == '>') {
nextc            7525 parse.c        	    if ((c = nextc()) == '=') {
nextc            7543 parse.c        	if ((c = nextc()) == '=') {
nextc            7547 parse.c        	    if ((c = nextc()) == '=') {
nextc            7586 parse.c        	c = nextc();
nextc            7639 parse.c        	if ((c = nextc()) == '&') {
nextc            7641 parse.c        	    if ((c = nextc()) == '=') {
nextc            7674 parse.c        	if ((c = nextc()) == '|') {
nextc            7676 parse.c        	    if ((c = nextc()) == '=') {
nextc            7699 parse.c        	c = nextc();
nextc            7729 parse.c        	c = nextc();
nextc            7759 parse.c        	if ((c = nextc()) == '.') {
nextc            7760 parse.c        	    if ((c = nextc()) == '.') {
nextc            7784 parse.c        		c = nextc();
nextc            7788 parse.c        		c = nextc();
nextc            7791 parse.c        		    c = nextc();
nextc            7802 parse.c        			} while ((c = nextc()) != -1);
nextc            7815 parse.c        		    c = nextc();
nextc            7826 parse.c        			} while ((c = nextc()) != -1);
nextc            7839 parse.c        		    c = nextc();
nextc            7850 parse.c        			} while ((c = nextc()) != -1);
nextc            7867 parse.c        		    c = nextc();
nextc            7884 parse.c        		    } while ((c = nextc()) != -1);
nextc            7924 parse.c        			int c0 = nextc();
nextc            7952 parse.c        		    c = nextc();
nextc            7966 parse.c        		c = nextc();
nextc            8000 parse.c        	c = nextc();
nextc            8034 parse.c        	if ((c = nextc()) == '=') {
nextc            8056 parse.c        	if ((c = nextc()) == '=') {
nextc            8078 parse.c        	    if ((c = nextc()) != '@') {
nextc            8112 parse.c        	    if ((c = nextc()) == ']') {
nextc            8113 parse.c        		if ((c = nextc()) == '=') {
nextc            8146 parse.c        	c = nextc();
nextc            8159 parse.c        	    c = nextc();
nextc            8166 parse.c        		term = nextc();
nextc            8194 parse.c        		do {c = nextc();} while (ISSPACE(c));
nextc            8200 parse.c        		do {c = nextc();} while (ISSPACE(c));
nextc            8222 parse.c        	if ((c = nextc()) == '=') {
nextc            8243 parse.c        	c = nextc();
nextc            8246 parse.c        	    c = nextc();
nextc            8282 parse.c        	    c = nextc();
nextc            8313 parse.c        		c = nextc();
nextc            8332 parse.c        	c = nextc();
nextc            8337 parse.c        	    c = nextc();
nextc            8378 parse.c        		c = nextc();
nextc            8382 parse.c        	c = nextc();
nextc            8415 parse.c        		    if ((c = nextc()) == '=' && !peek('~') && !peek('>') &&
nextc            2776 parse.y            switch (c = nextc()) {
nextc            2832 parse.y        	if ((c = nextc()) != '-') {
nextc            2837 parse.y        	if ((c = nextc()) == '\\') {
nextc            2846 parse.y        	if ((c = nextc()) != '-') {
nextc            2852 parse.y        	if ((c = nextc())== '\\') {
nextc            2876 parse.y            switch (c = nextc()) {
nextc            2888 parse.y        		c = nextc();
nextc            2911 parse.y        		tokadd(nextc());
nextc            2916 parse.y        	if ((c = nextc()) != '-') {
nextc            2925 parse.y        	if ((c = nextc()) != '-') {
nextc            2936 parse.y        	if ((c = nextc()) == '\\') {
nextc            2964 parse.y            while (c = nextc(), ISALPHA(c)) {
nextc            3036 parse.y            while ((c = nextc()) != -1) {
nextc            3055 parse.y        	    c = nextc();
nextc            3092 parse.y        		c = nextc();
nextc            3122 parse.y            c = nextc();
nextc            3124 parse.y        	do {c = nextc();} while (ISSPACE(c));
nextc            3142 parse.y        	switch (c = nextc()) {
nextc            3167 parse.y            int c = nextc(), term, func = 0, len;
nextc            3170 parse.y        	c = nextc();
nextc            3184 parse.y        	while ((c = nextc()) != -1 && c != term) {
nextc            3186 parse.y        	    do {tokadd(c);} while (--len > 0 && (c = nextc()) != -1);
nextc            3207 parse.y        	    do {tokadd(c);} while (--len > 0 && (c = nextc()) != -1);
nextc            3208 parse.y        	} while ((c = nextc()) != -1 && is_identchar(c));
nextc            3268 parse.y            if ((c = nextc()) == -1) {
nextc            3301 parse.y        	    if (nextc() == -1) {
nextc            3310 parse.y        	    switch (c = nextc()) {
nextc            3327 parse.y        	    tokadd(nextc());
nextc            3328 parse.y        	    if ((c = nextc()) == -1) goto error;
nextc            3378 parse.y            switch (c = nextc()) {
nextc            3392 parse.y        	while ((c = nextc()) != '\n') {
nextc            3412 parse.y        	if ((c = nextc()) == '*') {
nextc            3413 parse.y        	    if ((c = nextc()) == '=') {
nextc            3449 parse.y        	if ((c = nextc()) == '=') {
nextc            3464 parse.y        		    c = nextc();
nextc            3486 parse.y        	if ((c = nextc()) == '=') {
nextc            3487 parse.y        	    if ((c = nextc()) == '=') {
nextc            3503 parse.y        	c = nextc();
nextc            3520 parse.y        	    if ((c = nextc()) == '>') {
nextc            3527 parse.y        	    if ((c = nextc()) == '=') {
nextc            3545 parse.y        	if ((c = nextc()) == '=') {
nextc            3549 parse.y        	    if ((c = nextc()) == '=') {
nextc            3588 parse.y        	c = nextc();
nextc            3641 parse.y        	if ((c = nextc()) == '&') {
nextc            3643 parse.y        	    if ((c = nextc()) == '=') {
nextc            3676 parse.y        	if ((c = nextc()) == '|') {
nextc            3678 parse.y        	    if ((c = nextc()) == '=') {
nextc            3701 parse.y        	c = nextc();
nextc            3731 parse.y        	c = nextc();
nextc            3761 parse.y        	if ((c = nextc()) == '.') {
nextc            3762 parse.y        	    if ((c = nextc()) == '.') {
nextc            3786 parse.y        		c = nextc();
nextc            3790 parse.y        		c = nextc();
nextc            3793 parse.y        		    c = nextc();
nextc            3804 parse.y        			} while ((c = nextc()) != -1);
nextc            3817 parse.y        		    c = nextc();
nextc            3828 parse.y        			} while ((c = nextc()) != -1);
nextc            3841 parse.y        		    c = nextc();
nextc            3852 parse.y        			} while ((c = nextc()) != -1);
nextc            3869 parse.y        		    c = nextc();
nextc            3886 parse.y        		    } while ((c = nextc()) != -1);
nextc            3926 parse.y        			int c0 = nextc();
nextc            3954 parse.y        		    c = nextc();
nextc            3968 parse.y        		c = nextc();
nextc            4002 parse.y        	c = nextc();
nextc            4036 parse.y        	if ((c = nextc()) == '=') {
nextc            4058 parse.y        	if ((c = nextc()) == '=') {
nextc            4080 parse.y        	    if ((c = nextc()) != '@') {
nextc            4114 parse.y        	    if ((c = nextc()) == ']') {
nextc            4115 parse.y        		if ((c = nextc()) == '=') {
nextc            4148 parse.y        	c = nextc();
nextc            4161 parse.y        	    c = nextc();
nextc            4168 parse.y        		term = nextc();
nextc            4196 parse.y        		do {c = nextc();} while (ISSPACE(c));
nextc            4202 parse.y        		do {c = nextc();} while (ISSPACE(c));
nextc            4224 parse.y        	if ((c = nextc()) == '=') {
nextc            4245 parse.y        	c = nextc();
nextc            4248 parse.y        	    c = nextc();
nextc            4284 parse.y        	    c = nextc();
nextc            4315 parse.y        		c = nextc();
nextc            4334 parse.y        	c = nextc();
nextc            4339 parse.y        	    c = nextc();
nextc            4380 parse.y        		c = nextc();
nextc            4384 parse.y        	c = nextc();
nextc            4417 parse.y        		    if ((c = nextc()) == '=' && !peek('~') && !peek('>') &&


nextdirsep

nextdirsep       2382 file.c         	if (*(path = nextdirsep(path)) && path[1] && !isdirsep(path[1]))
nextdirsep       2383 file.c         	    path = nextdirsep(path + 1);
nextdirsep       2494 file.c         	    s = nextdirsep(b = s);


nkf_isblank

nkf_isblank      3525 ext/nkf/nkf-utf8/nkf.c #define nkf_isspace(c) (nkf_isblank(c) || c == CR || c == NL)
nkf_isblank      4231 ext/nkf/nkf-utf8/nkf.c 	if (mimeout_buf_count>0 && nkf_isblank(mimeout_buf[i])){
nkf_isblank      4504 ext/nkf/nkf-utf8/nkf.c                 if (nkf_isblank(c)) {


nkf_isdigit

nkf_isdigit      3523 ext/nkf/nkf-utf8/nkf.c #define nkf_isxdigit(c)  (nkf_isdigit(c) || ('a'<=c && c<='f') || ('A'<=c && c <= 'F'))
nkf_isdigit      3527 ext/nkf/nkf-utf8/nkf.c #define nkf_isalnum(c) (nkf_isdigit(c) || nkf_isalpha(c))
nkf_isdigit      3737 ext/nkf/nkf-utf8/nkf.c     if (nkf_isdigit(x)) return x - '0';
nkf_isdigit      3838 ext/nkf/nkf-utf8/nkf.c                     if (!nkf_isdigit(buf[i])){


nkf_isspace

nkf_isspace      4452 ext/nkf/nkf-utf8/nkf.c             if (nkf_isspace(c)) {
nkf_isspace      4471 ext/nkf/nkf-utf8/nkf.c                     if (!nkf_isspace(mimeout_buf[0])){


nkf_isxdigit

nkf_isxdigit     3760 ext/nkf/nkf-utf8/nkf.c     if (!nkf_isxdigit(c2)){
nkf_isxdigit     3765 ext/nkf/nkf-utf8/nkf.c     if (!nkf_isxdigit(c3)){
nkf_isxdigit     3824 ext/nkf/nkf-utf8/nkf.c                     if (!nkf_isxdigit(buf[i])){


nkf_toupper

nkf_toupper      3569 ext/nkf/nkf-utf8/nkf.c         if ( ((r[i] = c1 = (*i_getc)(f))==EOF) || nkf_toupper(c1) != p[i] ) {
nkf_toupper      3575 ext/nkf/nkf-utf8/nkf.c                 if (k==i && nkf_toupper(c1)==p[k]) break;
nkf_toupper      3738 ext/nkf/nkf-utf8/nkf.c     return nkf_toupper(x) - 'A' + 10;


no_blockarg

no_blockarg      9451 parse.c        	no_blockarg(node);
no_blockarg      9469 parse.c                no_blockarg(node);
no_blockarg      5453 parse.y        	no_blockarg(node);
no_blockarg      5471 parse.y                no_blockarg(node);


no_connection

no_connection     320 ext/nkf/nkf-utf8/nkf.c STATIC  void    no_connection PROTO((int c2,int c1));
no_connection     520 ext/nkf/nkf-utf8/nkf.c static void (*oconv)PROTO((int c2,int c1)) = no_connection;
no_connection     524 ext/nkf/nkf-utf8/nkf.c static void (*o_zconv)PROTO((int c2,int c1)) = no_connection;
no_connection     525 ext/nkf/nkf-utf8/nkf.c static void (*o_fconv)PROTO((int c2,int c1)) = no_connection;
no_connection     526 ext/nkf/nkf-utf8/nkf.c static void (*o_crconv)PROTO((int c2,int c1)) = no_connection;
no_connection     527 ext/nkf/nkf-utf8/nkf.c static void (*o_rot_conv)PROTO((int c2,int c1)) = no_connection;
no_connection     528 ext/nkf/nkf-utf8/nkf.c static void (*o_hira_conv)PROTO((int c2,int c1)) = no_connection;
no_connection     529 ext/nkf/nkf-utf8/nkf.c static void (*o_base64conv)PROTO((int c2,int c1)) = no_connection;
no_connection     530 ext/nkf/nkf-utf8/nkf.c static void (*o_iso2022jp_check_conv)PROTO((int c2,int c1)) = no_connection;
no_connection    4650 ext/nkf/nkf-utf8/nkf.c     o_zconv = no_connection;
no_connection    4651 ext/nkf/nkf-utf8/nkf.c     o_fconv = no_connection;
no_connection    4652 ext/nkf/nkf-utf8/nkf.c     o_crconv = no_connection;
no_connection    4653 ext/nkf/nkf-utf8/nkf.c     o_rot_conv = no_connection;
no_connection    4654 ext/nkf/nkf-utf8/nkf.c     o_hira_conv = no_connection;
no_connection    4655 ext/nkf/nkf-utf8/nkf.c     o_base64conv = no_connection;
no_connection    4656 ext/nkf/nkf-utf8/nkf.c     o_iso2022jp_check_conv = no_connection;


no_connection2

no_connection2    321 ext/nkf/nkf-utf8/nkf.c STATIC  int     no_connection2 PROTO((int c2,int c1,int c0));
no_connection2    522 ext/nkf/nkf-utf8/nkf.c static int (*iconv)PROTO((int c2,int c1,int c0)) = no_connection2;
no_connection2   4691 ext/nkf/nkf-utf8/nkf.c     no_connection2(c2,c1,0);


no_putc

no_putc           427 ext/nkf/nkf-utf8/nkf.c STATIC void no_putc PROTO((int c));
no_putc          1805 ext/nkf/nkf-utf8/nkf.c         o_putc = no_putc;


noconvert

noconvert         289 ext/nkf/nkf-utf8/nkf.c STATIC  int     noconvert PROTO((FILE *f));
noconvert         738 ext/nkf/nkf-utf8/nkf.c           noconvert(stdin);
noconvert         827 ext/nkf/nkf-utf8/nkf.c                   noconvert(fin);


node_assign

node_assign       261 parse.c        static NODE *node_assign();
node_assign      3863 parse.c        			yyval.node = node_assign(yyvsp[-2].node, yyvsp[0].node);
node_assign      3974 parse.c        			yyval.node = node_assign(yyvsp[-2].node, NEW_SVALUE(yyvsp[0].node));
node_assign      4481 parse.c        			yyval.node = node_assign(yyvsp[-2].node, yyvsp[0].node);
node_assign      4487 parse.c        			yyval.node = node_assign(yyvsp[-4].node, NEW_RESCUE(yyvsp[-2].node, NEW_RESBODY(0,yyvsp[0].node,0), 0));
node_assign      5643 parse.c        		            yyvsp[-3].node = node_assign(yyvsp[-3].node, NEW_GVAR(rb_intern("$!")));
node_assign       164 parse.y        static NODE *node_assign();
node_assign       506 parse.y        			$$ = node_assign($1, $3);
node_assign       601 parse.y        			$$ = node_assign($1, NEW_SVALUE($3));
node_assign       972 parse.y        			$$ = node_assign($1, $3);
node_assign       976 parse.y        			$$ = node_assign($1, NEW_RESCUE($3, NEW_RESBODY(0,$5,0), 0));
node_assign      1895 parse.y        		            $3 = node_assign($3, NEW_GVAR(rb_intern("$!")));


ntohd

ntohd             319 pack.c         			 y = ntohd((DOUBLE_SWAPPER)y),	\
ntohd             330 pack.c         #define NTOHD(x,y)	ntohd(x)


ntohf

ntohf             293 pack.c         			 y = ntohf((FLOAT_SWAPPER)y),	\
ntohf             304 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            1609 pack.c         		rb_ary_push(ary, ULONG2NUM(ntohl(tmp)));


ntohs

ntohs             185 ext/socket/getnameinfo.c 		snprintf(numserv, sizeof(numserv), "%d", ntohs(port));
ntohs            2805 ext/socket/socket.c 	port = ntohs(sp->s_port);
ntohs            3058 ext/socket/socket.c     return rb_assoc_new(INT2NUM(ntohs(sockaddr->sin_port)), host);
ntohs             183 pack.c         #ifdef ntohs
ntohs             226 pack.c         #ifndef ntohs
ntohs             251 pack.c         #ifdef ntohs
ntohs            1598 pack.c         		rb_ary_push(ary, UINT2NUM(ntohs(tmp)));


num2i32

num2i32           676 pack.c         		c = num2i32(from);
num2i32           687 pack.c         		s = num2i32(from);
num2i32           698 pack.c         		i = num2i32(from);
num2i32           709 pack.c         		l = num2i32(from);
num2i32           730 pack.c         		s = num2i32(from);
num2i32           741 pack.c         		l = num2i32(from);
num2i32           752 pack.c         		s = num2i32(from);
num2i32           763 pack.c         		l = num2i32(from);


num_div

num_div           321 numeric.c          return rb_assoc_new(num_div(x, y), rb_funcall(x, '%', 1, y));
num_div          2801 numeric.c          rb_define_method(rb_cNumeric, "div", num_div, 1);


num_equal

num_equal         839 numeric.c      	return num_equal(x, y);
num_equal        2231 numeric.c      	return num_equal(x, y);


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;


numberof

numberof          355 ext/openssl/ossl_pkcs7.c     for(i = 0; i < numberof(p7_type_tab); i++){
numberof          152 ext/openssl/ossl_ssl.c     for(i = 0; i < numberof(ossl_sslctx_attrs); i++){
numberof          164 ext/openssl/ossl_ssl.c     for (i = 0; i < numberof(ossl_ssl_method_tab); i++) {
numberof          872 ext/openssl/ossl_ssl.c     for(i = 0; i < numberof(ossl_sslctx_attrs); i++)
numberof          881 ext/openssl/ossl_ssl.c     for(i = 0; i < numberof(ossl_ssl_attr_readers); i++)
numberof          883 ext/openssl/ossl_ssl.c     for(i = 0; i < numberof(ossl_ssl_attrs); i++)


numchar_getc

numchar_getc      421 ext/nkf/nkf-utf8/nkf.c STATIC int numchar_getc PROTO((FILE *f));
numchar_getc     1852 ext/nkf/nkf-utf8/nkf.c         i_ngetc = i_getc; i_getc = numchar_getc;


numchar_ungetc

numchar_ungetc    422 ext/nkf/nkf-utf8/nkf.c STATIC int numchar_ungetc PROTO((int c,FILE *f));
numchar_ungetc   1853 ext/nkf/nkf-utf8/nkf.c         i_nungetc = i_ungetc; i_ungetc= numchar_ungetc;


numcmp

numcmp             35 st.c           static int numcmp(long, long);
numcmp             38 st.c               numcmp,


numhash

numhash            36 st.c           static int numhash(long);
numhash            39 st.c               numhash,


obj2long

obj2long          326 time.c             year = obj2long(v[0]);
obj2long          359 time.c         		    tm->tm_mon = obj2long(s)-1;
obj2long          364 time.c         	    tm->tm_mon = obj2long(v[1])-1;
obj2long          371 time.c         	tm->tm_mday = obj2long(v[2]);
obj2long          373 time.c             tm->tm_hour = NIL_P(v[3])?0:obj2long(v[3]);
obj2long          374 time.c             tm->tm_min  = NIL_P(v[4])?0:obj2long(v[4]);
obj2long          375 time.c             tm->tm_sec  = NIL_P(v[5])?0:obj2long(v[5]);
obj2long          381 time.c         	    *usec = obj2long(v[6]);


obj_free

obj_free          997 gc.c           static void obj_free _((VALUE));
obj_free         1072 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       272 ext/enumerator/enumerator.c     rb_define_method(rb_mKernel, "to_enum", obj_to_enum, -2);
obj_to_enum       273 ext/enumerator/enumerator.c     rb_define_method(rb_mKernel, "enum_for", obj_to_enum, -2);


off_t

off_t             468 dir.c              off_t p = NUM2OFFT(pos);
off_t            3011 file.c             off_t pos;
off_t            3067 file.c             off_t pos;
off_t            3077 file.c             fseeko(f, (off_t)0, SEEK_CUR);
off_t            3949 file.c             off_t size = get_stat(obj)->st_size;
off_t              53 io.c           #if !HAVE_OFF_T && !defined(off_t)
off_t             650 io.c               off_t pos;
off_t             664 io.c               off_t pos;
off_t             728 io.c               off_t pos;
off_t            1112 io.c               off_t siz = BUFSIZ;
off_t            1113 io.c               off_t pos;
off_t            2299 io.c               off_t pos;
off_t            3357 io.c               off_t pos = 0;
off_t             272 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          128 ext/socket/getaddrinfo.c 	 offsetof(struct sockaddr_in6, sin6_addr),
offsetof          136 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_const_load

ole_const_load   1596 ext/win32ole/win32ole.c             ole_const_load(pTypeLib, klass, self);
ole_const_load   1599 ext/win32ole/win32ole.c             ole_const_load(pTypeLib, cWIN32OLE, self);
ole_const_load   1614 ext/win32ole/win32ole.c             ole_const_load(pTypeLib, klass, self);
ole_const_load   1617 ext/win32ole/win32ole.c             ole_const_load(pTypeLib, cWIN32OLE, self);


ole_docinfo_from_type

ole_docinfo_from_type  200 ext/win32ole/win32ole.c static HRESULT ole_docinfo_from_type _((ITypeInfo *, BSTR *, BSTR *, DWORD *, BSTR *));
ole_docinfo_from_type 3059 ext/win32ole/win32ole.c     hr = ole_docinfo_from_type(pRefTypeInfo, &bstr, NULL, NULL, NULL);
ole_docinfo_from_type 3772 ext/win32ole/win32ole.c     hr = ole_docinfo_from_type(pTypeInfo, NULL, &bhelpstr, NULL, NULL);
ole_docinfo_from_type 3839 ext/win32ole/win32ole.c     hr = ole_docinfo_from_type(pTypeInfo, NULL, NULL, NULL, &bhelpfile);
ole_docinfo_from_type 3870 ext/win32ole/win32ole.c     hr = ole_docinfo_from_type(pTypeInfo, NULL, NULL,
ole_docinfo_from_type 4729 ext/win32ole/win32ole.c         hr = ole_docinfo_from_type(pmethod->pTypeInfo, &name, NULL, NULL, NULL);


ole_excepinfo2msg

ole_excepinfo2msg 2155 ext/win32ole/win32ole.c         v = ole_excepinfo2msg(&excepinfo);
ole_excepinfo2msg 2365 ext/win32ole/win32ole.c         v = ole_excepinfo2msg(&excepinfo);
ole_excepinfo2msg 2535 ext/win32ole/win32ole.c         v = ole_excepinfo2msg(&excepinfo);


ole_initialize

ole_initialize    884 ext/win32ole/win32ole.c     ole_initialize();
ole_initialize   1435 ext/win32ole/win32ole.c     ole_initialize();
ole_initialize   1491 ext/win32ole/win32ole.c     ole_initialize();
ole_initialize   3378 ext/win32ole/win32ole.c     ole_initialize();


ole_invoke

ole_invoke       2183 ext/win32ole/win32ole.c     return ole_invoke(argc, argv, self, DISPATCH_METHOD|DISPATCH_PROPERTYGET);
ole_invoke       2466 ext/win32ole/win32ole.c     return ole_invoke(argc, argv, self, DISPATCH_PROPERTYPUT);
ole_invoke       2482 ext/win32ole/win32ole.c     return ole_invoke(1, &property, self, DISPATCH_PROPERTYGET);
ole_invoke       2682 ext/win32ole/win32ole.c         return ole_invoke(argc, argv, self, DISPATCH_METHOD|DISPATCH_PROPERTYGET);


ole_invoke2

ole_invoke2      2399 ext/win32ole/win32ole.c     return ole_invoke2(self, dispid, args, types, DISPATCH_METHOD);
ole_invoke2      2421 ext/win32ole/win32ole.c     return ole_invoke2(self, dispid, args, types, DISPATCH_PROPERTYGET);
ole_invoke2      2443 ext/win32ole/win32ole.c     return ole_invoke2(self, dispid, args, types, DISPATCH_PROPERTYPUT);


ole_mb2wc

ole_mb2wc         815 ext/win32ole/win32ole.c         V_BSTR(var) = ole_mb2wc(StringValuePtr(val), -1);
ole_mb2wc        1168 ext/win32ole/win32ole.c     pbuf  = ole_mb2wc(StringValuePtr(ole), -1);
ole_mb2wc        1355 ext/win32ole/win32ole.c             pbuf  = ole_mb2wc(clsid, -1);
ole_mb2wc        1394 ext/win32ole/win32ole.c     pbuf  = ole_mb2wc(StringValuePtr(ole), -1);
ole_mb2wc        1406 ext/win32ole/win32ole.c     serverinfo.pwszName = ole_mb2wc(StringValuePtr(host), -1);
ole_mb2wc        1443 ext/win32ole/win32ole.c     pbuf  = ole_mb2wc(StringValuePtr(moniker), -1);
ole_mb2wc        1500 ext/win32ole/win32ole.c     pBuf  = ole_mb2wc(StringValuePtr(svr_name), -1);
ole_mb2wc        1608 ext/win32ole/win32ole.c         pBuf = ole_mb2wc(StringValuePtr(file), -1);
ole_mb2wc        1884 ext/win32ole/win32ole.c     pBuf  = ole_mb2wc(StringValuePtr(svr_name), -1);
ole_mb2wc        1936 ext/win32ole/win32ole.c     pOp->pNamedArgs[index + 1] = ole_mb2wc(StringValuePtr(key), -1);
ole_mb2wc        2004 ext/win32ole/win32ole.c     wcmdname = ole_mb2wc(StringValuePtr(cmd), -1);
ole_mb2wc        2031 ext/win32ole/win32ole.c         op.pNamedArgs[0] = ole_mb2wc(StringValuePtr(cmd), -1);
ole_mb2wc        2514 ext/win32ole/win32ole.c     pBuf[0]  = ole_mb2wc(StringValuePtr(property), -1);
ole_mb2wc        3272 ext/win32ole/win32ole.c         pbuf = ole_mb2wc(StringValuePtr(file), -1);
ole_mb2wc        3467 ext/win32ole/win32ole.c     pbuf = ole_mb2wc(StringValuePtr(file), -1);
ole_mb2wc        5471 ext/win32ole/win32ole.c             *V_BSTRREF(var) = ole_mb2wc(StringValuePtr(val), -1);


ole_method_docinfo_from_type

ole_method_docinfo_from_type 4765 ext/win32ole/win32ole.c     hr = ole_method_docinfo_from_type(pTypeInfo, method_index, NULL, &bhelpstring,
ole_method_docinfo_from_type 4799 ext/win32ole/win32ole.c     hr = ole_method_docinfo_from_type(pTypeInfo, method_index, NULL, NULL,
ole_method_docinfo_from_type 4833 ext/win32ole/win32ole.c     hr = ole_method_docinfo_from_type(pTypeInfo, method_index, NULL, NULL,


ole_method_invkind

ole_method_invkind 4527 ext/win32ole/win32ole.c     VALUE invkind = ole_method_invkind(pTypeInfo, method_index);
ole_method_invkind 4559 ext/win32ole/win32ole.c     return ole_method_invkind(pmethod->pTypeInfo, pmethod->index);


ole_method_sub

ole_method_sub   2743 ext/win32ole/win32ole.c     method = ole_method_sub(self, 0, pTypeInfo, name);
ole_method_sub   2754 ext/win32ole/win32ole.c        method = ole_method_sub(self, pTypeInfo, pRefTypeInfo, name);


ole_methods

ole_methods      2915 ext/win32ole/win32ole.c     return ole_methods( self, INVOKE_FUNC | INVOKE_PROPERTYGET | INVOKE_PROPERTYPUT);
ole_methods      2932 ext/win32ole/win32ole.c     return ole_methods( self, INVOKE_PROPERTYGET);
ole_methods      2949 ext/win32ole/win32ole.c     return ole_methods( self, INVOKE_PROPERTYPUT);
ole_methods      2967 ext/win32ole/win32ole.c     return ole_methods( self, INVOKE_FUNC);


ole_methods_from_typeinfo

ole_methods_from_typeinfo 2895 ext/win32ole/win32ole.c     rb_ary_concat(methods, ole_methods_from_typeinfo(pTypeInfo, mask));
ole_methods_from_typeinfo 3988 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  2821 ext/win32ole/win32ole.c     ole_methods_sub(0, pTypeInfo, methods, mask);
ole_methods_sub  2829 ext/win32ole/win32ole.c        ole_methods_sub(pTypeInfo, pRefTypeInfo, methods, mask);


ole_param_flag_mask

ole_param_flag_mask 5192 ext/win32ole/win32ole.c     return ole_param_flag_mask(pparam->pTypeInfo, pparam->method_index,
ole_param_flag_mask 5220 ext/win32ole/win32ole.c     return ole_param_flag_mask(pparam->pTypeInfo, pparam->method_index,
ole_param_flag_mask 5239 ext/win32ole/win32ole.c     return ole_param_flag_mask(pparam->pTypeInfo, pparam->method_index,
ole_param_flag_mask 5259 ext/win32ole/win32ole.c     return ole_param_flag_mask(pparam->pTypeInfo, pparam->method_index,


ole_ptrtype2val

ole_ptrtype2val  3183 ext/win32ole/win32ole.c         return ole_ptrtype2val(pTypeInfo, pTypeDesc, typedetails);
ole_ptrtype2val  3187 ext/win32ole/win32ole.c         return ole_ptrtype2val(pTypeInfo, pTypeDesc, typedetails);


ole_raise

ole_raise         610 ext/win32ole/win32ole.c             ole_raise(hr, rb_eRuntimeError, "fail: OLE initialize");
ole_raise        1402 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
ole_raise        1412 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
ole_raise        1439 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
ole_raise        1448 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
ole_raise        1459 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
ole_raise        1512 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
ole_raise        1519 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
ole_raise        1587 ext/win32ole/win32ole.c             ole_raise(hr, rb_eRuntimeError, "failed to GetTypeInfo");
ole_raise        1592 ext/win32ole/win32ole.c             ole_raise(hr, rb_eRuntimeError, "failed to GetContainingTypeLib");
ole_raise        1612 ext/win32ole/win32ole.c             ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to LoadTypeLibEx");
ole_raise        1891 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
ole_raise        1900 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
ole_raise        2009 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
ole_raise        2046 ext/win32ole/win32ole.c             ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
ole_raise        2156 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "%s%s",
ole_raise        2366 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "_invoke %s",
ole_raise        2521 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
ole_raise        2536 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, StringValuePtr(v));
ole_raise        2633 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to get IEnum Interface");
ole_raise        2646 ext/win32ole/win32ole.c         ole_raise(hr, rb_eRuntimeError, "failed to get IEnum Interface");
ole_raise        2702 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
ole_raise        2741 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
ole_raise        2777 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
ole_raise        2818 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
ole_raise        2851 ext/win32ole/win32ole.c         ole_raise(hr, rb_eRuntimeError, "failed to GetTypeInfo");
ole_raise        2861 ext/win32ole/win32ole.c         ole_raise(hr, rb_eRuntimeError, "failed to GetContainingTypeLib");
ole_raise        2996 ext/win32ole/win32ole.c         ole_raise(hr, rb_eRuntimeError, "failed to GetTypeInfo");
ole_raise        3001 ext/win32ole/win32ole.c         ole_raise(hr, rb_eRuntimeError, "failed to GetContainingTypeLib");
ole_raise        3239 ext/win32ole/win32ole.c         ole_raise(hr, rb_eRuntimeError, "failed to get ITypeInfo");
ole_raise        3275 ext/win32ole/win32ole.c           ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to LoadTypeLibEx");
ole_raise        3470 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to LoadTypeLibEx");
ole_raise        3678 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
ole_raise        3710 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
ole_raise        3742 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
ole_raise        3910 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
ole_raise        4033 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetVarDesc");
ole_raise        4077 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetVarDesc");
ole_raise        4405 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetFuncDesc");
ole_raise        4442 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetFuncDesc");
ole_raise        4515 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetFuncDesc");
ole_raise        5947 ext/win32ole/win32ole.c         ole_raise(hr, rb_eRuntimeError, "interface not found");
ole_raise        5957 ext/win32ole/win32ole.c         ole_raise(hr, rb_eRuntimeError,
ole_raise        5967 ext/win32ole/win32ole.c         ole_raise(hr, rb_eRuntimeError, "failed to query IConnectionPoint");
ole_raise        5975 ext/win32ole/win32ole.c         ole_raise(hr, rb_eRuntimeError, "Advise Error");


ole_set_member

ole_set_member    898 ext/win32ole/win32ole.c     ole_set_member(obj, pDispatch);
ole_set_member   1417 ext/win32ole/win32ole.c     ole_set_member(self, (IDispatch*)multi_qi.pItf);
ole_set_member   1905 ext/win32ole/win32ole.c     ole_set_member(self, pDispatch);


ole_set_safe_array

ole_set_safe_array  728 ext/win32ole/win32ole.c         ole_set_safe_array(dim, psa, pid, pub, val, dim);
ole_set_safe_array  732 ext/win32ole/win32ole.c         ole_set_safe_array(n-1, psa, pid, pub, val, dim);
ole_set_safe_array  798 ext/win32ole/win32ole.c             ole_set_safe_array(dim-1, psa, pid, pub, val, dim-1);


ole_typedesc2val

ole_typedesc2val 3071 ext/win32ole/win32ole.c static VALUE ole_typedesc2val();
ole_typedesc2val 3083 ext/win32ole/win32ole.c            type = ole_typedesc2val(pTypeInfo, p, typedetails);
ole_typedesc2val 3086 ext/win32ole/win32ole.c            rb_str_concat(type, ole_typedesc2val(pTypeInfo, p, typedetails));
ole_typedesc2val 3810 ext/win32ole/win32ole.c     alias = ole_typedesc2val(pTypeInfo, &(pTypeAttr->tdescAlias), Qnil);
ole_typedesc2val 4034 ext/win32ole/win32ole.c     type = ole_typedesc2val(pTypeInfo, &(pVarDesc->elemdescVar.tdesc), Qnil);
ole_typedesc2val 4078 ext/win32ole/win32ole.c     ole_typedesc2val(pTypeInfo, &(pVarDesc->elemdescVar.tdesc), type);
ole_typedesc2val 4407 ext/win32ole/win32ole.c     type = ole_typedesc2val(pTypeInfo, &(pFuncDesc->elemdescFunc.tdesc), Qnil);
ole_typedesc2val 4481 ext/win32ole/win32ole.c     ole_typedesc2val(pTypeInfo, &(pFuncDesc->elemdescFunc.tdesc), type);
ole_typedesc2val 5094 ext/win32ole/win32ole.c     type = ole_typedesc2val(pTypeInfo,
ole_typedesc2val 5132 ext/win32ole/win32ole.c     ole_typedesc2val(pTypeInfo,


ole_val2variant

ole_val2variant   203 ext/win32ole/win32ole.c static void ole_val2variant(VALUE, VARIANT*);
ole_val2variant   307 ext/win32ole/win32ole.c     ole_val2variant(v, pVarResult);
ole_val2variant   469 ext/win32ole/win32ole.c static void ole_val2variant();
ole_val2variant   723 ext/win32ole/win32ole.c         ole_val2variant(val1, &var);
ole_val2variant   858 ext/win32ole/win32ole.c     ole_val2variant(val, var);
ole_val2variant  1940 ext/win32ole/win32ole.c     ole_val2variant(value, &(pOp->dp.rgvarg[index]));
ole_val2variant  2071 ext/win32ole/win32ole.c              ole_val2variant(param, &realargs[n]);
ole_val2variant  2096 ext/win32ole/win32ole.c                 ole_val2variant(param, &op.dp.rgvarg[n]);
ole_val2variant  2260 ext/win32ole/win32ole.c                     ole_val2variant(elem, &velem);
ole_val2variant  2299 ext/win32ole/win32ole.c                 ole_val2variant(param, &realargs[i]);
ole_val2variant  2526 ext/win32ole/win32ole.c     ole_val2variant(value, &propertyValue[0]);
ole_val2variant  5614 ext/win32ole/win32ole.c         ole_val2variant(result, pvarResult);


ole_variant2val

ole_variant2val   202 ext/win32ole/win32ole.c static VALUE ole_variant2val(VARIANT*);
ole_variant2val   297 ext/win32ole/win32ole.c         *(parg + i) = ole_variant2val(&pDispParams->rgvarg[args - i - 1]);
ole_variant2val   950 ext/win32ole/win32ole.c                 val = ole_variant2val(&variant);
ole_variant2val  1304 ext/win32ole/win32ole.c                 val = ole_variant2val(V_UNION1(pVarDesc, lpvarValue));
ole_variant2val  1956 ext/win32ole/win32ole.c         rb_ary_push(argv, ole_variant2val(&realargs[end]));
ole_variant2val  2159 ext/win32ole/win32ole.c     obj = ole_variant2val(&result);
ole_variant2val  2375 ext/win32ole/win32ole.c     obj = ole_variant2val(&result);
ole_variant2val  2571 ext/win32ole/win32ole.c         obj = ole_variant2val(&variant);
ole_variant2val  4115 ext/win32ole/win32ole.c         val = ole_variant2val(V_UNION1(pVarDesc, lpvarValue));
ole_variant2val  5283 ext/win32ole/win32ole.c          defval = ole_variant2val(&pParamDescEx->varDefaultValue);
ole_variant2val  5599 ext/win32ole/win32ole.c         rb_ary_push(args, ole_variant2val(pvar));


ole_wc2mb

ole_wc2mb         201 ext/win32ole/win32ole.c static char *ole_wc2mb(LPWSTR);
ole_wc2mb         274 ext/win32ole/win32ole.c     char* psz = ole_wc2mb(*rgszNames); // support only one method
ole_wc2mb         535 ext/win32ole/win32ole.c         pSource = ole_wc2mb(pExInfo->bstrSource);
ole_wc2mb         538 ext/win32ole/win32ole.c         pDescription = ole_wc2mb(pExInfo->bstrDescription);
ole_wc2mb         685 ext/win32ole/win32ole.c     char *p = ole_wc2mb(pw);
ole_wc2mb        1016 ext/win32ole/win32ole.c             p = ole_wc2mb(*V_BSTRREF(pvar));
ole_wc2mb        1018 ext/win32ole/win32ole.c             p = ole_wc2mb(V_BSTR(pvar));
ole_wc2mb        1097 ext/win32ole/win32ole.c             char *p = ole_wc2mb(V_BSTR(&variant));
ole_wc2mb        1303 ext/win32ole/win32ole.c                 pName = ole_wc2mb(bstr);
ole_wc2mb        5737 ext/win32ole/win32ole.c                 pstr = ole_wc2mb(bstr);


ole_wc2vstr

ole_wc2vstr        79 ext/win32ole/win32ole.c #define WC2VSTR(x) ole_wc2vstr((x), TRUE)
ole_wc2vstr      3574 ext/win32ole/win32ole.c         guid = ole_wc2vstr(bstr, FALSE);


olemethod_from_typeinfo

olemethod_from_typeinfo  199 ext/win32ole/win32ole.c static VALUE olemethod_from_typeinfo _((VALUE, ITypeInfo *, VALUE));
olemethod_from_typeinfo 3241 ext/win32ole/win32ole.c     obj = olemethod_from_typeinfo(method, pTypeInfo, cmdname);
olemethod_from_typeinfo 4364 ext/win32ole/win32ole.c         obj = olemethod_from_typeinfo(self, ptype->pTypeInfo, method);


olemethod_set_member

olemethod_set_member  196 ext/win32ole/win32ole.c static VALUE olemethod_set_member _((VALUE, ITypeInfo *, ITypeInfo *, int, VALUE));
olemethod_set_member 2717 ext/win32ole/win32ole.c             olemethod_set_member(self, pTypeInfo, pOwnerTypeInfo, i, fname);
olemethod_set_member 2793 ext/win32ole/win32ole.c             olemethod_set_member(method, pTypeInfo, pOwnerTypeInfo,


oletype_set_member

oletype_set_member  198 ext/win32ole/win32ole.c static VALUE oletype_set_member  _((VALUE, ITypeInfo *, VALUE));
oletype_set_member 1653 ext/win32ole/win32ole.c         oletype_set_member(type, pTypeInfo, WC2VSTR(bstr));
oletype_set_member 3007 ext/win32ole/win32ole.c         oletype_set_member(type, pTypeInfo, WC2VSTR(bstr));
oletype_set_member 3425 ext/win32ole/win32ole.c             oletype_set_member(self, pTypeInfo, typelib);


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                48 missing/isinf.c static double inf()	{ return one() / zero(); }


open

open              801 dir.c              int open = 0;
open              811 dir.c          	    open++;	/* brace to match it.  Bracket expressions must be */
open              814 dir.c          	    if (open)
open              369 dln.c              if (file == NULL || (fd = open(file, O_RDONLY)) < 0) {
open              979 dln.c              fd = open(file, O_RDONLY);
open             1096 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              255 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               78 ext/dl/handle.c   if (dlhandle->ptr && dlhandle->open && dlhandle->enable_close) {
open               82 ext/dl/handle.c   dlhandle->open = 1;
open              163 ext/dl/handle.c   if (!dlhandle->open) {
open              783 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             3026 file.c         	if ((tmpfd = open(StringValueCStr(path), O_RDWR)) < 0) {
open             3030 file.c         	if ((tmpfd = open(StringValueCStr(path), 0)) < 0) {
open             2645 io.c               fd = open(fname, flags, mode);
open             2649 io.c           	    fd = open(fname, flags, mode);
open             1741 process.c        if ((fd = open("/dev/tty", O_RDWR)) >= 0) {
open              278 random.c           if ((fd = open("/dev/urandom", O_RDONLY


open_mime

open_mime         345 ext/nkf/nkf-utf8/nkf.c STATIC  void    open_mime PROTO((int c));
open_mime        4478 ext/nkf/nkf-utf8/nkf.c                     open_mime(output_mode);
open_mime        4498 ext/nkf/nkf-utf8/nkf.c             open_mime(output_mode);
open_mime        4567 ext/nkf/nkf-utf8/nkf.c 	    open_mime(output_mode);


opendir

opendir           280 dir.c              dp->dir = opendir(RSTRING(dirname)->ptr);
opendir           284 dir.c          	    dp->dir = opendir(RSTRING(dirname)->ptr);
opendir           988 dir.c          		dirp = opendir(dir);


options

options           349 ext/nkf/nkf-utf8/nkf.c STATIC  void    options PROTO((unsigned char *c));
options           684 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          1970 ext/syck/rubyext.c     VALUE options, tmp;
options          1981 ext/syck/rubyext.c     if (rb_scan_args(argc, argv, "01", &options) == 0)
options          1983 ext/syck/rubyext.c         options = rb_hash_new();
options          1984 ext/syck/rubyext.c         rb_ivar_set(self, s_options, options);
options          1986 ext/syck/rubyext.c     else if ( !NIL_P(tmp = rb_check_string_type(options)) )
options          1990 ext/syck/rubyext.c     else if ( rb_respond_to( options, s_write ) )
options          1992 ext/syck/rubyext.c         bonus->port = options;
options          1996 ext/syck/rubyext.c         Check_Type(options, T_HASH);
options          1997 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          1158 marshal.c      	    int options = r_byte(arg);
options          1159 marshal.c      	    v = r_entry(rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len, options), arg);
options          5729 parse.c        			int options = yyvsp[0].num;
options          5732 parse.c        			    node = NEW_LIT(rb_reg_new("", 0, options & ~RE_OPTION_ONCE));
options          5741 parse.c        							  options & ~RE_OPTION_ONCE);
options          5747 parse.c        			    if (options & RE_OPTION_ONCE) {
options          5753 parse.c        			    node->nd_cflag = options & ~RE_OPTION_ONCE;
options          6958 parse.c            int options = 0;
options          6965 parse.c        	    options |= RE_OPTION_IGNORECASE;
options          6968 parse.c        	    options |= RE_OPTION_EXTENDED;
options          6971 parse.c        	    options |= RE_OPTION_MULTILINE;
options          6974 parse.c        	    options |= RE_OPTION_ONCE;
options          6999 parse.c            return options | kcode;
options          1989 parse.y        			int options = $3;
options          1992 parse.y        			    node = NEW_LIT(rb_reg_new("", 0, options & ~RE_OPTION_ONCE));
options          2001 parse.y        							  options & ~RE_OPTION_ONCE);
options          2007 parse.y        			    if (options & RE_OPTION_ONCE) {
options          2013 parse.y        			    node->nd_cflag = options & ~RE_OPTION_ONCE;
options          2960 parse.y            int options = 0;
options          2967 parse.y        	    options |= RE_OPTION_IGNORECASE;
options          2970 parse.y        	    options |= RE_OPTION_EXTENDED;
options          2973 parse.y        	    options |= RE_OPTION_MULTILINE;
options          2976 parse.y        	    options |= RE_OPTION_ONCE;
options          3001 parse.y            return options | kcode;
options           339 re.c           	if (RREGEXP(re)->ptr->options & RE_OPTION_MULTILINE)
options           341 re.c           	if (RREGEXP(re)->ptr->options & RE_OPTION_IGNORECASE)
options           343 re.c           	if (RREGEXP(re)->ptr->options & RE_OPTION_EXTENDED)
options           433 re.c               int options;
options           441 re.c               options = RREGEXP(re)->ptr->options;
options           451 re.c           		    options |= RE_OPTION_MULTILINE;
options           454 re.c           		    options |= RE_OPTION_IGNORECASE;
options           457 re.c           		    options |= RE_OPTION_EXTENDED;
options           468 re.c           		    options &= ~RE_OPTION_MULTILINE;
options           471 re.c           		    options &= ~RE_OPTION_IGNORECASE;
options           474 re.c           		    options &= ~RE_OPTION_EXTENDED;
options           495 re.c           	    options = RREGEXP(re)->ptr->options;
options           501 re.c               if (options & RE_OPTION_MULTILINE) rb_str_buf_cat2(str, "m");
options           502 re.c               if (options & RE_OPTION_IGNORECASE) rb_str_buf_cat2(str, "i");
options           503 re.c               if (options & RE_OPTION_EXTENDED) rb_str_buf_cat2(str, "x");
options           505 re.c               if ((options & embeddable) != embeddable) {
options           507 re.c           	if (!(options & RE_OPTION_MULTILINE)) rb_str_buf_cat2(str, "m");
options           508 re.c           	if (!(options & RE_OPTION_IGNORECASE)) rb_str_buf_cat2(str, "i");
options           509 re.c           	if (!(options & RE_OPTION_EXTENDED)) rb_str_buf_cat2(str, "x");
options           548 re.c               if (RREGEXP(re)->ptr->options & RE_OPTION_IGNORECASE) return Qtrue;
options           580 re.c               int options = rb_reg_options(re);
options           581 re.c               return INT2NUM(options);
options           639 re.c           	rp->options = flags;
options           830 re.c           	RREGEXP(re)->ptr->options |= RE_OPTION_IGNORECASE;
options           835 re.c           	RREGEXP(re)->ptr->options &= ~RE_OPTION_IGNORECASE;
options          1340 re.c               switch (options & ~0xf) {
options          1359 re.c               if (options & ~0xf) {
options          1363 re.c           	options |= RE_OPTION_IGNORECASE;
options          1366 re.c               re->ptr = make_regexp(s, len, options & 0xf);
options          1371 re.c               if (options & ~0xf) {
options          1399 re.c               rb_reg_initialize(re, s, len, options);
options          1449 re.c               hashval = RREGEXP(re)->ptr->options;
options          1485 re.c           	RREGEXP(re1)->ptr->options == RREGEXP(re2)->ptr->options) {
options          1665 re.c           	flags = RREGEXP(argv[0])->ptr->options & 0xf;
options          1877 re.c               int options;
options          1880 re.c               options = RREGEXP(re)->ptr->options &
options          1883 re.c           	options |= rb_reg_get_kcode(re);
options          1885 re.c               return options;
options           432 regex.c        #define TRANSLATE_P() ((options&RE_OPTION_IGNORECASE) && translate)
options           433 regex.c        #define MAY_TRANSLATE() ((bufp->options&(RE_OPTION_IGNORECASE|RE_MAY_IGNORECASE)) && translate)
options          1292 regex.c          int options = bufp->options;
options          1314 regex.c              if (bufp->options & RE_OPTION_SINGLELINE) {
options          1334 regex.c              if (bufp->options & RE_OPTION_SINGLELINE)
options          1733 regex.c        	int old_options = options;
options          1756 regex.c        		  options &= ~RE_OPTION_EXTENDED;
options          1758 regex.c        		  options |= RE_OPTION_EXTENDED;
options          1763 regex.c        		  if (options&RE_OPTION_MULTILINE) {
options          1764 regex.c        		    options &= ~RE_OPTION_MULTILINE;
options          1767 regex.c        		else if (!(options&RE_OPTION_MULTILINE)) {
options          1768 regex.c        		  options |= RE_OPTION_MULTILINE;
options          1775 regex.c        		  if (options&RE_OPTION_IGNORECASE) {
options          1776 regex.c        		    options &= ~RE_OPTION_IGNORECASE;
options          1779 regex.c        		else if (!(options&RE_OPTION_IGNORECASE)) {
options          1780 regex.c        		  options |= RE_OPTION_IGNORECASE;
options          1822 regex.c        	    BUFPUSH(options);
options          1825 regex.c        	    if (options & RE_OPTION_IGNORECASE)
options          1876 regex.c        	  BUFPUSH(options);
options          1879 regex.c        	  if (options & RE_OPTION_IGNORECASE)
options          1908 regex.c              if (options != stackp[-1]) {
options          1909 regex.c        	if ((options ^ stackp[-1]) & RE_OPTION_IGNORECASE) {
options          1910 regex.c        	  BUFPUSH((options&RE_OPTION_IGNORECASE)?casefold_off:casefold_on);
options          1912 regex.c        	if ((options ^ stackp[-1]) != RE_OPTION_IGNORECASE) {
options          1918 regex.c              options = *--stackp;
options          2276 regex.c        	if ((bufp->options & RE_OPTION_SINGLELINE) == 0) {
options          2349 regex.c              if (options & RE_OPTION_EXTENDED) {
options          2363 regex.c              if (options & RE_OPTION_EXTENDED)
options          2420 regex.c              bufp->options |= RE_OPTIMIZE_ANCHOR;
options          2430 regex.c              bufp->options |= RE_OPTIMIZE_EXACTN;
options          2437 regex.c          if (current_mbctype == MBCTYPE_SJIS) bufp->options |= RE_OPTIMIZE_NO_BM;
options          2445 regex.c        	bufp->options |= RE_OPTIMIZE_NO_BM;
options          2449 regex.c            if (!(bufp->options & RE_OPTIMIZE_NO_BM)) {
options          2786 regex.c          int options = bufp->options;
options          2810 regex.c        	  bufp->options |= RE_OPTIMIZE_BMATCH;
options          2834 regex.c        	bufp->options |= RE_MAY_IGNORECASE;
options          2835 regex.c        	options |= RE_OPTION_IGNORECASE;
options          2839 regex.c        	options &= ~RE_OPTION_IGNORECASE;
options          2843 regex.c        	options = *p++;
options          2851 regex.c        	if ((options & RE_OPTION_SINGLELINE) == 0 && bufp->can_be_null == 0)
options          2934 regex.c        	  if (j != '\n' || (options & RE_OPTION_MULTILINE))
options          3017 regex.c        		bufp->options |= RE_OPTIMIZE_BMATCH;
options          3120 regex.c          if (current_mbctype && startpos>0 && !(bufp->options&RE_OPTIMIZE_BMATCH)) {
options          3204 regex.c          if (bufp->options & RE_OPTIMIZE_ANCHOR) {
options          3205 regex.c            if (bufp->options&RE_OPTION_MULTILINE && range > 0) {
options          3221 regex.c            if (bufp->options & RE_OPTIMIZE_NO_BM) {
options          3233 regex.c            if (range > 0 && (bufp->options & RE_OPTIMIZE_EXACTN)) {
options          3417 regex.c            *stackp++ = (unsigned char*)(long)options; /* current option status */	\
options          3549 regex.c          int options = bufp->options;
options          3661 regex.c              if ((bufp->options & RE_OPTION_LONGEST) && d != dend) {
options          3785 regex.c        	    if ((options & RE_OPTION_IGNORECASE)
options          3831 regex.c        	if (!(options&RE_OPTION_MULTILINE)
options          3849 regex.c        	  if (!(options&RE_OPTION_MULTILINE) &&
options          4176 regex.c        	options |= RE_OPTION_IGNORECASE;
options          4180 regex.c        	options &= ~RE_OPTION_IGNORECASE;
options          4184 regex.c        	options = *p++;
options          4313 regex.c              options = (long)*--stackp;
options           130 regex.h            long options;	/* Flags for options such as extended_pattern. */
options          2480 win32/win32.c      if (options == WNOHANG) {
options           126 wince/wince.h  	DWORD access, BOOL inherit, DWORD options);


original_module

original_module  1715 variable.c         VALUE base = original_module(a);
original_module  1722 variable.c     			   rb_id2name(id), rb_class2name(original_module(a)),


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      115 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  147 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  363 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_cipher_update

ossl_cipher_update  247 ext/openssl/ossl_cipher.c     return ossl_cipher_update(self, data);
ossl_cipher_update  370 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "update", ossl_cipher_update, 1);


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        181 ext/openssl/ossl.h void ossl_debug(const char *, ...);
ossl_debug        182 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   59 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       40 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  128 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   68 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         84 ext/openssl/ossl.h     ossl_raise(rb_eTypeError, "wrong argument (%s)! (Expected kind of %s)",\
ossl_raise         91 ext/openssl/ossl.h     ossl_raise(rb_eTypeError, "wrong argument (%s)! (Expected instance of %s)",\
ossl_raise         98 ext/openssl/ossl.h     ossl_raise(rb_eTypeError, "wrong argument type");\
ossl_raise        134 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         31 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        260 ext/openssl/ossl_cipher.c 	ossl_raise(eCipherError, NULL);
ossl_raise        287 ext/openssl/ossl_cipher.c         ossl_raise(eCipherError, "key length too short");
ossl_raise        290 ext/openssl/ossl_cipher.c         ossl_raise(eCipherError, NULL);
ossl_raise        304 ext/openssl/ossl_cipher.c         ossl_raise(eCipherError, "iv length too short");
ossl_raise        307 ext/openssl/ossl_cipher.c 	ossl_raise(eCipherError, NULL);
ossl_raise        320 ext/openssl/ossl_cipher.c         ossl_raise(eCipherError, NULL);
ossl_raise        334 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        136 ext/openssl/ossl_ssl.c         ossl_raise(eSSLError, "SSL_CTX_new:");
ossl_raise        171 ext/openssl/ossl_ssl.c         ossl_raise(rb_eArgError, "unknown SSL method `%s'.", s);
ossl_raise        175 ext/openssl/ossl_ssl.c         ossl_raise(eSSLError, "SSL_CTX_set_ssl_version:");
ossl_raise        285 ext/openssl/ossl_ssl.c 	ossl_raise(eSSLError, NULL);
ossl_raise        341 ext/openssl/ossl_ssl.c             ossl_raise(eSSLError, "SSL_CTX_use_certificate:");
ossl_raise        345 ext/openssl/ossl_ssl.c             ossl_raise(eSSLError, "SSL_CTX_use_PrivateKey:");
ossl_raise        348 ext/openssl/ossl_ssl.c             ossl_raise(eSSLError, "SSL_CTX_check_private_key:");
ossl_raise        359 ext/openssl/ossl_ssl.c         	    ossl_raise(eSSLError, "SSL_CTX_add_client_CA");
ossl_raise        367 ext/openssl/ossl_ssl.c         	ossl_raise(eSSLError, "SSL_CTX_add_client_CA");
ossl_raise        402 ext/openssl/ossl_ssl.c             ossl_raise(eSSLError, "SSL_CTX_set_session_id_context:");
ossl_raise        479 ext/openssl/ossl_ssl.c         ossl_raise(eSSLError, "SSL_CTX is not initialized.");
ossl_raise        483 ext/openssl/ossl_ssl.c         ossl_raise(eSSLError, "SSL_CTX_set_cipher_list:");
ossl_raise        548 ext/openssl/ossl_ssl.c             ossl_raise(eSSLError, "SSL_new:");
ossl_raise        597 ext/openssl/ossl_ssl.c 	    ossl_raise(eSSLError, NULL);
ossl_raise        658 ext/openssl/ossl_ssl.c 		ossl_raise(eSSLError, "SSL_read:");
ossl_raise        702 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  448 ext/openssl/ossl_ssl.c         rb_ary_push(ary, ossl_ssl_cipher_to_ary(cipher));
ossl_ssl_cipher_to_ary  817 ext/openssl/ossl_ssl.c     return ossl_ssl_cipher_to_ary(cipher);


ossl_ssl_def_const

ossl_ssl_def_const  901 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(VERIFY_NONE);
ossl_ssl_def_const  902 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(VERIFY_PEER);
ossl_ssl_def_const  903 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(VERIFY_FAIL_IF_NO_PEER_CERT);
ossl_ssl_def_const  904 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(VERIFY_CLIENT_ONCE);
ossl_ssl_def_const  917 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_ALL);
ossl_ssl_def_const  919 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION);
ossl_ssl_def_const  922 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_SINGLE_ECDH_USE);
ossl_ssl_def_const  924 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_SINGLE_DH_USE);
ossl_ssl_def_const  925 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_EPHEMERAL_RSA);
ossl_ssl_def_const  927 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_CIPHER_SERVER_PREFERENCE);
ossl_ssl_def_const  929 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_TLS_ROLLBACK_BUG);
ossl_ssl_def_const  930 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_NO_SSLv2);
ossl_ssl_def_const  931 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_NO_SSLv3);
ossl_ssl_def_const  932 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_NO_TLSv1);
ossl_ssl_def_const  933 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_PKCS1_CHECK_1);
ossl_ssl_def_const  934 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_PKCS1_CHECK_2);
ossl_ssl_def_const  935 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_NETSCAPE_CA_DN_BUG);
ossl_ssl_def_const  936 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG);


ossl_ssl_get_io

ossl_ssl_get_io   552 ext/openssl/ossl_ssl.c         io = ossl_ssl_get_io(self);
ossl_ssl_get_io   584 ext/openssl/ossl_ssl.c     GetOpenFile(ossl_ssl_get_io(self), fptr);
ossl_ssl_get_io   637 ext/openssl/ossl_ssl.c     GetOpenFile(ossl_ssl_get_io(self), fptr);
ossl_ssl_get_io   665 ext/openssl/ossl_ssl.c         return rb_funcall(ossl_ssl_get_io(self), id_sysread, 2, len, str);
ossl_ssl_get_io   685 ext/openssl/ossl_ssl.c     GetOpenFile(ossl_ssl_get_io(self), fptr);
ossl_ssl_get_io   709 ext/openssl/ossl_ssl.c 	return rb_funcall(ossl_ssl_get_io(self), id_syswrite, 1, str);
ossl_ssl_get_io   724 ext/openssl/ossl_ssl.c 	rb_funcall(ossl_ssl_get_io(self), rb_intern("close"), 0);


ossl_ssl_setup

ossl_ssl_setup    607 ext/openssl/ossl_ssl.c     ossl_ssl_setup(self);
ossl_ssl_setup    614 ext/openssl/ossl_ssl.c     ossl_ssl_setup(self);


ossl_ssl_shutdown

ossl_ssl_shutdown  504 ext/openssl/ossl_ssl.c     ossl_ssl_shutdown(ssl);
ossl_ssl_shutdown  722 ext/openssl/ossl_ssl.c     ossl_ssl_shutdown(ssl);


ossl_sslctx_get_client_cert_cb

ossl_sslctx_get_client_cert_cb  384 ext/openssl/ossl_ssl.c     if (RTEST(ossl_sslctx_get_client_cert_cb(self)))
ossl_sslctx_get_client_cert_cb  560 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  306 ext/openssl/ossl_ssl.c     if (RTEST(ossl_sslctx_get_tmp_dh_cb(self))){
ossl_sslctx_get_tmp_dh_cb  562 ext/openssl/ossl_ssl.c 	cb = ossl_sslctx_get_tmp_dh_cb(v_ctx);


ossl_start_ssl

ossl_start_ssl    608 ext/openssl/ossl_ssl.c     return ossl_start_ssl(self, SSL_connect);
ossl_start_ssl    615 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       154 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  155 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    148 ext/openssl/ossl.h int ossl_verify_cb(int, X509_STORE_CTX *);
ossl_verify_cb    273 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     750 ext/openssl/ossl_ssl.c     return ossl_x509_new(cert);
ossl_x509_new     772 ext/openssl/ossl_ssl.c     obj = ossl_x509_new(cert);
ossl_x509_new     798 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            55 missing/erf.c      if (x < 1 + a) return 1 - p_gamma(a, x, loggamma_a);
p_gamma            79 missing/erf.c      if (x >= 0) return   p_gamma(0.5, x * x, LOG_PI_OVER_2);
p_gamma            80 missing/erf.c      else        return - p_gamma(0.5, x * x, LOG_PI_OVER_2);
p_gamma            91 missing/erf.c      else        return  1 + p_gamma(0.5, x * x, LOG_PI_OVER_2);


p_gid_exchange

p_gid_exchange   3281 process.c          return p_gid_exchange(obj);
p_gid_exchange   3299 process.c          p_gid_exchange(obj);
p_gid_exchange   3476 process.c          rb_define_module_function(rb_mProcGID, "re_exchange", p_gid_exchange, 0);


p_gid_sw_ensure

p_gid_sw_ensure  3259 process.c      	    return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, SAVED_GROUP_ID);
p_gid_sw_ensure  3267 process.c      	    return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, egid);
p_gid_sw_ensure  3302 process.c      	return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, obj);


p_uid_exchange

p_uid_exchange   3171 process.c          return p_uid_exchange(obj);
p_uid_exchange   3189 process.c          p_uid_exchange(obj);
p_uid_exchange   3475 process.c          rb_define_module_function(rb_mProcUID, "re_exchange", p_uid_exchange, 0);


p_uid_sw_ensure

p_uid_sw_ensure  3148 process.c      	    return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, SAVED_USER_ID);
p_uid_sw_ensure  3156 process.c      	    return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, euid);
p_uid_sw_ensure  3192 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           5006 ext/win32ole/win32ole.c     VALUE params = rb_ary_new();
params           5009 ext/win32ole/win32ole.c         return params;
params           5018 ext/win32ole/win32ole.c         return params;
params           5030 ext/win32ole/win32ole.c             rb_ary_push(params, param);
params           5034 ext/win32ole/win32ole.c      return params;


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_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_string

parse_string     7364 parse.c        	    token = parse_string(lex_strterm);
parse_string     3366 parse.y        	    token = parse_string(lex_strterm);


parser_warn

parser_warn      9234 parse.c        	parser_warn(node->nd_value, "found = in conditional, should be ==");
parser_warn      9266 parse.c            if (!e_option_supplied()) parser_warn(node, str);
parser_warn      9362 parse.c        		parser_warn(node, "range literal in condition");
parser_warn      5236 parse.y        	parser_warn(node->nd_value, "found = in conditional, should be ==");
parser_warn      5268 parse.y            if (!e_option_supplied()) parser_warn(node, str);
parser_warn      5364 parse.y        		parser_warn(node, "range literal in condition");


parser_warning

parser_warning   8584 parse.c        	parser_warning(h, "unused literal ignored");
parser_warning   8606 parse.c        	    parser_warning(nd, "statement not reached");
parser_warning   9031 parse.c        	    parser_warning(node, "void value expression");
parser_warning   9247 parse.c        	parser_warning(node->nd_value, "assignment in condition");
parser_warning   9274 parse.c            if (!e_option_supplied()) parser_warning(node, str);
parser_warning   9368 parse.c        	parser_warning(node, "literal in condition");
parser_warning   9379 parse.c        	    parser_warning(node, "literal in condition");
parser_warning   4586 parse.y        	parser_warning(h, "unused literal ignored");
parser_warning   4608 parse.y        	    parser_warning(nd, "statement not reached");
parser_warning   5033 parse.y        	    parser_warning(node, "void value expression");
parser_warning   5249 parse.y        	parser_warning(node->nd_value, "assignment in condition");
parser_warning   5276 parse.y            if (!e_option_supplied()) parser_warning(node, str);
parser_warning   5370 parse.y        	parser_warning(node, "literal in condition");
parser_warning   5381 parse.y        	    parser_warning(node, "literal in condition");


path2class

path2class       1043 marshal.c      	    VALUE c = path2class(r_unique(arg));
path2class       1200 marshal.c      	    klass = path2class(r_unique(arg));
path2class       1229 marshal.c      	    VALUE klass = path2class(r_unique(arg));
path2class       1248 marshal.c      	    VALUE klass = path2class(r_unique(arg));
path2class       1270 marshal.c      	    VALUE klass = path2class(r_unique(arg));
path2class       1283 marshal.c                 VALUE klass = path2class(r_unique(arg));
path2class       1321 marshal.c      	    v = path2class(RSTRING(str)->ptr);


path2module

path2module      1028 marshal.c      	    VALUE m = path2module(r_unique(arg));
path2module      1330 marshal.c      	    v = path2module(RSTRING(str)->ptr);


path_check_0

path_check_0     4065 file.c         	return path_check_0(newpath, loadpath);
path_check_0     4094 file.c             return path_check_0(rb_str_new2(path), Qfalse);
path_check_0     4116 file.c         	if (!path_check_0(rb_str_new(p0, p - p0), Qtrue)) {


path_tainted_p

path_tainted_p   1764 hash.c         	path_tainted_p(getenv(PATH_ENV));
path_tainted_p   1916 hash.c         	    path_tainted_p(value);


pause

pause            10579 eval.c         	    pause();
pause            11222 eval.c         	pause();


peek

peek             8384 parse.c            if ((c == '!' || c == '?') && is_identchar(tok()[0]) && !peek('=')) {
peek             8415 parse.c        		    if ((c = nextc()) == '=' && !peek('~') && !peek('>') &&
peek             8416 parse.c        			(!peek('=') || (lex_p + 1 < lex_pend && lex_p[1] == '>'))) {
peek             4386 parse.y            if ((c == '!' || c == '?') && is_identchar(tok()[0]) && !peek('=')) {
peek             4417 parse.y        		    if ((c = nextc()) == '=' && !peek('~') && !peek('>') &&
peek             4418 parse.y        			(!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              688 ext/nkf/nkf-utf8/nkf.c             if (pipe(fds) < 0 || (pid = fork()) < 0){
pipe             2949 io.c               if (((modef & FMODE_READABLE) && pipe(pr) == -1) ||
pipe             2950 io.c           	((modef & FMODE_WRITABLE) && pipe(pw) == -1))
pipe             5021 io.c               if (pipe(pipes) == -1)


pipe_add_fptr

pipe_add_fptr    2899 io.c           	pipe_add_fptr(fptr);
pipe_add_fptr    2940 io.c           	pipe_add_fptr(fptr);
pipe_add_fptr    3024 io.c           	    pipe_add_fptr(fptr);


pipe_exec

pipe_exec        2916 io.c               pid = pipe_exec(pname, rb_io_mode_modenum(mode), &fpr, &fpw);
pipe_exec         162 win32/win32.h  extern rb_pid_t pipe_exec(char *, int, FILE **, FILE **);


pipe_finalize

pipe_finalize    2833 io.c           static void pipe_finalize _((OpenFile *fptr,int));
pipe_finalize    2896 io.c           	fptr->finalize = pipe_finalize;
pipe_finalize    2939 io.c           	fptr->finalize = pipe_finalize;
pipe_finalize    3023 io.c           	    fptr->finalize = pipe_finalize;


pipe_open

pipe_open        2875 io.c           static VALUE pipe_open(VALUE pstr, char *pname, char *mode);
pipe_open        3093 io.c               port = pipe_open(pname, 0, mode);
pipe_open        3314 io.c           	return pipe_open(0, fname+1, mode);
pipe_open        4521 io.c               port = pipe_open(str, 0, "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 2493 win32/win32.c  	    if ((pid = poll_child_status(child, stat_loc))) return pid;
poll_child_status 2514 win32/win32.c  	return poll_child_status(ChildRecord + ret, stat_loc);
poll_child_status 2523 win32/win32.c  	while (!(pid = poll_child_status(child, stat_loc))) {


posix_signal

posix_signal     11608 eval.c         	posix_signal(SIGVTALRM, catch_timer);
posix_signal      388 intern.h       void posix_signal _((int, RETSIGTYPE (*)(int)));


prep_path

prep_path        4302 io.c           		    prep_path(rb_stdout, fn);
prep_path        4306 io.c           		prep_path(current_file, fn);


prep_stdio

prep_stdio       4301 io.c           		    rb_stdout = prep_stdio(fw, FMODE_WRITABLE, rb_cFile);
prep_stdio       4305 io.c           		current_file = prep_stdio(fr, FMODE_READABLE, rb_cFile);
prep_stdio       5673 io.c               rb_stdin = prep_stdio(stdin, FMODE_READABLE, rb_cIO);
prep_stdio       5675 io.c               rb_stdout = prep_stdio(stdout, FMODE_WRITABLE, rb_cIO);
prep_stdio       5677 io.c               rb_stderr = prep_stdio(stderr, FMODE_WRITABLE, rb_cIO);


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);


print_guessed_code

print_guessed_code  433 ext/nkf/nkf-utf8/nkf.c STATIC  void    print_guessed_code PROTO((char *filename));
print_guessed_code  741 ext/nkf/nkf-utf8/nkf.c           if (guess_f) print_guessed_code(NULL);
print_guessed_code  832 ext/nkf/nkf-utf8/nkf.c                   if (guess_f) print_guessed_code(filename);


print_mbc

print_mbc         868 regex.c        	  print_mbc(EXTRACT_MBC_AND_INCR(p));
print_mbc         870 regex.c        	  print_mbc(EXTRACT_MBC_AND_INCR(p));


print_undef

print_undef       611 eval.c         	print_undef(klass, name);
print_undef      2080 eval.c         	print_undef(klass, def);
print_undef      8762 eval.c         	print_undef(rklass, oid);


proc_alloc

proc_alloc       8289 eval.c             VALUE block = proc_alloc(klass, Qfalse);
proc_alloc       8298 eval.c             return proc_alloc(rb_cProc, Qfalse);
proc_alloc       8305 eval.c             return proc_alloc(rb_cProc, Qtrue);
proc_alloc       8320 eval.c             return proc_alloc(rb_cProc, Qtrue);


proc_arity

proc_arity       9187 eval.c         	return proc_arity(body->nd_cval);
proc_arity       9472 eval.c             rb_define_method(rb_cProc, "arity", proc_arity, 0);


proc_call

proc_call        9471 eval.c             rb_define_method(rb_cProc, "call", proc_call, -2);
proc_call        9473 eval.c             rb_define_method(rb_cProc, "[]", proc_call, -2);


proc_clone

proc_clone       9406 eval.c         	body = proc_clone(body);
proc_clone       9469 eval.c             rb_define_method(rb_cProc, "clone", proc_clone, 0);
proc_clone       9549 eval.c             rb_define_method(rb_cBinding, "clone", proc_clone, 0);


proc_dup

proc_dup         9428 eval.c             rb_define_method(rb_cBinding, "dup", proc_dup, 0);
proc_dup         9470 eval.c             rb_define_method(rb_cProc, "dup", proc_dup, 0);


proc_exec_n

proc_exec_n      1236 process.c      	proc_exec_n(argc, argv, prog);
proc_exec_n      1524 process.c      	    proc_exec_n(argc, argv, prog);


proc_exec_v

proc_exec_v      1009 process.c      	return proc_exec_v(args, prog);
proc_exec_v      1070 process.c      	return proc_exec_v(argv, 0);


proc_get_safe_level

proc_get_safe_level 8211 eval.c             ruby_safe_level = proc_get_safe_level(data);
proc_get_safe_level 8670 eval.c         	ruby_safe_level > proc_get_safe_level(proc)) {


proc_getegid

proc_getegid     3445 process.c          rb_define_module_function(rb_mProcess, "egid", proc_getegid, 0);
proc_getegid     3468 process.c          rb_define_module_function(rb_mProcGID, "eid", proc_getegid, 0);
proc_getegid     3489 process.c          rb_define_module_function(rb_mProcID_Syscall, "getegid", proc_getegid, 0);


proc_geteuid

proc_geteuid     3443 process.c          rb_define_module_function(rb_mProcess, "euid", proc_geteuid, 0);
proc_geteuid     3467 process.c          rb_define_module_function(rb_mProcUID, "eid", proc_geteuid, 0);
proc_geteuid     3487 process.c          rb_define_module_function(rb_mProcID_Syscall, "geteuid", proc_geteuid, 0);


proc_getgid

proc_getgid      3441 process.c          rb_define_module_function(rb_mProcess, "gid", proc_getgid, 0);
proc_getgid      3466 process.c          rb_define_module_function(rb_mProcGID, "rid", proc_getgid, 0);
proc_getgid      3488 process.c          rb_define_module_function(rb_mProcID_Syscall, "getgid", proc_getgid, 0);


proc_getgroups

proc_getgroups   2500 process.c          return proc_getgroups(obj);
proc_getgroups   2533 process.c          return proc_getgroups(obj);
proc_getgroups   3448 process.c          rb_define_module_function(rb_mProcess, "groups", proc_getgroups, 0);


proc_getuid

proc_getuid      3439 process.c          rb_define_module_function(rb_mProcess, "uid", proc_getuid, 0);
proc_getuid      3465 process.c          rb_define_module_function(rb_mProcUID, "rid", proc_getuid, 0);
proc_getuid      3486 process.c          rb_define_module_function(rb_mProcID_Syscall, "getuid", proc_getuid, 0);


proc_invoke

proc_invoke       186 eval.c         static VALUE proc_invoke _((VALUE,VALUE,VALUE,VALUE));
proc_invoke      2639 eval.c         	proc_invoke(trace_func, rb_ary_new3(6, rb_str_new2(event_name),
proc_invoke      5716 eval.c         	result = proc_invoke(body->nd_cval, rb_ary_new4(argc, argv), recv, klass);
proc_invoke      7652 eval.c             proc_invoke(data, rb_ary_new2(0), Qundef, 0);
proc_invoke      8458 eval.c             return proc_invoke(proc, args, Qundef, 0);


proc_jump_error

proc_jump_error  4964 eval.c         	    proc_jump_error(TAG_BREAK, result);
proc_jump_error  8402 eval.c         	proc_jump_error(TAG_RETRY, Qnil); /* xxx */
proc_jump_error  8407 eval.c         	    proc_jump_error(state, result);
proc_jump_error  8721 eval.c         	    proc_jump_error(state, prot_tag->retval);


proc_lambda

proc_lambda      9387 eval.c         	body = proc_lambda();
proc_lambda      9479 eval.c             rb_define_global_function("proc", proc_lambda, 0);
proc_lambda      9480 eval.c             rb_define_global_function("lambda", proc_lambda, 0);


proc_options

proc_options      431 ruby.c         static void proc_options _((int argc, char **argv));
proc_options      447 ruby.c             proc_options(argc, argv);
proc_options     1192 ruby.c             proc_options(argc, argv);


proc_set_safe_level

proc_set_safe_level 8385 eval.c         	proc_set_safe_level(proc);
proc_set_safe_level 8698 eval.c         	proc_set_safe_level(proc);


proc_setegid

proc_setegid     3256 process.c      	proc_setegid(obj, INT2FIX(gid));
proc_setegid     3264 process.c      	proc_setegid(obj, INT2FIX(SAVED_GROUP_ID));
proc_setegid     3446 process.c          rb_define_module_function(rb_mProcess, "egid=", proc_setegid, 1);


proc_seteuid

proc_seteuid     3145 process.c      	proc_seteuid(obj, INT2FIX(uid));
proc_seteuid     3153 process.c      	proc_seteuid(obj, INT2FIX(SAVED_USER_ID));
proc_seteuid     3444 process.c          rb_define_module_function(rb_mProcess, "euid=", proc_seteuid, 1);


proc_spawn_v

proc_spawn_v     1145 process.c      	return proc_spawn_v(args, prog ? RSTRING(prog)->ptr : 0);
proc_spawn_v     1178 process.c          return argv[0] ? proc_spawn_v(argv, 0) : -1;


proc_wait

proc_wait         772 process.c          VALUE pid = proc_wait(argc, argv);
proc_wait        3391 process.c          rb_define_module_function(rb_mProcess, "wait", proc_wait, -1);
proc_wait        3393 process.c          rb_define_module_function(rb_mProcess, "waitpid", proc_wait, -1);


proc_wait2

proc_wait2       3392 process.c          rb_define_module_function(rb_mProcess, "wait2", proc_wait2, -1);
proc_wait2       3394 process.c          rb_define_module_function(rb_mProcess, "waitpid2", proc_wait2, -1);


process_sflag

process_sflag     807 ruby.c             process_sflag();
process_sflag     822 ruby.c             process_sflag();


proto

proto              27 ext/dl/dl.c      for (i=1; proto[i]; i++) {
proto              28 ext/dl/dl.c        switch (proto[i]) {
proto              94 ext/dl/dl.c          rb_raise(rb_eDLTypeError, "unsupported type `%c'", proto[i]);
proto             259 ext/dl/sym.c     VALUE proto;
proto             266 ext/dl/sym.c     proto = rb_dlsym_cproto(self);
proto             268 ext/dl/sym.c     str_size = RSTRING(proto)->len + 100;
proto             272 ext/dl/sym.c   	   sym, sym->func, RSTRING(proto)->ptr);
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             391 ext/socket/getaddrinfo.c 			char *proto;
proto             393 ext/socket/getaddrinfo.c 			proto = NULL;
proto             396 ext/socket/getaddrinfo.c 				proto = NULL;
proto             399 ext/socket/getaddrinfo.c 				proto = "udp";
proto             402 ext/socket/getaddrinfo.c 				proto = "tcp";
proto             408 ext/socket/getaddrinfo.c 			if ((sp = getservbyname((char*)servname, proto)) == NULL)
proto             868 ext/socket/socket.c     fd = socket(domain, type, proto);
proto             872 ext/socket/socket.c 	    fd = socket(domain, type, proto);
proto            2794 ext/socket/socket.c     VALUE service, proto;
proto            2798 ext/socket/socket.c     rb_scan_args(argc, argv, "11", &service, &proto);
proto            2799 ext/socket/socket.c     if (NIL_P(proto)) proto = rb_str_new2("tcp");
proto            2801 ext/socket/socket.c     StringValue(proto);
proto            2803 ext/socket/socket.c     sp = getservbyname(StringValueCStr(service),  StringValueCStr(proto));
proto            2813 ext/socket/socket.c 	    rb_raise(rb_eSocket, "no such service %s/%s", s, RSTRING(proto)->ptr);
proto            2357 win32/win32.c  	r = getservbyname(name, proto);
proto            2374 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           274 process.c          pid = pst_pid(st);
pst_pid          3409 process.c          rb_define_method(rb_cProcStatus, "pid", pst_pid, 0);


pst_to_i

pst_to_i          235 process.c          return rb_fix2str(pst_to_i(st), 10);
pst_to_i          328 process.c          return rb_equal(pst_to_i(st1), st2);
pst_to_i         3404 process.c          rb_define_method(rb_cProcStatus, "to_i", pst_to_i, 0);
pst_to_i         3405 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_braces

push_braces      1220 dir.c          	    status = push_braces(ary, buf, flags);
push_braces      1267 dir.c          	    status = push_braces(ary, buf, flags);


push_globs

push_globs       1225 dir.c          	status = push_globs(ary, str, flags);
push_globs       1263 dir.c          	    status = push_globs(ary, buf, flags);


push_hold_buf

push_hold_buf     292 ext/nkf/nkf-utf8/nkf.c STATIC  int     push_hold_buf PROTO((int c2));
push_hold_buf    2242 ext/nkf/nkf-utf8/nkf.c     push_hold_buf(c2);
push_hold_buf    2243 ext/nkf/nkf-utf8/nkf.c     push_hold_buf(c1);
push_hold_buf    2252 ext/nkf/nkf-utf8/nkf.c         if (push_hold_buf(c1) == EOF || estab_f){


pushback

pushback         6804 parse.c        	    pushback(c);
pushback         6832 parse.c        	    pushback(c);
pushback         6846 parse.c        	    pushback(c);
pushback         6889 parse.c        		    pushback(c);
pushback         6916 parse.c        	    pushback(c);
pushback         6925 parse.c        	    pushback(c);
pushback         6993 parse.c            pushback(c);
pushback         7040 parse.c        		pushback(c);
pushback         7048 parse.c        		pushback(c);
pushback         7067 parse.c        		    pushback(c);
pushback         7073 parse.c        		    pushback(c);
pushback         7094 parse.c        	    pushback(c);
pushback         7135 parse.c        	pushback(c);
pushback         7143 parse.c        	    pushback(c);
pushback         7150 parse.c            pushback(c);
pushback         7194 parse.c        	    pushback(c);
pushback         7196 parse.c        		pushback('-');
pushback         7207 parse.c        	pushback(c);
pushback         7311 parse.c        		pushback(c);
pushback         7319 parse.c        	    pushback(c);
pushback         7416 parse.c        	    pushback(c);
pushback         7425 parse.c        	    pushback(c);
pushback         7453 parse.c        	pushback(c);
pushback         7488 parse.c        	    pushback(c);
pushback         7497 parse.c        	pushback(c);
pushback         7521 parse.c        	    pushback(c);
pushback         7530 parse.c        	    pushback(c);
pushback         7533 parse.c        	pushback(c);
pushback         7552 parse.c        	    pushback(c);
pushback         7555 parse.c        	pushback(c);
pushback         7619 parse.c        	    pushback(c);
pushback         7646 parse.c        	    pushback(c);
pushback         7654 parse.c        	pushback(c);
pushback         7681 parse.c        	    pushback(c);
pushback         7695 parse.c        	pushback(c);
pushback         7705 parse.c        	    pushback(c);
pushback         7717 parse.c        	    pushback(c);
pushback         7725 parse.c        	pushback(c);
pushback         7735 parse.c        	    pushback(c);
pushback         7747 parse.c        	    pushback(c);
pushback         7754 parse.c        	pushback(c);
pushback         7763 parse.c        	    pushback(c);
pushback         7766 parse.c        	pushback(c);
pushback         7804 parse.c        		    pushback(c);
pushback         7828 parse.c        		    pushback(c);
pushback         7852 parse.c        		    pushback(c);
pushback         7886 parse.c        			pushback(c);
pushback         7893 parse.c        			pushback(c);
pushback         7904 parse.c        		    pushback(c);
pushback         7926 parse.c        			    pushback(c0);
pushback         7941 parse.c        			pushback(c);
pushback         7970 parse.c        	    pushback(c);
pushback         8011 parse.c        	    pushback(c);
pushback         8023 parse.c        	    pushback(c);
pushback         8039 parse.c        	pushback(c);
pushback         8067 parse.c        	pushback(c);
pushback         8079 parse.c        		pushback(c);
pushback         8116 parse.c        		pushback(c);
pushback         8119 parse.c        	    pushback(c);
pushback         8151 parse.c        	pushback(c);
pushback         8195 parse.c        		pushback(c);
pushback         8201 parse.c        		pushback(c);
pushback         8236 parse.c        	pushback(c);
pushback         8252 parse.c        	    pushback(c);
pushback         8287 parse.c        		pushback(c);
pushback         8315 parse.c        	    pushback(c);
pushback         8323 parse.c        		pushback(c);
pushback         8348 parse.c        	    pushback(c);
pushback         8388 parse.c        	pushback(c);
pushback         8422 parse.c        			pushback(c);
pushback         2806 parse.y        	    pushback(c);
pushback         2834 parse.y        	    pushback(c);
pushback         2848 parse.y        	    pushback(c);
pushback         2891 parse.y        		    pushback(c);
pushback         2918 parse.y        	    pushback(c);
pushback         2927 parse.y        	    pushback(c);
pushback         2995 parse.y            pushback(c);
pushback         3042 parse.y        		pushback(c);
pushback         3050 parse.y        		pushback(c);
pushback         3069 parse.y        		    pushback(c);
pushback         3075 parse.y        		    pushback(c);
pushback         3096 parse.y        	    pushback(c);
pushback         3137 parse.y        	pushback(c);
pushback         3145 parse.y        	    pushback(c);
pushback         3152 parse.y            pushback(c);
pushback         3196 parse.y        	    pushback(c);
pushback         3198 parse.y        		pushback('-');
pushback         3209 parse.y        	pushback(c);
pushback         3313 parse.y        		pushback(c);
pushback         3321 parse.y        	    pushback(c);
pushback         3418 parse.y        	    pushback(c);
pushback         3427 parse.y        	    pushback(c);
pushback         3455 parse.y        	pushback(c);
pushback         3490 parse.y        	    pushback(c);
pushback         3499 parse.y        	pushback(c);
pushback         3523 parse.y        	    pushback(c);
pushback         3532 parse.y        	    pushback(c);
pushback         3535 parse.y        	pushback(c);
pushback         3554 parse.y        	    pushback(c);
pushback         3557 parse.y        	pushback(c);
pushback         3621 parse.y        	    pushback(c);
pushback         3648 parse.y        	    pushback(c);
pushback         3656 parse.y        	pushback(c);
pushback         3683 parse.y        	    pushback(c);
pushback         3697 parse.y        	pushback(c);
pushback         3707 parse.y        	    pushback(c);
pushback         3719 parse.y        	    pushback(c);
pushback         3727 parse.y        	pushback(c);
pushback         3737 parse.y        	    pushback(c);
pushback         3749 parse.y        	    pushback(c);
pushback         3756 parse.y        	pushback(c);
pushback         3765 parse.y        	    pushback(c);
pushback         3768 parse.y        	pushback(c);
pushback         3806 parse.y        		    pushback(c);
pushback         3830 parse.y        		    pushback(c);
pushback         3854 parse.y        		    pushback(c);
pushback         3888 parse.y        			pushback(c);
pushback         3895 parse.y        			pushback(c);
pushback         3906 parse.y        		    pushback(c);
pushback         3928 parse.y        			    pushback(c0);
pushback         3943 parse.y        			pushback(c);
pushback         3972 parse.y        	    pushback(c);
pushback         4013 parse.y        	    pushback(c);
pushback         4025 parse.y        	    pushback(c);
pushback         4041 parse.y        	pushback(c);
pushback         4069 parse.y        	pushback(c);
pushback         4081 parse.y        		pushback(c);
pushback         4118 parse.y        		pushback(c);
pushback         4121 parse.y        	    pushback(c);
pushback         4153 parse.y        	pushback(c);
pushback         4197 parse.y        		pushback(c);
pushback         4203 parse.y        		pushback(c);
pushback         4238 parse.y        	pushback(c);
pushback         4254 parse.y        	    pushback(c);
pushback         4289 parse.y        		pushback(c);
pushback         4317 parse.y        	    pushback(c);
pushback         4325 parse.y        		pushback(c);
pushback         4350 parse.y        	    pushback(c);
pushback         4390 parse.y        	pushback(c);
pushback         4424 parse.y        			pushback(c);


putchar

putchar          1778 ext/nkf/nkf-utf8/nkf.c       putchar(c);
putchar           777 regex.c        	putchar('/');
putchar           858 regex.c        	  putchar('/');
putchar           866 regex.c        	putchar('/');
putchar           869 regex.c        	  putchar('-');
putchar           110 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            34 missing/erf.c      if (x >= 1 + a) return 1 - q_gamma(a, x, loggamma_a);
q_gamma            90 missing/erf.c      if (x >= 0) return  q_gamma(0.5, x * x, LOG_PI_OVER_2);


qpencode

qpencode          370 pack.c         static void qpencode _((VALUE,VALUE,long));
qpencode          913 pack.c         	    qpencode(res, from, len);


qsort

qsort            1609 array.c            qsort(RARRAY(ary)->ptr, RARRAY(ary)->len, sizeof(VALUE),
qsort             488 enum.c         	qsort(RARRAY(ary)->ptr, RARRAY(ary)->len, sizeof(VALUE), sort_by_cmp, 0);


r_byte

r_byte            836 marshal.c          int c = SIGN_EXTEND_CHAR(r_byte(arg));
r_byte            847 marshal.c      	    x |= (long)r_byte(arg) << (8*i);
r_byte            859 marshal.c      	    x |= (long)r_byte(arg) << (8*i);
r_byte            926 marshal.c          if (r_byte(arg) == TYPE_SYMLINK) {
r_byte           1005 marshal.c          int type = r_byte(arg);
r_byte           1114 marshal.c      	    big->sign = (r_byte(arg) == '+');
r_byte           1158 marshal.c      	    int options = r_byte(arg);
r_byte           1412 marshal.c          major = r_byte(&arg);
r_byte           1413 marshal.c          minor = r_byte(&arg);


r_bytes

r_bytes           916 marshal.c          id = rb_intern(RSTRING(r_bytes(arg))->ptr);
r_bytes           943 marshal.c          return r_bytes(arg);
r_bytes          1084 marshal.c      	    VALUE str = r_bytes(arg);
r_bytes          1157 marshal.c      	    volatile VALUE str = r_bytes(arg);
r_bytes          1310 marshal.c      	    volatile VALUE str = r_bytes(arg);
r_bytes          1319 marshal.c      	    volatile VALUE str = r_bytes(arg);
r_bytes          1328 marshal.c      	    volatile VALUE str = r_bytes(arg);


r_bytes0

r_bytes0          865 marshal.c      #define r_bytes(arg) r_bytes0(r_long(arg), (arg))
r_bytes0         1116 marshal.c      	    data = r_bytes0(len * 2, arg);


r_entry

r_entry          1102 marshal.c      	    r_entry(v, arg);
r_entry          1147 marshal.c      	    r_entry(v, arg);
r_entry          1152 marshal.c      	v = r_entry(r_string(arg), arg);
r_entry          1159 marshal.c      	    v = r_entry(rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len, options), arg);
r_entry          1168 marshal.c      	    r_entry(v, arg);
r_entry          1181 marshal.c      	    r_entry(v, arg);
r_entry          1212 marshal.c      	    r_entry(v, arg);
r_entry          1242 marshal.c      	    r_entry(v, arg);
r_entry          1262 marshal.c      	    r_entry(v, arg);
r_entry          1276 marshal.c      	    r_entry(v, arg);
r_entry          1298 marshal.c                 r_entry(v, arg);
r_entry          1313 marshal.c      	    r_entry(v, arg);
r_entry          1322 marshal.c      	    r_entry(v, arg);
r_entry          1331 marshal.c      	    r_entry(v, arg);


r_ivar

r_ivar           1022 marshal.c      	    if (ivar) r_ivar(v, arg);
r_ivar           1238 marshal.c      		r_ivar(data, arg);
r_ivar           1277 marshal.c      	    r_ivar(v, arg);


r_le

r_le              248 range.c        	while (RTEST(c = r_le(v, e))) {
r_le              582 range.c            if (r_le(beg, val)) {
r_le              587 range.c        	    if (r_le(val, end)) return Qtrue;


r_long

r_long            865 marshal.c      #define r_bytes(arg) r_bytes0(r_long(arg), (arg))
r_long            902 marshal.c          long num = r_long(arg);
r_long            963 marshal.c          len = r_long(arg);
r_long           1010 marshal.c      	id = r_long(arg);
r_long           1076 marshal.c      	    long i = r_long(arg);
r_long           1115 marshal.c      	    len = r_long(arg);
r_long           1165 marshal.c      	    volatile long len = r_long(arg); /* gcc 2.7.2.3 -O2 bug?? */
r_long           1178 marshal.c      	    long len = r_long(arg);
r_long           1205 marshal.c      	    len = r_long(arg);


r_lt

r_lt              242 range.c        	while (r_lt(v, e)) {
r_lt              584 range.c        	    if (r_lt(val, end)) return Qtrue;


r_object

r_object          790 marshal.c      static VALUE r_object _((struct load_arg *arg));
r_object          967 marshal.c      	    VALUE val = r_object(arg);
r_object         1170 marshal.c      		rb_ary_push(v, r_object(arg));
r_object         1183 marshal.c      		VALUE key = r_object(arg);
r_object         1184 marshal.c      		VALUE value = r_object(arg);
r_object         1188 marshal.c      		RHASH(v)->ifnone = r_object(arg);
r_object         1222 marshal.c      		rb_struct_aset(v, LONG2FIX(i), r_object(arg));
r_object         1263 marshal.c      	    data = r_object(arg);
r_object         1363 marshal.c          return r_object(arg);


r_object0

r_object0        1021 marshal.c      	    v = r_object0(arg, 0, &ivar, extmod);
r_object0        1033 marshal.c      	    v = r_object0(arg, 0, 0, extmod);
r_object0        1048 marshal.c      	    v = r_object0(arg, 0, 0, extmod);
r_object0        1304 marshal.c                 rb_funcall(v, s_load_data, 1, r_object0(arg, 0, 0, extmod));
r_object0        1356 marshal.c          return r_object0(arg, arg->proc, 0, Qnil);


r_string

r_string         1152 marshal.c      	v = r_entry(r_string(arg), arg);
r_string         1236 marshal.c      	    data = r_string(arg);


r_symbol

r_symbol          936 marshal.c          return rb_id2name(r_symbol(arg));
r_symbol          966 marshal.c      	    ID id = r_symbol(arg);
r_symbol         1214 marshal.c      		slot = r_symbol(arg);


r_symlink

r_symlink         927 marshal.c      	return r_symlink(arg);
r_symlink        1340 marshal.c      	return ID2SYM(r_symlink(arg));


r_symreal

r_symreal         929 marshal.c          return r_symreal(arg);
r_symreal        1336 marshal.c      	v = ID2SYM(r_symreal(arg));


r_unique

r_unique         1028 marshal.c      	    VALUE m = path2module(r_unique(arg));
r_unique         1043 marshal.c      	    VALUE c = path2class(r_unique(arg));
r_unique         1200 marshal.c      	    klass = path2class(r_unique(arg));
r_unique         1229 marshal.c      	    VALUE klass = path2class(r_unique(arg));
r_unique         1248 marshal.c      	    VALUE klass = path2class(r_unique(arg));
r_unique         1270 marshal.c      	    VALUE klass = path2class(r_unique(arg));
r_unique         1283 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            2121 object.c       	if (raise) {
raise            2603 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_zlib_error

raise_zlib_error  662 ext/zlib/zlib.c 	raise_zlib_error(err, z->stream.msg);
raise_zlib_error  694 ext/zlib/zlib.c 	raise_zlib_error(err, z->stream.msg);
raise_zlib_error  750 ext/zlib/zlib.c 	    raise_zlib_error(err, z->stream.msg);
raise_zlib_error  788 ext/zlib/zlib.c 	    raise_zlib_error(err, z->stream.msg);
raise_zlib_error  803 ext/zlib/zlib.c 	raise_zlib_error(err, z->stream.msg);
raise_zlib_error 1153 ext/zlib/zlib.c 	raise_zlib_error(err, z->stream.msg);
raise_zlib_error 1173 ext/zlib/zlib.c 	raise_zlib_error(err, 0);
raise_zlib_error 1228 ext/zlib/zlib.c 	raise_zlib_error(err, z.stream.msg);
raise_zlib_error 1363 ext/zlib/zlib.c 	raise_zlib_error(err, z->stream.msg);
raise_zlib_error 1391 ext/zlib/zlib.c 	raise_zlib_error(err, z->stream.msg);
raise_zlib_error 1440 ext/zlib/zlib.c 	raise_zlib_error(err, z->stream.msg);
raise_zlib_error 1488 ext/zlib/zlib.c 	raise_zlib_error(err, z.stream.msg);
raise_zlib_error 1629 ext/zlib/zlib.c 	raise_zlib_error(err, z->stream.msg);
raise_zlib_error 1653 ext/zlib/zlib.c 	raise_zlib_error(err, z->stream.msg);
raise_zlib_error 2722 ext/zlib/zlib.c 	raise_zlib_error(err, gz->z.stream.msg);
raise_zlib_error 2917 ext/zlib/zlib.c 	raise_zlib_error(err, gz->z.stream.msg);


rand_init

rand_init         334 random.c           old = rand_init(seed);
rand_init         449 random.c       	rand_init(random_seed());


random_seed

random_seed       332 random.c       	seed = random_seed();
random_seed       449 random.c       	rand_init(random_seed());


range

range             193 dir.c          	    pat = range(pat, *s, flags);
range            3427 ext/nkf/nkf-utf8/nkf.c     static int range[RANGE_NUM_MAX][2] = {
range            3460 ext/nkf/nkf-utf8/nkf.c 	start = range[i][0];
range            3461 ext/nkf/nkf-utf8/nkf.c 	end   = range[i][1];
range             239 ext/openssl/openssl_missing.c     if (range->neg || BN_is_zero(range)) return 0;
range             241 ext/openssl/openssl_missing.c     n = BN_num_bits(range);
range             245 ext/openssl/openssl_missing.c     } else if (!BN_is_bit_set(range, n - 2) && !BN_is_bit_set(range, n - 3)) {
range             248 ext/openssl/openssl_missing.c 	    if (BN_cmp(r ,range) >= 0) {
range             249 ext/openssl/openssl_missing.c 		if (!BN_sub(r, r, range)) return 0;
range             250 ext/openssl/openssl_missing.c 		if (BN_cmp(r, range) >= 0)
range             251 ext/openssl/openssl_missing.c 		    if (!BN_sub(r, r, range)) return 0;
range             253 ext/openssl/openssl_missing.c 	} while (BN_cmp(r, range) >= 0);
range             257 ext/openssl/openssl_missing.c 	} while (BN_cmp(r, range) >= 0);
range             268 ext/openssl/openssl_missing.c     return bn_rand_range(0, r, range);
range             276 ext/openssl/openssl_missing.c     return bn_rand_range(1, r, range);
range             119 ext/openssl/openssl_missing.h int BN_rand_range(BIGNUM *r, BIGNUM *range);
range             120 ext/openssl/openssl_missing.h int BN_pseudo_rand_range(BIGNUM *r, BIGNUM *range);
range             444 ext/openssl/ossl_bn.c     ossl_bn_s_##func##_range(VALUE klass, VALUE range)		\
range             446 ext/openssl/ossl_bn.c 	BIGNUM *bn = GetBNPtr(range), *result;			\
range             319 missing/strftime.c 			i = range(1, timeptr->tm_mday, 31);
range             324 missing/strftime.c 			i = range(0, timeptr->tm_hour, 23);
range             329 missing/strftime.c 			i = range(0, timeptr->tm_hour, 23);
range             342 missing/strftime.c 			i = range(0, timeptr->tm_mon, 11);
range             347 missing/strftime.c 			i = range(0, timeptr->tm_min, 59);
range             352 missing/strftime.c 			i = range(0, timeptr->tm_hour, 23);
range             360 missing/strftime.c 			i = range(0, timeptr->tm_sec, 60);
range             369 missing/strftime.c 			i = range(0, timeptr->tm_wday, 6);
range             491 missing/strftime.c 			sprintf(tbuf, "%2d", range(1, timeptr->tm_mday, 31));
range             509 missing/strftime.c 			sprintf(tbuf, "%2d", range(0, timeptr->tm_hour, 23));
range             513 missing/strftime.c 			i = range(0, timeptr->tm_hour, 23);
range             526 missing/strftime.c 				range(1, timeptr->tm_mday, 31),
range             527 missing/strftime.c 				months_a[range(0, timeptr->tm_mon, 11)],
range              52 range.c            SET_EXCL(range, exclude_end);
range              53 range.c            rb_ivar_set(range, id_beg, beg);
range              54 range.c            rb_ivar_set(range, id_end, end);
range              62 range.c            VALUE range = rb_obj_alloc(rb_cRange);
range              64 range.c            range_init(range, beg, end, exclude_end);
range              65 range.c            return range;
range              87 range.c            if (rb_ivar_defined(range, id_beg)) {
range              90 range.c            range_init(range, beg, end, RTEST(flags));
range             106 range.c            return EXCL(range) ? Qtrue : Qfalse;
range             128 range.c            if (range == obj) return Qtrue;
range             129 range.c            if (!rb_obj_is_instance_of(obj, rb_obj_class(range)))
range             132 range.c            if (!rb_equal(rb_ivar_get(range, id_beg), rb_ivar_get(obj, id_beg)))
range             134 range.c            if (!rb_equal(rb_ivar_get(range, id_end), rb_ivar_get(obj, id_end)))
range             137 range.c            if (EXCL(range) != EXCL(obj)) return Qfalse;
range             186 range.c            if (range == obj) return Qtrue;
range             187 range.c            if (!rb_obj_is_instance_of(obj, rb_obj_class(range)))
range             190 range.c            if (!rb_eql(rb_ivar_get(range, id_beg), rb_ivar_get(obj, id_beg)))
range             192 range.c            if (!rb_eql(rb_ivar_get(range, id_end), rb_ivar_get(obj, id_end)))
range             195 range.c            if (EXCL(range) != EXCL(obj)) return Qfalse;
range             213 range.c            long hash = EXCL(range);
range             216 range.c            v = rb_hash(rb_ivar_get(range, id_beg));
range             218 range.c            v = rb_hash(rb_ivar_get(range, id_end));
range             220 range.c            hash ^= EXCL(range) << 24;
range             241 range.c            if (EXCL(range)) {
range             306 range.c            b = rb_ivar_get(range, id_beg);
range             307 range.c            e = rb_ivar_get(range, id_end);
range             321 range.c        	if (!EXCL(range)) end += 1;
range             335 range.c        	    args[0] = b; args[1] = e; args[2] = range;
range             341 range.c        	    ID c = rb_intern(EXCL(range) ? "<" : "<=");
range             360 range.c        	    range_each_func(range, step_i, b, e, args);
range             363 range.c            return range;
range             398 range.c            beg = rb_ivar_get(range, id_beg);
range             399 range.c            end = rb_ivar_get(range, id_end);
range             409 range.c        	if (!EXCL(range)) lim += 1;
range             418 range.c        	args[0] = beg; args[1] = end; args[2] = range;
range             424 range.c        	range_each_func(range, each_i, beg, end, NULL);
range             426 range.c            return range;
range             441 range.c            return rb_ivar_get(range, id_beg);
range             461 range.c            return rb_ivar_get(range, id_end);
range             473 range.c            if (!rb_obj_is_kind_of(range, rb_cRange)) return Qfalse;
range             475 range.c            beg = b = NUM2LONG(rb_ivar_get(range, id_beg));
range             476 range.c            end = e = NUM2LONG(rb_ivar_get(range, id_end));
range             487 range.c            if (!EXCL(range)) end++;	/* include end point */
range             498 range.c        		 b, EXCL(range)? "." : "", e);
range             516 range.c            str = rb_obj_as_string(rb_ivar_get(range, id_beg));
range             517 range.c            str2 = rb_obj_as_string(rb_ivar_get(range, id_end));
range             519 range.c            rb_str_cat(str, "...", EXCL(range)?3:2);
range             542 range.c            str = rb_inspect(rb_ivar_get(range, id_beg));
range             543 range.c            str2 = rb_inspect(rb_ivar_get(range, id_end));
range             545 range.c            rb_str_cat(str, "...", EXCL(range)?3:2);
range             580 range.c            beg = rb_ivar_get(range, id_beg);
range             581 range.c            end = rb_ivar_get(range, id_end);
range             583 range.c        	if (EXCL(range)) {
range             865 re.c               long range;
range             876 re.c           	range = -pos;
range             879 re.c           	range = RSTRING(str)->len - pos;
range             883 re.c           			      pos, range);
range             894 re.c               long range;
range             910 re.c           	range = -pos;
range             913 re.c           	range = RSTRING(str)->len - pos;
range             916 re.c           		       pos, range, &regs);
range            1287 regex.c          int range = 0;
range            1465 regex.c        	if (range && had_char_class) {
range            1494 regex.c                                 range))
range            1678 regex.c        	if (range) {
range            1682 regex.c        	  range = 0;
range            1704 regex.c        	  range = 1;
range            3124 regex.c              if (range > 0) {
range            3181 regex.c              if (range > 0) {
range            3205 regex.c            if (bufp->options&RE_OPTION_MULTILINE && range > 0) {
range            3216 regex.c            pend = startpos + range;
range            3233 regex.c            if (range > 0 && (bufp->options & RE_OPTIMIZE_EXACTN)) {
range            3235 regex.c              range -= pos;
range            3236 regex.c              if (range < 0) return -1;
range            3249 regex.c              if (range > 0) {	/* Searching forwards.  */
range            3251 regex.c        	int irange = range;
range            3255 regex.c        	while (range > 0) {
range            3265 regex.c        	      range--;
range            3274 regex.c        	  range--;
range            3277 regex.c        	startpos += irange - range;
range            3290 regex.c            if ((anchor || !bufp->can_be_null) && range > 0 && size > 0 && startpos == size)
range            3302 regex.c            if (range > 0) {
range            3305 regex.c        	while (range > 0 && string[startpos] != '\n') {
range            3306 regex.c        	  range--;
range            3313 regex.c            if (!range)
range            3315 regex.c            else if (range > 0) {
range            3320 regex.c        	range-=len, startpos+=len;
range            3321 regex.c        	if (!range)
range            3324 regex.c              range--, startpos++;
range            3327 regex.c              range++, startpos--;
range            3337 regex.c        	  if (!range)
range            3339 regex.c        	  range++, startpos--;
range             552 time.c               unsigned long range = 0;
range             576 time.c         	range = 366 * 24 * 60 * 60;
range             581 time.c         	  range = 31 * 24 * 60 * 60;
range             587 time.c         	    range = 24 * 60 * 60;
range             593 time.c         	      range = 60 * 60;
range             599 time.c         		range = 60;
range             605 time.c         		  range = 1;
range             635 time.c         	range = 0;
range             646 time.c         	if (range) {
range             647 time.c         	  guess = guess - range;
range             648 time.c         	  range = 0;
range             656 time.c         	if (range) {
range             657 time.c         	  guess = guess + range;
range             658 time.c         	  range = 0;


range_each_func

range_each_func   360 range.c        	    range_each_func(range, step_i, b, e, args);
range_each_func   424 range.c        	range_each_func(range, each_i, beg, end, NULL);


range_failed

range_failed       48 range.c        	v = rb_rescue(range_check, (VALUE)args, range_failed, 0);
range_failed       49 range.c        	if (NIL_P(v)) range_failed();


range_first

range_first       658 range.c            rb_define_method(rb_cRange, "first", range_first, 0);
range_first       660 range.c            rb_define_method(rb_cRange, "begin", range_first, 0);


range_include

range_include     653 range.c            rb_define_method(rb_cRange, "===", range_include, 1);
range_include     667 range.c            rb_define_method(rb_cRange, "member?", range_include, 1);
range_include     668 range.c            rb_define_method(rb_cRange, "include?", range_include, 1);


range_init

range_init         64 range.c            range_init(range, beg, end, exclude_end);
range_init         90 range.c            range_init(range, beg, end, RTEST(flags));


range_last

range_last        659 range.c            rb_define_method(rb_cRange, "last", range_last, 0);
range_last        661 range.c            rb_define_method(rb_cRange, "end", range_last, 0);


range_op

range_op         9353 parse.c        	node->nd_beg = range_op(node->nd_beg);
range_op         9354 parse.c        	node->nd_end = range_op(node->nd_end);
range_op         5355 parse.y        	node->nd_beg = range_op(node->nd_beg);
range_op         5356 parse.y        	node->nd_end = range_op(node->nd_end);


rb_Array

rb_Array         1431 dir.c              return rb_ensure(rb_Array, dir, dir_close, dir);
rb_Array         2769 eval.c             return rb_Array(v);
rb_Array          160 ext/readline/readline.c 	ary = rb_Array(ary);
rb_Array          322 intern.h       VALUE rb_Array _((VALUE));
rb_Array         2490 object.c           return rb_Array(arg);


rb_Float

rb_Float          320 intern.h       VALUE rb_Float _((VALUE));
rb_Float           19 math.c         #define Need_Float(x) (x) = rb_Float(x)
rb_Float          105 numeric.c          return rb_assoc_new(rb_Float(y), rb_Float(x));
rb_Float          527 numeric.c          return rb_assoc_new(rb_Float(y), x);
rb_Float         1339 numeric.c          return flo_floor(rb_Float(num));
rb_Float         1362 numeric.c          return flo_ceil(rb_Float(num));
rb_Float         1378 numeric.c          return flo_round(rb_Float(num));
rb_Float         1394 numeric.c          return flo_truncate(rb_Float(num));
rb_Float         2391 object.c           return rb_Float(arg);
rb_Float         2414 object.c           return RFLOAT(rb_Float(val))->value;
rb_Float          775 pack.c         		f = RFLOAT(rb_Float(from))->value;
rb_Float          786 pack.c         		f = RFLOAT(rb_Float(from))->value;
rb_Float          798 pack.c         		d = RFLOAT(rb_Float(from))->value;
rb_Float          810 pack.c         		d = RFLOAT(rb_Float(from))->value;
rb_Float          821 pack.c         		f = RFLOAT(rb_Float(from))->value;
rb_Float          833 pack.c         		d = RFLOAT(rb_Float(from))->value;
rb_Float          702 sprintf.c      		fval = RFLOAT(rb_Float(val))->value;


rb_Integer

rb_Integer        194 ext/dl/ptr.c       p = (void*)(DLNUM2LONG(rb_Integer(ptr)));
rb_Integer        197 ext/dl/ptr.c       p = (void*)(DLNUM2LONG(rb_Integer(ptr)));
rb_Integer        201 ext/dl/ptr.c       p = (void*)(DLNUM2LONG(rb_Integer(ptr)));
rb_Integer        156 ext/dl/sym.c     saddr = (void*)(DLNUM2LONG(rb_Integer(addr)));
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       2482 ext/zlib/zlib.c 	val = rb_Integer(mtime);
rb_Integer        319 intern.h       VALUE rb_Integer _((VALUE));
rb_Integer        272 numeric.c          return rb_Integer(rb_funcall(x, '/', 1, y));
rb_Integer       2245 object.c           return rb_Integer(arg);
rb_Integer        482 random.c       	vmax = rb_Integer(vmax);
rb_Integer        508 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         468 ext/openssl/ossl_ssl.c             elem = rb_String(elem);
rb_String         321 intern.h       VALUE rb_String _((VALUE));
rb_String        2454 object.c           return rb_String(arg);


rb_add_event_hook

rb_add_event_hook 2562 eval.c             rb_add_event_hook(call_trace_func, RUBY_EVENT_ALL);
rb_add_event_hook  374 node.h         void rb_add_event_hook _((rb_event_hook_func_t,rb_event_t));


rb_add_method

rb_add_method     805 class.c            rb_add_method(klass, name, NEW_CFUNC(func,argc), NOEX_PUBLIC);
rb_add_method     819 class.c            rb_add_method(klass, id, NEW_CFUNC(func, argc), ex);
rb_add_method     829 class.c            rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PROTECTED);
rb_add_method     839 class.c            rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PRIVATE);
rb_add_method     847 class.c            rb_add_method(klass, rb_intern(name), 0, NOEX_UNDEF);
rb_add_method     415 eval.c             rb_add_method(CLASS_OF(klass), ID_ALLOCATOR, NEW_CFUNC(func, 0), NOEX_PRIVATE);
rb_add_method     423 eval.c             rb_add_method(CLASS_OF(klass), ID_ALLOCATOR, 0, NOEX_UNDEF);
rb_add_method     618 eval.c         	    rb_add_method(klass, name, NEW_ZSUPER(), noex);
rb_add_method     688 eval.c         	rb_add_method(klass, id, NEW_IVAR(attriv), noex);
rb_add_method     691 eval.c         	rb_add_method(klass, rb_id_attrset(id), NEW_ATTRSET(attriv), noex);
rb_add_method    1992 eval.c             rb_add_method(klass, id, 0, NOEX_PUBLIC);
rb_add_method    3843 eval.c         	    rb_add_method(ruby_class, node->nd_mid, defn, noex);
rb_add_method    3845 eval.c         		rb_add_method(rb_singleton_class(ruby_class),
rb_add_method    3879 eval.c         	    rb_add_method(klass, node->nd_mid, defn,
rb_add_method    7337 eval.c         	rb_add_method(rb_singleton_class(module), id, body->nd_body, NOEX_PUBLIC);
rb_add_method    9427 eval.c             rb_add_method(mod, id, node, noex);
rb_add_method     350 node.h         void rb_add_method _((VALUE, ID, NODE *, int));


rb_alias

rb_alias          927 class.c            rb_alias(klass, rb_intern(name1), rb_intern(name2));
rb_alias         2135 eval.c             rb_alias(mod, rb_to_id(newname), rb_to_id(oldname));
rb_alias         3897 eval.c         	rb_alias(ruby_class, node->nd_new, node->nd_old);
rb_alias         1199 ext/tk/tkutil/tkutil.c     rb_alias(klass, key_id, value_id);
rb_alias          157 intern.h       void rb_alias _((VALUE, ID, ID));


rb_alias_variable

rb_alias_variable 3902 eval.c         	rb_alias_variable(node->nd_new, node->nd_old);
rb_alias_variable  461 intern.h       void rb_alias_variable _((ID, ID));


rb_any_to_s

rb_any_to_s       748 error.c        		d = rb_any_to_s(obj);
rb_any_to_s       300 intern.h       VALUE rb_any_to_s _((VALUE));
rb_any_to_s       988 io.c               if (!fptr || !fptr->path) return rb_any_to_s(obj);
rb_any_to_s      1273 object.c       	    rb_str_append(s, rb_any_to_s(v));
rb_any_to_s      2635 object.c           rb_define_method(rb_mKernel, "to_s", rb_any_to_s, 0);
rb_any_to_s      2300 re.c               rb_define_method(rb_cMatch, "inspect", rb_any_to_s, 0); /* in object.c */
rb_any_to_s       302 string.c       	return rb_any_to_s(obj);


rb_apply

rb_apply           52 ext/enumerator/enumerator.c     return rb_apply(rb_cEnumerator, id_new, enum_args);
rb_apply          242 ext/enumerator/enumerator.c     return rb_apply(memo->u1.value, memo->u2.id, memo->u3.value);
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         5606 ext/win32ole/win32ole.c         result = rb_apply(handler, rb_intern("call"), args);
rb_apply         5610 ext/win32ole/win32ole.c         result = rb_apply(handler, rb_intern("call"), args);
rb_apply          170 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_ary2cary

rb_ary2cary       542 ext/dl/dl.c        ptr = rb_ary2cary(StringValuePtr(t)[0], self, &size);
rb_ary2cary       545 ext/dl/dl.c        ptr = rb_ary2cary(0, self, &size);
rb_ary2cary       293 ext/dl/dl.h    void *rb_ary2cary(char t, VALUE ary, long *size);
rb_ary2cary       833 ext/dl/ptr.c       ptr = rb_ary2cary(t, val, size);
rb_ary2cary       836 ext/dl/ptr.c       ptr = rb_ary2cary(t, rb_ary_new3(1, val), size);
rb_ary2cary       508 ext/dl/sym.c   	ANY2P(args[i]) = DLVOIDP(rb_ary2cary(0, argv[i], NULL));


rb_ary_aref

rb_ary_aref       919 array.c        	rb_ary_push(new_ary, rb_ary_aref(1, argv+i, ary));
rb_ary_aref      2985 array.c            rb_define_method(rb_cArray, "[]", rb_ary_aref, -1);
rb_ary_aref      3032 array.c            rb_define_method(rb_cArray, "slice", rb_ary_aref, -1);
rb_ary_aref        31 intern.h       VALUE rb_ary_aref _((int, VALUE*, VALUE));
rb_ary_aref      1201 re.c           	return rb_ary_aref(argc, argv, match_to_a(match));


rb_ary_assoc

rb_ary_assoc     3035 array.c            rb_define_method(rb_cArray, "assoc", rb_ary_assoc, 1);
rb_ary_assoc       52 intern.h       VALUE rb_ary_assoc _((VALUE, VALUE));


rb_ary_clear

rb_ary_clear     3027 array.c            rb_define_method(rb_cArray, "clear", rb_ary_clear, 0);
rb_ary_clear     1954 ext/win32ole/win32ole.c     rb_ary_clear(argv);
rb_ary_clear       49 intern.h       VALUE rb_ary_clear _((VALUE));
rb_ary_clear     1170 ruby.c             rb_ary_clear(rb_argv);


rb_ary_cmp

rb_ary_cmp       3030 array.c            rb_define_method(rb_cArray, "<=>", rb_ary_cmp, 1);
rb_ary_cmp         55 intern.h       VALUE rb_ary_cmp _((VALUE, VALUE));


rb_ary_collect

rb_ary_collect   3013 array.c            rb_define_method(rb_cArray, "collect", rb_ary_collect, 0);
rb_ary_collect   3015 array.c            rb_define_method(rb_cArray, "map", rb_ary_collect, 0);


rb_ary_collect_bang

rb_ary_collect_bang 3014 array.c            rb_define_method(rb_cArray, "collect!", rb_ary_collect_bang, 0);
rb_ary_collect_bang 3016 array.c            rb_define_method(rb_cArray, "map!", rb_ary_collect_bang, 0);


rb_ary_compact_bang

rb_ary_compact_bang 2831 array.c            rb_ary_compact_bang(ary);
rb_ary_compact_bang 3048 array.c            rb_define_method(rb_cArray, "compact!", rb_ary_compact_bang, 0);


rb_ary_concat

rb_ary_concat    2991 array.c            rb_define_method(rb_cArray, "concat", rb_ary_concat, 1);
rb_ary_concat    3331 eval.c         	    result = rb_ary_concat(args, splat_value(rb_eval(self, node->nd_body)));
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    2895 ext/win32ole/win32ole.c     rb_ary_concat(methods, ole_methods_from_typeinfo(pTypeInfo, mask));
rb_ary_concat      51 intern.h       VALUE rb_ary_concat _((VALUE, VALUE));
rb_ary_concat     204 ruby.c         	rb_ary_concat(rb_load_path, ary);
rb_ary_concat     515 string.c       	rb_ary_concat(RSTRING(str)->aux.shared, add);


rb_ary_delete

rb_ary_delete    3019 array.c            rb_define_method(rb_cArray, "delete", rb_ary_delete, 1);
rb_ary_delete    1670 gc.c               rb_ary_delete(finalizers, block);
rb_ary_delete    2351 hash.c         	    rb_ary_delete(keys, key);
rb_ary_delete      47 intern.h       VALUE rb_ary_delete _((VALUE, VALUE));


rb_ary_delete_at

rb_ary_delete_at 1915 array.c            return rb_ary_delete_at(ary, NUM2LONG(pos));
rb_ary_delete_at 1968 array.c            return rb_ary_delete_at(ary, NUM2LONG(arg1));
rb_ary_delete_at 6020 ext/win32ole/win32ole.c         rb_ary_delete_at(events, at);
rb_ary_delete_at   48 intern.h       VALUE rb_ary_delete_at _((VALUE, long));


rb_ary_dup

rb_ary_dup       1545 array.c            return rb_ary_reverse(rb_ary_dup(ary));
rb_ary_dup       1670 array.c            ary = rb_ary_dup(ary);
rb_ary_dup       2015 array.c            ary = rb_ary_dup(ary);
rb_ary_dup       2119 array.c            if (alen == 0) return rb_ary_dup(ary);
rb_ary_dup       2777 array.c            ary = rb_ary_dup(ary);
rb_ary_dup       2830 array.c            ary = rb_ary_dup(ary);
rb_ary_dup       2951 array.c            ary = rb_ary_dup(ary);
rb_ary_dup       3337 eval.c         	    VALUE args = rb_ary_dup(rb_eval(self, node->nd_head));
rb_ary_dup        149 ext/enumerator/enumerator.c 	rb_yield(rb_ary_dup(ary));
rb_ary_dup         33 intern.h       VALUE rb_ary_dup _((VALUE));


rb_ary_each

rb_ary_each      2998 array.c            rb_define_method(rb_cArray, "each", rb_ary_each, 0);
rb_ary_each      1274 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        41 intern.h       VALUE rb_ary_each _((VALUE));


rb_ary_elt

rb_ary_elt        585 array.c            return rb_ary_elt(ary, offset);
rb_ary_elt       1814 array.c        	    rb_ary_push(result, rb_ary_elt(ary, i));
rb_ary_elt       2078 array.c        	    rb_ary_push(tmp, rb_ary_elt(ary, i));
rb_ary_elt       2080 array.c        		rb_ary_push(tmp, rb_ary_elt(argv[j], i));
rb_ary_elt       2091 array.c        	rb_ary_push(tmp, rb_ary_elt(ary, i));
rb_ary_elt       2093 array.c        	    rb_ary_push(tmp, rb_ary_elt(argv[j], i));
rb_ary_elt       2121 array.c        	tmp = to_ary(rb_ary_elt(ary, i));
rb_ary_elt       2134 array.c        	    rb_ary_store(rb_ary_elt(result, j), i, rb_ary_elt(tmp, j));
rb_ary_elt       2481 array.c        	if (!rb_equal(rb_ary_elt(ary1, i), rb_ary_elt(ary2, i)))
rb_ary_elt       2505 array.c        	if (!rb_eql(rb_ary_elt(ary1, i), rb_ary_elt(ary2, i)))
rb_ary_elt       2596 array.c        	VALUE v = rb_funcall(rb_ary_elt(ary1, i), id_cmp, 1, rb_ary_elt(ary2, i));
rb_ary_elt       2650 array.c        	rb_ary_push(ary3, rb_ary_elt(ary1, i));
rb_ary_elt       2679 array.c        	v = vv = rb_ary_elt(ary1, i);
rb_ary_elt       2712 array.c        	v = vv = rb_ary_elt(ary1, i);
rb_ary_elt       2718 array.c        	v = vv = rb_ary_elt(ary2, i);
rb_ary_elt       2753 array.c        	v = vv = rb_ary_elt(ary, i);
rb_ary_elt       2881 array.c        	tmp = rb_check_array_type(rb_ary_elt(ary, i));


rb_ary_entry

rb_ary_entry      676 array.c        	return rb_ary_entry(ary, FIX2LONG(arg));
rb_ary_entry      690 array.c            return rb_ary_entry(ary, NUM2LONG(arg));
rb_ary_entry      712 array.c            return rb_ary_entry(ary, NUM2LONG(pos));
rb_ary_entry     1789 array.c            return rb_values_at(ary, RARRAY(ary)->len, argc, argv, rb_ary_entry);
rb_ary_entry      831 enum.c         	rb_ary_push(tmp, rb_ary_entry(RARRAY(args)->ptr[i], idx));
rb_ary_entry     10850 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      238 ext/dl/dl.c        e = rb_ary_entry(v, i);
rb_ary_entry      266 ext/dl/dl.c        e = rb_ary_entry(v, i);
rb_ary_entry      294 ext/dl/dl.c        e = rb_ary_entry(v, i);
rb_ary_entry      323 ext/dl/dl.c        e = rb_ary_entry(v, i);
rb_ary_entry      352 ext/dl/dl.c        e = rb_ary_entry(v, i);
rb_ary_entry      381 ext/dl/dl.c        e = rb_ary_entry(v, i);
rb_ary_entry      410 ext/dl/dl.c        e = rb_ary_entry(v, i);
rb_ary_entry      476 ext/dl/dl.c      val0 = rb_ary_entry(v,0);
rb_ary_entry      553 ext/dl/ptr.c       rb_to_id(rb_ary_entry(rest,i));
rb_ary_entry      568 ext/dl/ptr.c       vid = rb_ary_entry(rest,i);
rb_ary_entry     1014 ext/dl/ptr.c     key = rb_ary_entry(assoc, 0);
rb_ary_entry     1015 ext/dl/ptr.c     val = rb_ary_entry(assoc, 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      192 ext/openssl/ossl_ssl.c     GetX509CertPtr(cert = rb_ary_entry(ary, 0));
rb_ary_entry      193 ext/openssl/ossl_ssl.c     GetPKeyPtr(key = rb_ary_entry(ary, 1));
rb_ary_entry      466 ext/openssl/ossl_ssl.c             elem = rb_ary_entry(v, i);
rb_ary_entry      467 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     1066 ext/syck/rubyext.c         VALUE tpart = rb_to_id( rb_ary_entry( tparts, i ) );
rb_ary_entry     1552 ext/syck/rubyext.c             syck_seq_add( node, rb_ary_entry(val, i) );
rb_ary_entry     1641 ext/syck/rubyext.c             VALUE key = rb_ary_entry(keys, i);
rb_ary_entry     1677 ext/syck/rubyext.c             VALUE key = rb_ary_entry(keys, i);
rb_ary_entry      702 ext/win32ole/win32ole.c         obj = rb_ary_entry(obj, pid[i]);
rb_ary_entry      768 ext/win32ole/win32ole.c             val1 = rb_ary_entry(val1, 0);
rb_ary_entry      789 ext/win32ole/win32ole.c             val1 = rb_ary_entry(val1, 0);
rb_ary_entry     1921 ext/win32ole/win32ole.c     key = rb_ary_entry(pair, 0);
rb_ary_entry     1938 ext/win32ole/win32ole.c     value = rb_ary_entry(pair, 1);
rb_ary_entry     2015 ext/win32ole/win32ole.c     param = rb_ary_entry(paramS, argc-2);
rb_ary_entry     2069 ext/win32ole/win32ole.c             param = rb_ary_entry(paramS, i-cNamedArgs);
rb_ary_entry     2095 ext/win32ole/win32ole.c                 param = rb_ary_entry(paramS, i-cNamedArgs);
rb_ary_entry     2114 ext/win32ole/win32ole.c                     param = rb_ary_entry(paramS, i-cNamedArgs);
rb_ary_entry     2222 ext/win32ole/win32ole.c         tp = rb_ary_entry(types, j);
rb_ary_entry     2225 ext/win32ole/win32ole.c         param = rb_ary_entry(args, j);
rb_ary_entry     2259 ext/win32ole/win32ole.c                     VALUE elem = rb_ary_entry(param, ent);
rb_ary_entry     5419 ext/win32ole/win32ole.c         event = rb_ary_entry(ary, i);
rb_ary_entry     5420 ext/win32ole/win32ole.c         event_name = rb_ary_entry(event, 1);
rb_ary_entry     5449 ext/win32ole/win32ole.c         event = rb_ary_entry(ary, i);
rb_ary_entry     5450 ext/win32ole/win32ole.c         event_name = rb_ary_entry(event, 1);
rb_ary_entry     5542 ext/win32ole/win32ole.c         v = rb_ary_entry(ary, i);
rb_ary_entry     5572 ext/win32ole/win32ole.c     obj = rb_ary_entry(ary_ole_event, pEV->m_event_id);
rb_ary_entry     5601 ext/win32ole/win32ole.c     handler = rb_ary_entry(event, 0);
rb_ary_entry     5603 ext/win32ole/win32ole.c     if (rb_ary_entry(event, 3) == Qtrue) {
rb_ary_entry       40 intern.h       VALUE rb_ary_entry _((VALUE, long));
rb_ary_entry     4647 io.c           		    rb_ary_push(list, rb_ary_entry(read, i));
rb_ary_entry     4657 io.c           		    rb_ary_push(list, rb_ary_entry(write, i));
rb_ary_entry     4660 io.c           		    rb_ary_push(list, rb_ary_entry(write, i));
rb_ary_entry     4670 io.c           		    rb_ary_push(list, rb_ary_entry(except, i));
rb_ary_entry     4673 io.c           		    rb_ary_push(list, rb_ary_entry(except, i));
rb_ary_entry      464 struct.c       	rb_yield_values(2, rb_ary_entry(members, i), RSTRUCT(s)->ptr[i]);


rb_ary_flatten_bang

rb_ary_flatten_bang 2952 array.c            rb_ary_flatten_bang(ary);
rb_ary_flatten_bang 3050 array.c            rb_define_method(rb_cArray, "flatten!", rb_ary_flatten_bang, 0);


rb_ary_includes

rb_ary_includes  1400 array.c            if (rb_ary_includes(inspect_tbl, id)) {
rb_ary_includes  1419 array.c            return rb_ary_includes(inspect_tbl, rb_obj_id(obj));
rb_ary_includes  2873 array.c            if (rb_ary_includes(memo, id)) {
rb_ary_includes  3029 array.c            rb_define_method(rb_cArray, "include?", rb_ary_includes, 1);
rb_ary_includes  2350 hash.c         	if (rb_ary_includes(keys, key)) {
rb_ary_includes    54 intern.h       VALUE rb_ary_includes _((VALUE, VALUE));
rb_ary_includes  1851 variable.c     	if (!rb_ary_includes(ary, kval)) {


rb_ary_indexes

rb_ary_indexes   3006 array.c            rb_define_method(rb_cArray, "indexes", rb_ary_indexes, -1);
rb_ary_indexes   3007 array.c            rb_define_method(rb_cArray, "indices", rb_ary_indexes, -1);


rb_ary_join

rb_ary_join      1243 array.c            return rb_ary_join(arg[0], arg[1]);
rb_ary_join      1318 array.c            return rb_ary_join(ary, sep);
rb_ary_join      1337 array.c            return rb_ary_join(ary, rb_output_fs);
rb_ary_join      2360 array.c        	return rb_ary_join(ary, tmp);
rb_ary_join      1106 ext/syck/rubyext.c                 partial = rb_ary_join( parts, colon );
rb_ary_join      1124 ext/syck/rubyext.c                         subclass = rb_ary_join( subclass_parts, colon );
rb_ary_join      1176 ext/syck/rubyext.c                     VALUE name = rb_ary_join( parts, colon );
rb_ary_join      1182 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      4258 file.c         	tmp = rb_ary_join(tmp, rb_str_new2(PATH_SEP));
rb_ary_join        42 intern.h       VALUE rb_ary_join _((VALUE, VALUE));
rb_ary_join      1435 process.c          cmd = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" "));
rb_ary_join      1486 process.c          cmd = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" "));


rb_ary_modify

rb_ary_modify     296 array.c            rb_ary_modify(ary);
rb_ary_modify     360 array.c            rb_ary_modify(ary);
rb_ary_modify     513 array.c            rb_ary_modify(ary);
rb_ary_modify     965 array.c            rb_ary_modify(ary);
rb_ary_modify    1499 array.c            rb_ary_modify(ary);
rb_ary_modify    1642 array.c            rb_ary_modify(ary);
rb_ary_modify    1727 array.c            rb_ary_modify(ary);
rb_ary_modify    1860 array.c            rb_ary_modify(ary);
rb_ary_modify    1887 array.c            rb_ary_modify(ary);
rb_ary_modify    1987 array.c            rb_ary_modify(ary);
rb_ary_modify    2158 array.c            rb_ary_modify(copy);
rb_ary_modify    2186 array.c            rb_ary_modify(ary);
rb_ary_modify    2257 array.c            rb_ary_modify(ary);
rb_ary_modify    2799 array.c            rb_ary_modify(ary);


rb_ary_modify_check

rb_ary_modify_check   64 array.c            rb_ary_modify_check(ary);
rb_ary_modify_check  448 array.c            rb_ary_modify_check(ary);
rb_ary_modify_check  499 array.c            rb_ary_modify_check(ary);


rb_ary_new

rb_ary_new       1363 array.c        	    inspect_tbl = rb_ary_new();
rb_ary_new       2646 array.c            ary3 = rb_ary_new();
rb_ary_new       2922 array.c        		memo = rb_ary_new();
rb_ary_new        441 class.c            VALUE ary = rb_ary_new();
rb_ary_new        507 class.c            VALUE p, ary = rb_ary_new();
rb_ary_new        629 class.c            ary = rb_ary_new();
rb_ary_new        791 class.c            ary = rb_ary_new();
rb_ary_new       1003 class.c        	    if (var) *var = rb_ary_new();
rb_ary_new       1245 dir.c              ary = rb_ary_new();
rb_ary_new         69 enum.c             VALUE ary = rb_ary_new();
rb_ary_new        154 enum.c             VALUE ary = rb_ary_new();
rb_ary_new        186 enum.c             VALUE ary = rb_ary_new();
rb_ary_new        228 enum.c             VALUE ary = rb_ary_new();
rb_ary_new        249 enum.c             VALUE ary = rb_ary_new();
rb_ary_new        346 enum.c             ary[0] = rb_ary_new();
rb_ary_new        347 enum.c             ary[1] = rb_ary_new();
rb_ary_new        483 enum.c         	ary = rb_ary_new();
rb_ary_new        878 enum.c             result = rb_block_given_p() ? Qnil : rb_ary_new();
rb_ary_new       1886 eval.c             VALUE ary = rb_ary_new();
rb_ary_new       3711 eval.c         	result = rb_ary_new();
rb_ary_new       6103 eval.c             ary = rb_ary_new();
rb_ary_new       7566 eval.c             VALUE ary = rb_ary_new();
rb_ary_new       7941 eval.c             rb_load_path = rb_ary_new();
rb_ary_new       7945 eval.c             rb_features = rb_ary_new();
rb_ary_new       7956 eval.c             ruby_dln_librefs = rb_ary_new();
rb_ary_new       10974 eval.c             VALUE ary = rb_ary_new();
rb_ary_new       12318 eval.c             VALUE ary = rb_ary_new();
rb_ary_new       12564 eval.c             ary = rb_ary_new();
rb_ary_new         70 ext/Win32API/Win32API.c     a_import = rb_ary_new();
rb_ary_new        387 ext/dbm/dbm.c      VALUE ret, ary = rb_ary_new();
rb_ary_new        642 ext/dbm/dbm.c      ary = rb_ary_new();
rb_ary_new        660 ext/dbm/dbm.c      ary = rb_ary_new();
rb_ary_new        719 ext/dbm/dbm.c      ary = rb_ary_new();
rb_ary_new        357 ext/dl/ptr.c     ary = rb_ary_new();
rb_ary_new        686 ext/dl/ptr.c     ary = rb_ary_new();
rb_ary_new        891 ext/dl/sym.c     dvals = rb_ary_new();
rb_ary_new        305 ext/etc/etc.c      mem = rb_ary_new();
rb_ary_new        481 ext/gdbm/gdbm.c     VALUE ret, ary = rb_ary_new();
rb_ary_new        742 ext/gdbm/gdbm.c     ary = rb_ary_new();
rb_ary_new        762 ext/gdbm/gdbm.c     ary = rb_ary_new();
rb_ary_new        825 ext/gdbm/gdbm.c     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        442 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        683 ext/readline/readline.c 	result = rb_ary_new();
rb_ary_new        710 ext/readline/readline.c 	result = rb_ary_new();
rb_ary_new        367 ext/sdbm/init.c     VALUE ret, ary = rb_ary_new();
rb_ary_new        624 ext/sdbm/init.c     ary = rb_ary_new();
rb_ary_new        642 ext/sdbm/init.c     ary = rb_ary_new();
rb_ary_new        701 ext/sdbm/init.c     ary = rb_ary_new();
rb_ary_new       1230 ext/socket/socket.c     ary = rb_ary_new();
rb_ary_new       1240 ext/socket/socket.c 	names = rb_ary_new();
rb_ary_new       2693 ext/socket/socket.c     base = rb_ary_new();
rb_ary_new       2768 ext/socket/socket.c     ary = rb_ary_new();
rb_ary_new       2770 ext/socket/socket.c     names = rb_ary_new();
rb_ary_new        978 ext/stringio/stringio.c     VALUE ary = rb_ary_new(), line;
rb_ary_new       1099 ext/syck/rubyext.c             VALUE subclass_parts = rb_ary_new();
rb_ary_new       2114 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        944 ext/win32ole/win32ole.c             val2 = rb_ary_new();
rb_ary_new        959 ext/win32ole/win32ole.c                             obj = rb_ary_new();
rb_ary_new        961 ext/win32ole/win32ole.c                         val2 = rb_ary_new();
rb_ary_new       2815 ext/win32ole/win32ole.c     VALUE methods = rb_ary_new();
rb_ary_new       2890 ext/win32ole/win32ole.c     methods = rb_ary_new();
rb_ary_new       3266 ext/win32ole/win32ole.c     classes = rb_ary_new();
rb_ary_new       3303 ext/win32ole/win32ole.c     VALUE typelibs = rb_ary_new();
rb_ary_new       3349 ext/win32ole/win32ole.c     VALUE progids = rb_ary_new();
rb_ary_new       3907 ext/win32ole/win32ole.c     VALUE variables = rb_ary_new();
rb_ary_new       4074 ext/win32ole/win32ole.c     VALUE type = rb_ary_new();
rb_ary_new       4475 ext/win32ole/win32ole.c     VALUE type = rb_ary_new();
rb_ary_new       5006 ext/win32ole/win32ole.c     VALUE params = rb_ary_new();
rb_ary_new       5128 ext/win32ole/win32ole.c     VALUE typedetail = rb_ary_new();
rb_ary_new       5591 ext/win32ole/win32ole.c     args = rb_ary_new();
rb_ary_new       5604 ext/win32ole/win32ole.c         argv = rb_ary_new();
rb_ary_new       6015 ext/win32ole/win32ole.c         events = rb_ary_new();
rb_ary_new       6083 ext/win32ole/win32ole.c     ary_ole_event = rb_ary_new();
rb_ary_new       6139 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "ARGV", rb_ary_new());
rb_ary_new       3217 ext/zlib/zlib.c     dst = rb_ary_new();
rb_ary_new       4250 file.c         	tmp = rb_ary_new();
rb_ary_new       1939 gc.c               finalizers = rb_ary_new();
rb_ary_new        823 hash.c             VALUE result = rb_ary_new();
rb_ary_new        856 hash.c             result = rb_ary_new();
rb_ary_new       1167 hash.c             ary = rb_ary_new();
rb_ary_new       1319 hash.c             ary = rb_ary_new();
rb_ary_new       1352 hash.c             ary = rb_ary_new();
rb_ary_new       1926 hash.c             VALUE ary = rb_ary_new();
rb_ary_new       1957 hash.c             VALUE ary = rb_ary_new();
rb_ary_new       1990 hash.c             VALUE ary = rb_ary_new();
rb_ary_new       2065 hash.c             VALUE result = rb_ary_new();
rb_ary_new       2085 hash.c             result = rb_ary_new();
rb_ary_new       2161 hash.c             VALUE ary = rb_ary_new();
rb_ary_new         26 intern.h       VALUE rb_ary_new _((void));
rb_ary_new       1791 io.c               ary = rb_ary_new();
rb_ary_new       4490 io.c               ary = rb_ary_new();
rb_ary_new       4636 io.c               rb_ary_push(res, rp?rb_ary_new():rb_ary_new2(0));
rb_ary_new       4637 io.c               rb_ary_push(res, wp?rb_ary_new():rb_ary_new2(0));
rb_ary_new       4638 io.c               rb_ary_push(res, ep?rb_ary_new():rb_ary_new2(0));
rb_ary_new        938 pack.c         		    associates = rb_ary_new();
rb_ary_new       1323 pack.c             ary = rb_ary_new();
rb_ary_new       6580 parse.c        		ruby_debug_lines = rb_ary_new();
rb_ary_new       2582 parse.y        		ruby_debug_lines = rb_ary_new();
rb_ary_new        805 process.c          result = rb_ary_new();
rb_ary_new       2432 process.c          ary = rb_ary_new();
rb_ary_new       1262 re.c           	VALUE result = rb_ary_new();
rb_ary_new        190 ruby.c         	VALUE ary = rb_ary_new();
rb_ary_new       1144 ruby.c             rb_argv = rb_ary_new();
rb_ary_new       3512 string.c           result = rb_ary_new();
rb_ary_new       4255 string.c       	VALUE ary = rb_ary_new();
rb_ary_new        252 struct.c           ary = rb_ary_new();
rb_ary_new        761 struct.c           result = rb_ary_new();
rb_ary_new        648 variable.c     	VALUE ary = rb_ary_new();
rb_ary_new        780 variable.c         VALUE ary = rb_ary_new();
rb_ary_new       1120 variable.c         ary = rb_ary_new();
rb_ary_new       1879 variable.c         VALUE ary = rb_ary_new();


rb_ary_new2

rb_ary_new2       144 array.c            return rb_ary_new2(ARY_DEFAULT_SIZE);
rb_ary_new2       168 array.c            ary = rb_ary_new2(n);
rb_ary_new2       187 array.c            ary = rb_ary_new2(n);
rb_ary_new2       202 array.c            ary = rb_ary_new2(2);
rb_ary_new2       747 array.c        	result = rb_ary_new2(n);
rb_ary_new2       783 array.c        	result = rb_ary_new2(n);
rb_ary_new2       917 array.c            new_ary = rb_ary_new2(argc);
rb_ary_new2      1228 array.c            VALUE dup = rb_ary_new2(RARRAY(ary)->len);
rb_ary_new2      1471 array.c        	VALUE dup = rb_ary_new2(RARRAY(ary)->len);
rb_ary_new2      1700 array.c            collect = rb_ary_new2(RARRAY(ary)->len);
rb_ary_new2      1742 array.c            VALUE result = rb_ary_new2(argc);
rb_ary_new2      1811 array.c            result = rb_ary_new2(RARRAY(ary)->len);
rb_ary_new2      2076 array.c        	    VALUE tmp = rb_ary_new2(argc+1);
rb_ary_new2      2087 array.c            result = rb_ary_new2(len);
rb_ary_new2      2089 array.c        	VALUE tmp = rb_ary_new2(argc+1);
rb_ary_new2      2124 array.c        	    result = rb_ary_new2(elen);
rb_ary_new2      2126 array.c        		rb_ary_store(result, j, rb_ary_new2(alen));
rb_ary_new2      2307 array.c            z = rb_ary_new2(len);
rb_ary_new2      2674 array.c            ary3 = rb_ary_new2(RARRAY(ary1)->len < RARRAY(ary2)->len ?
rb_ary_new2      2708 array.c            ary3 = rb_ary_new2(RARRAY(ary1)->len+RARRAY(ary2)->len);
rb_ary_new2       480 enum.c         	ary  = rb_ary_new2(RARRAY(obj)->len);
rb_ary_new2       828 enum.c             tmp = rb_ary_new2(RARRAY(args)->len + 1);
rb_ary_new2      2689 eval.c             if (v == Qundef) return rb_ary_new2(0);
rb_ary_new2      2711 eval.c             if (v == Qundef) return rb_ary_new2(0);
rb_ary_new2      3720 eval.c         	    ary = rb_ary_new2(i);
rb_ary_new2      4997 eval.c             ary = rb_ary_new2(n);
rb_ary_new2      5072 eval.c         	    assign(self, node->nd_args, rb_ary_new2(0), pcall);
rb_ary_new2      5817 eval.c         				v = rb_ary_new2(0);
rb_ary_new2      7652 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       249 ext/dbm/dbm.c      new = rb_ary_new2(argc);
rb_ary_new2       263 ext/dbm/dbm.c      VALUE new = rb_ary_new2(argc);
rb_ary_new2       304 ext/dbm/dbm.c      VALUE new = rb_ary_new2(argc);
rb_ary_new2        81 ext/enumerator/enumerator.c 	memo->u1.value = rb_ary_new2(size);
rb_ary_new2       112 ext/enumerator/enumerator.c     memo = rb_node_newnode(NODE_MEMO, rb_ary_new2(size), 0, size);
rb_ary_new2       182 ext/enumerator/enumerator.c     memo = rb_node_newnode(NODE_MEMO, rb_ary_new2(size), 0, size);
rb_ary_new2       345 ext/gdbm/gdbm.c     new = rb_ary_new2(argc);
rb_ary_new2       359 ext/gdbm/gdbm.c     VALUE new = rb_ary_new2(argc);
rb_ary_new2       399 ext/gdbm/gdbm.c     VALUE new = rb_ary_new2(argc);
rb_ary_new2       645 ext/iconv/iconv.c     arg.ret = rb_ary_new2(argc);
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       415 ext/openssl/ossl_ssl.c     ary = rb_ary_new2(4);
rb_ary_new2       445 ext/openssl/ossl_ssl.c     ary = rb_ary_new2(num);
rb_ary_new2       795 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       226 ext/sdbm/init.c     new = rb_ary_new2(argc);
rb_ary_new2       240 ext/sdbm/init.c     VALUE new = rb_ary_new2(argc);
rb_ary_new2       281 ext/sdbm/init.c     VALUE new = rb_ary_new2(argc);
rb_ary_new2      1248 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      1297 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       338 ext/zlib/zlib.c     dst = rb_ary_new2(256);
rb_ary_new2       629 hash.c             indexes = rb_ary_new2(argc);
rb_ary_new2      2276 hash.c             VALUE indexes = rb_ary_new2(argc);
rb_ary_new2        27 intern.h       VALUE rb_ary_new2 _((long));
rb_ary_new2      4635 io.c               res = rb_ary_new2(3);
rb_ary_new2      4636 io.c               rb_ary_push(res, rp?rb_ary_new():rb_ary_new2(0));
rb_ary_new2      4637 io.c               rb_ary_push(res, wp?rb_ary_new():rb_ary_new2(0));
rb_ary_new2      4638 io.c               rb_ary_push(res, ep?rb_ary_new():rb_ary_new2(0));
rb_ary_new2      1030 marshal.c                  if (NIL_P(extmod)) extmod = rb_ary_new2(0);
rb_ary_new2      1167 marshal.c      	    v = rb_ary_new2(len);
rb_ary_new2      1207 marshal.c      	    values = rb_ary_new2(len);
rb_ary_new2       838 object.c           return rb_ary_new2(0);
rb_ary_new2      10132 parse.c            VALUE ary = rb_ary_new2(sym_tbl->num_entries);
rb_ary_new2      6134 parse.y            VALUE ary = rb_ary_new2(sym_tbl->num_entries);
rb_ary_new2      1098 re.c               VALUE ary = rb_ary_new2(regs->num_regs);
rb_ary_new2      3484 string.c       		return rb_ary_new2(0);
rb_ary_new2      4203 string.c       	result = rb_ary_new2(regs->num_regs);
rb_ary_new2        70 struct.c           ary = rb_ary_new2(RARRAY(members)->len);
rb_ary_new2      1555 variable.c         if (!tbl) return rb_ary_new2(0);
rb_ary_new2      1556 variable.c         ary = rb_ary_new2(tbl->num_entries);


rb_ary_new3

rb_ary_new3       935 array.c            return rb_ary_new3(1, obj);
rb_ary_new3       507 error.c        	if (t == T_STRING) return rb_ary_new3(1, bt);
rb_ary_new3      2639 eval.c         	proc_invoke(trace_func, rb_ary_new3(6, rb_str_new2(event_name),
rb_ary_new3      2692 eval.c         	return rb_ary_new3(1, v);
rb_ary_new3      2699 eval.c         	return rb_ary_new3(1, v);
rb_ary_new3      2714 eval.c         	return rb_ary_new3(1, v);
rb_ary_new3      2718 eval.c         	return rb_ary_new3(1, v);
rb_ary_new3      2757 eval.c         	    return rb_ary_new3(1, val);
rb_ary_new3      2768 eval.c             if (NIL_P(v)) return rb_ary_new3(1, Qnil);
rb_ary_new3      9807 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       836 ext/dl/ptr.c       ptr = rb_ary2cary(t, rb_ary_new3(1, val), size);
rb_ary_new3       183 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       857 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      6037 ext/win32ole/win32ole.c     data = rb_ary_new3(4, rb_block_proc(), event, args, is_ary_arg);
rb_ary_new3      1744 gc.c               block = rb_ary_new3(2, INT2FIX(ruby_safe_level), block);
rb_ary_new3      1753 gc.c           	st_add_direct(finalizer_table, obj, rb_ary_new3(1, block));
rb_ary_new3      1794 gc.c           	if (!args[1]) args[1] = rb_ary_new3(1, objid);
rb_ary_new3      1801 gc.c           	    if (!args[1]) args[1] = rb_ary_new3(1, objid);
rb_ary_new3        28 intern.h       VALUE rb_ary_new3 __((long,...));
rb_ary_new3       339 object.c           return rb_ary_new3(1, obj);
rb_ary_new3      2467 object.c       	    return rb_ary_new3(1, val);
rb_ary_new3       469 signal.c       	rb_eval_cmd(trap_exit, rb_ary_new3(1, INT2FIX(0)), trap_list[0].safe);
rb_ary_new3      3485 string.c       	    return rb_ary_new3(1, str);
rb_ary_new3      1730 time.c             return rb_ary_new3(10,
rb_ary_new3       541 variable.c         rb_eval_cmd(cmd, rb_ary_new3(1, val), 0);
rb_ary_new3       665 variable.c     		return rb_ary_new3(1, cmd);


rb_ary_new4

rb_ary_new4      1102 array.c            rb_ary_splice(ary, pos, 0, rb_ary_new4(argc - 1, argv + 1));
rb_ary_new4      1697 array.c        	return rb_ary_new4(RARRAY(ary)->len, RARRAY(ary)->ptr);
rb_ary_new4       999 class.c        	    if (var) *var = rb_ary_new4(argc-i, argv+i);
rb_ary_new4       880 enum.c             memo[1] = rb_ary_new4(argc, argv);
rb_ary_new4      5069 eval.c         	    assign(self, node->nd_args, rb_ary_new4(len-i, RARRAY(val)->ptr+i), pcall);
rb_ary_new4      5498 eval.c         	    args[n++] = rb_ary_new4(argc-1, argv+1);
rb_ary_new4      5550 eval.c         	return (*func)(recv, rb_ary_new4(argc, argv));
rb_ary_new4      5716 eval.c         	result = proc_invoke(body->nd_cval, rb_ary_new4(argc, argv), recv, klass);
rb_ary_new4      5815 eval.c         				v = rb_ary_new4(argc,argv);
rb_ary_new4      12503 eval.c         	th->result = rb_ary_new4(argc, argv);
rb_ary_new4       328 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        29 intern.h       VALUE rb_ary_new4 _((long, const VALUE *));
rb_ary_new4      1435 process.c          cmd = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" "));
rb_ary_new4      1486 process.c          cmd = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" "));
rb_ary_new4       547 struct.c           return rb_ary_new4(RSTRUCT(s)->len, RSTRUCT(s)->ptr);


rb_ary_plus

rb_ary_plus      3038 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        50 intern.h       VALUE rb_ary_plus _((VALUE, VALUE));


rb_ary_pop

rb_ary_pop       1384 array.c        	rb_ary_pop(inspect_tbl);
rb_ary_pop       2888 array.c            rb_ary_pop(memo);
rb_ary_pop       2994 array.c            rb_define_method(rb_cArray, "pop", rb_ary_pop, 0);
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       1105 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         37 intern.h       VALUE rb_ary_pop _((VALUE));
rb_ary_pop       1035 marshal.c                      m = rb_ary_pop(extmod);
rb_ary_pop       1254 marshal.c                          VALUE m = rb_ary_pop(extmod);
rb_ary_pop       3594 string.c       	    rb_ary_pop(result);


rb_ary_push

rb_ary_push       427 array.c        	rb_ary_push(ary, *argv++);
rb_ary_push       749 array.c        	    rb_ary_push(result, RARRAY(ary)->ptr[i]);
rb_ary_push       785 array.c        	    rb_ary_push(result, RARRAY(ary)->ptr[i]);
rb_ary_push       919 array.c        	rb_ary_push(new_ary, rb_ary_aref(1, argv+i, ary));
rb_ary_push      1403 array.c            rb_ary_push(inspect_tbl, id);
rb_ary_push      1702 array.c        	rb_ary_push(collect, rb_yield(RARRAY(ary)->ptr[i]));
rb_ary_push      1747 array.c        	    rb_ary_push(result, (*func)(obj, FIX2LONG(argv[i])));
rb_ary_push      1758 array.c        		rb_ary_push(result, (*func)(obj, j+beg));
rb_ary_push      1762 array.c        	rb_ary_push(result, (*func)(obj, NUM2LONG(argv[i])));
rb_ary_push      1814 array.c        	    rb_ary_push(result, rb_ary_elt(ary, i));
rb_ary_push      2078 array.c        	    rb_ary_push(tmp, rb_ary_elt(ary, i));
rb_ary_push      2080 array.c        		rb_ary_push(tmp, rb_ary_elt(argv[j], i));
rb_ary_push      2091 array.c        	rb_ary_push(tmp, rb_ary_elt(ary, i));
rb_ary_push      2093 array.c        	    rb_ary_push(tmp, rb_ary_elt(argv[j], i));
rb_ary_push      2095 array.c        	rb_ary_push(result, tmp);
rb_ary_push      2650 array.c        	rb_ary_push(ary3, rb_ary_elt(ary1, i));
rb_ary_push      2681 array.c        	    rb_ary_push(ary3, v);
rb_ary_push      2714 array.c        	    rb_ary_push(ary3, v);
rb_ary_push      2720 array.c        	    rb_ary_push(ary3, v);
rb_ary_push      2876 array.c            rb_ary_push(memo, id);
rb_ary_push      2992 array.c            rb_define_method(rb_cArray, "<<", rb_ary_push, 1);
rb_ary_push       446 class.c        	    rb_ary_push(ary, RBASIC(p)->klass);
rb_ary_push       513 class.c        	    rb_ary_push(ary, RBASIC(p)->klass);
rb_ary_push       516 class.c        	    rb_ary_push(ary, p);
rb_ary_push       544 class.c        	rb_ary_push(ary, rb_str_new2(rb_id2name(name)));
rb_ary_push      1158 dir.c              rb_ary_push(ary, rb_tainted_str_new2(path));
rb_ary_push        32 enum.c         	rb_ary_push(arg[1], i);
rb_ary_push        42 enum.c         	rb_ary_push(arg[1], rb_yield(i));
rb_ary_push       132 enum.c         	rb_ary_push(ary, i);
rb_ary_push       166 enum.c         	rb_ary_push(ary, i);
rb_ary_push       197 enum.c             rb_ary_push(ary, rb_yield(i));
rb_ary_push       206 enum.c             rb_ary_push(ary, i);
rb_ary_push       320 enum.c         	rb_ary_push(ary[0], i);
rb_ary_push       323 enum.c         	rb_ary_push(ary[1], i);
rb_ary_push       389 enum.c             rb_ary_push(ary, (VALUE)memo);
rb_ary_push       831 enum.c         	rb_ary_push(tmp, rb_ary_entry(RARRAY(args)->ptr[i], idx));
rb_ary_push       837 enum.c         	rb_ary_push(result, tmp);
rb_ary_push      1889 eval.c         	if (!NIL_P(cbase->nd_clss)) rb_ary_push(ary, cbase->nd_clss);
rb_ary_push      1893 eval.c         	rb_ary_push(ary, ruby_wrapper);
rb_ary_push      3338 eval.c         	    result = rb_ary_push(args, rb_eval(self, node->nd_body));
rb_ary_push      5000 eval.c         	rb_ary_push(ary, va_arg(args, VALUE));
rb_ary_push      5177 eval.c         		rb_ary_push(args, val);
rb_ary_push      6120 eval.c         	rb_ary_push(ary, rb_str_new2(buf));
rb_ary_push      6142 eval.c         	rb_ary_push(ary, rb_str_new2(buf));
rb_ary_push      6867 eval.c             rb_ary_push(rb_features, feature);
rb_ary_push      7045 eval.c         		    rb_ary_push(ruby_dln_librefs, LONG2NUM(handle));
rb_ary_push      7574 eval.c         	    rb_ary_push(ary, rb_str_new2(rb_id2name(tbl[i])));
rb_ary_push      7581 eval.c         	    rb_ary_push(ary, rb_str_new2(rb_id2name(vars->id)));
rb_ary_push      10981 eval.c         	    rb_ary_push(ary, th->thread);
rb_ary_push      12294 eval.c             rb_ary_push(ary, ID2SYM(key));
rb_ary_push      12568 eval.c         	    rb_ary_push(ary, th->thread);
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       251 ext/dbm/dbm.c  	rb_ary_push(new, fdbm_fetch(obj, argv[i], Qnil));
rb_ary_push       282 ext/dbm/dbm.c  		rb_ary_push(new, assoc);
rb_ary_push       291 ext/dbm/dbm.c              rb_ary_push(new, fdbm_fetch(obj, argv[i], Qnil));
rb_ary_push       308 ext/dbm/dbm.c          rb_ary_push(new, fdbm_fetch(obj, argv[i], Qnil));
rb_ary_push       401 ext/dbm/dbm.c  	if (RTEST(ret)) rb_ary_push(ary, keystr);
rb_ary_push       644 ext/dbm/dbm.c  	rb_ary_push(ary, rb_tainted_str_new(key.dptr, key.dsize));
rb_ary_push       663 ext/dbm/dbm.c  	rb_ary_push(ary, rb_tainted_str_new(val.dptr, val.dsize));
rb_ary_push       722 ext/dbm/dbm.c  	rb_ary_push(ary, rb_assoc_new(rb_tainted_str_new(key.dptr, key.dsize),
rb_ary_push       362 ext/dl/ptr.c         rb_ary_push(ary, INT2NUM(((char*)(data->ptr))[i]));
rb_ary_push       365 ext/dl/ptr.c         rb_ary_push(ary, INT2NUM(((short*)(data->ptr))[i]));
rb_ary_push       368 ext/dl/ptr.c         rb_ary_push(ary, INT2NUM(((int*)(data->ptr))[i]));
rb_ary_push       371 ext/dl/ptr.c         rb_ary_push(ary, DLLONG2NUM(((long*)(data->ptr))[i]));
rb_ary_push       374 ext/dl/ptr.c         rb_ary_push(ary, rb_float_new(((double*)(data->ptr))[i]));
rb_ary_push       377 ext/dl/ptr.c         rb_ary_push(ary, rb_float_new(((float*)(data->ptr))[i]));
rb_ary_push       383 ext/dl/ptr.c   	  rb_ary_push(ary, rb_tainted_str_new2(str));
rb_ary_push       386 ext/dl/ptr.c   	  rb_ary_push(ary, Qnil);
rb_ary_push       394 ext/dl/ptr.c   	  rb_ary_push(ary, rb_tainted_str_new2(str));
rb_ary_push       398 ext/dl/ptr.c   	  rb_ary_push(ary, Qnil);
rb_ary_push       403 ext/dl/ptr.c         rb_ary_push(ary, rb_dlptr_new(((void**)(data->ptr))[i],0,0));
rb_ary_push       406 ext/dl/ptr.c         rb_ary_push(ary,
rb_ary_push       721 ext/dl/ptr.c       rb_ary_push(ary, elem);
rb_ary_push       896 ext/dl/sym.c   	rb_ary_push(dvals, CHR2FIX(*((char*)(ANY2P(args[i])))));
rb_ary_push       899 ext/dl/sym.c   	rb_ary_push(dvals, INT2NUM(*((short*)(ANY2P(args[i])))));
rb_ary_push       902 ext/dl/sym.c   	rb_ary_push(dvals, INT2NUM(*((int*)(ANY2P(args[i])))));
rb_ary_push       905 ext/dl/sym.c           rb_ary_push(dvals, DLLONG2NUM(*((long*)(ANY2P(args[i])))));
rb_ary_push       908 ext/dl/sym.c   	rb_ary_push(dvals, rb_float_new(*((float*)(ANY2P(args[i])))));
rb_ary_push       911 ext/dl/sym.c   	rb_ary_push(dvals, rb_float_new(*((double*)(ANY2P(args[i])))));
rb_ary_push       914 ext/dl/sym.c   	rb_ary_push(dvals, rb_dlptr_new((void*)(ANY2P(args[i])), 0, 0));
rb_ary_push       917 ext/dl/sym.c   	rb_ary_push(dvals, rb_dlptr_new((void*)ANY2P(args[i]), 0, 0));
rb_ary_push       920 ext/dl/sym.c   	rb_ary_push(dvals, rb_tainted_str_new2((char*)ANY2S(args[i])));
rb_ary_push       940 ext/dl/sym.c         rb_ary_push(dvals, argv[i]);
rb_ary_push        77 ext/enumerator/enumerator.c     rb_ary_push(ary, val);
rb_ary_push       147 ext/enumerator/enumerator.c     rb_ary_push(ary, val);
rb_ary_push       308 ext/etc/etc.c  	rb_ary_push(mem, safe_setup_str(*tbl));
rb_ary_push       347 ext/gdbm/gdbm.c 	rb_ary_push(new, rb_gdbm_fetch3(obj, argv[i]));
rb_ary_push       377 ext/gdbm/gdbm.c 		rb_ary_push(new, assoc);
rb_ary_push       386 ext/gdbm/gdbm.c             rb_ary_push(new, rb_gdbm_fetch3(obj, argv[i]));
rb_ary_push       403 ext/gdbm/gdbm.c         rb_ary_push(new, rb_gdbm_fetch3(obj, argv[i]));
rb_ary_push       495 ext/gdbm/gdbm.c 	if (RTEST(ret)) rb_ary_push(ary, keystr);
rb_ary_push       746 ext/gdbm/gdbm.c         rb_ary_push(ary, keystr);
rb_ary_push       767 ext/gdbm/gdbm.c 	rb_ary_push(ary, valstr);
rb_ary_push       829 ext/gdbm/gdbm.c         rb_ary_push(ary, rb_assoc_new(keystr, rb_gdbm_fetch2(dbm, keystr)));
rb_ary_push       644 ext/iconv/iconv.c     arg.append = rb_ary_push;
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       416 ext/openssl/ossl_ssl.c     rb_ary_push(ary, rb_str_new2(SSL_CIPHER_get_name(cipher)));
rb_ary_push       417 ext/openssl/ossl_ssl.c     rb_ary_push(ary, rb_str_new2(SSL_CIPHER_get_version(cipher)));
rb_ary_push       419 ext/openssl/ossl_ssl.c     rb_ary_push(ary, INT2FIX(bits));
rb_ary_push       420 ext/openssl/ossl_ssl.c     rb_ary_push(ary, INT2FIX(alg_bits));
rb_ary_push       448 ext/openssl/ossl_ssl.c         rb_ary_push(ary, ossl_ssl_cipher_to_ary(cipher));
rb_ary_push       798 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       685 ext/readline/readline.c 	    rb_ary_push(result, rb_tainted_str_new2(matches[i]));
rb_ary_push       712 ext/readline/readline.c 	    rb_ary_push(result, rb_tainted_str_new2(matches[i]));
rb_ary_push       228 ext/sdbm/init.c 	rb_ary_push(new, fsdbm_fetch(obj, argv[i], Qnil));
rb_ary_push       259 ext/sdbm/init.c 		rb_ary_push(new, assoc);
rb_ary_push       268 ext/sdbm/init.c             rb_ary_push(new, fsdbm_fetch(obj, argv[i], Qnil));
rb_ary_push       285 ext/sdbm/init.c         rb_ary_push(new, fsdbm_fetch(obj, argv[i], Qnil));
rb_ary_push       380 ext/sdbm/init.c 	if (RTEST(ret)) rb_ary_push(ary, keystr);
rb_ary_push       626 ext/sdbm/init.c 	rb_ary_push(ary, rb_tainted_str_new(key.dptr, key.dsize));
rb_ary_push       645 ext/sdbm/init.c 	rb_ary_push(ary, rb_tainted_str_new(val.dptr, val.dsize));
rb_ary_push       704 ext/sdbm/init.c 	rb_ary_push(ary, rb_assoc_new(rb_tainted_str_new(key.dptr, key.dsize),
rb_ary_push      1237 ext/socket/socket.c     rb_ary_push(ary, rb_str_new2(hostp));
rb_ary_push      1243 ext/socket/socket.c 		rb_ary_push(names, rb_str_new2(*pch));
rb_ary_push      1250 ext/socket/socket.c     rb_ary_push(ary, names);
rb_ary_push      1251 ext/socket/socket.c     rb_ary_push(ary, INT2NUM(addr->ai_family));
rb_ary_push      1253 ext/socket/socket.c 	rb_ary_push(ary, (*ipaddr)(ai->ai_addr, ai->ai_addrlen));
rb_ary_push      2696 ext/socket/socket.c 	rb_ary_push(ary, INT2FIX(res->ai_family));
rb_ary_push      2697 ext/socket/socket.c 	rb_ary_push(ary, INT2FIX(res->ai_socktype));
rb_ary_push      2698 ext/socket/socket.c 	rb_ary_push(ary, INT2FIX(res->ai_protocol));
rb_ary_push      2699 ext/socket/socket.c 	rb_ary_push(base, ary);
rb_ary_push      2769 ext/socket/socket.c     rb_ary_push(ary, rb_str_new2(h->h_name));
rb_ary_push      2771 ext/socket/socket.c     rb_ary_push(ary, names);
rb_ary_push      2774 ext/socket/socket.c 	    rb_ary_push(names, rb_str_new2(*pch));
rb_ary_push      2777 ext/socket/socket.c     rb_ary_push(ary, INT2NUM(h->h_addrtype));
rb_ary_push      2780 ext/socket/socket.c 	rb_ary_push(ary, rb_str_new(*pch, h->h_length));
rb_ary_push      2783 ext/socket/socket.c     rb_ary_push(ary, rb_str_new(h->h_addr, h->h_length));
rb_ary_push       980 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      1575 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       951 ext/win32ole/win32ole.c                 rb_ary_push(val2, val);
rb_ary_push       960 ext/win32ole/win32ole.c                         rb_ary_push(obj, val2);
rb_ary_push      1655 ext/win32ole/win32ole.c         rb_ary_push(classes, type);
rb_ary_push      1956 ext/win32ole/win32ole.c         rb_ary_push(argv, ole_variant2val(&realargs[end]));
rb_ary_push      2795 ext/win32ole/win32ole.c             rb_ary_push(methods, method);
rb_ary_push      3067 ext/win32ole/win32ole.c         rb_ary_push(typedetails, type);
rb_ary_push      3102 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("I2"));
rb_ary_push      3106 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("I4"));
rb_ary_push      3110 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("R4"));
rb_ary_push      3114 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("R8"));
rb_ary_push      3118 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("CY"));
rb_ary_push      3122 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("DATE"));
rb_ary_push      3126 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("BSTR"));
rb_ary_push      3130 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("BOOL"));
rb_ary_push      3134 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("VARIANT"));
rb_ary_push      3138 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("DECIMAL"));
rb_ary_push      3142 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("I1"));
rb_ary_push      3146 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("UI1"));
rb_ary_push      3150 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("UI2"));
rb_ary_push      3154 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("UI4"));
rb_ary_push      3158 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("I8"));
rb_ary_push      3162 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("UI8"));
rb_ary_push      3166 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("INT"));
rb_ary_push      3170 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("UINT"));
rb_ary_push      3174 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("VOID"));
rb_ary_push      3178 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("HRESULT"));
rb_ary_push      3182 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("PTR"));
rb_ary_push      3186 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("SAFEARRAY"));
rb_ary_push      3190 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("CARRAY"));
rb_ary_push      3194 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("USERDEFINED"));
rb_ary_push      3204 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("DISPATCH"));
rb_ary_push      3325 ext/win32ole/win32ole.c                 rb_ary_push(typelibs, v);
rb_ary_push      3363 ext/win32ole/win32ole.c             rb_ary_push(progids, v);
rb_ary_push      3365 ext/win32ole/win32ole.c             rb_ary_push(progids, v);
rb_ary_push      3930 ext/win32ole/win32ole.c         rb_ary_push(variables, var);
rb_ary_push      5030 ext/win32ole/win32ole.c             rb_ary_push(params, param);
rb_ary_push      5593 ext/win32ole/win32ole.c         rb_ary_push(args, ev);
rb_ary_push      5599 ext/win32ole/win32ole.c         rb_ary_push(args, ole_variant2val(pvar));
rb_ary_push      5605 ext/win32ole/win32ole.c         rb_ary_push(args, argv);
rb_ary_push      5987 ext/win32ole/win32ole.c     rb_ary_push(ary_ole_event, self);
rb_ary_push      6022 ext/win32ole/win32ole.c     rb_ary_push(events, data);
rb_ary_push       341 ext/zlib/zlib.c 	rb_ary_push(dst, rb_uint2inum(crctbl[i]));
rb_ary_push      3219 ext/zlib/zlib.c 	rb_ary_push(dst, str);
rb_ary_push      4255 file.c         		rb_ary_push(tmp, str);
rb_ary_push      1658 gc.c               rb_ary_push(finalizers, block);
rb_ary_push      1750 gc.c           	rb_ary_push(table, block);
rb_ary_push       802 hash.c         	rb_ary_push(result, rb_assoc_new(key, value));
rb_ary_push       827 hash.c         	rb_ary_push(result, rb_hash_aref(hash, argv[i]));
rb_ary_push      1146 hash.c             rb_ary_push(ary, rb_assoc_new(key, value));
rb_ary_push      1297 hash.c             rb_ary_push(ary, key);
rb_ary_push      1330 hash.c             rb_ary_push(ary, value);
rb_ary_push      1932 hash.c         	    rb_ary_push(ary, env_str_new(*env, s-*env));
rb_ary_push      1963 hash.c         	    rb_ary_push(ary, env_str_new2(s+1));
rb_ary_push      1997 hash.c         	    rb_ary_push(ary, env_str_new(*env, s-*env));
rb_ary_push      1998 hash.c         	    rb_ary_push(ary, env_str_new2(s+1));
rb_ary_push      2069 hash.c         	rb_ary_push(result, rb_f_getenv(Qnil, argv[i]));
rb_ary_push      2093 hash.c         		rb_ary_push(result, rb_assoc_new(k, v));
rb_ary_push      2167 hash.c         	    rb_ary_push(ary, rb_assoc_new(env_str_new(*env, s-*env),
rb_ary_push        36 intern.h       VALUE rb_ary_push _((VALUE, VALUE));
rb_ary_push      1793 io.c           	rb_ary_push(ary, line);
rb_ary_push      4492 io.c           	rb_ary_push(ary, line);
rb_ary_push      4636 io.c               rb_ary_push(res, rp?rb_ary_new():rb_ary_new2(0));
rb_ary_push      4637 io.c               rb_ary_push(res, wp?rb_ary_new():rb_ary_new2(0));
rb_ary_push      4638 io.c               rb_ary_push(res, ep?rb_ary_new():rb_ary_new2(0));
rb_ary_push      4647 io.c           		    rb_ary_push(list, rb_ary_entry(read, i));
rb_ary_push      4657 io.c           		    rb_ary_push(list, rb_ary_entry(write, i));
rb_ary_push      4660 io.c           		    rb_ary_push(list, rb_ary_entry(write, i));
rb_ary_push      4670 io.c           		    rb_ary_push(list, rb_ary_entry(except, i));
rb_ary_push      4673 io.c           		    rb_ary_push(list, rb_ary_entry(except, i));
rb_ary_push      1031 marshal.c                  rb_ary_push(extmod, m);
rb_ary_push      1170 marshal.c      		rb_ary_push(v, r_object(arg));
rb_ary_push      1209 marshal.c      		rb_ary_push(values, Qnil);
rb_ary_push       940 pack.c         		rb_ary_push(associates, from);
rb_ary_push      1149 pack.c         #define PACK_ITEM_ADJUST() while (tmp--) rb_ary_push(ary, Qnil)
rb_ary_push      1380 pack.c         		rb_ary_push(ary, infected_str_new(s, len, str));
rb_ary_push      1391 pack.c         		rb_ary_push(ary, infected_str_new(s, t-s, str));
rb_ary_push      1399 pack.c         	    rb_ary_push(ary, infected_str_new(s, len, str));
rb_ary_push      1414 pack.c         		rb_ary_push(ary, bitstr = rb_str_new(0, len));
rb_ary_push      1434 pack.c         		rb_ary_push(ary, bitstr = rb_str_new(0, len));
rb_ary_push      1454 pack.c         		rb_ary_push(ary, bitstr = rb_str_new(0, len));
rb_ary_push      1476 pack.c         		rb_ary_push(ary, bitstr = rb_str_new(0, len));
rb_ary_push      1493 pack.c         		rb_ary_push(ary, INT2FIX(c));
rb_ary_push      1502 pack.c         		rb_ary_push(ary, INT2FIX(c));
rb_ary_push      1514 pack.c         		rb_ary_push(ary, INT2FIX(tmp));
rb_ary_push      1525 pack.c         		rb_ary_push(ary, INT2FIX(tmp));
rb_ary_push      1536 pack.c         		rb_ary_push(ary, INT2NUM(tmp));
rb_ary_push      1547 pack.c         		rb_ary_push(ary, UINT2NUM(tmp));
rb_ary_push      1559 pack.c         		rb_ary_push(ary, LONG2NUM(tmp));
rb_ary_push      1569 pack.c         		rb_ary_push(ary, ULONG2NUM(tmp));
rb_ary_push      1579 pack.c         		rb_ary_push(ary, rb_quad_unpack(tmp, 1));
rb_ary_push      1588 pack.c         		rb_ary_push(ary, rb_quad_unpack(tmp, 0));
rb_ary_push      1598 pack.c         		rb_ary_push(ary, UINT2NUM(ntohs(tmp)));
rb_ary_push      1609 pack.c         		rb_ary_push(ary, ULONG2NUM(ntohl(tmp)));
rb_ary_push      1620 pack.c         		rb_ary_push(ary, UINT2NUM(vtohs(tmp)));
rb_ary_push      1631 pack.c         		rb_ary_push(ary, ULONG2NUM(vtohl(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((double)tmp));
rb_ary_push      1671 pack.c         		rb_ary_push(ary, rb_float_new(tmp));
rb_ary_push      1683 pack.c         		rb_ary_push(ary, rb_float_new(tmp));
rb_ary_push      1697 pack.c         		rb_ary_push(ary, rb_float_new((double)tmp));
rb_ary_push      1711 pack.c         		rb_ary_push(ary, rb_float_new(tmp));
rb_ary_push      1724 pack.c         		rb_ary_push(ary, ULONG2NUM(l));
rb_ary_push      1780 pack.c         		rb_ary_push(ary, buf);
rb_ary_push      1824 pack.c         		rb_ary_push(ary, buf);
rb_ary_push      1851 pack.c         		rb_ary_push(ary, buf);
rb_ary_push      1906 pack.c         		rb_ary_push(ary, tmp);
rb_ary_push      1946 pack.c         		    rb_ary_push(ary, tmp);
rb_ary_push      1960 pack.c         			rb_ary_push(ary, ULONG2NUM(ul));
rb_ary_push      1971 pack.c         				rb_ary_push(ary, big);
rb_ary_push      6587 parse.c        		rb_ary_push(ruby_debug_lines, str);
rb_ary_push      6651 parse.c        	rb_ary_push(ruby_debug_lines, line);
rb_ary_push      10109 parse.c            rb_ary_push(ary, ID2SYM(value));
rb_ary_push      2589 parse.y        		rb_ary_push(ruby_debug_lines, str);
rb_ary_push      2653 parse.y        	rb_ary_push(ruby_debug_lines, line);
rb_ary_push      6111 parse.y            rb_ary_push(ary, ID2SYM(value));
rb_ary_push       657 process.c          rb_ary_push(ary, rb_assoc_new(INT2NUM(pid), rb_last_status));
rb_ary_push       823 process.c      	rb_ary_push(result, rb_assoc_new(INT2NUM(pid), rb_last_status));
rb_ary_push       834 process.c      	rb_ary_push(result, rb_assoc_new(INT2NUM(pid), rb_last_status));
rb_ary_push      2434 process.c      	rb_ary_push(ary, INT2NUM(groups[i]));
rb_ary_push      1105 re.c           	    rb_ary_push(ary, Qnil);
rb_ary_push      1110 re.c           	    rb_ary_push(ary, str);
rb_ary_push      1270 re.c           		rb_ary_push(result, str);
rb_ary_push       196 ruby.c         		rb_ary_push(ary, rubylib_mangled_path(p, (int)(s-p)));
rb_ary_push       200 ruby.c         		rb_ary_push(ary, rubylib_mangled_path2(p));
rb_ary_push       207 ruby.c         	rb_ary_push(rb_load_path, rubylib_mangled_path2(path));
rb_ary_push      1175 ruby.c         	rb_ary_push(rb_argv, arg);
rb_ary_push      3533 string.c       		    rb_ary_push(result, rb_str_substr(str, beg, end-beg));
rb_ary_push      3554 string.c       		    rb_ary_push(result, rb_str_new("", 0));
rb_ary_push      3558 string.c       		    rb_ary_push(result, rb_str_substr(str, beg, mbclen2(RSTRING(str)->ptr[beg],spat)));
rb_ary_push      3568 string.c       		rb_ary_push(result, rb_str_substr(str, beg, end-beg));
rb_ary_push      3579 string.c       		rb_ary_push(result, tmp);
rb_ary_push      3589 string.c       	rb_ary_push(result, tmp);
rb_ary_push      4205 string.c       	    rb_ary_push(result, rb_reg_nth_match(i, match));
rb_ary_push      4259 string.c       	    rb_ary_push(ary, result);
rb_ary_push        73 struct.c       	rb_ary_push(ary, rb_str_new2(rb_id2name(SYM2ID(*p))));
rb_ary_push       257 struct.c       	rb_ary_push(ary, ID2SYM(slot));
rb_ary_push       764 struct.c       	    rb_ary_push(result, RSTRUCT(s)->ptr[i]);
rb_ary_push       652 variable.c     	    rb_ary_push(ary, (VALUE)trace->data);
rb_ary_push       764 variable.c         rb_ary_push(ary, rb_str_new2(rb_id2name(key)));
rb_ary_push       788 variable.c     	    rb_ary_push(ary, rb_str_new2(buf));
rb_ary_push      1092 variable.c     	rb_ary_push(ary, rb_str_new2(rb_id2name(key)));
rb_ary_push      1544 variable.c         rb_ary_push(ary, rb_str_new2(rb_id2name(key)));
rb_ary_push      1852 variable.c     	    rb_ary_push(ary, kval);


rb_ary_rassoc

rb_ary_rassoc    3036 array.c            rb_define_method(rb_cArray, "rassoc", rb_ary_rassoc, 1);
rb_ary_rassoc      53 intern.h       VALUE rb_ary_rassoc _((VALUE, VALUE));


rb_ary_reject_bang

rb_ary_reject_bang 2016 array.c            rb_ary_reject_bang(ary);
rb_ary_reject_bang 2035 array.c            rb_ary_reject_bang(ary);
rb_ary_reject_bang 3023 array.c            rb_define_method(rb_cArray, "reject!", rb_ary_reject_bang, 0);


rb_ary_replace

rb_ary_replace    224 array.c        static VALUE rb_ary_replace _((VALUE, VALUE));
rb_ary_replace    284 array.c        	    rb_ary_replace(ary, val);
rb_ary_replace   1472 array.c        	rb_ary_replace(dup, ary);
rb_ary_replace   2973 array.c            rb_define_method(rb_cArray, "initialize_copy", rb_ary_replace, 1);
rb_ary_replace   3026 array.c            rb_define_method(rb_cArray, "replace", rb_ary_replace, 1);


rb_ary_reverse

rb_ary_reverse   1528 array.c            return rb_ary_reverse(ary);
rb_ary_reverse   1545 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     44 intern.h       VALUE rb_ary_reverse _((VALUE));


rb_ary_shift

rb_ary_shift     2995 array.c            rb_define_method(rb_cArray, "shift", rb_ary_shift, 0);
rb_ary_shift      145 ext/enumerator/enumerator.c 	rb_ary_shift(ary);
rb_ary_shift      690 ext/readline/readline.c 	    rb_ary_shift(result);
rb_ary_shift      717 ext/readline/readline.c 	    rb_ary_shift(result);
rb_ary_shift      366 ext/syck/rubyext.c                 obj = rb_ary_shift( arr );
rb_ary_shift     1173 ext/syck/rubyext.c                 VALUE scheme = rb_ary_shift( parts );
rb_ary_shift     1181 ext/syck/rubyext.c                     VALUE domain = rb_ary_shift( parts );
rb_ary_shift       38 intern.h       VALUE rb_ary_shift _((VALUE));
rb_ary_shift     4235 io.c           	    filename = rb_ary_shift(rb_argv);
rb_ary_shift      425 ruby.c         	    rb_ary_shift(rb_argv);


rb_ary_sort

rb_ary_sort      3011 array.c            rb_define_method(rb_cArray, "sort", rb_ary_sort, 0);
rb_ary_sort       374 enum.c             return rb_ary_sort(enum_to_a(obj));
rb_ary_sort        45 intern.h       VALUE rb_ary_sort _((VALUE));


rb_ary_sort_bang

rb_ary_sort_bang 1671 array.c            rb_ary_sort_bang(ary);
rb_ary_sort_bang 3012 array.c            rb_define_method(rb_cArray, "sort!", rb_ary_sort_bang, 0);
rb_ary_sort_bang 1194 hash.c             rb_ary_sort_bang(entries);
rb_ary_sort_bang   46 intern.h       VALUE rb_ary_sort_bang _((VALUE));


rb_ary_splice

rb_ary_splice    1046 array.c        	rb_ary_splice(ary, NUM2LONG(argv[0]), NUM2LONG(argv[1]), argv[2]);
rb_ary_splice    1061 array.c        	rb_ary_splice(ary, beg, len, argv[1]);
rb_ary_splice    1102 array.c            rb_ary_splice(ary, pos, 0, rb_ary_new4(argc - 1, argv + 1));
rb_ary_splice    1960 array.c        	rb_ary_splice(ary, pos, len, Qnil);	/* Qnil/rb_ary_new2(0) */
rb_ary_splice    2330 array.c        	rb_ary_splice(x, RARRAY(x)->len, 0, y);
rb_ary_splice    2877 array.c            rb_ary_splice(ary, idx, 1, ary2);


rb_ary_store

rb_ary_store      308 array.c        	    rb_ary_store(ary, i, rb_yield(LONG2NUM(i)));
rb_ary_store      403 array.c            rb_ary_store(ary, RARRAY(ary)->len, item);
rb_ary_store      555 array.c            rb_ary_store(ary, len + argc - 1, Qnil);
rb_ary_store     1067 array.c            rb_ary_store(ary, offset, argv[1]);
rb_ary_store     1729 array.c        	rb_ary_store(ary, i, rb_yield(RARRAY(ary)->ptr[i]));
rb_ary_store     1849 array.c        	    rb_ary_store(ary, i2, e);
rb_ary_store     1992 array.c        	    rb_ary_store(ary, i2, v);
rb_ary_store     2126 array.c        		rb_ary_store(result, j, rb_ary_new2(alen));
rb_ary_store     2134 array.c        	    rb_ary_store(rb_ary_elt(result, j), i, rb_ary_elt(tmp, j));
rb_ary_store     2755 array.c        	    rb_ary_store(ary, j++, v);
rb_ary_store      829 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     1300 ext/syck/rubyext.c                 rb_ary_store( v, i, syck_seq_read( n, i ) );
rb_ary_store       32 intern.h       void rb_ary_store _((VALUE, long, VALUE));


rb_ary_subseq

rb_ary_subseq     668 array.c        	return rb_ary_subseq(ary, beg, len);
rb_ary_subseq     688 array.c        	return rb_ary_subseq(ary, beg, len);
rb_ary_subseq    1959 array.c        	arg2 = rb_ary_subseq(ary, pos, len);


rb_ary_to_ary

rb_ary_to_ary     962 array.c        	rpl = rb_ary_to_ary(rpl);
rb_ary_to_ary    2192 eval.c         	    args = rb_ary_to_ary(args);\
rb_ary_to_ary    2962 eval.c         		    if (TYPE(v) != T_ARRAY) v = rb_ary_to_ary(v);
rb_ary_to_ary    3003 eval.c         			if (TYPE(v) != T_ARRAY) v = rb_ary_to_ary(v);
rb_ary_to_ary    3168 eval.c         	result = rb_ary_to_ary(rb_eval(self, node->nd_head));
rb_ary_to_ary      34 intern.h       VALUE rb_ary_to_ary _((VALUE));


rb_ary_to_s

rb_ary_to_s      2975 array.c            rb_define_method(rb_cArray, "to_s", rb_ary_to_s, 0);
rb_ary_to_s      1254 hash.c             return rb_ary_to_s(rb_hash_to_a(hash));
rb_ary_to_s        35 intern.h       VALUE rb_ary_to_s _((VALUE));


rb_ary_uniq_bang

rb_ary_uniq_bang 2778 array.c            rb_ary_uniq_bang(ary);
rb_ary_uniq_bang 3046 array.c            rb_define_method(rb_cArray, "uniq!", rb_ary_uniq_bang, 0);


rb_ary_unshift

rb_ary_unshift   10850 eval.c         	    rb_ary_unshift(errat, rb_ary_entry(oldbt, 0));
rb_ary_unshift     50 ext/enumerator/enumerator.c     rb_ary_unshift(enum_args, obj);
rb_ary_unshift   1105 ext/syck/rubyext.c                 rb_ary_unshift( subclass_parts, rb_ary_pop( parts ) );
rb_ary_unshift     39 intern.h       VALUE rb_ary_unshift _((VALUE, VALUE));
rb_ary_unshift    319 struct.c       	    rb_ary_unshift(rest, ID2SYM(id));


rb_assoc_new

rb_assoc_new     1532 bignum.c           return rb_assoc_new(bignorm(div), bignorm(mod));
rb_assoc_new     1971 bignum.c       	return rb_assoc_new(rb_int2big(FIX2LONG(y)), x);
rb_assoc_new     1974 bignum.c              return rb_assoc_new(y, x);
rb_assoc_new      350 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      278 ext/dbm/dbm.c              assoc = rb_assoc_new(rb_tainted_str_new(key.dptr, key.dsize),
rb_assoc_new      376 ext/dbm/dbm.c      return rb_assoc_new(keystr, valstr);
rb_assoc_new      399 ext/dbm/dbm.c          ret = rb_protect(rb_yield, rb_assoc_new(rb_str_dup(keystr), valstr), &status);
rb_assoc_new      624 ext/dbm/dbm.c  	rb_yield(rb_assoc_new(keystr, valstr));
rb_assoc_new      722 ext/dbm/dbm.c  	rb_ary_push(ary, rb_assoc_new(rb_tainted_str_new(key.dptr, key.dsize),
rb_assoc_new      643 ext/dl/dl.c        if (rb_hash_aref(DLFuncTable, rb_assoc_new(INT2NUM(rettype), INT2NUM(i))) == Qnil) {
rb_assoc_new      653 ext/dl/dl.c    	       rb_assoc_new(INT2NUM(rettype),INT2NUM(entry)),
rb_assoc_new      654 ext/dl/dl.c    	       rb_assoc_new(type,proc));
rb_assoc_new      671 ext/dl/dl.c    	rb_hash_aset(DLFuncTable, rb_assoc_new(INT2NUM(i),INT2NUM(j)),Qnil);
rb_assoc_new      633 ext/dl/ptr.c       return rb_assoc_new(INT2FIX(data->ctype),
rb_assoc_new      636 ext/dl/ptr.c       return rb_assoc_new(INT2FIX(data->ctype), Qnil);
rb_assoc_new     1016 ext/dl/ptr.c     rb_yield(rb_assoc_new(key,(VALUE)DLNUM2LONG(val)));
rb_assoc_new      946 ext/dl/sym.c     return rb_assoc_new(val,dvals);
rb_assoc_new      373 ext/gdbm/gdbm.c             VALUE assoc = rb_assoc_new(keystr, rb_gdbm_fetch2(dbm, keystr));
rb_assoc_new      471 ext/gdbm/gdbm.c     return rb_assoc_new(keystr, valstr);
rb_assoc_new      493 ext/gdbm/gdbm.c         ret = rb_protect(rb_yield, rb_assoc_new(keystr, valstr), &status);
rb_assoc_new      726 ext/gdbm/gdbm.c         rb_yield(rb_assoc_new(keystr, rb_gdbm_fetch2(dbm, keystr)));
rb_assoc_new      829 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      255 ext/sdbm/init.c             assoc = rb_assoc_new(rb_tainted_str_new(key.dptr, key.dsize),
rb_assoc_new      356 ext/sdbm/init.c     return rb_assoc_new(keystr, valstr);
rb_assoc_new      378 ext/sdbm/init.c         ret = rb_protect(rb_yield, rb_assoc_new(rb_str_dup(keystr), valstr), &status);
rb_assoc_new      607 ext/sdbm/init.c 	rb_yield(rb_assoc_new(keystr, valstr));
rb_assoc_new      704 ext/sdbm/init.c 	rb_ary_push(ary, rb_assoc_new(rb_tainted_str_new(key.dptr, key.dsize),
rb_assoc_new      592 ext/socket/socket.c 	  return rb_assoc_new(str, ipaddr((struct sockaddr*)buf));
rb_assoc_new      594 ext/socket/socket.c 	  return rb_assoc_new(str, Qnil);
rb_assoc_new      597 ext/socket/socket.c 	return rb_assoc_new(str, unixaddr((struct sockaddr_un*)buf));
rb_assoc_new      600 ext/socket/socket.c 	return rb_assoc_new(str, rb_str_new(buf, alen));
rb_assoc_new     1882 ext/socket/socket.c     return rb_assoc_new(rb_str_new2("AF_UNIX"),
rb_assoc_new     2045 ext/socket/socket.c     return rb_assoc_new(init_sock(rb_obj_alloc(klass), sp[0]),
rb_assoc_new     2588 ext/socket/socket.c     return rb_assoc_new(sock2, rb_str_new(buf, len));
rb_assoc_new     2641 ext/socket/socket.c     return rb_assoc_new(sock2, rb_str_new(buf, len));
rb_assoc_new     3023 ext/socket/socket.c     return rb_assoc_new(rb_str_new2(hbuf), rb_str_new2(pbuf));
rb_assoc_new     3058 ext/socket/socket.c     return rb_assoc_new(INT2NUM(ntohs(sockaddr->sin_port)), host);
rb_assoc_new     2895 file.c             return rb_assoc_new(rb_file_s_dirname(Qnil, path), rb_file_s_basename(1,&path));
rb_assoc_new      719 hash.c         	return rb_assoc_new(var.key, var.val);
rb_assoc_new      802 hash.c         	rb_ary_push(result, rb_assoc_new(key, value));
rb_assoc_new     1109 hash.c             rb_yield(rb_assoc_new(key, value));
rb_assoc_new     1146 hash.c             rb_ary_push(ary, rb_assoc_new(key, value));
rb_assoc_new     2009 hash.c         	    rb_yield(rb_assoc_new(RARRAY(ary)->ptr[i], RARRAY(ary)->ptr[i+1]));
rb_assoc_new     2093 hash.c         		rb_ary_push(result, rb_assoc_new(k, v));
rb_assoc_new     2167 hash.c         	    rb_ary_push(ary, rb_assoc_new(env_str_new(*env, s-*env),
rb_assoc_new     2331 hash.c         	    return rb_assoc_new(key, val);
rb_assoc_new       24 intern.h       VALUE rb_assoc_new _((VALUE, VALUE));
rb_assoc_new     5044 io.c               return rb_assoc_new(r, w);
rb_assoc_new      401 math.c             return rb_assoc_new(rb_float_new(d), INT2NUM(exp));
rb_assoc_new      104 numeric.c      	return rb_assoc_new(y, x);
rb_assoc_new      105 numeric.c          return rb_assoc_new(rb_Float(y), rb_Float(x));
rb_assoc_new      321 numeric.c          return rb_assoc_new(num_div(x, y), rb_funcall(x, '%', 1, y));
rb_assoc_new      527 numeric.c          return rb_assoc_new(rb_Float(y), x);
rb_assoc_new      737 numeric.c          return rb_assoc_new(a, b);
rb_assoc_new     2173 numeric.c      	return rb_assoc_new(LONG2NUM(div), LONG2NUM(mod));
rb_assoc_new      657 process.c          rb_ary_push(ary, rb_assoc_new(INT2NUM(pid), rb_last_status));
rb_assoc_new      774 process.c          return rb_assoc_new(pid, rb_last_status);
rb_assoc_new      823 process.c      	rb_ary_push(result, rb_assoc_new(INT2NUM(pid), rb_last_status));
rb_assoc_new      834 process.c      	rb_ary_push(result, rb_assoc_new(INT2NUM(pid), rb_last_status));
rb_assoc_new      744 re.c           	return rb_assoc_new(Qnil, Qnil);
rb_assoc_new      746 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       306 signal.c       static rb_atomic_t trap_pending_list[NSIG];
rb_atomic_t       307 signal.c       rb_atomic_t rb_trap_pending;
rb_atomic_t       308 signal.c       rb_atomic_t rb_trap_immediate;


rb_attr

rb_attr           936 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           873 ext/openssl/ossl_ssl.c         rb_attr(cSSLContext, rb_intern(ossl_sslctx_attrs[i]), 1, 1, Qfalse);
rb_attr           882 ext/openssl/ossl_ssl.c         rb_attr(cSSLSocket, rb_intern(ossl_ssl_attr_readers[i]), 1, 0, Qfalse);
rb_attr           884 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           158 intern.h       void rb_attr _((VALUE,ID,int,int,int));
rb_attr          1723 object.c           rb_attr(klass, rb_to_id(name), 1, RTEST(pub), Qtrue);
rb_attr          1745 object.c       	rb_attr(klass, rb_to_id(argv[i]), 1, 0, Qtrue);
rb_attr          1767 object.c       	rb_attr(klass, rb_to_id(argv[i]), 0, 1, Qtrue);
rb_attr          1794 object.c       	rb_attr(klass, rb_to_id(argv[i]), 1, 1, Qtrue);


rb_attr_get

rb_attr_get       404 error.c            VALUE mesg = rb_attr_get(exc, rb_intern("mesg"));
rb_attr_get       573 error.c            return rb_attr_get(exc, rb_intern("status"));
rb_attr_get       588 error.c            VALUE status = rb_attr_get(exc, rb_intern("status"));
rb_attr_get       652 error.c            return rb_attr_get(self, rb_intern("name"));
rb_attr_get       666 error.c            VALUE mesg = rb_attr_get(exc, rb_intern("mesg")), str = mesg;
rb_attr_get       787 error.c            return rb_attr_get(self, rb_intern("args"));
rb_attr_get       938 error.c            return rb_attr_get(self, rb_intern("errno"));
rb_attr_get       959 error.c            num = rb_attr_get(exc, rb_intern("errno"));
rb_attr_get      5702 eval.c         	result = rb_attr_get(recv, body->nd_vid);
rb_attr_get      6355 eval.c         		mesg  = rb_attr_get(ruby_errinfo, rb_intern("mesg"));
rb_attr_get       791 ext/iconv/iconv.c     return rb_attr_get(self, rb_success);
rb_attr_get       810 ext/iconv/iconv.c     return rb_attr_get(self, rb_failed);
rb_attr_get       829 ext/iconv/iconv.c     VALUE success = rb_attr_get(self, rb_success);
rb_attr_get       830 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       120 ext/readline/readline.c     return rb_attr_get(mReadline, completion_proc);
rb_attr_get       137 ext/readline/readline.c     return rb_attr_get(mReadline, completion_case_fold);
rb_attr_get       151 ext/readline/readline.c     proc = rb_attr_get(mReadline, completion_proc);
rb_attr_get       157 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      1089 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       472 intern.h       VALUE rb_attr_get _((VALUE, ID));


rb_autoload

rb_autoload      7871 eval.c             rb_autoload(mod, id, RSTRING(file)->ptr);
rb_autoload       454 intern.h       void rb_autoload _((VALUE, ID, const char*));


rb_autoload_load

rb_autoload_load 1840 eval.c         		if (!RTEST(rb_autoload_load(klass, id))) break;
rb_autoload_load  455 intern.h       VALUE rb_autoload_load _((VALUE, ID));
rb_autoload_load 1411 variable.c     		if (!RTEST(rb_autoload_load(tmp, id))) break;


rb_autoload_p

rb_autoload_p    1815 eval.c         	    if (result == Qundef && NIL_P(rb_autoload_p((VALUE)klass, id))) {
rb_autoload_p    7892 eval.c             return rb_autoload_p(mod, rb_to_id(sym));
rb_autoload_p     456 intern.h       VALUE rb_autoload_p _((VALUE, ID));


rb_backref_error

rb_backref_error  260 parse.c        static void rb_backref_error();
rb_backref_error 3967 parse.c        		        rb_backref_error(yyvsp[-2].node);
rb_backref_error 4263 parse.c        		        rb_backref_error(yyvsp[0].node);
rb_backref_error 4316 parse.c        		        rb_backref_error(yyvsp[0].node);
rb_backref_error 4597 parse.c        		        rb_backref_error(yyvsp[-2].node);
rb_backref_error  163 parse.y        static void rb_backref_error();
rb_backref_error  596 parse.y        		        rb_backref_error($1);
rb_backref_error  839 parse.y        		        rb_backref_error($1);
rb_backref_error  878 parse.y        		        rb_backref_error($1);
rb_backref_error 1070 parse.y        		        rb_backref_error($1);


rb_backref_get

rb_backref_get   10092 eval.c             tval = rb_backref_get();
rb_backref_get   10219 eval.c             tval = rb_backref_get();
rb_backref_get    340 intern.h       VALUE rb_backref_get _((void));
rb_backref_get    931 re.c               match = rb_backref_get();
rb_backref_get   1071 re.c               return rb_reg_last_match(rb_backref_get());
rb_backref_get   1077 re.c               return rb_reg_match_pre(rb_backref_get());
rb_backref_get   1083 re.c               return rb_reg_match_post(rb_backref_get());
rb_backref_get   1089 re.c               return rb_reg_match_last(rb_backref_get());
rb_backref_get   1611 re.c               result = rb_backref_get();
rb_backref_get   2163 re.c               VALUE match = rb_backref_get();
rb_backref_get   2205 re.c           	return rb_reg_nth_match(NUM2INT(nth), rb_backref_get());
rb_backref_get   1506 string.c       	return rb_reg_nth_match(nth, rb_backref_get());
rb_backref_get   1697 string.c           match = rb_backref_get();
rb_backref_get   1969 string.c       	match = rb_backref_get();
rb_backref_get   2092 string.c       	match = rb_backref_get();
rb_backref_get   3551 string.c       	    regs = RMATCH(rb_backref_get())->regs;
rb_backref_get   4186 string.c       	match = rb_backref_get();
rb_backref_get   4258 string.c       	    match = rb_backref_get();
rb_backref_get   4266 string.c       	match = rb_backref_get();
rb_backref_get    785 variable.c         if (!NIL_P(rb_backref_get())) {


rb_backref_set

rb_backref_set   10093 eval.c             rb_backref_set(th->last_match);
rb_backref_set   10220 eval.c             rb_backref_set(tmp->last_match);
rb_backref_set    341 intern.h       void rb_backref_set _((VALUE));
rb_backref_set    897 re.c           	rb_backref_set(Qnil);
rb_backref_set    927 re.c           	rb_backref_set(Qnil);
rb_backref_set    944 re.c               rb_backref_set(match);
rb_backref_set   1510 re.c           	rb_backref_set(Qnil);
rb_backref_set   1549 re.c           	    rb_backref_set(Qnil);
rb_backref_set   1581 re.c           	rb_backref_set(Qnil);
rb_backref_set   2177 re.c               rb_backref_set(val);
rb_backref_set   1117 string.c       		rb_backref_set(Qnil);
rb_backref_set   1227 string.c       		    rb_backref_set(Qnil);
rb_backref_set   1979 string.c       	    rb_backref_set(match);
rb_backref_set   2102 string.c       	    rb_backref_set(match);
rb_backref_set   2149 string.c           rb_backref_set(match);
rb_backref_set   4261 string.c       	rb_backref_set(match);
rb_backref_set   4269 string.c       	rb_backref_set(match);	/* restore $~ value */
rb_backref_set   4271 string.c           rb_backref_set(match);


rb_big2dbl

rb_big2dbl        908 bignum.c           return rb_float_new(rb_big2dbl(x));
rb_big2dbl        936 bignum.c       	return rb_dbl_cmp(rb_big2dbl(x), RFLOAT(y)->value);
rb_big2dbl        983 bignum.c       	    b = rb_big2dbl(x);
rb_big2dbl       1176 bignum.c       	return rb_float_new(rb_big2dbl(x) + RFLOAT(y)->value);
rb_big2dbl       1202 bignum.c       	return rb_float_new(rb_big2dbl(x) - RFLOAT(y)->value);
rb_big2dbl       1235 bignum.c       	return rb_float_new(rb_big2dbl(x) * RFLOAT(y)->value);
rb_big2dbl       1434 bignum.c       	return rb_float_new(rb_big2dbl(x) / RFLOAT(y)->value);
rb_big2dbl       1551 bignum.c           double dx = rb_big2dbl(x);
rb_big2dbl       1560 bignum.c       	dy = rb_big2dbl(y);
rb_big2dbl       1601 bignum.c       	d = rb_big2dbl(y);
rb_big2dbl       1626 bignum.c           return rb_float_new(pow(rb_big2dbl(x), d));
rb_big2dbl        823 ext/win32ole/win32ole.c         V_R8(var) = rb_big2dbl(val);
rb_big2dbl       5515 ext/win32ole/win32ole.c             *V_R8REF(var) = rb_big2dbl(val);
rb_big2dbl         86 intern.h       double rb_big2dbl _((VALUE));
rb_big2dbl        560 numeric.c      	return rb_float_new(RFLOAT(x)->value + rb_big2dbl(y));
rb_big2dbl        584 numeric.c      	return rb_float_new(RFLOAT(x)->value - rb_big2dbl(y));
rb_big2dbl        608 numeric.c      	return rb_float_new(RFLOAT(x)->value * rb_big2dbl(y));
rb_big2dbl        636 numeric.c      	d = rb_big2dbl(y);
rb_big2dbl        695 numeric.c      	fy = rb_big2dbl(y);
rb_big2dbl        726 numeric.c      	fy = rb_big2dbl(y);
rb_big2dbl        756 numeric.c      	return rb_float_new(pow(RFLOAT(x)->value, rb_big2dbl(y)));
rb_big2dbl        832 numeric.c      	b = rb_big2dbl(y);
rb_big2dbl        904 numeric.c      	b = rb_big2dbl(y);
rb_big2dbl        937 numeric.c      	b = rb_big2dbl(y);
rb_big2dbl        973 numeric.c      	b = rb_big2dbl(y);
rb_big2dbl       1008 numeric.c      	b = rb_big2dbl(y);
rb_big2dbl       1044 numeric.c      	b = rb_big2dbl(y);
rb_big2dbl       2355 object.c       	return rb_float_new(rb_big2dbl(val));


rb_big2ll

rb_big2ll          80 intern.h       LONG_LONG rb_big2ll _((VALUE));
rb_big2ll        1681 numeric.c      	return rb_big2ll(val);


rb_big2long

rb_big2long        73 intern.h       long rb_big2long _((VALUE));
rb_big2long        74 intern.h       #define rb_big2int(x) rb_big2long(x)
rb_big2long      1530 numeric.c      	return rb_big2long(val);


rb_big2str

rb_big2str        726 bignum.c           return rb_big2str(x, base);
rb_big2str        117 ext/bigdecimal/bigdecimal.c         bg = rb_big2str(v, 10);
rb_big2str         72 intern.h       VALUE rb_big2str _((VALUE, int));
rb_big2str       1956 numeric.c      	return rb_big2str(rb_int2big(FIX2INT(x)), 2);
rb_big2str        585 sprintf.c      		    tmp = rb_big2str(val, base);
rb_big2str        606 sprintf.c      		tmp1 = tmp = rb_big2str(val, base);


rb_big2ull

rb_big2ull         81 intern.h       unsigned LONG_LONG rb_big2ull _((VALUE));
rb_big2ull       1703 numeric.c      	return rb_big2ull(val);


rb_big2ulong

rb_big2ulong     2483 ext/zlib/zlib.c 	gz->mtime = FIXNUM_P(val) ? FIX2INT(val) : rb_big2ulong(val);
rb_big2ulong       75 intern.h       unsigned long rb_big2ulong _((VALUE));
rb_big2ulong       76 intern.h       #define rb_big2uint(x) rb_big2ulong(x)
rb_big2ulong     1543 numeric.c      	return rb_big2ulong(val);


rb_big2ulong_pack

rb_big2ulong_pack  334 pack.c         unsigned long rb_big2ulong_pack _((VALUE x));
rb_big2ulong_pack  344 pack.c         	return rb_big2ulong_pack(x);


rb_big_2comp

rb_big_2comp       62 intern.h       void rb_big_2comp _((VALUE));
rb_big_2comp      604 sprintf.c      		    rb_big_2comp(val);


rb_big_and

rb_big_and       2081 bignum.c           rb_define_method(rb_cBignum, "&", rb_big_and, 1);
rb_big_and         92 intern.h       VALUE rb_big_and _((VALUE, VALUE));
rb_big_and       2383 numeric.c      	return rb_big_and(y, x);


rb_big_clone

rb_big_clone      668 bignum.c           t = rb_big_clone(x);
rb_big_clone     1028 bignum.c           VALUE z = rb_big_clone(x);
rb_big_clone     1051 bignum.c           VALUE z = rb_big_clone(x);
rb_big_clone     1286 bignum.c       	z = rb_big_clone(x);
rb_big_clone     1314 bignum.c       	yy = rb_big_clone(y);
rb_big_clone     1369 bignum.c       	*divp = rb_big_clone(z);
rb_big_clone     1376 bignum.c       	*modp = rb_big_clone(z);
rb_big_clone     1651 bignum.c       	y = rb_big_clone(y);
rb_big_clone     1655 bignum.c       	x = rb_big_clone(x);
rb_big_clone     1707 bignum.c       	y = rb_big_clone(y);
rb_big_clone     1711 bignum.c       	x = rb_big_clone(x);
rb_big_clone     1765 bignum.c       	y = rb_big_clone(y);
rb_big_clone     1769 bignum.c       	x = rb_big_clone(x);
rb_big_clone     1869 bignum.c       	save_x = x = rb_big_clone(x);
rb_big_clone     1929 bignum.c       	x = rb_big_clone(x);
rb_big_clone     1998 bignum.c       	x = rb_big_clone(x);
rb_big_clone       61 intern.h       VALUE rb_big_clone _((VALUE));
rb_big_clone      381 random.c           val = (struct RBignum *)rb_big_clone((VALUE)limit);
rb_big_clone      467 random.c                       limit = (struct RBignum *)rb_big_clone(vmax);
rb_big_clone      603 sprintf.c      		    val = rb_big_clone(val);


rb_big_div

rb_big_div       2073 bignum.c           rb_define_method(rb_cBignum, "/", rb_big_div, 1);
rb_big_div       2075 bignum.c           rb_define_method(rb_cBignum, "div", rb_big_div, 1);


rb_big_divmod

rb_big_divmod    2076 bignum.c           rb_define_method(rb_cBignum, "divmod", rb_big_divmod, 1);
rb_big_divmod      90 intern.h       VALUE rb_big_divmod _((VALUE, VALUE));
rb_big_divmod     955 pack.c         			from = rb_big_divmod(from, big128);


rb_big_lshift

rb_big_lshift    1860 bignum.c           if (shift < 0) return rb_big_lshift(x, INT2FIX(-shift));
rb_big_lshift    2085 bignum.c           rb_define_method(rb_cBignum, "<<", rb_big_lshift, 1);
rb_big_lshift      95 intern.h       VALUE rb_big_lshift _((VALUE, VALUE));
rb_big_lshift    2450 numeric.c      	return rb_big_lshift(rb_int2big(val), y);


rb_big_minus

rb_big_minus     2071 bignum.c           rb_define_method(rb_cBignum, "-", rb_big_minus, 1);
rb_big_minus       88 intern.h       VALUE rb_big_minus _((VALUE, VALUE));
rb_big_minus     2017 numeric.c      	    r = rb_big_minus(rb_int2big(a), rb_int2big(b));
rb_big_minus      470 random.c                   limit = (struct RBignum *)rb_big_minus((VALUE)limit, INT2FIX(1));


rb_big_modulo

rb_big_modulo    2074 bignum.c           rb_define_method(rb_cBignum, "%", rb_big_modulo, 1);
rb_big_modulo    2077 bignum.c           rb_define_method(rb_cBignum, "modulo", rb_big_modulo, 1);


rb_big_mul

rb_big_mul       1614 bignum.c       		    x = rb_big_mul(x, x);
rb_big_mul       1616 bignum.c       		z = rb_big_mul(z, x);
rb_big_mul       2072 bignum.c           rb_define_method(rb_cBignum, "*", rb_big_mul, 1);
rb_big_mul         89 intern.h       VALUE rb_big_mul _((VALUE, VALUE));
rb_big_mul       2052 numeric.c      	    r = rb_big_mul(rb_int2big(a), rb_int2big(b));
rb_big_mul       1968 pack.c         			    big = rb_big_mul(big, big128);


rb_big_norm

rb_big_norm        63 intern.h       VALUE rb_big_norm _((VALUE));
rb_big_norm      1146 marshal.c      	    v = rb_big_norm((VALUE)big);
rb_big_norm      2506 numeric.c      	idx = rb_big_norm(idx);
rb_big_norm       305 random.c           return rb_big_norm((VALUE)big);
rb_big_norm       415 random.c           return rb_big_norm((VALUE)val);


rb_big_or

rb_big_or        2082 bignum.c           rb_define_method(rb_cBignum, "|", rb_big_or, 1);
rb_big_or          93 intern.h       VALUE rb_big_or _((VALUE, VALUE));
rb_big_or        2403 numeric.c      	return rb_big_or(y, x);


rb_big_plus

rb_big_plus      2070 bignum.c           rb_define_method(rb_cBignum, "+", rb_big_plus, 1);
rb_big_plus        87 intern.h       VALUE rb_big_plus _((VALUE, VALUE));
rb_big_plus      1984 numeric.c      	    r = rb_big_plus(rb_int2big(a), rb_int2big(b));
rb_big_plus      1969 pack.c         			    big = rb_big_plus(big, rb_uint2big(*s & 0x7f));


rb_big_pow

rb_big_pow       2080 bignum.c           rb_define_method(rb_cBignum, "**", rb_big_pow, 1);
rb_big_pow         91 intern.h       VALUE rb_big_pow _((VALUE, VALUE));
rb_big_pow       2202 numeric.c      	    return rb_big_pow(rb_int2big(a), y);


rb_big_rshift

rb_big_rshift    1802 bignum.c       static VALUE rb_big_rshift _((VALUE,VALUE));
rb_big_rshift    1823 bignum.c           if (shift < 0) return rb_big_rshift(x, INT2FIX(-shift));
rb_big_rshift    2086 bignum.c           rb_define_method(rb_cBignum, ">>", rb_big_rshift, 1);


rb_big_xor

rb_big_xor       2083 bignum.c           rb_define_method(rb_cBignum, "^", rb_big_xor, 1);
rb_big_xor         94 intern.h       VALUE rb_big_xor _((VALUE, VALUE));
rb_big_xor       2423 numeric.c      	return rb_big_xor(y, x);


rb_block_given_p

rb_block_given_p  275 array.c        	if (rb_block_given_p()) {
rb_block_given_p  301 array.c            if (rb_block_given_p()) {
rb_block_given_p  822 array.c            block_given = rb_block_given_p();
rb_block_given_p 1610 array.c        	  rb_block_given_p()?sort_1:sort_2, &data);
rb_block_given_p 1696 array.c            if (!rb_block_given_p()) {
rb_block_given_p 1854 array.c        	if (rb_block_given_p()) {
rb_block_given_p 2074 array.c            if (rb_block_given_p()) {
rb_block_given_p 2230 array.c            if (rb_block_given_p()) {
rb_block_given_p 1010 class.c        	if (rb_block_given_p()) {
rb_block_given_p  315 dir.c              if (rb_block_given_p()) {
rb_block_given_p  648 dir.c          	if (!rb_block_given_p() || rb_thread_current() != chdir_thread)
rb_block_given_p  652 dir.c              if (rb_block_given_p()) {
rb_block_given_p 1273 dir.c              if (rb_block_given_p()) {
rb_block_given_p   75 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? grep_iter_i : grep_i, (VALUE)arg);
rb_block_given_p  230 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? collect_i : collect_all, ary);
rb_block_given_p  547 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? all_iter_i : all_i, (VALUE)&result);
rb_block_given_p  599 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? any_iter_i : any_i, (VALUE)&result);
rb_block_given_p  662 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? min_ii : min_i, (VALUE)&result);
rb_block_given_p  739 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? max_ii : max_i, (VALUE)&result);
rb_block_given_p  833 enum.c             if (rb_block_given_p()) {
rb_block_given_p  878 enum.c             result = rb_block_given_p() ? Qnil : rb_ary_new();
rb_block_given_p 2321 eval.c         	if (rb_block_given_p()) {
rb_block_given_p 3631 eval.c         	if (rb_block_given_p()) {
rb_block_given_p 4646 eval.c             return rb_block_given_p();
rb_block_given_p 4766 eval.c             if (!rb_block_given_p()) {
rb_block_given_p 5851 eval.c         		if (rb_block_given_p()) JUMP_TAG(state);
rb_block_given_p 5967 eval.c             PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
rb_block_given_p 6530 eval.c             if (rb_block_given_p()) {
rb_block_given_p 7400 eval.c             PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
rb_block_given_p 7693 eval.c             if (!rb_block_given_p()) {
rb_block_given_p 8223 eval.c             if (!rb_block_given_p() && !rb_f_block_given_p()) {
rb_block_given_p 8226 eval.c             if (proc && !rb_block_given_p()) {
rb_block_given_p 8351 eval.c             if (rb_block_given_p() && ruby_frame->last_func) {
rb_block_given_p 9000 eval.c             PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
rb_block_given_p 11795 eval.c             if (!rb_block_given_p()) {
rb_block_given_p 11825 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  266 ext/dbm/dbm.c      if (rb_block_given_p()) {
rb_block_given_p  339 ext/dbm/dbm.c  	if (rb_block_given_p()) return rb_yield(keystr);
rb_block_given_p  601 ext/dl/dl.c        if (rb_block_given_p()) {
rb_block_given_p   85 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  362 ext/gdbm/gdbm.c     if (rb_block_given_p()) {
rb_block_given_p  332 ext/iconv/iconv.c     if (!rb_block_given_p()) rb_exc_raise(error);
rb_block_given_p  575 ext/iconv/iconv.c     if (rb_block_given_p()) {
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  243 ext/sdbm/init.c     if (rb_block_given_p()) {
rb_block_given_p  318 ext/sdbm/init.c 	if (rb_block_given_p()) return rb_yield(keystr);
rb_block_given_p  204 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 2329 ext/zlib/zlib.c     if (rb_block_given_p()) {
rb_block_given_p  290 hash.c             if (rb_block_given_p()) {
rb_block_given_p  466 hash.c             block_given = rb_block_given_p();
rb_block_given_p  670 hash.c             if (rb_block_given_p()) {
rb_block_given_p 1576 hash.c             if (rb_block_given_p()) {
rb_block_given_p 1684 hash.c             if (NIL_P(val) && rb_block_given_p()) rb_yield(name);
rb_block_given_p 1727 hash.c             block_given = rb_block_given_p();
rb_block_given_p 2379 hash.c         	if (rb_block_given_p()) {
rb_block_given_p 3096 io.c           	if (rb_block_given_p()) {
rb_block_given_p 3105 io.c               if (rb_block_given_p()) {
rb_block_given_p 3164 io.c               if (rb_block_given_p()) {
rb_block_given_p 4153 io.c               if (rb_block_given_p()) {
rb_block_given_p 1507 object.c           if (rb_block_given_p()) {
rb_block_given_p 1284 process.c      	if (rb_block_given_p()) {
rb_block_given_p 3146 process.c      	if (rb_block_given_p()) {
rb_block_given_p 3154 process.c      	if (rb_block_given_p()) {
rb_block_given_p 3190 process.c          if (rb_block_given_p()) {
rb_block_given_p 3257 process.c      	if (rb_block_given_p()) {
rb_block_given_p 3265 process.c      	if (rb_block_given_p()) {
rb_block_given_p 3300 process.c          if (rb_block_given_p()) {
rb_block_given_p  551 ruby.h         int rb_block_given_p _((void));
rb_block_given_p 1954 string.c           if (argc == 1 && rb_block_given_p()) {
rb_block_given_p 2062 string.c           if (argc == 1 && rb_block_given_p()) {
rb_block_given_p 4254 string.c           if (!rb_block_given_p()) {
rb_block_given_p  324 struct.c           if (rb_block_given_p()) {


rb_block_proc

rb_block_proc    1011 class.c        	    *var = rb_block_proc();
rb_block_proc    3632 eval.c         	    result = rb_block_proc();
rb_block_proc    7663 eval.c             rb_set_end_proc(call_end_proc, rb_block_proc());
rb_block_proc    7696 eval.c             proc = rb_block_proc();
rb_block_proc    9269 eval.c             proc = rb_block_proc();
rb_block_proc     602 ext/dl/dl.c          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    6037 ext/win32ole/win32ole.c     data = rb_ary_new3(4, rb_block_proc(), event, args, is_ary_arg);
rb_block_proc    1735 gc.c           	block = rb_block_proc();
rb_block_proc     294 hash.c         	RHASH(hash)->ifnone = rb_block_proc();
rb_block_proc     184 intern.h       VALUE rb_block_proc _((void));
rb_block_proc     717 signal.c       	arg.cmd = rb_block_proc();
rb_block_proc     578 variable.c     	cmd = rb_block_proc();


rb_bug

rb_bug            869 class.c        	rb_bug("unknown immediate %ld", obj);
rb_bug            255 error.c        	rb_bug("undef leaked to the Ruby space");
rb_bug            283 error.c        	rb_bug("unknown type 0x%x", t);
rb_bug           1119 error.c        	rb_bug("rb_sys_fail(%s) - errno == 0", mesg ? mesg : "");
rb_bug           1443 eval.c         	rb_bug("Unknown longjmp status %d", ex);
rb_bug           2778 eval.c         	rb_bug("class path missing");
rb_bug           2819 eval.c                 rb_bug("terminated node (0x%lx)", node);
rb_bug           2822 eval.c                 rb_bug("not a node 0x%02lx (0x%lx)", BUILTIN_TYPE(node), node);
rb_bug           2825 eval.c                 rb_bug("unknown node type %d (0x%lx)", nd_type(node), node);
rb_bug           3288 eval.c         	    if (!flip) rb_bug("unexpected local variable");
rb_bug           3310 eval.c         	    if (!flip) rb_bug("unexpected local variable");
rb_bug           3550 eval.c         	    rb_bug("unexpected local variable assignment");
rb_bug           3603 eval.c         	    rb_bug("unexpected local variable");
rb_bug           3630 eval.c         	    rb_bug("unexpected block argument");
rb_bug           3686 eval.c         	    rb_bug("unexpected back-ref");
rb_bug           3701 eval.c         		    rb_bug("odd number list for Hash");
rb_bug           5117 eval.c         	    rb_bug("unexpected local variable assignment");
rb_bug           5187 eval.c         	rb_bug("bug in variable assignment");
rb_bug           5673 eval.c         		rb_bug("bad argc (%d) specified for `%s(%s)'",
rb_bug           5768 eval.c         			rb_bug("no argument-node");
rb_bug           7329 eval.c         		rb_bug("undefined method `%s'; can't happen", rb_id2name(id));
rb_bug           10170 eval.c             if (!th->stk_ptr) rb_bug("unsaved context");
rb_bug           10399 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             63 ext/dl/handle.c     rb_bug("rb_dlhandle_new");
rb_bug            206 ext/dl/ptr.c       rb_bug("rb_dlptr_initialize");
rb_bug            239 ext/dl/ptr.c       rb_bug("rb_dlptr_s_malloc");
rb_bug            354 ext/dl/ptr.c       rb_bug("rb_dlptr_to_array");
rb_bug            433 ext/dl/ptr.c       rb_bug("rb_dlptr_to_s");
rb_bug            456 ext/dl/ptr.c       rb_bug("rb_dlptr_to_str");
rb_bug            602 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            765 gc.c           	rb_bug("rb_gc_mark() called for broken object");
rb_bug            991 gc.c           	rb_bug("rb_gc_mark(): unknown data type 0x%lx(0x%lx) %s",
rb_bug           1145 gc.c           	rb_bug("obj_free() called for broken object");
rb_bug           1257 gc.c           	rb_bug("gc_sweep(): unknown data type 0x%lx(0x%lx)",
rb_bug           1318 gc.c           	rb_bug("cross-thread violation on rb_gc()");
rb_bug           4027 io.c               if (fptr->path) rb_bug("illegal prep_path() call");
rb_bug           9532 parse.c        	rb_bug("unknown nodetype(%d) for arg_prepend", nd_type(node2));
rb_bug           5534 parse.y        	rb_bug("unknown nodetype(%d) for arg_prepend", nd_type(node2));
rb_bug            609 re.c           	    rb_bug("unknown kcode - should not happen");
rb_bug           1852 re.c               rb_bug("wrong reg_kcode value (0x%x)", reg_kcode);
rb_bug            537 ruby.h         NORETURN(void rb_bug __((const char*, ...)));
rb_bug            414 signal.c       	rb_bug("trap_handler: Bad signal %d", sig);
rb_bug            437 signal.c           rb_bug("Bus Error");
rb_bug            447 signal.c           rb_bug("Segmentation fault");
rb_bug             44 struct.c       	rb_bug("non-initialized struct");
rb_bug            798 struct.c       	rb_bug("inconsistent struct"); /* should never happen */
rb_bug            848 struct.c       	rb_bug("inconsistent struct"); /* should never happen */
rb_bug            162 variable.c     	    rb_bug("class path is not set properly");


rb_call

rb_call          1068 eval.c         static VALUE rb_call _((VALUE,VALUE,ID,int,const VALUE*,int));
rb_call          3120 eval.c         		    result = rb_call(CLASS_OF(recv),recv,each,0,0,0);
rb_call          3363 eval.c         	    rb_call(CLASS_OF(recv),recv,node->nd_mid,argc,argv,scope);
rb_call          3381 eval.c         	    result = rb_call(CLASS_OF(recv),recv,node->nd_mid,argc,argv,0);
rb_call          3396 eval.c         	    result = rb_call(CLASS_OF(self),self,node->nd_mid,argc,argv,1);
rb_call          3402 eval.c         	result = rb_call(CLASS_OF(self),self,node->nd_mid,0,0,2);
rb_call          5170 eval.c         		rb_call(CLASS_OF(recv), recv, lhs->nd_mid, 1, &val, scope);
rb_call          5180 eval.c         		rb_call(CLASS_OF(recv), recv, lhs->nd_mid,
rb_call          5935 eval.c             return rb_call(CLASS_OF(recv), recv, mid, argc, argv, 1);
rb_call          5968 eval.c             vid = rb_call(CLASS_OF(recv), recv, rb_to_id(vid), argc, argv, 1);
rb_call          5997 eval.c             return rb_call(CLASS_OF(recv), recv, mid, n, argv, 1);
rb_call          6056 eval.c             return rb_call(CLASS_OF(recv), recv, mid, argc, argv, 1);
rb_call          6066 eval.c             return rb_call(CLASS_OF(recv), recv, mid, argc, argv, 0);
rb_call          6088 eval.c             result = rb_call(RCLASS(klass)->super, self, ruby_frame->orig_func, argc, argv, 3);


rb_call0

rb_call0         5920 eval.c             return rb_call0(klass, recv, mid, id, argc, argv, body, noex);
rb_call0         9001 eval.c             result = rb_call0(data->klass,data->recv,data->id,data->oid,argc,argv,data->body,safe);


rb_call_inits

rb_call_inits    1282 eval.c         void rb_call_inits _((void));
rb_call_inits    1330 eval.c         	rb_call_inits();


rb_call_super

rb_call_super     556 error.c            rb_call_super(argc, argv);
rb_call_super     636 error.c            rb_call_super(argc, argv);
rb_call_super     922 error.c            rb_call_super(1, &mesg);
rb_call_super    3433 eval.c         	    result = rb_call_super(argc, argv);
rb_call_super     293 ext/iconv/iconv.c     rb_call_super(1, &mesg);
rb_call_super     528 ext/openssl/ossl_ssl.c     rb_call_super(0, 0);
rb_call_super     226 ext/stringio/stringio.c     rb_call_super(0, 0);
rb_call_super    1868 ext/win32ole/win32ole.c     rb_call_super(0, 0);
rb_call_super     524 ruby.h         VALUE rb_call_super _((int, const VALUE*));


rb_check_array_type

rb_check_array_type  282 array.c        	val = rb_check_array_type(size);
rb_check_array_type 2881 array.c        	tmp = rb_check_array_type(rb_ary_elt(ary, i));
rb_check_array_type 2919 array.c        	tmp = rb_check_array_type(ary2);
rb_check_array_type 1158 eval.c             return rb_check_array_type(info);
rb_check_array_type 2663 eval.c             tmp = rb_check_array_type(v);
rb_check_array_type 2671 eval.c         	top = rb_check_array_type(RARRAY(tmp)->ptr[0]);
rb_check_array_type 2690 eval.c             tmp = rb_check_array_type(v);
rb_check_array_type 2695 eval.c         	top = rb_check_array_type(RARRAY(tmp)->ptr[0]);
rb_check_array_type 2712 eval.c             tmp = rb_check_array_type(v);
rb_check_array_type 2741 eval.c             VALUE tmp = rb_check_array_type(val);
rb_check_array_type  461 ext/dl/dl.c      val0 = 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 2925 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 1546 ext/syck/rubyext.c     val = rb_check_array_type( val );
rb_check_array_type   25 intern.h       VALUE rb_check_array_type _((VALUE));
rb_check_array_type 3823 io.c           	    line = rb_check_array_type(argv[i]);
rb_check_array_type 2462 object.c           VALUE tmp = rb_check_array_type(val);
rb_check_array_type 1220 process.c          tmp = rb_check_array_type(argv[0]);


rb_check_convert_type

rb_check_convert_type  221 array.c            return rb_check_convert_type(ary, T_ARRAY, "Array", "to_ary");
rb_check_convert_type 8661 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 1630 ext/syck/rubyext.c         VALUE hsh = rb_check_convert_type(val, T_HASH, "Hash", "to_hash");
rb_check_convert_type 1665 ext/syck/rubyext.c         VALUE hsh = rb_check_convert_type(val, T_HASH, "Hash", "to_hash");
rb_check_convert_type  653 file.c             tmp = rb_check_convert_type(file, T_FILE, "IO", "to_io");
rb_check_convert_type  674 file.c             tmp = rb_check_convert_type(*file, T_FILE, "IO", "to_io");
rb_check_convert_type  317 intern.h       VALUE rb_check_convert_type _((VALUE,int,const char*,const char*));
rb_check_convert_type 3332 io.c               return rb_check_convert_type(io, T_FILE, "IO", "to_io");
rb_check_convert_type 4117 io.c           	VALUE fd = rb_check_convert_type(argv[0], T_FIXNUM, "Fixnum", "to_int");
rb_check_convert_type 2465 object.c       	tmp = rb_check_convert_type(val, T_ARRAY, "Array", "to_a");
rb_check_convert_type 1915 re.c                   v = rb_check_convert_type(argv[0], T_REGEXP, "Regexp", "to_regexp");
rb_check_convert_type 1933 re.c                       v = rb_check_convert_type(argv[i], T_REGEXP, "Regexp", "to_regexp");
rb_check_convert_type  581 string.c           str = rb_check_convert_type(str, T_STRING, "String", "to_str");


rb_check_frozen

rb_check_frozen   151 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   460 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  3486 file.c             rb_check_frozen(copy);
rb_check_frozen   141 intern.h       void rb_check_frozen _((VALUE));
rb_check_frozen   199 io.c               rb_check_frozen(io);
rb_check_frozen   312 object.c           rb_check_frozen(obj);
rb_check_frozen  1656 re.c               rb_check_frozen(self);
rb_check_frozen  1985 re.c               rb_check_frozen(copy);
rb_check_frozen   556 struct.c           rb_check_frozen(copy);
rb_check_frozen    64 time.c             rb_check_frozen(time);


rb_check_inheritable

rb_check_inheritable 3920 eval.c         	       rb_check_inheritable(super);
rb_check_inheritable  105 intern.h       void rb_check_inheritable _((VALUE));
rb_check_inheritable 1538 object.c       	rb_check_inheritable(super);


rb_check_safe_obj

rb_check_safe_obj  263 eval.c             rb_check_safe_obj(x);
rb_check_safe_obj 7003 eval.c         	rb_check_safe_obj(fname);
rb_check_safe_obj 1932 ext/socket/socket.c 	rb_check_safe_obj(domain);
rb_check_safe_obj 1983 ext/socket/socket.c 	rb_check_safe_obj(type);
rb_check_safe_obj  230 ruby.h         void rb_check_safe_obj _((VALUE));
rb_check_safe_obj  234 ruby.h             rb_check_safe_obj(v);\


rb_check_safe_str

rb_check_safe_str  420 ext/dl/dl.c          rb_check_safe_str(e);
rb_check_safe_str  231 ruby.h         void rb_check_safe_str _((VALUE));
rb_check_safe_str  237 ruby.h         #define Check_SafeStr(v) rb_check_safe_str((VALUE)(v))


rb_check_string_type

rb_check_string_type 1258 array.c        	tmp = rb_check_string_type(RARRAY(ary)->ptr[i]);
rb_check_string_type 2358 array.c            tmp = rb_check_string_type(times);
rb_check_string_type  413 ext/dl/dl.c          tmp = rb_check_string_type(e);
rb_check_string_type 1929 ext/socket/socket.c     tmp = rb_check_string_type(domain);
rb_check_string_type 1980 ext/socket/socket.c     tmp = rb_check_string_type(type);
rb_check_string_type 2912 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 1200 ext/syck/rubyext.c     VALUE tmp = rb_check_string_type(val);
rb_check_string_type 1220 ext/syck/rubyext.c     VALUE tmp = rb_check_string_type(val);
rb_check_string_type 1986 ext/syck/rubyext.c     else if ( !NIL_P(tmp = rb_check_string_type(options)) )
rb_check_string_type 2281 hash.c         	VALUE tmp = rb_check_string_type(argv[i]);
rb_check_string_type  409 intern.h       VALUE rb_check_string_type _((VALUE));
rb_check_string_type 4734 io.c           	VALUE tmp = rb_check_string_type(arg);
rb_check_string_type 4890 io.c           	VALUE v = rb_check_string_type(*argv);
rb_check_string_type 1679 object.c       	tmp = rb_check_string_type(name);
rb_check_string_type 2481 process.c      	    VALUE tmp = rb_check_string_type(g);
rb_check_string_type  327 range.c        	VALUE tmp = rb_check_string_type(b);
rb_check_string_type 1547 re.c           	str = rb_check_string_type(str);
rb_check_string_type  269 signal.c       	    str = rb_check_string_type(argv[0]);
rb_check_string_type 1144 string.c       	  tmp = rb_check_string_type(sub);
rb_check_string_type 1917 string.c       	val = rb_check_string_type(pat);
rb_check_string_type  315 struct.c       	VALUE tmp = rb_check_string_type(name);
rb_check_string_type  345 time.c         	VALUE s = rb_check_string_type(v[1]);


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     218 ruby.h         void rb_check_type _((VALUE,int));
rb_check_type     219 ruby.h         #define Check_Type(v,t) rb_check_type((VALUE)(v),t)


rb_class2name

rb_class2name     262 class.c        		rb_class2name(outer), name);
rb_class2name     333 class.c        		 rb_class2name(outer), rb_obj_classname(module));
rb_class2name     279 eval.c         		  rb_class2name(klass));
rb_class2name     392 eval.c         		rb_class2name(rb_iv_get(klass, "__attached__")));
rb_class2name     534 eval.c         		      rb_id2name(mid), rb_class2name(klass));
rb_class2name    1990 eval.c         		      rb_id2name(id),s0,rb_class2name(c));
rb_class2name    5526 eval.c         	rb_raise(rb_eTypeError, "allocator undefined for %s", rb_class2name(obj));
rb_class2name    5674 eval.c         		       len, rb_class2name(klass), rb_id2name(id));
rb_class2name    8355 eval.c         		   rb_class2name(klass),
rb_class2name    9119 eval.c         		     rb_class2name(data->rklass));
rb_class2name    9246 eval.c         	rb_str_buf_cat2(str, rb_class2name(data->rklass));
rb_class2name    9249 eval.c         	    rb_str_buf_cat2(str, rb_class2name(data->klass));
rb_class2name    11764 eval.c         		 rb_class2name(klass));
rb_class2name     470 ext/dl/ptr.c   	   rb_class2name(CLASS_OF(self)), data, data->ptr, data->size, data->free);
rb_class2name     822 ext/dl/ptr.c   	   rb_id2name(id), rb_class2name(CLASS_OF(self)));
rb_class2name     991 ext/dl/ptr.c   	   rb_id2name(id), rb_class2name(CLASS_OF(self)));
rb_class2name     229 ext/iconv/iconv.c 	rb_raise(rb_eArgError, "Iconv expected (%s)", rb_class2name(CLASS_OF(obj)));
rb_class2name     828 ext/iconv/iconv.c     char *cname = rb_class2name(CLASS_OF(self));
rb_class2name      85 ext/openssl/ossl.h                rb_obj_classname(obj), rb_class2name(klass));\
rb_class2name      92 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     245 ext/openssl/ossl_cipher.c     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      82 ext/stringio/stringio.c 		 rb_class2name(CLASS_OF(self)));
rb_class2name    1111 ext/strscan/strscan.c                        rb_class2name(CLASS_OF(self)));
rb_class2name    1116 ext/strscan/strscan.c                        rb_class2name(CLASS_OF(self)));
rb_class2name    1122 ext/strscan/strscan.c                        rb_class2name(CLASS_OF(self)),
rb_class2name    1130 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    4154 io.c           	char *cname = rb_class2name(klass);
rb_class2name     384 marshal.c      	path = rb_class2name(RBASIC(klass)->klass);
rb_class2name    1218 marshal.c      			     rb_class2name(klass),
rb_class2name    1234 marshal.c      			 rb_class2name(klass));
rb_class2name    1260 marshal.c      			 rb_class2name(klass));
rb_class2name    1302 marshal.c                              rb_class2name(klass));
rb_class2name      93 prec.c                     rb_obj_classname(x), rb_class2name(module));
rb_class2name     277 process.c          snprintf(buf, sizeof(buf), "#<%s: pid=%ld", rb_class2name(CLASS_OF(st)), NUM2LONG(pid));
rb_class2name     512 ruby.h         char *rb_class2name _((VALUE));
rb_class2name     473 struct.c           char *cname = rb_class2name(rb_obj_class(s));
rb_class2name     520 struct.c       	char *cname = rb_class2name(rb_obj_class(s));
rb_class2name     206 variable.c     		s = rb_class2name(RBASIC(klass)->klass);
rb_class2name     303 variable.c         return rb_class2name(CLASS_OF(obj));
rb_class2name    1207 variable.c     		      rb_class2name(klass),
rb_class2name    1416 variable.c     			rb_id2name(id), rb_class2name(klass), rb_id2name(id));
rb_class2name    1488 variable.c     		 rb_class2name(mod), rb_id2name(id));
rb_class2name    1491 variable.c     		  rb_class2name(mod), rb_id2name(id));
rb_class2name    1722 variable.c     			   rb_id2name(id), rb_class2name(original_module(a)),
rb_class2name    1723 variable.c     			   rb_class2name(base));
rb_class2name    1782 variable.c     		  rb_id2name(id), rb_class2name(klass));
rb_class2name    1930 variable.c     		 rb_id2name(id), rb_class2name(mod));
rb_class2name    1933 variable.c     		  rb_id2name(id), rb_class2name(mod));


rb_class_allocate_instance

rb_class_allocate_instance 1576 object.c       static VALUE rb_class_allocate_instance _((VALUE));
rb_class_allocate_instance 2599 object.c           rb_define_alloc_func(rb_cObject, rb_class_allocate_instance);


rb_class_boot

rb_class_boot      48 class.c            return rb_class_boot(super);
rb_class_boot     154 class.c            VALUE klass = rb_class_boot(super);
rb_class_boot      98 intern.h       VALUE rb_class_boot _((VALUE));
rb_class_boot    1477 object.c           return rb_class_boot(0);
rb_class_boot    2499 object.c           VALUE obj = rb_class_boot(super);


rb_class_inherited

rb_class_inherited  235 class.c            rb_class_inherited(super, klass);
rb_class_inherited  267 class.c            rb_class_inherited(super, klass);
rb_class_inherited 3956 eval.c         		rb_class_inherited(super, klass);
rb_class_inherited  106 intern.h       VALUE rb_class_inherited _((VALUE, VALUE));
rb_class_inherited 1543 object.c           rb_class_inherited(super, klass);
rb_class_inherited  192 struct.c       	rb_class_inherited(klass, nstr);


rb_class_inherited_p

rb_class_inherited_p  315 intern.h       VALUE rb_class_inherited_p _((VALUE, VALUE));
rb_class_inherited_p 1053 marshal.c      	    if (TYPE(v) == T_MODULE || !RTEST(rb_class_inherited_p(c, RBASIC(v)->klass))) {
rb_class_inherited_p 1377 object.c           return rb_class_inherited_p(mod, arg);
rb_class_inherited_p 1405 object.c           return rb_class_inherited_p(arg, mod);
rb_class_inherited_p 1453 object.c           cmp = rb_class_inherited_p(mod, arg);
rb_class_inherited_p 2702 object.c           rb_define_method(rb_cModule, "<=", rb_class_inherited_p, 1);


rb_class_init_copy

rb_class_init_copy  101 intern.h       VALUE rb_class_init_copy _((VALUE, VALUE));
rb_class_init_copy 2747 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  113 intern.h       VALUE rb_class_instance_methods _((int, VALUE*, VALUE));
rb_class_instance_methods 1898 object.c       	return rb_class_instance_methods(1, args, CLASS_OF(obj));
rb_class_instance_methods 2721 object.c       		     rb_class_instance_methods, -1);           /* in class.c */


rb_class_name

rb_class_name     406 error.c            if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc));
rb_class_name     445 error.c        	return rb_str_dup(rb_class_name(klass));
rb_class_name     449 error.c            klass = rb_class_name(klass);
rb_class_name     668 error.c            if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc));
rb_class_name    1223 eval.c         	epath = rb_class_name(eclass);
rb_class_name     453 intern.h       VALUE rb_class_name _((VALUE));
rb_class_name    1280 object.c           return rb_str_dup(rb_class_name(klass));
rb_class_name     296 variable.c         return RSTRING(rb_class_name(klass))->ptr;


rb_class_new

rb_class_new      182 class.c            klass = rb_class_new(super);
rb_class_new       99 intern.h       VALUE rb_class_new _((VALUE));
rb_class_new      190 struct.c       	nstr = rb_class_new(klass);


rb_class_new_instance

rb_class_new_instance  614 error.c            exc = rb_class_new_instance(2, argv, rb_eNameError);
rb_class_new_instance  988 error.c            rb_define_singleton_method(rb_eException, "exception", rb_class_new_instance, -1);
rb_class_new_instance 1123 error.c            rb_exc_raise(rb_class_new_instance(1, &arg, get_syserr(n)));
rb_class_new_instance 4321 eval.c             rb_exc_raise(rb_class_new_instance(2, args, rb_eSystemExit));
rb_class_new_instance 5500 eval.c         	exc = rb_class_new_instance(n, args, exc);
rb_class_new_instance 12102 eval.c             rb_thread_main_jump(rb_class_new_instance(2, args, rb_eSystemExit),
rb_class_new_instance  567 ext/dl/dl.c      return rb_class_new_instance(argc, argv, rb_cDLHandle);
rb_class_new_instance  331 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  203 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 2327 ext/zlib/zlib.c     VALUE obj = rb_class_new_instance(argc, argv, klass);
rb_class_new_instance  183 intern.h       VALUE rb_class_new_instance _((int, VALUE*, VALUE));
rb_class_new_instance 3162 io.c               VALUE io = rb_class_new_instance(argc, argv, klass);
rb_class_new_instance 4159 io.c               return rb_class_new_instance(argc, argv, klass);
rb_class_new_instance 4971 io.c               return rb_class_new_instance(2, (VALUE*)args+1, *(VALUE*)args);
rb_class_new_instance 2745 object.c           rb_define_method(rb_cClass, "new", rb_class_new_instance, -1);
rb_class_new_instance 1911 re.c                   return rb_class_new_instance(1, args, rb_cRegexp);
rb_class_new_instance 1921 re.c                       return rb_class_new_instance(1, args, rb_cRegexp);
rb_class_new_instance 1975 re.c                   return rb_class_new_instance(3, args, rb_cRegexp);
rb_class_new_instance 2253 re.c               rb_define_singleton_method(rb_cRegexp, "compile", rb_class_new_instance, -1);
rb_class_new_instance  412 ruby.c         		    rb_exc_raise(rb_class_new_instance(2, name_error, rb_eNameError));
rb_class_new_instance  210 struct.c           rb_define_singleton_method(nstr, "new", rb_class_new_instance, -1);
rb_class_new_instance  211 struct.c           rb_define_singleton_method(nstr, "[]", rb_class_new_instance, -1);
rb_class_new_instance  379 struct.c           return rb_class_new_instance(RARRAY(values)->len, RARRAY(values)->ptr, klass);
rb_class_new_instance  404 struct.c           return rb_class_new_instance(size, mem, klass);
rb_class_new_instance 2050 time.c             rb_define_singleton_method(rb_cTime, "now", rb_class_new_instance, -1);


rb_class_path

rb_class_path     449 intern.h       VALUE rb_class_path _((VALUE));
rb_class_path     105 marshal.c          VALUE path = rb_class_path(klass);
rb_class_path     230 variable.c     	str = rb_str_dup(rb_class_path(under));
rb_class_path     289 variable.c         return rb_class_path(rb_class_real(klass));


rb_class_private_instance_methods

rb_class_private_instance_methods  116 intern.h       VALUE rb_class_private_instance_methods _((int, VALUE*, VALUE));
rb_class_private_instance_methods 1955 object.c       	return rb_class_private_instance_methods(1, args, CLASS_OF(obj));
rb_class_private_instance_methods 1957 object.c           return rb_class_private_instance_methods(argc, argv, CLASS_OF(obj));
rb_class_private_instance_methods 2727 object.c       		     rb_class_private_instance_methods, -1);   /* in class.c */


rb_class_protected_instance_methods

rb_class_protected_instance_methods  115 intern.h       VALUE rb_class_protected_instance_methods _((int, VALUE*, VALUE));
rb_class_protected_instance_methods 1931 object.c       	return rb_class_protected_instance_methods(1, args, CLASS_OF(obj));
rb_class_protected_instance_methods 1933 object.c           return rb_class_protected_instance_methods(argc, argv, CLASS_OF(obj));
rb_class_protected_instance_methods 2725 object.c       		     rb_class_protected_instance_methods, -1); /* in class.c */


rb_class_public_instance_methods

rb_class_public_instance_methods  114 intern.h       VALUE rb_class_public_instance_methods _((int, VALUE*, VALUE));
rb_class_public_instance_methods 1979 object.c       	return rb_class_public_instance_methods(1, args, CLASS_OF(obj));
rb_class_public_instance_methods 1981 object.c           return rb_class_public_instance_methods(argc, argv, CLASS_OF(obj));
rb_class_public_instance_methods 2723 object.c       		     rb_class_public_instance_methods, -1);    /* in class.c */


rb_class_real

rb_class_real     160 class.c        	RCLASS(klass)->super = RBASIC(rb_class_real(RCLASS(obj)->super))->klass;
rb_class_real     163 class.c        	VALUE metasuper = RBASIC(rb_class_real(super))->klass;
rb_class_real     223 class.c        	if (rb_class_real(RCLASS(klass)->super) != super) {
rb_class_real     255 class.c        	if (rb_class_real(RCLASS(klass)->super) != super) {
rb_class_real    2305 eval.c         		    !rb_obj_is_kind_of(self, rb_class_real(val)))
rb_class_real    3933 eval.c         		    tmp = rb_class_real(RCLASS(klass)->super);
rb_class_real    5915 eval.c         	    if (!rb_obj_is_kind_of(ruby_frame->self, rb_class_real(defined_class)))
rb_class_real     314 intern.h       VALUE rb_class_real _((VALUE));
rb_class_real     113 marshal.c          if (rb_path2class(n) != rb_class_real(klass)) {
rb_class_real     403 marshal.c          path = RSTRING(class2path(rb_class_real(klass)))->ptr;
rb_class_real     415 marshal.c          klass = rb_class_real(klass);
rb_class_real     178 object.c           return rb_class_real(CLASS_OF(obj));
rb_class_real     200 object.c           return rb_class_real(CLASS_OF(obj));
rb_class_real    1570 object.c           if (rb_obj_class(obj) != rb_class_real(klass)) {
rb_class_real     289 variable.c         return rb_class_path(rb_class_real(klass));


rb_class_s_alloc

rb_class_s_alloc 1472 object.c       static VALUE rb_class_s_alloc _((VALUE));
rb_class_s_alloc 2749 object.c           rb_define_alloc_func(rb_cClass, rb_class_s_alloc);


rb_clear_cache

rb_clear_cache    417 class.c            if (changed) rb_clear_cache();
rb_clear_cache    155 intern.h       void rb_clear_cache _((void));


rb_clear_cache_by_class

rb_clear_cache_by_class 7103 eval.c             rb_clear_cache_by_class(self);
rb_clear_cache_by_class 1161 gc.c           	rb_clear_cache_by_class((VALUE)obj);
rb_clear_cache_by_class  156 intern.h       void rb_clear_cache_by_class _((VALUE));


rb_clear_cache_by_id

rb_clear_cache_by_id  396 eval.c             rb_clear_cache_by_id(mid);
rb_clear_cache_by_id 2093 eval.c             rb_clear_cache_by_id(name);


rb_cmperr

rb_cmperr          24 compar.c       	rb_cmperr(a, b);
rb_cmperr          53 compar.c       #define cmperr() (rb_cmperr(x, y), Qnil)
rb_cmperr         177 numeric.c      	rb_cmperr(x0, y0);
rb_cmperr        2668 numeric.c      	if (NIL_P(c)) rb_cmperr(i, to);
rb_cmperr        2707 numeric.c      	if (NIL_P(c)) rb_cmperr(i, to);


rb_cmpint

rb_cmpint        1571 array.c            n = rb_cmpint(retval, *a, *b);
rb_cmpint        1595 array.c            n = rb_cmpint(retval, a, b);
rb_cmpint          62 compar.c           if (rb_cmpint(c, a[0], a[1]) == 0) return Qtrue;
rb_cmpint         108 compar.c           if (rb_cmpint(c, x, y) > 0) return Qtrue;
rb_cmpint         127 compar.c           if (rb_cmpint(c, x, y) >= 0) return Qtrue;
rb_cmpint         146 compar.c           if (rb_cmpint(c, x, y) < 0) return Qtrue;
rb_cmpint         166 compar.c           if (rb_cmpint(c, x, y) <= 0) return Qtrue;
rb_cmpint         400 enum.c             return rb_cmpint(rb_funcall(a, id_cmp, 1, b), a, b);
rb_cmpint         615 enum.c         	if (rb_cmpint(cmp, i, *memo) < 0) {
rb_cmpint         634 enum.c         	if (rb_cmpint(cmp, i, *memo) < 0) {
rb_cmpint         693 enum.c         	if (rb_cmpint(cmp, i, *memo) > 0) {
rb_cmpint         712 enum.c         	if (rb_cmpint(cmp, i, *memo) > 0) {
rb_cmpint         126 intern.h       int rb_cmpint _((VALUE, VALUE, VALUE));
rb_cmpint         149 range.c            if (rb_cmpint(r, a, b) < 0) return Qtrue;
rb_cmpint         161 range.c            c = rb_cmpint(r, a, b);


rb_compile_error

rb_compile_error  137 intern.h       void rb_compile_error __((const char*, ...));
rb_compile_error 4084 parse.c        				rb_compile_error("both block arg and actual block given");
rb_compile_error 4105 parse.c        				rb_compile_error("both block arg and actual block given");
rb_compile_error 4126 parse.c        				rb_compile_error("both block arg and actual block given");
rb_compile_error 5233 parse.c        			    rb_compile_error("both block arg and actual block given");
rb_compile_error 5525 parse.c        			    rb_compile_error("both block arg and actual block given");
rb_compile_error 6514 parse.c            rb_compile_error("%s", msg);
rb_compile_error 6996 parse.c        	rb_compile_error("unknown regexp option%s - %s",
rb_compile_error 7099 parse.c        	    rb_compile_error("symbol cannot contain '\\0'");
rb_compile_error 7153 parse.c        	rb_compile_error("unterminated string meets end of file");
rb_compile_error 7187 parse.c        	    rb_compile_error("unterminated here document identifier");
rb_compile_error 7268 parse.c        	rb_compile_error("can't find string \"%s\" anywhere before EOF", eos);
rb_compile_error 7464 parse.c        			rb_compile_error("embedded document meets end of file");
rb_compile_error 7588 parse.c        	    rb_compile_error("incomplete character syntax");
rb_compile_error 8173 parse.c        		rb_compile_error("unterminated quoted string meets end of file");
rb_compile_error 8341 parse.c        		rb_compile_error("`@%c' is not allowed as an instance variable name", c);
rb_compile_error 8344 parse.c        		rb_compile_error("`@@%c' is not allowed as a class variable name", c);
rb_compile_error 8364 parse.c        	    rb_compile_error("Invalid char `\\%03o' in expression", c);
rb_compile_error 8855 parse.c            rb_compile_error("identifier %s is not valid", rb_id2name(id));
rb_compile_error 8914 parse.c        	rb_compile_error("identifier %s is not valid", rb_id2name(id));
rb_compile_error 8957 parse.c        	rb_compile_error("Can't set variable $%d", node->nd_nth);
rb_compile_error 8960 parse.c        	rb_compile_error("Can't set variable $%c", (int)node->nd_nth);
rb_compile_error 9442 parse.c        	rb_compile_error("block argument should not be given");
rb_compile_error  695 parse.y        				rb_compile_error("both block arg and actual block given");
rb_compile_error  712 parse.y        				rb_compile_error("both block arg and actual block given");
rb_compile_error  729 parse.y        				rb_compile_error("both block arg and actual block given");
rb_compile_error 1546 parse.y        			    rb_compile_error("both block arg and actual block given");
rb_compile_error 1797 parse.y        			    rb_compile_error("both block arg and actual block given");
rb_compile_error 2516 parse.y            rb_compile_error("%s", msg);
rb_compile_error 2998 parse.y        	rb_compile_error("unknown regexp option%s - %s",
rb_compile_error 3101 parse.y        	    rb_compile_error("symbol cannot contain '\\0'");
rb_compile_error 3155 parse.y        	rb_compile_error("unterminated string meets end of file");
rb_compile_error 3189 parse.y        	    rb_compile_error("unterminated here document identifier");
rb_compile_error 3270 parse.y        	rb_compile_error("can't find string \"%s\" anywhere before EOF", eos);
rb_compile_error 3466 parse.y        			rb_compile_error("embedded document meets end of file");
rb_compile_error 3590 parse.y        	    rb_compile_error("incomplete character syntax");
rb_compile_error 4175 parse.y        		rb_compile_error("unterminated quoted string meets end of file");
rb_compile_error 4343 parse.y        		rb_compile_error("`@%c' is not allowed as an instance variable name", c);
rb_compile_error 4346 parse.y        		rb_compile_error("`@@%c' is not allowed as a class variable name", c);
rb_compile_error 4366 parse.y        	    rb_compile_error("Invalid char `\\%03o' in expression", c);
rb_compile_error 4857 parse.y            rb_compile_error("identifier %s is not valid", rb_id2name(id));
rb_compile_error 4916 parse.y        	rb_compile_error("identifier %s is not valid", rb_id2name(id));
rb_compile_error 4959 parse.y        	rb_compile_error("Can't set variable $%d", node->nd_nth);
rb_compile_error 4962 parse.y        	rb_compile_error("Can't set variable $%c", (int)node->nd_nth);
rb_compile_error 5444 parse.y        	rb_compile_error("block argument should not be given");
rb_compile_error  530 re.c           	rb_compile_error("%s: %s", err, RSTRING(desc)->ptr);


rb_compile_error_append

rb_compile_error_append  138 intern.h       void rb_compile_error_append __((const char*, ...));
rb_compile_error_append 6533 parse.c        	rb_compile_error_append("%s", buf);
rb_compile_error_append 6544 parse.c        	rb_compile_error_append("%s", buf);
rb_compile_error_append 2535 parse.y        	rb_compile_error_append("%s", buf);
rb_compile_error_append 2546 parse.y        	rb_compile_error_append("%s", buf);


rb_compile_file

rb_compile_file   348 node.h         NODE *rb_compile_file _((const char*, VALUE, int));
rb_compile_file   943 ruby.c             rb_compile_file(fname, f, line_start);


rb_compile_string

rb_compile_string 6227 eval.c             node = rb_compile_string(file, src, line);
rb_compile_string  347 node.h         NODE *rb_compile_string _((const char*, VALUE, int));
rb_compile_string 6677 parse.c            return rb_compile_string(f, rb_str_new(s, len), line);
rb_compile_string 2679 parse.y            return rb_compile_string(f, rb_str_new(s, len), line);
rb_compile_string  813 ruby.c         	rb_compile_string(script, e_script, 1);


rb_const_defined

rb_const_defined  218 class.c            if (rb_const_defined(rb_cObject, id)) {
rb_const_defined  306 class.c            if (rb_const_defined(rb_cObject, id)) {
rb_const_defined 1813 eval.c         	if (NIL_P(klass)) return rb_const_defined(CLASS_OF(self), id);
rb_const_defined 1822 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 1293 ext/strscan/strscan.c     if (!rb_const_defined(rb_cObject, id_scanerr)) {
rb_const_defined 1067 ext/syck/rubyext.c         if ( !rb_const_defined( tclass, tpart ) ) return Qnil;
rb_const_defined  480 intern.h       int rb_const_defined _((VALUE, ID));
rb_const_defined 6572 parse.c        	rb_const_defined(rb_cObject, rb_intern("SCRIPT_LINES__"))) {
rb_const_defined 2574 parse.y        	rb_const_defined(rb_cObject, rb_intern("SCRIPT_LINES__"))) {
rb_const_defined  260 variable.c     	if (!rb_const_defined(c, id)) {


rb_const_defined_0

rb_const_defined_0 1612 variable.c         return rb_const_defined_0(klass, id, Qtrue, Qtrue);
rb_const_defined_0 1620 variable.c         return rb_const_defined_0(klass, id, Qfalse, Qtrue);
rb_const_defined_0 1628 variable.c         return rb_const_defined_0(klass, id, Qtrue, Qfalse);


rb_const_defined_at

rb_const_defined_at  250 class.c            if (rb_const_defined_at(outer, id)) {
rb_const_defined_at  328 class.c            if (rb_const_defined_at(outer, id)) {
rb_const_defined_at 3926 eval.c         	    if (rb_const_defined_at(cbase, cname)) {
rb_const_defined_at 3972 eval.c         	    if (rb_const_defined_at(cbase, cname)) {
rb_const_defined_at  481 intern.h       int rb_const_defined_at _((VALUE, ID));
rb_const_defined_at 1864 object.c           return rb_const_defined_at(mod, id);
rb_const_defined_at  200 struct.c       	if (rb_const_defined_at(klass, id)) {
rb_const_defined_at 1486 variable.c         if (rb_const_defined_at(mod, id)) {


rb_const_defined_from

rb_const_defined_from 2395 eval.c         		if (rb_const_defined_from(val, node->nd_mid))
rb_const_defined_from 2407 eval.c         	if (rb_const_defined_from(rb_cObject, node->nd_mid)) {
rb_const_defined_from  482 intern.h       int rb_const_defined_from _((VALUE, ID));


rb_const_get

rb_const_get      219 class.c        	klass = rb_const_get(rb_cObject, id);
rb_const_get      307 class.c        	module = rb_const_get(rb_cObject, id);
rb_const_get      904 error.c        	error = rb_const_get(klass, rb_intern("Errno"));
rb_const_get      966 error.c        	num = rb_const_get(klass, rb_intern("Errno"));
rb_const_get      968 error.c            e = rb_const_get(self, rb_intern("Errno"));
rb_const_get     1837 eval.c         	if (NIL_P(klass)) return rb_const_get(CLASS_OF(self), id);
rb_const_get     1847 eval.c             return rb_const_get(cref->nd_clss, id);
rb_const_get     5494 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     1068 ext/syck/rubyext.c         tclass = rb_const_get( tclass, tpart );
rb_const_get     2322 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     1951 ext/win32ole/win32ole.c     VALUE argv = rb_const_get(cWIN32OLE, rb_intern("ARGV"));
rb_const_get      483 intern.h       VALUE rb_const_get _((VALUE, ID));
rb_const_get     1817 object.c           return rb_const_get(mod, id);
rb_const_get     6575 parse.c        	hash = rb_const_get(rb_cObject, rb_intern("SCRIPT_LINES__"));
rb_const_get     2577 parse.y        	hash = rb_const_get(rb_cObject, rb_intern("SCRIPT_LINES__"));


rb_const_get_0

rb_const_get_0   1437 variable.c         return rb_const_get_0(klass, id, Qtrue, Qtrue);
rb_const_get_0   1445 variable.c         return rb_const_get_0(klass, id, Qfalse, Qtrue);
rb_const_get_0   1453 variable.c         return rb_const_get_0(klass, id, Qtrue, Qfalse);


rb_const_get_at

rb_const_get_at   251 class.c        	klass = rb_const_get_at(outer, id);
rb_const_get_at   329 class.c        	module = rb_const_get_at(outer, id);
rb_const_get_at  3927 eval.c         		klass = rb_const_get_at(cbase, cname);
rb_const_get_at  3973 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   484 intern.h       VALUE rb_const_get_at _((VALUE, ID));
rb_const_get_at   264 variable.c     	c = rb_const_get_at(c, id);


rb_const_get_from

rb_const_get_from 3649 eval.c         		    result = rb_const_get_from(klass, node->nd_mid);
rb_const_get_from 3664 eval.c         	result = rb_const_get_from(rb_cObject, node->nd_mid);
rb_const_get_from  485 intern.h       VALUE rb_const_get_from _((VALUE, ID));


rb_const_list

rb_const_list    1928 eval.c             return rb_const_list(data);
rb_const_list     477 intern.h       VALUE rb_const_list _((void*));
rb_const_list    1576 variable.c         return rb_const_list(rb_mod_const_of(mod, 0));


rb_const_set

rb_const_set      234 class.c            rb_const_set(rb_cObject, id, klass);
rb_const_set      266 class.c            rb_const_set(outer, id, klass);
rb_const_set      314 class.c            rb_const_set(rb_cObject, id, module);
rb_const_set      336 class.c            rb_const_set(outer, id, module);
rb_const_set     3578 eval.c         	    rb_const_set(class_prefix(self, node->nd_else), node->nd_else->nd_mid, result);
rb_const_set     3584 eval.c         	    rb_const_set(ruby_cbase, node->nd_vid, result);
rb_const_set     3948 eval.c         		rb_const_set(cbase, cname, klass);
rb_const_set     3985 eval.c         		rb_const_set(cbase, cname, module);
rb_const_set     5131 eval.c         	    rb_const_set(class_prefix(self, lhs->nd_else), lhs->nd_else->nd_mid, val);
rb_const_set     5134 eval.c         	    rb_const_set(ruby_cbase, lhs->nd_vid, val);
rb_const_set     1294 ext/strscan/strscan.c 	rb_const_set(rb_cObject, id_scanerr, ScanError);
rb_const_set     1298 ext/strscan/strscan.c     rb_const_set(StringScanner, rb_intern("Version"), tmp);
rb_const_set     1301 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      486 intern.h       void rb_const_set _((VALUE, ID, VALUE));
rb_const_set     1841 object.c           rb_const_set(mod, id, value);
rb_const_set     2504 object.c           rb_const_set((rb_cObject ? rb_cObject : obj), id, obj);
rb_const_set     1291 variable.c         rb_const_set(mod, id, Qundef);
rb_const_set     1690 variable.c         rb_const_set(klass, id, val);


rb_cont_call

rb_cont_call     12759 eval.c             rb_define_method(rb_cCont, "call", rb_cont_call, -1);
rb_cont_call     12760 eval.c             rb_define_method(rb_cCont, "[]", rb_cont_call, -1);


rb_convert_type

rb_convert_type   214 array.c            return rb_convert_type(ary, T_ARRAY, "Array", "to_ary");
rb_convert_type   933 array.c        	return rb_convert_type(obj, T_ARRAY, "Array", "to_ary");
rb_convert_type   876 enum.c         	argv[i] = rb_convert_type(argv[i], T_ARRAY, "Array", "to_a");
rb_convert_type   499 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   352 hash.c             return rb_convert_type(hash, T_HASH, "Hash", "to_hash");
rb_convert_type   316 intern.h       VALUE rb_convert_type _((VALUE,int,const char*,const char*));
rb_convert_type  3325 io.c               return rb_convert_type(io, T_FILE, "IO", "to_io");
rb_convert_type  2366 object.c       	  VALUE f = rb_convert_type(val, T_FLOAT, "Float", "to_f");
rb_convert_type  2434 object.c           return rb_convert_type(val, T_STRING, "String", "to_s");
rb_convert_type   255 string.c           return rb_convert_type(str, T_STRING, "String", "to_str");


rb_copy_generic_ivar

rb_copy_generic_ivar  463 intern.h       void rb_copy_generic_ivar _((VALUE,VALUE));
rb_copy_generic_ivar  213 object.c       	rb_copy_generic_ivar(dest, obj);
rb_copy_generic_ivar  299 ruby.h             if (FL_TEST(obj, FL_EXIVAR)) rb_copy_generic_ivar((VALUE)clone,(VALUE)obj);\
rb_copy_generic_ivar  303 ruby.h             if (FL_TEST(obj, FL_EXIVAR)) rb_copy_generic_ivar((VALUE)dup,(VALUE)obj);\
rb_copy_generic_ivar 1941 time.c         	rb_copy_generic_ivar(str, time);
rb_copy_generic_ivar 2018 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       70 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    323 intern.h       double rb_cstr_to_dbl _((const char*, int));
rb_cstr_to_dbl   2340 object.c           return rb_cstr_to_dbl(s, badcheck);


rb_cstr_to_inum

rb_cstr_to_inum   536 bignum.c           return rb_cstr_to_inum(s, base, badcheck);
rb_cstr_to_inum   604 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    68 intern.h       VALUE rb_cstr_to_inum _((const char*, int, int));
rb_cstr_to_inum  7810 parse.c        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 16, Qfalse));
rb_cstr_to_inum  7834 parse.c        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 2, Qfalse));
rb_cstr_to_inum  7858 parse.c        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 10, Qfalse));
rb_cstr_to_inum  7889 parse.c        			yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 8, Qfalse));
rb_cstr_to_inum  7987 parse.c        	    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 10, Qfalse));
rb_cstr_to_inum  3812 parse.y        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 16, Qfalse));
rb_cstr_to_inum  3836 parse.y        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 2, Qfalse));
rb_cstr_to_inum  3860 parse.y        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 10, Qfalse));
rb_cstr_to_inum  3891 parse.y        			yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 8, Qfalse));
rb_cstr_to_inum  3989 parse.y        	    yylval.node = NEW_LIT(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  2376 eval.c         	if (rb_cvar_defined(cvar_cbase(), node->nd_vid)) {
rb_cvar_defined    50 ext/digest/digest.c     if (rb_cvar_defined(klass, id_metadata) == Qfalse) {
rb_cvar_defined   489 intern.h       VALUE rb_cvar_defined _((VALUE, ID));
rb_cvar_defined  1928 variable.c         if (rb_cvar_defined(mod, id)) {


rb_cvar_get

rb_cvar_get      3625 eval.c         	result = rb_cvar_get(cvar_cbase(), node->nd_vid);
rb_cvar_get        54 ext/digest/digest.c     obj = rb_cvar_get(klass, id_metadata);
rb_cvar_get       492 intern.h       VALUE rb_cvar_get _((VALUE, ID));
rb_cvar_get      2073 object.c           return rb_cvar_get(obj, id);
rb_cvar_get      1826 variable.c         return rb_cvar_get(klass, id);


rb_cvar_set

rb_cvar_set      3593 eval.c         	rb_cvar_set(cvar_cbase(), node->nd_vid, result, Qtrue);
rb_cvar_set      3598 eval.c         	rb_cvar_set(cvar_cbase(), node->nd_vid, result, Qfalse);
rb_cvar_set      5142 eval.c         	rb_cvar_set(cvar_cbase(), lhs->nd_vid, val, Qtrue);
rb_cvar_set      5146 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        36 ext/digest/sha1/sha1init.c     rb_cvar_set(cDigest_SHA1, id_metadata,
rb_cvar_set        43 ext/digest/sha2/sha2init.c     rb_cvar_set(cDigest_SHA##bitlen, id_metadata, \
rb_cvar_set       491 intern.h       void rb_cvar_set _((VALUE, ID, VALUE, int));
rb_cvar_set      2107 object.c           rb_cvar_set(obj, id, val, Qfalse);
rb_cvar_set      1814 variable.c         rb_cvar_set(klass, id, val, Qfalse);
rb_cvar_set      1840 variable.c         rb_cvar_set(klass, id, val, Qtrue);


rb_data_object_alloc

rb_data_object_alloc  383 ruby.h         VALUE rb_data_object_alloc _((VALUE,void*,RUBY_DATA_FUNC,RUBY_DATA_FUNC));
rb_data_object_alloc  386 ruby.h             rb_data_object_alloc(klass,sval,(RUBY_DATA_FUNC)mark,(RUBY_DATA_FUNC)free)


rb_dbl2big

rb_dbl2big         85 intern.h       VALUE rb_dbl2big _((double));
rb_dbl2big       1229 numeric.c      	return rb_dbl2big(f);
rb_dbl2big       1256 numeric.c      	return rb_dbl2big(f);
rb_dbl2big       1290 numeric.c      	return rb_dbl2big(f);
rb_dbl2big       1316 numeric.c      	return rb_dbl2big(f);
rb_dbl2big       2205 object.c       	return rb_dbl2big(RFLOAT(val)->value);
rb_dbl2big        458 random.c                   vmax = rb_dbl2big(-RFLOAT(vmax)->value);
rb_dbl2big        460 random.c                   vmax = rb_dbl2big(RFLOAT(vmax)->value);
rb_dbl2big        494 sprintf.c      		    val = rb_dbl2big(RFLOAT(val)->value);


rb_dbl_cmp

rb_dbl_cmp        936 bignum.c       	return rb_dbl_cmp(rb_big2dbl(x), RFLOAT(y)->value);
rb_dbl_cmp        297 intern.h       VALUE rb_dbl_cmp _((double, double));
rb_dbl_cmp        914 numeric.c          return rb_dbl_cmp(a, b);


rb_define_alias

rb_define_alias  3002 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   885 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  6135 ext/win32ole/win32ole.c     rb_define_alias(cWIN32OLE, "ole_method_help", "ole_method");
rb_define_alias  6183 ext/win32ole/win32ole.c     rb_define_alias(cWIN32OLE_TYPE, "to_s", "name");
rb_define_alias  6203 ext/win32ole/win32ole.c     rb_define_alias(cWIN32OLE_VARIABLE, "to_s", "name");
rb_define_alias  6226 ext/win32ole/win32ole.c     rb_define_alias(cWIN32OLE_METHOD, "to_s", "name");
rb_define_alias  6237 ext/win32ole/win32ole.c     rb_define_alias(cWIN32OLE_PARAM, "to_s", "name");
rb_define_alias  5624 io.c               rb_define_alias(rb_cIO, "to_i", "fileno");
rb_define_alias  3473 process.c          rb_define_alias(rb_mProcUID, "eid=", "grant_privilege");
rb_define_alias  3474 process.c          rb_define_alias(rb_mProcGID, "eid=", "grant_privilege");
rb_define_alias   501 ruby.h         void rb_define_alias _((VALUE,const char*,const char*));


rb_define_alloc_func

rb_define_alloc_func 2970 array.c            rb_define_alloc_func(rb_cArray, ary_alloc);
rb_define_alloc_func 1534 dir.c              rb_define_alloc_func(rb_cDir, dir_s_alloc);
rb_define_alloc_func 12765 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  763 ext/dbm/dbm.c      rb_define_alloc_func(rb_cDBM, fdbm_alloc);
rb_define_alloc_func  302 ext/digest/digest.c     rb_define_alloc_func(cDigest_Base, rb_digest_base_alloc);
rb_define_alloc_func  206 ext/dl/handle.c   rb_define_alloc_func(rb_cDLHandle, rb_dlhandle_s_allocate);
rb_define_alloc_func 1031 ext/dl/ptr.c     rb_define_alloc_func(rb_cDLPtrData, rb_dlptr_s_allocate);
rb_define_alloc_func  971 ext/dl/sym.c     rb_define_alloc_func(rb_cDLSymbol, rb_dlsym_s_allocate);
rb_define_alloc_func  954 ext/gdbm/gdbm.c     rb_define_alloc_func(rb_cGDBM, fgdbm_s_alloc);
rb_define_alloc_func  878 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  363 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  871 ext/openssl/ossl_ssl.c     rb_define_alloc_func(cSSLContext, ossl_sslctx_s_alloc);
rb_define_alloc_func  880 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  745 ext/sdbm/init.c     rb_define_alloc_func(rb_cDBM, fsdbm_alloc);
rb_define_alloc_func 1249 ext/stringio/stringio.c     rb_define_alloc_func(StringIO, strio_s_allocate);
rb_define_alloc_func 1303 ext/strscan/strscan.c     rb_define_alloc_func(StringScanner, strscan_s_allocate);
rb_define_alloc_func 2245 ext/syck/rubyext.c     rb_define_alloc_func( cParser, syck_parser_s_alloc );
rb_define_alloc_func 2271 ext/syck/rubyext.c     rb_define_alloc_func( cScalar, syck_scalar_alloc );
rb_define_alloc_func 2277 ext/syck/rubyext.c     rb_define_alloc_func( cSeq, syck_seq_alloc );
rb_define_alloc_func 2283 ext/syck/rubyext.c     rb_define_alloc_func( cMap, syck_map_alloc );
rb_define_alloc_func 2349 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 6098 ext/win32ole/win32ole.c     rb_define_alloc_func(cWIN32OLE, fole_s_allocate);
rb_define_alloc_func 6176 ext/win32ole/win32ole.c     rb_define_alloc_func(cWIN32OLE_TYPE, foletype_s_allocate);
rb_define_alloc_func 6206 ext/win32ole/win32ole.c     rb_define_alloc_func(cWIN32OLE_METHOD, folemethod_s_allocate);
rb_define_alloc_func 6241 ext/win32ole/win32ole.c     rb_define_alloc_func(cWIN32OLE_EVENT, fev_s_allocate);
rb_define_alloc_func 3359 ext/zlib/zlib.c     rb_define_alloc_func(cDeflate, rb_deflate_s_allocate);
rb_define_alloc_func 3370 ext/zlib/zlib.c     rb_define_alloc_func(cInflate, rb_inflate_s_allocate);
rb_define_alloc_func 3442 ext/zlib/zlib.c     rb_define_alloc_func(cGzipWriter, rb_gzwriter_s_allocate);
rb_define_alloc_func 3453 ext/zlib/zlib.c     rb_define_alloc_func(cGzipReader, rb_gzreader_s_allocate);
rb_define_alloc_func 4431 file.c             rb_define_alloc_func(rb_cStat,  rb_stat_s_alloc);
rb_define_alloc_func 2421 hash.c             rb_define_alloc_func(rb_cHash, hash_alloc);
rb_define_alloc_func  153 intern.h       void rb_define_alloc_func _((VALUE, VALUE (*)(VALUE)));
rb_define_alloc_func 5580 io.c               rb_define_alloc_func(rb_cIO, io_alloc);
rb_define_alloc_func 2599 object.c           rb_define_alloc_func(rb_cObject, rb_class_allocate_instance);
rb_define_alloc_func 2718 object.c           rb_define_alloc_func(rb_cModule, rb_module_s_alloc);
rb_define_alloc_func 2749 object.c           rb_define_alloc_func(rb_cClass, rb_class_s_alloc);
rb_define_alloc_func 2252 re.c               rb_define_alloc_func(rb_cRegexp, rb_reg_s_alloc);
rb_define_alloc_func 2283 re.c               rb_define_alloc_func(rb_cMatch, match_alloc);
rb_define_alloc_func 4636 string.c           rb_define_alloc_func(rb_cString, str_alloc);
rb_define_alloc_func  209 struct.c           rb_define_alloc_func(nstr, struct_alloc);
rb_define_alloc_func 2049 time.c             rb_define_alloc_func(rb_cTime, time_s_alloc);


rb_define_attr

rb_define_attr   2219 ext/syck/rubyext.c     rb_define_attr( cResolver, "tags", 1, 1 );
rb_define_attr   2242 ext/syck/rubyext.c     rb_define_attr( cParser, "options", 1, 1 );
rb_define_attr   2243 ext/syck/rubyext.c     rb_define_attr( cParser, "resolver", 1, 1 );
rb_define_attr   2244 ext/syck/rubyext.c     rb_define_attr( cParser, "input", 1, 1 );
rb_define_attr   2258 ext/syck/rubyext.c     rb_define_attr( cNode, "emitter", 1, 1 );
rb_define_attr   2259 ext/syck/rubyext.c     rb_define_attr( cNode, "resolver", 1, 1 );
rb_define_attr   2260 ext/syck/rubyext.c     rb_define_attr( cNode, "kind", 1, 0 );
rb_define_attr   2261 ext/syck/rubyext.c     rb_define_attr( cNode, "type_id", 1, 0 );
rb_define_attr   2262 ext/syck/rubyext.c     rb_define_attr( cNode, "value", 1, 0 );
rb_define_attr   2272 ext/syck/rubyext.c     rb_define_attr( cNode, "value", 1, 0 );
rb_define_attr   2293 ext/syck/rubyext.c     rb_define_attr( cPrivateType, "type_id", 1, 1 );
rb_define_attr   2294 ext/syck/rubyext.c     rb_define_attr( cPrivateType, "value", 1, 1 );
rb_define_attr   2301 ext/syck/rubyext.c     rb_define_attr( cDomainType, "domain", 1, 1 );
rb_define_attr   2302 ext/syck/rubyext.c     rb_define_attr( cDomainType, "type_id", 1, 1 );
rb_define_attr   2303 ext/syck/rubyext.c     rb_define_attr( cDomainType, "value", 1, 1 );
rb_define_attr   2310 ext/syck/rubyext.c     rb_define_attr( cYObject, "class", 1, 1 );
rb_define_attr   2311 ext/syck/rubyext.c     rb_define_attr( cYObject, "ivars", 1, 1 );
rb_define_attr   2319 ext/syck/rubyext.c     rb_define_attr( cBadAlias, "name", 1, 1 );
rb_define_attr   2338 ext/syck/rubyext.c     rb_define_attr( cOut, "emitter", 1, 1 );
rb_define_attr   2348 ext/syck/rubyext.c     rb_define_attr( cEmitter, "level", 1, 1 );
rb_define_attr    502 ruby.h         void rb_define_attr _((VALUE,const char*,int,int));


rb_define_class

rb_define_class  2967 array.c            rb_cArray  = rb_define_class("Array", rb_cObject);
rb_define_class  2065 bignum.c           rb_cBignum = rb_define_class("Bignum", rb_cInteger);
rb_define_class  1530 dir.c              rb_cDir = rb_define_class("Dir", rb_cObject);
rb_define_class   987 error.c            rb_eException   = rb_define_class("Exception", rb_cObject);
rb_define_class   998 error.c            rb_eSystemExit  = rb_define_class("SystemExit", rb_eException);
rb_define_class  1003 error.c            rb_eFatal  	    = rb_define_class("fatal", rb_eException);
rb_define_class  1004 error.c            rb_eSignal      = rb_define_class("SignalException", rb_eException);
rb_define_class  1005 error.c            rb_eInterrupt   = rb_define_class("Interrupt", rb_eSignal);
rb_define_class  1007 error.c            rb_eStandardError = rb_define_class("StandardError", rb_eException);
rb_define_class  1008 error.c            rb_eTypeError     = rb_define_class("TypeError", rb_eStandardError);
rb_define_class  1009 error.c            rb_eArgError      = rb_define_class("ArgumentError", rb_eStandardError);
rb_define_class  1010 error.c            rb_eIndexError    = rb_define_class("IndexError", rb_eStandardError);
rb_define_class  1011 error.c            rb_eRangeError    = rb_define_class("RangeError", rb_eStandardError);
rb_define_class  1012 error.c            rb_eNameError     = rb_define_class("NameError", rb_eStandardError);
rb_define_class  1021 error.c            rb_eNoMethodError = rb_define_class("NoMethodError", rb_eNameError);
rb_define_class  1025 error.c            rb_eScriptError = rb_define_class("ScriptError", rb_eException);
rb_define_class  1026 error.c            rb_eSyntaxError = rb_define_class("SyntaxError", rb_eScriptError);
rb_define_class  1027 error.c            rb_eLoadError   = rb_define_class("LoadError", rb_eScriptError);
rb_define_class  1028 error.c            rb_eNotImpError = rb_define_class("NotImplementedError", rb_eScriptError);
rb_define_class  1030 error.c            rb_eRuntimeError = rb_define_class("RuntimeError", rb_eStandardError);
rb_define_class  1031 error.c            rb_eSecurityError = rb_define_class("SecurityError", rb_eStandardError);
rb_define_class  1032 error.c            rb_eNoMemError = rb_define_class("NoMemoryError", rb_eException);
rb_define_class  1035 error.c            rb_eSystemCallError = rb_define_class("SystemCallError", rb_eStandardError);
rb_define_class  9453 eval.c             rb_eLocalJumpError = rb_define_class("LocalJumpError", rb_eStandardError);
rb_define_class  9460 eval.c             rb_eSysStackError = rb_define_class("SystemStackError", rb_eStandardError);
rb_define_class  9465 eval.c             rb_cProc = rb_define_class("Proc", rb_cObject);
rb_define_class  9482 eval.c             rb_cMethod = rb_define_class("Method", rb_cObject);
rb_define_class  9496 eval.c             rb_cUnboundMethod = rb_define_class("UnboundMethod", rb_cObject);
rb_define_class  9546 eval.c             rb_cBinding = rb_define_class("Binding", rb_cObject);
rb_define_class  12706 eval.c             rb_eThreadError = rb_define_class("ThreadError", rb_eStandardError);
rb_define_class  12707 eval.c             rb_cThread = rb_define_class("Thread", rb_cObject);
rb_define_class  12756 eval.c             rb_cCont = rb_define_class("Continuation", rb_cObject);
rb_define_class  12764 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   759 ext/dbm/dbm.c      rb_cDBM = rb_define_class("DBM", rb_cObject);
rb_define_class   760 ext/dbm/dbm.c      rb_eDBMError = rb_define_class("DBMError", rb_eStandardError);
rb_define_class   949 ext/gdbm/gdbm.c     rb_cGDBM = rb_define_class("GDBM", rb_cObject);
rb_define_class   950 ext/gdbm/gdbm.c     rb_eGDBMError = rb_define_class("GDBMError", rb_eStandardError);
rb_define_class   951 ext/gdbm/gdbm.c     rb_eGDBMFatalError = rb_define_class("GDBMFatalError", rb_eException);
rb_define_class   876 ext/iconv/iconv.c     VALUE rb_cIconv = rb_define_class("Iconv", rb_cData);
rb_define_class   741 ext/sdbm/init.c     rb_cDBM = rb_define_class("SDBM", rb_cObject);
rb_define_class   742 ext/sdbm/init.c     rb_eDBMError = rb_define_class("SDBMError", rb_eStandardError);
rb_define_class  3136 ext/socket/socket.c     rb_eSocket = rb_define_class("SocketError", rb_eStandardError);
rb_define_class  3138 ext/socket/socket.c     rb_cBasicSocket = rb_define_class("BasicSocket", rb_cIO);
rb_define_class  3157 ext/socket/socket.c     rb_cIPSocket = rb_define_class("IPSocket", rb_cBasicSocket);
rb_define_class  3164 ext/socket/socket.c     rb_cTCPSocket = rb_define_class("TCPSocket", rb_cIPSocket);
rb_define_class  3170 ext/socket/socket.c     rb_cSOCKSSocket = rb_define_class("SOCKSSocket", rb_cTCPSocket);
rb_define_class  3178 ext/socket/socket.c     rb_cTCPServer = rb_define_class("TCPServer", rb_cTCPSocket);
rb_define_class  3185 ext/socket/socket.c     rb_cUDPSocket = rb_define_class("UDPSocket", rb_cIPSocket);
rb_define_class  3193 ext/socket/socket.c     rb_cUNIXSocket = rb_define_class("UNIXSocket", rb_cBasicSocket);
rb_define_class  3205 ext/socket/socket.c     rb_cUNIXServer = rb_define_class("UNIXServer", rb_cUNIXSocket);
rb_define_class  3213 ext/socket/socket.c     rb_cSocket = rb_define_class("Socket", rb_cBasicSocket);
rb_define_class  1246 ext/stringio/stringio.c     VALUE StringIO = rb_define_class("StringIO", rb_cData);
rb_define_class  1291 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  6096 ext/win32ole/win32ole.c     cWIN32OLE = rb_define_class("WIN32OLE", rb_cObject);
rb_define_class  6172 ext/win32ole/win32ole.c     cWIN32OLE_TYPE = rb_define_class("WIN32OLE_TYPE", rb_cObject);
rb_define_class  6195 ext/win32ole/win32ole.c     cWIN32OLE_VARIABLE = rb_define_class("WIN32OLE_VARIABLE", rb_cObject);
rb_define_class  6205 ext/win32ole/win32ole.c     cWIN32OLE_METHOD = rb_define_class("WIN32OLE_METHOD", rb_cObject);
rb_define_class  6228 ext/win32ole/win32ole.c     cWIN32OLE_PARAM = rb_define_class("WIN32OLE_PARAM", rb_cObject);
rb_define_class  6239 ext/win32ole/win32ole.c     cWIN32OLE_EVENT = rb_define_class("WIN32OLE_EVENT", rb_cObject);
rb_define_class  6247 ext/win32ole/win32ole.c     eWIN32OLE_RUNTIME_ERROR = rb_define_class("WIN32OLERuntimeError", rb_eRuntimeError);
rb_define_class  4335 file.c             rb_cFile = rb_define_class("File", rb_cIO);
rb_define_class  2417 hash.c             rb_cHash = rb_define_class("Hash", rb_cObject);
rb_define_class  5551 io.c               rb_eIOError = rb_define_class("IOError", rb_eStandardError);
rb_define_class  5552 io.c               rb_eEOFError = rb_define_class("EOFError", rb_eIOError);
rb_define_class  5577 io.c               rb_cIO = rb_define_class("IO", rb_cObject);
rb_define_class  2787 numeric.c          rb_eZeroDivError = rb_define_class("ZeroDivisionError", rb_eStandardError);
rb_define_class  2788 numeric.c          rb_eFloatDomainError = rb_define_class("FloatDomainError", rb_eRangeError);
rb_define_class  2789 numeric.c          rb_cNumeric = rb_define_class("Numeric", rb_cObject);
rb_define_class  2818 numeric.c          rb_cInteger = rb_define_class("Integer", rb_cNumeric);
rb_define_class  2837 numeric.c          rb_cFixnum = rb_define_class("Fixnum", rb_cInteger);
rb_define_class  2881 numeric.c          rb_cFloat  = rb_define_class("Float", rb_cNumeric);
rb_define_class  2668 object.c           rb_cNilClass = rb_define_class("NilClass", rb_cObject);
rb_define_class  2683 object.c           rb_cSymbol = rb_define_class("Symbol", rb_cObject);
rb_define_class  2753 object.c           rb_cData = rb_define_class("Data", rb_cObject);
rb_define_class  2760 object.c           rb_cTrueClass = rb_define_class("TrueClass", rb_cObject);
rb_define_class  2769 object.c           rb_cFalseClass = rb_define_class("FalseClass", rb_cObject);
rb_define_class   649 range.c            rb_cRange = rb_define_class("Range", rb_cObject);
rb_define_class  2224 re.c               rb_eRegexpError = rb_define_class("RegexpError", rb_eStandardError);
rb_define_class  2251 re.c               rb_cRegexp = rb_define_class("Regexp", rb_cObject);
rb_define_class  2281 re.c               rb_cMatch  = rb_define_class("MatchData", rb_cObject);
rb_define_class   478 ruby.h         VALUE rb_define_class _((const char*,VALUE));
rb_define_class  4633 string.c           rb_cString  = rb_define_class("String", rb_cObject);
rb_define_class   894 struct.c           rb_cStruct = rb_define_class("Struct", rb_cObject);
rb_define_class  2046 time.c             rb_cTime = rb_define_class("Time", rb_cObject);


rb_define_class_id

rb_define_class_id  231 class.c            klass = rb_define_class_id(id, super);
rb_define_class_id  264 class.c            klass = rb_define_class_id(id, super);
rb_define_class_id 3946 eval.c         		klass = rb_define_class_id(cname, super);
rb_define_class_id  107 intern.h       VALUE rb_define_class_id _((ID, VALUE));


rb_define_class_under

rb_define_class_under  840 error.c        	error = rb_define_class_under(rb_mErrno, name, rb_eSystemCallError);
rb_define_class_under 1016 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  300 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   32 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  690 ext/dl/dl.c      rb_eDLError = rb_define_class_under(rb_mDL, "DLError", rb_eStandardError);
rb_define_class_under  691 ext/dl/dl.c      rb_eDLTypeError = rb_define_class_under(rb_mDL, "DLTypeError", rb_eDLError);
rb_define_class_under  205 ext/dl/handle.c   rb_cDLHandle = rb_define_class_under(rb_mDL, "Handle", rb_cObject);
rb_define_class_under 1030 ext/dl/ptr.c     rb_cDLPtrData = rb_define_class_under(rb_mDL, "PtrData", rb_cObject);
rb_define_class_under  970 ext/dl/sym.c     rb_cDLSymbol = rb_define_class_under(rb_mDL, "Symbol", rb_cObject);
rb_define_class_under  283 ext/enumerator/enumerator.c     rb_cEnumerator = rb_define_class_under(rb_mEnumerable, "Enumerator", rb_cObject);
rb_define_class_under  892 ext/iconv/iconv.c     rb_eIconvInvalidEncoding = rb_define_class_under(rb_cIconv, "InvalidEncoding", rb_eArgError);
rb_define_class_under  893 ext/iconv/iconv.c     rb_eIconvIllegalSeq = rb_define_class_under(rb_cIconv, "IllegalSequence", rb_eArgError);
rb_define_class_under  894 ext/iconv/iconv.c     rb_eIconvInvalidChar = rb_define_class_under(rb_cIconv, "InvalidCharacter", rb_eArgError);
rb_define_class_under  895 ext/iconv/iconv.c     rb_eIconvOutOfRange = rb_define_class_under(rb_cIconv, "OutOfRange", rb_eRuntimeError);
rb_define_class_under  896 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  360 ext/openssl/ossl_cipher.c     eCipherError = rb_define_class_under(mOSSL, "CipherError", eOSSLError);
rb_define_class_under  361 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  867 ext/openssl/ossl_ssl.c     eSSLError = rb_define_class_under(mSSL, "SSLError", eOSSLError);
rb_define_class_under  870 ext/openssl/ossl_ssl.c     cSSLContext = rb_define_class_under(mSSL, "SSLContext", rb_cObject);
rb_define_class_under  879 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 1292 ext/strscan/strscan.c     ScanError = rb_define_class_under(StringScanner, "Error", rb_eStandardError);
rb_define_class_under 2218 ext/syck/rubyext.c     cResolver = rb_define_class_under( rb_syck, "Resolver", rb_cObject );
rb_define_class_under 2241 ext/syck/rubyext.c     cParser = rb_define_class_under( rb_syck, "Parser", rb_cObject );
rb_define_class_under 2256 ext/syck/rubyext.c     cNode = rb_define_class_under( rb_syck, "Node", rb_cObject );
rb_define_class_under 2270 ext/syck/rubyext.c     cScalar = rb_define_class_under( rb_syck, "Scalar", cNode );
rb_define_class_under 2276 ext/syck/rubyext.c     cSeq = rb_define_class_under( rb_syck, "Seq", cNode );
rb_define_class_under 2282 ext/syck/rubyext.c     cMap = rb_define_class_under( rb_syck, "Map", cNode );
rb_define_class_under 2292 ext/syck/rubyext.c     cPrivateType = rb_define_class_under( rb_yaml, "PrivateType", rb_cObject );
rb_define_class_under 2300 ext/syck/rubyext.c     cDomainType = rb_define_class_under( rb_yaml, "DomainType", rb_cObject );
rb_define_class_under 2309 ext/syck/rubyext.c     cYObject = rb_define_class_under( rb_yaml, "Object", rb_cObject );
rb_define_class_under 2318 ext/syck/rubyext.c     cBadAlias = rb_define_class_under( rb_syck, "BadAlias", rb_cObject );
rb_define_class_under 2327 ext/syck/rubyext.c     cMergeKey = rb_define_class_under( rb_syck, "MergeKey", rb_cObject );
rb_define_class_under 2332 ext/syck/rubyext.c     cDefaultKey = rb_define_class_under( rb_syck, "DefaultKey", rb_cObject );
rb_define_class_under 2337 ext/syck/rubyext.c     cOut = rb_define_class_under( rb_syck, "Out", rb_cObject );
rb_define_class_under 2347 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 3316 ext/zlib/zlib.c     cZError = rb_define_class_under(mZlib, "Error", rb_eStandardError);
rb_define_class_under 3317 ext/zlib/zlib.c     cStreamEnd    = rb_define_class_under(mZlib, "StreamEnd", cZError);
rb_define_class_under 3318 ext/zlib/zlib.c     cNeedDict     = rb_define_class_under(mZlib, "NeedDict", cZError);
rb_define_class_under 3319 ext/zlib/zlib.c     cDataError    = rb_define_class_under(mZlib, "DataError", cZError);
rb_define_class_under 3320 ext/zlib/zlib.c     cStreamError  = rb_define_class_under(mZlib, "StreamError", cZError);
rb_define_class_under 3321 ext/zlib/zlib.c     cMemError     = rb_define_class_under(mZlib, "MemError", cZError);
rb_define_class_under 3322 ext/zlib/zlib.c     cBufError     = rb_define_class_under(mZlib, "BufError", cZError);
rb_define_class_under 3323 ext/zlib/zlib.c     cVersionError = rb_define_class_under(mZlib, "VersionError", cZError);
rb_define_class_under 3333 ext/zlib/zlib.c     cZStream = rb_define_class_under(mZlib, "ZStream", rb_cObject);
rb_define_class_under 3357 ext/zlib/zlib.c     cDeflate = rb_define_class_under(mZlib, "Deflate", cZStream);
rb_define_class_under 3368 ext/zlib/zlib.c     cInflate = rb_define_class_under(mZlib, "Inflate", cZStream);
rb_define_class_under 3404 ext/zlib/zlib.c     cGzipFile = rb_define_class_under(mZlib, "GzipFile", rb_cObject);
rb_define_class_under 3405 ext/zlib/zlib.c     cGzError = rb_define_class_under(cGzipFile, "Error", cZError);
rb_define_class_under 3407 ext/zlib/zlib.c     cNoFooter = rb_define_class_under(cGzipFile, "NoFooter", cGzError);
rb_define_class_under 3408 ext/zlib/zlib.c     cCRCError = rb_define_class_under(cGzipFile, "CRCError", cGzError);
rb_define_class_under 3409 ext/zlib/zlib.c     cLengthError = rb_define_class_under(cGzipFile,"LengthError",cGzError);
rb_define_class_under 3411 ext/zlib/zlib.c     cGzipWriter = rb_define_class_under(mZlib, "GzipWriter", cGzipFile);
rb_define_class_under 3412 ext/zlib/zlib.c     cGzipReader = rb_define_class_under(mZlib, "GzipReader", cGzipFile);
rb_define_class_under 4430 file.c             rb_cStat = rb_define_class_under(rb_cFile, "Stat", rb_cObject);
rb_define_class_under 3398 process.c          rb_cProcStatus = rb_define_class_under(rb_mProcess, "Status", rb_cObject);
rb_define_class_under  480 ruby.h         VALUE rb_define_class_under _((VALUE, const char*, VALUE));
rb_define_class_under  204 struct.c       	nstr = rb_define_class_under(klass, rb_id2name(id), klass);


rb_define_const

rb_define_const   841 error.c        	rb_define_const(error, "Errno", INT2NUM(n));
rb_define_const   845 error.c        	rb_define_const(rb_mErrno, name, error);
rb_define_const  12772 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   808 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "READER",  INT2FIX(O_RDONLY|RUBY_DBM_RW_BIT));
rb_define_const   809 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "WRITER",  INT2FIX(O_RDWR|RUBY_DBM_RW_BIT));
rb_define_const   810 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "WRCREAT", INT2FIX(O_RDWR|O_CREAT|RUBY_DBM_RW_BIT));
rb_define_const   811 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "NEWDB",   INT2FIX(O_RDWR|O_CREAT|O_TRUNC|RUBY_DBM_RW_BIT));
rb_define_const   814 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "VERSION",  rb_str_new2(DB_VERSION_STRING));
rb_define_const   695 ext/dl/dl.c      rb_define_const(rb_mDL, "FuncTable", DLFuncTable);
rb_define_const   697 ext/dl/dl.c      rb_define_const(rb_mDL, "RTLD_GLOBAL", INT2NUM(RTLD_GLOBAL));
rb_define_const   698 ext/dl/dl.c      rb_define_const(rb_mDL, "RTLD_LAZY",   INT2NUM(RTLD_LAZY));
rb_define_const   699 ext/dl/dl.c      rb_define_const(rb_mDL, "RTLD_NOW",    INT2NUM(RTLD_NOW));
rb_define_const   701 ext/dl/dl.c      rb_define_const(rb_mDL, "ALIGN_INT",   INT2NUM(ALIGN_INT));
rb_define_const   702 ext/dl/dl.c      rb_define_const(rb_mDL, "ALIGN_LONG",  INT2NUM(ALIGN_LONG));
rb_define_const   703 ext/dl/dl.c      rb_define_const(rb_mDL, "ALIGN_FLOAT", INT2NUM(ALIGN_FLOAT));
rb_define_const   704 ext/dl/dl.c      rb_define_const(rb_mDL, "ALIGN_SHORT", INT2NUM(ALIGN_SHORT));
rb_define_const   705 ext/dl/dl.c      rb_define_const(rb_mDL, "ALIGN_DOUBLE",INT2NUM(ALIGN_DOUBLE));
rb_define_const   706 ext/dl/dl.c      rb_define_const(rb_mDL, "ALIGN_VOIDP", INT2NUM(ALIGN_VOIDP));
rb_define_const   708 ext/dl/dl.c      rb_define_const(rb_mDL, "MAX_ARG", INT2NUM(MAX_ARG));
rb_define_const   709 ext/dl/dl.c      rb_define_const(rb_mDL, "DLSTACK", rb_tainted_str_new2(DLSTACK_METHOD));
rb_define_const   723 ext/dl/dl.c      rb_define_const(rb_mDL, "FREE", rb_dlsym_new(dlfree, "free", "0P"));
rb_define_const  1063 ext/dl/ptr.c     rb_define_const(rb_mDLMemorySpace, "MemoryTable", DLMemoryTable);
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  1005 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "READER",  INT2FIX(GDBM_READER|RUBY_GDBM_RW_BIT));
rb_define_const  1006 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "WRITER",  INT2FIX(GDBM_WRITER|RUBY_GDBM_RW_BIT));
rb_define_const  1007 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "WRCREAT", INT2FIX(GDBM_WRCREAT|RUBY_GDBM_RW_BIT));
rb_define_const  1008 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "NEWDB",   INT2FIX(GDBM_NEWDB|RUBY_GDBM_RW_BIT));
rb_define_const  1010 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "FAST", INT2FIX(GDBM_FAST));
rb_define_const  1016 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "SYNC",    INT2FIX(GDBM_SYNC));
rb_define_const  1019 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "NOLOCK",  INT2FIX(GDBM_NOLOCK));
rb_define_const  1021 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   899 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   792 ext/readline/readline.c     rb_define_const(mReadline, "HISTORY", history);
rb_define_const   797 ext/readline/readline.c     rb_define_const(mReadline, "FILENAME_COMPLETION_PROC", fcomp);
rb_define_const   802 ext/readline/readline.c     rb_define_const(mReadline, "USERNAME_COMPLETION_PROC", ucomp);
rb_define_const   804 ext/readline/readline.c     rb_define_const(mReadline, "VERSION", rb_str_new2(rl_library_version));
rb_define_const   806 ext/readline/readline.c     rb_define_const(mReadline, "VERSION",
rb_define_const  3104 ext/socket/socket.c     rb_define_const(rb_cSocket, name, INT2FIX(value));
rb_define_const  3105 ext/socket/socket.c     rb_define_const(mConst, name, INT2FIX(value));
rb_define_const  2148 ext/syck/rubyext.c     rb_define_const( rb_syck, "VERSION", rb_str_new2( SYCK_VERSION ) );
rb_define_const  2232 ext/syck/rubyext.c     rb_define_const( rb_syck, "DefaultResolver", oDefaultResolver );
rb_define_const  2236 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  1308 ext/win32ole/win32ole.c                     rb_define_const(klass, pName, val);
rb_define_const  1324 ext/win32ole/win32ole.c     rb_define_const(klass, "CONSTANTS", constant);
rb_define_const  6138 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "VERSION", rb_str_new2(WIN32OLE_VERSION));
rb_define_const  6139 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "ARGV", rb_ary_new());
rb_define_const  6140 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_ACP"       ,INT2FIX(CP_ACP));
rb_define_const  6141 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_OEMCP"     ,INT2FIX(CP_OEMCP));
rb_define_const  6142 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_MACCP"     ,INT2FIX(CP_MACCP));
rb_define_const  6143 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_THREAD_ACP",INT2FIX(CP_THREAD_ACP));
rb_define_const  6144 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_SYMBOL"    ,INT2FIX(CP_SYMBOL));
rb_define_const  6145 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_UTF7"      ,INT2FIX(CP_UTF7));
rb_define_const  6146 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_UTF8"      ,INT2FIX(CP_UTF8));
rb_define_const  6149 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_I2", INT2FIX(VT_I2));
rb_define_const  6150 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_I4", INT2FIX(VT_I4));
rb_define_const  6151 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_R4", INT2FIX(VT_R4));
rb_define_const  6152 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_R8", INT2FIX(VT_R8));
rb_define_const  6153 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_CY", INT2FIX(VT_CY));
rb_define_const  6154 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_DATE", INT2FIX(VT_DATE));
rb_define_const  6155 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_BSTR", INT2FIX(VT_BSTR));
rb_define_const  6156 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_USERDEFINED", INT2FIX(VT_USERDEFINED));
rb_define_const  6157 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_PTR", INT2FIX(VT_PTR));
rb_define_const  6158 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_DISPATCH", INT2FIX(VT_DISPATCH));
rb_define_const  6159 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_ERROR", INT2FIX(VT_ERROR));
rb_define_const  6160 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_BOOL", INT2FIX(VT_BOOL));
rb_define_const  6161 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_VARIANT", INT2FIX(VT_VARIANT));
rb_define_const  6162 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_UNKNOWN", INT2FIX(VT_UNKNOWN));
rb_define_const  6163 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_I1", INT2FIX(VT_I1));
rb_define_const  6164 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_UI1", INT2FIX(VT_UI1));
rb_define_const  6165 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_UI2", INT2FIX(VT_UI2));
rb_define_const  6166 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_UI4", INT2FIX(VT_UI4));
rb_define_const  6167 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_INT", INT2FIX(VT_INT));
rb_define_const  6168 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_UINT", INT2FIX(VT_UINT));
rb_define_const  6169 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_ARRAY", INT2FIX(VT_ARRAY));
rb_define_const  6170 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_BYREF", INT2FIX(VT_BYREF));
rb_define_const  3330 ext/zlib/zlib.c     rb_define_const(mZlib, "VERSION", rb_str_new2(RUBY_ZLIB_VERSION));
rb_define_const  3331 ext/zlib/zlib.c     rb_define_const(mZlib, "ZLIB_VERSION", rb_str_new2(ZLIB_VERSION));
rb_define_const  3353 ext/zlib/zlib.c     rb_define_const(mZlib, "BINARY", INT2FIX(Z_BINARY));
rb_define_const  3354 ext/zlib/zlib.c     rb_define_const(mZlib, "ASCII", INT2FIX(Z_ASCII));
rb_define_const  3355 ext/zlib/zlib.c     rb_define_const(mZlib, "UNKNOWN", INT2FIX(Z_UNKNOWN));
rb_define_const  3378 ext/zlib/zlib.c     rb_define_const(mZlib, "NO_COMPRESSION", INT2FIX(Z_NO_COMPRESSION));
rb_define_const  3379 ext/zlib/zlib.c     rb_define_const(mZlib, "BEST_SPEED", INT2FIX(Z_BEST_SPEED));
rb_define_const  3380 ext/zlib/zlib.c     rb_define_const(mZlib, "BEST_COMPRESSION", INT2FIX(Z_BEST_COMPRESSION));
rb_define_const  3381 ext/zlib/zlib.c     rb_define_const(mZlib, "DEFAULT_COMPRESSION",
rb_define_const  3384 ext/zlib/zlib.c     rb_define_const(mZlib, "FILTERED", INT2FIX(Z_FILTERED));
rb_define_const  3385 ext/zlib/zlib.c     rb_define_const(mZlib, "HUFFMAN_ONLY", INT2FIX(Z_HUFFMAN_ONLY));
rb_define_const  3386 ext/zlib/zlib.c     rb_define_const(mZlib, "DEFAULT_STRATEGY", INT2FIX(Z_DEFAULT_STRATEGY));
rb_define_const  3388 ext/zlib/zlib.c     rb_define_const(mZlib, "MAX_WBITS", INT2FIX(MAX_WBITS));
rb_define_const  3389 ext/zlib/zlib.c     rb_define_const(mZlib, "DEF_MEM_LEVEL", INT2FIX(DEF_MEM_LEVEL));
rb_define_const  3390 ext/zlib/zlib.c     rb_define_const(mZlib, "MAX_MEM_LEVEL", INT2FIX(MAX_MEM_LEVEL));
rb_define_const  3392 ext/zlib/zlib.c     rb_define_const(mZlib, "NO_FLUSH", INT2FIX(Z_NO_FLUSH));
rb_define_const  3393 ext/zlib/zlib.c     rb_define_const(mZlib, "SYNC_FLUSH", INT2FIX(Z_SYNC_FLUSH));
rb_define_const  3394 ext/zlib/zlib.c     rb_define_const(mZlib, "FULL_FLUSH", INT2FIX(Z_FULL_FLUSH));
rb_define_const  3395 ext/zlib/zlib.c     rb_define_const(mZlib, "FINISH", INT2FIX(Z_FINISH));
rb_define_const  3468 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_CODE", INT2FIX(OS_CODE));
rb_define_const  3469 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_MSDOS", INT2FIX(OS_MSDOS));
rb_define_const  3470 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_AMIGA", INT2FIX(OS_AMIGA));
rb_define_const  3471 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_VMS", INT2FIX(OS_VMS));
rb_define_const  3472 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_UNIX", INT2FIX(OS_UNIX));
rb_define_const  3473 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_ATARI", INT2FIX(OS_ATARI));
rb_define_const  3474 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_OS2", INT2FIX(OS_OS2));
rb_define_const  3475 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_MACOS", INT2FIX(OS_MACOS));
rb_define_const  3476 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_TOPS20", INT2FIX(OS_TOPS20));
rb_define_const  3477 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_WIN32", INT2FIX(OS_WIN32));
rb_define_const  3479 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_VMCMS", INT2FIX(OS_VMCMS));
rb_define_const  3480 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_ZSYSTEM", INT2FIX(OS_ZSYSTEM));
rb_define_const  3481 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_CPM", INT2FIX(OS_CPM));
rb_define_const  3482 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_QDOS", INT2FIX(OS_QDOS));
rb_define_const  3483 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_RISCOS", INT2FIX(OS_RISCOS));
rb_define_const  3484 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_UNKNOWN", INT2FIX(OS_UNKNOWN));
rb_define_const  4027 file.c             rb_define_const(rb_mFConst, name, value);
rb_define_const  4395 file.c             rb_define_const(rb_cFile, "Separator", separator);
rb_define_const  4396 file.c             rb_define_const(rb_cFile, "SEPARATOR", separator);
rb_define_const  4401 file.c             rb_define_const(rb_cFile, "ALT_SEPARATOR", rb_obj_freeze(rb_str_new2("\\")));
rb_define_const  4403 file.c             rb_define_const(rb_cFile, "ALT_SEPARATOR", Qnil);
rb_define_const  4405 file.c             rb_define_const(rb_cFile, "PATH_SEPARATOR", rb_obj_freeze(rb_str_new2(PATH_SEP)));
rb_define_const  5648 io.c               rb_define_const(rb_cIO, "SEEK_SET", INT2FIX(SEEK_SET));
rb_define_const  5649 io.c               rb_define_const(rb_cIO, "SEEK_CUR", INT2FIX(SEEK_CUR));
rb_define_const  5650 io.c               rb_define_const(rb_cIO, "SEEK_END", INT2FIX(SEEK_END));
rb_define_const  1488 marshal.c          rb_define_const(rb_mMarshal, "MAJOR_VERSION", INT2FIX(MARSHAL_MAJOR));
rb_define_const  1489 marshal.c          rb_define_const(rb_mMarshal, "MINOR_VERSION", INT2FIX(MARSHAL_MINOR));
rb_define_const   484 math.c             rb_define_const(rb_mMath, "PI", rb_float_new(M_PI));
rb_define_const   486 math.c             rb_define_const(rb_mMath, "PI", rb_float_new(atan(1.0)*4.0));
rb_define_const   490 math.c             rb_define_const(rb_mMath, "E", rb_float_new(M_E));
rb_define_const   492 math.c             rb_define_const(rb_mMath, "E", rb_float_new(exp(1.0)));
rb_define_const  2889 numeric.c          rb_define_const(rb_cFloat, "ROUNDS", INT2FIX(FLT_ROUNDS));
rb_define_const  2890 numeric.c          rb_define_const(rb_cFloat, "RADIX", INT2FIX(FLT_RADIX));
rb_define_const  2891 numeric.c          rb_define_const(rb_cFloat, "MANT_DIG", INT2FIX(DBL_MANT_DIG));
rb_define_const  2892 numeric.c          rb_define_const(rb_cFloat, "DIG", INT2FIX(DBL_DIG));
rb_define_const  2893 numeric.c          rb_define_const(rb_cFloat, "MIN_EXP", INT2FIX(DBL_MIN_EXP));
rb_define_const  2894 numeric.c          rb_define_const(rb_cFloat, "MAX_EXP", INT2FIX(DBL_MAX_EXP));
rb_define_const  2895 numeric.c          rb_define_const(rb_cFloat, "MIN_10_EXP", INT2FIX(DBL_MIN_10_EXP));
rb_define_const  2896 numeric.c          rb_define_const(rb_cFloat, "MAX_10_EXP", INT2FIX(DBL_MAX_10_EXP));
rb_define_const  2897 numeric.c          rb_define_const(rb_cFloat, "MIN", rb_float_new(DBL_MIN));
rb_define_const  2898 numeric.c          rb_define_const(rb_cFloat, "MAX", rb_float_new(DBL_MAX));
rb_define_const  2899 numeric.c          rb_define_const(rb_cFloat, "EPSILON", rb_float_new(DBL_EPSILON));
rb_define_const  3374 process.c          rb_define_const(rb_mProcess, "WNOHANG", INT2FIX(WNOHANG));
rb_define_const  3376 process.c          rb_define_const(rb_mProcess, "WNOHANG", INT2FIX(0));
rb_define_const  3379 process.c          rb_define_const(rb_mProcess, "WUNTRACED", INT2FIX(WUNTRACED));
rb_define_const  3381 process.c          rb_define_const(rb_mProcess, "WUNTRACED", INT2FIX(0));
rb_define_const  3434 process.c          rb_define_const(rb_mProcess, "PRIO_PROCESS", INT2FIX(PRIO_PROCESS));
rb_define_const  3435 process.c          rb_define_const(rb_mProcess, "PRIO_PGRP", INT2FIX(PRIO_PGRP));
rb_define_const  3436 process.c          rb_define_const(rb_mProcess, "PRIO_USER", INT2FIX(PRIO_USER));
rb_define_const  2275 re.c               rb_define_const(rb_cRegexp, "IGNORECASE", INT2FIX(RE_OPTION_IGNORECASE));
rb_define_const  2276 re.c               rb_define_const(rb_cRegexp, "EXTENDED", INT2FIX(RE_OPTION_EXTENDED));
rb_define_const  2277 re.c               rb_define_const(rb_cRegexp, "MULTILINE", INT2FIX(RE_OPTION_MULTILINE));
rb_define_const   492 ruby.h         void rb_define_const _((VALUE,const char*,VALUE));
rb_define_const  1698 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  364 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 1335 eval.c         	rb_define_global_const("TOPLEVEL_BINDING", rb_f_binding(ruby_top_self));
rb_define_global_const 3158 ext/socket/socket.c     rb_define_global_const("IPsocket", rb_cIPSocket);
rb_define_global_const 3165 ext/socket/socket.c     rb_define_global_const("TCPsocket", rb_cTCPSocket);
rb_define_global_const 3171 ext/socket/socket.c     rb_define_global_const("SOCKSsocket", rb_cSOCKSSocket);
rb_define_global_const 3179 ext/socket/socket.c     rb_define_global_const("TCPserver", rb_cTCPServer);
rb_define_global_const 3186 ext/socket/socket.c     rb_define_global_const("UDPsocket", rb_cUDPSocket);
rb_define_global_const 3194 ext/socket/socket.c     rb_define_global_const("UNIXsocket", rb_cUNIXSocket);
rb_define_global_const 3206 ext/socket/socket.c     rb_define_global_const("UNIXserver", rb_cUNIXServer);
rb_define_global_const 2521 hash.c             rb_define_global_const("ENV", envtbl);
rb_define_global_const 2524 hash.c             rb_define_global_const("ENV", envtbl);
rb_define_global_const 5687 io.c               rb_define_global_const("STDIN", rb_stdin);
rb_define_global_const 5688 io.c               rb_define_global_const("STDOUT", rb_stdout);
rb_define_global_const 5689 io.c               rb_define_global_const("STDERR", rb_stderr);
rb_define_global_const 5694 io.c               rb_define_global_const("ARGF", argf);
rb_define_global_const 2681 object.c           rb_define_global_const("NIL", Qnil);
rb_define_global_const 2767 object.c           rb_define_global_const("TRUE", Qtrue);
rb_define_global_const 2776 object.c           rb_define_global_const("FALSE", Qfalse);
rb_define_global_const 2282 re.c               rb_define_global_const("MatchingData", rb_cMatch);
rb_define_global_const  945 ruby.c         	rb_define_global_const("DATA", f);
rb_define_global_const 1145 ruby.c             rb_define_global_const("ARGV", rb_argv);
rb_define_global_const  493 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_const   33 version.c          rb_define_global_const("VERSION", v);
rb_define_global_const   34 version.c          rb_define_global_const("RELEASE_DATE", d);
rb_define_global_const   35 version.c          rb_define_global_const("PLATFORM", p);


rb_define_global_function

rb_define_global_function 1042 error.c            rb_define_global_function("warn", rb_warn_m, 1);
rb_define_global_function 7777 eval.c             rb_define_global_function("eval", rb_f_eval, -1);
rb_define_global_function 7778 eval.c             rb_define_global_function("iterator?", rb_f_block_given_p, 0);
rb_define_global_function 7779 eval.c             rb_define_global_function("block_given?", rb_f_block_given_p, 0);
rb_define_global_function 7780 eval.c             rb_define_global_function("method_missing", rb_method_missing, -1);
rb_define_global_function 7781 eval.c             rb_define_global_function("loop", rb_f_loop, 0);
rb_define_global_function 7788 eval.c             rb_define_global_function("raise", rb_f_raise, -1);
rb_define_global_function 7789 eval.c             rb_define_global_function("fail", rb_f_raise, -1);
rb_define_global_function 7791 eval.c             rb_define_global_function("caller", rb_f_caller, -1);
rb_define_global_function 7793 eval.c             rb_define_global_function("exit", rb_f_exit, -1);
rb_define_global_function 7794 eval.c             rb_define_global_function("abort", rb_f_abort, -1);
rb_define_global_function 7796 eval.c             rb_define_global_function("at_exit", rb_f_at_exit, 0);
rb_define_global_function 7798 eval.c             rb_define_global_function("catch", rb_f_catch, 1);
rb_define_global_function 7799 eval.c             rb_define_global_function("throw", rb_f_throw, -1);
rb_define_global_function 7800 eval.c             rb_define_global_function("global_variables", rb_f_global_variables, 0); /* in variable.c */
rb_define_global_function 7801 eval.c             rb_define_global_function("local_variables", rb_f_local_variables, 0);
rb_define_global_function 7839 eval.c             rb_define_global_function("trace_var", rb_f_trace_var, -1); /* in variable.c */
rb_define_global_function 7840 eval.c             rb_define_global_function("untrace_var", rb_f_untrace_var, -1); /* in variable.c */
rb_define_global_function 7842 eval.c             rb_define_global_function("set_trace_func", set_trace_func, 1);
rb_define_global_function 7947 eval.c             rb_define_global_function("load", rb_f_load, -1);
rb_define_global_function 7948 eval.c             rb_define_global_function("require", rb_f_require, 1);
rb_define_global_function 7951 eval.c             rb_define_global_function("autoload",  rb_f_autoload,   2);
rb_define_global_function 7952 eval.c             rb_define_global_function("autoload?", rb_f_autoload_p, 1);
rb_define_global_function 9479 eval.c             rb_define_global_function("proc", proc_lambda, 0);
rb_define_global_function 9480 eval.c             rb_define_global_function("lambda", proc_lambda, 0);
rb_define_global_function 9550 eval.c             rb_define_global_function("binding", rb_f_binding, 0);
rb_define_global_function 12761 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 4428 file.c             rb_define_global_function("test", rb_f_test, -1);
rb_define_global_function 5558 io.c               rb_define_global_function("syscall", rb_f_syscall, -1);
rb_define_global_function 5560 io.c               rb_define_global_function("open", rb_f_open, -1);
rb_define_global_function 5561 io.c               rb_define_global_function("printf", rb_f_printf, -1);
rb_define_global_function 5562 io.c               rb_define_global_function("print", rb_f_print, -1);
rb_define_global_function 5563 io.c               rb_define_global_function("putc", rb_f_putc, 1);
rb_define_global_function 5564 io.c               rb_define_global_function("puts", rb_f_puts, -1);
rb_define_global_function 5565 io.c               rb_define_global_function("gets", rb_f_gets, -1);
rb_define_global_function 5566 io.c               rb_define_global_function("readline", rb_f_readline, -1);
rb_define_global_function 5567 io.c               rb_define_global_function("getc", rb_f_getc, 0);
rb_define_global_function 5568 io.c               rb_define_global_function("select", rb_f_select, -1);
rb_define_global_function 5570 io.c               rb_define_global_function("readlines", rb_f_readlines, -1);
rb_define_global_function 5572 io.c               rb_define_global_function("`", rb_f_backquote, 1);
rb_define_global_function 5574 io.c               rb_define_global_function("p", rb_f_p, -1);
rb_define_global_function 2659 object.c           rb_define_global_function("sprintf", rb_f_sprintf, -1); /* in sprintf.c */
rb_define_global_function 2660 object.c           rb_define_global_function("format", rb_f_sprintf, -1);  /* in sprintf.c  */
rb_define_global_function 2662 object.c           rb_define_global_function("Integer", rb_f_integer, 1);
rb_define_global_function 2663 object.c           rb_define_global_function("Float", rb_f_float, 1);
rb_define_global_function 2665 object.c           rb_define_global_function("String", rb_f_string, 1);
rb_define_global_function 2666 object.c           rb_define_global_function("Array", rb_f_array, 1);
rb_define_global_function 3364 process.c          rb_define_global_function("exec", rb_f_exec, -1);
rb_define_global_function 3365 process.c          rb_define_global_function("fork", rb_f_fork, 0);
rb_define_global_function 3366 process.c          rb_define_global_function("exit!", rb_f_exit_bang, -1);
rb_define_global_function 3367 process.c          rb_define_global_function("system", rb_f_system, -1);
rb_define_global_function 3368 process.c          rb_define_global_function("sleep", rb_f_sleep, -1);
rb_define_global_function  500 random.c           rb_define_global_function("srand", rb_f_srand, -1);
rb_define_global_function  501 random.c           rb_define_global_function("rand", rb_f_rand, -1);
rb_define_global_function  498 ruby.h         void rb_define_global_function _((const char*,VALUE(*)(ANYARGS),int));
rb_define_global_function  860 signal.c           rb_define_global_function("trap", sig_trap, -1);
rb_define_global_function 4733 string.c           rb_define_global_function("sub", rb_f_sub, -1);
rb_define_global_function 4734 string.c           rb_define_global_function("gsub", rb_f_gsub, -1);
rb_define_global_function 4736 string.c           rb_define_global_function("sub!", rb_f_sub_bang, -1);
rb_define_global_function 4737 string.c           rb_define_global_function("gsub!", rb_f_gsub_bang, -1);
rb_define_global_function 4739 string.c           rb_define_global_function("chop", rb_f_chop, 0);
rb_define_global_function 4740 string.c           rb_define_global_function("chop!", rb_f_chop_bang, 0);
rb_define_global_function 4742 string.c           rb_define_global_function("chomp", rb_f_chomp, -1);
rb_define_global_function 4743 string.c           rb_define_global_function("chomp!", rb_f_chomp_bang, -1);
rb_define_global_function 4745 string.c           rb_define_global_function("split", rb_f_split, -1);
rb_define_global_function 4746 string.c           rb_define_global_function("scan", rb_f_scan, 1);


rb_define_hooked_variable

rb_define_hooked_variable 7775 eval.c             rb_define_hooked_variable("$!", &ruby_errinfo, 0, errinfo_setter);
rb_define_hooked_variable 5595 io.c               rb_define_hooked_variable("$,", &rb_output_fs, 0, rb_str_setter);
rb_define_hooked_variable 5601 io.c               rb_define_hooked_variable("$/", &rb_rs, 0, rb_str_setter);
rb_define_hooked_variable 5602 io.c               rb_define_hooked_variable("$-0", &rb_rs, 0, rb_str_setter);
rb_define_hooked_variable 5603 io.c               rb_define_hooked_variable("$\\", &rb_output_rs, 0, rb_str_setter);
rb_define_hooked_variable 5605 io.c               rb_define_hooked_variable("$.", &lineno, 0, lineno_setter);
rb_define_hooked_variable 5674 io.c               rb_define_hooked_variable("$stdout", &rb_stdout, 0, stdout_setter);
rb_define_hooked_variable 5676 io.c               rb_define_hooked_variable("$stderr", &rb_stderr, 0, stdout_setter);
rb_define_hooked_variable 5678 io.c               rb_define_hooked_variable("$>", &rb_stdout, 0, stdout_setter);
rb_define_hooked_variable 5683 io.c               rb_define_hooked_variable("$defout", &rb_stdout, 0, defout_setter);
rb_define_hooked_variable 5684 io.c               rb_define_hooked_variable("$deferr", &rb_stderr, 0, deferr_setter);
rb_define_hooked_variable 1132 ruby.c             rb_define_hooked_variable("$VERBOSE", &ruby_verbose, 0, verbose_setter);
rb_define_hooked_variable 1133 ruby.c             rb_define_hooked_variable("$-v", &ruby_verbose, 0, verbose_setter);
rb_define_hooked_variable 1134 ruby.c             rb_define_hooked_variable("$-w", &ruby_verbose, 0, verbose_setter);
rb_define_hooked_variable 1140 ruby.c             rb_define_hooked_variable("$0", &rb_progname, 0, set_arg0);
rb_define_hooked_variable 1141 ruby.c             rb_define_hooked_variable("$PROGRAM_NAME", &rb_progname, 0, set_arg0);
rb_define_hooked_variable  488 ruby.h         void rb_define_hooked_variable _((const char*,VALUE*,VALUE(*)(ANYARGS),void(*)(ANYARGS)));
rb_define_hooked_variable  515 variable.c         rb_define_hooked_variable(name, var, 0, 0);
rb_define_hooked_variable  523 variable.c         rb_define_hooked_variable(name, var, 0, readonly_setter);
rb_define_hooked_variable  534 variable.c         rb_define_hooked_variable(name, 0, getter, setter);


rb_define_method

rb_define_method 2972 array.c            rb_define_method(rb_cArray, "initialize", rb_ary_initialize, -1);
rb_define_method 2973 array.c            rb_define_method(rb_cArray, "initialize_copy", rb_ary_replace, 1);
rb_define_method 2975 array.c            rb_define_method(rb_cArray, "to_s", rb_ary_to_s, 0);
rb_define_method 2976 array.c            rb_define_method(rb_cArray, "inspect", rb_ary_inspect, 0);
rb_define_method 2977 array.c            rb_define_method(rb_cArray, "to_a", rb_ary_to_a, 0);
rb_define_method 2978 array.c            rb_define_method(rb_cArray, "to_ary", rb_ary_to_ary_m, 0);
rb_define_method 2979 array.c            rb_define_method(rb_cArray, "frozen?",  rb_ary_frozen_p, 0);
rb_define_method 2981 array.c            rb_define_method(rb_cArray, "==", rb_ary_equal, 1);
rb_define_method 2982 array.c            rb_define_method(rb_cArray, "eql?", rb_ary_eql, 1);
rb_define_method 2983 array.c            rb_define_method(rb_cArray, "hash", rb_ary_hash, 0);
rb_define_method 2985 array.c            rb_define_method(rb_cArray, "[]", rb_ary_aref, -1);
rb_define_method 2986 array.c            rb_define_method(rb_cArray, "[]=", rb_ary_aset, -1);
rb_define_method 2987 array.c            rb_define_method(rb_cArray, "at", rb_ary_at, 1);
rb_define_method 2988 array.c            rb_define_method(rb_cArray, "fetch", rb_ary_fetch, -1);
rb_define_method 2989 array.c            rb_define_method(rb_cArray, "first", rb_ary_first, -1);
rb_define_method 2990 array.c            rb_define_method(rb_cArray, "last", rb_ary_last, -1);
rb_define_method 2991 array.c            rb_define_method(rb_cArray, "concat", rb_ary_concat, 1);
rb_define_method 2992 array.c            rb_define_method(rb_cArray, "<<", rb_ary_push, 1);
rb_define_method 2993 array.c            rb_define_method(rb_cArray, "push", rb_ary_push_m, -1);
rb_define_method 2994 array.c            rb_define_method(rb_cArray, "pop", rb_ary_pop, 0);
rb_define_method 2995 array.c            rb_define_method(rb_cArray, "shift", rb_ary_shift, 0);
rb_define_method 2996 array.c            rb_define_method(rb_cArray, "unshift", rb_ary_unshift_m, -1);
rb_define_method 2997 array.c            rb_define_method(rb_cArray, "insert", rb_ary_insert, -1);
rb_define_method 2998 array.c            rb_define_method(rb_cArray, "each", rb_ary_each, 0);
rb_define_method 2999 array.c            rb_define_method(rb_cArray, "each_index", rb_ary_each_index, 0);
rb_define_method 3000 array.c            rb_define_method(rb_cArray, "reverse_each", rb_ary_reverse_each, 0);
rb_define_method 3001 array.c            rb_define_method(rb_cArray, "length", rb_ary_length, 0);
rb_define_method 3003 array.c            rb_define_method(rb_cArray, "empty?", rb_ary_empty_p, 0);
rb_define_method 3004 array.c            rb_define_method(rb_cArray, "index", rb_ary_index, 1);
rb_define_method 3005 array.c            rb_define_method(rb_cArray, "rindex", rb_ary_rindex, 1);
rb_define_method 3006 array.c            rb_define_method(rb_cArray, "indexes", rb_ary_indexes, -1);
rb_define_method 3007 array.c            rb_define_method(rb_cArray, "indices", rb_ary_indexes, -1);
rb_define_method 3008 array.c            rb_define_method(rb_cArray, "join", rb_ary_join_m, -1);
rb_define_method 3009 array.c            rb_define_method(rb_cArray, "reverse", rb_ary_reverse_m, 0);
rb_define_method 3010 array.c            rb_define_method(rb_cArray, "reverse!", rb_ary_reverse_bang, 0);
rb_define_method 3011 array.c            rb_define_method(rb_cArray, "sort", rb_ary_sort, 0);
rb_define_method 3012 array.c            rb_define_method(rb_cArray, "sort!", rb_ary_sort_bang, 0);
rb_define_method 3013 array.c            rb_define_method(rb_cArray, "collect", rb_ary_collect, 0);
rb_define_method 3014 array.c            rb_define_method(rb_cArray, "collect!", rb_ary_collect_bang, 0);
rb_define_method 3015 array.c            rb_define_method(rb_cArray, "map", rb_ary_collect, 0);
rb_define_method 3016 array.c            rb_define_method(rb_cArray, "map!", rb_ary_collect_bang, 0);
rb_define_method 3017 array.c            rb_define_method(rb_cArray, "select", rb_ary_select, 0);
rb_define_method 3018 array.c            rb_define_method(rb_cArray, "values_at", rb_ary_values_at, -1);
rb_define_method 3019 array.c            rb_define_method(rb_cArray, "delete", rb_ary_delete, 1);
rb_define_method 3020 array.c            rb_define_method(rb_cArray, "delete_at", rb_ary_delete_at_m, 1);
rb_define_method 3021 array.c            rb_define_method(rb_cArray, "delete_if", rb_ary_delete_if, 0);
rb_define_method 3022 array.c            rb_define_method(rb_cArray, "reject", rb_ary_reject, 0);
rb_define_method 3023 array.c            rb_define_method(rb_cArray, "reject!", rb_ary_reject_bang, 0);
rb_define_method 3024 array.c            rb_define_method(rb_cArray, "zip", rb_ary_zip, -1);
rb_define_method 3025 array.c            rb_define_method(rb_cArray, "transpose", rb_ary_transpose, 0);
rb_define_method 3026 array.c            rb_define_method(rb_cArray, "replace", rb_ary_replace, 1);
rb_define_method 3027 array.c            rb_define_method(rb_cArray, "clear", rb_ary_clear, 0);
rb_define_method 3028 array.c            rb_define_method(rb_cArray, "fill", rb_ary_fill, -1);
rb_define_method 3029 array.c            rb_define_method(rb_cArray, "include?", rb_ary_includes, 1);
rb_define_method 3030 array.c            rb_define_method(rb_cArray, "<=>", rb_ary_cmp, 1);
rb_define_method 3032 array.c            rb_define_method(rb_cArray, "slice", rb_ary_aref, -1);
rb_define_method 3033 array.c            rb_define_method(rb_cArray, "slice!", rb_ary_slice_bang, -1);
rb_define_method 3035 array.c            rb_define_method(rb_cArray, "assoc", rb_ary_assoc, 1);
rb_define_method 3036 array.c            rb_define_method(rb_cArray, "rassoc", rb_ary_rassoc, 1);
rb_define_method 3038 array.c            rb_define_method(rb_cArray, "+", rb_ary_plus, 1);
rb_define_method 3039 array.c            rb_define_method(rb_cArray, "*", rb_ary_times, 1);
rb_define_method 3041 array.c            rb_define_method(rb_cArray, "-", rb_ary_diff, 1);
rb_define_method 3042 array.c            rb_define_method(rb_cArray, "&", rb_ary_and, 1);
rb_define_method 3043 array.c            rb_define_method(rb_cArray, "|", rb_ary_or, 1);
rb_define_method 3045 array.c            rb_define_method(rb_cArray, "uniq", rb_ary_uniq, 0);
rb_define_method 3046 array.c            rb_define_method(rb_cArray, "uniq!", rb_ary_uniq_bang, 0);
rb_define_method 3047 array.c            rb_define_method(rb_cArray, "compact", rb_ary_compact, 0);
rb_define_method 3048 array.c            rb_define_method(rb_cArray, "compact!", rb_ary_compact_bang, 0);
rb_define_method 3049 array.c            rb_define_method(rb_cArray, "flatten", rb_ary_flatten, 0);
rb_define_method 3050 array.c            rb_define_method(rb_cArray, "flatten!", rb_ary_flatten_bang, 0);
rb_define_method 3051 array.c            rb_define_method(rb_cArray, "nitems", rb_ary_nitems, 0);
rb_define_method 2067 bignum.c           rb_define_method(rb_cBignum, "to_s", rb_big_to_s, -1);
rb_define_method 2068 bignum.c           rb_define_method(rb_cBignum, "coerce", rb_big_coerce, 1);
rb_define_method 2069 bignum.c           rb_define_method(rb_cBignum, "-@", rb_big_uminus, 0);
rb_define_method 2070 bignum.c           rb_define_method(rb_cBignum, "+", rb_big_plus, 1);
rb_define_method 2071 bignum.c           rb_define_method(rb_cBignum, "-", rb_big_minus, 1);
rb_define_method 2072 bignum.c           rb_define_method(rb_cBignum, "*", rb_big_mul, 1);
rb_define_method 2073 bignum.c           rb_define_method(rb_cBignum, "/", rb_big_div, 1);
rb_define_method 2074 bignum.c           rb_define_method(rb_cBignum, "%", rb_big_modulo, 1);
rb_define_method 2075 bignum.c           rb_define_method(rb_cBignum, "div", rb_big_div, 1);
rb_define_method 2076 bignum.c           rb_define_method(rb_cBignum, "divmod", rb_big_divmod, 1);
rb_define_method 2077 bignum.c           rb_define_method(rb_cBignum, "modulo", rb_big_modulo, 1);
rb_define_method 2078 bignum.c           rb_define_method(rb_cBignum, "remainder", rb_big_remainder, 1);
rb_define_method 2079 bignum.c           rb_define_method(rb_cBignum, "quo", rb_big_quo, 1);
rb_define_method 2080 bignum.c           rb_define_method(rb_cBignum, "**", rb_big_pow, 1);
rb_define_method 2081 bignum.c           rb_define_method(rb_cBignum, "&", rb_big_and, 1);
rb_define_method 2082 bignum.c           rb_define_method(rb_cBignum, "|", rb_big_or, 1);
rb_define_method 2083 bignum.c           rb_define_method(rb_cBignum, "^", rb_big_xor, 1);
rb_define_method 2084 bignum.c           rb_define_method(rb_cBignum, "~", rb_big_neg, 0);
rb_define_method 2085 bignum.c           rb_define_method(rb_cBignum, "<<", rb_big_lshift, 1);
rb_define_method 2086 bignum.c           rb_define_method(rb_cBignum, ">>", rb_big_rshift, 1);
rb_define_method 2087 bignum.c           rb_define_method(rb_cBignum, "[]", rb_big_aref, 1);
rb_define_method 2089 bignum.c           rb_define_method(rb_cBignum, "<=>", rb_big_cmp, 1);
rb_define_method 2090 bignum.c           rb_define_method(rb_cBignum, "==", rb_big_eq, 1);
rb_define_method 2091 bignum.c           rb_define_method(rb_cBignum, "eql?", rb_big_eql, 1);
rb_define_method 2092 bignum.c           rb_define_method(rb_cBignum, "hash", rb_big_hash, 0);
rb_define_method 2093 bignum.c           rb_define_method(rb_cBignum, "to_f", rb_big_to_f, 0);
rb_define_method 2094 bignum.c           rb_define_method(rb_cBignum, "abs", rb_big_abs, 0);
rb_define_method 2095 bignum.c           rb_define_method(rb_cBignum, "size", rb_big_size, 0);
rb_define_method  899 class.c            rb_define_method(rb_singleton_class(obj), name, func, argc);
rb_define_method  235 compar.c           rb_define_method(rb_mComparable, "==", cmp_equal, 1);
rb_define_method  236 compar.c           rb_define_method(rb_mComparable, ">", cmp_gt, 1);
rb_define_method  237 compar.c           rb_define_method(rb_mComparable, ">=", cmp_ge, 1);
rb_define_method  238 compar.c           rb_define_method(rb_mComparable, "<", cmp_lt, 1);
rb_define_method  239 compar.c           rb_define_method(rb_mComparable, "<=", cmp_le, 1);
rb_define_method  240 compar.c           rb_define_method(rb_mComparable, "between?", cmp_between, 2);
rb_define_method 1539 dir.c              rb_define_method(rb_cDir,"initialize", dir_initialize, 1);
rb_define_method 1540 dir.c              rb_define_method(rb_cDir,"path", dir_path, 0);
rb_define_method 1541 dir.c              rb_define_method(rb_cDir,"read", dir_read, 0);
rb_define_method 1542 dir.c              rb_define_method(rb_cDir,"each", dir_each, 0);
rb_define_method 1543 dir.c              rb_define_method(rb_cDir,"rewind", dir_rewind, 0);
rb_define_method 1544 dir.c              rb_define_method(rb_cDir,"tell", dir_tell, 0);
rb_define_method 1545 dir.c              rb_define_method(rb_cDir,"seek", dir_seek, 1);
rb_define_method 1546 dir.c              rb_define_method(rb_cDir,"pos", dir_tell, 0);
rb_define_method 1547 dir.c              rb_define_method(rb_cDir,"pos=", dir_set_pos, 1);
rb_define_method 1548 dir.c              rb_define_method(rb_cDir,"close", dir_close, 0);
rb_define_method  903 enum.c             rb_define_method(rb_mEnumerable,"to_a", enum_to_a, 0);
rb_define_method  904 enum.c             rb_define_method(rb_mEnumerable,"entries", enum_to_a, 0);
rb_define_method  906 enum.c             rb_define_method(rb_mEnumerable,"sort", enum_sort, 0);
rb_define_method  907 enum.c             rb_define_method(rb_mEnumerable,"sort_by", enum_sort_by, 0);
rb_define_method  908 enum.c             rb_define_method(rb_mEnumerable,"grep", enum_grep, 1);
rb_define_method  909 enum.c             rb_define_method(rb_mEnumerable,"find", enum_find, -1);
rb_define_method  910 enum.c             rb_define_method(rb_mEnumerable,"detect", enum_find, -1);
rb_define_method  911 enum.c             rb_define_method(rb_mEnumerable,"find_all", enum_find_all, 0);
rb_define_method  912 enum.c             rb_define_method(rb_mEnumerable,"select", enum_find_all, 0);
rb_define_method  913 enum.c             rb_define_method(rb_mEnumerable,"reject", enum_reject, 0);
rb_define_method  914 enum.c             rb_define_method(rb_mEnumerable,"collect", enum_collect, 0);
rb_define_method  915 enum.c             rb_define_method(rb_mEnumerable,"map", enum_collect, 0);
rb_define_method  916 enum.c             rb_define_method(rb_mEnumerable,"inject", enum_inject, -1);
rb_define_method  917 enum.c             rb_define_method(rb_mEnumerable,"partition", enum_partition, 0);
rb_define_method  918 enum.c             rb_define_method(rb_mEnumerable,"all?", enum_all, 0);
rb_define_method  919 enum.c             rb_define_method(rb_mEnumerable,"any?", enum_any, 0);
rb_define_method  920 enum.c             rb_define_method(rb_mEnumerable,"min", enum_min, 0);
rb_define_method  921 enum.c             rb_define_method(rb_mEnumerable,"max", enum_max, 0);
rb_define_method  922 enum.c             rb_define_method(rb_mEnumerable,"member?", enum_member, 1);
rb_define_method  923 enum.c             rb_define_method(rb_mEnumerable,"include?", enum_member, 1);
rb_define_method  924 enum.c             rb_define_method(rb_mEnumerable,"each_with_index", enum_each_with_index, 0);
rb_define_method  925 enum.c             rb_define_method(rb_mEnumerable, "zip", enum_zip, -1);
rb_define_method  989 error.c            rb_define_method(rb_eException, "exception", exc_exception, -1);
rb_define_method  990 error.c            rb_define_method(rb_eException, "initialize", exc_initialize, -1);
rb_define_method  991 error.c            rb_define_method(rb_eException, "to_s", exc_to_s, 0);
rb_define_method  992 error.c            rb_define_method(rb_eException, "to_str", exc_to_str, 0);
rb_define_method  993 error.c            rb_define_method(rb_eException, "message", exc_to_str, 0);
rb_define_method  994 error.c            rb_define_method(rb_eException, "inspect", exc_inspect, 0);
rb_define_method  995 error.c            rb_define_method(rb_eException, "backtrace", exc_backtrace, 0);
rb_define_method  996 error.c            rb_define_method(rb_eException, "set_backtrace", exc_set_backtrace, 1);
rb_define_method  999 error.c            rb_define_method(rb_eSystemExit, "initialize", exit_initialize, -1);
rb_define_method 1000 error.c            rb_define_method(rb_eSystemExit, "status", exit_status, 0);
rb_define_method 1001 error.c            rb_define_method(rb_eSystemExit, "success?", exit_success_p, 0);
rb_define_method 1013 error.c            rb_define_method(rb_eNameError, "initialize", name_err_initialize, -1);
rb_define_method 1014 error.c            rb_define_method(rb_eNameError, "name", name_err_name, 0);
rb_define_method 1015 error.c            rb_define_method(rb_eNameError, "to_s", name_err_to_s, 0);
rb_define_method 1018 error.c            rb_define_method(rb_cNameErrorMesg, "to_str", name_err_mesg_to_str, 0);
rb_define_method 1019 error.c            rb_define_method(rb_cNameErrorMesg, "_dump", name_err_mesg_to_str, 1);
rb_define_method 1022 error.c            rb_define_method(rb_eNoMethodError, "initialize", nometh_err_initialize, -1);
rb_define_method 1023 error.c            rb_define_method(rb_eNoMethodError, "args", nometh_err_args, 0);
rb_define_method 1036 error.c            rb_define_method(rb_eSystemCallError, "initialize", syserr_initialize, -1);
rb_define_method 1037 error.c            rb_define_method(rb_eSystemCallError, "errno", syserr_errno, 0);
rb_define_method 7783 eval.c             rb_define_method(rb_mKernel, "respond_to?", obj_respond_to, -1);
rb_define_method 7803 eval.c             rb_define_method(rb_mKernel, "send", rb_f_send, -1);
rb_define_method 7804 eval.c             rb_define_method(rb_mKernel, "__send__", rb_f_send, -1);
rb_define_method 7805 eval.c             rb_define_method(rb_mKernel, "instance_eval", rb_obj_instance_eval, -1);
rb_define_method 7814 eval.c             rb_define_method(rb_cModule, "method_defined?", rb_mod_method_defined, 1);
rb_define_method 7815 eval.c             rb_define_method(rb_cModule, "public_method_defined?", rb_mod_public_method_defined, 1);
rb_define_method 7816 eval.c             rb_define_method(rb_cModule, "private_method_defined?", rb_mod_private_method_defined, 1);
rb_define_method 7817 eval.c             rb_define_method(rb_cModule, "protected_method_defined?", rb_mod_protected_method_defined, 1);
rb_define_method 7818 eval.c             rb_define_method(rb_cModule, "public_class_method", rb_mod_public_method, -1);
rb_define_method 7819 eval.c             rb_define_method(rb_cModule, "private_class_method", rb_mod_private_method, -1);
rb_define_method 7820 eval.c             rb_define_method(rb_cModule, "module_eval", rb_mod_module_eval, -1);
rb_define_method 7821 eval.c             rb_define_method(rb_cModule, "class_eval", rb_mod_module_eval, -1);
rb_define_method 7837 eval.c             rb_define_method(rb_mKernel, "extend", rb_obj_extend, -1);
rb_define_method 7949 eval.c             rb_define_method(rb_cModule, "autoload",  rb_mod_autoload,   2);
rb_define_method 7950 eval.c             rb_define_method(rb_cModule, "autoload?", rb_mod_autoload_p, 1);
rb_define_method 9428 eval.c             rb_define_method(rb_cBinding, "dup", proc_dup, 0);
rb_define_method 9454 eval.c             rb_define_method(rb_eLocalJumpError, "exit_value", localjump_xvalue, 0);
rb_define_method 9455 eval.c             rb_define_method(rb_eLocalJumpError, "reason", localjump_reason, 0);
rb_define_method 9469 eval.c             rb_define_method(rb_cProc, "clone", proc_clone, 0);
rb_define_method 9470 eval.c             rb_define_method(rb_cProc, "dup", proc_dup, 0);
rb_define_method 9471 eval.c             rb_define_method(rb_cProc, "call", proc_call, -2);
rb_define_method 9472 eval.c             rb_define_method(rb_cProc, "arity", proc_arity, 0);
rb_define_method 9473 eval.c             rb_define_method(rb_cProc, "[]", proc_call, -2);
rb_define_method 9474 eval.c             rb_define_method(rb_cProc, "==", proc_eq, 1);
rb_define_method 9475 eval.c             rb_define_method(rb_cProc, "to_s", proc_to_s, 0);
rb_define_method 9476 eval.c             rb_define_method(rb_cProc, "to_proc", proc_to_self, 0);
rb_define_method 9477 eval.c             rb_define_method(rb_cProc, "binding", proc_binding, 0);
rb_define_method 9485 eval.c             rb_define_method(rb_cMethod, "==", method_eq, 1);
rb_define_method 9486 eval.c             rb_define_method(rb_cMethod, "clone", method_clone, 0);
rb_define_method 9487 eval.c             rb_define_method(rb_cMethod, "call", method_call, -1);
rb_define_method 9488 eval.c             rb_define_method(rb_cMethod, "[]", method_call, -1);
rb_define_method 9489 eval.c             rb_define_method(rb_cMethod, "arity", method_arity, 0);
rb_define_method 9490 eval.c             rb_define_method(rb_cMethod, "inspect", method_inspect, 0);
rb_define_method 9491 eval.c             rb_define_method(rb_cMethod, "to_s", method_inspect, 0);
rb_define_method 9492 eval.c             rb_define_method(rb_cMethod, "to_proc", method_proc, 0);
rb_define_method 9493 eval.c             rb_define_method(rb_cMethod, "unbind", method_unbind, 0);
rb_define_method 9494 eval.c             rb_define_method(rb_mKernel, "method", rb_obj_method, 1);
rb_define_method 9499 eval.c             rb_define_method(rb_cUnboundMethod, "==", method_eq, 1);
rb_define_method 9500 eval.c             rb_define_method(rb_cUnboundMethod, "clone", method_clone, 0);
rb_define_method 9501 eval.c             rb_define_method(rb_cUnboundMethod, "arity", method_arity, 0);
rb_define_method 9502 eval.c             rb_define_method(rb_cUnboundMethod, "inspect", method_inspect, 0);
rb_define_method 9503 eval.c             rb_define_method(rb_cUnboundMethod, "to_s", method_inspect, 0);
rb_define_method 9504 eval.c             rb_define_method(rb_cUnboundMethod, "bind", umethod_bind, 1);
rb_define_method 9505 eval.c             rb_define_method(rb_cModule, "instance_method", rb_mod_method, 1);
rb_define_method 9549 eval.c             rb_define_method(rb_cBinding, "clone", proc_clone, 0);
rb_define_method 12711 eval.c             rb_define_method(rb_cThread, "initialize", rb_thread_initialize, -2);
rb_define_method 12729 eval.c             rb_define_method(rb_cThread, "run", rb_thread_run, 0);
rb_define_method 12730 eval.c             rb_define_method(rb_cThread, "wakeup", rb_thread_wakeup, 0);
rb_define_method 12731 eval.c             rb_define_method(rb_cThread, "kill", rb_thread_kill, 0);
rb_define_method 12732 eval.c             rb_define_method(rb_cThread, "terminate", rb_thread_kill, 0);
rb_define_method 12733 eval.c             rb_define_method(rb_cThread, "exit", rb_thread_kill, 0);
rb_define_method 12734 eval.c             rb_define_method(rb_cThread, "value", rb_thread_value, 0);
rb_define_method 12735 eval.c             rb_define_method(rb_cThread, "status", rb_thread_status, 0);
rb_define_method 12736 eval.c             rb_define_method(rb_cThread, "join", rb_thread_join_m, -1);
rb_define_method 12737 eval.c             rb_define_method(rb_cThread, "alive?", rb_thread_alive_p, 0);
rb_define_method 12738 eval.c             rb_define_method(rb_cThread, "stop?", rb_thread_stop_p, 0);
rb_define_method 12739 eval.c             rb_define_method(rb_cThread, "raise", rb_thread_raise_m, -1);
rb_define_method 12741 eval.c             rb_define_method(rb_cThread, "abort_on_exception", rb_thread_abort_exc, 0);
rb_define_method 12742 eval.c             rb_define_method(rb_cThread, "abort_on_exception=", rb_thread_abort_exc_set, 1);
rb_define_method 12744 eval.c             rb_define_method(rb_cThread, "priority", rb_thread_priority, 0);
rb_define_method 12745 eval.c             rb_define_method(rb_cThread, "priority=", rb_thread_priority_set, 1);
rb_define_method 12746 eval.c             rb_define_method(rb_cThread, "safe_level", rb_thread_safe_level, 0);
rb_define_method 12747 eval.c             rb_define_method(rb_cThread, "group", rb_thread_group, 0);
rb_define_method 12749 eval.c             rb_define_method(rb_cThread, "[]", rb_thread_aref, 1);
rb_define_method 12750 eval.c             rb_define_method(rb_cThread, "[]=", rb_thread_aset, 2);
rb_define_method 12751 eval.c             rb_define_method(rb_cThread, "key?", rb_thread_key_p, 1);
rb_define_method 12752 eval.c             rb_define_method(rb_cThread, "keys", rb_thread_keys, 0);
rb_define_method 12754 eval.c             rb_define_method(rb_cThread, "inspect", rb_thread_inspect, 0);
rb_define_method 12759 eval.c             rb_define_method(rb_cCont, "call", rb_cont_call, -1);
rb_define_method 12760 eval.c             rb_define_method(rb_cCont, "[]", rb_cont_call, -1);
rb_define_method 12766 eval.c             rb_define_method(cThGroup, "list", thgroup_list, 0);
rb_define_method 12767 eval.c             rb_define_method(cThGroup, "enclose", thgroup_enclose, 0);
rb_define_method 12768 eval.c             rb_define_method(cThGroup, "enclosed?", thgroup_enclosed_p, 0);
rb_define_method 12769 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  766 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "initialize", fdbm_initialize, -1);
rb_define_method  767 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "close", fdbm_close, 0);
rb_define_method  768 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "closed?", fdbm_closed, 0);
rb_define_method  769 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "[]", fdbm_aref, 1);
rb_define_method  770 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "fetch", fdbm_fetch_m, -1);
rb_define_method  771 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "[]=", fdbm_store, 2);
rb_define_method  772 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "store", fdbm_store, 2);
rb_define_method  773 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "index",  fdbm_index, 1);
rb_define_method  774 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "indexes",  fdbm_indexes, -1);
rb_define_method  775 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "indices",  fdbm_indexes, -1);
rb_define_method  776 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "select",  fdbm_select, -1);
rb_define_method  777 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "values_at", fdbm_values_at, -1);
rb_define_method  778 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "length", fdbm_length, 0);
rb_define_method  779 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "size", fdbm_length, 0);
rb_define_method  780 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "empty?", fdbm_empty_p, 0);
rb_define_method  781 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "each", fdbm_each_pair, 0);
rb_define_method  782 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "each_value", fdbm_each_value, 0);
rb_define_method  783 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "each_key", fdbm_each_key, 0);
rb_define_method  784 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "each_pair", fdbm_each_pair, 0);
rb_define_method  785 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "keys", fdbm_keys, 0);
rb_define_method  786 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "values", fdbm_values, 0);
rb_define_method  787 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "shift", fdbm_shift, 0);
rb_define_method  788 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "delete", fdbm_delete, 1);
rb_define_method  789 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "delete_if", fdbm_delete_if, 0);
rb_define_method  790 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "reject!", fdbm_delete_if, 0);
rb_define_method  791 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "reject", fdbm_reject, 0);
rb_define_method  792 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "clear", fdbm_clear, 0);
rb_define_method  793 ext/dbm/dbm.c      rb_define_method(rb_cDBM,"invert", fdbm_invert, 0);
rb_define_method  794 ext/dbm/dbm.c      rb_define_method(rb_cDBM,"update", fdbm_update, 1);
rb_define_method  795 ext/dbm/dbm.c      rb_define_method(rb_cDBM,"replace", fdbm_replace, 1);
rb_define_method  797 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "include?", fdbm_has_key, 1);
rb_define_method  798 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "has_key?", fdbm_has_key, 1);
rb_define_method  799 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "member?", fdbm_has_key, 1);
rb_define_method  800 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "has_value?", fdbm_has_value, 1);
rb_define_method  801 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "key?", fdbm_has_key, 1);
rb_define_method  802 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "value?", fdbm_has_value, 1);
rb_define_method  804 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "to_a", fdbm_to_a, 0);
rb_define_method  805 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "to_hash", fdbm_to_hash, 0);
rb_define_method  306 ext/digest/digest.c     rb_define_method(cDigest_Base, "initialize", rb_digest_base_init, -1);
rb_define_method  307 ext/digest/digest.c     rb_define_method(cDigest_Base, "initialize_copy",  rb_digest_base_copy, 1);
rb_define_method  308 ext/digest/digest.c     rb_define_method(cDigest_Base, "update", rb_digest_base_update, 1);
rb_define_method  309 ext/digest/digest.c     rb_define_method(cDigest_Base, "<<", rb_digest_base_update, 1);
rb_define_method  310 ext/digest/digest.c     rb_define_method(cDigest_Base, "digest", rb_digest_base_digest, 0);
rb_define_method  311 ext/digest/digest.c     rb_define_method(cDigest_Base, "hexdigest", rb_digest_base_hexdigest, 0);
rb_define_method  312 ext/digest/digest.c     rb_define_method(cDigest_Base, "to_s", rb_digest_base_hexdigest, 0);
rb_define_method  313 ext/digest/digest.c     rb_define_method(cDigest_Base, "==", rb_digest_base_equal, 1);
rb_define_method  725 ext/dl/dl.c      rb_define_method(rb_cString, "to_ptr", rb_str_to_ptr, 0);
rb_define_method  726 ext/dl/dl.c      rb_define_method(rb_cArray, "to_ptr", rb_ary_to_ptr, -1);
rb_define_method  727 ext/dl/dl.c      rb_define_method(rb_cIO, "to_ptr", rb_io_to_ptr, 0);
rb_define_method  207 ext/dl/handle.c   rb_define_method(rb_cDLHandle, "initialize", rb_dlhandle_initialize, -1);
rb_define_method  208 ext/dl/handle.c   rb_define_method(rb_cDLHandle, "to_i", rb_dlhandle_to_i, 0);
rb_define_method  209 ext/dl/handle.c   rb_define_method(rb_cDLHandle, "to_ptr", rb_dlhandle_to_ptr, 0);
rb_define_method  210 ext/dl/handle.c   rb_define_method(rb_cDLHandle, "close", rb_dlhandle_close, 0);
rb_define_method  211 ext/dl/handle.c   rb_define_method(rb_cDLHandle, "sym",  rb_dlhandle_sym, -1);
rb_define_method  212 ext/dl/handle.c   rb_define_method(rb_cDLHandle, "[]",  rb_dlhandle_sym, -1);
rb_define_method  213 ext/dl/handle.c   rb_define_method(rb_cDLHandle, "disable_close", rb_dlhandle_disable_close, 0);
rb_define_method  214 ext/dl/handle.c   rb_define_method(rb_cDLHandle, "enable_close", rb_dlhandle_enable_close, 0);
rb_define_method 1033 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "initialize", rb_dlptr_initialize, -1);
rb_define_method 1034 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "free=", rb_dlptr_free_set, 1);
rb_define_method 1035 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "free",  rb_dlptr_free_get, 0);
rb_define_method 1036 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "to_i",  rb_dlptr_to_i, 0);
rb_define_method 1037 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "ptr",   rb_dlptr_ptr, 0);
rb_define_method 1038 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "+@", rb_dlptr_ptr, 0);
rb_define_method 1039 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "ref",   rb_dlptr_ref, 0);
rb_define_method 1040 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "-@", rb_dlptr_ref, 0);
rb_define_method 1041 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "null?", rb_dlptr_null_p, 0);
rb_define_method 1042 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "to_a", rb_dlptr_to_array, -1);
rb_define_method 1043 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "to_s", rb_dlptr_to_s, -1);
rb_define_method 1044 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "to_str", rb_dlptr_to_str, -1);
rb_define_method 1045 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "inspect", rb_dlptr_inspect, 0);
rb_define_method 1046 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "<=>", rb_dlptr_cmp, 1);
rb_define_method 1047 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "==", rb_dlptr_eql, 1);
rb_define_method 1048 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "eql?", rb_dlptr_eql, 1);
rb_define_method 1049 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "+", rb_dlptr_plus, 1);
rb_define_method 1050 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "-", rb_dlptr_minus, 1);
rb_define_method 1051 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "define_data_type",
rb_define_method 1053 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "struct!", rb_dlptr_define_struct, -1);
rb_define_method 1054 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "union!",  rb_dlptr_define_union,  -1);
rb_define_method 1055 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "data_type", rb_dlptr_get_data_type, 0);
rb_define_method 1056 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "[]", rb_dlptr_aref, -1);
rb_define_method 1057 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "[]=", rb_dlptr_aset, -1);
rb_define_method 1058 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "size", rb_dlptr_size, -1);
rb_define_method 1059 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "size=", rb_dlptr_size, -1);
rb_define_method  973 ext/dl/sym.c     rb_define_method(rb_cDLSymbol, "initialize", rb_dlsym_initialize, -1);
rb_define_method  974 ext/dl/sym.c     rb_define_method(rb_cDLSymbol, "call", rb_dlsym_call, -1);
rb_define_method  975 ext/dl/sym.c     rb_define_method(rb_cDLSymbol, "[]",   rb_dlsym_call, -1);
rb_define_method  976 ext/dl/sym.c     rb_define_method(rb_cDLSymbol, "name", rb_dlsym_name, 0);
rb_define_method  977 ext/dl/sym.c     rb_define_method(rb_cDLSymbol, "proto", rb_dlsym_proto, 0);
rb_define_method  978 ext/dl/sym.c     rb_define_method(rb_cDLSymbol, "cproto", rb_dlsym_cproto, 0);
rb_define_method  979 ext/dl/sym.c     rb_define_method(rb_cDLSymbol, "inspect", rb_dlsym_inspect, 0);
rb_define_method  980 ext/dl/sym.c     rb_define_method(rb_cDLSymbol, "to_s", rb_dlsym_cproto, 0);
rb_define_method  981 ext/dl/sym.c     rb_define_method(rb_cDLSymbol, "to_ptr", rb_dlsym_to_ptr, 0);
rb_define_method  982 ext/dl/sym.c     rb_define_method(rb_cDLSymbol, "to_i", rb_dlsym_to_i, 0);
rb_define_method  272 ext/enumerator/enumerator.c     rb_define_method(rb_mKernel, "to_enum", obj_to_enum, -2);
rb_define_method  273 ext/enumerator/enumerator.c     rb_define_method(rb_mKernel, "enum_for", obj_to_enum, -2);
rb_define_method  277 ext/enumerator/enumerator.c     rb_define_method(rb_mEnumerable, "enum_with_index", enumerator_enum_with_index, 0);
rb_define_method  278 ext/enumerator/enumerator.c     rb_define_method(rb_mEnumerable, "each_slice", enum_each_slice, 1);
rb_define_method  279 ext/enumerator/enumerator.c     rb_define_method(rb_mEnumerable, "enum_slice", enumerator_enum_slice, 1);
rb_define_method  280 ext/enumerator/enumerator.c     rb_define_method(rb_mEnumerable, "each_cons", enum_each_cons, 1);
rb_define_method  281 ext/enumerator/enumerator.c     rb_define_method(rb_mEnumerable, "enum_cons", enumerator_enum_cons, 1);
rb_define_method  286 ext/enumerator/enumerator.c     rb_define_method(rb_cEnumerator, "initialize", enumerator_initialize, -1);
rb_define_method  287 ext/enumerator/enumerator.c     rb_define_method(rb_cEnumerator, "each", enumerator_each, 0);
rb_define_method  957 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "initialize", fgdbm_initialize, -1);
rb_define_method  958 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "close", fgdbm_close, 0);
rb_define_method  959 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "closed?", fgdbm_closed, 0);
rb_define_method  960 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "[]", fgdbm_aref, 1);
rb_define_method  961 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "fetch", fgdbm_fetch_m, -1);
rb_define_method  962 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "[]=", fgdbm_store, 2);
rb_define_method  963 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "store", fgdbm_store, 2);
rb_define_method  964 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "index",  fgdbm_index, 1);
rb_define_method  965 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "indexes",  fgdbm_indexes, -1);
rb_define_method  966 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "indices",  fgdbm_indexes, -1);
rb_define_method  967 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "select",  fgdbm_select, -1);
rb_define_method  968 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "values_at",  fgdbm_values_at, -1);
rb_define_method  969 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "length", fgdbm_length, 0);
rb_define_method  970 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "size", fgdbm_length, 0);
rb_define_method  971 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "empty?", fgdbm_empty_p, 0);
rb_define_method  972 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "each", fgdbm_each_pair, 0);
rb_define_method  973 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "each_value", fgdbm_each_value, 0);
rb_define_method  974 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "each_key", fgdbm_each_key, 0);
rb_define_method  975 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "each_pair", fgdbm_each_pair, 0);
rb_define_method  976 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "keys", fgdbm_keys, 0);
rb_define_method  977 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "values", fgdbm_values, 0);
rb_define_method  978 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "shift", fgdbm_shift, 0);
rb_define_method  979 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "delete", fgdbm_delete, 1);
rb_define_method  980 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "delete_if", fgdbm_delete_if, 0);
rb_define_method  981 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "reject!", fgdbm_delete_if, 0);
rb_define_method  982 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "reject", fgdbm_reject, 0);
rb_define_method  983 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "clear", fgdbm_clear, 0);
rb_define_method  984 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM,"invert", fgdbm_invert, 0);
rb_define_method  985 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM,"update", fgdbm_update, 1);
rb_define_method  986 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM,"replace", fgdbm_replace, 1);
rb_define_method  987 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM,"reorganize", fgdbm_reorganize, 0);
rb_define_method  988 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM,"sync", fgdbm_sync, 0);
rb_define_method  990 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM,"cachesize=", fgdbm_set_cachesize, 1);
rb_define_method  991 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM,"fastmode=", fgdbm_set_fastmode, 1);
rb_define_method  992 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM,"syncmode=", fgdbm_set_syncmode, 1);
rb_define_method  994 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "include?", fgdbm_has_key, 1);
rb_define_method  995 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "has_key?", fgdbm_has_key, 1);
rb_define_method  996 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "member?", fgdbm_has_key, 1);
rb_define_method  997 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "has_value?", fgdbm_has_value, 1);
rb_define_method  998 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "key?", fgdbm_has_key, 1);
rb_define_method  999 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "value?", fgdbm_has_value, 1);
rb_define_method 1001 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "to_a", fgdbm_to_a, 0);
rb_define_method 1002 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "to_hash", fgdbm_to_hash, 0);
rb_define_method  882 ext/iconv/iconv.c     rb_define_method(rb_cIconv, "initialize", iconv_initialize, 2);
rb_define_method  883 ext/iconv/iconv.c     rb_define_method(rb_cIconv, "close", iconv_finish, 0);
rb_define_method  884 ext/iconv/iconv.c     rb_define_method(rb_cIconv, "iconv", iconv_iconv, -1);
rb_define_method  887 ext/iconv/iconv.c     rb_define_method(rb_eIconvFailure, "initialize", iconv_failure_initialize, 3);
rb_define_method  888 ext/iconv/iconv.c     rb_define_method(rb_eIconvFailure, "success", iconv_failure_success, 0);
rb_define_method  889 ext/iconv/iconv.c     rb_define_method(rb_eIconvFailure, "failed", iconv_failure_failed, 0);
rb_define_method  890 ext/iconv/iconv.c     rb_define_method(rb_eIconvFailure, "inspect", iconv_failure_inspect, 0);
rb_define_method  124 ext/io/wait/wait.c     rb_define_method(rb_cIO, "ready?", io_ready_p, 0);
rb_define_method  125 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  365 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "initialize", ossl_cipher_initialize, 1);
rb_define_method  366 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "reset", ossl_cipher_reset, 0);
rb_define_method  367 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "encrypt", ossl_cipher_encrypt, -1);
rb_define_method  368 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "decrypt", ossl_cipher_decrypt, -1);
rb_define_method  369 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "pkcs5_keyivgen", ossl_cipher_pkcs5_keyivgen, -1);
rb_define_method  370 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "update", ossl_cipher_update, 1);
rb_define_method  371 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "<<", ossl_cipher_update_deprecated, 1);
rb_define_method  372 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "final", ossl_cipher_final, 0);
rb_define_method  373 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "name", ossl_cipher_name, 0);
rb_define_method  374 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "key=", ossl_cipher_set_key, 1);
rb_define_method  375 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "key_len=", ossl_cipher_set_key_length, 1);
rb_define_method  376 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "key_len", ossl_cipher_key_length, 0);
rb_define_method  377 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "iv=", ossl_cipher_set_iv, 1);
rb_define_method  378 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "iv_len", ossl_cipher_iv_length, 0);
rb_define_method  379 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "block_size", ossl_cipher_block_size, 0);
rb_define_method  380 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  874 ext/openssl/ossl_ssl.c     rb_define_method(cSSLContext, "initialize",  ossl_sslctx_initialize, -1);
rb_define_method  875 ext/openssl/ossl_ssl.c     rb_define_method(cSSLContext, "ciphers",     ossl_sslctx_get_ciphers, 0);
rb_define_method  876 ext/openssl/ossl_ssl.c     rb_define_method(cSSLContext, "ciphers=",    ossl_sslctx_set_ciphers, 1);
rb_define_method  886 ext/openssl/ossl_ssl.c     rb_define_method(cSSLSocket, "initialize", ossl_ssl_initialize, -1);
rb_define_method  887 ext/openssl/ossl_ssl.c     rb_define_method(cSSLSocket, "connect",    ossl_ssl_connect, 0);
rb_define_method  888 ext/openssl/ossl_ssl.c     rb_define_method(cSSLSocket, "accept",     ossl_ssl_accept, 0);
rb_define_method  889 ext/openssl/ossl_ssl.c     rb_define_method(cSSLSocket, "sysread",    ossl_ssl_read, -1);
rb_define_method  890 ext/openssl/ossl_ssl.c     rb_define_method(cSSLSocket, "syswrite",   ossl_ssl_write, 1);
rb_define_method  891 ext/openssl/ossl_ssl.c     rb_define_method(cSSLSocket, "sysclose",   ossl_ssl_close, 0);
rb_define_method  892 ext/openssl/ossl_ssl.c     rb_define_method(cSSLSocket, "cert",       ossl_ssl_get_cert, 0);
rb_define_method  893 ext/openssl/ossl_ssl.c     rb_define_method(cSSLSocket, "peer_cert",  ossl_ssl_get_peer_cert, 0);
rb_define_method  894 ext/openssl/ossl_ssl.c     rb_define_method(cSSLSocket, "peer_cert_chain", ossl_ssl_get_peer_cert_chain, 0);
rb_define_method  895 ext/openssl/ossl_ssl.c     rb_define_method(cSSLSocket, "cipher",     ossl_ssl_get_cipher, 0);
rb_define_method  896 ext/openssl/ossl_ssl.c     rb_define_method(cSSLSocket, "state",      ossl_ssl_get_state, 0);
rb_define_method  897 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  748 ext/sdbm/init.c     rb_define_method(rb_cDBM, "initialize", fsdbm_initialize, -1);
rb_define_method  749 ext/sdbm/init.c     rb_define_method(rb_cDBM, "close", fsdbm_close, 0);
rb_define_method  750 ext/sdbm/init.c     rb_define_method(rb_cDBM, "closed?", fsdbm_closed, 0);
rb_define_method  751 ext/sdbm/init.c     rb_define_method(rb_cDBM, "[]", fsdbm_aref, 1);
rb_define_method  752 ext/sdbm/init.c     rb_define_method(rb_cDBM, "fetch", fsdbm_fetch_m, -1);
rb_define_method  753 ext/sdbm/init.c     rb_define_method(rb_cDBM, "[]=", fsdbm_store, 2);
rb_define_method  754 ext/sdbm/init.c     rb_define_method(rb_cDBM, "store", fsdbm_store, 2);
rb_define_method  755 ext/sdbm/init.c     rb_define_method(rb_cDBM, "index",  fsdbm_index, 1);
rb_define_method  756 ext/sdbm/init.c     rb_define_method(rb_cDBM, "indexes",  fsdbm_indexes, -1);
rb_define_method  757 ext/sdbm/init.c     rb_define_method(rb_cDBM, "indices",  fsdbm_indexes, -1);
rb_define_method  758 ext/sdbm/init.c     rb_define_method(rb_cDBM, "select",  fsdbm_select, -1);
rb_define_method  759 ext/sdbm/init.c     rb_define_method(rb_cDBM, "values_at",  fsdbm_values_at, -1);
rb_define_method  760 ext/sdbm/init.c     rb_define_method(rb_cDBM, "length", fsdbm_length, 0);
rb_define_method  761 ext/sdbm/init.c     rb_define_method(rb_cDBM, "size", fsdbm_length, 0);
rb_define_method  762 ext/sdbm/init.c     rb_define_method(rb_cDBM, "empty?", fsdbm_empty_p, 0);
rb_define_method  763 ext/sdbm/init.c     rb_define_method(rb_cDBM, "each", fsdbm_each_pair, 0);
rb_define_method  764 ext/sdbm/init.c     rb_define_method(rb_cDBM, "each_value", fsdbm_each_value, 0);
rb_define_method  765 ext/sdbm/init.c     rb_define_method(rb_cDBM, "each_key", fsdbm_each_key, 0);
rb_define_method  766 ext/sdbm/init.c     rb_define_method(rb_cDBM, "each_pair", fsdbm_each_pair, 0);
rb_define_method  767 ext/sdbm/init.c     rb_define_method(rb_cDBM, "keys", fsdbm_keys, 0);
rb_define_method  768 ext/sdbm/init.c     rb_define_method(rb_cDBM, "values", fsdbm_values, 0);
rb_define_method  769 ext/sdbm/init.c     rb_define_method(rb_cDBM, "shift", fsdbm_shift, 0);
rb_define_method  770 ext/sdbm/init.c     rb_define_method(rb_cDBM, "delete", fsdbm_delete, 1);
rb_define_method  771 ext/sdbm/init.c     rb_define_method(rb_cDBM, "delete_if", fsdbm_delete_if, 0);
rb_define_method  772 ext/sdbm/init.c     rb_define_method(rb_cDBM, "reject!", fsdbm_delete_if, 0);
rb_define_method  773 ext/sdbm/init.c     rb_define_method(rb_cDBM, "reject", fsdbm_reject, 0);
rb_define_method  774 ext/sdbm/init.c     rb_define_method(rb_cDBM, "clear", fsdbm_clear, 0);
rb_define_method  775 ext/sdbm/init.c     rb_define_method(rb_cDBM,"invert", fsdbm_invert, 0);
rb_define_method  776 ext/sdbm/init.c     rb_define_method(rb_cDBM,"update", fsdbm_update, 1);
rb_define_method  777 ext/sdbm/init.c     rb_define_method(rb_cDBM,"replace", fsdbm_replace, 1);
rb_define_method  779 ext/sdbm/init.c     rb_define_method(rb_cDBM, "include?", fsdbm_has_key, 1);
rb_define_method  780 ext/sdbm/init.c     rb_define_method(rb_cDBM, "has_key?", fsdbm_has_key, 1);
rb_define_method  781 ext/sdbm/init.c     rb_define_method(rb_cDBM, "member?", fsdbm_has_key, 1);
rb_define_method  782 ext/sdbm/init.c     rb_define_method(rb_cDBM, "has_value?", fsdbm_has_value, 1);
rb_define_method  783 ext/sdbm/init.c     rb_define_method(rb_cDBM, "key?", fsdbm_has_key, 1);
rb_define_method  784 ext/sdbm/init.c     rb_define_method(rb_cDBM, "value?", fsdbm_has_value, 1);
rb_define_method  786 ext/sdbm/init.c     rb_define_method(rb_cDBM, "to_a", fsdbm_to_a, 0);
rb_define_method  787 ext/sdbm/init.c     rb_define_method(rb_cDBM, "to_hash", fsdbm_to_hash, 0);
rb_define_method 3147 ext/socket/socket.c     rb_define_method(rb_cBasicSocket, "close_read", bsock_close_read, 0);
rb_define_method 3148 ext/socket/socket.c     rb_define_method(rb_cBasicSocket, "close_write", bsock_close_write, 0);
rb_define_method 3149 ext/socket/socket.c     rb_define_method(rb_cBasicSocket, "shutdown", bsock_shutdown, -1);
rb_define_method 3150 ext/socket/socket.c     rb_define_method(rb_cBasicSocket, "setsockopt", bsock_setsockopt, 3);
rb_define_method 3151 ext/socket/socket.c     rb_define_method(rb_cBasicSocket, "getsockopt", bsock_getsockopt, 2);
rb_define_method 3152 ext/socket/socket.c     rb_define_method(rb_cBasicSocket, "getsockname", bsock_getsockname, 0);
rb_define_method 3153 ext/socket/socket.c     rb_define_method(rb_cBasicSocket, "getpeername", bsock_getpeername, 0);
rb_define_method 3154 ext/socket/socket.c     rb_define_method(rb_cBasicSocket, "send", bsock_send, -1);
rb_define_method 3155 ext/socket/socket.c     rb_define_method(rb_cBasicSocket, "recv", bsock_recv, -1);
rb_define_method 3159 ext/socket/socket.c     rb_define_method(rb_cIPSocket, "addr", ip_addr, 0);
rb_define_method 3160 ext/socket/socket.c     rb_define_method(rb_cIPSocket, "peeraddr", ip_peeraddr, 0);
rb_define_method 3161 ext/socket/socket.c     rb_define_method(rb_cIPSocket, "recvfrom", ip_recvfrom, -1);
rb_define_method 3167 ext/socket/socket.c     rb_define_method(rb_cTCPSocket, "initialize", tcp_init, -1);
rb_define_method 3172 ext/socket/socket.c     rb_define_method(rb_cSOCKSSocket, "initialize", socks_init, 2);
rb_define_method 3174 ext/socket/socket.c     rb_define_method(rb_cSOCKSSocket, "close", socks_s_close, 0);
rb_define_method 3180 ext/socket/socket.c     rb_define_method(rb_cTCPServer, "accept", tcp_accept, 0);
rb_define_method 3181 ext/socket/socket.c     rb_define_method(rb_cTCPServer, "sysaccept", tcp_sysaccept, 0);
rb_define_method 3182 ext/socket/socket.c     rb_define_method(rb_cTCPServer, "initialize", tcp_svr_init, -1);
rb_define_method 3183 ext/socket/socket.c     rb_define_method(rb_cTCPServer, "listen", sock_listen, 1);
rb_define_method 3187 ext/socket/socket.c     rb_define_method(rb_cUDPSocket, "initialize", udp_init, -1);
rb_define_method 3188 ext/socket/socket.c     rb_define_method(rb_cUDPSocket, "connect", udp_connect, 2);
rb_define_method 3189 ext/socket/socket.c     rb_define_method(rb_cUDPSocket, "bind", udp_bind, 2);
rb_define_method 3190 ext/socket/socket.c     rb_define_method(rb_cUDPSocket, "send", udp_send, -1);
rb_define_method 3195 ext/socket/socket.c     rb_define_method(rb_cUNIXSocket, "initialize", unix_init, 1);
rb_define_method 3196 ext/socket/socket.c     rb_define_method(rb_cUNIXSocket, "path", unix_path, 0);
rb_define_method 3197 ext/socket/socket.c     rb_define_method(rb_cUNIXSocket, "addr", unix_addr, 0);
rb_define_method 3198 ext/socket/socket.c     rb_define_method(rb_cUNIXSocket, "peeraddr", unix_peeraddr, 0);
rb_define_method 3199 ext/socket/socket.c     rb_define_method(rb_cUNIXSocket, "recvfrom", unix_recvfrom, -1);
rb_define_method 3200 ext/socket/socket.c     rb_define_method(rb_cUNIXSocket, "send_io", unix_send_io, 1);
rb_define_method 3201 ext/socket/socket.c     rb_define_method(rb_cUNIXSocket, "recv_io", unix_recv_io, -1);
rb_define_method 3207 ext/socket/socket.c     rb_define_method(rb_cUNIXServer, "initialize", unix_svr_init, 1);
rb_define_method 3208 ext/socket/socket.c     rb_define_method(rb_cUNIXServer, "accept", unix_accept, 0);
rb_define_method 3209 ext/socket/socket.c     rb_define_method(rb_cUNIXServer, "sysaccept", unix_sysaccept, 0);
rb_define_method 3210 ext/socket/socket.c     rb_define_method(rb_cUNIXServer, "listen", sock_listen, 1);
rb_define_method 3215 ext/socket/socket.c     rb_define_method(rb_cSocket, "initialize", sock_initialize, 3);
rb_define_method 3216 ext/socket/socket.c     rb_define_method(rb_cSocket, "connect", sock_connect, 1);
rb_define_method 3217 ext/socket/socket.c     rb_define_method(rb_cSocket, "bind", sock_bind, 1);
rb_define_method 3218 ext/socket/socket.c     rb_define_method(rb_cSocket, "listen", sock_listen, 1);
rb_define_method 3219 ext/socket/socket.c     rb_define_method(rb_cSocket, "accept", sock_accept, 0);
rb_define_method 3220 ext/socket/socket.c     rb_define_method(rb_cSocket, "sysaccept", sock_sysaccept, 0);
rb_define_method 3222 ext/socket/socket.c     rb_define_method(rb_cSocket, "recvfrom", sock_recvfrom, -1);
rb_define_method 1251 ext/stringio/stringio.c     rb_define_method(StringIO, "initialize", strio_initialize, -1);
rb_define_method 1252 ext/stringio/stringio.c     rb_define_method(StringIO, "initialize_copy", strio_copy, 1);
rb_define_method 1253 ext/stringio/stringio.c     rb_define_method(StringIO, "reopen", strio_reopen, -1);
rb_define_method 1255 ext/stringio/stringio.c     rb_define_method(StringIO, "string", strio_get_string, 0);
rb_define_method 1256 ext/stringio/stringio.c     rb_define_method(StringIO, "string=", strio_set_string, 1);
rb_define_method 1257 ext/stringio/stringio.c     rb_define_method(StringIO, "lineno", strio_get_lineno, 0);
rb_define_method 1258 ext/stringio/stringio.c     rb_define_method(StringIO, "lineno=", strio_set_lineno, 1);
rb_define_method 1260 ext/stringio/stringio.c     rb_define_method(StringIO, "binmode", strio_binmode, 0);
rb_define_method 1261 ext/stringio/stringio.c     rb_define_method(StringIO, "close", strio_close, 0);
rb_define_method 1262 ext/stringio/stringio.c     rb_define_method(StringIO, "close_read", strio_close_read, 0);
rb_define_method 1263 ext/stringio/stringio.c     rb_define_method(StringIO, "close_write", strio_close_write, 0);
rb_define_method 1264 ext/stringio/stringio.c     rb_define_method(StringIO, "closed?", strio_closed, 0);
rb_define_method 1265 ext/stringio/stringio.c     rb_define_method(StringIO, "closed_read?", strio_closed_read, 0);
rb_define_method 1266 ext/stringio/stringio.c     rb_define_method(StringIO, "closed_write?", strio_closed_write, 0);
rb_define_method 1267 ext/stringio/stringio.c     rb_define_method(StringIO, "eof", strio_eof, 0);
rb_define_method 1268 ext/stringio/stringio.c     rb_define_method(StringIO, "eof?", strio_eof, 0);
rb_define_method 1269 ext/stringio/stringio.c     rb_define_method(StringIO, "fcntl", strio_fcntl, -1);
rb_define_method 1270 ext/stringio/stringio.c     rb_define_method(StringIO, "flush", strio_flush, 0);
rb_define_method 1271 ext/stringio/stringio.c     rb_define_method(StringIO, "fsync", strio_fsync, 0);
rb_define_method 1272 ext/stringio/stringio.c     rb_define_method(StringIO, "pos", strio_get_pos, 0);
rb_define_method 1273 ext/stringio/stringio.c     rb_define_method(StringIO, "pos=", strio_set_pos, 1);
rb_define_method 1274 ext/stringio/stringio.c     rb_define_method(StringIO, "rewind", strio_rewind, 0);
rb_define_method 1275 ext/stringio/stringio.c     rb_define_method(StringIO, "seek", strio_seek, -1);
rb_define_method 1276 ext/stringio/stringio.c     rb_define_method(StringIO, "sync", strio_get_sync, 0);
rb_define_method 1277 ext/stringio/stringio.c     rb_define_method(StringIO, "sync=", strio_set_sync, 1);
rb_define_method 1278 ext/stringio/stringio.c     rb_define_method(StringIO, "tell", strio_tell, 0);
rb_define_method 1279 ext/stringio/stringio.c     rb_define_method(StringIO, "path", strio_path, 0);
rb_define_method 1281 ext/stringio/stringio.c     rb_define_method(StringIO, "each", strio_each, -1);
rb_define_method 1282 ext/stringio/stringio.c     rb_define_method(StringIO, "each_byte", strio_each_byte, 0);
rb_define_method 1283 ext/stringio/stringio.c     rb_define_method(StringIO, "each_line", strio_each, -1);
rb_define_method 1284 ext/stringio/stringio.c     rb_define_method(StringIO, "getc", strio_getc, 0);
rb_define_method 1285 ext/stringio/stringio.c     rb_define_method(StringIO, "ungetc", strio_ungetc, 1);
rb_define_method 1286 ext/stringio/stringio.c     rb_define_method(StringIO, "readchar", strio_readchar, 0);
rb_define_method 1287 ext/stringio/stringio.c     rb_define_method(StringIO, "gets", strio_gets, -1);
rb_define_method 1288 ext/stringio/stringio.c     rb_define_method(StringIO, "readline", strio_readline, -1);
rb_define_method 1289 ext/stringio/stringio.c     rb_define_method(StringIO, "readlines", strio_readlines, -1);
rb_define_method 1290 ext/stringio/stringio.c     rb_define_method(StringIO, "read", strio_read, -1);
rb_define_method 1291 ext/stringio/stringio.c     rb_define_method(StringIO, "sysread", strio_sysread, -1);
rb_define_method 1293 ext/stringio/stringio.c     rb_define_method(StringIO, "write", strio_write, 1);
rb_define_method 1294 ext/stringio/stringio.c     rb_define_method(StringIO, "<<", strio_addstr, 1);
rb_define_method 1295 ext/stringio/stringio.c     rb_define_method(StringIO, "print", strio_print, -1);
rb_define_method 1296 ext/stringio/stringio.c     rb_define_method(StringIO, "printf", strio_printf, -1);
rb_define_method 1297 ext/stringio/stringio.c     rb_define_method(StringIO, "putc", strio_putc, 1);
rb_define_method 1298 ext/stringio/stringio.c     rb_define_method(StringIO, "puts", strio_puts, -1);
rb_define_method 1299 ext/stringio/stringio.c     rb_define_method(StringIO, "syswrite", strio_syswrite, 1);
rb_define_method 1301 ext/stringio/stringio.c     rb_define_method(StringIO, "isatty", strio_isatty, 0);
rb_define_method 1302 ext/stringio/stringio.c     rb_define_method(StringIO, "tty?", strio_isatty, 0);
rb_define_method 1303 ext/stringio/stringio.c     rb_define_method(StringIO, "pid", strio_pid, 0);
rb_define_method 1304 ext/stringio/stringio.c     rb_define_method(StringIO, "fileno", strio_fileno, 0);
rb_define_method 1305 ext/stringio/stringio.c     rb_define_method(StringIO, "size", strio_size, 0);
rb_define_method 1306 ext/stringio/stringio.c     rb_define_method(StringIO, "length", strio_size, 0);
rb_define_method 1307 ext/stringio/stringio.c     rb_define_method(StringIO, "truncate", strio_truncate, 1);
rb_define_method 1306 ext/strscan/strscan.c     rb_define_method(StringScanner, "reset",       strscan_reset,       0);
rb_define_method 1307 ext/strscan/strscan.c     rb_define_method(StringScanner, "terminate",   strscan_terminate,   0);
rb_define_method 1308 ext/strscan/strscan.c     rb_define_method(StringScanner, "clear",       strscan_clear,       0);
rb_define_method 1309 ext/strscan/strscan.c     rb_define_method(StringScanner, "string",      strscan_get_string,  0);
rb_define_method 1310 ext/strscan/strscan.c     rb_define_method(StringScanner, "string=",     strscan_set_string,  1);
rb_define_method 1311 ext/strscan/strscan.c     rb_define_method(StringScanner, "concat",      strscan_concat,      1);
rb_define_method 1312 ext/strscan/strscan.c     rb_define_method(StringScanner, "<<",          strscan_concat,      1);
rb_define_method 1313 ext/strscan/strscan.c     rb_define_method(StringScanner, "pos",         strscan_get_pos,     0);
rb_define_method 1314 ext/strscan/strscan.c     rb_define_method(StringScanner, "pos=",        strscan_set_pos,     1);
rb_define_method 1315 ext/strscan/strscan.c     rb_define_method(StringScanner, "pointer",     strscan_get_pos,     0);
rb_define_method 1316 ext/strscan/strscan.c     rb_define_method(StringScanner, "pointer=",    strscan_set_pos,     1);
rb_define_method 1318 ext/strscan/strscan.c     rb_define_method(StringScanner, "scan",        strscan_scan,        1);
rb_define_method 1319 ext/strscan/strscan.c     rb_define_method(StringScanner, "skip",        strscan_skip,        1);
rb_define_method 1320 ext/strscan/strscan.c     rb_define_method(StringScanner, "match?",      strscan_match_p,     1);
rb_define_method 1321 ext/strscan/strscan.c     rb_define_method(StringScanner, "check",       strscan_check,       1);
rb_define_method 1322 ext/strscan/strscan.c     rb_define_method(StringScanner, "scan_full",   strscan_scan_full,   3);
rb_define_method 1324 ext/strscan/strscan.c     rb_define_method(StringScanner, "scan_until",  strscan_scan_until,  1);
rb_define_method 1325 ext/strscan/strscan.c     rb_define_method(StringScanner, "skip_until",  strscan_skip_until,  1);
rb_define_method 1326 ext/strscan/strscan.c     rb_define_method(StringScanner, "exist?",      strscan_exist_p,     1);
rb_define_method 1327 ext/strscan/strscan.c     rb_define_method(StringScanner, "check_until", strscan_check_until, 1);
rb_define_method 1328 ext/strscan/strscan.c     rb_define_method(StringScanner, "search_full", strscan_search_full, 3);
rb_define_method 1330 ext/strscan/strscan.c     rb_define_method(StringScanner, "getch",       strscan_getch,       0);
rb_define_method 1331 ext/strscan/strscan.c     rb_define_method(StringScanner, "get_byte",    strscan_get_byte,    0);
rb_define_method 1332 ext/strscan/strscan.c     rb_define_method(StringScanner, "getbyte",     strscan_getbyte,     0);
rb_define_method 1333 ext/strscan/strscan.c     rb_define_method(StringScanner, "peek",        strscan_peek,        1);
rb_define_method 1334 ext/strscan/strscan.c     rb_define_method(StringScanner, "peep",        strscan_peep,        1);
rb_define_method 1336 ext/strscan/strscan.c     rb_define_method(StringScanner, "unscan",      strscan_unscan,      0);
rb_define_method 1338 ext/strscan/strscan.c     rb_define_method(StringScanner, "beginning_of_line?", strscan_bol_p, 0);
rb_define_method 1339 ext/strscan/strscan.c     rb_define_method(StringScanner, "bol?",        strscan_bol_p,       0);
rb_define_method 1340 ext/strscan/strscan.c     rb_define_method(StringScanner, "eos?",        strscan_eos_p,       0);
rb_define_method 1341 ext/strscan/strscan.c     rb_define_method(StringScanner, "empty?",      strscan_empty_p,     0);
rb_define_method 1342 ext/strscan/strscan.c     rb_define_method(StringScanner, "rest?",       strscan_rest_p,      0);
rb_define_method 1344 ext/strscan/strscan.c     rb_define_method(StringScanner, "matched?",    strscan_matched_p,   0);
rb_define_method 1345 ext/strscan/strscan.c     rb_define_method(StringScanner, "matched",     strscan_matched,     0);
rb_define_method 1346 ext/strscan/strscan.c     rb_define_method(StringScanner, "matched_size", strscan_matched_size, 0);
rb_define_method 1347 ext/strscan/strscan.c     rb_define_method(StringScanner, "matchedsize", strscan_matchedsize, 0);
rb_define_method 1348 ext/strscan/strscan.c     rb_define_method(StringScanner, "[]",          strscan_aref,        1);
rb_define_method 1349 ext/strscan/strscan.c     rb_define_method(StringScanner, "pre_match",   strscan_pre_match,   0);
rb_define_method 1350 ext/strscan/strscan.c     rb_define_method(StringScanner, "post_match",  strscan_post_match,  0);
rb_define_method 1352 ext/strscan/strscan.c     rb_define_method(StringScanner, "rest",        strscan_rest,        0);
rb_define_method 1353 ext/strscan/strscan.c     rb_define_method(StringScanner, "rest_size",   strscan_rest_size,   0);
rb_define_method 1354 ext/strscan/strscan.c     rb_define_method(StringScanner, "restsize",    strscan_restsize,    0);
rb_define_method 1356 ext/strscan/strscan.c     rb_define_method(StringScanner, "inspect",     strscan_inspect,     0);
rb_define_method 2220 ext/syck/rubyext.c     rb_define_method( cResolver, "initialize", syck_resolver_initialize, 0 );
rb_define_method 2221 ext/syck/rubyext.c     rb_define_method( cResolver, "add_type", syck_resolver_add_type, 2 );
rb_define_method 2222 ext/syck/rubyext.c     rb_define_method( cResolver, "use_types_at", syck_resolver_use_types_at, 1 );
rb_define_method 2223 ext/syck/rubyext.c     rb_define_method( cResolver, "detect_implicit", syck_resolver_detect_implicit, 1 );
rb_define_method 2224 ext/syck/rubyext.c     rb_define_method( cResolver, "transfer", syck_resolver_transfer, 2 );
rb_define_method 2225 ext/syck/rubyext.c     rb_define_method( cResolver, "node_import", syck_resolver_node_import, 1 );
rb_define_method 2226 ext/syck/rubyext.c     rb_define_method( cResolver, "tagurize", syck_resolver_tagurize, 1 );
rb_define_method 2246 ext/syck/rubyext.c     rb_define_method(cParser, "initialize", syck_parser_initialize, -1 );
rb_define_method 2247 ext/syck/rubyext.c     rb_define_method(cParser, "bufsize=", syck_parser_bufsize_set, 1 );
rb_define_method 2248 ext/syck/rubyext.c     rb_define_method(cParser, "bufsize", syck_parser_bufsize_get, 0 );
rb_define_method 2249 ext/syck/rubyext.c     rb_define_method(cParser, "load", syck_parser_load, -1);
rb_define_method 2250 ext/syck/rubyext.c     rb_define_method(cParser, "load_documents", syck_parser_load_documents, -1);
rb_define_method 2251 ext/syck/rubyext.c     rb_define_method(cParser, "set_resolver", syck_parser_set_resolver, 1);
rb_define_method 2257 ext/syck/rubyext.c     rb_define_method( cNode, "initialize_copy", syck_node_init_copy, 1 );
rb_define_method 2263 ext/syck/rubyext.c     rb_define_method( cNode, "type_id=", syck_node_type_id_set, 1 );
rb_define_method 2264 ext/syck/rubyext.c     rb_define_method( cNode, "transform", syck_node_transform, 0);
rb_define_method 2273 ext/syck/rubyext.c     rb_define_method( cScalar, "initialize", syck_scalar_initialize, 3 );
rb_define_method 2274 ext/syck/rubyext.c     rb_define_method( cScalar, "value=", syck_scalar_value_set, 1 );
rb_define_method 2275 ext/syck/rubyext.c     rb_define_method( cScalar, "style=", syck_scalar_style_set, 1 );
rb_define_method 2278 ext/syck/rubyext.c     rb_define_method( cSeq, "initialize", syck_seq_initialize, 3 );
rb_define_method 2279 ext/syck/rubyext.c     rb_define_method( cSeq, "value=", syck_seq_value_set, 1 );
rb_define_method 2280 ext/syck/rubyext.c     rb_define_method( cSeq, "add", syck_seq_add_m, 1 );
rb_define_method 2281 ext/syck/rubyext.c     rb_define_method( cSeq, "style=", syck_seq_style_set, 1 );
rb_define_method 2284 ext/syck/rubyext.c     rb_define_method( cMap, "initialize", syck_map_initialize, 3 );
rb_define_method 2285 ext/syck/rubyext.c     rb_define_method( cMap, "value=", syck_map_value_set, 1 );
rb_define_method 2286 ext/syck/rubyext.c     rb_define_method( cMap, "add", syck_map_add_m, 2 );
rb_define_method 2287 ext/syck/rubyext.c     rb_define_method( cMap, "style=", syck_map_style_set, 1 );
rb_define_method 2295 ext/syck/rubyext.c     rb_define_method( cPrivateType, "initialize", syck_privatetype_initialize, 2);
rb_define_method 2304 ext/syck/rubyext.c     rb_define_method( cDomainType, "initialize", syck_domaintype_initialize, 3);
rb_define_method 2312 ext/syck/rubyext.c     rb_define_method( cYObject, "initialize", syck_yobject_initialize, 2);
rb_define_method 2313 ext/syck/rubyext.c     rb_define_method( cYObject, "yaml_initialize", syck_yobject_initialize, 2);
rb_define_method 2320 ext/syck/rubyext.c     rb_define_method( cBadAlias, "initialize", syck_badalias_initialize, 1);
rb_define_method 2321 ext/syck/rubyext.c     rb_define_method( cBadAlias, "<=>", syck_badalias_cmp, 1);
rb_define_method 2339 ext/syck/rubyext.c     rb_define_method( cOut, "initialize", syck_out_initialize, 1 );
rb_define_method 2340 ext/syck/rubyext.c     rb_define_method( cOut, "map", syck_out_map, -1 );
rb_define_method 2341 ext/syck/rubyext.c     rb_define_method( cOut, "seq", syck_out_seq, -1 );
rb_define_method 2342 ext/syck/rubyext.c     rb_define_method( cOut, "scalar", syck_out_scalar, -1 );
rb_define_method 2350 ext/syck/rubyext.c     rb_define_method( cEmitter, "initialize", syck_emitter_reset, -1 );
rb_define_method 2351 ext/syck/rubyext.c     rb_define_method( cEmitter, "reset", syck_emitter_reset, -1 );
rb_define_method 2352 ext/syck/rubyext.c     rb_define_method( cEmitter, "emit", syck_emitter_emit, -1 );
rb_define_method 2353 ext/syck/rubyext.c     rb_define_method( cEmitter, "set_resolver", syck_emitter_set_resolver, 1);
rb_define_method 2354 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 6100 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "initialize", fole_initialize, -1);
rb_define_method 6112 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "invoke", fole_invoke, -1);
rb_define_method 6113 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "[]", fole_getproperty, 1);
rb_define_method 6114 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "_invoke", fole_invoke2, 3);
rb_define_method 6115 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "_getproperty", fole_getproperty2, 3);
rb_define_method 6116 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "_setproperty", fole_setproperty2, 3);
rb_define_method 6119 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "[]=", fole_setproperty, -1);
rb_define_method 6121 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "ole_free", fole_free, 0);
rb_define_method 6123 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "each", fole_each, 0);
rb_define_method 6124 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "method_missing", fole_missing, -1);
rb_define_method 6127 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "setproperty", fole_setproperty, -1);
rb_define_method 6129 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "ole_methods", fole_methods, 0);
rb_define_method 6130 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "ole_get_methods", fole_get_methods, 0);
rb_define_method 6131 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "ole_put_methods", fole_put_methods, 0);
rb_define_method 6132 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "ole_func_methods", fole_func_methods, 0);
rb_define_method 6134 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "ole_method", fole_method_help, 1);
rb_define_method 6136 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "ole_obj_help", fole_obj_help, 0);
rb_define_method 6177 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "initialize", foletype_initialize, 2);
rb_define_method 6178 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "name", foletype_name, 0);
rb_define_method 6179 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "ole_type", foletype_ole_type, 0);
rb_define_method 6180 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "guid", foletype_guid, 0);
rb_define_method 6181 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "progid", foletype_progid, 0);
rb_define_method 6182 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "visible?", foletype_visible, 0);
rb_define_method 6185 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "major_version", foletype_major_version, 0);
rb_define_method 6186 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "minor_version", foletype_minor_version, 0);
rb_define_method 6187 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "typekind", foletype_typekind, 0);
rb_define_method 6188 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "helpstring", foletype_helpstring, 0);
rb_define_method 6189 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "src_type", foletype_src_type, 0);
rb_define_method 6190 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "helpfile", foletype_helpfile, 0);
rb_define_method 6191 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "helpcontext", foletype_helpcontext, 0);
rb_define_method 6192 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "variables", foletype_variables, 0);
rb_define_method 6193 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "ole_methods", foletype_methods, -1);
rb_define_method 6196 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_VARIABLE, "name", folevariable_name, 0);
rb_define_method 6197 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_VARIABLE, "ole_type", folevariable_ole_type, 0);
rb_define_method 6198 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_VARIABLE, "ole_type_detail", folevariable_ole_type_detail, 0);
rb_define_method 6199 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_VARIABLE, "value", folevariable_value, 0);
rb_define_method 6200 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_VARIABLE, "visible?", folevariable_visible, 0);
rb_define_method 6201 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_VARIABLE, "variable_kind", folevariable_variable_kind, 0);
rb_define_method 6202 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_VARIABLE, "varkind", folevariable_varkind, 0);
rb_define_method 6207 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "initialize", folemethod_initialize, 2);
rb_define_method 6209 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "name", folemethod_name, 0);
rb_define_method 6210 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "return_type", folemethod_return_type, 0);
rb_define_method 6211 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "return_vtype", folemethod_return_vtype, 0);
rb_define_method 6212 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "return_type_detail", folemethod_return_type_detail, 0);
rb_define_method 6213 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "invoke_kind", folemethod_invoke_kind, 0);
rb_define_method 6214 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "invkind", folemethod_invkind, 0);
rb_define_method 6215 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "visible?", folemethod_visible, 0);
rb_define_method 6216 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "event?", folemethod_event, 0);
rb_define_method 6217 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "event_interface", folemethod_event_interface, 0);
rb_define_method 6218 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "helpstring", folemethod_helpstring, 0);
rb_define_method 6219 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "helpfile", folemethod_helpfile, 0);
rb_define_method 6220 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "helpcontext", folemethod_helpcontext, 0);
rb_define_method 6221 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "dispid", folemethod_dispid, 0);
rb_define_method 6222 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "offset_vtbl", folemethod_offset_vtbl, 0);
rb_define_method 6223 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "size_params", folemethod_size_params, 0);
rb_define_method 6224 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "size_opt_params", folemethod_size_opt_params, 0);
rb_define_method 6225 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "params", folemethod_params, 0);
rb_define_method 6229 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_PARAM, "name", foleparam_name, 0);
rb_define_method 6230 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_PARAM, "ole_type", foleparam_ole_type, 0);
rb_define_method 6231 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_PARAM, "ole_type_detail", foleparam_ole_type_detail, 0);
rb_define_method 6232 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_PARAM, "input?", foleparam_input, 0);
rb_define_method 6233 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_PARAM, "output?", foleparam_output, 0);
rb_define_method 6234 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_PARAM, "optional?", foleparam_optional, 0);
rb_define_method 6235 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_PARAM, "retval?", foleparam_retval, 0);
rb_define_method 6236 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_PARAM, "default", foleparam_default, 0);
rb_define_method 6242 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_EVENT, "initialize", fev_initialize, -1);
rb_define_method 6245 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_EVENT, "on_event", fev_on_event, -1);
rb_define_method 6246 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_EVENT, "on_event_with_outargs", fev_on_event_with_outargs, -1);
rb_define_method 3335 ext/zlib/zlib.c     rb_define_method(cZStream, "avail_out", rb_zstream_avail_out, 0);
rb_define_method 3336 ext/zlib/zlib.c     rb_define_method(cZStream, "avail_out=", rb_zstream_set_avail_out, 1);
rb_define_method 3337 ext/zlib/zlib.c     rb_define_method(cZStream, "avail_in", rb_zstream_avail_in, 0);
rb_define_method 3338 ext/zlib/zlib.c     rb_define_method(cZStream, "total_in", rb_zstream_total_in, 0);
rb_define_method 3339 ext/zlib/zlib.c     rb_define_method(cZStream, "total_out", rb_zstream_total_out, 0);
rb_define_method 3340 ext/zlib/zlib.c     rb_define_method(cZStream, "data_type", rb_zstream_data_type, 0);
rb_define_method 3341 ext/zlib/zlib.c     rb_define_method(cZStream, "adler", rb_zstream_adler, 0);
rb_define_method 3342 ext/zlib/zlib.c     rb_define_method(cZStream, "finished?", rb_zstream_finished_p, 0);
rb_define_method 3343 ext/zlib/zlib.c     rb_define_method(cZStream, "stream_end?", rb_zstream_finished_p, 0);
rb_define_method 3344 ext/zlib/zlib.c     rb_define_method(cZStream, "closed?", rb_zstream_closed_p, 0);
rb_define_method 3345 ext/zlib/zlib.c     rb_define_method(cZStream, "ended?", rb_zstream_closed_p, 0);
rb_define_method 3346 ext/zlib/zlib.c     rb_define_method(cZStream, "close", rb_zstream_end, 0);
rb_define_method 3347 ext/zlib/zlib.c     rb_define_method(cZStream, "end", rb_zstream_end, 0);
rb_define_method 3348 ext/zlib/zlib.c     rb_define_method(cZStream, "reset", rb_zstream_reset, 0);
rb_define_method 3349 ext/zlib/zlib.c     rb_define_method(cZStream, "finish", rb_zstream_finish, 0);
rb_define_method 3350 ext/zlib/zlib.c     rb_define_method(cZStream, "flush_next_in", rb_zstream_flush_next_in, 0);
rb_define_method 3351 ext/zlib/zlib.c     rb_define_method(cZStream, "flush_next_out", rb_zstream_flush_next_out, 0);
rb_define_method 3360 ext/zlib/zlib.c     rb_define_method(cDeflate, "initialize", rb_deflate_initialize, -1);
rb_define_method 3361 ext/zlib/zlib.c     rb_define_method(cDeflate, "initialize_copy", rb_deflate_init_copy, 0);
rb_define_method 3362 ext/zlib/zlib.c     rb_define_method(cDeflate, "deflate", rb_deflate_deflate, -1);
rb_define_method 3363 ext/zlib/zlib.c     rb_define_method(cDeflate, "<<", rb_deflate_addstr, 1);
rb_define_method 3364 ext/zlib/zlib.c     rb_define_method(cDeflate, "flush", rb_deflate_flush, -1);
rb_define_method 3365 ext/zlib/zlib.c     rb_define_method(cDeflate, "params", rb_deflate_params, 2);
rb_define_method 3366 ext/zlib/zlib.c     rb_define_method(cDeflate, "set_dictionary", rb_deflate_set_dictionary, 1);
rb_define_method 3371 ext/zlib/zlib.c     rb_define_method(cInflate, "initialize", rb_inflate_initialize, -1);
rb_define_method 3372 ext/zlib/zlib.c     rb_define_method(cInflate, "inflate", rb_inflate_inflate, 1);
rb_define_method 3373 ext/zlib/zlib.c     rb_define_method(cInflate, "<<", rb_inflate_addstr, 1);
rb_define_method 3374 ext/zlib/zlib.c     rb_define_method(cInflate, "sync", rb_inflate_sync, 1);
rb_define_method 3375 ext/zlib/zlib.c     rb_define_method(cInflate, "sync_point?", rb_inflate_sync_point_p, 0);
rb_define_method 3376 ext/zlib/zlib.c     rb_define_method(cInflate, "set_dictionary", rb_inflate_set_dictionary, 1);
rb_define_method 3417 ext/zlib/zlib.c     rb_define_method(cGzipFile, "to_io", rb_gzfile_to_io, 0);
rb_define_method 3418 ext/zlib/zlib.c     rb_define_method(cGzipFile, "crc", rb_gzfile_crc, 0);
rb_define_method 3419 ext/zlib/zlib.c     rb_define_method(cGzipFile, "mtime", rb_gzfile_mtime, 0);
rb_define_method 3420 ext/zlib/zlib.c     rb_define_method(cGzipFile, "level", rb_gzfile_level, 0);
rb_define_method 3421 ext/zlib/zlib.c     rb_define_method(cGzipFile, "os_code", rb_gzfile_os_code, 0);
rb_define_method 3422 ext/zlib/zlib.c     rb_define_method(cGzipFile, "orig_name", rb_gzfile_orig_name, 0);
rb_define_method 3423 ext/zlib/zlib.c     rb_define_method(cGzipFile, "comment", rb_gzfile_comment, 0);
rb_define_method 3424 ext/zlib/zlib.c     rb_define_method(cGzipReader, "lineno", rb_gzfile_lineno, 0);
rb_define_method 3425 ext/zlib/zlib.c     rb_define_method(cGzipReader, "lineno=", rb_gzfile_set_lineno, 1);
rb_define_method 3426 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "mtime=", rb_gzfile_set_mtime, 1);
rb_define_method 3427 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "orig_name=", rb_gzfile_set_orig_name,1);
rb_define_method 3428 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "comment=", rb_gzfile_set_comment, 1);
rb_define_method 3429 ext/zlib/zlib.c     rb_define_method(cGzipFile, "close", rb_gzfile_close, 0);
rb_define_method 3430 ext/zlib/zlib.c     rb_define_method(cGzipFile, "finish", rb_gzfile_finish, 0);
rb_define_method 3431 ext/zlib/zlib.c     rb_define_method(cGzipFile, "closed?", rb_gzfile_closed_p, 0);
rb_define_method 3432 ext/zlib/zlib.c     rb_define_method(cGzipReader, "eof", rb_gzfile_eof_p, 0);
rb_define_method 3433 ext/zlib/zlib.c     rb_define_method(cGzipReader, "eof?", rb_gzfile_eof_p, 0);
rb_define_method 3434 ext/zlib/zlib.c     rb_define_method(cGzipFile, "sync", rb_gzfile_sync, 0);
rb_define_method 3435 ext/zlib/zlib.c     rb_define_method(cGzipFile, "sync=", rb_gzfile_set_sync, 1);
rb_define_method 3436 ext/zlib/zlib.c     rb_define_method(cGzipReader, "pos", rb_gzfile_total_out, 0);
rb_define_method 3437 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "pos", rb_gzfile_total_in, 0);
rb_define_method 3438 ext/zlib/zlib.c     rb_define_method(cGzipReader, "tell", rb_gzfile_total_out, 0);
rb_define_method 3439 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "tell", rb_gzfile_total_in, 0);
rb_define_method 3443 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "initialize", rb_gzwriter_initialize,-1);
rb_define_method 3444 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "flush", rb_gzwriter_flush, -1);
rb_define_method 3445 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "write", rb_gzwriter_write, 1);
rb_define_method 3446 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "putc", rb_gzwriter_putc, 1);
rb_define_method 3447 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "<<", rb_gzwriter_addstr, 1);
rb_define_method 3448 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "printf", rb_gzwriter_printf, -1);
rb_define_method 3449 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "print", rb_gzwriter_print, -1);
rb_define_method 3450 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "puts", rb_gzwriter_puts, -1);
rb_define_method 3454 ext/zlib/zlib.c     rb_define_method(cGzipReader, "initialize", rb_gzreader_initialize, 1);
rb_define_method 3455 ext/zlib/zlib.c     rb_define_method(cGzipReader, "rewind", rb_gzreader_rewind, 0);
rb_define_method 3456 ext/zlib/zlib.c     rb_define_method(cGzipReader, "unused", rb_gzreader_unused, 0);
rb_define_method 3457 ext/zlib/zlib.c     rb_define_method(cGzipReader, "read", rb_gzreader_read, -1);
rb_define_method 3458 ext/zlib/zlib.c     rb_define_method(cGzipReader, "getc", rb_gzreader_getc, 0);
rb_define_method 3459 ext/zlib/zlib.c     rb_define_method(cGzipReader, "readchar", rb_gzreader_readchar, 0);
rb_define_method 3460 ext/zlib/zlib.c     rb_define_method(cGzipReader, "each_byte", rb_gzreader_each_byte, 0);
rb_define_method 3461 ext/zlib/zlib.c     rb_define_method(cGzipReader, "ungetc", rb_gzreader_ungetc, 1);
rb_define_method 3462 ext/zlib/zlib.c     rb_define_method(cGzipReader, "gets", rb_gzreader_gets, -1);
rb_define_method 3463 ext/zlib/zlib.c     rb_define_method(cGzipReader, "readline", rb_gzreader_readline, -1);
rb_define_method 3464 ext/zlib/zlib.c     rb_define_method(cGzipReader, "each", rb_gzreader_each, -1);
rb_define_method 3465 ext/zlib/zlib.c     rb_define_method(cGzipReader, "each_line", rb_gzreader_each, -1);
rb_define_method 3466 ext/zlib/zlib.c     rb_define_method(cGzipReader, "readlines", rb_gzreader_readlines, -1);
rb_define_method 4407 file.c             rb_define_method(rb_cIO, "stat",  rb_io_stat, 0); /* this is IO's method */
rb_define_method 4408 file.c             rb_define_method(rb_cFile, "lstat",  rb_file_lstat, 0);
rb_define_method 4410 file.c             rb_define_method(rb_cFile, "atime", rb_file_atime, 0);
rb_define_method 4411 file.c             rb_define_method(rb_cFile, "mtime", rb_file_mtime, 0);
rb_define_method 4412 file.c             rb_define_method(rb_cFile, "ctime", rb_file_ctime, 0);
rb_define_method 4414 file.c             rb_define_method(rb_cFile, "chmod", rb_file_chmod, 1);
rb_define_method 4415 file.c             rb_define_method(rb_cFile, "chown", rb_file_chown, 2);
rb_define_method 4416 file.c             rb_define_method(rb_cFile, "truncate", rb_file_truncate, 1);
rb_define_method 4418 file.c             rb_define_method(rb_cFile, "flock", rb_file_flock, 1);
rb_define_method 4427 file.c             rb_define_method(rb_cFile, "path",  rb_file_path, 0);
rb_define_method 4432 file.c             rb_define_method(rb_cStat, "initialize", rb_stat_init, 1);
rb_define_method 4433 file.c             rb_define_method(rb_cStat, "initialize_copy", rb_stat_init_copy, 1);
rb_define_method 4437 file.c             rb_define_method(rb_cStat, "<=>", rb_stat_cmp, 1);
rb_define_method 4439 file.c             rb_define_method(rb_cStat, "dev", rb_stat_dev, 0);
rb_define_method 4440 file.c             rb_define_method(rb_cStat, "dev_major", rb_stat_dev_major, 0);
rb_define_method 4441 file.c             rb_define_method(rb_cStat, "dev_minor", rb_stat_dev_minor, 0);
rb_define_method 4442 file.c             rb_define_method(rb_cStat, "ino", rb_stat_ino, 0);
rb_define_method 4443 file.c             rb_define_method(rb_cStat, "mode", rb_stat_mode, 0);
rb_define_method 4444 file.c             rb_define_method(rb_cStat, "nlink", rb_stat_nlink, 0);
rb_define_method 4445 file.c             rb_define_method(rb_cStat, "uid", rb_stat_uid, 0);
rb_define_method 4446 file.c             rb_define_method(rb_cStat, "gid", rb_stat_gid, 0);
rb_define_method 4447 file.c             rb_define_method(rb_cStat, "rdev", rb_stat_rdev, 0);
rb_define_method 4448 file.c             rb_define_method(rb_cStat, "rdev_major", rb_stat_rdev_major, 0);
rb_define_method 4449 file.c             rb_define_method(rb_cStat, "rdev_minor", rb_stat_rdev_minor, 0);
rb_define_method 4450 file.c             rb_define_method(rb_cStat, "size", rb_stat_size, 0);
rb_define_method 4451 file.c             rb_define_method(rb_cStat, "blksize", rb_stat_blksize, 0);
rb_define_method 4452 file.c             rb_define_method(rb_cStat, "blocks", rb_stat_blocks, 0);
rb_define_method 4453 file.c             rb_define_method(rb_cStat, "atime", rb_stat_atime, 0);
rb_define_method 4454 file.c             rb_define_method(rb_cStat, "mtime", rb_stat_mtime, 0);
rb_define_method 4455 file.c             rb_define_method(rb_cStat, "ctime", rb_stat_ctime, 0);
rb_define_method 4457 file.c             rb_define_method(rb_cStat, "inspect", rb_stat_inspect, 0);
rb_define_method 4459 file.c             rb_define_method(rb_cStat, "ftype", rb_stat_ftype, 0);
rb_define_method 4461 file.c             rb_define_method(rb_cStat, "directory?",  rb_stat_d, 0);
rb_define_method 4462 file.c             rb_define_method(rb_cStat, "readable?",  rb_stat_r, 0);
rb_define_method 4463 file.c             rb_define_method(rb_cStat, "readable_real?",  rb_stat_R, 0);
rb_define_method 4464 file.c             rb_define_method(rb_cStat, "writable?",  rb_stat_w, 0);
rb_define_method 4465 file.c             rb_define_method(rb_cStat, "writable_real?",  rb_stat_W, 0);
rb_define_method 4466 file.c             rb_define_method(rb_cStat, "executable?",  rb_stat_x, 0);
rb_define_method 4467 file.c             rb_define_method(rb_cStat, "executable_real?",  rb_stat_X, 0);
rb_define_method 4468 file.c             rb_define_method(rb_cStat, "file?",  rb_stat_f, 0);
rb_define_method 4469 file.c             rb_define_method(rb_cStat, "zero?",  rb_stat_z, 0);
rb_define_method 4470 file.c             rb_define_method(rb_cStat, "size?",  rb_stat_s, 0);
rb_define_method 4471 file.c             rb_define_method(rb_cStat, "owned?",  rb_stat_owned, 0);
rb_define_method 4472 file.c             rb_define_method(rb_cStat, "grpowned?",  rb_stat_grpowned, 0);
rb_define_method 4474 file.c             rb_define_method(rb_cStat, "pipe?",  rb_stat_p, 0);
rb_define_method 4475 file.c             rb_define_method(rb_cStat, "symlink?",  rb_stat_l, 0);
rb_define_method 4476 file.c             rb_define_method(rb_cStat, "socket?",  rb_stat_S, 0);
rb_define_method 4478 file.c             rb_define_method(rb_cStat, "blockdev?",  rb_stat_b, 0);
rb_define_method 4479 file.c             rb_define_method(rb_cStat, "chardev?",  rb_stat_c, 0);
rb_define_method 4481 file.c             rb_define_method(rb_cStat, "setuid?",  rb_stat_suid, 0);
rb_define_method 4482 file.c             rb_define_method(rb_cStat, "setgid?",  rb_stat_sgid, 0);
rb_define_method 4483 file.c             rb_define_method(rb_cStat, "sticky?",  rb_stat_sticky, 0);
rb_define_method 1921 gc.c               rb_define_method(rb_mGC, "garbage_collect", rb_gc_start, 0);
rb_define_method 2423 hash.c             rb_define_method(rb_cHash,"initialize", rb_hash_initialize, -1);
rb_define_method 2424 hash.c             rb_define_method(rb_cHash,"initialize_copy", rb_hash_replace, 1);
rb_define_method 2425 hash.c             rb_define_method(rb_cHash,"rehash", rb_hash_rehash, 0);
rb_define_method 2427 hash.c             rb_define_method(rb_cHash,"to_hash", rb_hash_to_hash, 0);
rb_define_method 2428 hash.c             rb_define_method(rb_cHash,"to_a", rb_hash_to_a, 0);
rb_define_method 2429 hash.c             rb_define_method(rb_cHash,"to_s", rb_hash_to_s, 0);
rb_define_method 2430 hash.c             rb_define_method(rb_cHash,"inspect", rb_hash_inspect, 0);
rb_define_method 2432 hash.c             rb_define_method(rb_cHash,"==", rb_hash_equal, 1);
rb_define_method 2433 hash.c             rb_define_method(rb_cHash,"[]", rb_hash_aref, 1);
rb_define_method 2434 hash.c             rb_define_method(rb_cHash,"fetch", rb_hash_fetch, -1);
rb_define_method 2435 hash.c             rb_define_method(rb_cHash,"[]=", rb_hash_aset, 2);
rb_define_method 2436 hash.c             rb_define_method(rb_cHash,"store", rb_hash_aset, 2);
rb_define_method 2437 hash.c             rb_define_method(rb_cHash,"default", rb_hash_default, -1);
rb_define_method 2438 hash.c             rb_define_method(rb_cHash,"default=", rb_hash_set_default, 1);
rb_define_method 2439 hash.c             rb_define_method(rb_cHash,"default_proc", rb_hash_default_proc, 0);
rb_define_method 2440 hash.c             rb_define_method(rb_cHash,"index", rb_hash_index, 1);
rb_define_method 2441 hash.c             rb_define_method(rb_cHash,"indexes", rb_hash_indexes, -1);
rb_define_method 2442 hash.c             rb_define_method(rb_cHash,"indices", rb_hash_indexes, -1);
rb_define_method 2443 hash.c             rb_define_method(rb_cHash,"size", rb_hash_size, 0);
rb_define_method 2444 hash.c             rb_define_method(rb_cHash,"length", rb_hash_size, 0);
rb_define_method 2445 hash.c             rb_define_method(rb_cHash,"empty?", rb_hash_empty_p, 0);
rb_define_method 2447 hash.c             rb_define_method(rb_cHash,"each", rb_hash_each, 0);
rb_define_method 2448 hash.c             rb_define_method(rb_cHash,"each_value", rb_hash_each_value, 0);
rb_define_method 2449 hash.c             rb_define_method(rb_cHash,"each_key", rb_hash_each_key, 0);
rb_define_method 2450 hash.c             rb_define_method(rb_cHash,"each_pair", rb_hash_each_pair, 0);
rb_define_method 2451 hash.c             rb_define_method(rb_cHash,"sort", rb_hash_sort, 0);
rb_define_method 2453 hash.c             rb_define_method(rb_cHash,"keys", rb_hash_keys, 0);
rb_define_method 2454 hash.c             rb_define_method(rb_cHash,"values", rb_hash_values, 0);
rb_define_method 2455 hash.c             rb_define_method(rb_cHash,"values_at", rb_hash_values_at, -1);
rb_define_method 2457 hash.c             rb_define_method(rb_cHash,"shift", rb_hash_shift, 0);
rb_define_method 2458 hash.c             rb_define_method(rb_cHash,"delete", rb_hash_delete, 1);
rb_define_method 2459 hash.c             rb_define_method(rb_cHash,"delete_if", rb_hash_delete_if, 0);
rb_define_method 2460 hash.c             rb_define_method(rb_cHash,"select", rb_hash_select, -1);
rb_define_method 2461 hash.c             rb_define_method(rb_cHash,"reject", rb_hash_reject, 0);
rb_define_method 2462 hash.c             rb_define_method(rb_cHash,"reject!", rb_hash_reject_bang, 0);
rb_define_method 2463 hash.c             rb_define_method(rb_cHash,"clear", rb_hash_clear, 0);
rb_define_method 2464 hash.c             rb_define_method(rb_cHash,"invert", rb_hash_invert, 0);
rb_define_method 2465 hash.c             rb_define_method(rb_cHash,"update", rb_hash_update, 1);
rb_define_method 2466 hash.c             rb_define_method(rb_cHash,"replace", rb_hash_replace, 1);
rb_define_method 2467 hash.c             rb_define_method(rb_cHash,"merge!", rb_hash_update, 1);
rb_define_method 2468 hash.c             rb_define_method(rb_cHash,"merge", rb_hash_merge, 1);
rb_define_method 2470 hash.c             rb_define_method(rb_cHash,"include?", rb_hash_has_key, 1);
rb_define_method 2471 hash.c             rb_define_method(rb_cHash,"member?", rb_hash_has_key, 1);
rb_define_method 2472 hash.c             rb_define_method(rb_cHash,"has_key?", rb_hash_has_key, 1);
rb_define_method 2473 hash.c             rb_define_method(rb_cHash,"has_value?", rb_hash_has_value, 1);
rb_define_method 2474 hash.c             rb_define_method(rb_cHash,"key?", rb_hash_has_key, 1);
rb_define_method 2475 hash.c             rb_define_method(rb_cHash,"value?", rb_hash_has_value, 1);
rb_define_method 5575 io.c               rb_define_method(rb_mKernel, "display", rb_obj_display, -1);
rb_define_method 5592 io.c               rb_define_method(rb_cIO, "initialize", rb_io_initialize, -1);
rb_define_method 5608 io.c               rb_define_method(rb_cIO, "initialize_copy", rb_io_init_copy, 1);
rb_define_method 5609 io.c               rb_define_method(rb_cIO, "reopen", rb_io_reopen, -1);
rb_define_method 5611 io.c               rb_define_method(rb_cIO, "print", rb_io_print, -1);
rb_define_method 5612 io.c               rb_define_method(rb_cIO, "putc", rb_io_putc, 1);
rb_define_method 5613 io.c               rb_define_method(rb_cIO, "puts", rb_io_puts, -1);
rb_define_method 5614 io.c               rb_define_method(rb_cIO, "printf", rb_io_printf, -1);
rb_define_method 5616 io.c               rb_define_method(rb_cIO, "each",  rb_io_each_line, -1);
rb_define_method 5617 io.c               rb_define_method(rb_cIO, "each_line",  rb_io_each_line, -1);
rb_define_method 5618 io.c               rb_define_method(rb_cIO, "each_byte",  rb_io_each_byte, 0);
rb_define_method 5620 io.c               rb_define_method(rb_cIO, "syswrite", rb_io_syswrite, 1);
rb_define_method 5621 io.c               rb_define_method(rb_cIO, "sysread",  rb_io_sysread, -1);
rb_define_method 5623 io.c               rb_define_method(rb_cIO, "fileno", rb_io_fileno, 0);
rb_define_method 5625 io.c               rb_define_method(rb_cIO, "to_io", rb_io_to_io, 0);
rb_define_method 5627 io.c               rb_define_method(rb_cIO, "fsync",   rb_io_fsync, 0);
rb_define_method 5628 io.c               rb_define_method(rb_cIO, "sync",   rb_io_sync, 0);
rb_define_method 5629 io.c               rb_define_method(rb_cIO, "sync=",  rb_io_set_sync, 1);
rb_define_method 5631 io.c               rb_define_method(rb_cIO, "lineno",   rb_io_lineno, 0);
rb_define_method 5632 io.c               rb_define_method(rb_cIO, "lineno=",  rb_io_set_lineno, 1);
rb_define_method 5634 io.c               rb_define_method(rb_cIO, "readlines",  rb_io_readlines, -1);
rb_define_method 5636 io.c               rb_define_method(rb_cIO, "readpartial",  io_readpartial, -1);
rb_define_method 5637 io.c               rb_define_method(rb_cIO, "read",  io_read, -1);
rb_define_method 5638 io.c               rb_define_method(rb_cIO, "write", io_write, 1);
rb_define_method 5639 io.c               rb_define_method(rb_cIO, "gets",  rb_io_gets_m, -1);
rb_define_method 5640 io.c               rb_define_method(rb_cIO, "readline",  rb_io_readline, -1);
rb_define_method 5641 io.c               rb_define_method(rb_cIO, "getc",  rb_io_getc, 0);
rb_define_method 5642 io.c               rb_define_method(rb_cIO, "readchar",  rb_io_readchar, 0);
rb_define_method 5643 io.c               rb_define_method(rb_cIO, "ungetc",rb_io_ungetc, 1);
rb_define_method 5644 io.c               rb_define_method(rb_cIO, "<<",    rb_io_addstr, 1);
rb_define_method 5645 io.c               rb_define_method(rb_cIO, "flush", rb_io_flush, 0);
rb_define_method 5646 io.c               rb_define_method(rb_cIO, "tell", rb_io_tell, 0);
rb_define_method 5647 io.c               rb_define_method(rb_cIO, "seek", rb_io_seek_m, -1);
rb_define_method 5651 io.c               rb_define_method(rb_cIO, "rewind", rb_io_rewind, 0);
rb_define_method 5652 io.c               rb_define_method(rb_cIO, "pos", rb_io_tell, 0);
rb_define_method 5653 io.c               rb_define_method(rb_cIO, "pos=", rb_io_set_pos, 1);
rb_define_method 5654 io.c               rb_define_method(rb_cIO, "eof", rb_io_eof, 0);
rb_define_method 5655 io.c               rb_define_method(rb_cIO, "eof?", rb_io_eof, 0);
rb_define_method 5657 io.c               rb_define_method(rb_cIO, "close", rb_io_close_m, 0);
rb_define_method 5658 io.c               rb_define_method(rb_cIO, "closed?", rb_io_closed, 0);
rb_define_method 5659 io.c               rb_define_method(rb_cIO, "close_read", rb_io_close_read, 0);
rb_define_method 5660 io.c               rb_define_method(rb_cIO, "close_write", rb_io_close_write, 0);
rb_define_method 5662 io.c               rb_define_method(rb_cIO, "isatty", rb_io_isatty, 0);
rb_define_method 5663 io.c               rb_define_method(rb_cIO, "tty?", rb_io_isatty, 0);
rb_define_method 5664 io.c               rb_define_method(rb_cIO, "binmode",  rb_io_binmode, 0);
rb_define_method 5665 io.c               rb_define_method(rb_cIO, "sysseek", rb_io_sysseek, -1);
rb_define_method 5667 io.c               rb_define_method(rb_cIO, "ioctl", rb_io_ioctl, -1);
rb_define_method 5668 io.c               rb_define_method(rb_cIO, "fcntl", rb_io_fcntl, -1);
rb_define_method 5669 io.c               rb_define_method(rb_cIO, "pid", rb_io_pid, 0);
rb_define_method 5670 io.c               rb_define_method(rb_cIO, "inspect",  rb_io_inspect, 0);
rb_define_method 5743 io.c               rb_define_method(rb_cFile, "initialize",  rb_file_initialize, -1);
rb_define_method 2791 numeric.c          rb_define_method(rb_cNumeric, "singleton_method_added", num_sadded, 1);
rb_define_method 2793 numeric.c          rb_define_method(rb_cNumeric, "initialize_copy", num_init_copy, 1);
rb_define_method 2794 numeric.c          rb_define_method(rb_cNumeric, "coerce", num_coerce, 1);
rb_define_method 2796 numeric.c          rb_define_method(rb_cNumeric, "+@", num_uplus, 0);
rb_define_method 2797 numeric.c          rb_define_method(rb_cNumeric, "-@", num_uminus, 0);
rb_define_method 2798 numeric.c          rb_define_method(rb_cNumeric, "<=>", num_cmp, 1);
rb_define_method 2799 numeric.c          rb_define_method(rb_cNumeric, "eql?", num_eql, 1);
rb_define_method 2800 numeric.c          rb_define_method(rb_cNumeric, "quo", num_quo, 1);
rb_define_method 2801 numeric.c          rb_define_method(rb_cNumeric, "div", num_div, 1);
rb_define_method 2802 numeric.c          rb_define_method(rb_cNumeric, "divmod", num_divmod, 1);
rb_define_method 2803 numeric.c          rb_define_method(rb_cNumeric, "modulo", num_modulo, 1);
rb_define_method 2804 numeric.c          rb_define_method(rb_cNumeric, "remainder", num_remainder, 1);
rb_define_method 2805 numeric.c          rb_define_method(rb_cNumeric, "abs", num_abs, 0);
rb_define_method 2806 numeric.c          rb_define_method(rb_cNumeric, "to_int", num_to_int, 0);
rb_define_method 2808 numeric.c          rb_define_method(rb_cNumeric, "integer?", num_int_p, 0);
rb_define_method 2809 numeric.c          rb_define_method(rb_cNumeric, "zero?", num_zero_p, 0);
rb_define_method 2810 numeric.c          rb_define_method(rb_cNumeric, "nonzero?", num_nonzero_p, 0);
rb_define_method 2812 numeric.c          rb_define_method(rb_cNumeric, "floor", num_floor, 0);
rb_define_method 2813 numeric.c          rb_define_method(rb_cNumeric, "ceil", num_ceil, 0);
rb_define_method 2814 numeric.c          rb_define_method(rb_cNumeric, "round", num_round, 0);
rb_define_method 2815 numeric.c          rb_define_method(rb_cNumeric, "truncate", num_truncate, 0);
rb_define_method 2816 numeric.c          rb_define_method(rb_cNumeric, "step", num_step, -1);
rb_define_method 2822 numeric.c          rb_define_method(rb_cInteger, "integer?", int_int_p, 0);
rb_define_method 2823 numeric.c          rb_define_method(rb_cInteger, "upto", int_upto, 1);
rb_define_method 2824 numeric.c          rb_define_method(rb_cInteger, "downto", int_downto, 1);
rb_define_method 2825 numeric.c          rb_define_method(rb_cInteger, "times", int_dotimes, 0);
rb_define_method 2827 numeric.c          rb_define_method(rb_cInteger, "succ", int_succ, 0);
rb_define_method 2828 numeric.c          rb_define_method(rb_cInteger, "next", int_succ, 0);
rb_define_method 2829 numeric.c          rb_define_method(rb_cInteger, "chr", int_chr, 0);
rb_define_method 2830 numeric.c          rb_define_method(rb_cInteger, "to_i", int_to_i, 0);
rb_define_method 2831 numeric.c          rb_define_method(rb_cInteger, "to_int", int_to_i, 0);
rb_define_method 2832 numeric.c          rb_define_method(rb_cInteger, "floor", int_to_i, 0);
rb_define_method 2833 numeric.c          rb_define_method(rb_cInteger, "ceil", int_to_i, 0);
rb_define_method 2834 numeric.c          rb_define_method(rb_cInteger, "round", int_to_i, 0);
rb_define_method 2835 numeric.c          rb_define_method(rb_cInteger, "truncate", int_to_i, 0);
rb_define_method 2842 numeric.c          rb_define_method(rb_cFixnum, "to_s", fix_to_s, -1);
rb_define_method 2844 numeric.c          rb_define_method(rb_cFixnum, "id2name", fix_id2name, 0);
rb_define_method 2845 numeric.c          rb_define_method(rb_cFixnum, "to_sym", fix_to_sym, 0);
rb_define_method 2847 numeric.c          rb_define_method(rb_cFixnum, "-@", fix_uminus, 0);
rb_define_method 2848 numeric.c          rb_define_method(rb_cFixnum, "+", fix_plus, 1);
rb_define_method 2849 numeric.c          rb_define_method(rb_cFixnum, "-", fix_minus, 1);
rb_define_method 2850 numeric.c          rb_define_method(rb_cFixnum, "*", fix_mul, 1);
rb_define_method 2851 numeric.c          rb_define_method(rb_cFixnum, "/", fix_div, 1);
rb_define_method 2852 numeric.c          rb_define_method(rb_cFixnum, "div", fix_div, 1);
rb_define_method 2853 numeric.c          rb_define_method(rb_cFixnum, "%", fix_mod, 1);
rb_define_method 2854 numeric.c          rb_define_method(rb_cFixnum, "modulo", fix_mod, 1);
rb_define_method 2855 numeric.c          rb_define_method(rb_cFixnum, "divmod", fix_divmod, 1);
rb_define_method 2856 numeric.c          rb_define_method(rb_cFixnum, "quo", fix_quo, 1);
rb_define_method 2857 numeric.c          rb_define_method(rb_cFixnum, "**", fix_pow, 1);
rb_define_method 2859 numeric.c          rb_define_method(rb_cFixnum, "abs", fix_abs, 0);
rb_define_method 2861 numeric.c          rb_define_method(rb_cFixnum, "==", fix_equal, 1);
rb_define_method 2862 numeric.c          rb_define_method(rb_cFixnum, "<=>", fix_cmp, 1);
rb_define_method 2863 numeric.c          rb_define_method(rb_cFixnum, ">",  fix_gt, 1);
rb_define_method 2864 numeric.c          rb_define_method(rb_cFixnum, ">=", fix_ge, 1);
rb_define_method 2865 numeric.c          rb_define_method(rb_cFixnum, "<",  fix_lt, 1);
rb_define_method 2866 numeric.c          rb_define_method(rb_cFixnum, "<=", fix_le, 1);
rb_define_method 2868 numeric.c          rb_define_method(rb_cFixnum, "~", fix_rev, 0);
rb_define_method 2869 numeric.c          rb_define_method(rb_cFixnum, "&", fix_and, 1);
rb_define_method 2870 numeric.c          rb_define_method(rb_cFixnum, "|", fix_or,  1);
rb_define_method 2871 numeric.c          rb_define_method(rb_cFixnum, "^", fix_xor, 1);
rb_define_method 2872 numeric.c          rb_define_method(rb_cFixnum, "[]", fix_aref, 1);
rb_define_method 2874 numeric.c          rb_define_method(rb_cFixnum, "<<", fix_lshift, 1);
rb_define_method 2875 numeric.c          rb_define_method(rb_cFixnum, ">>", fix_rshift, 1);
rb_define_method 2877 numeric.c          rb_define_method(rb_cFixnum, "to_f", fix_to_f, 0);
rb_define_method 2878 numeric.c          rb_define_method(rb_cFixnum, "size", fix_size, 0);
rb_define_method 2879 numeric.c          rb_define_method(rb_cFixnum, "zero?", fix_zero_p, 0);
rb_define_method 2901 numeric.c          rb_define_method(rb_cFloat, "to_s", flo_to_s, 0);
rb_define_method 2902 numeric.c          rb_define_method(rb_cFloat, "coerce", flo_coerce, 1);
rb_define_method 2903 numeric.c          rb_define_method(rb_cFloat, "-@", flo_uminus, 0);
rb_define_method 2904 numeric.c          rb_define_method(rb_cFloat, "+", flo_plus, 1);
rb_define_method 2905 numeric.c          rb_define_method(rb_cFloat, "-", flo_minus, 1);
rb_define_method 2906 numeric.c          rb_define_method(rb_cFloat, "*", flo_mul, 1);
rb_define_method 2907 numeric.c          rb_define_method(rb_cFloat, "/", flo_div, 1);
rb_define_method 2908 numeric.c          rb_define_method(rb_cFloat, "%", flo_mod, 1);
rb_define_method 2909 numeric.c          rb_define_method(rb_cFloat, "modulo", flo_mod, 1);
rb_define_method 2910 numeric.c          rb_define_method(rb_cFloat, "divmod", flo_divmod, 1);
rb_define_method 2911 numeric.c          rb_define_method(rb_cFloat, "**", flo_pow, 1);
rb_define_method 2912 numeric.c          rb_define_method(rb_cFloat, "==", flo_eq, 1);
rb_define_method 2913 numeric.c          rb_define_method(rb_cFloat, "<=>", flo_cmp, 1);
rb_define_method 2914 numeric.c          rb_define_method(rb_cFloat, ">",  flo_gt, 1);
rb_define_method 2915 numeric.c          rb_define_method(rb_cFloat, ">=", flo_ge, 1);
rb_define_method 2916 numeric.c          rb_define_method(rb_cFloat, "<",  flo_lt, 1);
rb_define_method 2917 numeric.c          rb_define_method(rb_cFloat, "<=", flo_le, 1);
rb_define_method 2918 numeric.c          rb_define_method(rb_cFloat, "eql?", flo_eql, 1);
rb_define_method 2919 numeric.c          rb_define_method(rb_cFloat, "hash", flo_hash, 0);
rb_define_method 2920 numeric.c          rb_define_method(rb_cFloat, "to_f", flo_to_f, 0);
rb_define_method 2921 numeric.c          rb_define_method(rb_cFloat, "abs", flo_abs, 0);
rb_define_method 2922 numeric.c          rb_define_method(rb_cFloat, "zero?", flo_zero_p, 0);
rb_define_method 2924 numeric.c          rb_define_method(rb_cFloat, "to_i", flo_truncate, 0);
rb_define_method 2925 numeric.c          rb_define_method(rb_cFloat, "to_int", flo_truncate, 0);
rb_define_method 2926 numeric.c          rb_define_method(rb_cFloat, "floor", flo_floor, 0);
rb_define_method 2927 numeric.c          rb_define_method(rb_cFloat, "ceil", flo_ceil, 0);
rb_define_method 2928 numeric.c          rb_define_method(rb_cFloat, "round", flo_round, 0);
rb_define_method 2929 numeric.c          rb_define_method(rb_cFloat, "truncate", flo_truncate, 0);
rb_define_method 2931 numeric.c          rb_define_method(rb_cFloat, "nan?",      flo_is_nan_p, 0);
rb_define_method 2932 numeric.c          rb_define_method(rb_cFloat, "infinite?", flo_is_infinite_p, 0);
rb_define_method 2933 numeric.c          rb_define_method(rb_cFloat, "finite?",   flo_is_finite_p, 0);
rb_define_method 2609 object.c           rb_define_method(rb_mKernel, "nil?", rb_false, 0);
rb_define_method 2610 object.c           rb_define_method(rb_mKernel, "==", rb_obj_equal, 1);
rb_define_method 2611 object.c           rb_define_method(rb_mKernel, "equal?", rb_obj_equal, 1);
rb_define_method 2612 object.c           rb_define_method(rb_mKernel, "===", rb_equal, 1);
rb_define_method 2613 object.c           rb_define_method(rb_mKernel, "=~", rb_obj_pattern_match, 1);
rb_define_method 2615 object.c           rb_define_method(rb_mKernel, "eql?", rb_obj_equal, 1);
rb_define_method 2617 object.c           rb_define_method(rb_mKernel, "hash", rb_obj_id, 0);
rb_define_method 2618 object.c           rb_define_method(rb_mKernel, "id", rb_obj_id_obsolete, 0);
rb_define_method 2619 object.c           rb_define_method(rb_mKernel, "__id__", rb_obj_id, 0);
rb_define_method 2620 object.c           rb_define_method(rb_mKernel, "object_id", rb_obj_id, 0);
rb_define_method 2621 object.c           rb_define_method(rb_mKernel, "type", rb_obj_type, 0);
rb_define_method 2622 object.c           rb_define_method(rb_mKernel, "class", rb_obj_class, 0);
rb_define_method 2624 object.c           rb_define_method(rb_mKernel, "clone", rb_obj_clone, 0);
rb_define_method 2625 object.c           rb_define_method(rb_mKernel, "dup", rb_obj_dup, 0);
rb_define_method 2626 object.c           rb_define_method(rb_mKernel, "initialize_copy", rb_obj_init_copy, 1);
rb_define_method 2628 object.c           rb_define_method(rb_mKernel, "taint", rb_obj_taint, 0);
rb_define_method 2629 object.c           rb_define_method(rb_mKernel, "tainted?", rb_obj_tainted, 0);
rb_define_method 2630 object.c           rb_define_method(rb_mKernel, "untaint", rb_obj_untaint, 0);
rb_define_method 2631 object.c           rb_define_method(rb_mKernel, "freeze", rb_obj_freeze, 0);
rb_define_method 2632 object.c           rb_define_method(rb_mKernel, "frozen?", rb_obj_frozen_p, 0);
rb_define_method 2634 object.c           rb_define_method(rb_mKernel, "to_a", rb_any_to_a, 0); /* to be removed */
rb_define_method 2635 object.c           rb_define_method(rb_mKernel, "to_s", rb_any_to_s, 0);
rb_define_method 2636 object.c           rb_define_method(rb_mKernel, "inspect", rb_obj_inspect, 0);
rb_define_method 2637 object.c           rb_define_method(rb_mKernel, "methods", rb_obj_methods, -1);
rb_define_method 2638 object.c           rb_define_method(rb_mKernel, "singleton_methods",
rb_define_method 2640 object.c           rb_define_method(rb_mKernel, "protected_methods",
rb_define_method 2642 object.c           rb_define_method(rb_mKernel, "private_methods", rb_obj_private_methods, -1);
rb_define_method 2643 object.c           rb_define_method(rb_mKernel, "public_methods", rb_obj_public_methods, -1);
rb_define_method 2644 object.c           rb_define_method(rb_mKernel, "instance_variables",
rb_define_method 2646 object.c           rb_define_method(rb_mKernel, "instance_variable_get", rb_obj_ivar_get, 1);
rb_define_method 2647 object.c           rb_define_method(rb_mKernel, "instance_variable_set", rb_obj_ivar_set, 2);
rb_define_method 2651 object.c           rb_define_method(rb_mKernel, "instance_of?", rb_obj_is_instance_of, 1);
rb_define_method 2652 object.c           rb_define_method(rb_mKernel, "kind_of?", rb_obj_is_kind_of, 1);
rb_define_method 2653 object.c           rb_define_method(rb_mKernel, "is_a?", rb_obj_is_kind_of, 1);
rb_define_method 2669 object.c           rb_define_method(rb_cNilClass, "to_i", nil_to_i, 0);
rb_define_method 2670 object.c           rb_define_method(rb_cNilClass, "to_f", nil_to_f, 0);
rb_define_method 2671 object.c           rb_define_method(rb_cNilClass, "to_s", nil_to_s, 0);
rb_define_method 2672 object.c           rb_define_method(rb_cNilClass, "to_a", nil_to_a, 0);
rb_define_method 2673 object.c           rb_define_method(rb_cNilClass, "inspect", nil_inspect, 0);
rb_define_method 2674 object.c           rb_define_method(rb_cNilClass, "&", false_and, 1);
rb_define_method 2675 object.c           rb_define_method(rb_cNilClass, "|", false_or, 1);
rb_define_method 2676 object.c           rb_define_method(rb_cNilClass, "^", false_xor, 1);
rb_define_method 2678 object.c           rb_define_method(rb_cNilClass, "nil?", rb_true, 0);
rb_define_method 2689 object.c           rb_define_method(rb_cSymbol, "to_i", sym_to_i, 0);
rb_define_method 2690 object.c           rb_define_method(rb_cSymbol, "to_int", sym_to_int, 0);
rb_define_method 2691 object.c           rb_define_method(rb_cSymbol, "inspect", sym_inspect, 0);
rb_define_method 2692 object.c           rb_define_method(rb_cSymbol, "to_s", sym_to_s, 0);
rb_define_method 2693 object.c           rb_define_method(rb_cSymbol, "id2name", sym_to_s, 0);
rb_define_method 2694 object.c           rb_define_method(rb_cSymbol, "to_sym", sym_to_sym, 0);
rb_define_method 2695 object.c           rb_define_method(rb_cSymbol, "===", rb_obj_equal, 1);
rb_define_method 2697 object.c           rb_define_method(rb_cModule, "freeze", rb_mod_freeze, 0);
rb_define_method 2698 object.c           rb_define_method(rb_cModule, "===", rb_mod_eqq, 1);
rb_define_method 2699 object.c           rb_define_method(rb_cModule, "==", rb_obj_equal, 1);
rb_define_method 2700 object.c           rb_define_method(rb_cModule, "<=>",  rb_mod_cmp, 1);
rb_define_method 2701 object.c           rb_define_method(rb_cModule, "<",  rb_mod_lt, 1);
rb_define_method 2702 object.c           rb_define_method(rb_cModule, "<=", rb_class_inherited_p, 1);
rb_define_method 2703 object.c           rb_define_method(rb_cModule, ">",  rb_mod_gt, 1);
rb_define_method 2704 object.c           rb_define_method(rb_cModule, ">=", rb_mod_ge, 1);
rb_define_method 2705 object.c           rb_define_method(rb_cModule, "initialize_copy", rb_mod_init_copy, 1); /* in class.c */
rb_define_method 2706 object.c           rb_define_method(rb_cModule, "to_s", rb_mod_to_s, 0);
rb_define_method 2707 object.c           rb_define_method(rb_cModule, "included_modules",
rb_define_method 2709 object.c           rb_define_method(rb_cModule, "include?", rb_mod_include_p, 1); /* in class.c */
rb_define_method 2710 object.c           rb_define_method(rb_cModule, "name", rb_mod_name, 0);  /* in variable.c */
rb_define_method 2711 object.c           rb_define_method(rb_cModule, "ancestors", rb_mod_ancestors, 0); /* in class.c */
rb_define_method 2719 object.c           rb_define_method(rb_cModule, "initialize", rb_mod_initialize, 0);
rb_define_method 2720 object.c           rb_define_method(rb_cModule, "instance_methods",
rb_define_method 2722 object.c           rb_define_method(rb_cModule, "public_instance_methods",
rb_define_method 2724 object.c           rb_define_method(rb_cModule, "protected_instance_methods",
rb_define_method 2726 object.c           rb_define_method(rb_cModule, "private_instance_methods",
rb_define_method 2729 object.c           rb_define_method(rb_cModule, "constants", rb_mod_constants, 0); /* in variable.c */
rb_define_method 2730 object.c           rb_define_method(rb_cModule, "const_get", rb_mod_const_get, 1);
rb_define_method 2731 object.c           rb_define_method(rb_cModule, "const_set", rb_mod_const_set, 2);
rb_define_method 2732 object.c           rb_define_method(rb_cModule, "const_defined?", rb_mod_const_defined, 1);
rb_define_method 2735 object.c           rb_define_method(rb_cModule, "const_missing",
rb_define_method 2737 object.c           rb_define_method(rb_cModule, "class_variables",
rb_define_method 2744 object.c           rb_define_method(rb_cClass, "allocate", rb_obj_alloc, 0);
rb_define_method 2745 object.c           rb_define_method(rb_cClass, "new", rb_class_new_instance, -1);
rb_define_method 2746 object.c           rb_define_method(rb_cClass, "initialize", rb_class_initialize, -1);
rb_define_method 2747 object.c           rb_define_method(rb_cClass, "initialize_copy", rb_class_init_copy, 1); /* in class.c */
rb_define_method 2748 object.c           rb_define_method(rb_cClass, "superclass", rb_class_superclass, 0);
rb_define_method 2761 object.c           rb_define_method(rb_cTrueClass, "to_s", true_to_s, 0);
rb_define_method 2762 object.c           rb_define_method(rb_cTrueClass, "&", true_and, 1);
rb_define_method 2763 object.c           rb_define_method(rb_cTrueClass, "|", true_or, 1);
rb_define_method 2764 object.c           rb_define_method(rb_cTrueClass, "^", true_xor, 1);
rb_define_method 2770 object.c           rb_define_method(rb_cFalseClass, "to_s", false_to_s, 0);
rb_define_method 2771 object.c           rb_define_method(rb_cFalseClass, "&", false_and, 1);
rb_define_method 2772 object.c           rb_define_method(rb_cFalseClass, "|", false_or, 1);
rb_define_method 2773 object.c           rb_define_method(rb_cFalseClass, "^", false_xor, 1);
rb_define_method 2104 pack.c             rb_define_method(rb_cArray, "pack", pack_pack, 1);
rb_define_method 2105 pack.c             rb_define_method(rb_cString, "unpack", pack_unpack, 1);
rb_define_method  135 prec.c             rb_define_method(rb_mPrecision, "prec", prec_prec, 1);
rb_define_method  136 prec.c             rb_define_method(rb_mPrecision, "prec_i", prec_prec_i, 0);
rb_define_method  137 prec.c             rb_define_method(rb_mPrecision, "prec_f", prec_prec_f, 0);
rb_define_method 3401 process.c          rb_define_method(rb_cProcStatus, "==", pst_equal, 1);
rb_define_method 3402 process.c          rb_define_method(rb_cProcStatus, "&", pst_bitand, 1);
rb_define_method 3403 process.c          rb_define_method(rb_cProcStatus, ">>", pst_rshift, 1);
rb_define_method 3404 process.c          rb_define_method(rb_cProcStatus, "to_i", pst_to_i, 0);
rb_define_method 3405 process.c          rb_define_method(rb_cProcStatus, "to_int", pst_to_i, 0);
rb_define_method 3406 process.c          rb_define_method(rb_cProcStatus, "to_s", pst_to_s, 0);
rb_define_method 3407 process.c          rb_define_method(rb_cProcStatus, "inspect", pst_inspect, 0);
rb_define_method 3409 process.c          rb_define_method(rb_cProcStatus, "pid", pst_pid, 0);
rb_define_method 3411 process.c          rb_define_method(rb_cProcStatus, "stopped?", pst_wifstopped, 0);
rb_define_method 3412 process.c          rb_define_method(rb_cProcStatus, "stopsig", pst_wstopsig, 0);
rb_define_method 3413 process.c          rb_define_method(rb_cProcStatus, "signaled?", pst_wifsignaled, 0);
rb_define_method 3414 process.c          rb_define_method(rb_cProcStatus, "termsig", pst_wtermsig, 0);
rb_define_method 3415 process.c          rb_define_method(rb_cProcStatus, "exited?", pst_wifexited, 0);
rb_define_method 3416 process.c          rb_define_method(rb_cProcStatus, "exitstatus", pst_wexitstatus, 0);
rb_define_method 3417 process.c          rb_define_method(rb_cProcStatus, "success?", pst_success_p, 0);
rb_define_method 3418 process.c          rb_define_method(rb_cProcStatus, "coredump?", pst_wcoredump, 0);
rb_define_method  651 range.c            rb_define_method(rb_cRange, "initialize", range_initialize, -1);
rb_define_method  652 range.c            rb_define_method(rb_cRange, "==", range_eq, 1);
rb_define_method  653 range.c            rb_define_method(rb_cRange, "===", range_include, 1);
rb_define_method  654 range.c            rb_define_method(rb_cRange, "eql?", range_eql, 1);
rb_define_method  655 range.c            rb_define_method(rb_cRange, "hash", range_hash, 0);
rb_define_method  656 range.c            rb_define_method(rb_cRange, "each", range_each, 0);
rb_define_method  657 range.c            rb_define_method(rb_cRange, "step", range_step, -1);
rb_define_method  658 range.c            rb_define_method(rb_cRange, "first", range_first, 0);
rb_define_method  659 range.c            rb_define_method(rb_cRange, "last", range_last, 0);
rb_define_method  660 range.c            rb_define_method(rb_cRange, "begin", range_first, 0);
rb_define_method  661 range.c            rb_define_method(rb_cRange, "end", range_last, 0);
rb_define_method  662 range.c            rb_define_method(rb_cRange, "to_s", range_to_s, 0);
rb_define_method  663 range.c            rb_define_method(rb_cRange, "inspect", range_inspect, 0);
rb_define_method  665 range.c            rb_define_method(rb_cRange, "exclude_end?", range_exclude_end_p, 0);
rb_define_method  667 range.c            rb_define_method(rb_cRange, "member?", range_include, 1);
rb_define_method  668 range.c            rb_define_method(rb_cRange, "include?", range_include, 1);
rb_define_method 2259 re.c               rb_define_method(rb_cRegexp, "initialize", rb_reg_initialize_m, -1);
rb_define_method 2260 re.c               rb_define_method(rb_cRegexp, "initialize_copy", rb_reg_init_copy, 1);
rb_define_method 2261 re.c               rb_define_method(rb_cRegexp, "hash", rb_reg_hash, 0);
rb_define_method 2262 re.c               rb_define_method(rb_cRegexp, "eql?", rb_reg_equal, 1);
rb_define_method 2263 re.c               rb_define_method(rb_cRegexp, "==", rb_reg_equal, 1);
rb_define_method 2264 re.c               rb_define_method(rb_cRegexp, "=~", rb_reg_match, 1);
rb_define_method 2265 re.c               rb_define_method(rb_cRegexp, "===", rb_reg_eqq, 1);
rb_define_method 2266 re.c               rb_define_method(rb_cRegexp, "~", rb_reg_match2, 0);
rb_define_method 2267 re.c               rb_define_method(rb_cRegexp, "match", rb_reg_match_m, 1);
rb_define_method 2268 re.c               rb_define_method(rb_cRegexp, "to_s", rb_reg_to_s, 0);
rb_define_method 2269 re.c               rb_define_method(rb_cRegexp, "inspect", rb_reg_inspect, 0);
rb_define_method 2270 re.c               rb_define_method(rb_cRegexp, "source", rb_reg_source, 0);
rb_define_method 2271 re.c               rb_define_method(rb_cRegexp, "casefold?", rb_reg_casefold_p, 0);
rb_define_method 2272 re.c               rb_define_method(rb_cRegexp, "options", rb_reg_options_m, 0);
rb_define_method 2273 re.c               rb_define_method(rb_cRegexp, "kcode", rb_reg_kcode_m, 0);
rb_define_method 2286 re.c               rb_define_method(rb_cMatch, "initialize_copy", match_init_copy, 1);
rb_define_method 2287 re.c               rb_define_method(rb_cMatch, "size", match_size, 0);
rb_define_method 2288 re.c               rb_define_method(rb_cMatch, "length", match_size, 0);
rb_define_method 2289 re.c               rb_define_method(rb_cMatch, "offset", match_offset, 1);
rb_define_method 2290 re.c               rb_define_method(rb_cMatch, "begin", match_begin, 1);
rb_define_method 2291 re.c               rb_define_method(rb_cMatch, "end", match_end, 1);
rb_define_method 2292 re.c               rb_define_method(rb_cMatch, "to_a", match_to_a, 0);
rb_define_method 2293 re.c               rb_define_method(rb_cMatch, "[]", match_aref, -1);
rb_define_method 2294 re.c               rb_define_method(rb_cMatch, "captures", match_captures, 0);
rb_define_method 2295 re.c               rb_define_method(rb_cMatch, "select", match_select, -1);
rb_define_method 2296 re.c               rb_define_method(rb_cMatch, "values_at", match_values_at, -1);
rb_define_method 2297 re.c               rb_define_method(rb_cMatch, "pre_match", rb_reg_match_pre, 0);
rb_define_method 2298 re.c               rb_define_method(rb_cMatch, "post_match", rb_reg_match_post, 0);
rb_define_method 2299 re.c               rb_define_method(rb_cMatch, "to_s", match_to_s, 0);
rb_define_method 2300 re.c               rb_define_method(rb_cMatch, "inspect", rb_any_to_s, 0); /* in object.c */
rb_define_method 2301 re.c               rb_define_method(rb_cMatch, "string", match_string, 0);
rb_define_method  496 ruby.h         void rb_define_method _((VALUE,const char*,VALUE(*)(ANYARGS),int));
rb_define_method 4637 string.c           rb_define_method(rb_cString, "initialize", rb_str_init, -1);
rb_define_method 4638 string.c           rb_define_method(rb_cString, "initialize_copy", rb_str_replace, 1);
rb_define_method 4639 string.c           rb_define_method(rb_cString, "<=>", rb_str_cmp_m, 1);
rb_define_method 4640 string.c           rb_define_method(rb_cString, "==", rb_str_equal, 1);
rb_define_method 4641 string.c           rb_define_method(rb_cString, "eql?", rb_str_eql, 1);
rb_define_method 4642 string.c           rb_define_method(rb_cString, "hash", rb_str_hash_m, 0);
rb_define_method 4643 string.c           rb_define_method(rb_cString, "casecmp", rb_str_casecmp, 1);
rb_define_method 4644 string.c           rb_define_method(rb_cString, "+", rb_str_plus, 1);
rb_define_method 4645 string.c           rb_define_method(rb_cString, "*", rb_str_times, 1);
rb_define_method 4646 string.c           rb_define_method(rb_cString, "%", rb_str_format, 1);
rb_define_method 4647 string.c           rb_define_method(rb_cString, "[]", rb_str_aref_m, -1);
rb_define_method 4648 string.c           rb_define_method(rb_cString, "[]=", rb_str_aset_m, -1);
rb_define_method 4649 string.c           rb_define_method(rb_cString, "insert", rb_str_insert, 2);
rb_define_method 4650 string.c           rb_define_method(rb_cString, "length", rb_str_length, 0);
rb_define_method 4651 string.c           rb_define_method(rb_cString, "size", rb_str_length, 0);
rb_define_method 4652 string.c           rb_define_method(rb_cString, "empty?", rb_str_empty, 0);
rb_define_method 4653 string.c           rb_define_method(rb_cString, "=~", rb_str_match, 1);
rb_define_method 4654 string.c           rb_define_method(rb_cString, "match", rb_str_match_m, 1);
rb_define_method 4655 string.c           rb_define_method(rb_cString, "succ", rb_str_succ, 0);
rb_define_method 4656 string.c           rb_define_method(rb_cString, "succ!", rb_str_succ_bang, 0);
rb_define_method 4657 string.c           rb_define_method(rb_cString, "next", rb_str_succ, 0);
rb_define_method 4658 string.c           rb_define_method(rb_cString, "next!", rb_str_succ_bang, 0);
rb_define_method 4659 string.c           rb_define_method(rb_cString, "upto", rb_str_upto_m, 1);
rb_define_method 4660 string.c           rb_define_method(rb_cString, "index", rb_str_index_m, -1);
rb_define_method 4661 string.c           rb_define_method(rb_cString, "rindex", rb_str_rindex_m, -1);
rb_define_method 4662 string.c           rb_define_method(rb_cString, "replace", rb_str_replace, 1);
rb_define_method 4664 string.c           rb_define_method(rb_cString, "to_i", rb_str_to_i, -1);
rb_define_method 4665 string.c           rb_define_method(rb_cString, "to_f", rb_str_to_f, 0);
rb_define_method 4666 string.c           rb_define_method(rb_cString, "to_s", rb_str_to_s, 0);
rb_define_method 4667 string.c           rb_define_method(rb_cString, "to_str", rb_str_to_s, 0);
rb_define_method 4668 string.c           rb_define_method(rb_cString, "inspect", rb_str_inspect, 0);
rb_define_method 4669 string.c           rb_define_method(rb_cString, "dump", rb_str_dump, 0);
rb_define_method 4671 string.c           rb_define_method(rb_cString, "upcase", rb_str_upcase, 0);
rb_define_method 4672 string.c           rb_define_method(rb_cString, "downcase", rb_str_downcase, 0);
rb_define_method 4673 string.c           rb_define_method(rb_cString, "capitalize", rb_str_capitalize, 0);
rb_define_method 4674 string.c           rb_define_method(rb_cString, "swapcase", rb_str_swapcase, 0);
rb_define_method 4676 string.c           rb_define_method(rb_cString, "upcase!", rb_str_upcase_bang, 0);
rb_define_method 4677 string.c           rb_define_method(rb_cString, "downcase!", rb_str_downcase_bang, 0);
rb_define_method 4678 string.c           rb_define_method(rb_cString, "capitalize!", rb_str_capitalize_bang, 0);
rb_define_method 4679 string.c           rb_define_method(rb_cString, "swapcase!", rb_str_swapcase_bang, 0);
rb_define_method 4681 string.c           rb_define_method(rb_cString, "hex", rb_str_hex, 0);
rb_define_method 4682 string.c           rb_define_method(rb_cString, "oct", rb_str_oct, 0);
rb_define_method 4683 string.c           rb_define_method(rb_cString, "split", rb_str_split_m, -1);
rb_define_method 4684 string.c           rb_define_method(rb_cString, "reverse", rb_str_reverse, 0);
rb_define_method 4685 string.c           rb_define_method(rb_cString, "reverse!", rb_str_reverse_bang, 0);
rb_define_method 4686 string.c           rb_define_method(rb_cString, "concat", rb_str_concat, 1);
rb_define_method 4687 string.c           rb_define_method(rb_cString, "<<", rb_str_concat, 1);
rb_define_method 4688 string.c           rb_define_method(rb_cString, "crypt", rb_str_crypt, 1);
rb_define_method 4689 string.c           rb_define_method(rb_cString, "intern", rb_str_intern, 0);
rb_define_method 4690 string.c           rb_define_method(rb_cString, "to_sym", rb_str_intern, 0);
rb_define_method 4692 string.c           rb_define_method(rb_cString, "include?", rb_str_include, 1);
rb_define_method 4694 string.c           rb_define_method(rb_cString, "scan", rb_str_scan, 1);
rb_define_method 4696 string.c           rb_define_method(rb_cString, "ljust", rb_str_ljust, -1);
rb_define_method 4697 string.c           rb_define_method(rb_cString, "rjust", rb_str_rjust, -1);
rb_define_method 4698 string.c           rb_define_method(rb_cString, "center", rb_str_center, -1);
rb_define_method 4700 string.c           rb_define_method(rb_cString, "sub", rb_str_sub, -1);
rb_define_method 4701 string.c           rb_define_method(rb_cString, "gsub", rb_str_gsub, -1);
rb_define_method 4702 string.c           rb_define_method(rb_cString, "chop", rb_str_chop, 0);
rb_define_method 4703 string.c           rb_define_method(rb_cString, "chomp", rb_str_chomp, -1);
rb_define_method 4704 string.c           rb_define_method(rb_cString, "strip", rb_str_strip, 0);
rb_define_method 4705 string.c           rb_define_method(rb_cString, "lstrip", rb_str_lstrip, 0);
rb_define_method 4706 string.c           rb_define_method(rb_cString, "rstrip", rb_str_rstrip, 0);
rb_define_method 4708 string.c           rb_define_method(rb_cString, "sub!", rb_str_sub_bang, -1);
rb_define_method 4709 string.c           rb_define_method(rb_cString, "gsub!", rb_str_gsub_bang, -1);
rb_define_method 4710 string.c           rb_define_method(rb_cString, "chop!", rb_str_chop_bang, 0);
rb_define_method 4711 string.c           rb_define_method(rb_cString, "chomp!", rb_str_chomp_bang, -1);
rb_define_method 4712 string.c           rb_define_method(rb_cString, "strip!", rb_str_strip_bang, 0);
rb_define_method 4713 string.c           rb_define_method(rb_cString, "lstrip!", rb_str_lstrip_bang, 0);
rb_define_method 4714 string.c           rb_define_method(rb_cString, "rstrip!", rb_str_rstrip_bang, 0);
rb_define_method 4716 string.c           rb_define_method(rb_cString, "tr", rb_str_tr, 2);
rb_define_method 4717 string.c           rb_define_method(rb_cString, "tr_s", rb_str_tr_s, 2);
rb_define_method 4718 string.c           rb_define_method(rb_cString, "delete", rb_str_delete, -1);
rb_define_method 4719 string.c           rb_define_method(rb_cString, "squeeze", rb_str_squeeze, -1);
rb_define_method 4720 string.c           rb_define_method(rb_cString, "count", rb_str_count, -1);
rb_define_method 4722 string.c           rb_define_method(rb_cString, "tr!", rb_str_tr_bang, 2);
rb_define_method 4723 string.c           rb_define_method(rb_cString, "tr_s!", rb_str_tr_s_bang, 2);
rb_define_method 4724 string.c           rb_define_method(rb_cString, "delete!", rb_str_delete_bang, -1);
rb_define_method 4725 string.c           rb_define_method(rb_cString, "squeeze!", rb_str_squeeze_bang, -1);
rb_define_method 4727 string.c           rb_define_method(rb_cString, "each_line", rb_str_each_line, -1);
rb_define_method 4728 string.c           rb_define_method(rb_cString, "each", rb_str_each_line, -1);
rb_define_method 4729 string.c           rb_define_method(rb_cString, "each_byte", rb_str_each_byte, 0);
rb_define_method 4731 string.c           rb_define_method(rb_cString, "sum", rb_str_sum, -1);
rb_define_method 4748 string.c           rb_define_method(rb_cString, "slice", rb_str_aref_m, -1);
rb_define_method 4749 string.c           rb_define_method(rb_cString, "slice!", rb_str_slice_bang, -1);
rb_define_method  900 struct.c           rb_define_method(rb_cStruct, "initialize", rb_struct_initialize, -2);
rb_define_method  901 struct.c           rb_define_method(rb_cStruct, "initialize_copy", rb_struct_init_copy, 1);
rb_define_method  903 struct.c           rb_define_method(rb_cStruct, "==", rb_struct_equal, 1);
rb_define_method  904 struct.c           rb_define_method(rb_cStruct, "eql?", rb_struct_eql, 1);
rb_define_method  905 struct.c           rb_define_method(rb_cStruct, "hash", rb_struct_hash, 0);
rb_define_method  907 struct.c           rb_define_method(rb_cStruct, "to_s", rb_struct_inspect, 0);
rb_define_method  908 struct.c           rb_define_method(rb_cStruct, "inspect", rb_struct_inspect, 0);
rb_define_method  909 struct.c           rb_define_method(rb_cStruct, "to_a", rb_struct_to_a, 0);
rb_define_method  910 struct.c           rb_define_method(rb_cStruct, "values", rb_struct_to_a, 0);
rb_define_method  911 struct.c           rb_define_method(rb_cStruct, "size", rb_struct_size, 0);
rb_define_method  912 struct.c           rb_define_method(rb_cStruct, "length", rb_struct_size, 0);
rb_define_method  914 struct.c           rb_define_method(rb_cStruct, "each", rb_struct_each, 0);
rb_define_method  915 struct.c           rb_define_method(rb_cStruct, "each_pair", rb_struct_each_pair, 0);
rb_define_method  916 struct.c           rb_define_method(rb_cStruct, "[]", rb_struct_aref, 1);
rb_define_method  917 struct.c           rb_define_method(rb_cStruct, "[]=", rb_struct_aset, 2);
rb_define_method  918 struct.c           rb_define_method(rb_cStruct, "select", rb_struct_select, -1);
rb_define_method  919 struct.c           rb_define_method(rb_cStruct, "values_at", rb_struct_values_at, -1);
rb_define_method  921 struct.c           rb_define_method(rb_cStruct, "members", rb_struct_members_m, 0);
rb_define_method 2059 time.c             rb_define_method(rb_cTime, "to_i", time_to_i, 0);
rb_define_method 2060 time.c             rb_define_method(rb_cTime, "to_f", time_to_f, 0);
rb_define_method 2061 time.c             rb_define_method(rb_cTime, "<=>", time_cmp, 1);
rb_define_method 2062 time.c             rb_define_method(rb_cTime, "eql?", time_eql, 1);
rb_define_method 2063 time.c             rb_define_method(rb_cTime, "hash", time_hash, 0);
rb_define_method 2064 time.c             rb_define_method(rb_cTime, "initialize", time_init, 0);
rb_define_method 2065 time.c             rb_define_method(rb_cTime, "initialize_copy", time_init_copy, 1);
rb_define_method 2067 time.c             rb_define_method(rb_cTime, "localtime", time_localtime, 0);
rb_define_method 2068 time.c             rb_define_method(rb_cTime, "gmtime", time_gmtime, 0);
rb_define_method 2069 time.c             rb_define_method(rb_cTime, "utc", time_gmtime, 0);
rb_define_method 2070 time.c             rb_define_method(rb_cTime, "getlocal", time_getlocaltime, 0);
rb_define_method 2071 time.c             rb_define_method(rb_cTime, "getgm", time_getgmtime, 0);
rb_define_method 2072 time.c             rb_define_method(rb_cTime, "getutc", time_getgmtime, 0);
rb_define_method 2074 time.c             rb_define_method(rb_cTime, "ctime", time_asctime, 0);
rb_define_method 2075 time.c             rb_define_method(rb_cTime, "asctime", time_asctime, 0);
rb_define_method 2076 time.c             rb_define_method(rb_cTime, "to_s", time_to_s, 0);
rb_define_method 2077 time.c             rb_define_method(rb_cTime, "inspect", time_to_s, 0);
rb_define_method 2078 time.c             rb_define_method(rb_cTime, "to_a", time_to_a, 0);
rb_define_method 2080 time.c             rb_define_method(rb_cTime, "+", time_plus, 1);
rb_define_method 2081 time.c             rb_define_method(rb_cTime, "-", time_minus, 1);
rb_define_method 2083 time.c             rb_define_method(rb_cTime, "succ", time_succ, 0);
rb_define_method 2084 time.c             rb_define_method(rb_cTime, "sec", time_sec, 0);
rb_define_method 2085 time.c             rb_define_method(rb_cTime, "min", time_min, 0);
rb_define_method 2086 time.c             rb_define_method(rb_cTime, "hour", time_hour, 0);
rb_define_method 2087 time.c             rb_define_method(rb_cTime, "mday", time_mday, 0);
rb_define_method 2088 time.c             rb_define_method(rb_cTime, "day", time_mday, 0);
rb_define_method 2089 time.c             rb_define_method(rb_cTime, "mon", time_mon, 0);
rb_define_method 2090 time.c             rb_define_method(rb_cTime, "month", time_mon, 0);
rb_define_method 2091 time.c             rb_define_method(rb_cTime, "year", time_year, 0);
rb_define_method 2092 time.c             rb_define_method(rb_cTime, "wday", time_wday, 0);
rb_define_method 2093 time.c             rb_define_method(rb_cTime, "yday", time_yday, 0);
rb_define_method 2094 time.c             rb_define_method(rb_cTime, "isdst", time_isdst, 0);
rb_define_method 2095 time.c             rb_define_method(rb_cTime, "dst?", time_isdst, 0);
rb_define_method 2096 time.c             rb_define_method(rb_cTime, "zone", time_zone, 0);
rb_define_method 2097 time.c             rb_define_method(rb_cTime, "gmtoff", time_utc_offset, 0);
rb_define_method 2098 time.c             rb_define_method(rb_cTime, "gmt_offset", time_utc_offset, 0);
rb_define_method 2099 time.c             rb_define_method(rb_cTime, "utc_offset", time_utc_offset, 0);
rb_define_method 2101 time.c             rb_define_method(rb_cTime, "utc?", time_utc_p, 0);
rb_define_method 2102 time.c             rb_define_method(rb_cTime, "gmt?", time_utc_p, 0);
rb_define_method 2104 time.c             rb_define_method(rb_cTime, "tv_sec", time_to_i, 0);
rb_define_method 2105 time.c             rb_define_method(rb_cTime, "tv_usec", time_usec, 0);
rb_define_method 2106 time.c             rb_define_method(rb_cTime, "usec", time_usec, 0);
rb_define_method 2108 time.c             rb_define_method(rb_cTime, "strftime", time_strftime, 1);
rb_define_method 2111 time.c             rb_define_method(rb_cTime, "_dump", time_dump, -1);
rb_define_method 2115 time.c             rb_define_method(rb_cTime, "marshal_dump", time_mdump, 0);
rb_define_method 2116 time.c             rb_define_method(rb_cTime, "marshal_load", time_mload, 1);


rb_define_method_id

rb_define_method_id  118 intern.h       void rb_define_method_id _((VALUE, ID, VALUE (*)(ANYARGS), int));
rb_define_method_id  217 struct.c       		rb_define_method_id(nstr, id, ref_func[i], 0);
rb_define_method_id  220 struct.c       		rb_define_method_id(nstr, id, rb_struct_ref, 0);
rb_define_method_id  222 struct.c       	    rb_define_method_id(nstr, rb_id_attrset(id), rb_struct_set, 1);


rb_define_module

rb_define_module  234 compar.c           rb_mComparable = rb_define_module("Comparable");
rb_define_module  901 enum.c             rb_mEnumerable = rb_define_module("Enumerable");
rb_define_module 1040 error.c            rb_mErrno = rb_define_module("Errno");
rb_define_module 1445 ext/curses/curses.c     mCurses    = rb_define_module("Curses");
rb_define_module  298 ext/digest/digest.c     mDigest = rb_define_module("Digest");
rb_define_module  688 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  738 ext/readline/readline.c     mReadline = rb_define_module("Readline");
rb_define_module 2146 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 3314 ext/zlib/zlib.c     mZlib = rb_define_module("Zlib");
rb_define_module 4334 file.c             rb_mFileTest = rb_define_module("FileTest");
rb_define_module 1917 gc.c               rb_mGC = rb_define_module("GC");
rb_define_module 1923 gc.c               rb_mObSpace = rb_define_module("ObjectSpace");
rb_define_module 1470 marshal.c          VALUE rb_mMarshal = rb_define_module("Marshal");
rb_define_module  481 math.c             rb_mMath = rb_define_module("Math");
rb_define_module 2597 object.c           rb_mKernel = rb_define_module("Kernel");
rb_define_module  133 prec.c             rb_mPrecision = rb_define_module("Precision");
rb_define_module 3370 process.c          rb_mProcess = rb_define_module("Process");
rb_define_module  479 ruby.h         VALUE rb_define_module _((const char*));
rb_define_module  858 signal.c           VALUE mSignal = rb_define_module("Signal");


rb_define_module_function

rb_define_module_function  919 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  711 ext/dl/dl.c      rb_define_module_function(rb_mDL, "dlopen", rb_dl_dlopen, -1);
rb_define_module_function  712 ext/dl/dl.c      rb_define_module_function(rb_mDL, "callback", rb_dl_callback, -1);
rb_define_module_function  713 ext/dl/dl.c      rb_define_module_function(rb_mDL, "define_callback", rb_dl_callback, -1);
rb_define_module_function  714 ext/dl/dl.c      rb_define_module_function(rb_mDL, "remove_callback", rb_dl_remove_callback, 1);
rb_define_module_function  715 ext/dl/dl.c      rb_define_module_function(rb_mDL, "malloc", rb_dl_malloc, 1);
rb_define_module_function  716 ext/dl/dl.c      rb_define_module_function(rb_mDL, "strdup", rb_dl_strdup, 1);
rb_define_module_function  717 ext/dl/dl.c      rb_define_module_function(rb_mDL, "sizeof", rb_dl_sizeof, 1);
rb_define_module_function 1064 ext/dl/ptr.c     rb_define_module_function(rb_mDLMemorySpace, "each", rb_dlmem_each, 0);
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  739 ext/readline/readline.c     rb_define_module_function(mReadline, "readline",
rb_define_module_function 2149 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 3325 ext/zlib/zlib.c     rb_define_module_function(mZlib, "zlib_version", rb_zlib_version, 0);
rb_define_module_function 3326 ext/zlib/zlib.c     rb_define_module_function(mZlib, "adler32", rb_zlib_adler32, -1);
rb_define_module_function 3327 ext/zlib/zlib.c     rb_define_module_function(mZlib, "crc32", rb_zlib_crc32, -1);
rb_define_module_function 3328 ext/zlib/zlib.c     rb_define_module_function(mZlib, "crc_table", rb_zlib_crc_table, 0);
rb_define_module_function 4294 file.c             rb_define_module_function(rb_mFileTest, name, func, argc);
rb_define_module_function 1924 gc.c               rb_define_module_function(rb_mObSpace, "each_object", os_each_obj, -1);
rb_define_module_function 1925 gc.c               rb_define_module_function(rb_mObSpace, "garbage_collect", rb_gc_start, 0);
rb_define_module_function 1926 gc.c               rb_define_module_function(rb_mObSpace, "add_finalizer", add_final, 1);
rb_define_module_function 1927 gc.c               rb_define_module_function(rb_mObSpace, "remove_finalizer", rm_final, 1);
rb_define_module_function 1928 gc.c               rb_define_module_function(rb_mObSpace, "finalizers", finals, 0);
rb_define_module_function 1929 gc.c               rb_define_module_function(rb_mObSpace, "call_finalizer", call_final, 1);
rb_define_module_function 1931 gc.c               rb_define_module_function(rb_mObSpace, "define_finalizer", define_final, -1);
rb_define_module_function 1932 gc.c               rb_define_module_function(rb_mObSpace, "undefine_finalizer", undefine_final, 1);
rb_define_module_function 1934 gc.c               rb_define_module_function(rb_mObSpace, "_id2ref", id2ref, 1);
rb_define_module_function 1484 marshal.c          rb_define_module_function(rb_mMarshal, "dump", marshal_dump, -1);
rb_define_module_function 1485 marshal.c          rb_define_module_function(rb_mMarshal, "load", marshal_load, -1);
rb_define_module_function 1486 marshal.c          rb_define_module_function(rb_mMarshal, "restore", marshal_load, -1);
rb_define_module_function  495 math.c             rb_define_module_function(rb_mMath, "atan2", math_atan2, 2);
rb_define_module_function  496 math.c             rb_define_module_function(rb_mMath, "cos", math_cos, 1);
rb_define_module_function  497 math.c             rb_define_module_function(rb_mMath, "sin", math_sin, 1);
rb_define_module_function  498 math.c             rb_define_module_function(rb_mMath, "tan", math_tan, 1);
rb_define_module_function  500 math.c             rb_define_module_function(rb_mMath, "acos", math_acos, 1);
rb_define_module_function  501 math.c             rb_define_module_function(rb_mMath, "asin", math_asin, 1);
rb_define_module_function  502 math.c             rb_define_module_function(rb_mMath, "atan", math_atan, 1);
rb_define_module_function  504 math.c             rb_define_module_function(rb_mMath, "cosh", math_cosh, 1);
rb_define_module_function  505 math.c             rb_define_module_function(rb_mMath, "sinh", math_sinh, 1);
rb_define_module_function  506 math.c             rb_define_module_function(rb_mMath, "tanh", math_tanh, 1);
rb_define_module_function  508 math.c             rb_define_module_function(rb_mMath, "acosh", math_acosh, 1);
rb_define_module_function  509 math.c             rb_define_module_function(rb_mMath, "asinh", math_asinh, 1);
rb_define_module_function  510 math.c             rb_define_module_function(rb_mMath, "atanh", math_atanh, 1);
rb_define_module_function  512 math.c             rb_define_module_function(rb_mMath, "exp", math_exp, 1);
rb_define_module_function  513 math.c             rb_define_module_function(rb_mMath, "log", math_log, 1);
rb_define_module_function  514 math.c             rb_define_module_function(rb_mMath, "log10", math_log10, 1);
rb_define_module_function  515 math.c             rb_define_module_function(rb_mMath, "sqrt", math_sqrt, 1);
rb_define_module_function  517 math.c             rb_define_module_function(rb_mMath, "frexp", math_frexp, 1);
rb_define_module_function  518 math.c             rb_define_module_function(rb_mMath, "ldexp", math_ldexp, 2);
rb_define_module_function  520 math.c             rb_define_module_function(rb_mMath, "hypot", math_hypot, 2);
rb_define_module_function  522 math.c             rb_define_module_function(rb_mMath, "erf",  math_erf,  1);
rb_define_module_function  523 math.c             rb_define_module_function(rb_mMath, "erfc", math_erfc, 1);
rb_define_module_function 3390 process.c          rb_define_module_function(rb_mProcess, "kill", rb_f_kill, -1); /* in signal.c */
rb_define_module_function 3391 process.c          rb_define_module_function(rb_mProcess, "wait", proc_wait, -1);
rb_define_module_function 3392 process.c          rb_define_module_function(rb_mProcess, "wait2", proc_wait2, -1);
rb_define_module_function 3393 process.c          rb_define_module_function(rb_mProcess, "waitpid", proc_wait, -1);
rb_define_module_function 3394 process.c          rb_define_module_function(rb_mProcess, "waitpid2", proc_wait2, -1);
rb_define_module_function 3395 process.c          rb_define_module_function(rb_mProcess, "waitall", proc_waitall, 0);
rb_define_module_function 3396 process.c          rb_define_module_function(rb_mProcess, "detach", proc_detach, 1);
rb_define_module_function 3420 process.c          rb_define_module_function(rb_mProcess, "pid", get_pid, 0);
rb_define_module_function 3421 process.c          rb_define_module_function(rb_mProcess, "ppid", get_ppid, 0);
rb_define_module_function 3423 process.c          rb_define_module_function(rb_mProcess, "getpgrp", proc_getpgrp, 0);
rb_define_module_function 3424 process.c          rb_define_module_function(rb_mProcess, "setpgrp", proc_setpgrp, 0);
rb_define_module_function 3425 process.c          rb_define_module_function(rb_mProcess, "getpgid", proc_getpgid, 1);
rb_define_module_function 3426 process.c          rb_define_module_function(rb_mProcess, "setpgid", proc_setpgid, 2);
rb_define_module_function 3428 process.c          rb_define_module_function(rb_mProcess, "setsid", proc_setsid, 0);
rb_define_module_function 3430 process.c          rb_define_module_function(rb_mProcess, "getpriority", proc_getpriority, 2);
rb_define_module_function 3431 process.c          rb_define_module_function(rb_mProcess, "setpriority", proc_setpriority, 3);
rb_define_module_function 3439 process.c          rb_define_module_function(rb_mProcess, "uid", proc_getuid, 0);
rb_define_module_function 3440 process.c          rb_define_module_function(rb_mProcess, "uid=", proc_setuid, 1);
rb_define_module_function 3441 process.c          rb_define_module_function(rb_mProcess, "gid", proc_getgid, 0);
rb_define_module_function 3442 process.c          rb_define_module_function(rb_mProcess, "gid=", proc_setgid, 1);
rb_define_module_function 3443 process.c          rb_define_module_function(rb_mProcess, "euid", proc_geteuid, 0);
rb_define_module_function 3444 process.c          rb_define_module_function(rb_mProcess, "euid=", proc_seteuid, 1);
rb_define_module_function 3445 process.c          rb_define_module_function(rb_mProcess, "egid", proc_getegid, 0);
rb_define_module_function 3446 process.c          rb_define_module_function(rb_mProcess, "egid=", proc_setegid, 1);
rb_define_module_function 3447 process.c          rb_define_module_function(rb_mProcess, "initgroups", proc_initgroups, 2);
rb_define_module_function 3448 process.c          rb_define_module_function(rb_mProcess, "groups", proc_getgroups, 0);
rb_define_module_function 3449 process.c          rb_define_module_function(rb_mProcess, "groups=", proc_setgroups, 1);
rb_define_module_function 3450 process.c          rb_define_module_function(rb_mProcess, "maxgroups", proc_getmaxgroups, 0);
rb_define_module_function 3451 process.c          rb_define_module_function(rb_mProcess, "maxgroups=", proc_setmaxgroups, 1);
rb_define_module_function 3453 process.c          rb_define_module_function(rb_mProcess, "times", rb_proc_times, 0);
rb_define_module_function 3465 process.c          rb_define_module_function(rb_mProcUID, "rid", proc_getuid, 0);
rb_define_module_function 3466 process.c          rb_define_module_function(rb_mProcGID, "rid", proc_getgid, 0);
rb_define_module_function 3467 process.c          rb_define_module_function(rb_mProcUID, "eid", proc_geteuid, 0);
rb_define_module_function 3468 process.c          rb_define_module_function(rb_mProcGID, "eid", proc_getegid, 0);
rb_define_module_function 3469 process.c          rb_define_module_function(rb_mProcUID, "change_privilege", p_uid_change_privilege, 1);
rb_define_module_function 3470 process.c          rb_define_module_function(rb_mProcGID, "change_privilege", p_gid_change_privilege, 1);
rb_define_module_function 3471 process.c          rb_define_module_function(rb_mProcUID, "grant_privilege", p_uid_grant_privilege, 1);
rb_define_module_function 3472 process.c          rb_define_module_function(rb_mProcGID, "grant_privilege", p_gid_grant_privilege, 1);
rb_define_module_function 3475 process.c          rb_define_module_function(rb_mProcUID, "re_exchange", p_uid_exchange, 0);
rb_define_module_function 3476 process.c          rb_define_module_function(rb_mProcGID, "re_exchange", p_gid_exchange, 0);
rb_define_module_function 3477 process.c          rb_define_module_function(rb_mProcUID, "re_exchangeable?", p_uid_exchangeable, 0);
rb_define_module_function 3478 process.c          rb_define_module_function(rb_mProcGID, "re_exchangeable?", p_gid_exchangeable, 0);
rb_define_module_function 3479 process.c          rb_define_module_function(rb_mProcUID, "sid_available?", p_uid_have_saved_id, 0);
rb_define_module_function 3480 process.c          rb_define_module_function(rb_mProcGID, "sid_available?", p_gid_have_saved_id, 0);
rb_define_module_function 3481 process.c          rb_define_module_function(rb_mProcUID, "switch", p_uid_switch, 0);
rb_define_module_function 3482 process.c          rb_define_module_function(rb_mProcGID, "switch", p_gid_switch, 0);
rb_define_module_function 3486 process.c          rb_define_module_function(rb_mProcID_Syscall, "getuid", proc_getuid, 0);
rb_define_module_function 3487 process.c          rb_define_module_function(rb_mProcID_Syscall, "geteuid", proc_geteuid, 0);
rb_define_module_function 3488 process.c          rb_define_module_function(rb_mProcID_Syscall, "getgid", proc_getgid, 0);
rb_define_module_function 3489 process.c          rb_define_module_function(rb_mProcID_Syscall, "getegid", proc_getegid, 0);
rb_define_module_function 3491 process.c          rb_define_module_function(rb_mProcID_Syscall, "setuid", p_sys_setuid, 1);
rb_define_module_function 3492 process.c          rb_define_module_function(rb_mProcID_Syscall, "setgid", p_sys_setgid, 1);
rb_define_module_function 3494 process.c          rb_define_module_function(rb_mProcID_Syscall, "setruid", p_sys_setruid, 1);
rb_define_module_function 3495 process.c          rb_define_module_function(rb_mProcID_Syscall, "setrgid", p_sys_setrgid, 1);
rb_define_module_function 3497 process.c          rb_define_module_function(rb_mProcID_Syscall, "seteuid", p_sys_seteuid, 1);
rb_define_module_function 3498 process.c          rb_define_module_function(rb_mProcID_Syscall, "setegid", p_sys_setegid, 1);
rb_define_module_function 3500 process.c          rb_define_module_function(rb_mProcID_Syscall, "setreuid", p_sys_setreuid, 2);
rb_define_module_function 3501 process.c          rb_define_module_function(rb_mProcID_Syscall, "setregid", p_sys_setregid, 2);
rb_define_module_function 3503 process.c          rb_define_module_function(rb_mProcID_Syscall, "setresuid", p_sys_setresuid, 3);
rb_define_module_function 3504 process.c          rb_define_module_function(rb_mProcID_Syscall, "setresgid", p_sys_setresgid, 3);
rb_define_module_function 3505 process.c          rb_define_module_function(rb_mProcID_Syscall, "issetugid", p_sys_issetugid, 0);
rb_define_module_function  497 ruby.h         void rb_define_module_function _((VALUE,const char*,VALUE(*)(ANYARGS),int));
rb_define_module_function  861 signal.c           rb_define_module_function(mSignal, "trap", sig_trap, -1);
rb_define_module_function  862 signal.c           rb_define_module_function(mSignal, "list", sig_list, 0);


rb_define_module_id

rb_define_module_id  312 class.c            module = rb_define_module_id(id);
rb_define_module_id  335 class.c            module = rb_define_module_id(id);
rb_define_module_id 3983 eval.c         		module = rb_define_module_id(cname);
rb_define_module_id  109 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 1061 ext/dl/ptr.c     rb_mDLMemorySpace = rb_define_module_under(rb_mDL, "MemorySpace");
rb_define_module_under  886 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  359 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  866 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 3242 ext/socket/socket.c     mConst = rb_define_module_under(rb_cSocket, "Constants");
rb_define_module_under 2147 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 6148 ext/win32ole/win32ole.c     mWIN32OLE_VARIANT = rb_define_module_under(cWIN32OLE, "VARIANT");
rb_define_module_under 4420 file.c             rb_mFConst = rb_define_module_under(rb_cFile, "Constants");
rb_define_module_under 3462 process.c          rb_mProcUID = rb_define_module_under(rb_mProcess, "UID");
rb_define_module_under 3463 process.c          rb_mProcGID = rb_define_module_under(rb_mProcess, "GID");
rb_define_module_under 3484 process.c          rb_mProcID_Syscall = rb_define_module_under(rb_mProcess, "Sys");
rb_define_module_under  481 ruby.h         VALUE rb_define_module_under _((VALUE, const char*));


rb_define_private_method

rb_define_private_method  909 class.c            rb_define_private_method(module, name, func, argc);
rb_define_private_method 7807 eval.c             rb_define_private_method(rb_cModule, "append_features", rb_mod_append_features, 1);
rb_define_private_method 7808 eval.c             rb_define_private_method(rb_cModule, "extend_object", rb_mod_extend_object, 1);
rb_define_private_method 7809 eval.c             rb_define_private_method(rb_cModule, "include", rb_mod_include, -1);
rb_define_private_method 7810 eval.c             rb_define_private_method(rb_cModule, "public", rb_mod_public, -1);
rb_define_private_method 7811 eval.c             rb_define_private_method(rb_cModule, "protected", rb_mod_protected, -1);
rb_define_private_method 7812 eval.c             rb_define_private_method(rb_cModule, "private", rb_mod_private, -1);
rb_define_private_method 7813 eval.c             rb_define_private_method(rb_cModule, "module_function", rb_mod_modfunc, -1);
rb_define_private_method 7825 eval.c             rb_define_private_method(rb_cModule, "remove_method", rb_mod_remove_method, -1);
rb_define_private_method 7826 eval.c             rb_define_private_method(rb_cModule, "undef_method", rb_mod_undef_method, -1);
rb_define_private_method 7827 eval.c             rb_define_private_method(rb_cModule, "alias_method", rb_mod_alias_method, 2);
rb_define_private_method 7828 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 1304 ext/strscan/strscan.c     rb_define_private_method(StringScanner, "initialize", strscan_initialize, -1);
rb_define_private_method  122 intern.h       void rb_define_private_method _((VALUE, const char*, VALUE (*)(ANYARGS), int));
rb_define_private_method 2600 object.c           rb_define_private_method(rb_cObject, "initialize", rb_obj_dummy, 0);
rb_define_private_method 2601 object.c           rb_define_private_method(rb_cClass, "inherited", rb_obj_dummy, 1);
rb_define_private_method 2602 object.c           rb_define_private_method(rb_cModule, "included", rb_obj_dummy, 1);
rb_define_private_method 2603 object.c           rb_define_private_method(rb_cModule, "extended", rb_obj_dummy, 1);
rb_define_private_method 2604 object.c           rb_define_private_method(rb_cModule, "method_added", rb_obj_dummy, 1);
rb_define_private_method 2605 object.c           rb_define_private_method(rb_cModule, "method_removed", rb_obj_dummy, 1);
rb_define_private_method 2606 object.c           rb_define_private_method(rb_cModule, "method_undefined", rb_obj_dummy, 1);
rb_define_private_method 2648 object.c           rb_define_private_method(rb_mKernel, "remove_instance_variable",
rb_define_private_method 2655 object.c           rb_define_private_method(rb_mKernel, "singleton_method_added", rb_obj_dummy, 1);
rb_define_private_method 2656 object.c           rb_define_private_method(rb_mKernel, "singleton_method_removed", rb_obj_dummy, 1);
rb_define_private_method 2657 object.c           rb_define_private_method(rb_mKernel, "singleton_method_undefined", rb_obj_dummy, 1);
rb_define_private_method 2713 object.c           rb_define_private_method(rb_cModule, "attr", rb_mod_attr, -1);
rb_define_private_method 2714 object.c           rb_define_private_method(rb_cModule, "attr_reader", rb_mod_attr_reader, -1);
rb_define_private_method 2715 object.c           rb_define_private_method(rb_cModule, "attr_writer", rb_mod_attr_writer, -1);
rb_define_private_method 2716 object.c           rb_define_private_method(rb_cModule, "attr_accessor", rb_mod_attr_accessor, -1);
rb_define_private_method 2733 object.c           rb_define_private_method(rb_cModule, "remove_const",
rb_define_private_method 2739 object.c           rb_define_private_method(rb_cModule, "remove_class_variable",
rb_define_private_method 2741 object.c           rb_define_private_method(rb_cModule, "class_variable_get", rb_mod_cvar_get, 1);
rb_define_private_method 2742 object.c           rb_define_private_method(rb_cModule, "class_variable_set", rb_mod_cvar_set, 2);


rb_define_readonly_variable

rb_define_readonly_variable 7938 eval.c             rb_define_readonly_variable("$:", &rb_load_path);
rb_define_readonly_variable 7939 eval.c             rb_define_readonly_variable("$-I", &rb_load_path);
rb_define_readonly_variable 7940 eval.c             rb_define_readonly_variable("$LOAD_PATH", &rb_load_path);
rb_define_readonly_variable 7943 eval.c             rb_define_readonly_variable("$\"", &rb_features);
rb_define_readonly_variable 7944 eval.c             rb_define_readonly_variable("$LOADED_FEATURES", &rb_features);
rb_define_readonly_variable 5691 io.c               rb_define_readonly_variable("$<", &argf);
rb_define_readonly_variable 5732 io.c               rb_define_readonly_variable("$FILENAME", &filename);
rb_define_readonly_variable 3363 process.c          rb_define_readonly_variable("$?", &rb_last_status);
rb_define_readonly_variable 1137 ruby.c             rb_define_readonly_variable("$-p", &do_print);
rb_define_readonly_variable 1138 ruby.c             rb_define_readonly_variable("$-l", &do_line);
rb_define_readonly_variable 1143 ruby.c             rb_define_readonly_variable("$*", &rb_argv);
rb_define_readonly_variable 1146 ruby.c             rb_define_readonly_variable("$-a", &do_split);
rb_define_readonly_variable  491 ruby.h         void rb_define_readonly_variable _((const char*,VALUE*));


rb_define_singleton_method

rb_define_singleton_method 2971 array.c            rb_define_singleton_method(rb_cArray, "[]", rb_ary_s_create, -1);
rb_define_singleton_method  910 class.c            rb_define_singleton_method(module, name, func, argc);
rb_define_singleton_method 1535 dir.c              rb_define_singleton_method(rb_cDir, "open", dir_s_open, 1);
rb_define_singleton_method 1536 dir.c              rb_define_singleton_method(rb_cDir, "foreach", dir_foreach, 1);
rb_define_singleton_method 1537 dir.c              rb_define_singleton_method(rb_cDir, "entries", dir_entries, 1);
rb_define_singleton_method 1550 dir.c              rb_define_singleton_method(rb_cDir,"chdir", dir_s_chdir, -1);
rb_define_singleton_method 1551 dir.c              rb_define_singleton_method(rb_cDir,"getwd", dir_s_getwd, 0);
rb_define_singleton_method 1552 dir.c              rb_define_singleton_method(rb_cDir,"pwd", dir_s_getwd, 0);
rb_define_singleton_method 1553 dir.c              rb_define_singleton_method(rb_cDir,"chroot", dir_s_chroot, 1);
rb_define_singleton_method 1554 dir.c              rb_define_singleton_method(rb_cDir,"mkdir", dir_s_mkdir, -1);
rb_define_singleton_method 1555 dir.c              rb_define_singleton_method(rb_cDir,"rmdir", dir_s_rmdir, 1);
rb_define_singleton_method 1556 dir.c              rb_define_singleton_method(rb_cDir,"delete", dir_s_rmdir, 1);
rb_define_singleton_method 1557 dir.c              rb_define_singleton_method(rb_cDir,"unlink", dir_s_rmdir, 1);
rb_define_singleton_method 1559 dir.c              rb_define_singleton_method(rb_cDir,"glob", dir_s_glob, -1);
rb_define_singleton_method 1560 dir.c              rb_define_singleton_method(rb_cDir,"[]", dir_s_aref, 1);
rb_define_singleton_method 1562 dir.c              rb_define_singleton_method(rb_cFile,"fnmatch", file_s_fnmatch, -1);
rb_define_singleton_method 1563 dir.c              rb_define_singleton_method(rb_cFile,"fnmatch?", file_s_fnmatch, -1);
rb_define_singleton_method  988 error.c            rb_define_singleton_method(rb_eException, "exception", rb_class_new_instance, -1);
rb_define_singleton_method 1017 error.c            rb_define_singleton_method(rb_cNameErrorMesg, "!", name_err_mesg_new, 3);
rb_define_singleton_method 1020 error.c            rb_define_singleton_method(rb_cNameErrorMesg, "_load", name_err_mesg_load, 1);
rb_define_singleton_method 1038 error.c            rb_define_singleton_method(rb_eSystemCallError, "===", syserr_eqq, 1);
rb_define_singleton_method 7830 eval.c             rb_define_singleton_method(rb_cModule, "nesting", rb_mod_nesting, 0);
rb_define_singleton_method 7831 eval.c             rb_define_singleton_method(rb_cModule, "constants", rb_mod_s_constants, 0);
rb_define_singleton_method 7833 eval.c             rb_define_singleton_method(ruby_top_self, "include", top_include, -1);
rb_define_singleton_method 7834 eval.c             rb_define_singleton_method(ruby_top_self, "public", top_public, -1);
rb_define_singleton_method 7835 eval.c             rb_define_singleton_method(ruby_top_self, "private", top_private, -1);
rb_define_singleton_method 9467 eval.c             rb_define_singleton_method(rb_cProc, "new", proc_s_new, -1);
rb_define_singleton_method 12710 eval.c             rb_define_singleton_method(rb_cThread, "new", rb_thread_s_new, -1);
rb_define_singleton_method 12712 eval.c             rb_define_singleton_method(rb_cThread, "start", rb_thread_start, -2);
rb_define_singleton_method 12713 eval.c             rb_define_singleton_method(rb_cThread, "fork", rb_thread_start, -2);
rb_define_singleton_method 12715 eval.c             rb_define_singleton_method(rb_cThread, "stop", rb_thread_stop, 0);
rb_define_singleton_method 12716 eval.c             rb_define_singleton_method(rb_cThread, "kill", rb_thread_s_kill, 1);
rb_define_singleton_method 12717 eval.c             rb_define_singleton_method(rb_cThread, "exit", rb_thread_exit, 0);
rb_define_singleton_method 12718 eval.c             rb_define_singleton_method(rb_cThread, "pass", rb_thread_pass, 0);
rb_define_singleton_method 12719 eval.c             rb_define_singleton_method(rb_cThread, "current", rb_thread_current, 0);
rb_define_singleton_method 12720 eval.c             rb_define_singleton_method(rb_cThread, "main", rb_thread_main, 0);
rb_define_singleton_method 12721 eval.c             rb_define_singleton_method(rb_cThread, "list", rb_thread_list, 0);
rb_define_singleton_method 12723 eval.c             rb_define_singleton_method(rb_cThread, "critical", rb_thread_critical_get, 0);
rb_define_singleton_method 12724 eval.c             rb_define_singleton_method(rb_cThread, "critical=", rb_thread_critical_set, 1);
rb_define_singleton_method 12726 eval.c             rb_define_singleton_method(rb_cThread, "abort_on_exception", rb_thread_s_abort_exc, 0);
rb_define_singleton_method 12727 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  764 ext/dbm/dbm.c      rb_define_singleton_method(rb_cDBM, "open", fdbm_s_open, -1);
rb_define_singleton_method  303 ext/digest/digest.c     rb_define_singleton_method(cDigest_Base, "digest", rb_digest_base_s_digest, 1);
rb_define_singleton_method  304 ext/digest/digest.c     rb_define_singleton_method(cDigest_Base, "hexdigest", rb_digest_base_s_hexdigest, 1);
rb_define_singleton_method 1032 ext/dl/ptr.c     rb_define_singleton_method(rb_cDLPtrData, "malloc", rb_dlptr_s_malloc, -1);
rb_define_singleton_method  972 ext/dl/sym.c     rb_define_singleton_method(rb_cDLSymbol, "char2type", rb_s_dlsym_char2type, 1);
rb_define_singleton_method  985 ext/dl/sym.c     rb_define_singleton_method(rb_mDL, "last_error", rb_dl_get_last_error, 0);
rb_define_singleton_method  986 ext/dl/sym.c     rb_define_singleton_method(rb_mDL, "last_error=", rb_dl_set_last_error, 1);
rb_define_singleton_method  989 ext/dl/sym.c     rb_define_singleton_method(rb_mDL, "win32_last_error", rb_dl_win32_get_last_error, 0);
rb_define_singleton_method  990 ext/dl/sym.c     rb_define_singleton_method(rb_mDL, "win32_last_error=", rb_dl_win32_set_last_error, 1);
rb_define_singleton_method  955 ext/gdbm/gdbm.c     rb_define_singleton_method(rb_cGDBM, "open", fgdbm_s_open, -1);
rb_define_singleton_method  879 ext/iconv/iconv.c     rb_define_singleton_method(rb_cIconv, "open", iconv_s_open, 2);
rb_define_singleton_method  880 ext/iconv/iconv.c     rb_define_singleton_method(rb_cIconv, "iconv", iconv_s_iconv, -1);
rb_define_singleton_method  881 ext/iconv/iconv.c     rb_define_singleton_method(rb_cIconv, "conv", iconv_s_conv, 3);
rb_define_singleton_method  908 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  741 ext/readline/readline.c     rb_define_singleton_method(mReadline, "completion_proc=",
rb_define_singleton_method  743 ext/readline/readline.c     rb_define_singleton_method(mReadline, "completion_proc",
rb_define_singleton_method  745 ext/readline/readline.c     rb_define_singleton_method(mReadline, "completion_case_fold=",
rb_define_singleton_method  747 ext/readline/readline.c     rb_define_singleton_method(mReadline, "completion_case_fold",
rb_define_singleton_method  749 ext/readline/readline.c     rb_define_singleton_method(mReadline, "vi_editing_mode",
rb_define_singleton_method  751 ext/readline/readline.c     rb_define_singleton_method(mReadline, "emacs_editing_mode",
rb_define_singleton_method  753 ext/readline/readline.c     rb_define_singleton_method(mReadline, "completion_append_character=",
rb_define_singleton_method  755 ext/readline/readline.c     rb_define_singleton_method(mReadline, "completion_append_character",
rb_define_singleton_method  757 ext/readline/readline.c     rb_define_singleton_method(mReadline, "basic_word_break_characters=",
rb_define_singleton_method  759 ext/readline/readline.c     rb_define_singleton_method(mReadline, "basic_word_break_characters",
rb_define_singleton_method  761 ext/readline/readline.c     rb_define_singleton_method(mReadline, "completer_word_break_characters=",
rb_define_singleton_method  763 ext/readline/readline.c     rb_define_singleton_method(mReadline, "completer_word_break_characters",
rb_define_singleton_method  765 ext/readline/readline.c     rb_define_singleton_method(mReadline, "basic_quote_characters=",
rb_define_singleton_method  767 ext/readline/readline.c     rb_define_singleton_method(mReadline, "basic_quote_characters",
rb_define_singleton_method  769 ext/readline/readline.c     rb_define_singleton_method(mReadline, "completer_quote_characters=",
rb_define_singleton_method  771 ext/readline/readline.c     rb_define_singleton_method(mReadline, "completer_quote_characters",
rb_define_singleton_method  773 ext/readline/readline.c     rb_define_singleton_method(mReadline, "filename_quote_characters=",
rb_define_singleton_method  775 ext/readline/readline.c     rb_define_singleton_method(mReadline, "filename_quote_characters",
rb_define_singleton_method  780 ext/readline/readline.c     rb_define_singleton_method(history,"to_s", hist_to_s, 0);
rb_define_singleton_method  781 ext/readline/readline.c     rb_define_singleton_method(history,"[]", hist_get, 1);
rb_define_singleton_method  782 ext/readline/readline.c     rb_define_singleton_method(history,"[]=", hist_set, 2);
rb_define_singleton_method  783 ext/readline/readline.c     rb_define_singleton_method(history,"<<", hist_push, 1);
rb_define_singleton_method  784 ext/readline/readline.c     rb_define_singleton_method(history,"push", hist_push_method, -1);
rb_define_singleton_method  785 ext/readline/readline.c     rb_define_singleton_method(history,"pop", hist_pop, 0);
rb_define_singleton_method  786 ext/readline/readline.c     rb_define_singleton_method(history,"shift", hist_shift, 0);
rb_define_singleton_method  787 ext/readline/readline.c     rb_define_singleton_method(history,"each", hist_each, 0);
rb_define_singleton_method  788 ext/readline/readline.c     rb_define_singleton_method(history,"length", hist_length, 0);
rb_define_singleton_method  789 ext/readline/readline.c     rb_define_singleton_method(history,"size", hist_length, 0);
rb_define_singleton_method  790 ext/readline/readline.c     rb_define_singleton_method(history,"empty?", hist_empty_p, 0);
rb_define_singleton_method  791 ext/readline/readline.c     rb_define_singleton_method(history,"delete_at", hist_delete_at, 1);
rb_define_singleton_method  795 ext/readline/readline.c     rb_define_singleton_method(fcomp, "call",
rb_define_singleton_method  800 ext/readline/readline.c     rb_define_singleton_method(ucomp, "call",
rb_define_singleton_method  746 ext/sdbm/init.c     rb_define_singleton_method(rb_cDBM, "open", fsdbm_s_open, -1);
rb_define_singleton_method 3141 ext/socket/socket.c     rb_define_singleton_method(rb_cBasicSocket, "do_not_reverse_lookup",
rb_define_singleton_method 3143 ext/socket/socket.c     rb_define_singleton_method(rb_cBasicSocket, "do_not_reverse_lookup=",
rb_define_singleton_method 3145 ext/socket/socket.c     rb_define_singleton_method(rb_cBasicSocket, "for_fd", bsock_s_for_fd, 1);
rb_define_singleton_method 3162 ext/socket/socket.c     rb_define_singleton_method(rb_cIPSocket, "getaddress", ip_s_getaddress, 1);
rb_define_singleton_method 3166 ext/socket/socket.c     rb_define_singleton_method(rb_cTCPSocket, "gethostbyname", tcp_s_gethostbyname, 1);
rb_define_singleton_method 3202 ext/socket/socket.c     rb_define_singleton_method(rb_cUNIXSocket, "socketpair", unix_s_socketpair, -1);
rb_define_singleton_method 3203 ext/socket/socket.c     rb_define_singleton_method(rb_cUNIXSocket, "pair", unix_s_socketpair, -1);
rb_define_singleton_method 3224 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "socketpair", sock_s_socketpair, 3);
rb_define_singleton_method 3225 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "pair", sock_s_socketpair, 3);
rb_define_singleton_method 3226 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "gethostname", sock_gethostname, 0);
rb_define_singleton_method 3227 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "gethostbyname", sock_s_gethostbyname, 1);
rb_define_singleton_method 3228 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "gethostbyaddr", sock_s_gethostbyaddr, -1);
rb_define_singleton_method 3229 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "getservbyname", sock_s_getservbyaname, -1);
rb_define_singleton_method 3230 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "getaddrinfo", sock_s_getaddrinfo, -1);
rb_define_singleton_method 3231 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "getnameinfo", sock_s_getnameinfo, -1);
rb_define_singleton_method 3232 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "sockaddr_in", sock_s_pack_sockaddr_in, 2);
rb_define_singleton_method 3233 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "pack_sockaddr_in", sock_s_pack_sockaddr_in, 2);
rb_define_singleton_method 3234 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "unpack_sockaddr_in", sock_s_unpack_sockaddr_in, 1);
rb_define_singleton_method 3236 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "sockaddr_un", sock_s_pack_sockaddr_un, 1);
rb_define_singleton_method 3237 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "pack_sockaddr_un", sock_s_pack_sockaddr_un, 1);
rb_define_singleton_method 3238 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "unpack_sockaddr_un", sock_s_unpack_sockaddr_un, 1);
rb_define_singleton_method 1250 ext/stringio/stringio.c     rb_define_singleton_method(StringIO, "open", strio_s_open, -1);
rb_define_singleton_method 1305 ext/strscan/strscan.c     rb_define_singleton_method(StringScanner, "must_C_version", strscan_s_mustc, 0);
rb_define_singleton_method 2230 ext/syck/rubyext.c     rb_define_singleton_method( oDefaultResolver, "node_import", syck_defaultresolver_node_import, 1 );
rb_define_singleton_method 2231 ext/syck/rubyext.c     rb_define_singleton_method( oDefaultResolver, "detect_implicit", syck_defaultresolver_detect_implicit, 1 );
rb_define_singleton_method 2235 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 6102 ext/win32ole/win32ole.c     rb_define_singleton_method(cWIN32OLE, "connect", fole_s_connect, -1);
rb_define_singleton_method 6103 ext/win32ole/win32ole.c     rb_define_singleton_method(cWIN32OLE, "const_load", fole_s_const_load, -1);
rb_define_singleton_method 6105 ext/win32ole/win32ole.c     rb_define_singleton_method(cWIN32OLE, "ole_free", fole_s_free, 1);
rb_define_singleton_method 6106 ext/win32ole/win32ole.c     rb_define_singleton_method(cWIN32OLE, "ole_reference_count", fole_s_reference_count, 1);
rb_define_singleton_method 6107 ext/win32ole/win32ole.c     rb_define_singleton_method(cWIN32OLE, "ole_show_help", fole_s_show_help, -1);
rb_define_singleton_method 6108 ext/win32ole/win32ole.c     rb_define_singleton_method(cWIN32OLE, "codepage", fole_s_get_code_page, 0);
rb_define_singleton_method 6109 ext/win32ole/win32ole.c     rb_define_singleton_method(cWIN32OLE, "codepage=", fole_s_set_code_page, 1);
rb_define_singleton_method 6173 ext/win32ole/win32ole.c     rb_define_singleton_method(cWIN32OLE_TYPE, "ole_classes", foletype_s_ole_classes, 1);
rb_define_singleton_method 6174 ext/win32ole/win32ole.c     rb_define_singleton_method(cWIN32OLE_TYPE, "typelibs", foletype_s_typelibs, 0);
rb_define_singleton_method 6175 ext/win32ole/win32ole.c     rb_define_singleton_method(cWIN32OLE_TYPE, "progids", foletype_s_progids, 0);
rb_define_singleton_method 6243 ext/win32ole/win32ole.c     rb_define_singleton_method(cWIN32OLE_EVENT, "message_loop", fev_s_msg_loop, 0);
rb_define_singleton_method 3358 ext/zlib/zlib.c     rb_define_singleton_method(cDeflate, "deflate", rb_deflate_s_deflate, -1);
rb_define_singleton_method 3369 ext/zlib/zlib.c     rb_define_singleton_method(cInflate, "inflate", rb_inflate_s_inflate, 1);
rb_define_singleton_method 3415 ext/zlib/zlib.c     rb_define_singleton_method(cGzipFile, "wrap", rb_gzfile_s_wrap, -1);
rb_define_singleton_method 3441 ext/zlib/zlib.c     rb_define_singleton_method(cGzipWriter, "open", rb_gzwriter_s_open,-1);
rb_define_singleton_method 3452 ext/zlib/zlib.c     rb_define_singleton_method(cGzipReader, "open", rb_gzreader_s_open,-1);
rb_define_singleton_method 4295 file.c             rb_define_singleton_method(rb_cFile, name, func, argc);
rb_define_singleton_method 4366 file.c             rb_define_singleton_method(rb_cFile, "stat",  rb_file_s_stat, 1);
rb_define_singleton_method 4367 file.c             rb_define_singleton_method(rb_cFile, "lstat", rb_file_s_lstat, 1);
rb_define_singleton_method 4368 file.c             rb_define_singleton_method(rb_cFile, "ftype", rb_file_s_ftype, 1);
rb_define_singleton_method 4370 file.c             rb_define_singleton_method(rb_cFile, "atime", rb_file_s_atime, 1);
rb_define_singleton_method 4371 file.c             rb_define_singleton_method(rb_cFile, "mtime", rb_file_s_mtime, 1);
rb_define_singleton_method 4372 file.c             rb_define_singleton_method(rb_cFile, "ctime", rb_file_s_ctime, 1);
rb_define_singleton_method 4374 file.c             rb_define_singleton_method(rb_cFile, "utime", rb_file_s_utime, -1);
rb_define_singleton_method 4375 file.c             rb_define_singleton_method(rb_cFile, "chmod", rb_file_s_chmod, -1);
rb_define_singleton_method 4376 file.c             rb_define_singleton_method(rb_cFile, "chown", rb_file_s_chown, -1);
rb_define_singleton_method 4377 file.c             rb_define_singleton_method(rb_cFile, "lchmod", rb_file_s_lchmod, -1);
rb_define_singleton_method 4378 file.c             rb_define_singleton_method(rb_cFile, "lchown", rb_file_s_lchown, -1);
rb_define_singleton_method 4380 file.c             rb_define_singleton_method(rb_cFile, "link", rb_file_s_link, 2);
rb_define_singleton_method 4381 file.c             rb_define_singleton_method(rb_cFile, "symlink", rb_file_s_symlink, 2);
rb_define_singleton_method 4382 file.c             rb_define_singleton_method(rb_cFile, "readlink", rb_file_s_readlink, 1);
rb_define_singleton_method 4384 file.c             rb_define_singleton_method(rb_cFile, "unlink", rb_file_s_unlink, -2);
rb_define_singleton_method 4385 file.c             rb_define_singleton_method(rb_cFile, "delete", rb_file_s_unlink, -2);
rb_define_singleton_method 4386 file.c             rb_define_singleton_method(rb_cFile, "rename", rb_file_s_rename, 2);
rb_define_singleton_method 4387 file.c             rb_define_singleton_method(rb_cFile, "umask", rb_file_s_umask, -1);
rb_define_singleton_method 4388 file.c             rb_define_singleton_method(rb_cFile, "truncate", rb_file_s_truncate, 2);
rb_define_singleton_method 4389 file.c             rb_define_singleton_method(rb_cFile, "expand_path", rb_file_s_expand_path, -1);
rb_define_singleton_method 4390 file.c             rb_define_singleton_method(rb_cFile, "basename", rb_file_s_basename, -1);
rb_define_singleton_method 4391 file.c             rb_define_singleton_method(rb_cFile, "dirname", rb_file_s_dirname, 1);
rb_define_singleton_method 4392 file.c             rb_define_singleton_method(rb_cFile, "extname", rb_file_s_extname, 1);
rb_define_singleton_method 4397 file.c             rb_define_singleton_method(rb_cFile, "split",  rb_file_s_split, 1);
rb_define_singleton_method 4398 file.c             rb_define_singleton_method(rb_cFile, "join",   rb_file_s_join, -2);
rb_define_singleton_method 1918 gc.c               rb_define_singleton_method(rb_mGC, "start", rb_gc_start, 0);
rb_define_singleton_method 1919 gc.c               rb_define_singleton_method(rb_mGC, "enable", rb_gc_enable, 0);
rb_define_singleton_method 1920 gc.c               rb_define_singleton_method(rb_mGC, "disable", rb_gc_disable, 0);
rb_define_singleton_method 2422 hash.c             rb_define_singleton_method(rb_cHash, "[]", rb_hash_s_create, -1);
rb_define_singleton_method 2482 hash.c             rb_define_singleton_method(envtbl,"[]", rb_f_getenv, 1);
rb_define_singleton_method 2483 hash.c             rb_define_singleton_method(envtbl,"fetch", env_fetch, -1);
rb_define_singleton_method 2484 hash.c             rb_define_singleton_method(envtbl,"[]=", env_aset, 2);
rb_define_singleton_method 2485 hash.c             rb_define_singleton_method(envtbl,"store", env_aset, 2);
rb_define_singleton_method 2486 hash.c             rb_define_singleton_method(envtbl,"each", env_each, 0);
rb_define_singleton_method 2487 hash.c             rb_define_singleton_method(envtbl,"each_pair", env_each_pair, 0);
rb_define_singleton_method 2488 hash.c             rb_define_singleton_method(envtbl,"each_key", env_each_key, 0);
rb_define_singleton_method 2489 hash.c             rb_define_singleton_method(envtbl,"each_value", env_each_value, 0);
rb_define_singleton_method 2490 hash.c             rb_define_singleton_method(envtbl,"delete", env_delete_m, 1);
rb_define_singleton_method 2491 hash.c             rb_define_singleton_method(envtbl,"delete_if", env_delete_if, 0);
rb_define_singleton_method 2492 hash.c             rb_define_singleton_method(envtbl,"clear", env_clear, 0);
rb_define_singleton_method 2493 hash.c             rb_define_singleton_method(envtbl,"reject", env_reject, 0);
rb_define_singleton_method 2494 hash.c             rb_define_singleton_method(envtbl,"reject!", env_reject_bang, 0);
rb_define_singleton_method 2495 hash.c             rb_define_singleton_method(envtbl,"select", env_select, -1);
rb_define_singleton_method 2496 hash.c             rb_define_singleton_method(envtbl,"shift", env_shift, 0);
rb_define_singleton_method 2497 hash.c             rb_define_singleton_method(envtbl,"invert", env_invert, 0);
rb_define_singleton_method 2498 hash.c             rb_define_singleton_method(envtbl,"replace", env_replace, 1);
rb_define_singleton_method 2499 hash.c             rb_define_singleton_method(envtbl,"update", env_update, 1);
rb_define_singleton_method 2500 hash.c             rb_define_singleton_method(envtbl,"inspect", env_inspect, 0);
rb_define_singleton_method 2501 hash.c             rb_define_singleton_method(envtbl,"rehash", env_none, 0);
rb_define_singleton_method 2502 hash.c             rb_define_singleton_method(envtbl,"to_a", env_to_a, 0);
rb_define_singleton_method 2503 hash.c             rb_define_singleton_method(envtbl,"to_s", env_to_s, 0);
rb_define_singleton_method 2504 hash.c             rb_define_singleton_method(envtbl,"index", env_index, 1);
rb_define_singleton_method 2505 hash.c             rb_define_singleton_method(envtbl,"indexes", env_indexes, -1);
rb_define_singleton_method 2506 hash.c             rb_define_singleton_method(envtbl,"indices", env_indexes, -1);
rb_define_singleton_method 2507 hash.c             rb_define_singleton_method(envtbl,"size", env_size, 0);
rb_define_singleton_method 2508 hash.c             rb_define_singleton_method(envtbl,"length", env_size, 0);
rb_define_singleton_method 2509 hash.c             rb_define_singleton_method(envtbl,"empty?", env_empty_p, 0);
rb_define_singleton_method 2510 hash.c             rb_define_singleton_method(envtbl,"keys", env_keys, 0);
rb_define_singleton_method 2511 hash.c             rb_define_singleton_method(envtbl,"values", env_values, 0);
rb_define_singleton_method 2512 hash.c             rb_define_singleton_method(envtbl,"values_at", env_values_at, -1);
rb_define_singleton_method 2513 hash.c             rb_define_singleton_method(envtbl,"include?", env_has_key, 1);
rb_define_singleton_method 2514 hash.c             rb_define_singleton_method(envtbl,"member?", env_has_key, 1);
rb_define_singleton_method 2515 hash.c             rb_define_singleton_method(envtbl,"has_key?", env_has_key, 1);
rb_define_singleton_method 2516 hash.c             rb_define_singleton_method(envtbl,"has_value?", env_has_value, 1);
rb_define_singleton_method 2517 hash.c             rb_define_singleton_method(envtbl,"key?", env_has_key, 1);
rb_define_singleton_method 2518 hash.c             rb_define_singleton_method(envtbl,"value?", env_has_value, 1);
rb_define_singleton_method 2519 hash.c             rb_define_singleton_method(envtbl,"to_hash", env_to_hash, 0);
rb_define_singleton_method  123 intern.h       void rb_define_singleton_method _((VALUE, const char*, VALUE(*)(ANYARGS), int));
rb_define_singleton_method 5581 io.c               rb_define_singleton_method(rb_cIO, "new", rb_io_s_new, -1);
rb_define_singleton_method 5582 io.c               rb_define_singleton_method(rb_cIO, "open",  rb_io_s_open, -1);
rb_define_singleton_method 5583 io.c               rb_define_singleton_method(rb_cIO, "sysopen",  rb_io_s_sysopen, -1);
rb_define_singleton_method 5584 io.c               rb_define_singleton_method(rb_cIO, "for_fd", rb_io_s_for_fd, -1);
rb_define_singleton_method 5585 io.c               rb_define_singleton_method(rb_cIO, "popen", rb_io_s_popen, -1);
rb_define_singleton_method 5586 io.c               rb_define_singleton_method(rb_cIO, "foreach", rb_io_s_foreach, -1);
rb_define_singleton_method 5587 io.c               rb_define_singleton_method(rb_cIO, "readlines", rb_io_s_readlines, -1);
rb_define_singleton_method 5588 io.c               rb_define_singleton_method(rb_cIO, "read", rb_io_s_read, -1);
rb_define_singleton_method 5589 io.c               rb_define_singleton_method(rb_cIO, "select", rb_f_select, -1);
rb_define_singleton_method 5590 io.c               rb_define_singleton_method(rb_cIO, "pipe", rb_io_s_pipe, 0);
rb_define_singleton_method 5696 io.c               rb_define_singleton_method(argf, "to_s", argf_to_s, 0);
rb_define_singleton_method 5698 io.c               rb_define_singleton_method(argf, "fileno", argf_fileno, 0);
rb_define_singleton_method 5699 io.c               rb_define_singleton_method(argf, "to_i", argf_fileno, 0);
rb_define_singleton_method 5700 io.c               rb_define_singleton_method(argf, "to_io", argf_to_io, 0);
rb_define_singleton_method 5701 io.c               rb_define_singleton_method(argf, "each",  argf_each_line, -1);
rb_define_singleton_method 5702 io.c               rb_define_singleton_method(argf, "each_line",  argf_each_line, -1);
rb_define_singleton_method 5703 io.c               rb_define_singleton_method(argf, "each_byte",  argf_each_byte, 0);
rb_define_singleton_method 5705 io.c               rb_define_singleton_method(argf, "read",  argf_read, -1);
rb_define_singleton_method 5706 io.c               rb_define_singleton_method(argf, "readlines", rb_f_readlines, -1);
rb_define_singleton_method 5707 io.c               rb_define_singleton_method(argf, "to_a", rb_f_readlines, -1);
rb_define_singleton_method 5708 io.c               rb_define_singleton_method(argf, "gets", rb_f_gets, -1);
rb_define_singleton_method 5709 io.c               rb_define_singleton_method(argf, "readline", rb_f_readline, -1);
rb_define_singleton_method 5710 io.c               rb_define_singleton_method(argf, "getc", argf_getc, 0);
rb_define_singleton_method 5711 io.c               rb_define_singleton_method(argf, "readchar", argf_readchar, 0);
rb_define_singleton_method 5712 io.c               rb_define_singleton_method(argf, "tell", argf_tell, 0);
rb_define_singleton_method 5713 io.c               rb_define_singleton_method(argf, "seek", argf_seek_m, -1);
rb_define_singleton_method 5714 io.c               rb_define_singleton_method(argf, "rewind", argf_rewind, 0);
rb_define_singleton_method 5715 io.c               rb_define_singleton_method(argf, "pos", argf_tell, 0);
rb_define_singleton_method 5716 io.c               rb_define_singleton_method(argf, "pos=", argf_set_pos, 1);
rb_define_singleton_method 5717 io.c               rb_define_singleton_method(argf, "eof", argf_eof, 0);
rb_define_singleton_method 5718 io.c               rb_define_singleton_method(argf, "eof?", argf_eof, 0);
rb_define_singleton_method 5719 io.c               rb_define_singleton_method(argf, "binmode", argf_binmode, 0);
rb_define_singleton_method 5721 io.c               rb_define_singleton_method(argf, "filename", argf_filename, 0);
rb_define_singleton_method 5722 io.c               rb_define_singleton_method(argf, "path", argf_filename, 0);
rb_define_singleton_method 5723 io.c               rb_define_singleton_method(argf, "file", argf_file, 0);
rb_define_singleton_method 5724 io.c               rb_define_singleton_method(argf, "skip", argf_skip, 0);
rb_define_singleton_method 5725 io.c               rb_define_singleton_method(argf, "close", argf_close_m, 0);
rb_define_singleton_method 5726 io.c               rb_define_singleton_method(argf, "closed?", argf_closed, 0);
rb_define_singleton_method 5728 io.c               rb_define_singleton_method(argf, "lineno",   argf_lineno, 0);
rb_define_singleton_method 5729 io.c               rb_define_singleton_method(argf, "lineno=",  argf_set_lineno, 1);
rb_define_singleton_method 2839 numeric.c          rb_define_singleton_method(rb_cFixnum, "induced_from", rb_fix_induced_from, 1);
rb_define_singleton_method 2840 numeric.c          rb_define_singleton_method(rb_cInteger, "induced_from", rb_int_induced_from, 1);
rb_define_singleton_method 2886 numeric.c          rb_define_singleton_method(rb_cFloat, "induced_from", rb_flo_induced_from, 1);
rb_define_singleton_method 2684 object.c           rb_define_singleton_method(rb_cSymbol, "all_symbols",
rb_define_singleton_method 2758 object.c           rb_define_singleton_method(ruby_top_self, "to_s", main_to_s, 0);
rb_define_singleton_method  118 prec.c             rb_define_singleton_method(include, "induced_from", prec_induced_from, 1);
rb_define_singleton_method  134 prec.c             rb_define_singleton_method(rb_mPrecision, "included", prec_included, 1);
rb_define_singleton_method 3385 process.c          rb_define_singleton_method(rb_mProcess, "fork", rb_f_fork, 0);
rb_define_singleton_method 3386 process.c          rb_define_singleton_method(rb_mProcess, "exit!", rb_f_exit_bang, -1);
rb_define_singleton_method 3387 process.c          rb_define_singleton_method(rb_mProcess, "exit", rb_f_exit, -1);   /* in eval.c */
rb_define_singleton_method 3388 process.c          rb_define_singleton_method(rb_mProcess, "abort", rb_f_abort, -1); /* in eval.c */
rb_define_singleton_method 2253 re.c               rb_define_singleton_method(rb_cRegexp, "compile", rb_class_new_instance, -1);
rb_define_singleton_method 2254 re.c               rb_define_singleton_method(rb_cRegexp, "quote", rb_reg_s_quote, -1);
rb_define_singleton_method 2255 re.c               rb_define_singleton_method(rb_cRegexp, "escape", rb_reg_s_quote, -1);
rb_define_singleton_method 2256 re.c               rb_define_singleton_method(rb_cRegexp, "union", rb_reg_s_union, -1);
rb_define_singleton_method 2257 re.c               rb_define_singleton_method(rb_cRegexp, "last_match", rb_reg_s_last_match, -1);
rb_define_singleton_method  210 struct.c           rb_define_singleton_method(nstr, "new", rb_class_new_instance, -1);
rb_define_singleton_method  211 struct.c           rb_define_singleton_method(nstr, "[]", rb_class_new_instance, -1);
rb_define_singleton_method  212 struct.c           rb_define_singleton_method(nstr, "members", rb_struct_s_members_m, 0);
rb_define_singleton_method  898 struct.c           rb_define_singleton_method(rb_cStruct, "new", rb_struct_s_def, -1);
rb_define_singleton_method 2050 time.c             rb_define_singleton_method(rb_cTime, "now", rb_class_new_instance, -1);
rb_define_singleton_method 2051 time.c             rb_define_singleton_method(rb_cTime, "at", time_s_at, -1);
rb_define_singleton_method 2052 time.c             rb_define_singleton_method(rb_cTime, "utc", time_s_mkutc, -1);
rb_define_singleton_method 2053 time.c             rb_define_singleton_method(rb_cTime, "gm", time_s_mkutc, -1);
rb_define_singleton_method 2054 time.c             rb_define_singleton_method(rb_cTime, "local", time_s_mktime, -1);
rb_define_singleton_method 2055 time.c             rb_define_singleton_method(rb_cTime, "mktime", time_s_mktime, -1);
rb_define_singleton_method 2057 time.c             rb_define_singleton_method(rb_cTime, "times", time_s_times, 0);
rb_define_singleton_method 2112 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 5672 io.c               rb_define_variable("$stdin", &rb_stdin);
rb_define_variable 1135 ruby.c             rb_define_variable("$DEBUG", &ruby_debug);
rb_define_variable 1136 ruby.c             rb_define_variable("$-d", &ruby_debug);
rb_define_variable  486 ruby.h         void rb_define_variable _((const char*,VALUE*));
rb_define_variable 4754 string.c           rb_define_variable("$;", &rb_fs);
rb_define_variable 4755 string.c           rb_define_variable("$-F", &rb_fs);


rb_define_virtual_variable

rb_define_virtual_variable 7774 eval.c             rb_define_virtual_variable("$@", errat_getter, errat_setter);
rb_define_virtual_variable 7845 eval.c             rb_define_virtual_variable("$SAFE", safe_getter, safe_setter);
rb_define_virtual_variable 5606 io.c               rb_define_virtual_variable("$_", rb_lastline_get, rb_lastline_set);
rb_define_virtual_variable 5735 io.c               rb_define_virtual_variable("$-i", opt_i_get, opt_i_set);
rb_define_virtual_variable 3362 process.c          rb_define_virtual_variable("$$", get_pid, 0);
rb_define_virtual_variable 2241 re.c               rb_define_virtual_variable("$~", match_getter, match_setter);
rb_define_virtual_variable 2242 re.c               rb_define_virtual_variable("$&", last_match_getter, 0);
rb_define_virtual_variable 2243 re.c               rb_define_virtual_variable("$`", prematch_getter, 0);
rb_define_virtual_variable 2244 re.c               rb_define_virtual_variable("$'", postmatch_getter, 0);
rb_define_virtual_variable 2245 re.c               rb_define_virtual_variable("$+", last_paren_match_getter, 0);
rb_define_virtual_variable 2247 re.c               rb_define_virtual_variable("$=", ignorecase_getter, ignorecase_setter);
rb_define_virtual_variable 2248 re.c               rb_define_virtual_variable("$KCODE", kcode_getter, kcode_setter);
rb_define_virtual_variable 2249 re.c               rb_define_virtual_variable("$-K", kcode_getter, kcode_setter);
rb_define_virtual_variable  487 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 3363 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 3362 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 3364 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 3361 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 3360 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 3365 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 3359 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 3358 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 3366 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  351 intern.h       VALUE rb_detach_process _((int));
rb_detach_process  906 process.c          return rb_detach_process(NUM2INT(pid));


rb_digest_base_alloc

rb_digest_base_alloc   61 ext/digest/digest.c static VALUE rb_digest_base_alloc _((VALUE));
rb_digest_base_alloc   94 ext/digest/digest.c     volatile VALUE obj = rb_digest_base_alloc(klass);
rb_digest_base_alloc  123 ext/digest/digest.c     volatile VALUE obj = rb_digest_base_alloc(klass);
rb_digest_base_alloc  302 ext/digest/digest.c     rb_define_alloc_func(cDigest_Base, rb_digest_base_alloc);


rb_digest_base_digest

rb_digest_base_digest  280 ext/digest/digest.c 	str1 = rb_digest_base_digest(self);
rb_digest_base_digest  310 ext/digest/digest.c     rb_define_method(cDigest_Base, "digest", rb_digest_base_digest, 0);


rb_digest_base_hexdigest

rb_digest_base_hexdigest  282 ext/digest/digest.c 	str1 = rb_digest_base_hexdigest(self);
rb_digest_base_hexdigest  311 ext/digest/digest.c     rb_define_method(cDigest_Base, "hexdigest", rb_digest_base_hexdigest, 0);
rb_digest_base_hexdigest  312 ext/digest/digest.c     rb_define_method(cDigest_Base, "to_s", rb_digest_base_hexdigest, 0);


rb_digest_base_update

rb_digest_base_update  189 ext/digest/digest.c     if (!NIL_P(arg)) rb_digest_base_update(self, arg);
rb_digest_base_update  308 ext/digest/digest.c     rb_define_method(cDigest_Base, "update", rb_digest_base_update, 1);
rb_digest_base_update  309 ext/digest/digest.c     rb_define_method(cDigest_Base, "<<", rb_digest_base_update, 1);


rb_dl_callback

rb_dl_callback    712 ext/dl/dl.c      rb_define_module_function(rb_mDL, "callback", rb_dl_callback, -1);
rb_dl_callback    713 ext/dl/dl.c      rb_define_module_function(rb_mDL, "define_callback", rb_dl_callback, -1);


rb_dlhandle_close

rb_dlhandle_close   86 ext/dl/handle.c     rb_ensure(rb_yield, self, rb_dlhandle_close, self);
rb_dlhandle_close  210 ext/dl/handle.c   rb_define_method(rb_cDLHandle, "close", rb_dlhandle_close, 0);


rb_dlhandle_sym

rb_dlhandle_sym   211 ext/dl/handle.c   rb_define_method(rb_cDLHandle, "sym",  rb_dlhandle_sym, -1);
rb_dlhandle_sym   212 ext/dl/handle.c   rb_define_method(rb_cDLHandle, "[]",  rb_dlhandle_sym, -1);


rb_dlmem_delete

rb_dlmem_delete    37 ext/dl/ptr.c       rb_dlmem_delete(ptr);
rb_dlmem_delete    61 ext/dl/ptr.c       rb_dlmem_delete(data->ptr);


rb_dlptr2cptr

rb_dlptr2cptr     307 ext/dl/dl.h    void *rb_dlptr2cptr(VALUE val);
rb_dlptr2cptr     478 ext/dl/ptr.c     ptr1 = rb_dlptr2cptr(self);
rb_dlptr2cptr     479 ext/dl/ptr.c     ptr2 = rb_dlptr2cptr(other);
rb_dlptr2cptr     488 ext/dl/ptr.c     ptr1 = rb_dlptr2cptr(self);
rb_dlptr2cptr     489 ext/dl/ptr.c     ptr2 = rb_dlptr2cptr(other);
rb_dlptr2cptr     499 ext/dl/ptr.c     ptr = rb_dlptr2cptr(self);
rb_dlptr2cptr     511 ext/dl/ptr.c     ptr = rb_dlptr2cptr(self);


rb_dlptr_define_data_type

rb_dlptr_define_data_type  608 ext/dl/ptr.c     return rb_dlptr_define_data_type(pass_argc, pass_argv, self);
rb_dlptr_define_data_type  623 ext/dl/ptr.c     return rb_dlptr_define_data_type(pass_argc, pass_argv, self);
rb_dlptr_define_data_type 1052 ext/dl/ptr.c   		   rb_dlptr_define_data_type, -1);


rb_dlptr_eql

rb_dlptr_eql     1047 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "==", rb_dlptr_eql, 1);
rb_dlptr_eql     1048 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "eql?", rb_dlptr_eql, 1);


rb_dlptr_malloc

rb_dlptr_malloc   574 ext/dl/dl.c      return rb_dlptr_malloc(DLNUM2LONG(size), dlfree);
rb_dlptr_malloc   306 ext/dl/dl.h    VALUE rb_dlptr_malloc(long size, freefunc_t func);
rb_dlptr_malloc   242 ext/dl/ptr.c     obj = rb_dlptr_malloc(s,f);


rb_dlptr_new

rb_dlptr_new       82 ext/dl/dl.c    	val = rb_dlptr_new(v, 0, 0);
rb_dlptr_new      530 ext/dl/dl.c      return rb_dlptr_new((void*)ptr,len,dlfree);
rb_dlptr_new      548 ext/dl/dl.c      return ptr ? rb_dlptr_new(ptr, size, dlfree) : Qnil;
rb_dlptr_new      560 ext/dl/dl.c      return fp ? rb_dlptr_new(fp, 0, 0) : Qnil;
rb_dlptr_new      581 ext/dl/dl.c      return rb_dlptr_new(strdup(RSTRING(str)->ptr), RSTRING(str)->len, dlfree);
rb_dlptr_new      304 ext/dl/dl.h    VALUE rb_dlptr_new(void *ptr, long size, freefunc_t func);
rb_dlptr_new      127 ext/dl/handle.c   return rb_dlptr_new(dlhandle, sizeof(dlhandle), 0);
rb_dlptr_new      139 ext/dl/ptr.c     return rb_dlptr_new(ptr, size, func);
rb_dlptr_new      262 ext/dl/ptr.c     return rb_dlptr_new(*((void**)(data->ptr)),0,0);
rb_dlptr_new      271 ext/dl/ptr.c     return rb_dlptr_new(&(data->ptr),0,0);
rb_dlptr_new      403 ext/dl/ptr.c         rb_ary_push(ary, rb_dlptr_new(((void**)(data->ptr))[i],0,0));
rb_dlptr_new      407 ext/dl/ptr.c   		  rb_dlptr_new(((void**)(data->ptr))[i],0,dlfree));
rb_dlptr_new      502 ext/dl/ptr.c     return rb_dlptr_new((char *)ptr + num, size - num, 0);
rb_dlptr_new      514 ext/dl/ptr.c     return rb_dlptr_new((char *)ptr - num, size + num, 0);
rb_dlptr_new      661 ext/dl/ptr.c         elem = rb_dlptr_new(*((void**)ptr),0, 0);
rb_dlptr_new      699 ext/dl/ptr.c         elem = rb_dlptr_new(*((void**)ptr), 0, 0);
rb_dlptr_new       83 ext/dl/sym.c       return rb_dlptr_new((void*)func, 0, 0);
rb_dlptr_new      837 ext/dl/sym.c       val = rb_dlptr_new((void*)(ANY2P(ret)), 0, 0);
rb_dlptr_new      840 ext/dl/sym.c       val = rb_dlptr_new((void*)(ANY2P(ret)), 0, dlfree);
rb_dlptr_new      914 ext/dl/sym.c   	rb_ary_push(dvals, rb_dlptr_new((void*)(ANY2P(args[i])), 0, 0));
rb_dlptr_new      917 ext/dl/sym.c   	rb_ary_push(dvals, rb_dlptr_new((void*)ANY2P(args[i]), 0, 0));
rb_dlptr_new      964 ext/dl/sym.c     return rb_dlptr_new(sym->func, sizeof(freefunc_t), 0);


rb_dlptr_new2

rb_dlptr_new2     305 ext/dl/dl.h    VALUE rb_dlptr_new2(VALUE klass, void *ptr, long size, freefunc_t func);
rb_dlptr_new2     128 ext/dl/ptr.c     return rb_dlptr_new2(rb_cDLPtrData, ptr, size, func);


rb_dlptr_plus

rb_dlptr_plus     743 ext/dl/ptr.c       return rb_dlptr_to_str(1, pass, rb_dlptr_plus(self, key));
rb_dlptr_plus    1049 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "+", rb_dlptr_plus, 1);


rb_dlptr_ptr

rb_dlptr_ptr     1037 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "ptr",   rb_dlptr_ptr, 0);
rb_dlptr_ptr     1038 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "+@", rb_dlptr_ptr, 0);


rb_dlptr_ref

rb_dlptr_ref     1039 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "ref",   rb_dlptr_ref, 0);
rb_dlptr_ref     1040 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "-@", rb_dlptr_ref, 0);


rb_dlptr_size

rb_dlptr_size    1058 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "size", rb_dlptr_size, -1);
rb_dlptr_size    1059 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "size=", rb_dlptr_size, -1);


rb_dlptr_to_str

rb_dlptr_to_str   743 ext/dl/ptr.c       return rb_dlptr_to_str(1, pass, rb_dlptr_plus(self, key));
rb_dlptr_to_str  1044 ext/dl/ptr.c     rb_define_method(rb_cDLPtrData, "to_str", rb_dlptr_to_str, -1);


rb_dlsym2csym

rb_dlsym2csym     667 ext/dl/dl.c      f = rb_dlsym2csym(sym);
rb_dlsym2csym     310 ext/dl/dl.h    freefunc_t rb_dlsym2csym(VALUE val);
rb_dlsym2csym     203 ext/dl/ptr.c       f = rb_dlsym2csym(sym);
rb_dlsym2csym     236 ext/dl/ptr.c       f = rb_dlsym2csym(sym);
rb_dlsym2csym     290 ext/dl/ptr.c     data->free = DLFREEFUNC(rb_dlsym2csym(val));


rb_dlsym_call

rb_dlsym_call     974 ext/dl/sym.c     rb_define_method(rb_cDLSymbol, "call", rb_dlsym_call, -1);
rb_dlsym_call     975 ext/dl/sym.c     rb_define_method(rb_cDLSymbol, "[]",   rb_dlsym_call, -1);


rb_dlsym_cproto

rb_dlsym_cproto   266 ext/dl/sym.c     proto = rb_dlsym_cproto(self);
rb_dlsym_cproto   978 ext/dl/sym.c     rb_define_method(rb_cDLSymbol, "cproto", rb_dlsym_cproto, 0);
rb_dlsym_cproto   980 ext/dl/sym.c     rb_define_method(rb_cDLSymbol, "to_s", rb_dlsym_cproto, 0);


rb_dlsym_new

rb_dlsym_new      656 ext/dl/dl.c      return rb_dlsym_new((void (*)())rb_dl_callback_table[rettype][entry],
rb_dlsym_new      723 ext/dl/dl.c      rb_define_const(rb_mDL, "FREE", rb_dlsym_new(dlfree, "free", "0P"));
rb_dlsym_new      309 ext/dl/dl.h    VALUE rb_dlsym_new(void (*func)(), const char *name, const char *type);
rb_dlsym_new      197 ext/dl/handle.c   val = rb_dlsym_new(func, name, stype);
rb_dlsym_new      302 ext/dl/ptr.c     return rb_dlsym_new(pdata->free,"(free)","0P");


rb_dvar_curr

rb_dvar_curr      161 intern.h       VALUE rb_dvar_curr _((ID));
rb_dvar_curr     8884 parse.c        	if (rb_dvar_curr(id)) {
rb_dvar_curr     4886 parse.y        	if (rb_dvar_curr(id)) {


rb_dvar_defined

rb_dvar_defined   160 intern.h       VALUE rb_dvar_defined _((ID));
rb_dvar_defined  8481 parse.c        	    ((dyna_in_block() && rb_dvar_defined(yylval.id)) || local_id(yylval.id))) {
rb_dvar_defined  8833 parse.c        	if (dyna_in_block() && rb_dvar_defined(id)) return NEW_DVAR(id);
rb_dvar_defined  8887 parse.c        	else if (rb_dvar_defined(id)) {
rb_dvar_defined  4483 parse.y        	    ((dyna_in_block() && rb_dvar_defined(yylval.id)) || local_id(yylval.id))) {
rb_dvar_defined  4835 parse.y        	if (dyna_in_block() && rb_dvar_defined(id)) return NEW_DVAR(id);
rb_dvar_defined  4889 parse.y        	else if (rb_dvar_defined(id)) {


rb_dvar_push

rb_dvar_push     11723 eval.c         		rb_dvar_push(id, Qfalse);
rb_dvar_push     11726 eval.c             rb_dvar_push('_', Qnil);
rb_dvar_push     11727 eval.c             rb_dvar_push('~', Qnil);
rb_dvar_push      164 intern.h       void rb_dvar_push _((ID, VALUE));
rb_dvar_push     8894 parse.c        	    rb_dvar_push(id, Qnil);
rb_dvar_push     9598 parse.c        	rb_dvar_push(0, (VALUE)ruby_dyna_vars);
rb_dvar_push     9735 parse.c            rb_dvar_push(0, 0);
rb_dvar_push     4896 parse.y        	    rb_dvar_push(id, Qnil);
rb_dvar_push     5600 parse.y        	rb_dvar_push(0, (VALUE)ruby_dyna_vars);
rb_dvar_push     5737 parse.y            rb_dvar_push(0, 0);


rb_dvar_ref

rb_dvar_ref      3609 eval.c         	result = rb_dvar_ref(node->nd_vid);
rb_dvar_ref       162 intern.h       VALUE rb_dvar_ref _((ID));


rb_eRangeError

rb_eRangeError    206 bignum.c       	    rb_raise(rb_eRangeError, "bignum too big to convert into `quad int'");
rb_eRangeError    277 bignum.c       	rb_raise(rb_eRangeError, "bignum too big to convert into `quad int'");
rb_eRangeError    739 bignum.c       	rb_raise(rb_eRangeError, "bignum too big to convert into `%s'", type);
rb_eRangeError    768 bignum.c       	    rb_raise(rb_eRangeError, "bignum out of range of unsigned long");
rb_eRangeError    782 bignum.c       	rb_raise(rb_eRangeError, "bignum too big to convert into `long'");
rb_eRangeError    800 bignum.c       	rb_raise(rb_eRangeError, "bignum too big to convert into `%s'", type);
rb_eRangeError    828 bignum.c       	rb_raise(rb_eRangeError, "bignum too big to convert into `long long'");
rb_eRangeError    300 error.c        VALUE rb_eRangeError;
rb_eRangeError   1011 error.c            rb_eRangeError    = rb_define_class("RangeError", rb_eStandardError);
rb_eRangeError    385 ext/strscan/strscan.c     if (i < 0) rb_raise(rb_eRangeError, "index out of range");
rb_eRangeError    386 ext/strscan/strscan.c     if (i > S_LEN(p)) rb_raise(rb_eRangeError, "index out of range");
rb_eRangeError   1898 gc.c           	rb_raise(rb_eRangeError, "0x%lx is not id value", p0);
rb_eRangeError   1901 gc.c           	rb_raise(rb_eRangeError, "0x%lx is recycled object", p0);
rb_eRangeError   1526 numeric.c      	    rb_raise(rb_eRangeError, "float %s out of range of integer", buf);
rb_eRangeError   1564 numeric.c          rb_raise(rb_eRangeError, "integer %ld too %s to convert to `int'", num, s);
rb_eRangeError   1572 numeric.c      	rb_raise(rb_eRangeError, "integer %lu too big to convert to `unsigned int'", num);
rb_eRangeError   1649 numeric.c      	rb_raise(rb_eRangeError, "integer %ld out of range of fixnum", v);
rb_eRangeError   1677 numeric.c      	    rb_raise(rb_eRangeError, "float %s out of range of long long", buf);
rb_eRangeError   1796 numeric.c      	rb_raise(rb_eRangeError, "%ld out of char range", i);
rb_eRangeError   2788 numeric.c          rb_eFloatDomainError = rb_define_class("FloatDomainError", rb_eRangeError);
rb_eRangeError    878 pack.c         		    rb_raise(rb_eRangeError, "pack(U): value out of range");
rb_eRangeError   2036 pack.c             rb_raise(rb_eRangeError, "pack(U): value out of range");
rb_eRangeError    497 range.c        	rb_raise(rb_eRangeError, "%ld..%s%ld out of range",
rb_eRangeError    611 ruby.h         RUBY_EXTERN VALUE rb_eRangeError;
rb_eRangeError    122 time.c         	    rb_raise(rb_eRangeError, "out of Time range");
rb_eRangeError    130 time.c         	    rb_raise(rb_eRangeError, "out of Time range");
rb_eRangeError    194 time.c         		rb_raise(rb_eRangeError, "%f out of Time range", RFLOAT(time)->value);
rb_eRangeError   1287 time.c                 rb_raise(rb_eRangeError, "time %s %f out of Time range",
rb_eRangeError   1295 time.c                     rb_raise(rb_eRangeError, "time - %f out of Time range", v);
rb_eRangeError   1301 time.c                     rb_raise(rb_eRangeError, "time + %f out of Time range", v);


rb_each

rb_each            75 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? grep_iter_i : grep_i, (VALUE)arg);
rb_each           117 enum.c             rb_iterate(rb_each, obj, find_i, (VALUE)&memo);
rb_each           156 enum.c             rb_iterate(rb_each, obj, find_all_i, ary);
rb_each           188 enum.c             rb_iterate(rb_each, obj, reject_i, ary);
rb_each           230 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? collect_i : collect_all, ary);
rb_each           251 enum.c             rb_iterate(rb_each, obj, collect_all, ary);
rb_each           310 enum.c             rb_iterate(rb_each, obj, inject_i, (VALUE)&memo);
rb_each           348 enum.c             rb_iterate(rb_each, obj, partition_i, (VALUE)ary);
rb_each           486 enum.c             rb_iterate(rb_each, obj, sort_by_i, ary);
rb_each           547 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? all_iter_i : all_i, (VALUE)&result);
rb_each           599 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? any_iter_i : any_i, (VALUE)&result);
rb_each           662 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? min_ii : min_i, (VALUE)&result);
rb_each           739 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? max_ii : max_i, (VALUE)&result);
rb_each           777 enum.c             rb_iterate(rb_each, obj, member_i, (VALUE)memo);
rb_each           813 enum.c             rb_iterate(rb_each, obj, each_with_index_i, (VALUE)&memo);
rb_each           882 enum.c             rb_iterate(rb_each, obj, zip_i, (VALUE)memo);
rb_each          1023 ext/dl/ptr.c     rb_iterate(rb_each, DLMemoryTable, dlmem_each_i, 0);
rb_each           114 ext/enumerator/enumerator.c     rb_iterate(rb_each, obj, each_slice_i, (VALUE)memo);
rb_each           184 ext/enumerator/enumerator.c     rb_iterate(rb_each, obj, each_cons_i, (VALUE)memo);
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           330 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          1167 ext/syck/rubyext.c                     rb_iterate( rb_each, val, syck_set_ivars, obj );
rb_each          2028 ext/win32ole/win32ole.c         rb_iterate(rb_each, param, hash2named_arg, (VALUE)&op);
rb_each          5356 io.c           	    rb_iterate(rb_each, current_file, rb_yield, 0);
rb_each           547 ruby.h         VALUE rb_each _((VALUE));


rb_ensure

rb_ensure        1408 array.c            return rb_ensure(inspect_call, (VALUE)&iarg, inspect_ensure, obj);
rb_ensure        1645 array.c        	rb_ensure(sort_internal, ary, sort_unlock, ary);
rb_ensure         316 dir.c          	return rb_ensure(rb_yield, dir, dir_close, dir);
rb_ensure         659 dir.c          	return rb_ensure(chdir_yield, (VALUE)&args, chdir_restore, (VALUE)&args);
rb_ensure        1409 dir.c              rb_ensure(dir_each, dir, dir_close, dir);
rb_ensure        1431 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          86 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         576 ext/iconv/iconv.c 	return rb_ensure(rb_yield, self, (VALUE(*)())iconv_finish, self);
rb_ensure         647 ext/iconv/iconv.c     return rb_ensure(iconv_s_convert, (VALUE)&arg, iconv_free, ICONV2VALUE(arg.cd));
rb_ensure         674 ext/iconv/iconv.c     return rb_ensure(iconv_s_convert, (VALUE)&arg, iconv_free, ICONV2VALUE(arg.cd));
rb_ensure         714 ext/iconv/iconv.c     return rb_ensure(iconv_init_state, cd, iconv_free, cd);
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        1156 ext/socket/socket.c     return rb_ensure(init_inetsock_internal, (VALUE)&arg,
rb_ensure        1270 ext/socket/socket.c     return rb_ensure(make_hostent_internal, (VALUE)&arg,
rb_ensure        1545 ext/socket/socket.c     ret = rb_ensure(udp_connect_internal, (VALUE)&arg,
rb_ensure         205 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        2650 ext/win32ole/win32ole.c     rb_ensure(ole_each_sub, (VALUE)pEnum, ole_ienum_free, (VALUE)pEnum);
rb_ensure        1234 ext/zlib/zlib.c     dst = rb_ensure(deflate_run, (VALUE)args, zstream_end, (VALUE)&z);
rb_ensure        1494 ext/zlib/zlib.c     dst = rb_ensure(inflate_run, (VALUE)args, zstream_end, (VALUE)&z);
rb_ensure        2330 ext/zlib/zlib.c 	return rb_ensure(rb_yield, obj, gzfile_ensure_close, obj);
rb_ensure         223 hash.c             rb_ensure(hash_foreach_call, (VALUE)&arg, hash_foreach_ensure, hash);
rb_ensure        3106 io.c           	return rb_ensure(rb_yield, port, io_close, port);
rb_ensure        3165 io.c           	return rb_ensure(rb_yield, io, io_close, io);
rb_ensure        5106 io.c               return rb_ensure(io_s_foreach, (VALUE)&arg, rb_io_close, arg.io);
rb_ensure        5144 io.c               return rb_ensure(io_s_readlines, (VALUE)&arg, rb_io_close, arg.io);
rb_ensure        5185 io.c               return rb_ensure(io_s_read, (VALUE)&arg, rb_io_close, arg.io);
rb_ensure         776 marshal.c          rb_ensure(dump, (VALUE)&c_arg, dump_ensure, (VALUE)&arg);
rb_ensure        1429 marshal.c          v = rb_ensure(load, (VALUE)&arg, load_ensure, (VALUE)&arg);
rb_ensure        3148 process.c      	    return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, SAVED_USER_ID);
rb_ensure        3156 process.c      	    return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, euid);
rb_ensure        3192 process.c      	return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, obj);
rb_ensure        3259 process.c      	    return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, SAVED_GROUP_ID);
rb_ensure        3267 process.c      	    return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, egid);
rb_ensure        3302 process.c      	return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, obj);
rb_ensure         556 ruby.h         VALUE rb_ensure _((VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE));
rb_ensure         735 signal.c           return rb_ensure(trap, (VALUE)&arg, trap_ensure, (VALUE)&arg);
rb_ensure         724 variable.c     	rb_ensure(trace_ev, (VALUE)&trace, trace_en, (VALUE)var);


rb_env_path_tainted

rb_env_path_tainted 1702 hash.c         	if (strcasecmp(nam, PATH_ENV) == 0 && !rb_env_path_tainted())
rb_env_path_tainted 1704 hash.c         	if (strcmp(nam, PATH_ENV) == 0 && !rb_env_path_tainted())
rb_env_path_tainted 1745 hash.c             if (strcasecmp(nam, PATH_ENV) == 0 && !rb_env_path_tainted())
rb_env_path_tainted 1747 hash.c             if (strcmp(nam, PATH_ENV) == 0 && !rb_env_path_tainted())
rb_env_path_tainted  263 intern.h       int rb_env_path_tainted _((void));
rb_env_path_tainted  927 process.c          if (rb_env_path_tainted()) {


rb_eof_error

rb_eof_error      647 ext/openssl/ossl_ssl.c 		rb_eof_error();
rb_eof_error      655 ext/openssl/ossl_ssl.c 		if(ERR_peek_error() == 0 && nread == 0) rb_eof_error();
rb_eof_error      787 ext/stringio/stringio.c     if (NIL_P(c)) rb_eof_error();
rb_eof_error      939 ext/stringio/stringio.c     if (NIL_P(line)) rb_eof_error();
rb_eof_error     1175 ext/stringio/stringio.c 	rb_eof_error();
rb_eof_error     1286 io.c                   rb_eof_error();
rb_eof_error     1755 io.c           	rb_eof_error();
rb_eof_error     1962 io.c           	rb_eof_error();
rb_eof_error     2424 io.c           	rb_eof_error();
rb_eof_error     4450 io.c               if (!next_argv()) rb_eof_error();
rb_eof_error     4454 io.c           	rb_eof_error();
rb_eof_error     5340 io.c           	rb_eof_error();
rb_eof_error      809 marshal.c      	if (NIL_P(v)) rb_eof_error();


rb_eql

rb_eql           2505 array.c        	if (!rb_eql(rb_ary_elt(ary1, i), rb_ary_elt(ary2, i)))
rb_eql             53 hash.c             return (VALUE)rb_eql(args[0], args[1]);
rb_eql            299 intern.h       int rb_eql _((VALUE, VALUE));
rb_eql            190 range.c            if (!rb_eql(rb_ivar_get(range, id_beg), rb_ivar_get(obj, id_beg)))
rb_eql            192 range.c            if (!rb_eql(rb_ivar_get(range, id_end), rb_ivar_get(obj, id_end)))
rb_eql            852 struct.c       	if (!rb_eql(RSTRUCT(s)->ptr[i], RSTRUCT(s2)->ptr[i])) return Qfalse;


rb_equal

rb_equal          862 array.c        	if (rb_equal(RARRAY(ary)->ptr[i], val))
rb_equal          893 array.c        	if (rb_equal(RARRAY(ary)->ptr[i], val))
rb_equal         1847 array.c        	if (rb_equal(e, item)) continue;
rb_equal         2415 array.c        	    rb_equal(RARRAY(v)->ptr[0], key))
rb_equal         2446 array.c        	    rb_equal(RARRAY(v)->ptr[1], value))
rb_equal         2477 array.c        	return rb_equal(ary2, ary1);
rb_equal         2481 array.c        	if (!rb_equal(rb_ary_elt(ary1, i), rb_ary_elt(ary2, i)))
rb_equal         2556 array.c        	if (rb_equal(RARRAY(ary)->ptr[i], item)) {
rb_equal          987 bignum.c       	return rb_equal(y, x);
rb_equal          749 enum.c             if (rb_equal(item, memo[0])) {
rb_equal          969 error.c            if (FIXNUM_P(num) ? num == e : rb_equal(num, e))
rb_equal          576 hash.c             if (rb_equal(value, args[0])) {
rb_equal         1389 hash.c             if (rb_equal(value, data[1])) {
rb_equal         1439 hash.c             if (!rb_equal(val1, val2)) {
rb_equal         1458 hash.c         	return rb_equal(hash2, hash1);
rb_equal         1463 hash.c         	if (!(rb_equal(RHASH(hash1)->ifnone, RHASH(hash2)->ifnone) &&
rb_equal          357 numeric.c          if ((!rb_equal(z, INT2FIX(0))) &&
rb_equal          415 numeric.c          if (rb_equal(num, INT2FIX(0))) {
rb_equal          782 numeric.c          return rb_equal(x, y);
rb_equal         1445 numeric.c      	if (rb_equal(step, INT2FIX(0))) {
rb_equal         2612 object.c           rb_define_method(rb_mKernel, "===", rb_equal, 1);
rb_equal          328 process.c          return rb_equal(pst_to_i(st1), st2);
rb_equal          132 range.c            if (!rb_equal(rb_ivar_get(range, id_beg), rb_ivar_get(obj, id_beg)))
rb_equal          134 range.c            if (!rb_equal(rb_ivar_get(range, id_end), rb_ivar_get(obj, id_end)))
rb_equal          343 range.c        	    if (rb_equal(step, INT2FIX(0))) rb_raise(rb_eArgError, "step can't be 0");
rb_equal          531 ruby.h         VALUE rb_equal _((VALUE,VALUE));
rb_equal          941 string.c       	return rb_equal(str2, str1);
rb_equal          802 struct.c       	if (!rb_equal(RSTRUCT(s)->ptr[i], RSTRUCT(s2)->ptr[i])) return Qfalse;


rb_error_frozen

rb_error_frozen    51 array.c            if (OBJ_FROZEN(ary)) rb_error_frozen("array");
rb_error_frozen  1170 error.c            if (OBJ_FROZEN(obj)) rb_error_frozen(rb_obj_classname(obj));
rb_error_frozen   395 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  1949 eval.c         	rb_error_frozen(desc);
rb_error_frozen  3868 eval.c         	    if (OBJ_FROZEN(recv)) rb_error_frozen("object");
rb_error_frozen  12233 eval.c             if (OBJ_FROZEN(thread)) rb_error_frozen("thread locals");
rb_error_frozen   319 ext/dbm/dbm.c      if (OBJ_FROZEN(obj)) rb_error_frozen("DBM");
rb_error_frozen   414 ext/gdbm/gdbm.c     if (OBJ_FROZEN(obj)) rb_error_frozen("GDBM");
rb_error_frozen   296 ext/sdbm/init.c     if (OBJ_FROZEN(obj)) rb_error_frozen("SDBM");
rb_error_frozen    32 hash.c             if (OBJ_FROZEN(hash)) rb_error_frozen("hash");
rb_error_frozen   681 object.c       	    rb_error_frozen("object");
rb_error_frozen   703 object.c       	    rb_error_frozen("object");
rb_error_frozen   478 string.c           if (OBJ_FROZEN(str)) rb_error_frozen("string");
rb_error_frozen   153 struct.c           if (OBJ_FROZEN(s)) rb_error_frozen("Struct");
rb_error_frozen  1050 variable.c         if (OBJ_FROZEN(obj)) rb_error_frozen("object");
rb_error_frozen  1174 variable.c         if (OBJ_FROZEN(obj)) rb_error_frozen("object");
rb_error_frozen  1477 variable.c         if (OBJ_FROZEN(mod)) rb_error_frozen("class/module");
rb_error_frozen  1644 variable.c     	    rb_error_frozen("module");
rb_error_frozen  1647 variable.c     	    rb_error_frozen("class");
rb_error_frozen  1742 variable.c     	    if (OBJ_FROZEN(tmp)) rb_error_frozen("class/module");
rb_error_frozen  1923 variable.c         if (OBJ_FROZEN(mod)) rb_error_frozen("class/module");


rb_eval

rb_eval          1056 eval.c         static VALUE rb_eval _((VALUE,NODE*));
rb_eval          1364 eval.c         	rb_eval(self, beg_tree);
rb_eval          1368 eval.c             return rb_eval(self, node);
rb_eval          2180 eval.c         		argv[i] = rb_eval(self,n->nd_head);\
rb_eval          2190 eval.c         	VALUE args = rb_eval(self,n);\
rb_eval          2284 eval.c         	    val = rb_eval(self, node->nd_recv);
rb_eval          2384 eval.c         	    val = rb_eval(self, node->nd_head);
rb_eval          2433 eval.c         	    rb_eval(self, node);
rb_eval          2781 eval.c         	VALUE c = rb_eval(self, cpath->nd_head);
rb_eval          2851 eval.c         	    result = rb_eval(self, node);
rb_eval          2877 eval.c         	    VALUE l = rb_eval(self,node->nd_recv);
rb_eval          2878 eval.c         	    VALUE r = rb_eval(self,node->nd_value);
rb_eval          2886 eval.c         	    VALUE r = rb_eval(self,node->nd_recv);
rb_eval          2887 eval.c         	    VALUE l = rb_eval(self,node->nd_value);
rb_eval          2905 eval.c         		rb_eval(self, node->nd_body);
rb_eval          2940 eval.c         	if (RTEST(rb_eval(self, node->nd_cond))) {
rb_eval          2959 eval.c         		    VALUE v = rb_eval(self, tag->nd_head->nd_head);
rb_eval          2972 eval.c         		if (RTEST(rb_eval(self, tag->nd_head))) {
rb_eval          2986 eval.c         	    val = rb_eval(self, node->nd_head);
rb_eval          3000 eval.c         			VALUE v = rb_eval(self, tag->nd_head->nd_head);
rb_eval          3013 eval.c         		    if (RTEST(rb_funcall2(rb_eval(self, tag->nd_head), eqq, 1, &val))) {
rb_eval          3029 eval.c         	    if (node->nd_state && !RTEST(rb_eval(self, node->nd_cond)))
rb_eval          3033 eval.c         		rb_eval(self, node->nd_body);
rb_eval          3036 eval.c         	    } while (RTEST(rb_eval(self, node->nd_cond)));
rb_eval          3064 eval.c         	    if (node->nd_state && RTEST(rb_eval(self, node->nd_cond)))
rb_eval          3068 eval.c         		rb_eval(self, node->nd_body);
rb_eval          3071 eval.c         	    } while (!RTEST(rb_eval(self, node->nd_cond)));
rb_eval          3109 eval.c         		    result = rb_eval(self, node->nd_iter);
rb_eval          3116 eval.c         		    recv = rb_eval(self, node->nd_iter);
rb_eval          3144 eval.c         	break_jump(rb_eval(self, node->nd_stts));
rb_eval          3149 eval.c         	return_value(rb_eval(self, node->nd_stts));
rb_eval          3164 eval.c         	result = splat_value(rb_eval(self, node->nd_head));
rb_eval          3168 eval.c         	result = rb_ary_to_ary(rb_eval(self, node->nd_head));
rb_eval          3172 eval.c         	result = avalue_splat(rb_eval(self, node->nd_head));
rb_eval          3178 eval.c         	    result = rb_eval(self, node->nd_head);
rb_eval          3196 eval.c         		result = rb_eval(self, node->nd_head);
rb_eval          3220 eval.c         			result = rb_eval(self, resq->nd_body);
rb_eval          3245 eval.c         	    result = rb_eval(self, node->nd_head);
rb_eval          3252 eval.c         	    rb_eval(self, node->nd_ensr);
rb_eval          3260 eval.c         	result = rb_eval(self, node->nd_1st);
rb_eval          3266 eval.c         	result = rb_eval(self, node->nd_1st);
rb_eval          3272 eval.c         	if (RTEST(rb_eval(self, node->nd_body))) result = Qfalse;
rb_eval          3279 eval.c         	    VALUE beg = rb_eval(self, node->nd_beg);
rb_eval          3280 eval.c         	    VALUE end = rb_eval(self, node->nd_end);
rb_eval          3290 eval.c         		if (RTEST(rb_eval(self, node->nd_beg))) {
rb_eval          3291 eval.c         		    *flip = RTEST(rb_eval(self, node->nd_end))?Qfalse:Qtrue;
rb_eval          3299 eval.c         		if (RTEST(rb_eval(self, node->nd_end))) {
rb_eval          3312 eval.c         		result = RTEST(rb_eval(self, node->nd_beg)) ? Qtrue : Qfalse;
rb_eval          3316 eval.c         		if (RTEST(rb_eval(self, node->nd_end))) {
rb_eval          3325 eval.c         	return_jump(rb_eval(self, node->nd_stts));
rb_eval          3330 eval.c         	    VALUE args = rb_eval(self, node->nd_head);
rb_eval          3331 eval.c         	    result = rb_ary_concat(args, splat_value(rb_eval(self, node->nd_body)));
rb_eval          3337 eval.c         	    VALUE args = rb_ary_dup(rb_eval(self, node->nd_head));
rb_eval          3338 eval.c         	    result = rb_ary_push(args, rb_eval(self, node->nd_body));
rb_eval          3355 eval.c         		recv = rb_eval(self, node->nd_recv);
rb_eval          3375 eval.c         	    recv = rb_eval(self, node->nd_recv);
rb_eval          3464 eval.c         		result = rb_eval(self, node->nd_next);
rb_eval          3482 eval.c         	    recv = rb_eval(self, node->nd_recv);
rb_eval          3489 eval.c         		val = rb_eval(self, rval);
rb_eval          3493 eval.c         		val = rb_eval(self, rval);
rb_eval          3496 eval.c         		val = rb_funcall(val, node->nd_mid, 1, rb_eval(self, rval));
rb_eval          3509 eval.c         	    recv = rb_eval(self, node->nd_recv);
rb_eval          3514 eval.c         		val = rb_eval(self, node->nd_value);
rb_eval          3518 eval.c         		val = rb_eval(self, node->nd_value);
rb_eval          3522 eval.c         				 rb_eval(self, node->nd_value));
rb_eval          3531 eval.c         	result = rb_eval(self, node->nd_head);
rb_eval          3538 eval.c         	    !RTEST(result = rb_eval(self, node->nd_head))) {
rb_eval          3545 eval.c         	result = massign(self, node, rb_eval(self, node->nd_value), 0);
rb_eval          3551 eval.c         	result = rb_eval(self, node->nd_value);
rb_eval          3556 eval.c         	result = rb_eval(self, node->nd_value);
rb_eval          3561 eval.c         	result = rb_eval(self, node->nd_value);
rb_eval          3566 eval.c         	result = rb_eval(self, node->nd_value);
rb_eval          3571 eval.c         	result = rb_eval(self, node->nd_value);
rb_eval          3576 eval.c         	result = rb_eval(self, node->nd_value);
rb_eval          3592 eval.c         	result = rb_eval(self, node->nd_value);
rb_eval          3597 eval.c         	result = rb_eval(self, node->nd_value);
rb_eval          3644 eval.c         	    klass = rb_eval(self, node->nd_head);
rb_eval          3698 eval.c         		key = rb_eval(self, list->nd_head);
rb_eval          3702 eval.c         		val = rb_eval(self, list->nd_head);
rb_eval          3722 eval.c         		RARRAY(ary)->ptr[i++] = rb_eval(self, node->nd_head);
rb_eval          3735 eval.c         	result = rb_obj_as_string(rb_eval(self, node->nd_body));
rb_eval          3755 eval.c         			str2 = rb_eval(self, list->nd_head);
rb_eval          3854 eval.c         	    VALUE recv = rb_eval(self, node->nd_recv);
rb_eval          3919 eval.c         	       super = rb_eval(self, node->nd_super);
rb_eval          4000 eval.c         	    result = rb_eval(self, node->nd_recv);
rb_eval          4084 eval.c         	result = rb_eval(ruby_cbase, node->nd_next);
rb_eval          4897 eval.c         	    result = rb_eval(self, node);
rb_eval          5163 eval.c         		recv = rb_eval(self, lhs->nd_recv);
rb_eval          5176 eval.c         		args = rb_eval(self, lhs->nd_args);
rb_eval          5708 eval.c         	result = rb_eval(recv, body);
rb_eval          5807 eval.c         				rb_eval(recv, opt);
rb_eval          5826 eval.c         		result = rb_eval(recv, body);
rb_eval          8644 eval.c             VALUE proc = rb_eval(self, node->nd_body);	/* OK */
rb_eval          8656 eval.c         	result = rb_eval(self, node->nd_iter);
rb_eval          8676 eval.c         	result = rb_eval(self, node->nd_iter);
rb_eval          8701 eval.c         	result = rb_eval(self, node->nd_iter);


rb_eval_cmd

rb_eval_cmd      9793 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      1776 gc.c               rb_eval_cmd(args[0], args[1], (int)args[2]);
rb_eval_cmd       166 intern.h       VALUE rb_eval_cmd _((VALUE, VALUE, int));
rb_eval_cmd       469 signal.c       	rb_eval_cmd(trap_exit, rb_ary_new3(1, INT2FIX(0)), trap_list[0].safe);
rb_eval_cmd       541 variable.c         rb_eval_cmd(cmd, rb_ary_new3(1, val), 0);


rb_eval_string

rb_eval_string   1617 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    517 ruby.h         VALUE rb_eval_string _((const char*));


rb_eval_string_protect

rb_eval_string_protect 1641 eval.c             val = rb_eval_string_protect(str, &status);
rb_eval_string_protect  518 ruby.h         VALUE rb_eval_string_protect _((const char*, int*));


rb_event_hook_t

rb_event_hook_t  1080 eval.c         static rb_event_hook_t *event_hooks;
rb_event_hook_t  1084 eval.c         	rb_event_hook_t *hook; \
rb_event_hook_t  2464 eval.c             rb_event_hook_t *hook;
rb_event_hook_t  2466 eval.c             hook = ALLOC(rb_event_hook_t);
rb_event_hook_t  2477 eval.c             rb_event_hook_t *prev, *hook;
rb_event_hook_t  2546 eval.c             rb_event_hook_t *hook;


rb_event_t

rb_event_t       1076 eval.c             rb_event_t events;
rb_event_t       1094 eval.c         static void call_trace_func _((rb_event_t,NODE*,VALUE,ID,VALUE));
rb_event_t       2462 eval.c             rb_event_t events;
rb_event_t       2567 eval.c         get_event_name(rb_event_t event)
rb_event_t       2593 eval.c             rb_event_t event;
rb_event_t        374 node.h         void rb_add_event_hook _((rb_event_hook_func_t,rb_event_t));


rb_exc_new

rb_exc_new        329 error.c            return rb_exc_new(etype, s, strlen(s));
rb_exc_new        337 error.c            return rb_exc_new(etype, RSTRING(str)->ptr, RSTRING(str)->len);
rb_exc_new       4463 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        131 intern.h       VALUE rb_exc_new _((VALUE, const char*, long));


rb_exc_new2

rb_exc_new2      1061 error.c            rb_exc_raise(rb_exc_new2(exc, buf));
rb_exc_new2      1079 error.c            rb_exc_raise(rb_exc_new2(rb_eLoadError, buf));
rb_exc_new2      1107 error.c            rb_exc_fatal(rb_exc_new2(rb_eFatal, buf));
rb_exc_new2      1552 error.c        	    ruby_errinfo = rb_exc_new2(rb_eSyntaxError, s);
rb_exc_new2      1664 eval.c             VALUE exc = rb_exc_new2(rb_eLocalJumpError, mesg);
rb_exc_new2      9458 eval.c             exception_error = rb_exc_new2(rb_eFatal, "exception reentered");
rb_exc_new2      9462 eval.c             sysstack_error = rb_exc_new2(rb_eSysStackError, "stack level too deep");
rb_exc_new2      10277 eval.c         	    VALUE exc = rb_exc_new2(rb_eIOError, "stream closed");
rb_exc_new2      10304 eval.c             e = rb_exc_new2(rb_eFatal, msg);
rb_exc_new2      11678 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       207 ext/zlib/zlib.c 	exc = rb_exc_new2(cStreamEnd, msg);
rb_exc_new2       210 ext/zlib/zlib.c 	exc = rb_exc_new2(cNeedDict, msg);
rb_exc_new2       213 ext/zlib/zlib.c 	exc = rb_exc_new2(cStreamError, msg);
rb_exc_new2       216 ext/zlib/zlib.c 	exc = rb_exc_new2(cDataError, msg);
rb_exc_new2       219 ext/zlib/zlib.c 	exc = rb_exc_new2(cBufError, msg);
rb_exc_new2       222 ext/zlib/zlib.c 	exc = rb_exc_new2(cVersionError, msg);
rb_exc_new2       225 ext/zlib/zlib.c 	exc = rb_exc_new2(cMemError, msg);
rb_exc_new2       234 ext/zlib/zlib.c 	  exc = rb_exc_new2(cZError, buf);
rb_exc_new2      1944 gc.c               nomem_error = rb_exc_new2(rb_eNoMemError, "failed to allocate memory");
rb_exc_new2       132 intern.h       VALUE rb_exc_new2 _((VALUE, const char*));


rb_exc_new3

rb_exc_new3      1559 error.c        	    ruby_errinfo = rb_exc_new3(rb_eSyntaxError, str);
rb_exc_new3      1594 eval.c             rb_exc_raise(rb_exc_new3(rb_eSyntaxError, str));
rb_exc_new3      4585 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       133 intern.h       VALUE rb_exc_new3 _((VALUE, VALUE));


rb_exc_raise

rb_exc_raise      615 error.c            rb_exc_raise(exc);
rb_exc_raise     1061 error.c            rb_exc_raise(rb_exc_new2(exc, buf));
rb_exc_raise     1079 error.c            rb_exc_raise(rb_exc_new2(rb_eLoadError, buf));
rb_exc_raise     1123 error.c            rb_exc_raise(rb_class_new_instance(1, &arg, get_syserr(n)));
rb_exc_raise     1594 eval.c             rb_exc_raise(rb_exc_new3(rb_eSyntaxError, str));
rb_exc_raise     1683 eval.c             rb_exc_raise(exc);
rb_exc_raise     4321 eval.c             rb_exc_raise(rb_class_new_instance(2, args, rb_eSystemExit));
rb_exc_raise     5408 eval.c         	    rb_exc_raise(sysstack_error);
rb_exc_raise     5502 eval.c         	rb_exc_raise(exc);
rb_exc_raise     6364 eval.c         	    rb_exc_raise(ruby_errinfo);
rb_exc_raise     6737 eval.c         	rb_exc_raise(ruby_errinfo);
rb_exc_raise     6741 eval.c         	rb_exc_raise(ruby_errinfo);
rb_exc_raise     10131 eval.c         	rb_exc_raise(th_raise_exception);
rb_exc_raise     10306 eval.c         	rb_exc_raise(e);
rb_exc_raise     10853 eval.c         	rb_exc_raise(errinfo);
rb_exc_raise      332 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      238 ext/zlib/zlib.c     rb_exc_raise(exc);
rb_exc_raise      103 gc.c               rb_exc_raise(nomem_error);
rb_exc_raise      412 ruby.c         		    rb_exc_raise(rb_class_new_instance(2, name_error, rb_eNameError));


rb_exec_end_proc

rb_exec_end_proc 1470 eval.c         void rb_exec_end_proc _((void));
rb_exec_end_proc 1480 eval.c             rb_exec_end_proc();
rb_exec_end_proc  190 intern.h       void rb_exec_end_proc _((void));


rb_exit

rb_exit           491 dln.c          	rb_exit(1);
rb_exit          4402 eval.c             rb_exit(istatus);
rb_exit          4428 eval.c         	rb_exit(EXIT_FAILURE);
rb_exit          11075 eval.c             if (th == th->next || th == main_thread) rb_exit(EXIT_SUCCESS);
rb_exit          12092 eval.c         	rb_exit(EXIT_SUCCESS);
rb_exit           540 ruby.h         NORETURN(void rb_exit _((int)));


rb_extend_object

rb_extend_object 1632 eval.c             rb_extend_object(ruby_top_self, ruby_wrapper);
rb_extend_object 3952 eval.c         		rb_extend_object(klass, ruby_wrapper);
rb_extend_object 3988 eval.c         		rb_extend_object(module, ruby_wrapper);
rb_extend_object 4010 eval.c         		rb_extend_object(klass, ruby_wrapper);
rb_extend_object 6682 eval.c         	rb_extend_object(self, ruby_wrapper);
rb_extend_object 7443 eval.c             rb_extend_object(obj, mod);
rb_extend_object  779 ext/readline/readline.c     rb_extend_object(history, rb_mEnumerable);
rb_extend_object 2480 hash.c             rb_extend_object(envtbl, rb_mEnumerable);
rb_extend_object 5693 io.c               rb_extend_object(argf, rb_mEnumerable);
rb_extend_object 1036 marshal.c                      rb_extend_object(v, m);
rb_extend_object 1255 marshal.c                          rb_extend_object(v, m);
rb_extend_object  484 ruby.h         void rb_extend_object _((VALUE,VALUE));


rb_f_END

rb_f_END          188 eval.c         static void rb_f_END _((void));
rb_f_END         2859 eval.c         	rb_f_END();


rb_f_abort

rb_f_abort       7794 eval.c             rb_define_global_function("abort", rb_f_abort, -1);
rb_f_abort        148 intern.h       VALUE rb_f_abort _((int,VALUE*));
rb_f_abort       3388 process.c          rb_define_singleton_method(rb_mProcess, "abort", rb_f_abort, -1); /* in eval.c */


rb_f_binding

rb_f_binding      187 eval.c         static VALUE rb_f_binding _((VALUE));
rb_f_binding     1335 eval.c         	rb_define_global_const("TOPLEVEL_BINDING", rb_f_binding(ruby_top_self));
rb_f_binding     2643 eval.c         					    self?rb_f_binding(self):Qnil,
rb_f_binding     9550 eval.c             rb_define_global_function("binding", rb_f_binding, 0);


rb_f_block_given_p

rb_f_block_given_p  189 eval.c         static VALUE rb_f_block_given_p _((void));
rb_f_block_given_p 7778 eval.c             rb_define_global_function("iterator?", rb_f_block_given_p, 0);
rb_f_block_given_p 7779 eval.c             rb_define_global_function("block_given?", rb_f_block_given_p, 0);
rb_f_block_given_p 8159 eval.c             data->iter = rb_f_block_given_p();
rb_f_block_given_p 8223 eval.c             if (!rb_block_given_p() && !rb_f_block_given_p()) {


rb_f_catch

rb_f_catch       7589 eval.c         static VALUE rb_f_catch _((VALUE,VALUE));
rb_f_catch       7798 eval.c             rb_define_global_function("catch", rb_f_catch, 1);


rb_f_exec

rb_f_exec         190 ext/pty/pty.c      return rb_f_exec(arg->argc, arg->argv);
rb_f_exec         347 intern.h       VALUE rb_f_exec _((int,VALUE*));
rb_f_exec        3364 process.c          rb_define_global_function("exec", rb_f_exec, -1);


rb_f_exit

rb_f_exit        7793 eval.c             rb_define_global_function("exit", rb_f_exit, -1);
rb_f_exit         147 intern.h       VALUE rb_f_exit _((int,VALUE*));
rb_f_exit        3387 process.c          rb_define_singleton_method(rb_mProcess, "exit", rb_f_exit, -1);   /* in eval.c */


rb_f_exit_bang

rb_f_exit_bang   3366 process.c          rb_define_global_function("exit!", rb_f_exit_bang, -1);
rb_f_exit_bang   3386 process.c          rb_define_singleton_method(rb_mProcess, "exit!", rb_f_exit_bang, -1);


rb_f_fork

rb_f_fork        3365 process.c          rb_define_global_function("fork", rb_f_fork, 0);
rb_f_fork        3385 process.c          rb_define_singleton_method(rb_mProcess, "fork", rb_f_fork, 0);


rb_f_getenv

rb_f_getenv      2040 hash.c         	VALUE val = rb_f_getenv(Qnil, RARRAY(keys)->ptr[i]);
rb_f_getenv      2069 hash.c         	rb_ary_push(result, rb_f_getenv(Qnil, argv[i]));
rb_f_getenv      2113 hash.c         	VALUE val = rb_f_getenv(Qnil, RARRAY(keys)->ptr[i]);
rb_f_getenv      2380 hash.c         	    val = rb_yield_values(3, key, rb_f_getenv(Qnil, key), val);
rb_f_getenv      2482 hash.c             rb_define_singleton_method(envtbl,"[]", rb_f_getenv, 1);


rb_f_gets

rb_f_gets        4415 io.c           	return rb_f_gets(0, 0);
rb_f_gets        4452 io.c               line = rb_f_gets(argc, argv);
rb_f_gets        5565 io.c               rb_define_global_function("gets", rb_f_gets, -1);
rb_f_gets        5708 io.c               rb_define_singleton_method(argf, "gets", rb_f_gets, -1);


rb_f_global_variables

rb_f_global_variables 7800 eval.c             rb_define_global_function("global_variables", rb_f_global_variables, 0); /* in variable.c */
rb_f_global_variables  460 intern.h       VALUE rb_f_global_variables _((void));


rb_f_kill

rb_f_kill         384 intern.h       VALUE rb_f_kill _((int, VALUE*));
rb_f_kill        3390 process.c          rb_define_module_function(rb_mProcess, "kill", rb_f_kill, -1); /* in signal.c */


rb_f_raise

rb_f_raise       7788 eval.c             rb_define_global_function("raise", rb_f_raise, -1);
rb_f_raise       7789 eval.c             rb_define_global_function("fail", rb_f_raise, -1);


rb_f_readline

rb_f_readline    5566 io.c               rb_define_global_function("readline", rb_f_readline, -1);
rb_f_readline    5709 io.c               rb_define_singleton_method(argf, "readline", rb_f_readline, -1);


rb_f_readlines

rb_f_readlines   5570 io.c               rb_define_global_function("readlines", rb_f_readlines, -1);
rb_f_readlines   5706 io.c               rb_define_singleton_method(argf, "readlines", rb_f_readlines, -1);
rb_f_readlines   5707 io.c               rb_define_singleton_method(argf, "to_a", rb_f_readlines, -1);


rb_f_require

rb_f_require     7948 eval.c             rb_define_global_function("require", rb_f_require, 1);
rb_f_require      180 intern.h       VALUE rb_f_require _((VALUE, VALUE));


rb_f_select

rb_f_select      5568 io.c               rb_define_global_function("select", rb_f_select, -1);
rb_f_select      5589 io.c               rb_define_singleton_method(rb_cIO, "select", rb_f_select, -1);


rb_f_send

rb_f_send        7803 eval.c             rb_define_method(rb_mKernel, "send", rb_f_send, -1);
rb_f_send        7804 eval.c             rb_define_method(rb_mKernel, "__send__", rb_f_send, -1);


rb_f_sprintf

rb_f_sprintf      761 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      394 intern.h       VALUE rb_f_sprintf _((int, VALUE*));
rb_f_sprintf     3602 io.c               rb_io_write(out, rb_f_sprintf(argc, argv));
rb_f_sprintf     3633 io.c               rb_io_write(out, rb_f_sprintf(argc, argv));
rb_f_sprintf     2659 object.c           rb_define_global_function("sprintf", rb_f_sprintf, -1); /* in sprintf.c */
rb_f_sprintf     2660 object.c           rb_define_global_function("format", rb_f_sprintf, -1);  /* in sprintf.c  */
rb_f_sprintf      462 string.c       	return rb_f_sprintf(RARRAY(arg)->len+1, argv);
rb_f_sprintf      468 string.c           return rb_f_sprintf(2, argv);


rb_f_throw

rb_f_throw       7799 eval.c             rb_define_global_function("throw", rb_f_throw, -1);
rb_f_throw       12903 eval.c             rb_f_throw(2, argv);


rb_f_trace_var

rb_f_trace_var   7514 eval.c         VALUE rb_f_trace_var();
rb_f_trace_var   7839 eval.c             rb_define_global_function("trace_var", rb_f_trace_var, -1); /* in variable.c */
rb_f_trace_var    458 intern.h       VALUE rb_f_trace_var _((int, VALUE*));


rb_f_untrace_var

rb_f_untrace_var 7515 eval.c         VALUE rb_f_untrace_var();
rb_f_untrace_var 7840 eval.c             rb_define_global_function("untrace_var", rb_f_untrace_var, -1); /* in variable.c */
rb_f_untrace_var  459 intern.h       VALUE rb_f_untrace_var _((int, VALUE*));
rb_f_untrace_var  581 variable.c     	return rb_f_untrace_var(argc, argv);


rb_fatal

rb_fatal         1031 class.c            rb_fatal("bad scan arg format: %s", fmt);
rb_fatal         1618 ext/bigdecimal/bigdecimal.c     if(fatal) rb_fatal(str);
rb_fatal         4279 io.c           			rb_fatal("Can't do inplace edit without backup");
rb_fatal          138 ruby.c         		rb_fatal("malformed RUBYLIB_PREFIX");
rb_fatal          161 ruby.c         	rb_fatal("malformed RUBYLIB_PREFIX");
rb_fatal          601 ruby.c         		rb_fatal("Can't chdir to %s", s);
rb_fatal          613 ruby.c         		rb_fatal("Can't chdir");
rb_fatal          616 ruby.c         		rb_fatal("Can't chdir to %s", s);
rb_fatal          921 ruby.c         		    rb_fatal("Can't exec %s", path);
rb_fatal          536 ruby.h         NORETURN(void rb_fatal __((const char*, ...)));
rb_fatal          169 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         1951 win32/win32.c  	rb_fatal ("Unable to locate winsock library!\n");
rb_fatal         1953 win32/win32.c  	rb_fatal("could not find version 1 of winsock dll\n");
rb_fatal         1956 win32/win32.c  	rb_fatal("could not find version 1 of winsock dll\n");
rb_fatal         1980 win32/win32.c  	rb_fatal("Unable to create interrupt event!\n");
rb_fatal         3319 win32/win32.c  	rb_fatal("failed to launch waiter thread:%d", GetLastError());


rb_fdopen

rb_fdopen         213 ext/socket/socket.c     fp->f = rb_fdopen(fd, "r");
rb_fdopen         214 ext/socket/socket.c     fp->f2 = rb_fdopen(fd, "w");
rb_fdopen        2765 io.c               fptr->f = rb_fdopen(fd, m);
rb_fdopen        3013 io.c           		fptr->f  = rb_fdopen(pr[0], "r");
rb_fdopen        3016 io.c           		FILE *f = rb_fdopen(pw[1], "w");
rb_fdopen        3409 io.c           		fptr->f = rb_fdopen(fd, "r");
rb_fdopen        3413 io.c           		fptr->f = rb_fdopen(fd, mode);
rb_fdopen        3436 io.c           	    fptr->f2 = rb_fdopen(fd, "w");
rb_fdopen        3571 io.c               fptr->f = rb_fdopen(fd, mode);
rb_fdopen        3577 io.c           	fptr->f2 = rb_fdopen(fd, "w");
rb_fdopen        4081 io.c               fp->f = rb_fdopen(fd, rb_io_modenum_mode(flags));
rb_fdopen          67 rubyio.h       FILE *rb_fdopen _((int, const char*));


rb_feature_p

rb_feature_p     6849 eval.c             if (rb_feature_p(feature, 0, Qfalse))
rb_feature_p     6934 eval.c         	    if (rb_feature_p(ftptr, ext, Qtrue)) return 'r';
rb_feature_p     6939 eval.c         	    if (rb_feature_p(ftptr, ext, Qfalse)) return 's';
rb_feature_p     6958 eval.c         	    if (rb_feature_p(ftptr, ext, Qfalse)) return 's';
rb_feature_p     6965 eval.c         	if ((ext = rb_feature_p(ftptr, 0, Qfalse))) {
rb_feature_p     6974 eval.c         	if (rb_feature_p(ftptr, ext, !--type)) break;


rb_file_const

rb_file_const    1565 dir.c              rb_file_const("FNM_NOESCAPE", INT2FIX(FNM_NOESCAPE));
rb_file_const    1566 dir.c              rb_file_const("FNM_PATHNAME", INT2FIX(FNM_PATHNAME));
rb_file_const    1567 dir.c              rb_file_const("FNM_DOTMATCH", INT2FIX(FNM_DOTMATCH));
rb_file_const    1568 dir.c              rb_file_const("FNM_CASEFOLD", INT2FIX(FNM_CASEFOLD));
rb_file_const    4422 file.c             rb_file_const("LOCK_SH", INT2FIX(LOCK_SH));
rb_file_const    4423 file.c             rb_file_const("LOCK_EX", INT2FIX(LOCK_EX));
rb_file_const    4424 file.c             rb_file_const("LOCK_UN", INT2FIX(LOCK_UN));
rb_file_const    4425 file.c             rb_file_const("LOCK_NB", INT2FIX(LOCK_NB));
rb_file_const     227 intern.h       void rb_file_const _((const char*, VALUE));
rb_file_const    5745 io.c               rb_file_const("RDONLY", INT2FIX(O_RDONLY));
rb_file_const    5746 io.c               rb_file_const("WRONLY", INT2FIX(O_WRONLY));
rb_file_const    5747 io.c               rb_file_const("RDWR", INT2FIX(O_RDWR));
rb_file_const    5748 io.c               rb_file_const("APPEND", INT2FIX(O_APPEND));
rb_file_const    5749 io.c               rb_file_const("CREAT", INT2FIX(O_CREAT));
rb_file_const    5750 io.c               rb_file_const("EXCL", INT2FIX(O_EXCL));
rb_file_const    5753 io.c               rb_file_const("NONBLOCK", INT2FIX(O_NONBLOCK));
rb_file_const    5755 io.c               rb_file_const("NONBLOCK", INT2FIX(O_NDELAY));
rb_file_const    5758 io.c               rb_file_const("TRUNC", INT2FIX(O_TRUNC));
rb_file_const    5760 io.c               rb_file_const("NOCTTY", INT2FIX(O_NOCTTY));
rb_file_const    5763 io.c               rb_file_const("BINARY", INT2FIX(O_BINARY));
rb_file_const    5766 io.c               rb_file_const("SYNC", INT2FIX(O_SYNC));


rb_file_expand_path

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 2687 file.c         	return rb_file_expand_path(argv[0], Qnil);
rb_file_expand_path 2691 file.c             return rb_file_expand_path(fname, dname);
rb_file_expand_path 4164 file.c         	fname = rb_file_expand_path(*filep, Qnil);
rb_file_expand_path 4218 file.c         	path = rb_file_expand_path(path, Qnil);
rb_file_expand_path  226 intern.h       VALUE rb_file_expand_path _((VALUE, VALUE));


rb_file_ftype

rb_file_ftype    1547 file.c             return rb_file_ftype(&st);
rb_file_ftype    3522 file.c             return rb_file_ftype(get_stat(obj));


rb_file_join

rb_file_join     2900 file.c         static VALUE rb_file_join _((VALUE ary, VALUE sep));
rb_file_join     2907 file.c             return rb_file_join(arg[0], arg[1]);
rb_file_join     2989 file.c             return rb_file_join(args, separator);


rb_file_open

rb_file_open     2354 ext/zlib/zlib.c     io = rb_file_open(RSTRING(filename)->ptr, mode);
rb_file_open      282 intern.h       VALUE rb_file_open _((const char*, const char*));
rb_file_open     3317 io.c           	return rb_file_open(fname, mode);
rb_file_open      854 ruby.c         	f = rb_file_open(fname, "r");


rb_file_open_internal

rb_file_open_internal 2746 io.c               return rb_file_open_internal(io_alloc(rb_cFile), fname, mode);
rb_file_open_internal 3138 io.c           	rb_file_open_internal(io, RSTRING(fname)->ptr, mode);


rb_file_s_basename

rb_file_s_basename 2895 file.c             return rb_assoc_new(rb_file_s_dirname(Qnil, path), rb_file_s_basename(1,&path));
rb_file_s_basename 4390 file.c             rb_define_singleton_method(rb_cFile, "basename", rb_file_s_basename, -1);


rb_file_s_dirname

rb_file_s_dirname 2895 file.c             return rb_assoc_new(rb_file_s_dirname(Qnil, path), rb_file_s_basename(1,&path));
rb_file_s_dirname 4391 file.c             rb_define_singleton_method(rb_cFile, "dirname", rb_file_s_dirname, 1);


rb_file_s_expand_path

rb_file_s_expand_path 4389 file.c             rb_define_singleton_method(rb_cFile, "expand_path", rb_file_s_expand_path, -1);
rb_file_s_expand_path  225 intern.h       VALUE rb_file_s_expand_path _((int, VALUE *));


rb_file_s_stat

rb_file_s_stat    779 file.c             return rb_file_s_stat(klass, fname);
rb_file_s_stat   4366 file.c             rb_define_singleton_method(rb_cFile, "stat",  rb_file_s_stat, 1);


rb_file_s_unlink

rb_file_s_unlink 4384 file.c             rb_define_singleton_method(rb_cFile, "unlink", rb_file_s_unlink, -2);
rb_file_s_unlink 4385 file.c             rb_define_singleton_method(rb_cFile, "delete", rb_file_s_unlink, -2);


rb_file_sysopen_internal

rb_file_sysopen_internal 2775 io.c               return rb_file_sysopen_internal(io_alloc(rb_cFile), fname, flags, mode);
rb_file_sysopen_internal 3134 io.c           	rb_file_sysopen_internal(io, RSTRING(fname)->ptr, flags, fmode);


rb_find_file

rb_find_file     6663 eval.c             tmp = rb_find_file(fname);
rb_find_file     6935 eval.c         	    if (*path = rb_find_file(fname)) return 'r';
rb_find_file     6946 eval.c         		*path = rb_find_file(tmp);
rb_find_file     6952 eval.c         	    if (*path = rb_find_file(tmp)) {
rb_find_file     6959 eval.c         	    if (*path = rb_find_file(fname)) return 's';
rb_find_file     6975 eval.c         	*path = rb_find_file(tmp);
rb_find_file      229 intern.h       VALUE rb_find_file _((VALUE));


rb_find_file_ext

rb_find_file_ext 6944 eval.c         	    if (rb_find_file_ext(&tmp, loadable_ext+1)) {
rb_find_file_ext 6963 eval.c             switch (type = rb_find_file_ext(&tmp, loadable_ext)) {
rb_find_file_ext  228 intern.h       int rb_find_file_ext _((VALUE*, const char* const*));


rb_fix2int

rb_fix2int        252 ruby.h         long rb_fix2int _((VALUE));
rb_fix2int        253 ruby.h         #define FIX2INT(x) rb_fix2int((VALUE)x)


rb_fix2str

rb_fix2str        628 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       3208 ext/win32ole/win32ole.c         rb_str_concat(str, rb_fix2str(INT2FIX(pTypeDesc->vt), 10));
rb_fix2str        296 intern.h       VALUE rb_fix2str _((VALUE, int));
rb_fix2str       1958 numeric.c          return rb_fix2str(x, base);
rb_fix2str        235 process.c          return rb_fix2str(pst_to_i(st), 10);


rb_fix2uint

rb_fix2uint       256 ruby.h         unsigned long rb_fix2uint _((VALUE));
rb_fix2uint       257 ruby.h         #define FIX2UINT(x) rb_fix2uint(x)


rb_float_new

rb_float_new      908 bignum.c           return rb_float_new(rb_big2dbl(x));
rb_float_new     1176 bignum.c       	return rb_float_new(rb_big2dbl(x) + RFLOAT(y)->value);
rb_float_new     1202 bignum.c       	return rb_float_new(rb_big2dbl(x) - RFLOAT(y)->value);
rb_float_new     1235 bignum.c       	return rb_float_new(rb_big2dbl(x) * RFLOAT(y)->value);
rb_float_new     1434 bignum.c       	return rb_float_new(rb_big2dbl(x) / RFLOAT(y)->value);
rb_float_new     1570 bignum.c           return rb_float_new(dx / dy);
rb_float_new     1626 bignum.c           return rb_float_new(pow(rb_big2dbl(x), d));
rb_float_new     2013 bignum.c       	return rb_float_new(rand_buf[0]);
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       66 ext/dl/dl.c    	val = rb_float_new(v);
rb_float_new       74 ext/dl/dl.c    	val = rb_float_new(v);
rb_float_new      374 ext/dl/ptr.c         rb_ary_push(ary, rb_float_new(((double*)(data->ptr))[i]));
rb_float_new      377 ext/dl/ptr.c         rb_ary_push(ary, rb_float_new(((float*)(data->ptr))[i]));
rb_float_new      665 ext/dl/ptr.c         elem = rb_float_new(*((float*)ptr));
rb_float_new      669 ext/dl/ptr.c         elem = rb_float_new(*((double*)ptr));
rb_float_new      703 ext/dl/ptr.c         elem = rb_float_new(*((float*)ptr));
rb_float_new      707 ext/dl/ptr.c         elem = rb_float_new(*((float*)ptr));
rb_float_new      860 ext/dl/sym.c       val = rb_float_new((double)(ANY2F(ret)));
rb_float_new      864 ext/dl/sym.c       val = rb_float_new((double)(ANY2D(ret)));
rb_float_new      908 ext/dl/sym.c   	rb_ary_push(dvals, rb_float_new(*((float*)(ANY2P(args[i])))));
rb_float_new      911 ext/dl/sym.c   	rb_ary_push(dvals, rb_float_new(*((double*)(ANY2P(args[i])))));
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     1000 ext/win32ole/win32ole.c             obj = rb_float_new(*V_R4REF(pvar));
rb_float_new     1002 ext/win32ole/win32ole.c             obj = rb_float_new(V_R4(pvar));
rb_float_new     1007 ext/win32ole/win32ole.c             obj = rb_float_new(*V_R8REF(pvar));
rb_float_new     1009 ext/win32ole/win32ole.c             obj = rb_float_new(V_R8(pvar));
rb_float_new      294 intern.h       VALUE rb_float_new _((double));
rb_float_new     1101 marshal.c      	    v = rb_float_new(d);
rb_float_new       40 math.c             return rb_float_new(atan2(RFLOAT(y)->value, RFLOAT(x)->value));
rb_float_new       58 math.c             return rb_float_new(cos(RFLOAT(x)->value));
rb_float_new       75 math.c             return rb_float_new(sin(RFLOAT(x)->value));
rb_float_new       92 math.c             return rb_float_new(tan(RFLOAT(x)->value));
rb_float_new      114 math.c             return rb_float_new(d);
rb_float_new      136 math.c             return rb_float_new(d);
rb_float_new      151 math.c             return rb_float_new(atan(RFLOAT(x)->value));
rb_float_new      176 math.c             return rb_float_new(cosh(RFLOAT(x)->value));
rb_float_new      201 math.c             return rb_float_new(sinh(RFLOAT(x)->value));
rb_float_new      226 math.c             return rb_float_new(tanh(RFLOAT(x)->value));
rb_float_new      248 math.c             return rb_float_new(d);
rb_float_new      263 math.c             return rb_float_new(asinh(RFLOAT(x)->value));
rb_float_new      285 math.c             return rb_float_new(d);
rb_float_new      300 math.c             return rb_float_new(exp(RFLOAT(x)->value));
rb_float_new      331 math.c             return rb_float_new(d);
rb_float_new      353 math.c             return rb_float_new(d);
rb_float_new      376 math.c             return rb_float_new(d);
rb_float_new      401 math.c             return rb_assoc_new(rb_float_new(d), INT2NUM(exp));
rb_float_new      419 math.c             return rb_float_new(ldexp(RFLOAT(x)->value, NUM2INT(n)));
rb_float_new      437 math.c             return rb_float_new(hypot(RFLOAT(x)->value, RFLOAT(y)->value));
rb_float_new      452 math.c             return rb_float_new(erf(RFLOAT(x)->value));
rb_float_new      467 math.c             return rb_float_new(erfc(RFLOAT(x)->value));
rb_float_new      484 math.c             rb_define_const(rb_mMath, "PI", rb_float_new(M_PI));
rb_float_new      486 math.c             rb_define_const(rb_mMath, "PI", rb_float_new(atan(1.0)*4.0));
rb_float_new      490 math.c             rb_define_const(rb_mMath, "E", rb_float_new(M_E));
rb_float_new      492 math.c             rb_define_const(rb_mMath, "E", rb_float_new(exp(1.0)));
rb_float_new      541 numeric.c          return rb_float_new(-RFLOAT(flt)->value);
rb_float_new      558 numeric.c      	return rb_float_new(RFLOAT(x)->value + (double)FIX2LONG(y));
rb_float_new      560 numeric.c      	return rb_float_new(RFLOAT(x)->value + rb_big2dbl(y));
rb_float_new      562 numeric.c      	return rb_float_new(RFLOAT(x)->value + RFLOAT(y)->value);
rb_float_new      582 numeric.c      	return rb_float_new(RFLOAT(x)->value - (double)FIX2LONG(y));
rb_float_new      584 numeric.c      	return rb_float_new(RFLOAT(x)->value - rb_big2dbl(y));
rb_float_new      586 numeric.c      	return rb_float_new(RFLOAT(x)->value - RFLOAT(y)->value);
rb_float_new      606 numeric.c      	return rb_float_new(RFLOAT(x)->value * (double)FIX2LONG(y));
rb_float_new      608 numeric.c      	return rb_float_new(RFLOAT(x)->value * rb_big2dbl(y));
rb_float_new      610 numeric.c      	return rb_float_new(RFLOAT(x)->value * RFLOAT(y)->value);
rb_float_new      634 numeric.c      	return rb_float_new(RFLOAT(x)->value / (double)f_y);
rb_float_new      637 numeric.c      	return rb_float_new(RFLOAT(x)->value / d);
rb_float_new      639 numeric.c      	return rb_float_new(RFLOAT(x)->value / RFLOAT(y)->value);
rb_float_new      704 numeric.c          return rb_float_new(mod);
rb_float_new      735 numeric.c          a = rb_float_new(div);
rb_float_new      736 numeric.c          b = rb_float_new(mod);
rb_float_new      754 numeric.c              return rb_float_new(pow(RFLOAT(x)->value, (double)FIX2LONG(y)));
rb_float_new      756 numeric.c      	return rb_float_new(pow(RFLOAT(x)->value, rb_big2dbl(y)));
rb_float_new      758 numeric.c              return rb_float_new(pow(RFLOAT(x)->value, RFLOAT(y)->value));
rb_float_new     1114 numeric.c          return rb_float_new(val);
rb_float_new     1482 numeric.c      	    rb_yield(rb_float_new(i*unit+beg));
rb_float_new     1989 numeric.c      	return rb_float_new((double)FIX2LONG(x) + RFLOAT(y)->value);
rb_float_new     2022 numeric.c      	return rb_float_new((double)FIX2LONG(x) - RFLOAT(y)->value);
rb_float_new     2057 numeric.c      	return rb_float_new((double)FIX2LONG(x) * RFLOAT(y)->value);
rb_float_new     2108 numeric.c      	return rb_float_new((double)FIX2LONG(x) / (double)FIX2LONG(y));
rb_float_new     2204 numeric.c      	return rb_float_new(pow((double)a, (double)b));
rb_float_new     2207 numeric.c              return rb_float_new(pow((double)a, RFLOAT(y)->value));
rb_float_new     2541 numeric.c          return rb_float_new(val);
rb_float_new     2897 numeric.c          rb_define_const(rb_cFloat, "MIN", rb_float_new(DBL_MIN));
rb_float_new     2898 numeric.c          rb_define_const(rb_cFloat, "MAX", rb_float_new(DBL_MAX));
rb_float_new     2899 numeric.c          rb_define_const(rb_cFloat, "EPSILON", rb_float_new(DBL_EPSILON));
rb_float_new      806 object.c           return rb_float_new(0.0);
rb_float_new     2349 object.c       	return rb_float_new((double)FIX2LONG(val));
rb_float_new     2355 object.c       	return rb_float_new(rb_big2dbl(val));
rb_float_new     2358 object.c       	return rb_float_new(rb_str_to_dbl(val, Qtrue));
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((double)tmp));
rb_float_new     1671 pack.c         		rb_ary_push(ary, rb_float_new(tmp));
rb_float_new     1683 pack.c         		rb_ary_push(ary, rb_float_new(tmp));
rb_float_new     1697 pack.c         		rb_ary_push(ary, rb_float_new((double)tmp));
rb_float_new     1711 pack.c         		rb_ary_push(ary, rb_float_new(tmp));
rb_float_new     7984 parse.c        		yylval.node = NEW_LIT(rb_float_new(d));
rb_float_new     3986 parse.y        		yylval.node = NEW_LIT(rb_float_new(d));
rb_float_new     3339 process.c      			 utime = rb_float_new((double)buf.tms_utime / HZ),
rb_float_new     3340 process.c      			 stime = rb_float_new((double)buf.tms_stime / HZ),
rb_float_new     3341 process.c      			 cutime = rb_float_new((double)buf.tms_cutime / HZ),
rb_float_new     3342 process.c      			 sctime = rb_float_new((double)buf.tms_cstime / HZ));
rb_float_new      473 random.c                           return rb_float_new(genrand_real());
rb_float_new      490 random.c       	return rb_float_new(genrand_real());
rb_float_new     2526 string.c           return rb_float_new(rb_str_to_dbl(str, Qfalse));
rb_float_new      898 time.c             return rb_float_new((double)tobj->tv.tv_sec+(double)tobj->tv.tv_usec/1e6);
rb_float_new     1366 time.c         	return rb_float_new(f);


rb_fopen

rb_fopen         2737 io.c               fptr->f = rb_fopen(fptr->path, rb_io_flags_mode(fptr->mode));
rb_fopen         3502 io.c           	fptr->f = rb_fopen(fptr->path, mode);
rb_fopen         4245 io.c           		FILE *fr = rb_fopen(fn, "r");
rb_fopen         4267 io.c           			fr = rb_fopen(RSTRING(str)->ptr, "r");
rb_fopen         4289 io.c           		    fw = rb_fopen(fn, "w");
rb_fopen           66 rubyio.h       FILE *rb_fopen _((const char*, const char*));


rb_frame_last_func

rb_frame_last_func  916 array.c            rb_warn("Array#%s is deprecated; use Array#values_at", rb_id2name(rb_frame_last_func()));
rb_frame_last_func  628 hash.c         	    rb_id2name(rb_frame_last_func()));
rb_frame_last_func 2279 hash.c         	    rb_id2name(rb_frame_last_func()));
rb_frame_last_func  172 intern.h       ID rb_frame_last_func _((void));


rb_free_generic_ivar

rb_free_generic_ivar 1150 gc.c           	rb_free_generic_ivar((VALUE)obj);
rb_free_generic_ivar  466 intern.h       void rb_free_generic_ivar _((VALUE));


rb_frozen_class_p

rb_frozen_class_p  377 class.c            rb_frozen_class_p(klass);
rb_frozen_class_p 1967 eval.c             rb_frozen_class_p(klass);
rb_frozen_class_p 2068 eval.c             rb_frozen_class_p(klass);
rb_frozen_class_p 3821 eval.c         	    rb_frozen_class_p(ruby_class);
rb_frozen_class_p  119 intern.h       void rb_frozen_class_p _((VALUE));


rb_funcall

rb_funcall       1594 array.c            retval = rb_funcall(a, id_cmp, 1, b);
rb_funcall       2596 array.c        	VALUE v = rb_funcall(rb_ary_elt(ary1, i), id_cmp, 1, rb_ary_elt(ary2, i));
rb_funcall        206 class.c            return rb_funcall(super, rb_intern("inherited"), 1, klass);
rb_funcall         31 compar.c           if (RTEST(rb_funcall(val, '>', 1, INT2FIX(0)))) return 1;
rb_funcall         32 compar.c           if (RTEST(rb_funcall(val, '<', 1, INT2FIX(0)))) return -1;
rb_funcall         59 compar.c           VALUE c = rb_funcall(a[0], cmp, 1, a[1]);
rb_funcall        105 compar.c           VALUE c = rb_funcall(x, cmp, 1, y);
rb_funcall        124 compar.c           VALUE c = rb_funcall(x, cmp, 1, y);
rb_funcall        143 compar.c           VALUE c = rb_funcall(x, cmp, 1, y);
rb_funcall        163 compar.c           VALUE c = rb_funcall(x, cmp, 1, y);
rb_funcall       1374 dir.c              VALUE dir = rb_funcall(rb_cDir, rb_intern("open"), 1, path);
rb_funcall         24 enum.c             return rb_funcall(obj, id_each, 0, 0);
rb_funcall         31 enum.c             if (RTEST(rb_funcall(arg[0], id_eqq, 1, i))) {
rb_funcall         41 enum.c             if (RTEST(rb_funcall(arg[0], id_eqq, 1, i))) {
rb_funcall        122 enum.c         	return rb_funcall(if_none, rb_intern("call"), 0, 0);
rb_funcall        400 enum.c             return rb_cmpint(rb_funcall(a, id_cmp, 1, b), a, b);
rb_funcall        614 enum.c         	cmp = rb_funcall(i, id_cmp, 1, *memo);
rb_funcall        692 enum.c         	cmp = rb_funcall(i, id_cmp, 1, *memo);
rb_funcall        321 error.c            return rb_funcall(etype, rb_intern("new"), 1, rb_str_new(ptr, len));
rb_funcall        426 error.c            return rb_funcall(exc, rb_intern("to_s"), 0, 0);
rb_funcall        401 eval.c         	    rb_funcall(rb_iv_get(klass, "__attached__"), singleton_added, 1, ID2SYM(mid));
rb_funcall        404 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       1156 eval.c             info = rb_funcall(info, rb_intern("backtrace"), 0);
rb_funcall       1165 eval.c             rb_funcall(info, rb_intern("set_backtrace"), 1, bt);
rb_funcall       1207 eval.c           	e = rb_funcall(ruby_errinfo, rb_intern("message"), 0, 0);
rb_funcall       1994 eval.c         	rb_funcall(rb_iv_get(klass, "__attached__"),
rb_funcall       1998 eval.c         	rb_funcall(klass, undefined, 1, ID2SYM(id));
rb_funcall       2102 eval.c         	rb_funcall(singleton, singleton_added, 1, ID2SYM(name));
rb_funcall       2105 eval.c         	rb_funcall(klass, added, 1, ID2SYM(name));
rb_funcall       2750 eval.c         	    val = rb_funcall(val, id, 0);
rb_funcall       2892 eval.c         		result = rb_funcall(l, match, 1, r);
rb_funcall       3496 eval.c         		val = rb_funcall(val, node->nd_mid, 1, rb_eval(self, rval));
rb_funcall       3510 eval.c         	    val = rb_funcall(recv, id, 0);
rb_funcall       3521 eval.c         		val = rb_funcall(val, node->nd_next->nd_mid, 1,
rb_funcall       3658 eval.c         		result = rb_funcall(klass, node->nd_mid, 0, 0);
rb_funcall       3778 eval.c         		result = rb_funcall(self, '`', 1, str);
rb_funcall       3791 eval.c         	result = rb_funcall(self, '`', 1, rb_str_new3(node->nd_lit));
rb_funcall       4599 eval.c         	mesg = rb_funcall(argv[0], exception, n, argv[1]);
rb_funcall       5251 eval.c         	if (RTEST(rb_funcall(*argv, eqq, 1, ruby_errinfo))) return 1;
rb_funcall       5494 eval.c         	args[n++] = rb_funcall(rb_const_get(exc, rb_intern("message")), '!',
rb_funcall       7388 eval.c         	rb_funcall(argv[argc], rb_intern("append_features"), 1, module);
rb_funcall       7389 eval.c         	rb_funcall(argv[argc], rb_intern("included"), 1, module);
rb_funcall       7485 eval.c         	rb_funcall(argv[argc], rb_intern("extend_object"), 1, obj);
rb_funcall       7486 eval.c         	rb_funcall(argv[argc], rb_intern("extended"), 1, obj);
rb_funcall       12836 eval.c             return rb_funcall(Qnil, rb_intern("catch"), 1, tag);
rb_funcall        467 ext/dbm/dbm.c      return rb_funcall(obj, rb_intern("each_pair"), 0, 0);
rb_funcall        438 ext/dl/dl.c            e = rb_funcall(e, rb_intern("to_ptr"), 0);
rb_funcall        507 ext/dl/dl.c          val0 = rb_funcall(val0, rb_intern("to_ptr"), 0);
rb_funcall         22 ext/dl/ptr.c     return rb_funcall(hash, rb_intern("delete"), 1, key);
rb_funcall        490 ext/dl/sym.c   	    pval = rb_funcall(argv[i], rb_intern("to_ptr"), 0);
rb_funcall         66 ext/enumerator/enumerator.c     return rb_funcall(rb_cEnumerator, id_new, 2, obj, sym_each_with_index);
rb_funcall        133 ext/enumerator/enumerator.c     return rb_funcall(rb_cEnumerator, id_new, 3, obj, sym_each_slice, n);
rb_funcall        200 ext/enumerator/enumerator.c     return rb_funcall(rb_cEnumerator, id_new, 3, obj, sym_each_cons, n);
rb_funcall        570 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        190 ext/openssl/ossl_ssl.c     ary = rb_funcall(cb, rb_intern("call"), 1, obj);
rb_funcall        227 ext/openssl/ossl_ssl.c     dh = rb_funcall(cb, rb_intern("call"), 3, args[0], args[1], args[2]);
rb_funcall        520 ext/openssl/ossl_ssl.c         ctx = rb_funcall(cSSLContext, rb_intern("new"), 0);
rb_funcall        665 ext/openssl/ossl_ssl.c         return rb_funcall(ossl_ssl_get_io(self), id_sysread, 2, len, str);
rb_funcall        709 ext/openssl/ossl_ssl.c 	return rb_funcall(ossl_ssl_get_io(self), id_syswrite, 1, str);
rb_funcall        724 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        158 ext/readline/readline.c     ary = rb_funcall(proc, rb_intern("call"), 1, rb_tainted_str_new2(text));
rb_funcall        446 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       1082 ext/syck/rubyext.c         type = rb_funcall( self, s_detect_implicit, 1, val );
rb_funcall       1121 ext/syck/rubyext.c                          RTEST( rb_funcall( target_class, s_tag_subclasses, 0 ) ) )
rb_funcall       1125 ext/syck/rubyext.c                         subclass = rb_funcall( target_class, s_tag_read_class, 1, subclass );
rb_funcall       1150 ext/syck/rubyext.c             obj = rb_funcall( target_class, s_call, 2, type, val );
rb_funcall       1156 ext/syck/rubyext.c                 obj = rb_funcall( target_class, s_yaml_new, 3, subclass, type, val );
rb_funcall       1163 ext/syck/rubyext.c                     rb_funcall( obj, s_yaml_initialize, 2, type, val );
rb_funcall       1177 ext/syck/rubyext.c                     obj = rb_funcall( cPrivateType, s_new, 2, name, val );
rb_funcall       1183 ext/syck/rubyext.c                     obj = rb_funcall( cDomainType, s_new, 3, domain, name, val );
rb_funcall       1244 ext/syck/rubyext.c         obj = rb_funcall( self, s_transfer, 2, rb_str_new2( n->type_id ), obj );
rb_funcall       1291 ext/syck/rubyext.c             obj = rb_funcall( cScalar, s_new, 3, t, v, style );
rb_funcall       1306 ext/syck/rubyext.c             obj = rb_funcall( cSeq, s_new, 3, t, v, style );
rb_funcall       1320 ext/syck/rubyext.c             obj = rb_funcall( cMap, s_new, 3, t, v, style );
rb_funcall       1347 ext/syck/rubyext.c     VALUE val = rb_funcall( str1, s_cmp, 1, str2 );
rb_funcall       1440 ext/syck/rubyext.c     rb_funcall( self, s_type_id_set, 1, type_id );
rb_funcall       1441 ext/syck/rubyext.c     rb_funcall( self, s_value_set, 1, val );
rb_funcall       1442 ext/syck/rubyext.c     rb_funcall( self, s_style_set, 1, style );
rb_funcall       1530 ext/syck/rubyext.c     rb_funcall( self, s_type_id_set, 1, type_id );
rb_funcall       1531 ext/syck/rubyext.c     rb_funcall( self, s_value_set, 1, val );
rb_funcall       1532 ext/syck/rubyext.c     rb_funcall( self, s_style_set, 1, style );
rb_funcall       1572 ext/syck/rubyext.c         val = rb_funcall( emitter, s_node_export, 1, val );
rb_funcall       1638 ext/syck/rubyext.c         keys = rb_funcall( hsh, s_keys, 0 );
rb_funcall       1647 ext/syck/rubyext.c     rb_funcall( self, s_type_id_set, 1, type_id );
rb_funcall       1648 ext/syck/rubyext.c     rb_funcall( self, s_value_set, 1, val );
rb_funcall       1649 ext/syck/rubyext.c     rb_funcall( self, s_style_set, 1, style );
rb_funcall       1674 ext/syck/rubyext.c         keys = rb_funcall( hsh, s_keys, 0 );
rb_funcall       1698 ext/syck/rubyext.c         key = rb_funcall( emitter, s_node_export, 1, key );
rb_funcall       1699 ext/syck/rubyext.c         val = rb_funcall( emitter, s_node_export, 1, val );
rb_funcall       1796 ext/syck/rubyext.c                     syck_map_add( n, rb_funcall( syck_map_read( orig_n, map_key, i ), s_transform, 0 ),
rb_funcall       1797 ext/syck/rubyext.c                                      rb_funcall( syck_map_read( orig_n, map_value, i ), s_transform, 0 ) );
rb_funcall       1808 ext/syck/rubyext.c                     syck_seq_add( n, rb_funcall( syck_seq_read( orig_n, i ), s_transform, 0 ) );
rb_funcall       1827 ext/syck/rubyext.c     return rb_funcall( oDefaultResolver, s_node_import, 1, t );
rb_funcall       1957 ext/syck/rubyext.c     rb_ivar_set( pobj, s_out, rb_funcall( cOut, s_new, 1, pobj ) );
rb_funcall       2029 ext/syck/rubyext.c     if ( !NIL_P( oid ) && RTEST( rb_funcall( bonus->data, s_haskey, 1, oid ) ) ) {
rb_funcall       2032 ext/syck/rubyext.c         symple = rb_funcall( proc, s_call, 1, rb_ivar_get( self, s_out ) );
rb_funcall       2057 ext/syck/rubyext.c     return rb_funcall( node, s_to_yaml, 1, self );
rb_funcall       2095 ext/syck/rubyext.c     map = rb_funcall( cMap, s_new, 3, type_id, rb_hash_new(), style );
rb_funcall       2114 ext/syck/rubyext.c     seq = rb_funcall( cSeq, s_new, 3, type_id, rb_ary_new(), style );
rb_funcall       2135 ext/syck/rubyext.c     scalar = rb_funcall( cScalar, s_new, 3, type_id, str, style );
rb_funcall       2229 ext/syck/rubyext.c     oDefaultResolver = rb_funcall( cResolver, rb_intern( "new" ), 0 );
rb_funcall       2234 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        445 ext/win32ole/win32ole.c     y = FIX2INT(rb_funcall(tmobj, rb_intern("year"), 0));
rb_funcall        446 ext/win32ole/win32ole.c     m = FIX2INT(rb_funcall(tmobj, rb_intern("month"), 0));
rb_funcall        447 ext/win32ole/win32ole.c     d = FIX2INT(rb_funcall(tmobj, rb_intern("mday"), 0));
rb_funcall        448 ext/win32ole/win32ole.c     hh = FIX2INT(rb_funcall(tmobj, rb_intern("hour"), 0));
rb_funcall        449 ext/win32ole/win32ole.c     mm = FIX2INT(rb_funcall(tmobj, rb_intern("min"), 0));
rb_funcall        450 ext/win32ole/win32ole.c     ss = FIX2INT(rb_funcall(tmobj, rb_intern("sec"), 0));
rb_funcall       1764 ext/win32ole/win32ole.c         helpfile = rb_funcall(target, rb_intern("helpfile"), 0);
rb_funcall       1770 ext/win32ole/win32ole.c         helpcontext = rb_funcall(target, rb_intern("helpcontext"), 0);
rb_funcall       2024 ext/win32ole/win32ole.c         cNamedArgs = NUM2INT(rb_funcall(param, rb_intern("length"), 0));
rb_funcall       5981 ext/win32ole/win32ole.c         = NUM2INT(rb_funcall(ary_ole_event, rb_intern("length"), 0));
rb_funcall       1807 ext/zlib/zlib.c 	rb_funcall(io, id_close, 0);
rb_funcall       1820 ext/zlib/zlib.c 	rb_funcall(gz->io, id_write, 1, str);
rb_funcall       1823 ext/zlib/zlib.c 	    rb_funcall(gz->io, id_flush, 0);
rb_funcall       1833 ext/zlib/zlib.c     str = rb_funcall(gz->io, id_read, 1, INT2FIX(GZFILE_READ_SIZE));
rb_funcall       2256 ext/zlib/zlib.c     rb_funcall(gz->io, id_seek, 2, rb_int2inum(-n), INT2FIX(1));
rb_funcall       2756 ext/zlib/zlib.c 	rb_funcall(gz->io, id_flush, 0);
rb_funcall         84 hash.c             return rb_funcall(obj, id_hash, 0);
rb_funcall        104 hash.c         	hval = rb_funcall(a, id_hash, 0);
rb_funcall        106 hash.c         	    hval = rb_funcall(hval, '%', 1, INT2FIX(536870923));
rb_funcall        420 hash.c         	return rb_funcall(hash, id_default, 1, key);
rb_funcall        511 hash.c         	return rb_funcall(RHASH(hash)->ifnone, id_call, 2, hash, key);
rb_funcall        722 hash.c         	return rb_funcall(RHASH(hash)->ifnone, id_call, 2, hash, Qnil);
rb_funcall        554 io.c           	return rb_funcall(io, id_write, 1, str);
rb_funcall        574 io.c               return rb_funcall(io, id_write, 1, str);
rb_funcall       2157 io.c               return rb_funcall(io, rb_intern("close"), 0, 0);
rb_funcall        507 marshal.c      	    v = rb_funcall(obj, s_mdump, 0, 0);
rb_funcall        516 marshal.c      	    v = rb_funcall(obj, s_dump, 1, INT2NUM(limit));
rb_funcall        661 marshal.c      		v = rb_funcall(obj, s_dump_data, 0);
rb_funcall       1241 marshal.c      	    v = rb_funcall(klass, s_load, 1, data);
rb_funcall       1264 marshal.c      	    rb_funcall(v, s_mload, 1, data);
rb_funcall       1290 marshal.c      	       v = rb_funcall(klass, s_alloc, 0);
rb_funcall       1304 marshal.c                 rb_funcall(v, s_load_data, 1, r_object0(arg, 0, 0, extmod));
rb_funcall       1347 marshal.c      	rb_funcall(proc, rb_intern("call"), 1, v);
rb_funcall        112 numeric.c          return rb_funcall(x[1], id_coerce, 1, x[0]);
rb_funcall        157 numeric.c          return rb_funcall(x, ruby_frame->orig_func, 1, y);
rb_funcall        165 numeric.c      	return rb_funcall(x, ruby_frame->orig_func, 1, y);
rb_funcall        176 numeric.c      	NIL_P(c = rb_funcall(x, ruby_frame->orig_func, 1, y))) {
rb_funcall        241 numeric.c          return rb_funcall(zero, '-', 1, num);
rb_funcall        255 numeric.c          return rb_funcall(x, '/', 1, y);
rb_funcall        272 numeric.c          return rb_Integer(rb_funcall(x, '/', 1, y));
rb_funcall        321 numeric.c          return rb_assoc_new(num_div(x, y), rb_funcall(x, '%', 1, y));
rb_funcall        336 numeric.c          return rb_funcall(x, '%', 1, y);
rb_funcall        355 numeric.c          VALUE z = rb_funcall(x, '%', 1, y);
rb_funcall        358 numeric.c      	((RTEST(rb_funcall(x, '<', 1, INT2FIX(0))) &&
rb_funcall        359 numeric.c      	  RTEST(rb_funcall(y, '>', 1, INT2FIX(0)))) ||
rb_funcall        360 numeric.c      	 (RTEST(rb_funcall(x, '>', 1, INT2FIX(0))) &&
rb_funcall        361 numeric.c      	  RTEST(rb_funcall(y, '<', 1, INT2FIX(0)))))) {
rb_funcall        362 numeric.c      	return rb_funcall(z, '-', 1, y);
rb_funcall        397 numeric.c          if (RTEST(rb_funcall(num, '<', 1, INT2FIX(0)))) {
rb_funcall        398 numeric.c      	return rb_funcall(num, rb_intern("-@"), 0);
rb_funcall        438 numeric.c          if (RTEST(rb_funcall(num, rb_intern("zero?"), 0, 0))) {
rb_funcall        456 numeric.c          return rb_funcall(num, id_to_i, 0, 0);
rb_funcall        806 numeric.c          return rb_funcall(y, id_eq, 1, x);
rb_funcall       1489 numeric.c      	if (RTEST(rb_funcall(step, '>', 1, INT2FIX(0)))) {
rb_funcall       1496 numeric.c      	    if (RTEST(rb_funcall(i, cmp, 1, to))) break;
rb_funcall       1498 numeric.c      	    i = rb_funcall(i, '+', 1, step);
rb_funcall       1602 numeric.c          if (RTEST(rb_funcall(INT2FIX(0), '<', 1, val))) {
rb_funcall       1773 numeric.c          return rb_funcall(num, '+', 1, INT2FIX(1));
rb_funcall       1851 numeric.c             return rb_funcall(x, id_to_i, 0);
rb_funcall       1872 numeric.c             return rb_funcall(x, rb_intern("to_f"), 0);
rb_funcall       2664 numeric.c      	while (!(c = rb_funcall(i, '>', 1, to))) {
rb_funcall       2666 numeric.c      	    i = rb_funcall(i, '+', 1, INT2FIX(1));
rb_funcall       2703 numeric.c      	while (!(c = rb_funcall(i, '<', 1, to))) {
rb_funcall       2705 numeric.c      	    i = rb_funcall(i, '-', 1, INT2FIX(1));
rb_funcall       2744 numeric.c      	    if (!RTEST(rb_funcall(i, '<', 1, num))) break;
rb_funcall       2746 numeric.c      	    i = rb_funcall(i, '+', 1, INT2FIX(1));
rb_funcall         52 object.c           result = rb_funcall(obj1, id_eq, 1, obj2);
rb_funcall         61 object.c           return RTEST(rb_funcall(obj1, id_eql, 1, obj2));
rb_funcall        228 object.c           rb_funcall(dest, id_init_copy, 1, obj);
rb_funcall        374 object.c           return rb_obj_as_string(rb_funcall(obj, id_inspect, 0, 0));
rb_funcall        456 object.c           return rb_funcall(obj, rb_intern("to_s"), 0, 0);
rb_funcall       1569 object.c           obj = rb_funcall(klass, ID_ALLOCATOR, 0, 0);
rb_funcall       2133 object.c           return rb_funcall(val, m, 0);
rb_funcall       9493 parse.c        	node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0);
rb_funcall       5495 parse.y        	node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0);
rb_funcall         38 prec.c             return rb_funcall(klass, prc_if, 1, x);
rb_funcall         55 prec.c             return rb_funcall(x, prc_pr, 1, klass);
rb_funcall         72 prec.c             return rb_funcall(x, prc_pr, 1, klass);
rb_funcall         32 range.c            return rb_funcall(args[0], id_cmp, 1, args[1]);
rb_funcall        146 range.c            VALUE r = rb_funcall(a, id_cmp, 1, b);
rb_funcall        158 range.c            VALUE r = rb_funcall(a, id_cmp, 1, b);
rb_funcall        244 range.c        	    v = rb_funcall(v, id_succ, 0, 0);
rb_funcall        251 range.c        	    v = rb_funcall(v, id_succ, 0, 0);
rb_funcall        344 range.c        	    while (RTEST(rb_funcall(b, c, 1, e))) {
rb_funcall        346 range.c        		b = rb_funcall(b, '+', 1, step);
rb_funcall        520 ruby.h         VALUE rb_funcall __((VALUE, ID, int, ...));
rb_funcall        300 string.c           str = rb_funcall(obj, id_to_s, 0);
rb_funcall       1012 string.c       	    VALUE tmp = rb_funcall(str2, rb_intern("<=>"), 1, str1);
rb_funcall       1016 string.c       		return rb_funcall(LONG2FIX(0), '-', 1, tmp);
rb_funcall       1304 string.c       	return rb_funcall(y, rb_intern("=~"), 1, x);
rb_funcall       1329 string.c           return rb_funcall(get_pat(re, 0), rb_intern("match"), 1, str);
rb_funcall       1456 string.c           after_end = rb_funcall(end, succ, 0, 0);
rb_funcall       1461 string.c       	current = rb_funcall(current, succ, 0, 0);
rb_funcall       4439 string.c       	    sum = rb_funcall(sum, '+', 1, INT2FIX((unsigned char)*p));
rb_funcall       4445 string.c       	    mod = rb_funcall(INT2FIX(1), rb_intern("<<"), 1, INT2FIX(bits));
rb_funcall       4446 string.c       	    mod = rb_funcall(mod, '-', 1, INT2FIX(1));
rb_funcall       4447 string.c       	    sum = rb_funcall(sum, '&', 1, mod);
rb_funcall       1219 variable.c         return rb_funcall(klass, rb_intern("const_missing"), 1, ID2SYM(id));


rb_funcall2

rb_funcall2      1764 eval.c         	    val = rb_funcall2(cmd, rb_intern("call"), RARRAY(arg)->len, RARRAY(arg)->ptr);
rb_funcall2      3005 eval.c         			    if (RTEST(rb_funcall2(RARRAY(v)->ptr[i], eqq, 1, &val))){
rb_funcall2      3013 eval.c         		    if (RTEST(rb_funcall2(rb_eval(self, tag->nd_head), eqq, 1, &val))) {
rb_funcall2      3485 eval.c         	    val = rb_funcall2(recv, aref, argc-1, argv);
rb_funcall2      3499 eval.c         	    rb_funcall2(recv, aset, argc, argv);
rb_funcall2      3525 eval.c         	    rb_funcall2(recv, node->nd_next->nd_aid, 1, &val);
rb_funcall2      4118 eval.c         	return rb_funcall2(obj, respond_to, n, args);
rb_funcall2      5533 eval.c             return rb_funcall2(obj, missing, argc+1, nargv);
rb_funcall2      7401 eval.c             rb_funcall2(obj, init, argc, argv);
rb_funcall2       139 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      1843 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       306 ext/win32ole/win32ole.c     v = rb_funcall2(p->obj, dispIdMember, args, parg);
rb_funcall2       758 marshal.c      	    rb_funcall2(port, s_binmode, 0, 0);
rb_funcall2       808 marshal.c      	VALUE v = rb_funcall2(src, s_getc, 0, 0);
rb_funcall2       888 marshal.c      	str = rb_funcall2(src, s_read, 1, &n);
rb_funcall2      1402 marshal.c      	    rb_funcall2(port, s_binmode, 0, 0);
rb_funcall2       521 ruby.h         VALUE rb_funcall2 _((VALUE, ID, int, const VALUE*));


rb_funcall3

rb_funcall3      1059 ext/openssl/ossl_asn1.c { return rb_funcall3(cASN1##klass, rb_intern("new"), argc, argv); }
rb_funcall3      4186 io.c               return rb_funcall3(current_file, ruby_frame->last_func,
rb_funcall3      4203 io.c           	rb_funcall3(file, rb_intern("close"), 0, 0);
rb_funcall3      4400 io.c           	line = rb_funcall3(current_file, rb_intern("gets"), argc, argv);
rb_funcall3      4469 io.c           	return rb_funcall3(rb_stdin, rb_intern("getc"), 0, 0);
rb_funcall3      5318 io.c           	byte = rb_funcall3(current_file, rb_intern("getc"), 0, 0);
rb_funcall3       522 ruby.h         VALUE rb_funcall3 _((VALUE, ID, int, const VALUE*));


rb_gc

rb_gc             283 dir.c          	    rb_gc();
rb_gc             168 ext/iconv/iconv.c 	    rb_gc();
rb_gc             871 ext/socket/socket.c 	    rb_gc();
rb_gc            1329 ext/socket/socket.c 	    rb_gc();
rb_gc            2039 ext/socket/socket.c 	    rb_gc();
rb_gc            1434 gc.c               rb_gc();
rb_gc             245 intern.h       void rb_gc _((void));
rb_gc             305 io.c           	    rb_gc();
rb_gc            2648 io.c           	    rb_gc();
rb_gc            2668 io.c           	    rb_gc();
rb_gc            2702 io.c           	    rb_gc();
rb_gc             952 ruby.c                 rb_gc();


rb_gc_call_finalizer_at_exit

rb_gc_call_finalizer_at_exit 1488 eval.c             rb_gc_call_finalizer_at_exit();
rb_gc_call_finalizer_at_exit  248 intern.h       void rb_gc_call_finalizer_at_exit _((void));


rb_gc_copy_finalizer

rb_gc_copy_finalizer  246 intern.h       void rb_gc_copy_finalizer _((VALUE,VALUE));
rb_gc_copy_finalizer  215 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    1920 gc.c               rb_define_singleton_method(rb_mGC, "disable", rb_gc_disable, 0);
rb_gc_disable     250 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     1919 gc.c               rb_define_singleton_method(rb_mGC, "enable", rb_gc_enable, 0);
rb_gc_enable      249 intern.h       VALUE rb_gc_enable _((void));


rb_gc_finalize_deferred

rb_gc_finalize_deferred 5655 eval.c         	rb_gc_finalize_deferred();
rb_gc_finalize_deferred 1418 gc.c               rb_gc_finalize_deferred();
rb_gc_finalize_deferred  247 intern.h       void rb_gc_finalize_deferred _((void));


rb_gc_force_recycle

rb_gc_force_recycle 1048 eval.c         	    rb_gc_force_recycle((VALUE)ruby_scope);\
rb_gc_force_recycle 4932 eval.c         	    rb_gc_force_recycle((VALUE)ruby_dyna_vars);
rb_gc_force_recycle 4935 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  244 intern.h       void rb_gc_force_recycle _((VALUE));
rb_gc_force_recycle 5870 parse.c        			    rb_gc_force_recycle((VALUE)yyvsp[-1].node);
rb_gc_force_recycle 6617 parse.c        	rb_gc_force_recycle((VALUE)tmp);
rb_gc_force_recycle 7025 parse.c            rb_gc_force_recycle(str);
rb_gc_force_recycle 7233 parse.c            rb_gc_force_recycle((VALUE)here);
rb_gc_force_recycle 7366 parse.c        		rb_gc_force_recycle((VALUE)lex_strterm);
rb_gc_force_recycle 8693 parse.c        	    rb_gc_force_recycle((VALUE)tail);
rb_gc_force_recycle 8704 parse.c        	    rb_gc_force_recycle((VALUE)head);
rb_gc_force_recycle 10296 parse.c        	    rb_gc_force_recycle((VALUE)n);
rb_gc_force_recycle 2114 parse.y        			    rb_gc_force_recycle((VALUE)$3);
rb_gc_force_recycle 2619 parse.y        	rb_gc_force_recycle((VALUE)tmp);
rb_gc_force_recycle 3027 parse.y            rb_gc_force_recycle(str);
rb_gc_force_recycle 3235 parse.y            rb_gc_force_recycle((VALUE)here);
rb_gc_force_recycle 3368 parse.y        		rb_gc_force_recycle((VALUE)lex_strterm);
rb_gc_force_recycle 4695 parse.y        	    rb_gc_force_recycle((VALUE)tail);
rb_gc_force_recycle 4706 parse.y        	    rb_gc_force_recycle((VALUE)head);
rb_gc_force_recycle 6298 parse.y        	    rb_gc_force_recycle((VALUE)n);
rb_gc_force_recycle  368 ruby.c             rb_gc_force_recycle((VALUE)save[2]);
rb_gc_force_recycle 1326 variable.c     		rb_gc_force_recycle(val);
rb_gc_force_recycle 1377 variable.c     	    rb_gc_force_recycle(val);


rb_gc_mark

rb_gc_mark       7625 eval.c         	rb_gc_mark(link->data);
rb_gc_mark       7630 eval.c         	rb_gc_mark(link->data);
rb_gc_mark       7635 eval.c         	rb_gc_mark(link->data);
rb_gc_mark       7985 eval.c         	rb_gc_mark((VALUE)data->scope);
rb_gc_mark       7986 eval.c         	rb_gc_mark((VALUE)data->var);
rb_gc_mark       7987 eval.c         	rb_gc_mark((VALUE)data->body);
rb_gc_mark       7988 eval.c         	rb_gc_mark((VALUE)data->self);
rb_gc_mark       7989 eval.c         	rb_gc_mark((VALUE)data->dyna_vars);
rb_gc_mark       7990 eval.c         	rb_gc_mark((VALUE)data->cref);
rb_gc_mark       7991 eval.c         	rb_gc_mark(data->wrapper);
rb_gc_mark       7992 eval.c         	rb_gc_mark(data->block_obj);
rb_gc_mark       8742 eval.c             rb_gc_mark(data->rklass);
rb_gc_mark       8743 eval.c             rb_gc_mark(data->klass);
rb_gc_mark       8744 eval.c             rb_gc_mark(data->recv);
rb_gc_mark       8745 eval.c             rb_gc_mark((VALUE)data->body);
rb_gc_mark       9907 eval.c             rb_gc_mark((VALUE)frame->node);
rb_gc_mark       9918 eval.c             rb_gc_mark(th->result);
rb_gc_mark       9919 eval.c             rb_gc_mark(th->thread);
rb_gc_mark       9920 eval.c             if (th->join) rb_gc_mark(th->join->thread);
rb_gc_mark       9922 eval.c             rb_gc_mark(th->klass);
rb_gc_mark       9923 eval.c             rb_gc_mark(th->wrapper);
rb_gc_mark       9924 eval.c             rb_gc_mark((VALUE)th->cref);
rb_gc_mark       9926 eval.c             rb_gc_mark((VALUE)th->scope);
rb_gc_mark       9927 eval.c             rb_gc_mark((VALUE)th->dyna_vars);
rb_gc_mark       9928 eval.c             rb_gc_mark(th->errinfo);
rb_gc_mark       9929 eval.c             rb_gc_mark(th->last_status);
rb_gc_mark       9930 eval.c             rb_gc_mark(th->last_line);
rb_gc_mark       9931 eval.c             rb_gc_mark(th->last_match);
rb_gc_mark       9933 eval.c             rb_gc_mark(th->thgroup);
rb_gc_mark       9979 eval.c             rb_gc_mark((VALUE)ruby_cref);
rb_gc_mark       9983 eval.c         	rb_gc_mark(th->thread);
rb_gc_mark         62 ext/stringio/stringio.c 	rb_gc_mark(ptr->string);
rb_gc_mark        171 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       1402 ext/syck/rubyext.c                 rb_gc_mark( syck_seq_read( n, i ) );
rb_gc_mark       1409 ext/syck/rubyext.c                 rb_gc_mark( syck_map_read( n, map_key, i ) );
rb_gc_mark       1410 ext/syck/rubyext.c                 rb_gc_mark( syck_map_read( n, map_value, i ) );
rb_gc_mark       1923 ext/syck/rubyext.c     rb_gc_mark( bonus->oid  );
rb_gc_mark       1924 ext/syck/rubyext.c     rb_gc_mark( bonus->data );
rb_gc_mark       1925 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        812 ext/zlib/zlib.c     rb_gc_mark(z->buf);
rb_gc_mark        813 ext/zlib/zlib.c     rb_gc_mark(z->input);
rb_gc_mark       1740 ext/zlib/zlib.c     rb_gc_mark(gz->io);
rb_gc_mark       1741 ext/zlib/zlib.c     rb_gc_mark(gz->orig_name);
rb_gc_mark       1742 ext/zlib/zlib.c     rb_gc_mark(gz->comment);
rb_gc_mark        243 intern.h       void rb_gc_mark _((VALUE));
rb_gc_mark       9783 parse.c            rb_gc_mark((VALUE)parser_heap);
rb_gc_mark       9791 parse.c            rb_gc_mark(ruby_debug_lines);
rb_gc_mark       9792 parse.c            rb_gc_mark(lex_lastline);
rb_gc_mark       9793 parse.c            rb_gc_mark(lex_input);
rb_gc_mark       9794 parse.c            rb_gc_mark((VALUE)lex_strterm);
rb_gc_mark       5785 parse.y            rb_gc_mark((VALUE)parser_heap);
rb_gc_mark       5793 parse.y            rb_gc_mark(ruby_debug_lines);
rb_gc_mark       5794 parse.y            rb_gc_mark(lex_lastline);
rb_gc_mark       5795 parse.y            rb_gc_mark(lex_input);
rb_gc_mark       5796 parse.y            rb_gc_mark((VALUE)lex_strterm);
rb_gc_mark        319 signal.c       	    rb_gc_mark(trap_list[i].cmd);
rb_gc_mark        947 variable.c         rb_gc_mark(value);


rb_gc_mark_frame

rb_gc_mark_frame   31 env.h          void rb_gc_mark_frame _((struct FRAME *));
rb_gc_mark_frame 7984 eval.c         	rb_gc_mark_frame(&data->frame);
rb_gc_mark_frame 9892 eval.c         # define MARK_FRAME_ADJ(f) rb_gc_mark_frame(f)
rb_gc_mark_frame 1334 gc.c           	rb_gc_mark_frame(frame);
rb_gc_mark_frame 1338 gc.c           		rb_gc_mark_frame(tmp);


rb_gc_mark_global_tbl

rb_gc_mark_global_tbl 1392 gc.c               rb_gc_mark_global_tbl();
rb_gc_mark_global_tbl  457 intern.h       void rb_gc_mark_global_tbl _((void));


rb_gc_mark_locations

rb_gc_mark_locations  704 error.c            rb_gc_mark_locations(ptr, ptr+3);
rb_gc_mark_locations 9901 eval.c         	rb_gc_mark_locations(frame->argv, frame->argv+frame->argc);
rb_gc_mark_locations 9905 eval.c         	rb_gc_mark_locations(start, start+frame->argc);
rb_gc_mark_locations 9940 eval.c         	rb_gc_mark_locations(th->stk_ptr, th->stk_ptr+th->stk_len);
rb_gc_mark_locations 9942 eval.c         	rb_gc_mark_locations(th->stk_ptr+2, th->stk_ptr+th->stk_len+2);
rb_gc_mark_locations 9946 eval.c         	    rb_gc_mark_locations(th->bstr_ptr, th->bstr_ptr+th->bstr_len);
rb_gc_mark_locations 1354 gc.c               rb_gc_mark_locations((VALUE*)STACK_END, rb_gc_stack_start);
rb_gc_mark_locations 1356 gc.c               rb_gc_mark_locations(rb_gc_stack_start, (VALUE*)STACK_END + 1);
rb_gc_mark_locations 1359 gc.c           	rb_gc_mark_locations((VALUE*)STACK_END, rb_gc_stack_start);
rb_gc_mark_locations 1361 gc.c           	rb_gc_mark_locations(rb_gc_stack_start, (VALUE*)STACK_END + 1);
rb_gc_mark_locations 1378 gc.c           	rb_gc_mark_locations(bot, top);
rb_gc_mark_locations 1382 gc.c               rb_gc_mark_locations((VALUE*)((char*)STACK_END + 2),
rb_gc_mark_locations  239 intern.h       void rb_gc_mark_locations _((VALUE*, VALUE*));
rb_gc_mark_locations 9785 parse.c            if (yyvsp) rb_gc_mark_locations((VALUE *)yyvs, (VALUE *)yyvsp);
rb_gc_mark_locations 5787 parse.y            if (yyvsp) rb_gc_mark_locations((VALUE *)yyvs, (VALUE *)yyvsp);


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 1396 ext/syck/rubyext.c     rb_gc_mark_maybe( n->id );
rb_gc_mark_maybe 1389 gc.c           	rb_gc_mark_maybe(*list->varptr);
rb_gc_mark_maybe  242 intern.h       void rb_gc_mark_maybe _((VALUE));
rb_gc_mark_maybe 9790 parse.c            rb_gc_mark_maybe((VALUE)yylval.node);
rb_gc_mark_maybe 5792 parse.y            rb_gc_mark_maybe((VALUE)yylval.node);
rb_gc_mark_maybe  415 variable.c         if (data) rb_gc_mark_maybe(data);
rb_gc_mark_maybe  440 variable.c         if (var) rb_gc_mark_maybe(*var);
rb_gc_mark_maybe  463 variable.c     	if (trace->data) rb_gc_mark_maybe(trace->data);


rb_gc_mark_parser

rb_gc_mark_parser 1400 gc.c               rb_gc_mark_parser();
rb_gc_mark_parser  333 intern.h       void rb_gc_mark_parser _((void));


rb_gc_mark_threads

rb_gc_mark_threads 1385 gc.c               rb_gc_mark_threads();
rb_gc_mark_threads  195 intern.h       void rb_gc_mark_threads _((void));


rb_gc_mark_trap_list

rb_gc_mark_trap_list 1395 gc.c               rb_gc_mark_trap_list();
rb_gc_mark_trap_list  385 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  906 ext/iconv/iconv.c     rb_gc_register_address(&charset_map);
rb_gc_register_address  276 gc.c               rb_gc_register_address(var);
rb_gc_register_address 1936 gc.c               rb_gc_register_address(&rb_mObSpace);
rb_gc_register_address  505 ruby.h         void rb_gc_register_address _((VALUE*));


rb_gc_start

rb_gc_start      1918 gc.c               rb_define_singleton_method(rb_mGC, "start", rb_gc_start, 0);
rb_gc_start      1921 gc.c               rb_define_method(rb_mGC, "garbage_collect", rb_gc_start, 0);
rb_gc_start      1925 gc.c               rb_define_module_function(rb_mObSpace, "garbage_collect", rb_gc_start, 0);
rb_gc_start       251 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 1938 gc.c               rb_gc_unregister_address(&rb_mObSpace);
rb_gc_unregister_address  506 ruby.h         void rb_gc_unregister_address _((VALUE*));


rb_gdbm_delete

rb_gdbm_delete    452 ext/gdbm/gdbm.c     rb_gdbm_delete(obj, keystr);
rb_gdbm_delete    469 ext/gdbm/gdbm.c     rb_gdbm_delete(obj, keystr);
rb_gdbm_delete    500 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     765 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    373 ext/gdbm/gdbm.c             VALUE assoc = rb_assoc_new(keystr, rb_gdbm_fetch2(dbm, keystr));
rb_gdbm_fetch2    468 ext/gdbm/gdbm.c     valstr = rb_gdbm_fetch2(dbm, keystr);
rb_gdbm_fetch2    492 ext/gdbm/gdbm.c 	valstr = rb_gdbm_fetch2(dbm, keystr);
rb_gdbm_fetch2    557 ext/gdbm/gdbm.c 	valstr = rb_gdbm_fetch2(dbm, keystr);
rb_gdbm_fetch2    690 ext/gdbm/gdbm.c         rb_yield(rb_gdbm_fetch2(dbm, keystr));
rb_gdbm_fetch2    726 ext/gdbm/gdbm.c         rb_yield(rb_assoc_new(keystr, rb_gdbm_fetch2(dbm, keystr)));
rb_gdbm_fetch2    804 ext/gdbm/gdbm.c 	valstr2 = rb_gdbm_fetch2(dbm, keystr);
rb_gdbm_fetch2    829 ext/gdbm/gdbm.c         rb_ary_push(ary, rb_assoc_new(keystr, rb_gdbm_fetch2(dbm, keystr)));
rb_gdbm_fetch2    933 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    347 ext/gdbm/gdbm.c 	rb_ary_push(new, rb_gdbm_fetch3(obj, argv[i]));
rb_gdbm_fetch3    386 ext/gdbm/gdbm.c             rb_ary_push(new, rb_gdbm_fetch3(obj, argv[i]));
rb_gdbm_fetch3    403 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  371 ext/gdbm/gdbm.c         for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
rb_gdbm_firstkey  466 ext/gdbm/gdbm.c     keystr = rb_gdbm_firstkey(dbm);
rb_gdbm_firstkey  489 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
rb_gdbm_firstkey  555 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
rb_gdbm_firstkey  687 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
rb_gdbm_firstkey  705 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
rb_gdbm_firstkey  723 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
rb_gdbm_firstkey  743 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
rb_gdbm_firstkey  801 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
rb_gdbm_firstkey  826 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
rb_gdbm_firstkey  930 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);


rb_gdbm_modify

rb_gdbm_modify    425 ext/gdbm/gdbm.c     rb_gdbm_modify(obj);
rb_gdbm_modify    464 ext/gdbm/gdbm.c     rb_gdbm_modify(obj);
rb_gdbm_modify    484 ext/gdbm/gdbm.c     rb_gdbm_modify(obj);
rb_gdbm_modify    515 ext/gdbm/gdbm.c     rb_gdbm_modify(obj);
rb_gdbm_modify    612 ext/gdbm/gdbm.c     rb_gdbm_modify(obj);
rb_gdbm_modify    842 ext/gdbm/gdbm.c     rb_gdbm_modify(obj);
rb_gdbm_modify    855 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   372 ext/gdbm/gdbm.c              keystr = rb_gdbm_nextkey(dbm, keystr)) {
rb_gdbm_nextkey   490 ext/gdbm/gdbm.c          keystr = rb_gdbm_nextkey(dbm, keystr)) {
rb_gdbm_nextkey   556 ext/gdbm/gdbm.c          keystr = rb_gdbm_nextkey(dbm, keystr)) {
rb_gdbm_nextkey   688 ext/gdbm/gdbm.c          keystr = rb_gdbm_nextkey(dbm, keystr)) {
rb_gdbm_nextkey   706 ext/gdbm/gdbm.c          keystr = rb_gdbm_nextkey(dbm, keystr)) {
rb_gdbm_nextkey   724 ext/gdbm/gdbm.c          keystr = rb_gdbm_nextkey(dbm, keystr)) {
rb_gdbm_nextkey   744 ext/gdbm/gdbm.c          keystr = rb_gdbm_nextkey(dbm, keystr)) {
rb_gdbm_nextkey   802 ext/gdbm/gdbm.c          keystr = rb_gdbm_nextkey(dbm, keystr)) {
rb_gdbm_nextkey   827 ext/gdbm/gdbm.c          keystr = rb_gdbm_nextkey(dbm, keystr)) {
rb_gdbm_nextkey   931 ext/gdbm/gdbm.c          keystr = rb_gdbm_nextkey(dbm, keystr)) {


rb_generic_ivar_table

rb_generic_ivar_table  462 intern.h       struct st_table* rb_generic_ivar_table _((VALUE));
rb_generic_ivar_table  471 marshal.c          if (ivtbl = rb_generic_ivar_table(obj)) {
rb_generic_ivar_table  520 marshal.c      	    if (!ivtbl && (ivtbl = rb_generic_ivar_table(v))) {


rb_get_kcode

rb_get_kcode      371 intern.h       const char* rb_get_kcode _((void));
rb_get_kcode     2099 re.c               return rb_str_new2(rb_get_kcode());


rb_get_method_body

rb_get_method_body  511 eval.c             return rb_get_method_body(&klass, &id, &noex);
rb_get_method_body  640 eval.c             if (rb_get_method_body(&klass, &id, &noex)) {
rb_get_method_body 2300 eval.c         		if (!rb_get_method_body(&val, &id, &noex))
rb_get_method_body 4224 eval.c             if (rb_get_method_body(&mod, &id, &noex)) {
rb_get_method_body 4264 eval.c             if (rb_get_method_body(&mod, &id, &noex)) {
rb_get_method_body 4304 eval.c             if (rb_get_method_body(&mod, &id, &noex)) {
rb_get_method_body 5896 eval.c             else if ((body = rb_get_method_body(&klass, &id, &noex)) == 0) {
rb_get_method_body 8761 eval.c             if ((body = rb_get_method_body(&klass, &id, &noex)) == 0) {


rb_gets

rb_gets          2903 eval.c         	    while (!NIL_P(rb_gets())) {
rb_gets           283 intern.h       VALUE rb_gets _((void));


rb_glob2

rb_glob2         1139 dir.c              int status = rb_glob2(path, 0, func, arg);
rb_glob2         1149 dir.c              int status = rb_glob2(path, FNM_CASEFOLD, func, arg);
rb_glob2         1167 dir.c              return rb_glob2(s, flags, push_pattern, ary);


rb_glob_caller

rb_glob_caller   1103 dir.c          static int rb_glob_caller _((const char *, VALUE));
rb_glob_caller   1130 dir.c              return glob_helper(path, 0, flags | GLOB_VERBOSE, rb_glob_caller, (VALUE)&args);


rb_global_entry

rb_global_entry   270 node.h         #define NEW_GASGN(v,val) NEW_NODE(NODE_GASGN,v,val,rb_global_entry(v))
rb_global_entry   283 node.h         #define NEW_GVAR(v) NEW_NODE(NODE_GVAR,v,0,rb_global_entry(v))
rb_global_entry   355 node.h         struct global_entry *rb_global_entry _((ID));
rb_global_entry   503 variable.c         gvar = rb_global_entry(id)->var;
rb_global_entry   583 variable.c         entry = rb_global_entry(rb_to_id(var));
rb_global_entry   736 variable.c         entry = rb_global_entry(global_id(name));
rb_global_entry   746 variable.c         entry = rb_global_entry(global_id(name));
rb_global_entry   804 variable.c         entry2 = rb_global_entry(name2);


rb_global_variable

rb_global_variable 7768 eval.c             rb_global_variable((VALUE*)&top_scope);
rb_global_variable 7769 eval.c             rb_global_variable((VALUE*)&ruby_eval_tree_begin);
rb_global_variable 7771 eval.c             rb_global_variable((VALUE*)&ruby_eval_tree);
rb_global_variable 7772 eval.c             rb_global_variable((VALUE*)&ruby_dyna_vars);
rb_global_variable 7785 eval.c             rb_global_variable((VALUE*)&basic_respond_to);
rb_global_variable 7843 eval.c             rb_global_variable(&trace_func);
rb_global_variable 7953 eval.c             rb_global_variable(&ruby_wrapper);
rb_global_variable 7955 eval.c             rb_global_variable(&ruby_dln_librefs);
rb_global_variable 9457 eval.c             rb_global_variable(&exception_error);
rb_global_variable 9461 eval.c             rb_global_variable(&sysstack_error);
rb_global_variable 12762 eval.c             rb_global_variable(&cont_protect);
rb_global_variable 12770 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 2228 ext/syck/rubyext.c     rb_global_variable( &oDefaultResolver );
rb_global_variable 2233 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 6082 ext/win32ole/win32ole.c     rb_global_variable(&ary_ole_event);
rb_global_variable 6086 ext/win32ole/win32ole.c     rb_global_variable(&com_hash);
rb_global_variable 1937 gc.c               rb_global_variable(&finalizers);
rb_global_variable 1943 gc.c               rb_global_variable(&nomem_error);
rb_global_variable 5597 io.c               rb_global_variable(&rb_default_rs);
rb_global_variable 5731 io.c               rb_global_variable(&current_file);
rb_global_variable 2756 object.c           rb_global_variable(&ruby_top_self);
rb_global_variable  502 random.c           rb_global_variable(&saved_seed);
rb_global_variable 2279 re.c               rb_global_variable(&reg_cache);
rb_global_variable 1147 ruby.c             rb_global_variable(&rb_argv0);
rb_global_variable  504 ruby.h         void rb_global_variable _((VALUE*));


rb_globi

rb_globi          476 ruby.h         void rb_globi _((const char*,void(*)(const char*,VALUE),VALUE));
rb_globi          359 util.c             rb_globi(buf, push_element, (VALUE)&info);


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         527 ruby.h         VALUE rb_gv_get _((const char*));


rb_gv_set

rb_gv_set         421 ruby.c         	    rb_gv_set(s, v);
rb_gv_set         526 ruby.h         VALUE rb_gv_set _((const char*, VALUE));


rb_gvar_defined

rb_gvar_defined  2358 eval.c         	if (rb_gvar_defined(node->nd_entry)) {
rb_gvar_defined   358 node.h         VALUE rb_gvar_defined _((struct global_entry *));


rb_gvar_get

rb_gvar_get      3613 eval.c         	result = rb_gvar_get(node->nd_entry);
rb_gvar_get       356 node.h         VALUE rb_gvar_get _((struct global_entry *));
rb_gvar_get       747 variable.c         return rb_gvar_get(entry);


rb_gvar_set

rb_gvar_set      3567 eval.c         	rb_gvar_set(node->nd_entry, result);
rb_gvar_set      5108 eval.c         	rb_gvar_set(lhs->nd_entry, val);
rb_gvar_set       357 node.h         VALUE rb_gvar_set _((struct global_entry *, VALUE));
rb_gvar_set       737 variable.c         return rb_gvar_set(entry, val);


rb_gzfile_close

rb_gzfile_close   150 ext/zlib/zlib.c static VALUE rb_gzfile_close _((VALUE));
rb_gzfile_close  3429 ext/zlib/zlib.c     rb_define_method(cGzipFile, "close", rb_gzfile_close, 0);


rb_gzfile_closed_p

rb_gzfile_closed_p  152 ext/zlib/zlib.c static VALUE rb_gzfile_closed_p _((VALUE));
rb_gzfile_closed_p 3431 ext/zlib/zlib.c     rb_define_method(cGzipFile, "closed?", rb_gzfile_closed_p, 0);


rb_gzfile_comment

rb_gzfile_comment  144 ext/zlib/zlib.c static VALUE rb_gzfile_comment _((VALUE));
rb_gzfile_comment 3423 ext/zlib/zlib.c     rb_define_method(cGzipFile, "comment", rb_gzfile_comment, 0);


rb_gzfile_crc

rb_gzfile_crc     139 ext/zlib/zlib.c static VALUE rb_gzfile_crc _((VALUE));
rb_gzfile_crc    3418 ext/zlib/zlib.c     rb_define_method(cGzipFile, "crc", rb_gzfile_crc, 0);


rb_gzfile_eof_p

rb_gzfile_eof_p   153 ext/zlib/zlib.c static VALUE rb_gzfile_eof_p _((VALUE));
rb_gzfile_eof_p  3432 ext/zlib/zlib.c     rb_define_method(cGzipReader, "eof", rb_gzfile_eof_p, 0);
rb_gzfile_eof_p  3433 ext/zlib/zlib.c     rb_define_method(cGzipReader, "eof?", rb_gzfile_eof_p, 0);


rb_gzfile_finish

rb_gzfile_finish  151 ext/zlib/zlib.c static VALUE rb_gzfile_finish _((VALUE));
rb_gzfile_finish 3430 ext/zlib/zlib.c     rb_define_method(cGzipFile, "finish", rb_gzfile_finish, 0);


rb_gzfile_level

rb_gzfile_level   141 ext/zlib/zlib.c static VALUE rb_gzfile_level _((VALUE));
rb_gzfile_level  3420 ext/zlib/zlib.c     rb_define_method(cGzipFile, "level", rb_gzfile_level, 0);


rb_gzfile_lineno

rb_gzfile_lineno  145 ext/zlib/zlib.c static VALUE rb_gzfile_lineno _((VALUE));
rb_gzfile_lineno 3424 ext/zlib/zlib.c     rb_define_method(cGzipReader, "lineno", rb_gzfile_lineno, 0);


rb_gzfile_mtime

rb_gzfile_mtime   140 ext/zlib/zlib.c static VALUE rb_gzfile_mtime _((VALUE));
rb_gzfile_mtime  3419 ext/zlib/zlib.c     rb_define_method(cGzipFile, "mtime", rb_gzfile_mtime, 0);


rb_gzfile_orig_name

rb_gzfile_orig_name  143 ext/zlib/zlib.c static VALUE rb_gzfile_orig_name _((VALUE));
rb_gzfile_orig_name 3422 ext/zlib/zlib.c     rb_define_method(cGzipFile, "orig_name", rb_gzfile_orig_name, 0);


rb_gzfile_os_code

rb_gzfile_os_code  142 ext/zlib/zlib.c static VALUE rb_gzfile_os_code _((VALUE));
rb_gzfile_os_code 3421 ext/zlib/zlib.c     rb_define_method(cGzipFile, "os_code", rb_gzfile_os_code, 0);


rb_gzfile_s_wrap

rb_gzfile_s_wrap  135 ext/zlib/zlib.c static VALUE rb_gzfile_s_wrap _((int, VALUE*, VALUE));
rb_gzfile_s_wrap 2357 ext/zlib/zlib.c     return rb_gzfile_s_wrap(argc, argv, klass);
rb_gzfile_s_wrap 3415 ext/zlib/zlib.c     rb_define_singleton_method(cGzipFile, "wrap", rb_gzfile_s_wrap, -1);


rb_gzfile_set_comment

rb_gzfile_set_comment  149 ext/zlib/zlib.c static VALUE rb_gzfile_set_comment _((VALUE, VALUE));
rb_gzfile_set_comment 3428 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "comment=", rb_gzfile_set_comment, 1);


rb_gzfile_set_lineno

rb_gzfile_set_lineno  146 ext/zlib/zlib.c static VALUE rb_gzfile_set_lineno _((VALUE, VALUE));
rb_gzfile_set_lineno 3425 ext/zlib/zlib.c     rb_define_method(cGzipReader, "lineno=", rb_gzfile_set_lineno, 1);


rb_gzfile_set_mtime

rb_gzfile_set_mtime  147 ext/zlib/zlib.c static VALUE rb_gzfile_set_mtime _((VALUE, VALUE));
rb_gzfile_set_mtime 3426 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "mtime=", rb_gzfile_set_mtime, 1);


rb_gzfile_set_orig_name

rb_gzfile_set_orig_name  148 ext/zlib/zlib.c static VALUE rb_gzfile_set_orig_name _((VALUE, VALUE));
rb_gzfile_set_orig_name 3427 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "orig_name=", rb_gzfile_set_orig_name,1);


rb_gzfile_set_sync

rb_gzfile_set_sync  155 ext/zlib/zlib.c static VALUE rb_gzfile_set_sync _((VALUE, VALUE));
rb_gzfile_set_sync 3435 ext/zlib/zlib.c     rb_define_method(cGzipFile, "sync=", rb_gzfile_set_sync, 1);


rb_gzfile_sync

rb_gzfile_sync    154 ext/zlib/zlib.c static VALUE rb_gzfile_sync _((VALUE));
rb_gzfile_sync   3434 ext/zlib/zlib.c     rb_define_method(cGzipFile, "sync", rb_gzfile_sync, 0);


rb_gzfile_to_io

rb_gzfile_to_io   138 ext/zlib/zlib.c static VALUE rb_gzfile_to_io _((VALUE));
rb_gzfile_to_io  3417 ext/zlib/zlib.c     rb_define_method(cGzipFile, "to_io", rb_gzfile_to_io, 0);


rb_gzfile_total_in

rb_gzfile_total_in  156 ext/zlib/zlib.c static VALUE rb_gzfile_total_in _((VALUE));
rb_gzfile_total_in 3437 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "pos", rb_gzfile_total_in, 0);
rb_gzfile_total_in 3439 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "tell", rb_gzfile_total_in, 0);


rb_gzfile_total_out

rb_gzfile_total_out  157 ext/zlib/zlib.c static VALUE rb_gzfile_total_out _((VALUE));
rb_gzfile_total_out 3436 ext/zlib/zlib.c     rb_define_method(cGzipReader, "pos", rb_gzfile_total_out, 0);
rb_gzfile_total_out 3438 ext/zlib/zlib.c     rb_define_method(cGzipReader, "tell", rb_gzfile_total_out, 0);


rb_gzreader_each

rb_gzreader_each  180 ext/zlib/zlib.c static VALUE rb_gzreader_each _((int, VALUE*, VALUE));
rb_gzreader_each 3464 ext/zlib/zlib.c     rb_define_method(cGzipReader, "each", rb_gzreader_each, -1);
rb_gzreader_each 3465 ext/zlib/zlib.c     rb_define_method(cGzipReader, "each_line", rb_gzreader_each, -1);


rb_gzreader_each_byte

rb_gzreader_each_byte  174 ext/zlib/zlib.c static VALUE rb_gzreader_each_byte _((VALUE));
rb_gzreader_each_byte 3460 ext/zlib/zlib.c     rb_define_method(cGzipReader, "each_byte", rb_gzreader_each_byte, 0);


rb_gzreader_getc

rb_gzreader_getc  172 ext/zlib/zlib.c static VALUE rb_gzreader_getc _((VALUE));
rb_gzreader_getc 3002 ext/zlib/zlib.c     dst = rb_gzreader_getc(obj);
rb_gzreader_getc 3017 ext/zlib/zlib.c     while (!NIL_P(c = rb_gzreader_getc(obj))) {
rb_gzreader_getc 3458 ext/zlib/zlib.c     rb_define_method(cGzipReader, "getc", rb_gzreader_getc, 0);


rb_gzreader_gets

rb_gzreader_gets  178 ext/zlib/zlib.c static VALUE rb_gzreader_gets _((int, VALUE*, VALUE));
rb_gzreader_gets 3184 ext/zlib/zlib.c     dst = rb_gzreader_gets(argc, argv, obj);
rb_gzreader_gets 3462 ext/zlib/zlib.c     rb_define_method(cGzipReader, "gets", rb_gzreader_gets, -1);


rb_gzreader_initialize

rb_gzreader_initialize  168 ext/zlib/zlib.c static VALUE rb_gzreader_initialize _((VALUE, VALUE));
rb_gzreader_initialize 3454 ext/zlib/zlib.c     rb_define_method(cGzipReader, "initialize", rb_gzreader_initialize, 1);


rb_gzreader_read

rb_gzreader_read  171 ext/zlib/zlib.c static VALUE rb_gzreader_read _((int, VALUE*, VALUE));
rb_gzreader_read 3457 ext/zlib/zlib.c     rb_define_method(cGzipReader, "read", rb_gzreader_read, -1);


rb_gzreader_readchar

rb_gzreader_readchar  173 ext/zlib/zlib.c static VALUE rb_gzreader_readchar _((VALUE));
rb_gzreader_readchar 3459 ext/zlib/zlib.c     rb_define_method(cGzipReader, "readchar", rb_gzreader_readchar, 0);


rb_gzreader_readline

rb_gzreader_readline  179 ext/zlib/zlib.c static VALUE rb_gzreader_readline _((int, VALUE*, VALUE));
rb_gzreader_readline 3463 ext/zlib/zlib.c     rb_define_method(cGzipReader, "readline", rb_gzreader_readline, -1);


rb_gzreader_readlines

rb_gzreader_readlines  181 ext/zlib/zlib.c static VALUE rb_gzreader_readlines _((int, VALUE*, VALUE));
rb_gzreader_readlines 3466 ext/zlib/zlib.c     rb_define_method(cGzipReader, "readlines", rb_gzreader_readlines, -1);


rb_gzreader_rewind

rb_gzreader_rewind  169 ext/zlib/zlib.c static VALUE rb_gzreader_rewind _((VALUE));
rb_gzreader_rewind 3455 ext/zlib/zlib.c     rb_define_method(cGzipReader, "rewind", rb_gzreader_rewind, 0);


rb_gzreader_s_allocate

rb_gzreader_s_allocate  166 ext/zlib/zlib.c static VALUE rb_gzreader_s_allocate _((VALUE));
rb_gzreader_s_allocate 3453 ext/zlib/zlib.c     rb_define_alloc_func(cGzipReader, rb_gzreader_s_allocate);


rb_gzreader_s_open

rb_gzreader_s_open  167 ext/zlib/zlib.c static VALUE rb_gzreader_s_open _((int, VALUE*, VALUE));
rb_gzreader_s_open 3452 ext/zlib/zlib.c     rb_define_singleton_method(cGzipReader, "open", rb_gzreader_s_open,-1);


rb_gzreader_ungetc

rb_gzreader_ungetc  175 ext/zlib/zlib.c static VALUE rb_gzreader_ungetc _((VALUE, VALUE));
rb_gzreader_ungetc 3461 ext/zlib/zlib.c     rb_define_method(cGzipReader, "ungetc", rb_gzreader_ungetc, 1);


rb_gzreader_unused

rb_gzreader_unused  170 ext/zlib/zlib.c static VALUE rb_gzreader_unused _((VALUE));
rb_gzreader_unused 3456 ext/zlib/zlib.c     rb_define_method(cGzipReader, "unused", rb_gzreader_unused, 0);


rb_gzwriter_flush

rb_gzwriter_flush  162 ext/zlib/zlib.c static VALUE rb_gzwriter_flush _((int, VALUE*, VALUE));
rb_gzwriter_flush 3444 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "flush", rb_gzwriter_flush, -1);


rb_gzwriter_initialize

rb_gzwriter_initialize  161 ext/zlib/zlib.c static VALUE rb_gzwriter_initialize _((int, VALUE*, VALUE));
rb_gzwriter_initialize 3443 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "initialize", rb_gzwriter_initialize,-1);


rb_gzwriter_putc

rb_gzwriter_putc  164 ext/zlib/zlib.c static VALUE rb_gzwriter_putc _((VALUE, VALUE));
rb_gzwriter_putc 3446 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "putc", rb_gzwriter_putc, 1);


rb_gzwriter_s_allocate

rb_gzwriter_s_allocate  159 ext/zlib/zlib.c static VALUE rb_gzwriter_s_allocate _((VALUE));
rb_gzwriter_s_allocate 3442 ext/zlib/zlib.c     rb_define_alloc_func(cGzipWriter, rb_gzwriter_s_allocate);


rb_gzwriter_s_open

rb_gzwriter_s_open  160 ext/zlib/zlib.c static VALUE rb_gzwriter_s_open _((int, VALUE*, VALUE));
rb_gzwriter_s_open 3441 ext/zlib/zlib.c     rb_define_singleton_method(cGzipWriter, "open", rb_gzwriter_s_open,-1);


rb_gzwriter_write

rb_gzwriter_write  163 ext/zlib/zlib.c static VALUE rb_gzwriter_write _((VALUE, VALUE));
rb_gzwriter_write 3445 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "write", rb_gzwriter_write, 1);


rb_hash

rb_hash          2529 array.c        	n = rb_hash(RARRAY(ary)->ptr[i]);
rb_hash           255 intern.h       VALUE rb_hash _((VALUE));
rb_hash           216 range.c            v = rb_hash(rb_ivar_get(range, id_beg));
rb_hash           218 range.c            v = rb_hash(rb_ivar_get(range, id_end));
rb_hash           821 struct.c           h = rb_hash(rb_obj_class(s));
rb_hash           824 struct.c       	n = rb_hash(RSTRUCT(s)->ptr[i]);


rb_hash_aref

rb_hash_aref      643 ext/dl/dl.c        if (rb_hash_aref(DLFuncTable, rb_assoc_new(INT2NUM(rettype), INT2NUM(i))) == Qnil) {
rb_hash_aref       49 ext/dl/ptr.c     val = rb_hash_aref(DLMemoryTable, DLLONG2NUM(ptr));
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     1090 ext/syck/rubyext.c         VALUE target_class = rb_hash_aref( tags, type );
rb_hash_aref     1107 ext/syck/rubyext.c                 target_class = rb_hash_aref( tags, partial );
rb_hash_aref     1111 ext/syck/rubyext.c                     target_class = rb_hash_aref( tags, partial );
rb_hash_aref     1642 ext/syck/rubyext.c             syck_map_add( node, key, rb_hash_aref(hsh, key) );
rb_hash_aref     1678 ext/syck/rubyext.c             syck_map_add( node, key, rb_hash_aref(hsh, key) );
rb_hash_aref     2030 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      631 hash.c         	RARRAY(indexes)->ptr[i] = rb_hash_aref(hash, argv[i]);
rb_hash_aref      827 hash.c         	rb_ary_push(result, rb_hash_aref(hash, argv[i]));
rb_hash_aref     1550 hash.c         	value = rb_yield_values(3, key, rb_hash_aref(hash, key), value);
rb_hash_aref     2433 hash.c             rb_define_method(rb_cHash,"[]", rb_hash_aref, 1);
rb_hash_aref      258 intern.h       VALUE rb_hash_aref _((VALUE, VALUE));
rb_hash_aref     1011 marshal.c      	v = rb_hash_aref(arg->data, LONG2FIX(id));
rb_hash_aref     6578 parse.c        	    ruby_debug_lines = rb_hash_aref(hash, fname);
rb_hash_aref     2580 parse.y        	    ruby_debug_lines = rb_hash_aref(hash, fname);


rb_hash_aset

rb_hash_aset     2615 array.c        	rb_hash_aset(hash, RARRAY(ary1)->ptr[i], Qtrue);
rb_hash_aset     2619 array.c        	    rb_hash_aset(hash, RARRAY(ary2)->ptr[i], Qtrue);
rb_hash_aset     3704 eval.c         		rb_hash_aset(hash, key, val);
rb_hash_aset      456 ext/dbm/dbm.c  	rb_hash_aset(hash, valstr, keystr);
rb_hash_aset      742 ext/dbm/dbm.c  	rb_hash_aset(hash, rb_tainted_str_new(key.dptr, key.dsize),
rb_hash_aset      652 ext/dl/dl.c      rb_hash_aset(DLFuncTable,
rb_hash_aset      671 ext/dl/dl.c    	rb_hash_aset(DLFuncTable, rb_assoc_new(INT2NUM(i),INT2NUM(j)),Qnil);
rb_hash_aset       40 ext/dl/ptr.c       rb_hash_aset(DLMemoryTable, DLLONG2NUM(ptr), DLLONG2NUM(obj));
rb_hash_aset      559 ext/gdbm/gdbm.c 	rb_hash_aset(hash, valstr, keystr);
rb_hash_aset      933 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      435 ext/sdbm/init.c 	rb_hash_aset(hash, valstr, keystr);
rb_hash_aset      724 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     1314 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     1702 ext/syck/rubyext.c     rb_hash_aset( rb_ivar_get( self, s_value ), key, val );
rb_hash_aset     1911 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     1311 ext/win32ole/win32ole.c                     rb_hash_aset(constant, rb_str_new2(pName), val);
rb_hash_aset      342 hash.c                 rb_hash_aset(hash, argv[i], argv[i + 1]);
rb_hash_aset      928 hash.c         	rb_hash_aset(hash, key, val);
rb_hash_aset     1507 hash.c             rb_hash_aset(hash, value, key);
rb_hash_aset     1539 hash.c             rb_hash_aset(hash, key, value);
rb_hash_aset     1552 hash.c             rb_hash_aset(hash, key, value);
rb_hash_aset     2304 hash.c         	    rb_hash_aset(hash, env_str_new(*env, s-*env),
rb_hash_aset     2435 hash.c             rb_define_method(rb_cHash,"[]=", rb_hash_aset, 2);
rb_hash_aset     2436 hash.c             rb_define_method(rb_cHash,"store", rb_hash_aset, 2);
rb_hash_aset      259 intern.h       VALUE rb_hash_aset _((VALUE, VALUE, VALUE));
rb_hash_aset      951 marshal.c          rb_hash_aset(arg->data, INT2FIX(RHASH(arg->data)->tbl->num_entries), v);
rb_hash_aset     1185 marshal.c      		rb_hash_aset(v, key, value);
rb_hash_aset     6581 parse.c        		rb_hash_aset(hash, fname, ruby_debug_lines);
rb_hash_aset     2583 parse.y        		rb_hash_aset(hash, fname, ruby_debug_lines);
rb_hash_aset      757 signal.c       	rb_hash_aset(h, rb_str_new2(sigs->signm), INT2FIX(sigs->signo));


rb_hash_clear

rb_hash_clear     952 hash.c             rb_hash_clear(hash);
rb_hash_clear    2463 hash.c             rb_define_method(rb_cHash,"clear", rb_hash_clear, 0);


rb_hash_delete

rb_hash_delete     30 ext/dl/ptr.c     rb_hash_delete(DLMemoryTable, DLLONG2NUM(ptr));
rb_hash_delete    159 ext/tk/tkutil/tkutil.c     return rb_hash_delete(CALLBACK_TABLE,
rb_hash_delete    735 hash.c         	rb_hash_delete(hash, key);
rb_hash_delete   2458 hash.c             rb_define_method(rb_cHash,"delete", rb_hash_delete, 1);
rb_hash_delete    261 intern.h       VALUE rb_hash_delete _((VALUE,VALUE));


rb_hash_delete_if

rb_hash_delete_if  753 ext/dbm/dbm.c      return rb_hash_delete_if(fdbm_to_hash(obj));
rb_hash_delete_if  943 ext/gdbm/gdbm.c     return rb_hash_delete_if(fgdbm_to_hash(obj));
rb_hash_delete_if  735 ext/sdbm/init.c     return rb_hash_delete_if(fsdbm_to_hash(obj));
rb_hash_delete_if  774 hash.c             rb_hash_delete_if(hash);
rb_hash_delete_if  793 hash.c             return rb_hash_delete_if(rb_obj_dup(hash));
rb_hash_delete_if 2316 hash.c             return rb_hash_delete_if(env_to_hash());
rb_hash_delete_if 2459 hash.c             rb_define_method(rb_cHash,"delete_if", rb_hash_delete_if, 0);
rb_hash_delete_if  260 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   392 hash.c             rb_hash_foreach(hash, rb_hash_rehash_i, (st_data_t)tbl);
rb_hash_foreach   604 hash.c             rb_hash_foreach(hash, index_i, (st_data_t)args);
rb_hash_foreach   716 hash.c             rb_hash_foreach(hash, shift_i, (st_data_t)&var);
rb_hash_foreach   757 hash.c             rb_hash_foreach(hash, delete_if_i, hash);
rb_hash_foreach   857 hash.c             rb_hash_foreach(hash, select_i, result);
rb_hash_foreach   885 hash.c         	rb_hash_foreach(hash, clear_i, 0);
rb_hash_foreach   953 hash.c             rb_hash_foreach(hash2, replace_i, hash);
rb_hash_foreach  1034 hash.c             rb_hash_foreach(hash, each_value_i, 0);
rb_hash_foreach  1066 hash.c             rb_hash_foreach(hash, each_key_i, 0);
rb_hash_foreach  1100 hash.c             rb_hash_foreach(hash, each_pair_i, 0);
rb_hash_foreach  1137 hash.c             rb_hash_foreach(hash, each_i, 0);
rb_hash_foreach  1168 hash.c             rb_hash_foreach(hash, to_a_i, ary);
rb_hash_foreach  1226 hash.c             rb_hash_foreach(hash, inspect_i, str);
rb_hash_foreach  1320 hash.c             rb_hash_foreach(hash, keys_i, ary);
rb_hash_foreach  1353 hash.c             rb_hash_foreach(hash, values_i, ary);
rb_hash_foreach  1418 hash.c             rb_hash_foreach(hash, rb_hash_search_value, (st_data_t)data);
rb_hash_foreach  1470 hash.c             rb_hash_foreach(hash1, equal_i, (st_data_t)&data);
rb_hash_foreach  1529 hash.c             rb_hash_foreach(hash, rb_hash_invert_i, h);
rb_hash_foreach  1577 hash.c         	rb_hash_foreach(hash2, rb_hash_update_block_i, hash1);
rb_hash_foreach  1580 hash.c         	rb_hash_foreach(hash2, rb_hash_update_i, hash1);
rb_hash_foreach  2366 hash.c             rb_hash_foreach(hash, env_replace_i, keys);
rb_hash_foreach  2393 hash.c             rb_hash_foreach(hash, env_update_i, 0);
rb_hash_foreach   254 intern.h       void rb_hash_foreach _((VALUE, int (*)(ANYARGS), VALUE));
rb_hash_foreach   624 marshal.c      	    rb_hash_foreach(obj, hash_each, (st_data_t)&c_arg);


rb_hash_has_key

rb_hash_has_key  1549 hash.c             if (rb_hash_has_key(hash, key)) {
rb_hash_has_key  2470 hash.c             rb_define_method(rb_cHash,"include?", rb_hash_has_key, 1);
rb_hash_has_key  2471 hash.c             rb_define_method(rb_cHash,"member?", rb_hash_has_key, 1);
rb_hash_has_key  2472 hash.c             rb_define_method(rb_cHash,"has_key?", rb_hash_has_key, 1);
rb_hash_has_key  2474 hash.c             rb_define_method(rb_cHash,"key?", rb_hash_has_key, 1);


rb_hash_has_value

rb_hash_has_value 2473 hash.c             rb_define_method(rb_cHash,"has_value?", rb_hash_has_value, 1);
rb_hash_has_value 2475 hash.c             rb_define_method(rb_cHash,"value?", rb_hash_has_value, 1);


rb_hash_indexes

rb_hash_indexes  2441 hash.c             rb_define_method(rb_cHash,"indexes", rb_hash_indexes, -1);
rb_hash_indexes  2442 hash.c             rb_define_method(rb_cHash,"indices", rb_hash_indexes, -1);


rb_hash_invert

rb_hash_invert   2341 hash.c             return rb_hash_invert(env_to_hash());
rb_hash_invert   2464 hash.c             rb_define_method(rb_cHash,"invert", rb_hash_invert, 0);


rb_hash_modify

rb_hash_modify    289 hash.c             rb_hash_modify(hash);
rb_hash_modify    390 hash.c             rb_hash_modify(hash);
rb_hash_modify    540 hash.c             rb_hash_modify(hash);
rb_hash_modify    661 hash.c             rb_hash_modify(hash);
rb_hash_modify    714 hash.c             rb_hash_modify(hash);
rb_hash_modify    756 hash.c             rb_hash_modify(hash);
rb_hash_modify    883 hash.c             rb_hash_modify(hash);
rb_hash_modify    913 hash.c             rb_hash_modify(hash);


rb_hash_new

rb_hash_new      2611 array.c            VALUE hash = rb_hash_new();
rb_hash_new      3693 eval.c         	    VALUE hash = rb_hash_new();
rb_hash_new       449 ext/dbm/dbm.c      VALUE hash = rb_hash_new();
rb_hash_new       739 ext/dbm/dbm.c      hash = rb_hash_new();
rb_hash_new       693 ext/dl/dl.c      DLFuncTable = rb_hash_new();
rb_hash_new      1062 ext/dl/ptr.c     DLMemoryTable = rb_hash_new();
rb_hash_new       552 ext/gdbm/gdbm.c     VALUE hash = rb_hash_new();
rb_hash_new       929 ext/gdbm/gdbm.c     hash = rb_hash_new();
rb_hash_new       907 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       428 ext/sdbm/init.c     VALUE hash = rb_hash_new();
rb_hash_new       721 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      1311 ext/syck/rubyext.c             v = rb_hash_new();
rb_hash_new      1979 ext/syck/rubyext.c     bonus->data = rb_hash_new();
rb_hash_new      1983 ext/syck/rubyext.c         options = rb_hash_new();
rb_hash_new      2095 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      1280 ext/win32ole/win32ole.c     constant = rb_hash_new();
rb_hash_new      1527 hash.c             VALUE h = rb_hash_new();
rb_hash_new      2298 hash.c             VALUE hash = rb_hash_new();
rb_hash_new       256 intern.h       VALUE rb_hash_new _((void));
rb_hash_new      1180 marshal.c      	    v = rb_hash_new();
rb_hash_new      1426 marshal.c          arg.data   = rb_hash_new();
rb_hash_new       753 signal.c           VALUE h = rb_hash_new();


rb_hash_replace

rb_hash_replace  2424 hash.c             rb_define_method(rb_cHash,"initialize_copy", rb_hash_replace, 1);
rb_hash_replace  2466 hash.c             rb_define_method(rb_cHash,"replace", rb_hash_replace, 1);


rb_hash_size

rb_hash_size     2443 hash.c             rb_define_method(rb_cHash,"size", rb_hash_size, 0);
rb_hash_size     2444 hash.c             rb_define_method(rb_cHash,"length", rb_hash_size, 0);


rb_hash_to_a

rb_hash_to_a     1193 hash.c             VALUE entries = rb_hash_to_a(hash);
rb_hash_to_a     1254 hash.c             return rb_ary_to_s(rb_hash_to_a(hash));
rb_hash_to_a     2428 hash.c             rb_define_method(rb_cHash,"to_a", rb_hash_to_a, 0);


rb_hash_update

rb_hash_update   1605 hash.c             return rb_hash_update(rb_obj_dup(hash1), hash2);
rb_hash_update   2465 hash.c             rb_define_method(rb_cHash,"update", rb_hash_update, 1);
rb_hash_update   2467 hash.c             rb_define_method(rb_cHash,"merge!", rb_hash_update, 1);


rb_id2name

rb_id2name        916 array.c            rb_warn("Array#%s is deprecated; use Array#values_at", rb_id2name(rb_frame_last_func()));
rb_id2name        544 class.c        	rb_ary_push(ary, rb_str_new2(rb_id2name(name)));
rb_id2name       1087 error.c        	     rb_id2name(ruby_frame->last_func));
rb_id2name        228 eval.c         		     rb_id2name(ruby_frame->last_func), ruby_safe_level);
rb_id2name        250 eval.c         		     rb_id2name(ruby_frame->last_func));
rb_id2name        277 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        677 eval.c         	rb_name_error(id, "invalid attribute name `%s'", rb_id2name(id));
rb_id2name        679 eval.c             name = rb_id2name(id);
rb_id2name       1140 eval.c         			rb_id2name(ruby_frame->last_func));
rb_id2name       1965 eval.c         	rb_raise(rb_eSecurityError, "Insecure: can't undef `%s'", rb_id2name(id));
rb_id2name       1969 eval.c         	rb_warn("undefining `%s' may cause serious problem", rb_id2name(id));
rb_id2name       1990 eval.c         		      rb_id2name(id),s0,rb_class2name(c));
rb_id2name       2096 eval.c         	    rb_warning("discarding old %s", rb_id2name(name));
rb_id2name       3415 eval.c         				  rb_id2name(ruby_frame->orig_func));
rb_id2name       3819 eval.c         			rb_id2name(node->nd_mid));
rb_id2name       3825 eval.c         		    rb_warning("method redefined; discarding old %s", rb_id2name(node->nd_mid));
rb_id2name       3864 eval.c         			 rb_id2name(node->nd_mid),
rb_id2name       3875 eval.c         		    rb_warning("redefine %s", rb_id2name(node->nd_mid));
rb_id2name       3930 eval.c         			     rb_id2name(cname));
rb_id2name       3936 eval.c         				 rb_id2name(cname));
rb_id2name       3947 eval.c         		rb_set_class_path(klass, cbase, rb_id2name(cname));
rb_id2name       3976 eval.c         			     rb_id2name(cname));
rb_id2name       3984 eval.c         		rb_set_class_path(module, cbase, rb_id2name(cname));
rb_id2name       5674 eval.c         		       len, rb_class2name(klass), rb_id2name(id));
rb_id2name       5747 eval.c         			     rb_id2name(id));
rb_id2name       5884 eval.c         		 rb_id2name(mid), recv);
rb_id2name       6078 eval.c         		      rb_id2name(ruby_frame->orig_func));
rb_id2name       6112 eval.c         		     rb_id2name(frame->last_func));
rb_id2name       6137 eval.c         		     rb_id2name(frame->prev->last_func));
rb_id2name       6552 eval.c         			 rb_id2name(ruby_frame->last_func),
rb_id2name       6553 eval.c         			 rb_id2name(ruby_frame->last_func));
rb_id2name       7329 eval.c         		rb_bug("undefined method `%s'; can't happen", rb_id2name(id));
rb_id2name       7574 eval.c         	    rb_ary_push(ary, rb_str_new2(rb_id2name(tbl[i])));
rb_id2name       7581 eval.c         	    rb_ary_push(ary, rb_str_new2(rb_id2name(vars->id)));
rb_id2name       8356 eval.c         		   rb_id2name(ruby_frame->last_func));
rb_id2name       9254 eval.c             rb_str_buf_cat2(str, rb_id2name(data->oid));
rb_id2name       12879 eval.c         		     rb_id2name(SYM2ID(tag)),
rb_id2name       12885 eval.c         	rb_name_error(SYM2ID(tag), "uncaught throw `%s'", rb_id2name(SYM2ID(tag)));
rb_id2name        822 ext/dl/ptr.c   	   rb_id2name(id), rb_class2name(CLASS_OF(self)));
rb_id2name        991 ext/dl/ptr.c   	   rb_id2name(id), rb_class2name(CLASS_OF(self)));
rb_id2name        353 ext/openssl/ossl_pkcs7.c     if(TYPE(sym) == T_SYMBOL) s = rb_id2name(SYM2ID(sym));
rb_id2name        161 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       2670 ext/win32ole/win32ole.c     mname = rb_id2name(id);
rb_id2name       1892 gc.c               if (SYMBOL_P(ptr) && rb_id2name(SYM2ID((VALUE)ptr)) != 0) {
rb_id2name        628 hash.c         	    rb_id2name(rb_frame_last_func()));
rb_id2name       2279 hash.c         	    rb_id2name(rb_frame_last_func()));
rb_id2name       3962 io.c           		 rb_id2name(id), rb_id2name(mid),
rb_id2name        331 marshal.c          char *sym = rb_id2name(id);
rb_id2name        936 marshal.c          return rb_id2name(r_symbol(arg));
rb_id2name       1219 marshal.c      			     rb_id2name(slot),
rb_id2name       1220 marshal.c      			     rb_id2name(SYM2ID(RARRAY(mem)->ptr[i])));
rb_id2name        196 numeric.c      	     rb_id2name(rb_to_id(name)),
rb_id2name       2585 numeric.c          char *name = rb_id2name(FIX2UINT(fix));
rb_id2name       2609 numeric.c          if (rb_id2name(id)) {
rb_id2name        396 object.c           ivname = rb_id2name(id);
rb_id2name       1173 object.c           name = rb_id2name(id);
rb_id2name       1200 object.c           return rb_str_new2(rb_id2name(SYM2ID(sym)));
rb_id2name       1671 object.c       	if (!rb_id2name(id)) {
rb_id2name       1815 object.c       	rb_name_error(id, "wrong constant name %s", rb_id2name(id));
rb_id2name       1839 object.c       	rb_name_error(id, "wrong constant name %s", rb_id2name(id));
rb_id2name       1862 object.c       	rb_name_error(id, "wrong constant name %s", rb_id2name(id));
rb_id2name       2009 object.c       	rb_name_error(id, "`%s' is not allowed as an instance variable name", rb_id2name(id));
rb_id2name       2042 object.c       	rb_name_error(id, "`%s' is not allowed as an instance variable name", rb_id2name(id));
rb_id2name       2071 object.c       	rb_name_error(id, "`%s' is not allowed as an class variable name", rb_id2name(id));
rb_id2name       2105 object.c       	rb_name_error(id, "`%s' is not allowed as an class variable name", rb_id2name(id));
rb_id2name       8839 parse.c        		rb_id2name(id), rb_id2name(id));
rb_id2name       8855 parse.c            rb_compile_error("identifier %s is not valid", rb_id2name(id));
rb_id2name       8914 parse.c        	rb_compile_error("identifier %s is not valid", rb_id2name(id));
rb_id2name       9112 parse.c        	    useless = rb_id2name(node->nd_mid);
rb_id2name       10086 parse.c        	name = rb_id2name(id2);
rb_id2name       10093 parse.c        	    return rb_id2name(id);
rb_id2name       4841 parse.y        		rb_id2name(id), rb_id2name(id));
rb_id2name       4857 parse.y            rb_compile_error("identifier %s is not valid", rb_id2name(id));
rb_id2name       4916 parse.y        	rb_compile_error("identifier %s is not valid", rb_id2name(id));
rb_id2name       5114 parse.y        	    useless = rb_id2name(node->nd_mid);
rb_id2name       6088 parse.y        	name = rb_id2name(id2);
rb_id2name       6095 parse.y        	    return rb_id2name(id);
rb_id2name       2155 re.c               rb_warn("modifying %s is deprecated", rb_id2name(id));
rb_id2name        509 ruby.h         char *rb_id2name _((ID));
rb_id2name        245 signal.c       	s = rb_id2name(SYM2ID(argv[0]));
rb_id2name        566 signal.c       	s = rb_id2name(SYM2ID(arg->sig));
rb_id2name       4611 string.c       	rb_raise(rb_eTypeError, "value of %s must be String", rb_id2name(id));
rb_id2name         73 struct.c       	rb_ary_push(ary, rb_str_new2(rb_id2name(SYM2ID(*p))));
rb_id2name        114 struct.c           rb_name_error(id, "%s is not struct member", rb_id2name(id));
rb_id2name        176 struct.c       		  rb_id2name(id));
rb_id2name        204 struct.c       	nstr = rb_define_class_under(klass, rb_id2name(id), klass);
rb_id2name        492 struct.c       	    p = rb_id2name(id);
rb_id2name        582 struct.c           rb_name_error(id, "no member '%s' in struct", rb_id2name(id));
rb_id2name        647 struct.c           rb_name_error(id, "no member '%s' in struct", rb_id2name(id));
rb_id2name         50 variable.c         path = rb_str_new2(rb_id2name(name));
rb_id2name         61 variable.c     	tmp = rb_str_new2(rb_id2name(fc->name));
rb_id2name        157 variable.c     	    path = rb_str_new2(rb_id2name(SYM2ID(path)));
rb_id2name        369 variable.c         rb_warning("global variable `%s' not initialized", rb_id2name(id));
rb_id2name        449 variable.c         rb_name_error(id, "%s is a read-only variable", rb_id2name(id));
rb_id2name        643 variable.c     	rb_name_error(id, "undefined global variable %s", rb_id2name(id));
rb_id2name        764 variable.c         rb_ary_push(ary, rb_str_new2(rb_id2name(key)));
rb_id2name        865 variable.c     	rb_warning("instance variable %s not initialized", rb_id2name(id));
rb_id2name       1021 variable.c     	rb_warning("instance variable %s not initialized", rb_id2name(id));
rb_id2name       1092 variable.c     	rb_ary_push(ary, rb_str_new2(rb_id2name(key)));
rb_id2name       1176 variable.c     	rb_name_error(id, "`%s' is not allowed as an instance variable name", rb_id2name(id));
rb_id2name       1195 variable.c         rb_name_error(id, "instance variable %s not defined", rb_id2name(id));
rb_id2name       1208 variable.c     		      rb_id2name(id));
rb_id2name       1210 variable.c     	rb_name_error(id, "uninitialized constant %s", rb_id2name(id));
rb_id2name       1282 variable.c     	rb_raise(rb_eNameError, "autoload must be constant name", rb_id2name(id));
rb_id2name       1416 variable.c     			rb_id2name(id), rb_class2name(klass), rb_id2name(id));
rb_id2name       1473 variable.c     	rb_name_error(id, "`%s' is not allowed as a constant name", rb_id2name(id));
rb_id2name       1488 variable.c     		 rb_class2name(mod), rb_id2name(id));
rb_id2name       1491 variable.c     		  rb_class2name(mod), rb_id2name(id));
rb_id2name       1544 variable.c         rb_ary_push(ary, rb_str_new2(rb_id2name(key)));
rb_id2name       1660 variable.c     		rb_warn("already initialized %s %s", dest, rb_id2name(id));
rb_id2name       1722 variable.c     			   rb_id2name(id), rb_class2name(original_module(a)),
rb_id2name       1746 variable.c     		rb_warning("already initialized class variable %s", rb_id2name(id));
rb_id2name       1782 variable.c     		  rb_id2name(id), rb_class2name(klass));
rb_id2name       1850 variable.c     	VALUE kval = rb_str_new2(rb_id2name(key));
rb_id2name       1919 variable.c     	rb_name_error(id, "wrong class variable name %s", rb_id2name(id));
rb_id2name       1930 variable.c     		 rb_id2name(id), rb_class2name(mod));
rb_id2name       1933 variable.c     		  rb_id2name(id), rb_class2name(mod));


rb_id_attrset

rb_id_attrset     691 eval.c         	rb_add_method(klass, rb_id_attrset(id), NEW_ATTRSET(attriv), noex);
rb_id_attrset     329 intern.h       ID rb_id_attrset _((ID));
rb_id_attrset     280 node.h         #define NEW_OP_ASGN22(i,o) NEW_NODE(NODE_OP_ASGN2,i,o,rb_id_attrset(i))
rb_id_attrset    8948 parse.c            return NEW_ATTRASGN(recv, rb_id_attrset(id), 0);
rb_id_attrset    10036 parse.c        		id = rb_id_attrset(id);
rb_id_attrset    4950 parse.y            return NEW_ATTRASGN(recv, rb_id_attrset(id), 0);
rb_id_attrset    6038 parse.y        		id = rb_id_attrset(id);
rb_id_attrset     171 struct.c       	if (rb_id_attrset(SYM2ID(slot)) == id) {
rb_id_attrset     222 struct.c       	    rb_define_method_id(nstr, rb_id_attrset(id), rb_struct_set, 1);


rb_include_module

rb_include_module 2968 array.c            rb_include_module(rb_cArray, rb_mEnumerable);
rb_include_module 1532 dir.c              rb_include_module(rb_cDir, rb_mEnumerable);
rb_include_module 3953 eval.c         		rb_include_module(klass, ruby_wrapper);
rb_include_module 3989 eval.c         		rb_include_module(module, ruby_wrapper);
rb_include_module 4011 eval.c         		rb_include_module(klass, ruby_wrapper);
rb_include_module 7366 eval.c             rb_include_module(include, module);
rb_include_module 7409 eval.c             rb_include_module(rb_singleton_class(obj), module);
rb_include_module  761 ext/dbm/dbm.c      rb_include_module(rb_cDBM, rb_mEnumerable);
rb_include_module  284 ext/enumerator/enumerator.c     rb_include_module(rb_cEnumerator, rb_mEnumerable);
rb_include_module  952 ext/gdbm/gdbm.c     rb_include_module(rb_cGDBM, rb_mEnumerable);
rb_include_module  897 ext/iconv/iconv.c     rb_include_module(rb_eIconvInvalidEncoding, rb_eIconvFailure);
rb_include_module  898 ext/iconv/iconv.c     rb_include_module(rb_eIconvIllegalSeq, rb_eIconvFailure);
rb_include_module  899 ext/iconv/iconv.c     rb_include_module(rb_eIconvInvalidChar, rb_eIconvFailure);
rb_include_module  900 ext/iconv/iconv.c     rb_include_module(rb_eIconvOutOfRange, rb_eIconvFailure);
rb_include_module  901 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  743 ext/sdbm/init.c     rb_include_module(rb_cDBM, rb_mEnumerable);
rb_include_module 1248 ext/stringio/stringio.c     rb_include_module(StringIO, rb_mEnumerable);
rb_include_module 2322 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 3413 ext/zlib/zlib.c     rb_include_module(cGzipReader, rb_mEnumerable);
rb_include_module 4421 file.c             rb_include_module(rb_cIO, rb_mFConst);
rb_include_module 4435 file.c             rb_include_module(rb_cStat, rb_mComparable);
rb_include_module 2419 hash.c             rb_include_module(rb_cHash, rb_mEnumerable);
rb_include_module 5578 io.c               rb_include_module(rb_cIO, rb_mEnumerable);
rb_include_module 2792 numeric.c          rb_include_module(rb_cNumeric, rb_mComparable);
rb_include_module 2826 numeric.c          rb_include_module(rb_cInteger, rb_mPrecision);
rb_include_module 2838 numeric.c          rb_include_module(rb_cFixnum, rb_mPrecision);
rb_include_module 2887 numeric.c          rb_include_module(rb_cFloat, rb_mPrecision);
rb_include_module 2598 object.c           rb_include_module(rb_cObject, rb_mKernel);
rb_include_module  650 range.c            rb_include_module(rb_cRange, rb_mEnumerable);
rb_include_module  483 ruby.h         void rb_include_module _((VALUE,VALUE));
rb_include_module 4634 string.c           rb_include_module(rb_cString, rb_mComparable);
rb_include_module 4635 string.c           rb_include_module(rb_cString, rb_mEnumerable);
rb_include_module  895 struct.c           rb_include_module(rb_cStruct, rb_mEnumerable);
rb_include_module 2047 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 3373 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 3372 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 3371 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 3370 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 3369 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 3376 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  3374 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 3375 ext/zlib/zlib.c     rb_define_method(cInflate, "sync_point?", rb_inflate_sync_point_p, 0);


rb_inspect

rb_inspect       1432 array.c        	s = rb_inspect(RARRAY(ary)->ptr[i]);
rb_inspect         43 compar.c       	y = rb_inspect(y);
rb_inspect        746 error.c        	    d = rb_protect(rb_inspect, obj, 0);
rb_inspect       9231 eval.c         	    rb_str_buf_append(str, rb_inspect(data->klass));
rb_inspect       9234 eval.c         	    rb_str_buf_append(str, rb_inspect(v));
rb_inspect       9238 eval.c         	    rb_str_buf_append(str, rb_inspect(data->recv));
rb_inspect       9240 eval.c         	    rb_str_buf_append(str, rb_inspect(v));
rb_inspect        128 ext/bigdecimal/bigdecimal.c                     RSTRING(rb_inspect(v))->ptr:
rb_inspect        316 ext/iconv/iconv.c 	args[0] = rb_inspect(failed);
rb_inspect        319 ext/iconv/iconv.c 	args[0] = rb_inspect(rb_str_substr(failed, 0, FAILED_MAXLEN));
rb_inspect        833 ext/iconv/iconv.c     str = rb_str_buf_append(str, rb_inspect(success));
rb_inspect        835 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        637 file.c         	    rb_str_append(str, rb_inspect(v));
rb_inspect       1208 hash.c             str2 = rb_inspect(key);
rb_inspect       1212 hash.c             str2 = rb_inspect(value);
rb_inspect       2145 hash.c         	    i = rb_inspect(rb_str_new2(s+1));
rb_inspect        301 intern.h       VALUE rb_inspect _((VALUE));
rb_inspect       3862 io.c               rb_io_write(rb_stdout, rb_obj_as_string(rb_inspect(obj)));
rb_inspect        119 numeric.c          volatile VALUE v = rb_inspect(x[1]);
rb_inspect        399 object.c           str2 = rb_inspect(value);
rb_inspect        870 object.c       		 RSTRING(rb_inspect(y))->ptr,
rb_inspect       1270 object.c       	    rb_str_append(s, rb_inspect(v));
rb_inspect       1683 object.c       	rb_raise(rb_eTypeError, "%s is not a symbol", RSTRING(rb_inspect(name))->ptr);
rb_inspect        542 range.c            str = rb_inspect(rb_ivar_get(range, id_beg));
rb_inspect        543 range.c            str2 = rb_inspect(rb_ivar_get(range, id_end));
rb_inspect       1942 re.c                                   str1 = rb_inspect(kcode_re);
rb_inspect       1943 re.c                                   str2 = rb_inspect(v);
rb_inspect        407 sprintf.c      		if (*p == 'p') arg = rb_inspect(arg);
rb_inspect        496 struct.c       	    rb_str_append(str, rb_inspect(slot));
rb_inspect        499 struct.c       	rb_str_append(str, rb_inspect(RSTRUCT(s)->ptr[i]));
rb_inspect       1267 variable.c     	rb_raise(rb_eTypeError, "wrong autoload table: %s", RSTRING(rb_inspect(av))->ptr);


rb_inspecting_p

rb_inspecting_p  1272 array.c        	    if (rb_inspecting_p(tmp)) {
rb_inspecting_p  1454 array.c            if (rb_inspecting_p(ary)) return rb_str_new2("[...]");
rb_inspecting_p  2942 file.c         	    if (rb_inspecting_p(tmp)) {
rb_inspecting_p  1246 hash.c             if (rb_inspecting_p(hash)) return rb_str_new2("{...}");
rb_inspecting_p  1274 hash.c             if (rb_inspecting_p(hash)) return rb_str_new2("{...}");
rb_inspecting_p    57 intern.h       VALUE rb_inspecting_p _((VALUE));
rb_inspecting_p  3776 io.c           	if (rb_inspecting_p(tmp)) {
rb_inspecting_p   443 object.c       	if (rb_inspecting_p(obj)) {
rb_inspecting_p   519 struct.c           if (rb_inspecting_p(s)) {


rb_int2big

rb_int2big        185 bignum.c           return rb_int2big(n);
rb_int2big        273 bignum.c       	val = rb_int2big(FIX2LONG(val));
rb_int2big        929 bignum.c       	y = rb_int2big(FIX2LONG(y));
rb_int2big        973 bignum.c       	y = rb_int2big(FIX2LONG(y));
rb_int2big       1170 bignum.c       	y = rb_int2big(FIX2LONG(y));
rb_int2big       1196 bignum.c       	y = rb_int2big(FIX2LONG(y));
rb_int2big       1225 bignum.c           if (FIXNUM_P(x)) x = rb_int2big(FIX2LONG(x));
rb_int2big       1228 bignum.c       	y = rb_int2big(FIX2LONG(y));
rb_int2big       1279 bignum.c       	if (divp) *divp = rb_int2big(0);
rb_int2big       1402 bignum.c       	if (divp) *divp = bigadd(*divp, rb_int2big(1), 0);
rb_int2big       1427 bignum.c       	y = rb_int2big(FIX2LONG(y));
rb_int2big       1461 bignum.c       	y = rb_int2big(FIX2LONG(y));
rb_int2big       1492 bignum.c       	y = rb_int2big(FIX2LONG(y));
rb_int2big       1521 bignum.c       	y = rb_int2big(FIX2LONG(y));
rb_int2big       1648 bignum.c       	y = rb_int2big(FIX2LONG(y));
rb_int2big       1704 bignum.c       	y = rb_int2big(FIX2LONG(y));
rb_int2big       1762 bignum.c       	y = rb_int2big(FIX2LONG(y));
rb_int2big       1971 bignum.c       	return rb_assoc_new(rb_int2big(FIX2LONG(y)), x);
rb_int2big         65 intern.h       VALUE rb_int2big _((long));
rb_int2big        493 marshal.c      	    w_object(rb_int2big(FIX2LONG(obj)), arg, limit);
rb_int2big       1956 numeric.c      	return rb_big2str(rb_int2big(FIX2INT(x)), 2);
rb_int2big       1984 numeric.c      	    r = rb_big_plus(rb_int2big(a), rb_int2big(b));
rb_int2big       2017 numeric.c      	    r = rb_big_minus(rb_int2big(a), rb_int2big(b));
rb_int2big       2052 numeric.c      	    r = rb_big_mul(rb_int2big(a), rb_int2big(b));
rb_int2big       2202 numeric.c      	    return rb_big_pow(rb_int2big(a), y);
rb_int2big       2450 numeric.c      	return rb_big_lshift(rb_int2big(val), y);
rb_int2big        529 sprintf.c      			val = rb_int2big(v);


rb_int2inum

rb_int2inum       443 dir.c              return rb_int2inum(pos);
rb_int2inum      2256 ext/zlib/zlib.c     rb_funcall(gz->io, id_seek, 2, rb_int2inum(-n), INT2FIX(1));
rb_int2inum        67 intern.h       VALUE rb_int2inum _((long));
rb_int2inum       135 ruby.h         VALUE rb_int2inum _((long));
rb_int2inum       136 ruby.h         #define INT2NUM(v) rb_int2inum(v)
rb_int2inum       138 ruby.h         #define rb_int_new(v) rb_int2inum(v)
rb_int2inum      4462 string.c       	return rb_int2inum(sum);


rb_intern

rb_intern         932 array.c            if (rb_respond_to(obj, rb_intern("to_ary"))) {
rb_intern        2474 array.c        	if (!rb_respond_to(ary2, rb_intern("to_ary"))) {
rb_intern        3053 array.c            id_cmp = rb_intern("<=>");
rb_intern        3054 array.c            inspect_key = rb_intern("__inspect_key__");
rb_intern          75 class.c        	id = rb_intern("__classpath__");
rb_intern          77 class.c        	id = rb_intern("__classid__");
rb_intern         146 class.c        	st_insert(RCLASS(klass)->iv_tbl, rb_intern("__attached__"), obj);
rb_intern         206 class.c            return rb_funcall(super, rb_intern("inherited"), 1, klass);
rb_intern         217 class.c            id = rb_intern(name);
rb_intern         249 class.c            id = rb_intern(name);
rb_intern         305 class.c            id = rb_intern(name);
rb_intern         327 class.c            id = rb_intern(name);
rb_intern         815 class.c            ID id = rb_intern(name);
rb_intern         829 class.c            rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PROTECTED);
rb_intern         839 class.c            rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PRIVATE);
rb_intern         847 class.c            rb_add_method(klass, rb_intern(name), 0, NOEX_UNDEF);
rb_intern         927 class.c            rb_alias(klass, rb_intern(name1), rb_intern(name2));
rb_intern         936 class.c            rb_attr(klass, rb_intern(name), read, write, Qfalse);
rb_intern         242 compar.c           cmp = rb_intern("<=>");
rb_intern        1374 dir.c              VALUE dir = rb_funcall(rb_cDir, rb_intern("open"), 1, path);
rb_intern         122 enum.c         	return rb_funcall(if_none, rb_intern("call"), 0, 0);
rb_intern         927 enum.c             id_eqq  = rb_intern("===");
rb_intern         928 enum.c             id_each = rb_intern("each");
rb_intern         929 enum.c             id_cmp  = rb_intern("<=>");
rb_intern         321 error.c            return rb_funcall(etype, rb_intern("new"), 1, rb_str_new(ptr, len));
rb_intern         404 error.c            VALUE mesg = rb_attr_get(exc, rb_intern("mesg"));
rb_intern         426 error.c            return rb_funcall(exc, rb_intern("to_s"), 0, 0);
rb_intern         491 error.c            ID bt = rb_intern("bt");
rb_intern         573 error.c            return rb_attr_get(exc, rb_intern("status"));
rb_intern         588 error.c            VALUE status = rb_attr_get(exc, rb_intern("status"));
rb_intern         652 error.c            return rb_attr_get(self, rb_intern("name"));
rb_intern         666 error.c            VALUE mesg = rb_attr_get(exc, rb_intern("mesg")), str = mesg;
rb_intern         787 error.c            return rb_attr_get(self, rb_intern("args"));
rb_intern         904 error.c        	error = rb_const_get(klass, rb_intern("Errno"));
rb_intern         938 error.c            return rb_attr_get(self, rb_intern("errno"));
rb_intern         959 error.c            num = rb_attr_get(exc, rb_intern("errno"));
rb_intern         966 error.c        	num = rb_const_get(klass, rb_intern("Errno"));
rb_intern         968 error.c            e = rb_const_get(self, rb_intern("Errno"));
rb_intern         386 eval.c         	(mid == rb_intern("initialize" )|| mid == rb_intern("initialize_copy"))) {
rb_intern         390 eval.c         	     mid == rb_intern("allocate")) {
rb_intern         550 eval.c             remove_method(klass, rb_intern(name));
rb_intern         686 eval.c             attriv = rb_intern(buf);
rb_intern        1156 eval.c             info = rb_funcall(info, rb_intern("backtrace"), 0);
rb_intern        1165 eval.c             rb_funcall(info, rb_intern("set_backtrace"), 1, bt);
rb_intern        1207 eval.c           	e = rb_funcall(ruby_errinfo, rb_intern("message"), 0, 0);
rb_intern        1670 eval.c         	id = rb_intern("break"); break;
rb_intern        1672 eval.c         	id = rb_intern("redo"); break;
rb_intern        1674 eval.c         	id = rb_intern("retry"); break;
rb_intern        1676 eval.c         	id = rb_intern("next"); break;
rb_intern        1678 eval.c         	id = rb_intern("return"); break;
rb_intern        1680 eval.c         	id = rb_intern("noreason"); break;
rb_intern        1764 eval.c         	    val = rb_funcall2(cmd, rb_intern("call"), RARRAY(arg)->len, RARRAY(arg)->ptr);
rb_intern        2746 eval.c         	ID id = rb_intern("to_a");
rb_intern        4595 eval.c         	exception = rb_intern("exception");
rb_intern        5494 eval.c         	args[n++] = rb_funcall(rb_const_get(exc, rb_intern("message")), '!',
rb_intern        6355 eval.c         		mesg  = rb_attr_get(ruby_errinfo, rb_intern("mesg"));
rb_intern        7388 eval.c         	rb_funcall(argv[argc], rb_intern("append_features"), 1, module);
rb_intern        7389 eval.c         	rb_funcall(argv[argc], rb_intern("included"), 1, module);
rb_intern        7485 eval.c         	rb_funcall(argv[argc], rb_intern("extend_object"), 1, obj);
rb_intern        7486 eval.c         	rb_funcall(argv[argc], rb_intern("extended"), 1, obj);
rb_intern        7750 eval.c             init = rb_intern("initialize");
rb_intern        7751 eval.c             eqq = rb_intern("===");
rb_intern        7752 eval.c             each = rb_intern("each");
rb_intern        7754 eval.c             aref = rb_intern("[]");
rb_intern        7755 eval.c             aset = rb_intern("[]=");
rb_intern        7756 eval.c             match = rb_intern("=~");
rb_intern        7757 eval.c             missing = rb_intern("method_missing");
rb_intern        7758 eval.c             added = rb_intern("method_added");
rb_intern        7759 eval.c             singleton_added = rb_intern("singleton_method_added");
rb_intern        7760 eval.c             removed = rb_intern("method_removed");
rb_intern        7761 eval.c             singleton_removed = rb_intern("singleton_method_removed");
rb_intern        7762 eval.c             undefined = rb_intern("method_undefined");
rb_intern        7763 eval.c             singleton_undefined = rb_intern("singleton_method_undefined");
rb_intern        7765 eval.c             __id__ = rb_intern("__id__");
rb_intern        7766 eval.c             __send__ = rb_intern("__send__");
rb_intern        7784 eval.c             respond_to   = rb_intern("respond_to?");
rb_intern        12836 eval.c             return rb_funcall(Qnil, rb_intern("catch"), 1, tag);
rb_intern        12845 eval.c             return rb_iterate((VALUE(*)_((VALUE)))catch_i, ID2SYM(rb_intern(tag)), func, data);
rb_intern        12901 eval.c             argv[0] = ID2SYM(rb_intern(tag));
rb_intern         467 ext/dbm/dbm.c      return rb_funcall(obj, rb_intern("each_pair"), 0, 0);
rb_intern         315 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          34 ext/digest/sha1/sha1init.c     id_metadata = rb_intern("metadata");
rb_intern          35 ext/digest/sha2/sha2init.c     id_metadata = rb_intern("metadata");
rb_intern         438 ext/dl/dl.c            e = rb_funcall(e, rb_intern("to_ptr"), 0);
rb_intern         507 ext/dl/dl.c          val0 = rb_funcall(val0, rb_intern("to_ptr"), 0);
rb_intern         686 ext/dl/dl.c      id_call = rb_intern("call");
rb_intern          22 ext/dl/ptr.c     return rb_funcall(hash, rb_intern("delete"), 1, key);
rb_intern         490 ext/dl/sym.c   	    pval = rb_funcall(argv[i], rb_intern("to_ptr"), 0);
rb_intern         984 ext/dl/sym.c     rb_dl_id_DLErrno = rb_intern("DLErrno");
rb_intern         988 ext/dl/sym.c     rb_dl_id_DLW32Error = rb_intern("DLW32Error");
rb_intern         289 ext/enumerator/enumerator.c     sym_each		= ID2SYM(rb_intern("each"));
rb_intern         290 ext/enumerator/enumerator.c     sym_each_with_index	= ID2SYM(rb_intern("each_with_index"));
rb_intern         291 ext/enumerator/enumerator.c     sym_each_slice	= ID2SYM(rb_intern("each_slice"));
rb_intern         292 ext/enumerator/enumerator.c     sym_each_cons	= ID2SYM(rb_intern("each_cons"));
rb_intern         294 ext/enumerator/enumerator.c     id_new		= rb_intern("new");
rb_intern         295 ext/enumerator/enumerator.c     id_enum_obj		= rb_intern("enum_obj");
rb_intern         296 ext/enumerator/enumerator.c     id_enum_method	= rb_intern("enum_method");
rb_intern         297 ext/enumerator/enumerator.c     id_enum_args	= rb_intern("enum_args");
rb_intern         570 ext/gdbm/gdbm.c     return rb_funcall(obj, rb_intern("each_pair"), 0, 0);
rb_intern         139 ext/iconv/iconv.c 	VALUE key = rb_funcall2(val, rb_intern("downcase"), 0, 0);
rb_intern         903 ext/iconv/iconv.c     rb_success = rb_intern("success");
rb_intern         904 ext/iconv/iconv.c     rb_failed = rb_intern("failed");
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         190 ext/openssl/ossl_ssl.c     ary = rb_funcall(cb, rb_intern("call"), 1, obj);
rb_intern         227 ext/openssl/ossl_ssl.c     dh = rb_funcall(cb, rb_intern("call"), 3, args[0], args[1], args[2]);
rb_intern         520 ext/openssl/ossl_ssl.c         ctx = rb_funcall(cSSLContext, rb_intern("new"), 0);
rb_intern         663 ext/openssl/ossl_ssl.c         ID id_sysread = rb_intern("sysread");
rb_intern         707 ext/openssl/ossl_ssl.c         ID id_syswrite = rb_intern("syswrite");
rb_intern         724 ext/openssl/ossl_ssl.c 	rb_funcall(ossl_ssl_get_io(self), rb_intern("close"), 0);
rb_intern         873 ext/openssl/ossl_ssl.c         rb_attr(cSSLContext, rb_intern(ossl_sslctx_attrs[i]), 1, 1, Qfalse);
rb_intern         882 ext/openssl/ossl_ssl.c         rb_attr(cSSLSocket, rb_intern(ossl_ssl_attr_readers[i]), 1, 0, Qfalse);
rb_intern         884 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         110 ext/readline/readline.c     if (!rb_respond_to(proc, rb_intern("call")))
rb_intern         158 ext/readline/readline.c     ary = rb_funcall(proc, rb_intern("call"), 1, rb_tainted_str_new2(text));
rb_intern         735 ext/readline/readline.c     completion_proc = rb_intern(COMPLETION_PROC);
rb_intern         736 ext/readline/readline.c     completion_case_fold = rb_intern(COMPLETION_CASE_FOLD);
rb_intern         446 ext/sdbm/init.c     return rb_funcall(obj, rb_intern("each_pair"), 0, 0);
rb_intern        1839 ext/socket/socket.c 	    for_fd = rb_intern("for_fd");
rb_intern        1288 ext/strscan/strscan.c     ID id_scanerr = rb_intern("ScanError");
rb_intern        1298 ext/strscan/strscan.c     rb_const_set(StringScanner, rb_intern("Version"), tmp);
rb_intern        1301 ext/strscan/strscan.c     rb_const_set(StringScanner, rb_intern("Id"), tmp);
rb_intern         492 ext/syck/rubyext.c                     cDate = rb_const_get( rb_cObject, rb_intern("Date") );
rb_intern        2154 ext/syck/rubyext.c     s_new = rb_intern("new");
rb_intern        2155 ext/syck/rubyext.c     s_utc = rb_intern("utc");
rb_intern        2156 ext/syck/rubyext.c     s_at = rb_intern("at");
rb_intern        2157 ext/syck/rubyext.c     s_to_f = rb_intern("to_f");
rb_intern        2158 ext/syck/rubyext.c     s_to_i = rb_intern("to_i");
rb_intern        2159 ext/syck/rubyext.c     s_read = rb_intern("read");
rb_intern        2160 ext/syck/rubyext.c     s_binmode = rb_intern("binmode");
rb_intern        2161 ext/syck/rubyext.c     s_transfer = rb_intern("transfer");
rb_intern        2162 ext/syck/rubyext.c     s_call = rb_intern("call");
rb_intern        2163 ext/syck/rubyext.c     s_cmp = rb_intern("<=>");
rb_intern        2164 ext/syck/rubyext.c     s_intern = rb_intern("intern");
rb_intern        2165 ext/syck/rubyext.c     s_update = rb_intern("update");
rb_intern        2166 ext/syck/rubyext.c     s_detect_implicit = rb_intern("detect_implicit");
rb_intern        2167 ext/syck/rubyext.c     s_dup = rb_intern("dup");
rb_intern        2168 ext/syck/rubyext.c     s_default_set = rb_intern("default=");
rb_intern        2169 ext/syck/rubyext.c     s_match = rb_intern("match");
rb_intern        2170 ext/syck/rubyext.c     s_push = rb_intern("push");
rb_intern        2171 ext/syck/rubyext.c     s_haskey = rb_intern("has_key?");
rb_intern        2172 ext/syck/rubyext.c     s_keys = rb_intern("keys");
rb_intern        2173 ext/syck/rubyext.c     s_node_import = rb_intern("node_import");
rb_intern        2174 ext/syck/rubyext.c     s_tr_bang = rb_intern("tr!");
rb_intern        2175 ext/syck/rubyext.c     s_unpack = rb_intern("unpack");
rb_intern        2176 ext/syck/rubyext.c     s_write = rb_intern("write");
rb_intern        2177 ext/syck/rubyext.c     s_tag_read_class = rb_intern( "yaml_tag_read_class" );
rb_intern        2178 ext/syck/rubyext.c     s_tag_subclasses = rb_intern( "yaml_tag_subclasses?" );
rb_intern        2179 ext/syck/rubyext.c     s_emitter = rb_intern( "emitter" );
rb_intern        2180 ext/syck/rubyext.c     s_set_resolver = rb_intern( "set_resolver" );
rb_intern        2181 ext/syck/rubyext.c     s_node_export = rb_intern( "node_export" );
rb_intern        2182 ext/syck/rubyext.c     s_to_yaml = rb_intern( "to_yaml" );
rb_intern        2183 ext/syck/rubyext.c     s_transform = rb_intern( "transform" );
rb_intern        2184 ext/syck/rubyext.c     s_yaml_new = rb_intern("yaml_new");
rb_intern        2185 ext/syck/rubyext.c     s_yaml_initialize = rb_intern("yaml_initialize");
rb_intern        2187 ext/syck/rubyext.c     s_tags = rb_intern("@tags");
rb_intern        2188 ext/syck/rubyext.c     s_name = rb_intern("@name");
rb_intern        2189 ext/syck/rubyext.c     s_options = rb_intern("@options");
rb_intern        2190 ext/syck/rubyext.c     s_kind = rb_intern("@kind");
rb_intern        2191 ext/syck/rubyext.c     s_type_id = rb_intern("@type_id");
rb_intern        2192 ext/syck/rubyext.c     s_type_id_set = rb_intern("type_id=");
rb_intern        2193 ext/syck/rubyext.c     s_resolver = rb_intern("@resolver");
rb_intern        2194 ext/syck/rubyext.c     s_level = rb_intern( "@level" );
rb_intern        2195 ext/syck/rubyext.c     s_style = rb_intern("@style");
rb_intern        2196 ext/syck/rubyext.c     s_style_set = rb_intern("style=");
rb_intern        2197 ext/syck/rubyext.c     s_value = rb_intern("@value");
rb_intern        2198 ext/syck/rubyext.c     s_value_set = rb_intern("value=");
rb_intern        2199 ext/syck/rubyext.c     s_out = rb_intern("@out");
rb_intern        2200 ext/syck/rubyext.c     s_input = rb_intern("@input");
rb_intern        2202 ext/syck/rubyext.c     sym_model = ID2SYM(rb_intern("Model"));
rb_intern        2203 ext/syck/rubyext.c     sym_generic = ID2SYM(rb_intern("Generic"));
rb_intern        2204 ext/syck/rubyext.c     sym_bytecode = ID2SYM(rb_intern("bytecode"));
rb_intern        2205 ext/syck/rubyext.c     sym_map = ID2SYM(rb_intern("map"));
rb_intern        2206 ext/syck/rubyext.c     sym_scalar = ID2SYM(rb_intern("scalar"));
rb_intern        2207 ext/syck/rubyext.c     sym_seq = ID2SYM(rb_intern("seq"));
rb_intern        2208 ext/syck/rubyext.c     sym_1quote = ID2SYM(rb_intern("quote1"));
rb_intern        2209 ext/syck/rubyext.c     sym_2quote = ID2SYM(rb_intern("quote2"));
rb_intern        2210 ext/syck/rubyext.c     sym_fold = ID2SYM(rb_intern("fold"));
rb_intern        2211 ext/syck/rubyext.c     sym_literal = ID2SYM(rb_intern("literal"));
rb_intern        2212 ext/syck/rubyext.c     sym_plain = ID2SYM(rb_intern("plain"));
rb_intern        2213 ext/syck/rubyext.c     sym_inline = ID2SYM(rb_intern("inline"));
rb_intern        2229 ext/syck/rubyext.c     oDefaultResolver = rb_funcall( cResolver, rb_intern( "new" ), 0 );
rb_intern        2234 ext/syck/rubyext.c     oGenericResolver = rb_funcall( cResolver, rb_intern( "new" ), 0 );
rb_intern        2322 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         275 ext/win32ole/win32ole.c     *rgDispId = rb_intern(psz);
rb_intern         301 ext/win32ole/win32ole.c             dispIdMember = rb_intern("call");
rb_intern         303 ext/win32ole/win32ole.c             dispIdMember = rb_intern("value");
rb_intern         445 ext/win32ole/win32ole.c     y = FIX2INT(rb_funcall(tmobj, rb_intern("year"), 0));
rb_intern         446 ext/win32ole/win32ole.c     m = FIX2INT(rb_funcall(tmobj, rb_intern("month"), 0));
rb_intern         447 ext/win32ole/win32ole.c     d = FIX2INT(rb_funcall(tmobj, rb_intern("mday"), 0));
rb_intern         448 ext/win32ole/win32ole.c     hh = FIX2INT(rb_funcall(tmobj, rb_intern("hour"), 0));
rb_intern         449 ext/win32ole/win32ole.c     mm = FIX2INT(rb_funcall(tmobj, rb_intern("min"), 0));
rb_intern         450 ext/win32ole/win32ole.c     ss = FIX2INT(rb_funcall(tmobj, rb_intern("sec"), 0));
rb_intern        1306 ext/win32ole/win32ole.c                 id = rb_intern(pName);
rb_intern        1764 ext/win32ole/win32ole.c         helpfile = rb_funcall(target, rb_intern("helpfile"), 0);
rb_intern        1766 ext/win32ole/win32ole.c             name = rb_ivar_get(target, rb_intern("name"));
rb_intern        1770 ext/win32ole/win32ole.c         helpcontext = rb_funcall(target, rb_intern("helpcontext"), 0);
rb_intern        1951 ext/win32ole/win32ole.c     VALUE argv = rb_const_get(cWIN32OLE, rb_intern("ARGV"));
rb_intern        2024 ext/win32ole/win32ole.c         cNamedArgs = NUM2INT(rb_funcall(param, rb_intern("length"), 0));
rb_intern        3392 ext/win32ole/win32ole.c     rb_ivar_set(self, rb_intern("name"), name);
rb_intern        3493 ext/win32ole/win32ole.c     return rb_ivar_get(self, rb_intern("name"));
rb_intern        3929 ext/win32ole/win32ole.c         rb_ivar_set(var, rb_intern("name"), WC2VSTR(bstr));
rb_intern        4021 ext/win32ole/win32ole.c     return rb_ivar_get(self, rb_intern("name"));
rb_intern        4321 ext/win32ole/win32ole.c     rb_ivar_set(self, rb_intern("name"), name);
rb_intern        4391 ext/win32ole/win32ole.c     return rb_ivar_get(self, rb_intern("name"));
rb_intern        4708 ext/win32ole/win32ole.c                             rb_ivar_get(self, rb_intern("name")));
rb_intern        5029 ext/win32ole/win32ole.c             rb_ivar_set(param, rb_intern("name"), WC2VSTR(bstrs[i]));
rb_intern        5079 ext/win32ole/win32ole.c     return rb_ivar_get(self, rb_intern("name"));
rb_intern        5606 ext/win32ole/win32ole.c         result = rb_apply(handler, rb_intern("call"), args);
rb_intern        5610 ext/win32ole/win32ole.c         result = rb_apply(handler, rb_intern("call"), args);
rb_intern        5981 ext/win32ole/win32ole.c         = NUM2INT(rb_funcall(ary_ole_event, rb_intern("length"), 0));
rb_intern        6084 ext/win32ole/win32ole.c     id_events = rb_intern("events");
rb_intern        3398 ext/zlib/zlib.c     id_write = rb_intern("write");
rb_intern        3399 ext/zlib/zlib.c     id_read = rb_intern("read");
rb_intern        3400 ext/zlib/zlib.c     id_flush = rb_intern("flush");
rb_intern        3401 ext/zlib/zlib.c     id_seek = rb_intern("seek");
rb_intern        3402 ext/zlib/zlib.c     id_close = rb_intern("close");
rb_intern        1654 gc.c               if (!rb_respond_to(block, rb_intern("call"))) {
rb_intern        1737 gc.c               else if (!rb_respond_to(block, rb_intern("call"))) {
rb_intern        1455 hash.c         	if (!rb_respond_to(hash2, rb_intern("to_hash"))) {
rb_intern        2413 hash.c             id_hash = rb_intern("hash");
rb_intern        2414 hash.c             id_call = rb_intern("call");
rb_intern        2415 hash.c             id_default = rb_intern("default");
rb_intern        2157 io.c               return rb_funcall(io, rb_intern("close"), 0, 0);
rb_intern        4203 io.c           	rb_funcall3(file, rb_intern("close"), 0, 0);
rb_intern        4400 io.c           	line = rb_funcall3(current_file, rb_intern("gets"), argc, argv);
rb_intern        4469 io.c           	return rb_funcall3(rb_stdin, rb_intern("getc"), 0, 0);
rb_intern        5318 io.c           	byte = rb_funcall3(current_file, rb_intern("getc"), 0, 0);
rb_intern        5554 io.c               id_write = rb_intern("write");
rb_intern        5555 io.c               id_read = rb_intern("read");
rb_intern        5556 io.c               id_getc = rb_intern("getc");
rb_intern         353 marshal.c          w_symbol(rb_intern(s), arg);
rb_intern         916 marshal.c          id = rb_intern(RSTRING(r_bytes(arg))->ptr);
rb_intern        1347 marshal.c      	rb_funcall(proc, rb_intern("call"), 1, v);
rb_intern        1396 marshal.c          if (rb_respond_to(port, rb_intern("to_str"))) {
rb_intern        1472 marshal.c          s_dump = rb_intern("_dump");
rb_intern        1473 marshal.c          s_load = rb_intern("_load");
rb_intern        1474 marshal.c          s_mdump = rb_intern("marshal_dump");
rb_intern        1475 marshal.c          s_mload = rb_intern("marshal_load");
rb_intern        1476 marshal.c          s_dump_data = rb_intern("_dump_data");
rb_intern        1477 marshal.c          s_load_data = rb_intern("_load_data");
rb_intern        1478 marshal.c          s_alloc = rb_intern("_alloc");
rb_intern        1479 marshal.c          s_getc = rb_intern("getc");
rb_intern        1480 marshal.c          s_read = rb_intern("read");
rb_intern        1481 marshal.c          s_write = rb_intern("write");
rb_intern        1482 marshal.c          s_binmode = rb_intern("binmode");
rb_intern         398 numeric.c      	return rb_funcall(num, rb_intern("-@"), 0);
rb_intern         438 numeric.c          if (RTEST(rb_funcall(num, rb_intern("zero?"), 0, 0))) {
rb_intern        1872 numeric.c             return rb_funcall(x, rb_intern("to_f"), 0);
rb_intern        2783 numeric.c          id_coerce = rb_intern("coerce");
rb_intern        2784 numeric.c          id_to_i = rb_intern("to_i");
rb_intern        2785 numeric.c          id_eq = rb_intern("==");
rb_intern         456 object.c           return rb_funcall(obj, rb_intern("to_s"), 0, 0);
rb_intern        1655 object.c           return rb_intern(RSTRING(str)->ptr);
rb_intern        2119 object.c           m = rb_intern(method);
rb_intern        2500 object.c           ID id = rb_intern(name);
rb_intern        2778 object.c           id_eq = rb_intern("==");
rb_intern        2779 object.c           id_eql = rb_intern("eql?");
rb_intern        2780 object.c           id_inspect = rb_intern("inspect");
rb_intern        2781 object.c           id_init_copy = rb_intern("initialize_copy");
rb_intern        3760 parse.c        		        yyval.node = NEW_VALIAS(yyvsp[-1].id, rb_intern(buf));
rb_intern        5643 parse.c        		            yyvsp[-3].node = node_assign(yyvsp[-3].node, NEW_GVAR(rb_intern("$!")));
rb_intern        5915 parse.c        				    yyval.node->nd_lit = ID2SYM(rb_intern(RSTRING(yyval.node->nd_lit)->ptr));
rb_intern        6572 parse.c        	rb_const_defined(rb_cObject, rb_intern("SCRIPT_LINES__"))) {
rb_intern        6575 parse.c        	hash = rb_const_get(rb_cObject, rb_intern("SCRIPT_LINES__"));
rb_intern        8276 parse.c        	    yylval.id = rb_intern(tok());
rb_intern        8291 parse.c        	    yylval.id = rb_intern(tok());
rb_intern        8442 parse.c        			yylval.id = rb_intern(kw->name);
rb_intern        8478 parse.c        	yylval.id = rb_intern(tok());
rb_intern        9297 parse.c        	return call_op(node,tEQ,1,NEW_GVAR(rb_intern("$.")));
rb_intern        9343 parse.c        	return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_")));
rb_intern        9802 parse.c        		     NEW_FCALL(rb_intern("print"),
rb_intern        9803 parse.c        			       NEW_ARRAY(NEW_GVAR(rb_intern("$_")))));
rb_intern        9812 parse.c        	    block_append(NEW_GASGN(rb_intern("$F"),
rb_intern        9813 parse.c        				   NEW_CALL(NEW_GVAR(rb_intern("$_")),
rb_intern        9814 parse.c        					    rb_intern("split"), 0)),
rb_intern        9819 parse.c        	    block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")),
rb_intern        9820 parse.c        				  rb_intern("chop!"), 0), ruby_eval_tree);
rb_intern        10034 parse.c        	    id = rb_intern(buf);
rb_intern        10092 parse.c        	    rb_intern(buf);
rb_intern         425 parse.y        		        $$ = NEW_VALIAS($2, rb_intern(buf));
rb_intern        1895 parse.y        		            $3 = node_assign($3, NEW_GVAR(rb_intern("$!")));
rb_intern        2159 parse.y        				    $$->nd_lit = ID2SYM(rb_intern(RSTRING($$->nd_lit)->ptr));
rb_intern        2574 parse.y        	rb_const_defined(rb_cObject, rb_intern("SCRIPT_LINES__"))) {
rb_intern        2577 parse.y        	hash = rb_const_get(rb_cObject, rb_intern("SCRIPT_LINES__"));
rb_intern        4278 parse.y        	    yylval.id = rb_intern(tok());
rb_intern        4293 parse.y        	    yylval.id = rb_intern(tok());
rb_intern        4444 parse.y        			yylval.id = rb_intern(kw->name);
rb_intern        4480 parse.y        	yylval.id = rb_intern(tok());
rb_intern        5299 parse.y        	return call_op(node,tEQ,1,NEW_GVAR(rb_intern("$.")));
rb_intern        5345 parse.y        	return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_")));
rb_intern        5804 parse.y        		     NEW_FCALL(rb_intern("print"),
rb_intern        5805 parse.y        			       NEW_ARRAY(NEW_GVAR(rb_intern("$_")))));
rb_intern        5814 parse.y        	    block_append(NEW_GASGN(rb_intern("$F"),
rb_intern        5815 parse.y        				   NEW_CALL(NEW_GVAR(rb_intern("$_")),
rb_intern        5816 parse.y        					    rb_intern("split"), 0)),
rb_intern        5821 parse.y        	    block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")),
rb_intern        5822 parse.y        				  rb_intern("chop!"), 0), ruby_eval_tree);
rb_intern        6036 parse.y        	    id = rb_intern(buf);
rb_intern        6094 parse.y        	    rb_intern(buf);
rb_intern         139 prec.c             prc_pr = rb_intern("prec");
rb_intern         140 prec.c             prc_if = rb_intern("induced_from");
rb_intern          88 range.c        	rb_name_error(rb_intern("initialize"), "`initialize' called twice");
rb_intern         341 range.c        	    ID c = rb_intern(EXCL(range) ? "<" : "<=");
rb_intern         670 range.c            id_cmp = rb_intern("<=>");
rb_intern         671 range.c            id_succ = rb_intern("succ");
rb_intern         672 range.c            id_beg = rb_intern("begin");
rb_intern         673 range.c            id_end = rb_intern("end");
rb_intern         674 range.c            id_excl = rb_intern("excl");
rb_intern         508 ruby.h         ID rb_intern _((const char*));
rb_intern         938 string.c       	if (!rb_respond_to(str2, rb_intern("to_str"))) {
rb_intern        1005 string.c       	if (!rb_respond_to(str2, rb_intern("to_str"))) {
rb_intern        1008 string.c       	else if (!rb_respond_to(str2, rb_intern("<=>"))) {
rb_intern        1012 string.c       	    VALUE tmp = rb_funcall(str2, rb_intern("<=>"), 1, str1);
rb_intern        1304 string.c       	return rb_funcall(y, rb_intern("=~"), 1, x);
rb_intern        1329 string.c           return rb_funcall(get_pat(re, 0), rb_intern("match"), 1, str);
rb_intern        1450 string.c           ID succ = rb_intern("succ");
rb_intern        4399 string.c           id = rb_intern(RSTRING(str)->ptr);
rb_intern        4445 string.c       	    mod = rb_funcall(INT2FIX(1), rb_intern("<<"), 1, INT2FIX(bits));
rb_intern        4751 string.c           id_to_s = rb_intern("to_s");
rb_intern          27 struct.c           id = rb_intern(name);
rb_intern         196 struct.c       	id = rb_intern(cname);
rb_intern         256 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         152 variable.c     	    ID classid = rb_intern("__classid__");
rb_intern         254 variable.c     	id = rb_intern(RSTRING(str)->ptr);
rb_intern         483 variable.c         if (name[0] == '$') id = rb_intern(name);
rb_intern         488 variable.c     	id = rb_intern(buf);
rb_intern        1219 variable.c         return rb_funcall(klass, rb_intern("const_missing"), 1, ID2SYM(id));
rb_intern        1682 variable.c         ID id = rb_intern(name);
rb_intern        1810 variable.c         ID id = rb_intern(name);
rb_intern        1822 variable.c         ID id = rb_intern(name);
rb_intern        1835 variable.c         ID id = rb_intern(name);
rb_intern        1942 variable.c         ID id = rb_intern(name);
rb_intern        1953 variable.c         ID id = rb_intern(name);


rb_interrupt

rb_interrupt     10112 eval.c         	rb_interrupt();
rb_interrupt     12030 eval.c         	rb_interrupt();
rb_interrupt      169 intern.h       void rb_interrupt _((void));


rb_invalid_str

rb_invalid_str    503 bignum.c       	    rb_invalid_str(s, "Integer");
rb_invalid_str   2273 object.c       	    rb_invalid_str(q, "Float()");


rb_io_addstr

rb_io_addstr     1029 ext/stringio/stringio.c #define strio_addstr rb_io_addstr
rb_io_addstr     2797 ext/zlib/zlib.c #define rb_gzwriter_addstr  rb_io_addstr
rb_io_addstr      278 intern.h       VALUE rb_io_addstr _((VALUE, VALUE));
rb_io_addstr     5644 io.c               rb_define_method(rb_cIO, "<<",    rb_io_addstr, 1);


rb_io_binmode

rb_io_binmode     277 intern.h       VALUE rb_io_binmode _((VALUE));
rb_io_binmode    3441 io.c           	rb_io_binmode(io);
rb_io_binmode    3581 io.c           	rb_io_binmode(dest);
rb_io_binmode    4303 io.c           		    if (stdout_binmode) rb_io_binmode(rb_stdout);
rb_io_binmode    4308 io.c           	    if (binmode) rb_io_binmode(current_file);
rb_io_binmode    5397 io.c               rb_io_binmode(current_file);
rb_io_binmode    5664 io.c               rb_define_method(rb_cIO, "binmode",  rb_io_binmode, 0);
rb_io_binmode     859 ruby.c         		rb_io_binmode(f);


rb_io_check_closed

rb_io_check_closed  114 ext/io/wait/wait.c     rb_io_check_closed(fptr);
rb_io_check_closed 3127 file.c         	    rb_io_check_closed(fptr);
rb_io_check_closed  183 io.c                   rb_io_check_closed(fptr);\
rb_io_check_closed  249 io.c               rb_io_check_closed(fptr);
rb_io_check_closed  268 io.c               rb_io_check_closed(fptr);
rb_io_check_closed  336 io.c                   rb_io_check_closed(fptr);
rb_io_check_closed  444 io.c           	    rb_io_check_closed(fptr);
rb_io_check_closed  464 io.c                       rb_io_check_closed(fptr);
rb_io_check_closed  496 io.c           		rb_io_check_closed(fptr);
rb_io_check_closed  824 io.c               rb_io_check_closed(fptr);
rb_io_check_closed 1056 io.c                   rb_io_check_closed(fptr);
rb_io_check_closed 1421 io.c           	rb_io_check_closed(fptr);
rb_io_check_closed 1499 io.c           	rb_io_check_closed(fptr);
rb_io_check_closed 2144 io.c               rb_io_check_closed(RFILE(io)->fptr);
rb_io_check_closed 2352 io.c                   rb_io_check_closed(fptr);
rb_io_check_closed 2410 io.c               rb_io_check_closed(fptr);
rb_io_check_closed   45 rubyio.h       #define GetOpenFile(obj,fp) rb_io_check_closed((fp) = RFILE(rb_io_taint_check(obj))->fptr)
rb_io_check_closed   78 rubyio.h       void rb_io_check_closed _((OpenFile*));


rb_io_check_initialized

rb_io_check_initialized  144 file.c             rb_io_check_initialized(fptr);
rb_io_check_initialized  216 io.c               rb_io_check_initialized(fptr);
rb_io_check_initialized 2185 io.c               rb_io_check_initialized(fptr);
rb_io_check_initialized   77 rubyio.h       void rb_io_check_initialized _((OpenFile*));


rb_io_check_readable

rb_io_check_readable   64 ext/io/wait/wait.c     rb_io_check_readable(fptr);
rb_io_check_readable   96 ext/io/wait/wait.c     rb_io_check_readable(fptr);
rb_io_check_readable   24 ext/openssl/ossl_bio.c 	rb_io_check_readable(fptr);
rb_io_check_readable  554 ext/openssl/ossl_ssl.c         rb_io_check_readable(fptr);
rb_io_check_readable  810 io.c               rb_io_check_readable(fptr);
rb_io_check_readable 1195 io.c               rb_io_check_readable(fptr);
rb_io_check_readable 1326 io.c           	rb_io_check_readable(fptr);
rb_io_check_readable 1344 io.c               rb_io_check_readable(fptr);
rb_io_check_readable 1555 io.c               rb_io_check_readable(fptr);
rb_io_check_readable 1612 io.c               rb_io_check_readable(fptr);
rb_io_check_readable 1680 io.c               rb_io_check_readable(fptr);
rb_io_check_readable 1708 io.c               rb_io_check_readable(fptr);
rb_io_check_readable 1865 io.c           	rb_io_check_readable(fptr);
rb_io_check_readable 1908 io.c               rb_io_check_readable(fptr);
rb_io_check_readable 1993 io.c               rb_io_check_readable(fptr);
rb_io_check_readable 2401 io.c               rb_io_check_readable(fptr);
rb_io_check_readable   74 rubyio.h       void rb_io_check_readable _((OpenFile*));


rb_io_check_writable

rb_io_check_writable  555 ext/openssl/ossl_ssl.c         rb_io_check_writable(fptr);
rb_io_check_writable  559 io.c               rb_io_check_writable(fptr);
rb_io_check_writable  624 io.c               rb_io_check_writable(fptr);
rb_io_check_writable 2345 io.c               rb_io_check_writable(fptr);
rb_io_check_writable   73 rubyio.h       void rb_io_check_writable _((OpenFile*));


rb_io_close

rb_io_close       274 ext/socket/socket.c 	return rb_io_close(sock);
rb_io_close       292 ext/socket/socket.c 	return rb_io_close(sock);
rb_io_close      1204 ext/socket/socket.c     return rb_io_close(sock);
rb_io_close       275 intern.h       VALUE rb_io_close _((VALUE));
rb_io_close      2145 io.c               rb_io_close(io);
rb_io_close      2154 io.c           	rb_io_close(io);
rb_io_close      2222 io.c           	return rb_io_close(io);
rb_io_close      2267 io.c           	return rb_io_close(io);
rb_io_close      4201 io.c           	rb_io_close(file);
rb_io_close      4253 io.c           			rb_io_close(rb_stdout);
rb_io_close      4526 io.c               rb_io_close(port);
rb_io_close      5039 io.c           	if (!NIL_P(r)) rb_io_close(r);
rb_io_close      5106 io.c               return rb_ensure(io_s_foreach, (VALUE)&arg, rb_io_close, arg.io);
rb_io_close      5144 io.c               return rb_ensure(io_s_readlines, (VALUE)&arg, rb_io_close, arg.io);
rb_io_close      5185 io.c               return rb_ensure(io_s_read, (VALUE)&arg, rb_io_close, arg.io);
rb_io_close       948 ruby.c         	rb_io_close(f);
rb_io_close        49 rubyio.h       	rb_io_close(obj);\


rb_io_closed

rb_io_closed     5428 io.c               return rb_io_closed(current_file);
rb_io_closed     5658 io.c               rb_define_method(rb_cIO, "closed?", rb_io_closed, 0);


rb_io_ctl

rb_io_ctl        4813 io.c               return rb_io_ctl(io, req, arg, 1);
rb_io_ctl        4839 io.c               return rb_io_ctl(io, req, arg, 0);


rb_io_each_line

rb_io_each_line  5616 io.c               rb_define_method(rb_cIO, "each",  rb_io_each_line, -1);
rb_io_each_line  5617 io.c               rb_define_method(rb_cIO, "each_line",  rb_io_each_line, -1);


rb_io_eof

rb_io_eof         276 intern.h       VALUE rb_io_eof _((VALUE));
rb_io_eof        5256 io.c           	if (rb_io_eof(current_file)) {
rb_io_eof        5654 io.c               rb_define_method(rb_cIO, "eof", rb_io_eof, 0);
rb_io_eof        5655 io.c               rb_define_method(rb_cIO, "eof?", rb_io_eof, 0);


rb_io_fileno

rb_io_fileno     5239 io.c               return rb_io_fileno(current_file);
rb_io_fileno     5623 io.c               rb_define_method(rb_cIO, "fileno", rb_io_fileno, 0);


rb_io_flags_mode

rb_io_flags_mode 2737 io.c               fptr->f = rb_fopen(fptr->path, rb_io_flags_mode(fptr->mode));
rb_io_flags_mode 3090 io.c           	mode = rb_io_flags_mode(rb_io_mode_flags(StringValuePtr(pmode)));
rb_io_flags_mode 3500 io.c               mode = rb_io_flags_mode(fptr->mode);


rb_io_flush

rb_io_flush      3894 io.c           	rb_io_flush(rb_stdout);
rb_io_flush      5645 io.c               rb_define_method(rb_cIO, "flush", rb_io_flush, 0);


rb_io_fptr_cleanup

rb_io_fptr_cleanup 2093 io.c               rb_io_fptr_cleanup(fptr, Qtrue);
rb_io_fptr_cleanup 2114 io.c               rb_io_fptr_cleanup(fptr, Qfalse);


rb_io_fptr_finalize

rb_io_fptr_finalize   52 gc.c           void rb_io_fptr_finalize _((struct OpenFile*));
rb_io_fptr_finalize 1208 gc.c           	    rb_io_fptr_finalize(RANY(obj)->as.file.fptr);
rb_io_fptr_finalize 1860 gc.c           		rb_io_fptr_finalize(RANY(p)->as.file.fptr);
rb_io_fptr_finalize 2828 io.c           	rb_io_fptr_finalize(list->fptr);
rb_io_fptr_finalize   75 rubyio.h       void rb_io_fptr_finalize _((OpenFile*));


rb_io_get_io

rb_io_get_io     3359 io.c               nfile = rb_io_get_io(nfile);
rb_io_get_io     3536 io.c               io = rb_io_get_io(io);
rb_io_get_io     4576 io.c           	    GetOpenFile(rb_io_get_io(RARRAY(read)->ptr[i]), fptr);
rb_io_get_io     4597 io.c           	    GetOpenFile(rb_io_get_io(RARRAY(write)->ptr[i]), fptr);
rb_io_get_io     4614 io.c           	    GetOpenFile(rb_io_get_io(RARRAY(except)->ptr[i]), fptr);
rb_io_get_io     4644 io.c           		GetOpenFile(rb_io_get_io(RARRAY(read)->ptr[i]), fptr);
rb_io_get_io     4655 io.c           		GetOpenFile(rb_io_get_io(RARRAY(write)->ptr[i]), fptr);
rb_io_get_io     4668 io.c           		GetOpenFile(rb_io_get_io(RARRAY(except)->ptr[i]), fptr);


rb_io_getc

rb_io_getc        273 intern.h       VALUE rb_io_getc _((VALUE));
rb_io_getc       1959 io.c               VALUE c = rb_io_getc(io);
rb_io_getc       4471 io.c               return rb_io_getc(rb_stdin);
rb_io_getc       5321 io.c           	byte = rb_io_getc(current_file);
rb_io_getc       5641 io.c               rb_define_method(rb_cIO, "getc",  rb_io_getc, 0);
rb_io_getc        885 ruby.c         	c = rb_io_getc(f);


rb_io_getline

rb_io_getline    1545 io.c           static VALUE rb_io_getline(VALUE rs, VALUE io);
rb_io_getline    1648 io.c               str = rb_io_getline(rs, io);
rb_io_getline    1792 io.c               while (!NIL_P(line = rb_io_getline(rs, io))) {
rb_io_getline    1834 io.c               while (!NIL_P(str = rb_io_getline(rs, io))) {
rb_io_getline    4348 io.c           	line = rb_io_getline(rs, current_file);
rb_io_getline    5063 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 1613 io.c               return rb_io_getline_fast(fptr, '\n');


rb_io_gets

rb_io_gets        272 intern.h       VALUE rb_io_gets _((VALUE));
rb_io_gets       4336 io.c           	line = rb_io_gets(current_file);
rb_io_gets       4420 io.c               line = rb_io_gets(current_file);
rb_io_gets       6686 parse.c            lex_gets = rb_io_gets;
rb_io_gets       2688 parse.y            lex_gets = rb_io_gets;
rb_io_gets        872 ruby.c         	    while (!NIL_P(line = rb_io_gets(f))) {
rb_io_gets        887 ruby.c         	    line = rb_io_gets(f);


rb_io_gets_m

rb_io_gets_m     1752 io.c               VALUE line = rb_io_gets_m(argc, argv, io);
rb_io_gets_m     5639 io.c               rb_define_method(rb_cIO, "gets",  rb_io_gets_m, -1);


rb_io_initialize

rb_io_initialize 4121 io.c           	    return rb_io_initialize(argc, argv, io);
rb_io_initialize 4177 io.c               rb_io_initialize(argc, argv, io);
rb_io_initialize 5592 io.c               rb_define_method(rb_cIO, "initialize", rb_io_initialize, -1);


rb_io_isatty

rb_io_isatty     5662 io.c               rb_define_method(rb_cIO, "isatty", rb_io_isatty, 0);
rb_io_isatty     5663 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  236 ext/stringio/stringio.c 	    ptr->flags = rb_io_mode_flags(m);
rb_io_mode_flags 2735 io.c               fptr->mode = rb_io_mode_flags(mode);
rb_io_mode_flags 2882 io.c               int modef = rb_io_mode_flags(mode);
rb_io_mode_flags 3090 io.c           	mode = rb_io_flags_mode(rb_io_mode_flags(StringValuePtr(pmode)));
rb_io_mode_flags 3491 io.c           	fptr->mode = rb_io_mode_flags(StringValuePtr(nmode));
rb_io_mode_flags   71 rubyio.h       int  rb_io_mode_flags _((const char*));


rb_io_mode_modenum

rb_io_mode_modenum 2916 io.c               pid = pipe_exec(pname, rb_io_mode_modenum(mode), &fpr, &fpw);
rb_io_mode_modenum 3130 io.c           	    flags = rb_io_mode_modenum(RSTRING(vmode)->ptr);
rb_io_mode_modenum 3198 io.c           	flags = rb_io_mode_modenum(RSTRING(vmode)->ptr);
rb_io_mode_modenum 4068 io.c           	    flags = rb_io_mode_modenum(RSTRING(mode)->ptr);


rb_io_modenum_flags

rb_io_modenum_flags  231 ext/stringio/stringio.c 	    ptr->flags = rb_io_modenum_flags(flags);
rb_io_modenum_flags 2763 io.c               fptr->mode = rb_io_modenum_flags(flags);
rb_io_modenum_flags 4080 io.c               fp->mode = rb_io_modenum_flags(flags);
rb_io_modenum_flags   72 rubyio.h       int  rb_io_modenum_flags _((int));


rb_io_modenum_mode

rb_io_modenum_mode 2762 io.c               m = rb_io_modenum_mode(flags);
rb_io_modenum_mode 3087 io.c           	mode = rb_io_modenum_mode(FIX2INT(pmode));
rb_io_modenum_mode 4081 io.c               fp->f = rb_fdopen(fd, rb_io_modenum_mode(flags));


rb_io_open

rb_io_open       5103 io.c               arg.io = rb_io_open(RSTRING(fname)->ptr, "r");
rb_io_open       5142 io.c               arg.io = rb_io_open(RSTRING(fname)->ptr, "r");
rb_io_open       5180 io.c               arg.io = rb_io_open(RSTRING(fname)->ptr, "r");


rb_io_print

rb_io_print      1038 ext/stringio/stringio.c #define strio_print rb_io_print
rb_io_print      2807 ext/zlib/zlib.c #define rb_gzwriter_print  rb_io_print
rb_io_print       280 intern.h       VALUE rb_io_print _((int, VALUE*, VALUE));
rb_io_print      3721 io.c               rb_io_print(argc, argv, rb_stdout);
rb_io_print      5611 io.c               rb_define_method(rb_cIO, "print", rb_io_print, -1);


rb_io_printf

rb_io_printf     1046 ext/stringio/stringio.c #define strio_printf rb_io_printf
rb_io_printf     2802 ext/zlib/zlib.c #define rb_gzwriter_printf  rb_io_printf
rb_io_printf      279 intern.h       VALUE rb_io_printf _((int, VALUE*, VALUE));
rb_io_printf     5614 io.c               rb_define_method(rb_cIO, "printf", rb_io_printf, -1);


rb_io_putc

rb_io_putc       3764 io.c               return rb_io_putc(rb_stdout, ch);
rb_io_putc       5612 io.c               rb_define_method(rb_cIO, "putc", rb_io_putc, 1);


rb_io_puts

rb_io_puts       4435 eval.c         	rb_io_puts(1, &mesg, rb_stderr);
rb_io_puts       1079 ext/stringio/stringio.c #define strio_puts rb_io_puts
rb_io_puts       2812 ext/zlib/zlib.c #define rb_gzwriter_puts  rb_io_puts
rb_io_puts        281 intern.h       VALUE rb_io_puts _((int, VALUE*, VALUE));
rb_io_puts       3779 io.c           	rb_io_puts(1, &tmp, out);
rb_io_puts       3854 io.c               rb_io_puts(argc, argv, rb_stdout);
rb_io_puts       5613 io.c               rb_define_method(rb_cIO, "puts", rb_io_puts, -1);


rb_io_readlines

rb_io_readlines  5113 io.c               return rb_io_readlines(arg->argc, &arg->sep, arg->io);
rb_io_readlines  5634 io.c               rb_define_method(rb_cIO, "readlines",  rb_io_readlines, -1);


rb_io_rewind

rb_io_rewind     5229 io.c               return rb_io_rewind(current_file);
rb_io_rewind     5651 io.c               rb_define_method(rb_cIO, "rewind", rb_io_rewind, 0);


rb_io_s_open

rb_io_s_open     3306 io.c               return rb_io_s_open(argc, argv, rb_cFile);
rb_io_s_open     5582 io.c               rb_define_singleton_method(rb_cIO, "open",  rb_io_s_open, -1);


rb_io_s_popen

rb_io_s_popen    3303 io.c           	    return rb_io_s_popen(argc, argv, rb_cIO);
rb_io_s_popen    5585 io.c               rb_define_singleton_method(rb_cIO, "popen", rb_io_s_popen, -1);


rb_io_seek

rb_io_seek        709 io.c               return rb_io_seek(io, offset, whence);
rb_io_seek       5183 io.c           	rb_io_seek(arg.io, offset, SEEK_SET);


rb_io_seek_m

rb_io_seek_m     5208 io.c               return rb_io_seek_m(argc, argv, current_file);
rb_io_seek_m     5647 io.c               rb_define_method(rb_cIO, "seek", rb_io_seek_m, -1);


rb_io_set_pos

rb_io_set_pos    5219 io.c               return rb_io_set_pos(current_file, offset);
rb_io_set_pos    5653 io.c               rb_define_method(rb_cIO, "pos=", rb_io_set_pos, 1);


rb_io_stat

rb_io_stat        814 file.c             return rb_io_stat(obj);
rb_io_stat       4407 file.c             rb_define_method(rb_cIO, "stat",  rb_io_stat, 0); /* this is IO's method */


rb_io_synchronized

rb_io_synchronized  216 ext/socket/socket.c     rb_io_synchronized(fp);
rb_io_synchronized 2872 io.c               rb_io_synchronized(fptr);
rb_io_synchronized 2904 io.c           	    rb_io_synchronized(fptr);
rb_io_synchronized 2988 io.c           	rb_io_synchronized(RFILE(orig_stdout)->fptr);
rb_io_synchronized 2989 io.c           	rb_io_synchronized(RFILE(orig_stderr)->fptr);
rb_io_synchronized 5042 io.c               rb_io_synchronized(RFILE(w)->fptr);
rb_io_synchronized   76 rubyio.h       void rb_io_synchronized _((OpenFile*));


rb_io_taint_check

rb_io_taint_check  143 file.c             fptr = RFILE(rb_io_taint_check(obj))->fptr;
rb_io_taint_check  987 io.c               fptr = RFILE(rb_io_taint_check(obj))->fptr;
rb_io_taint_check 3483 io.c               rb_io_taint_check(file);
rb_io_taint_check   45 rubyio.h       #define GetOpenFile(obj,fp) rb_io_check_closed((fp) = RFILE(rb_io_taint_check(obj))->fptr)
rb_io_taint_check   82 rubyio.h       VALUE rb_io_taint_check _((VALUE));


rb_io_tell

rb_io_tell       5195 io.c               return rb_io_tell(current_file);
rb_io_tell       5646 io.c               rb_define_method(rb_cIO, "tell", rb_io_tell, 0);
rb_io_tell       5652 io.c               rb_define_method(rb_cIO, "pos", rb_io_tell, 0);


rb_io_ungetc

rb_io_ungetc      274 intern.h       VALUE rb_io_ungetc _((VALUE, VALUE));
rb_io_ungetc     5643 io.c               rb_define_method(rb_cIO, "ungetc",rb_io_ungetc, 1);
rb_io_ungetc      938 ruby.c         	    rb_io_ungetc(f, c);


rb_io_wait_readable

rb_io_wait_readable  592 ext/openssl/ossl_ssl.c             rb_io_wait_readable(fileno(fptr->f));
rb_io_wait_readable  652 ext/openssl/ossl_ssl.c                 rb_io_wait_readable(fileno(fptr->f));
rb_io_wait_readable  697 ext/openssl/ossl_ssl.c                 rb_io_wait_readable(fileno(fptr->f));
rb_io_wait_readable  572 ext/socket/socket.c 	if (rb_io_wait_readable(fd)) {
rb_io_wait_readable 1335 ext/socket/socket.c 	    if (!rb_io_wait_readable(fd)) break;
rb_io_wait_readable 1213 io.c                       if (rb_io_wait_readable(fileno(fptr->f)))
rb_io_wait_readable 1432 io.c           		if (!rb_io_wait_readable(fileno(f)))
rb_io_wait_readable 1875 io.c           		if (!rb_io_wait_readable(fileno(f)))
rb_io_wait_readable 1921 io.c           	    if (!rb_io_wait_readable(fileno(f)))
rb_io_wait_readable   79 rubyio.h       int rb_io_wait_readable _((int));


rb_io_wait_writable

rb_io_wait_writable  589 ext/openssl/ossl_ssl.c             rb_io_wait_writable(fileno(fptr->f));
rb_io_wait_writable  649 ext/openssl/ossl_ssl.c                 rb_io_wait_writable(fileno(fptr->f));
rb_io_wait_writable  694 ext/openssl/ossl_ssl.c                 rb_io_wait_writable(fileno(fptr->f));
rb_io_wait_writable  513 ext/socket/socket.c 	if (rb_io_wait_writable(fd)) {
rb_io_wait_writable 1603 ext/socket/socket.c 	if (rb_io_wait_writable(fileno(f))) {
rb_io_wait_writable  343 io.c           	if (!rb_io_wait_writable(fileno(f)))
rb_io_wait_writable  463 io.c                   if (rb_io_wait_writable(fileno(f))) {
rb_io_wait_writable  495 io.c           	    if (rb_io_wait_writable(fileno(f))) {
rb_io_wait_writable 2036 io.c           	    if (!rb_io_wait_writable(f2)) {
rb_io_wait_writable 2051 io.c           		if (!rb_io_wait_writable(f1)) break;
rb_io_wait_writable   80 rubyio.h       int rb_io_wait_writable _((int));


rb_io_write

rb_io_write       185 error.c        	rb_io_write(rb_stderr, mesg);
rb_io_write       186 error.c        	rb_io_write(rb_stderr, rb_default_rs);
rb_io_write      1892 ext/syck/rubyext.c         rb_io_write( dest, rb_str_new( str, len ) );
rb_io_write       271 intern.h       VALUE rb_io_write _((VALUE, VALUE));
rb_io_write       596 io.c               rb_io_write(io, str);
rb_io_write      3602 io.c               rb_io_write(out, rb_f_sprintf(argc, argv));
rb_io_write      3633 io.c               rb_io_write(out, rb_f_sprintf(argc, argv));
rb_io_write      3675 io.c           	    rb_io_write(out, rb_output_fs);
rb_io_write      3679 io.c           	    rb_io_write(out, rb_str_new2("nil"));
rb_io_write      3682 io.c           	    rb_io_write(out, argv[i]);
rb_io_write      3687 io.c           	rb_io_write(out, rb_output_rs);
rb_io_write      3747 io.c               rb_io_write(io, rb_str_new(&c, 1));
rb_io_write      3815 io.c           	rb_io_write(out, rb_default_rs);
rb_io_write      3830 io.c           	rb_io_write(out, line);
rb_io_write      3833 io.c           	    rb_io_write(out, rb_default_rs);
rb_io_write      3862 io.c               rb_io_write(rb_stdout, rb_obj_as_string(rb_inspect(obj)));
rb_io_write      3863 io.c               rb_io_write(rb_stdout, rb_default_rs);
rb_io_write      3934 io.c               rb_io_write(out, self);
rb_io_write      3944 io.c               rb_io_write(rb_stderr, rb_str_new(mesg, len));
rb_io_write       131 marshal.c      	rb_io_write(arg->dest, buf);
rb_io_write       683 marshal.c      	rb_io_write(arg->arg->dest, arg->arg->str);


rb_is_class_id

rb_is_class_id    336 intern.h       int rb_is_class_id _((ID));
rb_is_class_id   2070 object.c           if (!rb_is_class_id(id)) {
rb_is_class_id   2104 object.c           if (!rb_is_class_id(id)) {
rb_is_class_id   1811 variable.c         if (!rb_is_class_id(id)) {
rb_is_class_id   1823 variable.c         if (!rb_is_class_id(id)) {
rb_is_class_id   1837 variable.c         if (!rb_is_class_id(id)) {
rb_is_class_id   1849 variable.c         if (rb_is_class_id(key)) {
rb_is_class_id   1918 variable.c         if (!rb_is_class_id(id)) {


rb_is_const_id

rb_is_const_id    676 eval.c             if (!rb_is_local_id(id) && !rb_is_const_id(id)) {
rb_is_const_id   3645 eval.c         	    if (rb_is_const_id(node->nd_mid)) {
rb_is_const_id   1307 ext/win32ole/win32ole.c                 if (rb_is_const_id(id)) {
rb_is_const_id    334 intern.h       int rb_is_const_id _((ID));
rb_is_const_id   1814 object.c           if (!rb_is_const_id(id)) {
rb_is_const_id   1838 object.c           if (!rb_is_const_id(id)) {
rb_is_const_id   1861 object.c           if (!rb_is_const_id(id)) {
rb_is_const_id    197 struct.c       	if (!rb_is_const_id(id)) {
rb_is_const_id    215 struct.c       	if (rb_is_local_id(id) || rb_is_const_id(id)) {
rb_is_const_id    491 struct.c       	if (rb_is_local_id(id) || rb_is_const_id(id)) {
rb_is_const_id     76 variable.c         if (!rb_is_const_id(key)) return ST_CONTINUE;
rb_is_const_id   1281 variable.c         if (!rb_is_const_id(id)) {
rb_is_const_id   1472 variable.c         if (!rb_is_const_id(id)) {
rb_is_const_id   1501 variable.c         if (rb_is_const_id(key)) {
rb_is_const_id   1684 variable.c         if (!rb_is_const_id(id)) {


rb_is_instance_id

rb_is_instance_id  335 intern.h       int rb_is_instance_id _((ID));
rb_is_instance_id  388 object.c           if (!rb_is_instance_id(id)) return ST_CONTINUE;
rb_is_instance_id 2008 object.c           if (!rb_is_instance_id(id)) {
rb_is_instance_id 2041 object.c           if (!rb_is_instance_id(id)) {
rb_is_instance_id 1091 variable.c         if (rb_is_instance_id(key)) {
rb_is_instance_id 1175 variable.c         if (!rb_is_instance_id(id)) {


rb_is_local_id

rb_is_local_id    676 eval.c             if (!rb_is_local_id(id) && !rb_is_const_id(id)) {
rb_is_local_id   7573 eval.c         	    if (!rb_is_local_id(tbl[i])) continue; /* skip flip states */
rb_is_local_id   7580 eval.c         	if (vars->id && rb_is_local_id(vars->id)) { /* skip $_, $~ and flip states */
rb_is_local_id   11722 eval.c         	    if (id != 0 && !rb_is_local_id(id))  /* push flip states */
rb_is_local_id    337 intern.h       int rb_is_local_id _((ID));
rb_is_local_id    215 struct.c       	if (rb_is_local_id(id) || rb_is_const_id(id)) {
rb_is_local_id    491 struct.c       	if (rb_is_local_id(id) || rb_is_const_id(id)) {


rb_iter_break

rb_iter_break      87 enum.c         	rb_iter_break();
rb_iter_break     507 enum.c         	rb_iter_break();
rb_iter_break     519 enum.c         	rb_iter_break();
rb_iter_break     558 enum.c         	rb_iter_break();
rb_iter_break     570 enum.c         	rb_iter_break();
rb_iter_break     751 enum.c         	rb_iter_break();
rb_iter_break     302 ext/racc/cparse/cparse.c        rb_iter_break();
rb_iter_break     539 ruby.h         NORETURN(void rb_iter_break _((void)));


rb_iterate

rb_iterate         75 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? grep_iter_i : grep_i, (VALUE)arg);
rb_iterate        117 enum.c             rb_iterate(rb_each, obj, find_i, (VALUE)&memo);
rb_iterate        156 enum.c             rb_iterate(rb_each, obj, find_all_i, ary);
rb_iterate        188 enum.c             rb_iterate(rb_each, obj, reject_i, ary);
rb_iterate        230 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? collect_i : collect_all, ary);
rb_iterate        251 enum.c             rb_iterate(rb_each, obj, collect_all, ary);
rb_iterate        310 enum.c             rb_iterate(rb_each, obj, inject_i, (VALUE)&memo);
rb_iterate        348 enum.c             rb_iterate(rb_each, obj, partition_i, (VALUE)ary);
rb_iterate        486 enum.c             rb_iterate(rb_each, obj, sort_by_i, ary);
rb_iterate        547 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? all_iter_i : all_i, (VALUE)&result);
rb_iterate        599 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? any_iter_i : any_i, (VALUE)&result);
rb_iterate        662 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? min_ii : min_i, (VALUE)&result);
rb_iterate        739 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? max_ii : max_i, (VALUE)&result);
rb_iterate        777 enum.c             rb_iterate(rb_each, obj, member_i, (VALUE)memo);
rb_iterate        813 enum.c             rb_iterate(rb_each, obj, each_with_index_i, (VALUE)&memo);
rb_iterate        882 enum.c             rb_iterate(rb_each, obj, zip_i, (VALUE)memo);
rb_iterate       9295 eval.c             VALUE proc = rb_iterate((VALUE(*)_((VALUE)))mproc, 0, func, val);
rb_iterate       9317 eval.c             proc = rb_iterate((VALUE(*)_((VALUE)))mproc, 0, bmcall, method);
rb_iterate       12845 eval.c             return rb_iterate((VALUE(*)_((VALUE)))catch_i, ID2SYM(rb_intern(tag)), func, data);
rb_iterate        488 ext/dbm/dbm.c      rb_iterate(each_pair, other, update_i, obj);
rb_iterate        497 ext/dbm/dbm.c      rb_iterate(each_pair, other, update_i, obj);
rb_iterate       1023 ext/dl/ptr.c     rb_iterate(rb_each, DLMemoryTable, dlmem_each_i, 0);
rb_iterate        114 ext/enumerator/enumerator.c     rb_iterate(rb_each, obj, each_slice_i, (VALUE)memo);
rb_iterate        184 ext/enumerator/enumerator.c     rb_iterate(rb_each, obj, each_cons_i, (VALUE)memo);
rb_iterate        263 ext/enumerator/enumerator.c     val = rb_iterate((VALUE (*)_((VALUE)))enumerator_iter, obj, rb_yield, 0);
rb_iterate        591 ext/gdbm/gdbm.c     rb_iterate(each_pair, other, update_i, obj);
rb_iterate        600 ext/gdbm/gdbm.c     rb_iterate(each_pair, other, update_i, obj);
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        330 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        467 ext/sdbm/init.c     rb_iterate(each_pair, other, update_i, obj);
rb_iterate        476 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       1167 ext/syck/rubyext.c                     rb_iterate( rb_each, val, syck_set_ivars, obj );
rb_iterate       2028 ext/win32ole/win32ole.c         rb_iterate(rb_each, param, hash2named_arg, (VALUE)&op);
rb_iterate       5356 io.c           	    rb_iterate(rb_each, current_file, rb_yield, 0);
rb_iterate        337 range.c        	    rb_iterate((VALUE(*)_((VALUE)))str_step, (VALUE)args, step_i,
rb_iterate        420 range.c        	rb_iterate((VALUE(*)_((VALUE)))str_step, (VALUE)args, step_i,
rb_iterate        553 ruby.h         VALUE rb_iterate _((VALUE(*)(VALUE),VALUE,VALUE(*)(ANYARGS),VALUE));


rb_iv_get

rb_iv_get         874 class.c        	rb_iv_get(RBASIC(obj)->klass, "__attached__") == obj) {
rb_iv_get         392 eval.c         		rb_class2name(rb_iv_get(klass, "__attached__")));
rb_iv_get         401 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        1386 eval.c             VALUE st = rb_iv_get(err, "status");
rb_iv_get        1527 eval.c         	VALUE st = rb_iv_get(err, "status");
rb_iv_get        1696 eval.c             return rb_iv_get(exc, "@exit_value");
rb_iv_get        1711 eval.c             return rb_iv_get(exc, "@reason");
rb_iv_get        1977 eval.c         	    VALUE obj = rb_iv_get(klass, "__attached__");
rb_iv_get        1994 eval.c         	rb_funcall(rb_iv_get(klass, "__attached__"),
rb_iv_get        2083 eval.c         	singleton = rb_iv_get(klass, "__attached__");
rb_iv_get        2631 eval.c         	    klass = rb_iv_get(klass, "__attached__");
rb_iv_get        9228 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          50 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          52 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_cert(o)          rb_iv_get((o),"@cert")
rb_iv_get          53 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_key(o)           rb_iv_get((o),"@key")
rb_iv_get          54 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_client_ca(o)     rb_iv_get((o),"@client_ca")
rb_iv_get          55 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_ca_file(o)       rb_iv_get((o),"@ca_file")
rb_iv_get          56 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_ca_path(o)       rb_iv_get((o),"@ca_path")
rb_iv_get          57 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_timeout(o)       rb_iv_get((o),"@timeout")
rb_iv_get          58 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_verify_mode(o)   rb_iv_get((o),"@verify_mode")
rb_iv_get          59 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_verify_dep(o)    rb_iv_get((o),"@verify_depth")
rb_iv_get          60 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_verify_cb(o)     rb_iv_get((o),"@verify_callback")
rb_iv_get          61 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_options(o)       rb_iv_get((o),"@options")
rb_iv_get          62 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_cert_store(o)    rb_iv_get((o),"@cert_store")
rb_iv_get          63 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_extra_cert(o)    rb_iv_get((o),"@extra_chain_cert")
rb_iv_get          64 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_client_cert_cb(o) rb_iv_get((o),"@client_cert_cb")
rb_iv_get          65 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_tmp_dh_cb(o)     rb_iv_get((o),"@tmp_dh_callback")
rb_iv_get          66 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_sess_id_ctx(o)   rb_iv_get((o),"@session_id_context")
rb_iv_get          75 ext/openssl/ossl_ssl.c #define ossl_ssl_get_io(o)           rb_iv_get((o),"@io")
rb_iv_get          76 ext/openssl/ossl_ssl.c #define ossl_ssl_get_ctx(o)          rb_iv_get((o),"@context")
rb_iv_get          77 ext/openssl/ossl_ssl.c #define ossl_ssl_get_sync_close(o)   rb_iv_get((o),"@sync_close")
rb_iv_get          78 ext/openssl/ossl_ssl.c #define ossl_ssl_get_x509(o)         rb_iv_get((o),"@x509")
rb_iv_get          79 ext/openssl/ossl_ssl.c #define ossl_ssl_get_key(o)          rb_iv_get((o),"@key")
rb_iv_get          80 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         471 intern.h       VALUE rb_iv_get _((VALUE, const char*));
rb_iv_get        1265 object.c       	VALUE v = rb_iv_get(klass, "__attached__");
rb_iv_get         220 process.c          return rb_iv_get(st, "status");
rb_iv_get         254 process.c          return rb_iv_get(st, "pid");
rb_iv_get         528 ruby.h         VALUE rb_iv_get _((VALUE, const char*));


rb_iv_set

rb_iv_set         357 error.c            rb_iv_set(exc, "mesg", arg);
rb_iv_set         358 error.c            rb_iv_set(exc, "bt", Qnil);
rb_iv_set         535 error.c            return rb_iv_set(exc, "bt", check_backtrace(bt));
rb_iv_set         557 error.c            rb_iv_set(exc, "status", status);
rb_iv_set         637 error.c            rb_iv_set(self, "name", name);
rb_iv_set         671 error.c        	rb_iv_set(exc, "mesg", mesg = str);
rb_iv_set         695 error.c            rb_iv_set(self, "args", args);
rb_iv_set         923 error.c            rb_iv_set(self, "errno", error);
rb_iv_set        1667 eval.c             rb_iv_set(exc, "@exit_value", value);
rb_iv_set        1682 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          36 ext/openssl/ossl_ssl.c #define ossl_sslctx_set_cert(o,v)        rb_iv_set((o),"@cert",(v))
rb_iv_set          37 ext/openssl/ossl_ssl.c #define ossl_sslctx_set_key(o,v)         rb_iv_set((o),"@key",(v))
rb_iv_set          38 ext/openssl/ossl_ssl.c #define ossl_sslctx_set_client_ca(o,v)   rb_iv_set((o),"@client_ca",(v))
rb_iv_set          39 ext/openssl/ossl_ssl.c #define ossl_sslctx_set_ca_file(o,v)     rb_iv_set((o),"@ca_file",(v))
rb_iv_set          40 ext/openssl/ossl_ssl.c #define ossl_sslctx_set_ca_path(o,v)     rb_iv_set((o),"@ca_path",(v))
rb_iv_set          41 ext/openssl/ossl_ssl.c #define ossl_sslctx_set_timeout(o,v)     rb_iv_set((o),"@timeout",(v))
rb_iv_set          42 ext/openssl/ossl_ssl.c #define ossl_sslctx_set_verify_mode(o,v) rb_iv_set((o),"@verify_mode",(v))
rb_iv_set          43 ext/openssl/ossl_ssl.c #define ossl_sslctx_set_verify_dep(o,v)  rb_iv_set((o),"@verify_depth",(v))
rb_iv_set          44 ext/openssl/ossl_ssl.c #define ossl_sslctx_set_verify_cb(o,v)   rb_iv_set((o),"@verify_callback",(v))
rb_iv_set          45 ext/openssl/ossl_ssl.c #define ossl_sslctx_set_options(o,v)     rb_iv_set((o),"@options",(v))
rb_iv_set          46 ext/openssl/ossl_ssl.c #define ossl_sslctx_set_cert_store(o,v)  rb_iv_set((o),"@cert_store",(v))
rb_iv_set          47 ext/openssl/ossl_ssl.c #define ossl_sslctx_set_extra_cert(o,v)  rb_iv_set((o),"@extra_chain_cert",(v))
rb_iv_set          48 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          49 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          82 ext/openssl/ossl_ssl.c #define ossl_ssl_set_io(o,v)         rb_iv_set((o),"@io",(v))
rb_iv_set          83 ext/openssl/ossl_ssl.c #define ossl_ssl_set_ctx(o,v)        rb_iv_set((o),"@context",(v))
rb_iv_set          84 ext/openssl/ossl_ssl.c #define ossl_ssl_set_sync_close(o,v) rb_iv_set((o),"@sync_close",(v))
rb_iv_set          85 ext/openssl/ossl_ssl.c #define ossl_ssl_set_x509(o,v)       rb_iv_set((o),"@x509",(v))
rb_iv_set          86 ext/openssl/ossl_ssl.c #define ossl_ssl_set_key(o,v)        rb_iv_set((o),"@key",(v))
rb_iv_set          87 ext/openssl/ossl_ssl.c #define ossl_ssl_set_tmp_dh(o,v)     rb_iv_set((o),"@tmp_dh",(v))
rb_iv_set         155 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        1296 ext/syck/rubyext.c             rb_iv_set(obj, "@kind", sym_seq);
rb_iv_set        1310 ext/syck/rubyext.c             rb_iv_set(obj, "@kind", sym_map);
rb_iv_set        1334 ext/syck/rubyext.c     rb_iv_set( self, "@name", val );
rb_iv_set        1358 ext/syck/rubyext.c     rb_iv_set( self, "@domain", domain );
rb_iv_set        1359 ext/syck/rubyext.c     rb_iv_set( self, "@type_id", type_id );
rb_iv_set        1360 ext/syck/rubyext.c     rb_iv_set( self, "@value", val );
rb_iv_set        1371 ext/syck/rubyext.c     rb_iv_set( self, "@class", klass );
rb_iv_set        1372 ext/syck/rubyext.c     rb_iv_set( self, "@ivars", ivars );
rb_iv_set        1383 ext/syck/rubyext.c     rb_iv_set( self, "@type_id", type_id );
rb_iv_set        1384 ext/syck/rubyext.c     rb_iv_set( self, "@value", val );
rb_iv_set        1439 ext/syck/rubyext.c     rb_iv_set( self, "@kind", sym_scalar );
rb_iv_set        1481 ext/syck/rubyext.c     rb_iv_set( self, "@style", style );
rb_iv_set        1500 ext/syck/rubyext.c     rb_iv_set( self, "@value", val );
rb_iv_set        1529 ext/syck/rubyext.c     rb_iv_set( self, "@kind", sym_seq );
rb_iv_set        1556 ext/syck/rubyext.c     rb_iv_set( self, "@value", val );
rb_iv_set        1599 ext/syck/rubyext.c     rb_iv_set( self, "@style", style );
rb_iv_set        1646 ext/syck/rubyext.c     rb_iv_set( self, "@kind", sym_seq );
rb_iv_set        1682 ext/syck/rubyext.c     rb_iv_set( self, "@value", val );
rb_iv_set        1726 ext/syck/rubyext.c     rb_iv_set( self, "@style", style );
rb_iv_set        1771 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         470 intern.h       VALUE rb_iv_set _((VALUE, const char*, VALUE));
rb_iv_set         198 process.c          rb_iv_set(rb_last_status, "status", INT2FIX(status));
rb_iv_set         199 process.c          rb_iv_set(rb_last_status, "pid", INT2FIX(pid));
rb_iv_set         529 ruby.h         VALUE rb_iv_set _((VALUE, const char*, VALUE));
rb_iv_set         206 struct.c           rb_iv_set(nstr, "__size__", LONG2NUM(RARRAY(members)->len));
rb_iv_set         207 struct.c           rb_iv_set(nstr, "__members__", members);
rb_iv_set         282 variable.c         rb_iv_set(klass, "__classid__", ID2SYM(id));


rb_ivar_defined

rb_ivar_defined   493 error.c            if (!rb_ivar_defined(exc, bt)) return Qnil;
rb_ivar_defined  2364 eval.c         	if (rb_ivar_defined(self, node->nd_vid)) {
rb_ivar_defined   469 intern.h       VALUE rb_ivar_defined _((VALUE, ID));
rb_ivar_defined    87 range.c            if (rb_ivar_defined(range, id_beg)) {
rb_ivar_defined    29 struct.c       	if (rb_ivar_defined(c, id))


rb_ivar_get

rb_ivar_get       494 error.c            return rb_ivar_get(exc, bt);
rb_ivar_get      3617 eval.c         	result = rb_ivar_get(self, node->nd_vid);
rb_ivar_get       260 ext/enumerator/enumerator.c 				 rb_ivar_get(obj, id_enum_obj),
rb_ivar_get       261 ext/enumerator/enumerator.c 				 rb_to_id(rb_ivar_get(obj, id_enum_method)),
rb_ivar_get       262 ext/enumerator/enumerator.c 				 rb_ivar_get(obj, id_enum_args));
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      1345 ext/syck/rubyext.c     VALUE str1 = rb_ivar_get( alias1, s_name );
rb_ivar_get      1346 ext/syck/rubyext.c     VALUE str2 = rb_ivar_get( alias2, s_name );
rb_ivar_get      1568 ext/syck/rubyext.c     VALUE emitter = rb_ivar_get( self, s_emitter );
rb_ivar_get      1575 ext/syck/rubyext.c     rb_ary_push( rb_ivar_get( self, s_value ), val );
rb_ivar_get      1694 ext/syck/rubyext.c     VALUE emitter = rb_ivar_get( self, s_emitter );
rb_ivar_get      1702 ext/syck/rubyext.c     rb_hash_aset( rb_ivar_get( self, s_value ), key, val );
rb_ivar_get      2020 ext/syck/rubyext.c     int level = FIX2INT(rb_ivar_get(self, s_level)) + 1;
rb_ivar_get      2032 ext/syck/rubyext.c         symple = rb_funcall( proc, s_call, 1, rb_ivar_get( self, s_out ) );
rb_ivar_get      2096 ext/syck/rubyext.c     syck_out_mark( rb_ivar_get( self, s_emitter ), map );
rb_ivar_get      2115 ext/syck/rubyext.c     syck_out_mark( rb_ivar_get( self, s_emitter ), seq );
rb_ivar_get      2136 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      1766 ext/win32ole/win32ole.c             name = rb_ivar_get(target, rb_intern("name"));
rb_ivar_get      3493 ext/win32ole/win32ole.c     return rb_ivar_get(self, rb_intern("name"));
rb_ivar_get      4021 ext/win32ole/win32ole.c     return rb_ivar_get(self, rb_intern("name"));
rb_ivar_get      4391 ext/win32ole/win32ole.c     return rb_ivar_get(self, rb_intern("name"));
rb_ivar_get      4708 ext/win32ole/win32ole.c                             rb_ivar_get(self, rb_intern("name")));
rb_ivar_get      5079 ext/win32ole/win32ole.c     return rb_ivar_get(self, rb_intern("name"));
rb_ivar_get      5577 ext/win32ole/win32ole.c     ary = rb_ivar_get(obj, id_events);
rb_ivar_get      6013 ext/win32ole/win32ole.c     VALUE events = rb_ivar_get(obj, id_events);
rb_ivar_get       467 intern.h       VALUE rb_ivar_get _((VALUE, ID));
rb_ivar_get      2011 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       132 range.c            if (!rb_equal(rb_ivar_get(range, id_beg), rb_ivar_get(obj, id_beg)))
rb_ivar_get       134 range.c            if (!rb_equal(rb_ivar_get(range, id_end), rb_ivar_get(obj, id_end)))
rb_ivar_get       190 range.c            if (!rb_eql(rb_ivar_get(range, id_beg), rb_ivar_get(obj, id_beg)))
rb_ivar_get       192 range.c            if (!rb_eql(rb_ivar_get(range, id_end), rb_ivar_get(obj, id_end)))
rb_ivar_get       216 range.c            v = rb_hash(rb_ivar_get(range, id_beg));
rb_ivar_get       218 range.c            v = rb_hash(rb_ivar_get(range, id_end));
rb_ivar_get       306 range.c            b = rb_ivar_get(range, id_beg);
rb_ivar_get       307 range.c            e = rb_ivar_get(range, id_end);
rb_ivar_get       398 range.c            beg = rb_ivar_get(range, id_beg);
rb_ivar_get       399 range.c            end = rb_ivar_get(range, id_end);
rb_ivar_get       441 range.c            return rb_ivar_get(range, id_beg);
rb_ivar_get       461 range.c            return rb_ivar_get(range, id_end);
rb_ivar_get       475 range.c            beg = b = NUM2LONG(rb_ivar_get(range, id_beg));
rb_ivar_get       476 range.c            end = e = NUM2LONG(rb_ivar_get(range, id_end));
rb_ivar_get       516 range.c            str = rb_obj_as_string(rb_ivar_get(range, id_beg));
rb_ivar_get       517 range.c            str2 = rb_obj_as_string(rb_ivar_get(range, id_end));
rb_ivar_get       542 range.c            str = rb_inspect(rb_ivar_get(range, id_beg));
rb_ivar_get       543 range.c            str2 = rb_inspect(rb_ivar_get(range, id_end));
rb_ivar_get       580 range.c            beg = rb_ivar_get(range, id_beg);
rb_ivar_get       581 range.c            end = rb_ivar_get(range, id_end);
rb_ivar_get        30 struct.c       	    return rb_ivar_get(c, id);
rb_ivar_get      1944 variable.c         return rb_ivar_get(obj, id);


rb_ivar_set

rb_ivar_set      3572 eval.c         	rb_ivar_set(self, node->nd_vid, result);
rb_ivar_set      3802 eval.c         	result = rb_ivar_set(self, node->nd_vid, ruby_frame->argv[0]);
rb_ivar_set      5112 eval.c         	rb_ivar_set(self, lhs->nd_vid, val);
rb_ivar_set       231 ext/enumerator/enumerator.c     rb_ivar_set(obj, id_enum_obj, enum_obj);
rb_ivar_set       232 ext/enumerator/enumerator.c     rb_ivar_set(obj, id_enum_method, enum_method);
rb_ivar_set       233 ext/enumerator/enumerator.c     rb_ivar_set(obj, id_enum_args, enum_args);
rb_ivar_set       294 ext/iconv/iconv.c     rb_ivar_set(error, rb_success, success);
rb_ivar_set       295 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       112 ext/readline/readline.c     return rb_ivar_set(mReadline, completion_proc, proc);
rb_ivar_set       129 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      1908 ext/syck/rubyext.c     rb_ivar_set( node, s_emitter, emitter );
rb_ivar_set      1957 ext/syck/rubyext.c     rb_ivar_set( pobj, s_out, rb_funcall( cOut, s_new, 1, pobj ) );
rb_ivar_set      1984 ext/syck/rubyext.c         rb_ivar_set(self, s_options, options);
rb_ivar_set      1997 ext/syck/rubyext.c         rb_ivar_set(self, s_options, options);
rb_ivar_set      2001 ext/syck/rubyext.c     rb_ivar_set(self, s_level, INT2FIX(0));
rb_ivar_set      2002 ext/syck/rubyext.c     rb_ivar_set(self, s_resolver, Qnil);
rb_ivar_set      2021 ext/syck/rubyext.c     rb_ivar_set(self, s_level, INT2FIX(level));
rb_ivar_set      2038 ext/syck/rubyext.c     rb_ivar_set(self, s_level, INT2FIX(level));
rb_ivar_set      2067 ext/syck/rubyext.c     rb_ivar_set( self, s_resolver, resolver );
rb_ivar_set      2078 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      3392 ext/win32ole/win32ole.c     rb_ivar_set(self, rb_intern("name"), name);
rb_ivar_set      3929 ext/win32ole/win32ole.c         rb_ivar_set(var, rb_intern("name"), WC2VSTR(bstr));
rb_ivar_set      4321 ext/win32ole/win32ole.c     rb_ivar_set(self, rb_intern("name"), name);
rb_ivar_set      5029 ext/win32ole/win32ole.c             rb_ivar_set(param, rb_intern("name"), WC2VSTR(bstrs[i]));
rb_ivar_set      6016 ext/win32ole/win32ole.c         rb_ivar_set(obj, id_events, events);
rb_ivar_set       468 intern.h       VALUE rb_ivar_set _((VALUE, ID, VALUE));
rb_ivar_set       968 marshal.c      	    rb_ivar_set(obj, id, val);
rb_ivar_set      2044 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        53 range.c            rb_ivar_set(range, id_beg, beg);
rb_ivar_set        54 range.c            rb_ivar_set(range, id_end, end);
rb_ivar_set       213 variable.c     	rb_ivar_set(klass, tmp_classpath, path);
rb_ivar_set       234 variable.c         rb_ivar_set(klass, classpath, str);
rb_ivar_set      1955 variable.c         return rb_ivar_set(obj, id, val);


rb_jmpbuf_t

rb_jmpbuf_t       100 eval.c         NORETURN(static void rb_jump_context(rb_jmpbuf_t, int));
rb_jmpbuf_t       103 eval.c             rb_jmpbuf_t env;
rb_jmpbuf_t       952 eval.c             rb_jmpbuf_t buf;
rb_jmpbuf_t      9658 eval.c             rb_jmpbuf_t context;


rb_jump_tag

rb_jump_tag      1140 dir.c              if (status) rb_jump_tag(status);
rb_jump_tag      1150 dir.c              if (status) rb_jump_tag(status);
rb_jump_tag      1272 dir.c              if (status) rb_jump_tag(status);
rb_jump_tag       414 ext/dbm/dbm.c      if (status) rb_jump_tag(status);
rb_jump_tag       501 ext/gdbm/gdbm.c     if (status) rb_jump_tag(status);
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        70 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        90 ext/readline/readline.c         rb_jump_tag(status);
rb_jump_tag       393 ext/sdbm/init.c     if (status) rb_jump_tag(status);
rb_jump_tag      1418 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      5032 io.c           	rb_jump_tag(state);
rb_jump_tag      5040 io.c           	rb_jump_tag(state);
rb_jump_tag       357 ruby.c         	if (state) rb_jump_tag(state);
rb_jump_tag      3081 win32/win32.c  	rb_jump_tag(status);


rb_lastline_get

rb_lastline_get  10089 eval.c             tval = rb_lastline_get();
rb_lastline_get  10216 eval.c             tval = rb_lastline_get();
rb_lastline_get   342 intern.h       VALUE rb_lastline_get _((void));
rb_lastline_get  3670 io.c           	line = rb_lastline_get();
rb_lastline_get  5606 io.c               rb_define_virtual_variable("$_", rb_lastline_get, rb_lastline_set);
rb_lastline_get  1578 re.c               VALUE line = rb_lastline_get();
rb_lastline_get  2281 string.c           line = rb_lastline_get();


rb_lastline_set

rb_lastline_set  10090 eval.c             rb_lastline_set(th->last_line);
rb_lastline_set  10217 eval.c             rb_lastline_set(tmp->last_line);
rb_lastline_set   922 ext/stringio/stringio.c     rb_lastline_set(str);
rb_lastline_set  3169 ext/zlib/zlib.c 	rb_lastline_set(dst);
rb_lastline_set   343 intern.h       void rb_lastline_set _((VALUE));
rb_lastline_set  1649 io.c               rb_lastline_set(str);
rb_lastline_set  4405 io.c               rb_lastline_set(line);
rb_lastline_set  4426 io.c               rb_lastline_set(line);
rb_lastline_set  5606 io.c               rb_define_virtual_variable("$_", rb_lastline_get, rb_lastline_set);
rb_lastline_set  2323 string.c           rb_lastline_set(str);
rb_lastline_set  2370 string.c           rb_lastline_set(str);
rb_lastline_set  3850 string.c       	rb_lastline_set(str);
rb_lastline_set  4017 string.c           rb_lastline_set(dup);


rb_ll2inum

rb_ll2inum         78 intern.h       VALUE rb_ll2inum _((LONG_LONG));
rb_ll2inum        145 ruby.h         VALUE rb_ll2inum _((LONG_LONG));
rb_ll2inum        146 ruby.h         #define LL2NUM(v) rb_ll2inum(v)


rb_load

rb_load          6754 eval.c         	rb_load(fname, wrap);
rb_load          6783 eval.c             rb_load(fname, RTEST(wrap));
rb_load          7035 eval.c         		    rb_load(path, 0);
rb_load           175 intern.h       void rb_load _((VALUE, int));


rb_load_fail

rb_load_fail      842 ruby.c             if (!fname) rb_load_fail(fname);
rb_load_fail      850 ruby.c         	    rb_load_fail(fname);


rb_load_file

rb_load_file     6709 eval.c         	rb_load_file(RSTRING(fname)->ptr);
rb_load_file      375 intern.h       void rb_load_file _((const char*));


rb_loaderror

rb_loaderror     1262 dln.c              rb_loaderror(errbuf);
rb_loaderror     1301 dln.c              if (strlen(file) >= MAXPATHLEN) rb_loaderror("filename too long");
rb_loaderror     1315 dln.c          	rb_loaderror("%s - %s\n%s", dln_strerror(), buf, file);
rb_loaderror     1380 dln.c          	    rb_loaderror("%s - %s", strerror(errno), file);
rb_loaderror     1387 dln.c          		rb_loaderror("%s - %s", strerror(ENOSYM), file);
rb_loaderror     1440 dln.c          	    rb_loaderror("Failed to load %.200s", file);
rb_loaderror     1447 dln.c          	    rb_loaderror("Failed to lookup Init function %.200s", file);
rb_loaderror     1472 dln.c          	    rb_loaderror("Failed to load %.200s", file);
rb_loaderror     1479 dln.c          	    rb_loaderror("Failed to lookup Init function %.200s",file);
rb_loaderror     1499 dln.c          	rb_loaderror("Failed to load %.200s", file);
rb_loaderror     1522 dln.c          	rb_loaderror("Failed to lookup Init function %.200s", file);
rb_loaderror     1527 dln.c          	rb_loaderror(errmsg, strerror(err_stat), buf);
rb_loaderror     1558 dln.c          	  rb_loaderror("Unresolved Alias - %s", file);
rb_loaderror     1568 dln.c          	  rb_loaderror("%s - %s",errMessage , file);
rb_loaderror     1575 dln.c          	  rb_loaderror("Unresolved symbols - %s" , file);
rb_loaderror     1643 dln.c              rb_loaderror("%s - %s", error, file);
rb_loaderror     1156 error.c            rb_loaderror("%s -- %s", strerror(errno), path);


rb_longjmp

rb_longjmp       4519 eval.c             rb_longjmp(TAG_RAISE, mesg);
rb_longjmp       4526 eval.c             rb_longjmp(TAG_FATAL, mesg);
rb_longjmp       4622 eval.c         	rb_longjmp(TAG_RAISE, mesg);
rb_longjmp       4625 eval.c             rb_longjmp(TAG_RAISE, mesg);


rb_make_exception

rb_make_exception  197 eval.c         static VALUE rb_make_exception _((int argc, VALUE *argv));
rb_make_exception 4564 eval.c             rb_raise_jump(rb_make_exception(argc, argv));
rb_make_exception 12119 eval.c             exc = rb_make_exception(argc, argv);


rb_make_metaclass

rb_make_metaclass  183 class.c            rb_make_metaclass(klass, RBASIC(super)->klass);
rb_make_metaclass  878 class.c        	klass = rb_make_metaclass(obj, RBASIC(obj)->klass);
rb_make_metaclass  104 intern.h       VALUE rb_make_metaclass _((VALUE, VALUE));
rb_make_metaclass 1541 object.c           rb_make_metaclass(klass, RBASIC(super)->klass);
rb_make_metaclass 2593 object.c           metaclass = rb_make_metaclass(rb_cObject, rb_cClass);
rb_make_metaclass 2594 object.c           metaclass = rb_make_metaclass(rb_cModule, metaclass);
rb_make_metaclass 2595 object.c           metaclass = rb_make_metaclass(rb_cClass, metaclass);
rb_make_metaclass  191 struct.c       	rb_make_metaclass(nstr, RBASIC(klass)->klass);


rb_mark_end_proc

rb_mark_end_proc 1391 gc.c               rb_mark_end_proc();
rb_mark_end_proc  189 intern.h       void rb_mark_end_proc _((void));


rb_mark_generic_ivar

rb_mark_generic_ivar  759 gc.c           	rb_mark_generic_ivar(ptr);
rb_mark_generic_ivar  464 intern.h       void rb_mark_generic_ivar _((VALUE));


rb_mark_generic_ivar_tbl

rb_mark_generic_ivar_tbl 1398 gc.c               rb_mark_generic_ivar_tbl();
rb_mark_generic_ivar_tbl  465 intern.h       void rb_mark_generic_ivar_tbl _((void));


rb_mark_hash

rb_mark_hash     6094 ext/win32ole/win32ole.c     com_hash = Data_Wrap_Struct(rb_cData, rb_mark_hash, st_free_table, st_init_numtable());
rb_mark_hash      241 intern.h       void rb_mark_hash _((struct st_table*));


rb_mark_tbl

rb_mark_tbl      9932 eval.c             rb_mark_tbl(th->locals);
rb_mark_tbl      1394 gc.c               rb_mark_tbl(rb_class_tbl);
rb_mark_tbl       240 intern.h       void rb_mark_tbl _((struct st_table*));
rb_mark_tbl       938 variable.c     	rb_mark_tbl(tbl);
rb_mark_tbl      1265 variable.c         if (RDATA(av)->dmark != (RUBY_DATA_FUNC)rb_mark_tbl ||
rb_mark_tbl      1297 variable.c     	av = Data_Wrap_Struct(0 , rb_mark_tbl, st_free_table, 0);


rb_match_busy

rb_match_busy    1612 re.c               rb_match_busy(result);
rb_match_busy    2166 re.c               rb_match_busy(match);
rb_match_busy      35 re.h           void rb_match_busy _((VALUE));
rb_match_busy    1975 string.c       	    rb_match_busy(match);
rb_match_busy    2095 string.c       	    rb_match_busy(match);
rb_match_busy    4267 string.c       	rb_match_busy(match);


rb_mem_clear

rb_mem_clear      375 array.c        	rb_mem_clear(RARRAY(ary)->ptr + RARRAY(ary)->len,
rb_mem_clear      973 array.c        	rb_mem_clear(RARRAY(ary)->ptr + RARRAY(ary)->len, beg - RARRAY(ary)->len);
rb_mem_clear     2264 array.c        	rb_mem_clear(RARRAY(ary)->ptr + RARRAY(ary)->len, end - RARRAY(ary)->len);
rb_mem_clear     3456 eval.c         		rb_mem_clear(ruby_scope->local_vars, node->nd_tbl[0]);
rb_mem_clear     4071 eval.c         	rb_mem_clear(ruby_scope->local_vars, node->nd_tbl[0]);
rb_mem_clear     5734 eval.c         		rb_mem_clear(local_vars, body->nd_tbl[0]);
rb_mem_clear       23 intern.h       void rb_mem_clear _((register VALUE*, register long));
rb_mem_clear     9705 parse.c        		    rb_mem_clear(vars+i, len-i);
rb_mem_clear     9709 parse.c        		    rb_mem_clear(vars, len);
rb_mem_clear     9718 parse.c        		rb_mem_clear(ruby_scope->local_vars+i, len-i);
rb_mem_clear     5707 parse.y        		    rb_mem_clear(vars+i, len-i);
rb_mem_clear     5711 parse.y        		    rb_mem_clear(vars, len);
rb_mem_clear     5720 parse.y        		rb_mem_clear(ruby_scope->local_vars+i, len-i);
rb_mem_clear      350 struct.c       	rb_mem_clear(RSTRUCT(self)->ptr+RARRAY(values)->len,
rb_mem_clear      369 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       358 intern.h       int rb_memcicmp _((char*,char*,long));
rb_memcicmp        94 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      1048 string.c           retval = rb_memcicmp(RSTRING(str1)->ptr, RSTRING(str2)->ptr, len);


rb_memcmp

rb_memcmp         357 intern.h       int rb_memcmp _((char*,char*,long));
rb_memcmp         912 string.c           retval = rb_memcmp(RSTRING(str1)->ptr, RSTRING(str2)->ptr, len);
rb_memcmp        1179 string.c       	    if (rb_memcmp(s, t, len) == 0) {
rb_memcmp        3698 string.c       	     rb_memcmp(RSTRING(rs)->ptr, p-rslen, rslen) == 0)) {
rb_memcmp        3927 string.c       	 rb_memcmp(RSTRING(rs)->ptr, p+len-rslen, rslen) == 0)) {


rb_memerror

rb_memerror       142 dln.c          	rb_memerror();\
rb_memerror      10047 eval.c         	if (!ptr) rb_memerror();
rb_memerror       126 gc.c           	    rb_memerror();
rb_memerror       163 gc.c           	    rb_memerror();
rb_memerror       346 gc.c           	if (p == 0) rb_memerror();
rb_memerror       354 gc.c           		rb_memerror();


rb_memsearch

rb_memsearch      359 intern.h       long rb_memsearch _((char*,long,char*,long));
rb_memsearch     1072 string.c           pos = rb_memsearch(RSTRING(sub)->ptr, RSTRING(sub)->len,


rb_method_boundp

rb_method_boundp 2265 eval.c         	if (rb_method_boundp(RCLASS(val)->super, ruby_frame->orig_func, 0)) {
rb_method_boundp 2308 eval.c         	    else if (!rb_method_boundp(val, node->nd_mid, call))
rb_method_boundp 2399 eval.c         		if (rb_method_boundp(CLASS_OF(val), node->nd_mid, 1)) {
rb_method_boundp 4111 eval.c         	return rb_method_boundp(klass, id, !priv);
rb_method_boundp 4150 eval.c             if (rb_method_boundp(CLASS_OF(obj), id, !RTEST(priv))) {
rb_method_boundp 4186 eval.c             return rb_method_boundp(mod, rb_to_id(mid), 1);
rb_method_boundp  159 intern.h       int rb_method_boundp _((VALUE, ID, int));


rb_method_missing

rb_method_missing 5522 eval.c         	rb_method_missing(argc, argv, obj);
rb_method_missing 7780 eval.c             rb_define_global_function("method_missing", rb_method_missing, -1);


rb_method_node

rb_method_node   4110 eval.c             if (rb_method_node(klass, respond_to) == basic_respond_to) {
rb_method_node   7786 eval.c             basic_respond_to = rb_method_node(rb_cObject, respond_to);
rb_method_node    353 node.h         NODE* rb_method_node _((VALUE klass, ID id));


rb_mod_ancestors

rb_mod_ancestors  112 intern.h       VALUE rb_mod_ancestors _((VALUE));
rb_mod_ancestors 2711 object.c           rb_define_method(rb_cModule, "ancestors", rb_mod_ancestors, 0); /* in class.c */


rb_mod_autoload

rb_mod_autoload  7912 eval.c             return rb_mod_autoload(ruby_cbase, sym, file);
rb_mod_autoload  7949 eval.c             rb_define_method(rb_cModule, "autoload",  rb_mod_autoload,   2);


rb_mod_autoload_p

rb_mod_autoload_p 7932 eval.c             return rb_mod_autoload_p(ruby_cbase, sym);
rb_mod_autoload_p 7950 eval.c             rb_define_method(rb_cModule, "autoload?", rb_mod_autoload_p, 1);


rb_mod_class_variables

rb_mod_class_variables  496 intern.h       VALUE rb_mod_class_variables _((VALUE));
rb_mod_class_variables 2738 object.c       		     rb_mod_class_variables, 0); /* in variable.c */


rb_mod_const_at

rb_mod_const_at  1920 eval.c         	    data = rb_mod_const_at(cbase->nd_clss, data);
rb_mod_const_at   475 intern.h       void *rb_mod_const_at _((VALUE, void*));
rb_mod_const_at  1531 variable.c     	data = rb_mod_const_at(tmp, data);


rb_mod_const_missing

rb_mod_const_missing  488 intern.h       VALUE rb_mod_const_missing _((VALUE,VALUE));
rb_mod_const_missing 2736 object.c       		     rb_mod_const_missing, 1); /* in variable.c */


rb_mod_const_of

rb_mod_const_of  1926 eval.c         	data = rb_mod_const_of(ruby_cbase, data);
rb_mod_const_of   476 intern.h       void *rb_mod_const_of _((VALUE, void*));
rb_mod_const_of  1576 variable.c         return rb_const_list(rb_mod_const_of(mod, 0));


rb_mod_constants

rb_mod_constants  478 intern.h       VALUE rb_mod_constants _((VALUE));
rb_mod_constants  487 intern.h       VALUE rb_mod_constants _((VALUE));
rb_mod_constants 2729 object.c           rb_define_method(rb_cModule, "constants", rb_mod_constants, 0); /* in variable.c */


rb_mod_define_method

rb_mod_define_method  195 eval.c         static VALUE rb_mod_define_method _((int, VALUE*, VALUE));
rb_mod_define_method 7828 eval.c             rb_define_private_method(rb_cModule, "define_method", rb_mod_define_method, -1);


rb_mod_ge

rb_mod_ge        1424 object.c           return rb_mod_ge(mod, arg);
rb_mod_ge        2704 object.c           rb_define_method(rb_cModule, ">=", rb_mod_ge, 1);


rb_mod_include

rb_mod_include   7509 eval.c         	return rb_mod_include(argc, argv, ruby_wrapper);
rb_mod_include   7511 eval.c             return rb_mod_include(argc, argv, rb_cObject);
rb_mod_include   7809 eval.c             rb_define_private_method(rb_cModule, "include", rb_mod_include, -1);


rb_mod_include_p

rb_mod_include_p  111 intern.h       VALUE rb_mod_include_p _((VALUE, VALUE));
rb_mod_include_p 2709 object.c           rb_define_method(rb_cModule, "include?", rb_mod_include_p, 1); /* in class.c */


rb_mod_included_modules

rb_mod_included_modules  110 intern.h       VALUE rb_mod_included_modules _((VALUE));
rb_mod_included_modules 2708 object.c       		     rb_mod_included_modules, 0); /* in class.c */


rb_mod_init_copy

rb_mod_init_copy  100 class.c            return rb_mod_init_copy(clone, orig);
rb_mod_init_copy  100 intern.h       VALUE rb_mod_init_copy _((VALUE, VALUE));
rb_mod_init_copy 2705 object.c           rb_define_method(rb_cModule, "initialize_copy", rb_mod_init_copy, 1); /* in class.c */


rb_mod_initialize

rb_mod_initialize 1542 object.c           rb_mod_initialize(klass);
rb_mod_initialize 2719 object.c           rb_define_method(rb_cModule, "initialize", rb_mod_initialize, 0);


rb_mod_module_eval

rb_mod_module_eval 7820 eval.c             rb_define_method(rb_cModule, "module_eval", rb_mod_module_eval, -1);
rb_mod_module_eval 7821 eval.c             rb_define_method(rb_cModule, "class_eval", rb_mod_module_eval, -1);
rb_mod_module_eval  174 intern.h       VALUE rb_mod_module_eval _((int, VALUE*, VALUE));
rb_mod_module_eval 1508 object.c       	rb_mod_module_eval(0, 0, module);
rb_mod_module_eval  325 struct.c       	rb_mod_module_eval(0, 0, st);


rb_mod_name

rb_mod_name       448 intern.h       VALUE rb_mod_name _((VALUE));
rb_mod_name      2710 object.c           rb_define_method(rb_cModule, "name", rb_mod_name, 0);  /* in variable.c */


rb_mod_private

rb_mod_private   7259 eval.c             return rb_mod_private(argc, argv, rb_cObject);
rb_mod_private   7812 eval.c             rb_define_private_method(rb_cModule, "private", rb_mod_private, -1);


rb_mod_public

rb_mod_public    7251 eval.c             return rb_mod_public(argc, argv, rb_cObject);
rb_mod_public    7810 eval.c             rb_define_private_method(rb_cModule, "public", rb_mod_public, -1);


rb_mod_remove_const

rb_mod_remove_const  479 intern.h       VALUE rb_mod_remove_const _((VALUE, VALUE));
rb_mod_remove_const 2734 object.c       			     rb_mod_remove_const, 1); /* in variable.c */
rb_mod_remove_const  202 struct.c       	    rb_mod_remove_const(klass, ID2SYM(id));


rb_mod_remove_cvar

rb_mod_remove_cvar  497 intern.h       VALUE rb_mod_remove_cvar _((VALUE, VALUE));
rb_mod_remove_cvar 2740 object.c       			     rb_mod_remove_cvar, 1); /* in variable.c */


rb_mod_to_s

rb_mod_to_s      1294 object.c           rb_mod_to_s(mod);
rb_mod_to_s      2706 object.c           rb_define_method(rb_cModule, "to_s", rb_mod_to_s, 0);


rb_module_new

rb_module_new     292 class.c            mdl = rb_module_new();
rb_module_new    1630 eval.c             PUSH_CLASS(ruby_wrapper = rb_module_new());
rb_module_new    6680 eval.c         	ruby_class = ruby_wrapper = rb_module_new();
rb_module_new     108 intern.h       VALUE rb_module_new _((void));
rb_module_new    1466 object.c           VALUE mod = rb_module_new();


rb_module_s_alloc

rb_module_s_alloc 1461 object.c       static VALUE rb_module_s_alloc _((VALUE));
rb_module_s_alloc 2718 object.c           rb_define_alloc_func(rb_cModule, rb_module_s_alloc);


rb_name_class

rb_name_class     233 class.c            rb_name_class(klass, id);
rb_name_class     293 class.c            rb_name_class(mdl, id);
rb_name_class     452 intern.h       void rb_name_class _((VALUE, ID));
rb_name_class    2502 object.c           rb_name_class(obj, id);


rb_name_error

rb_name_error     224 class.c        	    rb_name_error(id, "%s is already defined", name);
rb_name_error     256 class.c        	    rb_name_error(id, "%s is already defined", name);
rb_name_error     276 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     677 eval.c         	rb_name_error(id, "invalid attribute name `%s'", rb_id2name(id));
rb_name_error    1989 eval.c         	rb_name_error(id, "undefined method `%s' for%s `%s'",
rb_name_error    3413 eval.c         		    rb_name_error(ruby_frame->last_func,
rb_name_error    6077 eval.c         	rb_name_error(ruby_frame->last_func, "calling `super' from `%s' is prohibited",
rb_name_error    12885 eval.c         	rb_name_error(SYM2ID(tag), "uncaught throw `%s'", rb_id2name(SYM2ID(tag)));
rb_name_error    1815 object.c       	rb_name_error(id, "wrong constant name %s", rb_id2name(id));
rb_name_error    1839 object.c       	rb_name_error(id, "wrong constant name %s", rb_id2name(id));
rb_name_error    1862 object.c       	rb_name_error(id, "wrong constant name %s", rb_id2name(id));
rb_name_error    2009 object.c       	rb_name_error(id, "`%s' is not allowed as an instance variable name", rb_id2name(id));
rb_name_error    2042 object.c       	rb_name_error(id, "`%s' is not allowed as an instance variable name", rb_id2name(id));
rb_name_error    2071 object.c       	rb_name_error(id, "`%s' is not allowed as an class variable name", rb_id2name(id));
rb_name_error    2105 object.c       	rb_name_error(id, "`%s' is not allowed as an class variable name", rb_id2name(id));
rb_name_error      88 range.c        	rb_name_error(rb_intern("initialize"), "`initialize' called twice");
rb_name_error     114 struct.c           rb_name_error(id, "%s is not struct member", rb_id2name(id));
rb_name_error     175 struct.c           rb_name_error(ruby_frame->last_func, "`%s' is not a struct member",
rb_name_error     198 struct.c       	    rb_name_error(id, "identifier %s needs to be constant", cname);
rb_name_error     582 struct.c           rb_name_error(id, "no member '%s' in struct", rb_id2name(id));
rb_name_error     647 struct.c           rb_name_error(id, "no member '%s' in struct", rb_id2name(id));
rb_name_error     449 variable.c         rb_name_error(id, "%s is a read-only variable", rb_id2name(id));
rb_name_error     643 variable.c     	rb_name_error(id, "undefined global variable %s", rb_id2name(id));
rb_name_error    1176 variable.c     	rb_name_error(id, "`%s' is not allowed as an instance variable name", rb_id2name(id));
rb_name_error    1195 variable.c         rb_name_error(id, "instance variable %s not defined", rb_id2name(id));
rb_name_error    1206 variable.c     	rb_name_error(id, "uninitialized constant %s::%s",
rb_name_error    1210 variable.c     	rb_name_error(id, "uninitialized constant %s", rb_id2name(id));
rb_name_error    1473 variable.c     	rb_name_error(id, "`%s' is not allowed as a constant name", rb_id2name(id));
rb_name_error    1487 variable.c     	rb_name_error(id, "cannot remove %s::%s",
rb_name_error    1490 variable.c         rb_name_error(id, "constant %s::%s not defined",
rb_name_error    1781 variable.c         rb_name_error(id,"uninitialized class variable %s in %s",
rb_name_error    1812 variable.c     	rb_name_error(id, "wrong class variable name %s", name);
rb_name_error    1824 variable.c     	rb_name_error(id, "wrong class variable name %s", name);
rb_name_error    1838 variable.c     	rb_name_error(id, "wrong class variable name %s", name);
rb_name_error    1919 variable.c     	rb_name_error(id, "wrong class variable name %s", rb_id2name(id));
rb_name_error    1929 variable.c     	rb_name_error(id, "cannot remove %s for %s",
rb_name_error    1932 variable.c         rb_name_error(id, "class variable %s not defined for %s",


rb_need_block

rb_need_block     812 enum.c             rb_need_block();
rb_need_block    4788 eval.c             rb_need_block();
rb_need_block     552 ruby.h         void rb_need_block _((void));


rb_newobj

rb_newobj        8493 parse.c            NODE *n = (NODE*)rb_newobj();
rb_newobj        4495 parse.y            NODE *n = (NODE*)rb_newobj();
rb_newobj         289 ruby.h         VALUE rb_newobj _((void));
rb_newobj         290 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_newnode

rb_node_newnode   388 enum.c             memo = rb_node_newnode(NODE_MEMO, v, i, 0);
rb_node_newnode  1333 eval.c         	top_cref = rb_node_newnode(NODE_CREF,rb_cObject,0,0);
rb_node_newnode  5333 eval.c             cont_protect = (VALUE)rb_node_newnode(NODE_MEMO, cont_protect, 0, 0);
rb_node_newnode   112 ext/enumerator/enumerator.c     memo = rb_node_newnode(NODE_MEMO, rb_ary_new2(size), 0, size);
rb_node_newnode   182 ext/enumerator/enumerator.c     memo = rb_node_newnode(NODE_MEMO, rb_ary_new2(size), 0, size);
rb_node_newnode   259 ext/enumerator/enumerator.c     obj = (VALUE)rb_node_newnode(NODE_MEMO,
rb_node_newnode   234 node.h         #define NEW_NODE(t,a0,a1,a2) rb_node_newnode((t),(VALUE)(a0),(VALUE)(a1),(VALUE)(a2))
rb_node_newnode   351 node.h         NODE *rb_node_newnode _((enum node_type,VALUE,VALUE,VALUE));
rb_node_newnode  7108 parse.c        	rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0)
rb_node_newnode  7214 parse.c            lex_strterm = rb_node_newnode(NODE_HEREDOC,
rb_node_newnode  10239 parse.c        #define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser_heap, 0)
rb_node_newnode  3110 parse.y        	rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0)
rb_node_newnode  3216 parse.y            lex_strterm = rb_node_newnode(NODE_HEREDOC,
rb_node_newnode  6241 parse.y        #define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser_heap, 0)
rb_node_newnode  1304 variable.c         st_insert(tbl, id, (st_data_t)rb_node_newnode(NODE_MEMO, fn, ruby_safe_level, 0));


rb_notimplement

rb_notimplement   445 dir.c              rb_notimplement();
rb_notimplement   475 dir.c              rb_notimplement();
rb_notimplement   728 dir.c              rb_notimplement();
rb_notimplement  1636 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    51 ext/digest/digest.c 	rb_notimplement();
rb_notimplement   336 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   216 ext/readline/readline.c     rb_notimplement();
rb_notimplement   230 ext/readline/readline.c     rb_notimplement();
rb_notimplement   254 ext/readline/readline.c     rb_notimplement();
rb_notimplement   274 ext/readline/readline.c     rb_notimplement();
rb_notimplement   301 ext/readline/readline.c     rb_notimplement();
rb_notimplement   316 ext/readline/readline.c     rb_notimplement();
rb_notimplement   343 ext/readline/readline.c     rb_notimplement();
rb_notimplement   358 ext/readline/readline.c     rb_notimplement();
rb_notimplement   386 ext/readline/readline.c     rb_notimplement();
rb_notimplement   401 ext/readline/readline.c     rb_notimplement();
rb_notimplement   429 ext/readline/readline.c     rb_notimplement();
rb_notimplement   444 ext/readline/readline.c     rb_notimplement();
rb_notimplement   472 ext/readline/readline.c     rb_notimplement();
rb_notimplement   487 ext/readline/readline.c     rb_notimplement();
rb_notimplement   541 ext/readline/readline.c     rb_notimplement();
rb_notimplement   592 ext/readline/readline.c     rb_notimplement();
rb_notimplement   447 ext/socket/socket.c     rb_notimplement();
rb_notimplement  1725 ext/socket/socket.c     rb_notimplement();
rb_notimplement  1846 ext/socket/socket.c     rb_notimplement();
rb_notimplement  2048 ext/socket/socket.c     rb_notimplement();
rb_notimplement  2678 ext/socket/socket.c     rb_notimplement();
rb_notimplement   336 ext/stringio/stringio.c     rb_notimplement();
rb_notimplement  5065 ext/tk/tcltklib.c     rb_notimplement();
rb_notimplement  1809 file.c             rb_notimplement();
rb_notimplement  1967 file.c             rb_notimplement();
rb_notimplement  2095 file.c             rb_notimplement();
rb_notimplement  2125 file.c             rb_notimplement();
rb_notimplement  2170 file.c             rb_notimplement();
rb_notimplement  3041 file.c             rb_notimplement();
rb_notimplement  3086 file.c             rb_notimplement();
rb_notimplement   911 io.c               rb_notimplement();
rb_notimplement  4700 io.c           	rb_notimplement();
rb_notimplement  4787 io.c               rb_notimplement();
rb_notimplement  4841 io.c               rb_notimplement();
rb_notimplement  4961 io.c               rb_notimplement();
rb_notimplement  5046 io.c               rb_notimplement();
rb_notimplement   101 missing/flock.c         rb_notimplement();
rb_notimplement   109 missing/flock.c         rb_notimplement();
rb_notimplement   131 missing/flock.c     rb_notimplement();
rb_notimplement  1300 process.c          rb_notimplement();
rb_notimplement  1617 process.c          rb_notimplement();
rb_notimplement  1644 process.c          rb_notimplement();
rb_notimplement  1672 process.c          rb_notimplement();
rb_notimplement  1699 process.c          rb_notimplement();
rb_notimplement  1747 process.c          rb_notimplement();
rb_notimplement  1785 process.c          rb_notimplement();
rb_notimplement  1818 process.c          rb_notimplement();
rb_notimplement  1871 process.c          rb_notimplement();
rb_notimplement  1895 process.c          rb_notimplement();
rb_notimplement  1918 process.c          rb_notimplement();
rb_notimplement  1943 process.c          rb_notimplement();
rb_notimplement  1968 process.c          rb_notimplement();
rb_notimplement  2021 process.c      	    rb_notimplement();
rb_notimplement  2025 process.c          rb_notimplement();
rb_notimplement  2119 process.c      	rb_notimplement();
rb_notimplement  2190 process.c      	rb_notimplement();
rb_notimplement  2215 process.c          rb_notimplement();
rb_notimplement  2238 process.c          rb_notimplement();
rb_notimplement  2262 process.c          rb_notimplement();
rb_notimplement  2287 process.c          rb_notimplement();
rb_notimplement  2311 process.c          rb_notimplement();
rb_notimplement  2341 process.c          rb_notimplement();
rb_notimplement  2393 process.c      	    rb_notimplement();
rb_notimplement  2397 process.c          rb_notimplement();
rb_notimplement  2438 process.c          rb_notimplement();
rb_notimplement  2502 process.c          rb_notimplement();
rb_notimplement  2535 process.c          rb_notimplement();
rb_notimplement  2670 process.c      	rb_notimplement();
rb_notimplement  2741 process.c      	rb_notimplement();
rb_notimplement  2793 process.c      	rb_notimplement();
rb_notimplement  2796 process.c          rb_notimplement();
rb_notimplement  2831 process.c          rb_notimplement();
rb_notimplement  2907 process.c      	rb_notimplement();
rb_notimplement  2910 process.c          rb_notimplement();
rb_notimplement  2945 process.c          rb_notimplement();
rb_notimplement  3025 process.c          rb_notimplement();
rb_notimplement  3083 process.c          rb_notimplement();
rb_notimplement  3344 process.c          rb_notimplement();
rb_notimplement   541 ruby.h         NORETURN(void rb_notimplement _((void)));


rb_num2dbl

rb_num2dbl       10911 eval.c             if (!NIL_P(limit)) delay = rb_num2dbl(limit);
rb_num2dbl        277 ruby.h         double rb_num2dbl _((VALUE));
rb_num2dbl        278 ruby.h         #define NUM2DBL(x) rb_num2dbl((VALUE)(x))


rb_num2fix

rb_num2fix        295 intern.h       VALUE rb_num2fix _((VALUE));
rb_num2fix       1832 numeric.c          return rb_num2fix(x);


rb_num2int

rb_num2int        250 ruby.h         long rb_num2int _((VALUE));
rb_num2int        251 ruby.h         #define NUM2INT(x) (FIXNUM_P(x)?FIX2INT(x):rb_num2int((VALUE)x))


rb_num2ll

rb_num2ll        1705 numeric.c          return (unsigned LONG_LONG)rb_num2ll(val);
rb_num2ll         266 ruby.h         LONG_LONG rb_num2ll _((VALUE));
rb_num2ll         268 ruby.h         # define NUM2LL(x) (FIXNUM_P(x)?FIX2LONG(x):rb_num2ll((VALUE)x))


rb_num2long

rb_num2long      1545 numeric.c          return (unsigned long)rb_num2long(val);
rb_num2long      1580 numeric.c          long num = rb_num2long(val);
rb_num2long      1590 numeric.c          long num = FIXNUM_P(val)?FIX2LONG(val):rb_num2long(val);
rb_num2long      1628 numeric.c          return rb_num2long(val);
rb_num2long      1647 numeric.c          v = rb_num2long(val);
rb_num2long       245 ruby.h         long rb_num2long _((VALUE));
rb_num2long       247 ruby.h         #define NUM2LONG(x) (FIXNUM_P(x)?FIX2LONG(x):rb_num2long((VALUE)x))


rb_num2uint

rb_num2uint      1615 numeric.c              return rb_num2uint(val);
rb_num2uint       254 ruby.h         unsigned long rb_num2uint _((VALUE));
rb_num2uint       255 ruby.h         #define NUM2UINT(x) rb_num2uint(x)


rb_num2ulong

rb_num2ulong     1600 numeric.c          unsigned long num = rb_num2ulong(val);
rb_num2ulong      246 ruby.h         unsigned long rb_num2ulong _((VALUE));
rb_num2ulong      248 ruby.h         #define NUM2ULONG(x) rb_num2ulong((VALUE)x)


rb_num_coerce_bin

rb_num_coerce_bin 1179 bignum.c       	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 1205 bignum.c       	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 1238 bignum.c       	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 1437 bignum.c       	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 1468 bignum.c       	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 1499 bignum.c       	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 1528 bignum.c       	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 1568 bignum.c       	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 1624 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  291 intern.h       VALUE rb_num_coerce_bin _((VALUE, VALUE));
rb_num_coerce_bin  564 numeric.c      	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin  588 numeric.c      	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin  612 numeric.c      	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin  641 numeric.c      	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin  701 numeric.c      	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin  732 numeric.c      	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin  760 numeric.c              return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 1991 numeric.c          return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 2024 numeric.c          return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 2059 numeric.c          return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 2110 numeric.c          return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 2133 numeric.c          return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 2155 numeric.c          return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 2175 numeric.c          return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 2209 numeric.c          return rb_num_coerce_bin(x, y);


rb_num_coerce_cmp

rb_num_coerce_cmp  939 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  292 intern.h       VALUE rb_num_coerce_cmp _((VALUE, VALUE));
rb_num_coerce_cmp  912 numeric.c      	return rb_num_coerce_cmp(x, y);
rb_num_coerce_cmp 2256 numeric.c      	return rb_num_coerce_cmp(x, y);


rb_num_coerce_relop

rb_num_coerce_relop  293 intern.h       VALUE rb_num_coerce_relop _((VALUE, VALUE));
rb_num_coerce_relop  946 numeric.c      	return rb_num_coerce_relop(x, y);
rb_num_coerce_relop  982 numeric.c      	return rb_num_coerce_relop(x, y);
rb_num_coerce_relop 1017 numeric.c      	return rb_num_coerce_relop(x, y);
rb_num_coerce_relop 1053 numeric.c      	return rb_num_coerce_relop(x, y);
rb_num_coerce_relop 2279 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 2325 numeric.c      	return rb_num_coerce_relop(x, y);
rb_num_coerce_relop 2348 numeric.c      	return rb_num_coerce_relop(x, y);


rb_num_zerodiv

rb_num_zerodiv   1276 bignum.c           if (BIGZEROP(y)) rb_num_zerodiv();
rb_num_zerodiv    290 intern.h       void rb_num_zerodiv _((void));
rb_num_zerodiv   2069 numeric.c          if (y == 0) rb_num_zerodiv();


rb_obj_alloc

rb_obj_alloc     12771 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      778 ext/readline/readline.c     history = rb_obj_alloc(rb_cObject);
rb_obj_alloc      794 ext/readline/readline.c     fcomp = rb_obj_alloc(rb_cObject);
rb_obj_alloc      799 ext/readline/readline.c     ucomp = rb_obj_alloc(rb_cObject);
rb_obj_alloc      226 ext/socket/socket.c     VALUE sock = init_sock(rb_obj_alloc(klass), NUM2INT(fd));
rb_obj_alloc     1342 ext/socket/socket.c     return init_sock(rb_obj_alloc(klass), fd2);
rb_obj_alloc     2045 ext/socket/socket.c     return rb_assoc_new(init_sock(rb_obj_alloc(klass), sp[0]),
rb_obj_alloc     2046 ext/socket/socket.c 			init_sock(rb_obj_alloc(klass), sp[1]));
rb_obj_alloc     1160 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     2479 hash.c             envtbl = rb_obj_alloc(rb_cObject);
rb_obj_alloc      304 intern.h       VALUE rb_obj_alloc _((VALUE));
rb_obj_alloc     4176 io.c               VALUE io = rb_obj_alloc(klass);
rb_obj_alloc     5692 io.c               argf = rb_obj_alloc(rb_cObject);
rb_obj_alloc     1054 marshal.c      		VALUE tmp = rb_obj_alloc(c);
rb_obj_alloc     1251 marshal.c      	    v = rb_obj_alloc(klass);
rb_obj_alloc     1272 marshal.c      	    v = rb_obj_alloc(klass);
rb_obj_alloc     1293 marshal.c      	       v = rb_obj_alloc(klass);
rb_obj_alloc      264 object.c           clone = rb_obj_alloc(rb_obj_class(obj));
rb_obj_alloc      300 object.c           dup = rb_obj_alloc(rb_obj_class(obj));
rb_obj_alloc     1606 object.c           obj = rb_obj_alloc(klass);
rb_obj_alloc     2744 object.c           rb_define_method(rb_cClass, "allocate", rb_obj_alloc, 0);
rb_obj_alloc     2757 object.c           ruby_top_self = rb_obj_alloc(rb_cObject);
rb_obj_alloc      197 process.c          rb_last_status = rb_obj_alloc(rb_cProcStatus);
rb_obj_alloc       62 range.c            VALUE range = rb_obj_alloc(rb_cRange);


rb_obj_as_string

rb_obj_as_string 1284 array.c        	    tmp = rb_obj_as_string(tmp);
rb_obj_as_string  273 error.c        		    etype = RSTRING(rb_obj_as_string(x))->ptr;
rb_obj_as_string  443 error.c            exc = rb_obj_as_string(exc);
rb_obj_as_string 1555 error.c        	    VALUE str = rb_obj_as_string(ruby_errinfo);
rb_obj_as_string 1592 eval.c         	rb_str_append(str, rb_obj_as_string(ruby_errinfo));
rb_obj_as_string 2788 eval.c         		     RSTRING(rb_obj_as_string(c))->ptr);
rb_obj_as_string 3653 eval.c         			     RSTRING(rb_obj_as_string(klass))->ptr);
rb_obj_as_string 3735 eval.c         	result = rb_obj_as_string(rb_eval(self, node->nd_body));
rb_obj_as_string  510 ext/dbm/dbm.c      keystr = rb_obj_as_string(keystr);
rb_obj_as_string  511 ext/dbm/dbm.c      valstr = rb_obj_as_string(valstr);
rb_obj_as_string  166 ext/readline/readline.c 	temp = rb_obj_as_string(RARRAY(ary)->ptr[i]);
rb_obj_as_string 1003 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 2771 ext/zlib/zlib.c 	str = rb_obj_as_string(str);
rb_obj_as_string  408 intern.h       VALUE rb_obj_as_string _((VALUE));
rb_obj_as_string  550 io.c           	str = rb_obj_as_string(str);
rb_obj_as_string 2342 io.c           	str = rb_obj_as_string(str);
rb_obj_as_string 3828 io.c           	    line = rb_obj_as_string(argv[i]);
rb_obj_as_string 3862 io.c               rb_io_write(rb_stdout, rb_obj_as_string(rb_inspect(obj)));
rb_obj_as_string  374 object.c           return rb_obj_as_string(rb_funcall(obj, id_inspect, 0, 0));
rb_obj_as_string  910 pack.c         	    from = rb_obj_as_string(NEXTFROM);
rb_obj_as_string  516 range.c            str = rb_obj_as_string(rb_ivar_get(range, id_beg));
rb_obj_as_string  517 range.c            str2 = rb_obj_as_string(rb_ivar_get(range, id_end));
rb_obj_as_string  408 sprintf.c      		str = rb_obj_as_string(arg);
rb_obj_as_string 1976 string.c       	    repl = rb_obj_as_string(rb_yield(rb_reg_nth_match(0, match)));
rb_obj_as_string 2096 string.c       	    val = rb_obj_as_string(rb_yield(rb_reg_nth_match(0, match)));


rb_obj_call_init

rb_obj_call_init 8291 eval.c             rb_obj_call_init(block, argc, argv);
rb_obj_call_init 11761 eval.c             rb_obj_call_init(th->thread, argc, argv);
rb_obj_call_init  182 intern.h       void rb_obj_call_init _((VALUE, int, VALUE*));
rb_obj_call_init 1607 object.c           rb_obj_call_init(obj, argc, argv);


rb_obj_class

rb_obj_class      604 array.c            klass = rb_obj_class(ary);
rb_obj_class     1470 array.c            if (rb_obj_class(ary) != rb_cArray) {
rb_obj_class     2364 array.c            if (len == 0) return ary_new(rb_obj_class(ary), 0);
rb_obj_class     2373 array.c            ary2 = ary_new(rb_obj_class(ary), len);
rb_obj_class      887 error.c            VALUE klass = rb_obj_class(self);
rb_obj_class     8104 eval.c             bind = Data_Make_Struct(rb_obj_class(self),struct BLOCK,blk_mark,blk_free,data);
rb_obj_class     8123 eval.c             bind = Data_Make_Struct(rb_obj_class(self),struct BLOCK,blk_mark,blk_free,data);
rb_obj_class     8353 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      152 ext/digest/digest.c     algo = get_digest_base_metadata(rb_obj_class(copy));
rb_obj_class      153 ext/digest/digest.c     if (algo != get_digest_base_metadata(rb_obj_class(obj))) {
rb_obj_class      171 ext/digest/digest.c     algo = get_digest_base_metadata(rb_obj_class(self));
rb_obj_class      204 ext/digest/digest.c     algo = get_digest_base_metadata(rb_obj_class(self));
rb_obj_class      235 ext/digest/digest.c     algo = get_digest_base_metadata(rb_obj_class(self));
rb_obj_class      264 ext/digest/digest.c     klass = rb_obj_class(self);
rb_obj_class      267 ext/digest/digest.c     if (rb_obj_class(other) == klass) {
rb_obj_class       97 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      245 ext/openssl/ossl_cipher.c     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      197 file.c             if (rb_obj_is_kind_of(other, rb_obj_class(self))) {
rb_obj_class     3488 file.c             if (!rb_obj_is_instance_of(orig, rb_obj_class(copy))) {
rb_obj_class      313 intern.h       VALUE rb_obj_class _((VALUE));
rb_obj_class      264 object.c           clone = rb_obj_alloc(rb_obj_class(obj));
rb_obj_class      300 object.c           dup = rb_obj_alloc(rb_obj_class(obj));
rb_obj_class      313 object.c           if (TYPE(obj) != TYPE(orig) || rb_obj_class(obj) != rb_obj_class(orig)) {
rb_obj_class      481 object.c           if (rb_obj_class(obj) == c) return Qtrue;
rb_obj_class     1570 object.c           if (rb_obj_class(obj) != rb_class_real(klass)) {
rb_obj_class     2622 object.c           rb_define_method(rb_mKernel, "class", rb_obj_class, 0);
rb_obj_class      129 range.c            if (!rb_obj_is_instance_of(obj, rb_obj_class(range)))
rb_obj_class      187 range.c            if (!rb_obj_is_instance_of(obj, rb_obj_class(range)))
rb_obj_class      690 re.c               if (!rb_obj_is_instance_of(orig, rb_obj_class(obj))) {
rb_obj_class     1987 re.c               if (!rb_obj_is_instance_of(re, rb_obj_class(copy))) {
rb_obj_class      302 ruby.h             OBJSETUP(dup,rb_obj_class(obj),(RBASIC(obj)->flags)&(T_MASK|FL_EXIVAR|FL_TAINT));\
rb_obj_class      158 string.c           return str_new3(rb_obj_class(str), str);
rb_obj_class      188 string.c           klass = rb_obj_class(orig);
rb_obj_class      215 string.c           return str_new(rb_obj_class(obj), ptr, len);
rb_obj_class      313 string.c           VALUE dup = str_alloc(rb_obj_class(str));
rb_obj_class     2163 string.c       	RBASIC(dest)->klass = rb_obj_class(str);
rb_obj_class     2542 string.c           if (rb_obj_class(str) != rb_cString) {
rb_obj_class       53 struct.c           VALUE members = rb_struct_s_members(rb_obj_class(s));
rb_obj_class       96 struct.c           return rb_struct_s_members_m(rb_obj_class(obj));
rb_obj_class      338 struct.c           VALUE klass = rb_obj_class(self);
rb_obj_class      473 struct.c           char *cname = rb_class2name(rb_obj_class(s));
rb_obj_class      520 struct.c       	char *cname = rb_class2name(rb_obj_class(s));
rb_obj_class      557 struct.c           if (!rb_obj_is_instance_of(s, rb_obj_class(copy))) {
rb_obj_class      796 struct.c           if (rb_obj_class(s) != rb_obj_class(s2)) return Qfalse;
rb_obj_class      821 struct.c           h = rb_hash(rb_obj_class(s));
rb_obj_class      846 struct.c           if (rb_obj_class(s) != rb_obj_class(s2)) return Qfalse;
rb_obj_class      202 variable.c     	    if (rb_obj_class(klass) == rb_cModule) {


rb_obj_classname

rb_obj_classname 1978 bignum.c       		 rb_obj_classname(y));
rb_obj_classname  194 class.c        		 rb_obj_classname(super));
rb_obj_classname  310 class.c        	rb_raise(rb_eTypeError, "%s is not a module", rb_obj_classname(module));
rb_obj_classname  333 class.c        		 rb_class2name(outer), rb_obj_classname(module));
rb_obj_classname   47 compar.c       	classname = rb_obj_classname(y);
rb_obj_classname   50 compar.c       	     rb_obj_classname(x), classname);
rb_obj_classname 1379 dir.c          		 rb_obj_classname(dir));
rb_obj_classname  276 error.c        		    etype = rb_obj_classname(x);
rb_obj_classname  756 error.c        	    rb_str_cat2(d, rb_obj_classname(obj));
rb_obj_classname 1170 error.c            if (OBJ_FROZEN(obj)) rb_error_frozen(rb_obj_classname(obj));
rb_obj_classname  266 eval.c         		 rb_obj_classname(x));
rb_obj_classname 3865 eval.c         			 rb_obj_classname(recv));
rb_obj_classname 4003 eval.c         			 rb_obj_classname(result));
rb_obj_classname 4487 eval.c         			rb_obj_classname(ruby_errinfo),
rb_obj_classname 6257 eval.c         		     rb_obj_classname(scope));
rb_obj_classname 8560 eval.c             char *cname = rb_obj_classname(self);
rb_obj_classname 8664 eval.c         		     rb_obj_classname(proc));
rb_obj_classname 9223 eval.c             s = rb_obj_classname(method);
rb_obj_classname 9394 eval.c         		     rb_obj_classname(body));
rb_obj_classname 10011 eval.c         		 rb_obj_classname(data));
rb_obj_classname 12337 eval.c             char *cname = rb_obj_classname(thread);
rb_obj_classname 12665 eval.c         		 rb_obj_classname(thread));
rb_obj_classname  129 ext/bigdecimal/bigdecimal.c                     rb_obj_classname(v)
rb_obj_classname   85 ext/openssl/ossl.h                rb_obj_classname(obj), rb_class2name(klass));\
rb_obj_classname   92 ext/openssl/ossl.h                rb_obj_classname(obj), rb_class2name(klass));\
rb_obj_classname  612 file.c             rb_str_buf_cat2(str, rb_obj_classname(self));
rb_obj_classname 1656 gc.c           		 rb_obj_classname(block));
rb_obj_classname 1739 gc.c           		 rb_obj_classname(block));
rb_obj_classname  989 io.c               cname = rb_obj_classname(obj);
rb_obj_classname 3963 io.c           		 rb_obj_classname(val));
rb_obj_classname  659 marshal.c      			     rb_obj_classname(obj));
rb_obj_classname  668 marshal.c      		     rb_obj_classname(obj));
rb_obj_classname  124 numeric.c      	     rb_obj_classname(x[1]),
rb_obj_classname  125 numeric.c      	     rb_obj_classname(x[0]));
rb_obj_classname  197 numeric.c      	     rb_obj_classname(x));
rb_obj_classname  207 numeric.c          rb_raise(rb_eTypeError, "can't copy %s", rb_obj_classname(x));
rb_obj_classname 1854 numeric.c                      rb_obj_classname(x));
rb_obj_classname 1877 numeric.c                      rb_obj_classname(x));
rb_obj_classname  208 object.c               rb_raise(rb_eTypeError, "[bug] frozen object (%s) allocated", rb_obj_classname(dest));
rb_obj_classname  262 object.c               rb_raise(rb_eTypeError, "can't clone %s", rb_obj_classname(obj));
rb_obj_classname  298 object.c               rb_raise(rb_eTypeError, "can't dup %s", rb_obj_classname(obj));
rb_obj_classname  357 object.c           char *cname = rb_obj_classname(obj);
rb_obj_classname  442 object.c       	c = rb_obj_classname(obj);
rb_obj_classname  871 object.c       		 rb_obj_classname(y));
rb_obj_classname 2126 object.c       		     rb_obj_classname(val),
rb_obj_classname 2148 object.c       		 rb_obj_classname(val), method, tname);
rb_obj_classname 2167 object.c       		 rb_obj_classname(val), method, tname);
rb_obj_classname 2181 object.c       		 rb_obj_classname(val), method);
rb_obj_classname  346 pack.c             rb_raise(rb_eTypeError, "can't convert %s to `integer'", rb_obj_classname(x));
rb_obj_classname   93 prec.c                     rb_obj_classname(x), rb_class2name(module));
rb_obj_classname  216 random.c                          rb_obj_classname(vseed));
rb_obj_classname  355 range.c        			 rb_obj_classname(b));
rb_obj_classname  403 range.c        		 rb_obj_classname(beg));
rb_obj_classname  513 ruby.h         char *rb_obj_classname _((VALUE));
rb_obj_classname  275 signal.c       		     rb_obj_classname(argv[0]));
rb_obj_classname 1147 string.c       		       rb_obj_classname(sub));
rb_obj_classname 1271 string.c       		 rb_obj_classname(sub));
rb_obj_classname 2284 string.c       		 NIL_P(line) ? "nil" : rb_obj_classname(line));
rb_obj_classname  209 time.c         		 rb_obj_classname(time), tstr);


rb_obj_clone

rb_obj_clone      386 error.c            exc = rb_obj_clone(self);
rb_obj_clone     1631 eval.c             ruby_top_self = rb_obj_clone(ruby_top_self);
rb_obj_clone     6681 eval.c         	self = rb_obj_clone(ruby_top_self);
rb_obj_clone      305 intern.h       VALUE rb_obj_clone _((VALUE));
rb_obj_clone     2624 object.c           rb_define_method(rb_mKernel, "clone", rb_obj_clone, 0);


rb_obj_dummy

rb_obj_dummy     2600 object.c           rb_define_private_method(rb_cObject, "initialize", rb_obj_dummy, 0);
rb_obj_dummy     2601 object.c           rb_define_private_method(rb_cClass, "inherited", rb_obj_dummy, 1);
rb_obj_dummy     2602 object.c           rb_define_private_method(rb_cModule, "included", rb_obj_dummy, 1);
rb_obj_dummy     2603 object.c           rb_define_private_method(rb_cModule, "extended", rb_obj_dummy, 1);
rb_obj_dummy     2604 object.c           rb_define_private_method(rb_cModule, "method_added", rb_obj_dummy, 1);
rb_obj_dummy     2605 object.c           rb_define_private_method(rb_cModule, "method_removed", rb_obj_dummy, 1);
rb_obj_dummy     2606 object.c           rb_define_private_method(rb_cModule, "method_undefined", rb_obj_dummy, 1);
rb_obj_dummy     2655 object.c           rb_define_private_method(rb_mKernel, "singleton_method_added", rb_obj_dummy, 1);
rb_obj_dummy     2656 object.c           rb_define_private_method(rb_mKernel, "singleton_method_removed", rb_obj_dummy, 1);
rb_obj_dummy     2657 object.c           rb_define_private_method(rb_mKernel, "singleton_method_undefined", rb_obj_dummy, 1);


rb_obj_dup

rb_obj_dup       10847 eval.c         	VALUE errinfo = rb_obj_dup(th->errinfo);
rb_obj_dup        325 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        793 hash.c             return rb_hash_delete_if(rb_obj_dup(hash));
rb_obj_dup       1605 hash.c             return rb_hash_update(rb_obj_dup(hash1), hash2);
rb_obj_dup        306 intern.h       VALUE rb_obj_dup _((VALUE));
rb_obj_dup       2625 object.c           rb_define_method(rb_mKernel, "dup", rb_obj_dup, 0);


rb_obj_equal

rb_obj_equal     2610 object.c           rb_define_method(rb_mKernel, "==", rb_obj_equal, 1);
rb_obj_equal     2611 object.c           rb_define_method(rb_mKernel, "equal?", rb_obj_equal, 1);
rb_obj_equal     2615 object.c           rb_define_method(rb_mKernel, "eql?", rb_obj_equal, 1);
rb_obj_equal     2695 object.c           rb_define_method(rb_cSymbol, "===", rb_obj_equal, 1);
rb_obj_equal     2699 object.c           rb_define_method(rb_cModule, "==", rb_obj_equal, 1);


rb_obj_freeze

rb_obj_freeze      78 array.c            return rb_obj_freeze(ary);
rb_obj_freeze     395 ext/openssl/ossl_ssl.c     rb_obj_freeze(self);
rb_obj_freeze     310 ext/strscan/strscan.c     rb_obj_freeze(p->str);
rb_obj_freeze    1297 ext/strscan/strscan.c     rb_obj_freeze(tmp);
rb_obj_freeze    1300 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    4394 file.c             separator = rb_obj_freeze(rb_str_new2("/"));
rb_obj_freeze    4401 file.c             rb_define_const(rb_cFile, "ALT_SEPARATOR", rb_obj_freeze(rb_str_new2("\\")));
rb_obj_freeze    4405 file.c             rb_define_const(rb_cFile, "PATH_SEPARATOR", rb_obj_freeze(rb_str_new2(PATH_SEP)));
rb_obj_freeze      41 hash.c             return rb_obj_freeze(hash);
rb_obj_freeze    1635 hash.c             rb_obj_freeze(str);
rb_obj_freeze    1709 hash.c         	    rb_obj_freeze(str);
rb_obj_freeze     311 intern.h       VALUE rb_obj_freeze _((VALUE));
rb_obj_freeze    1295 object.c           return rb_obj_freeze(mod);
rb_obj_freeze    2631 object.c           rb_define_method(rb_mKernel, "freeze", rb_obj_freeze, 0);
rb_obj_freeze     629 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        1399 array.c            id = rb_obj_id(obj);
rb_obj_id        1419 array.c            return rb_ary_includes(inspect_tbl, rb_obj_id(obj));
rb_obj_id        2872 array.c            id = rb_obj_id(ary2);
rb_obj_id        1788 gc.c               objid = rb_obj_id(obj);	/* make obj into id */
rb_obj_id         312 intern.h       VALUE rb_obj_id _((VALUE));
rb_obj_id         153 object.c           return rb_obj_id(obj);
rb_obj_id        2617 object.c           rb_define_method(rb_mKernel, "hash", rb_obj_id, 0);
rb_obj_id        2619 object.c           rb_define_method(rb_mKernel, "__id__", rb_obj_id, 0);
rb_obj_id        2620 object.c           rb_define_method(rb_mKernel, "object_id", rb_obj_id, 0);


rb_obj_init_copy

rb_obj_init_copy   66 class.c            rb_obj_init_copy(clone, orig);
rb_obj_init_copy  307 intern.h       VALUE rb_obj_init_copy _((VALUE,VALUE));
rb_obj_init_copy 2626 object.c           rb_define_method(rb_mKernel, "initialize_copy", rb_obj_init_copy, 1);


rb_obj_instance_eval

rb_obj_instance_eval 7805 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  173 intern.h       VALUE rb_obj_instance_eval _((int, VALUE*, VALUE));


rb_obj_instance_variables

rb_obj_instance_variables  473 intern.h       VALUE rb_obj_instance_variables _((VALUE));
rb_obj_instance_variables 2645 object.c       		     rb_obj_instance_variables, 0); /* in variable.c */


rb_obj_is_instance_of

rb_obj_is_instance_of   90 ext/openssl/ossl.h   if (!rb_obj_is_instance_of(obj, klass)) {\
rb_obj_is_instance_of   97 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 1165 ext/syck/rubyext.c                 else if ( !NIL_P( obj ) && rb_obj_is_instance_of( val, rb_cHash ) )
rb_obj_is_instance_of 3488 file.c             if (!rb_obj_is_instance_of(orig, rb_obj_class(copy))) {
rb_obj_is_instance_of  302 intern.h       VALUE rb_obj_is_instance_of _((VALUE, VALUE));
rb_obj_is_instance_of 2651 object.c           rb_define_method(rb_mKernel, "instance_of?", rb_obj_is_instance_of, 1);
rb_obj_is_instance_of  129 range.c            if (!rb_obj_is_instance_of(obj, rb_obj_class(range)))
rb_obj_is_instance_of  187 range.c            if (!rb_obj_is_instance_of(obj, rb_obj_class(range)))
rb_obj_is_instance_of  690 re.c               if (!rb_obj_is_instance_of(orig, rb_obj_class(obj))) {
rb_obj_is_instance_of 1987 re.c               if (!rb_obj_is_instance_of(re, rb_obj_class(copy))) {
rb_obj_is_instance_of  557 struct.c           if (!rb_obj_is_instance_of(s, rb_obj_class(copy))) {


rb_obj_is_kind_of

rb_obj_is_kind_of  956 error.c            if (!rb_obj_is_kind_of(exc, rb_eSystemCallError)) return Qfalse;
rb_obj_is_kind_of 1435 eval.c         	if (rb_obj_is_kind_of(ruby_errinfo, rb_eSystemExit)) {
rb_obj_is_kind_of 1526 eval.c             if (err && rb_obj_is_kind_of(err, rb_eSystemExit)) {
rb_obj_is_kind_of 2305 eval.c         		    !rb_obj_is_kind_of(self, rb_class_real(val)))
rb_obj_is_kind_of 4479 eval.c         	&& !rb_obj_is_kind_of(ruby_errinfo, rb_eSystemExit)) {
rb_obj_is_kind_of 4606 eval.c         	if (!rb_obj_is_kind_of(mesg, rb_eException))
rb_obj_is_kind_of 5240 eval.c         	return rb_obj_is_kind_of(ruby_errinfo, rb_eStandardError);
rb_obj_is_kind_of 5248 eval.c         	if (!rb_obj_is_kind_of(argv[0], rb_cModule)) {
rb_obj_is_kind_of 5289 eval.c         	    if (rb_obj_is_kind_of(ruby_errinfo, eclass)) {
rb_obj_is_kind_of 5915 eval.c         	    if (!rb_obj_is_kind_of(ruby_frame->self, rb_class_real(defined_class)))
rb_obj_is_kind_of 7523 eval.c             if (!NIL_P(val) && !rb_obj_is_kind_of(val, rb_eException)) {
rb_obj_is_kind_of 9116 eval.c         	else if (!rb_obj_is_kind_of(recv, data->rklass)) {
rb_obj_is_kind_of 10128 eval.c         	if (!rb_obj_is_kind_of(ruby_errinfo, rb_eSystemExit)) {
rb_obj_is_kind_of 11673 eval.c         	else if (rb_obj_is_kind_of(ruby_errinfo, rb_eSystemExit)) {
rb_obj_is_kind_of  432 ext/dl/dl.c          if (rb_obj_is_kind_of(e, rb_cDLPtrData)) {
rb_obj_is_kind_of  439 ext/dl/dl.c            if (rb_obj_is_kind_of(e, rb_cDLPtrData)) {
rb_obj_is_kind_of  503 ext/dl/dl.c        if (rb_obj_is_kind_of(val0, rb_cDLPtrData)) {
rb_obj_is_kind_of  508 ext/dl/dl.c          if (rb_obj_is_kind_of(val0, rb_cDLPtrData)) {
rb_obj_is_kind_of  148 ext/dl/ptr.c     if (rb_obj_is_kind_of(val, rb_cDLPtrData)) {
rb_obj_is_kind_of  117 ext/dl/sym.c     if( rb_obj_is_kind_of(val, rb_cDLSymbol) ){
rb_obj_is_kind_of  486 ext/dl/sym.c   	  if( rb_obj_is_kind_of(argv[i], rb_cDLPtrData) ){
rb_obj_is_kind_of  491 ext/dl/sym.c   	    if( !rb_obj_is_kind_of(pval, rb_cDLPtrData) ){
rb_obj_is_kind_of   64 ext/openssl/ossl.c         if (!rb_obj_is_kind_of(val, cX509Cert)) {
rb_obj_is_kind_of   83 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  694 ext/socket/socket.c     else if (rb_obj_is_kind_of(host, rb_cInteger)) {
rb_obj_is_kind_of 1683 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  742 ext/win32ole/win32ole.c     if(rb_obj_is_kind_of(val, cWIN32OLE)) {
rb_obj_is_kind_of  749 ext/win32ole/win32ole.c     if (rb_obj_is_kind_of(val, rb_cTime)) {
rb_obj_is_kind_of 1582 ext/win32ole/win32ole.c     if (rb_obj_is_kind_of(ole, cWIN32OLE)) {
rb_obj_is_kind_of 1762 ext/win32ole/win32ole.c     if (rb_obj_is_kind_of(target, cWIN32OLE_TYPE) ||
rb_obj_is_kind_of 1763 ext/win32ole/win32ole.c         rb_obj_is_kind_of(target, cWIN32OLE_METHOD)) {
rb_obj_is_kind_of 4361 ext/win32ole/win32ole.c     if (rb_obj_is_kind_of(oletype, cWIN32OLE_TYPE)) {
rb_obj_is_kind_of 5573 ext/win32ole/win32ole.c     if (!rb_obj_is_kind_of(obj, cWIN32OLE_EVENT)) {
rb_obj_is_kind_of 5930 ext/win32ole/win32ole.c     if (!rb_obj_is_kind_of(ole, cWIN32OLE)) {
rb_obj_is_kind_of  197 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  303 intern.h       VALUE rb_obj_is_kind_of _((VALUE, VALUE));
rb_obj_is_kind_of 1312 object.c           return rb_obj_is_kind_of(arg, mod);
rb_obj_is_kind_of 2179 object.c           if (!rb_obj_is_kind_of(v, rb_cInteger)) {
rb_obj_is_kind_of 2652 object.c           rb_define_method(rb_mKernel, "kind_of?", rb_obj_is_kind_of, 1);
rb_obj_is_kind_of 2653 object.c           rb_define_method(rb_mKernel, "is_a?", rb_obj_is_kind_of, 1);
rb_obj_is_kind_of  340 range.c        	else if (rb_obj_is_kind_of(b, rb_cNumeric)) {
rb_obj_is_kind_of  473 range.c            if (!rb_obj_is_kind_of(range, rb_cRange)) return Qfalse;


rb_obj_is_proc

rb_obj_is_proc   2554 eval.c             if (!rb_obj_is_proc(trace)) {
rb_obj_is_proc   6255 eval.c         	if (!rb_obj_is_proc(scope)) {
rb_obj_is_proc   8660 eval.c             if (!rb_obj_is_proc(proc)) {
rb_obj_is_proc   8662 eval.c         	if (!rb_obj_is_proc(b)) {
rb_obj_is_proc   9392 eval.c         	if (!rb_obj_is_method(body) && !rb_obj_is_proc(body)) {


rb_obj_remove_instance_variable

rb_obj_remove_instance_variable  474 intern.h       VALUE rb_obj_remove_instance_variable _((VALUE, VALUE));
rb_obj_remove_instance_variable 2649 object.c       			     rb_obj_remove_instance_variable, 1); /* in variable.c */


rb_obj_respond_to

rb_obj_respond_to 4127 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  167 intern.h       int rb_obj_respond_to _((VALUE, ID, int));


rb_obj_singleton_methods

rb_obj_singleton_methods  117 intern.h       VALUE rb_obj_singleton_methods _((int, VALUE*, VALUE));
rb_obj_singleton_methods 1908 object.c       	return rb_obj_singleton_methods(argc, argv, obj);
rb_obj_singleton_methods 2639 object.c       		     rb_obj_singleton_methods, -1); /* in class.c */


rb_obj_taint

rb_obj_taint      581 ext/socket/socket.c     rb_obj_taint(str);
rb_obj_taint      308 intern.h       VALUE rb_obj_taint _((VALUE));
rb_obj_taint     2628 object.c           rb_define_method(rb_mKernel, "taint", rb_obj_taint, 0);


rb_obj_tainted

rb_obj_tainted    309 intern.h       VALUE rb_obj_tainted _((VALUE));
rb_obj_tainted   2629 object.c           rb_define_method(rb_mKernel, "tainted?", rb_obj_tainted, 0);


rb_obj_untaint

rb_obj_untaint    310 intern.h       VALUE rb_obj_untaint _((VALUE));
rb_obj_untaint   2630 object.c           rb_define_method(rb_mKernel, "untaint", rb_obj_untaint, 0);


rb_p

rb_p             3891 io.c           	rb_p(argv[i]);
rb_p              515 ruby.h         void rb_p _((VALUE));


rb_parser_append_print

rb_parser_append_print  330 intern.h       void rb_parser_append_print _((void));
rb_parser_append_print 1199 ruby.c         	rb_parser_append_print();


rb_parser_calloc

rb_parser_calloc  129 parse.c        #define YYCALLOC	rb_parser_calloc
rb_parser_calloc  137 parse.c        static void *rb_parser_calloc _((size_t, size_t));
rb_parser_calloc   32 parse.y        #define YYCALLOC	rb_parser_calloc
rb_parser_calloc   40 parse.y        static void *rb_parser_calloc _((size_t, size_t));


rb_parser_free

rb_parser_free    130 parse.c        #define YYFREE 	rb_parser_free
rb_parser_free    138 parse.c        static void rb_parser_free _((void *));
rb_parser_free     33 parse.y        #define YYFREE 	rb_parser_free
rb_parser_free     41 parse.y        static void rb_parser_free _((void *));


rb_parser_malloc

rb_parser_malloc  127 parse.c        #define YYMALLOC	rb_parser_malloc
rb_parser_malloc  135 parse.c        static void *rb_parser_malloc _((size_t));
rb_parser_malloc   30 parse.y        #define YYMALLOC	rb_parser_malloc
rb_parser_malloc   38 parse.y        static void *rb_parser_malloc _((size_t));


rb_parser_realloc

rb_parser_realloc  128 parse.c        #define YYREALLOC	rb_parser_realloc
rb_parser_realloc  136 parse.c        static void *rb_parser_realloc _((void *, size_t));
rb_parser_realloc   31 parse.y        #define YYREALLOC	rb_parser_realloc
rb_parser_realloc   39 parse.y        static void *rb_parser_realloc _((void *, size_t));


rb_parser_while_loop

rb_parser_while_loop  331 intern.h       void rb_parser_while_loop _((int, int));
rb_parser_while_loop 1202 ruby.c         	rb_parser_while_loop(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      29 ext/digest/sha1/sha1init.c     mDigest = rb_path2class("Digest");
rb_path2class      30 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     275 ext/enumerator/enumerator.c     rb_mEnumerable = rb_path2class("Enumerable");
rb_path2class     451 intern.h       VALUE rb_path2class _((const char*));
rb_path2class     113 marshal.c          if (rb_path2class(n) != rb_class_real(klass)) {
rb_path2class     977 marshal.c          VALUE v = rb_path2class(path);
rb_path2class     989 marshal.c          VALUE v = rb_path2class(path);
rb_path2class    1312 marshal.c      	    v = rb_path2class(RSTRING(str)->ptr);


rb_path_check

rb_path_check    4264 file.c         	    if (rb_safe_level() >= 1 && !rb_path_check(lpath)) {
rb_path_check    1757 hash.c             path_tainted = rb_path_check(path)?0:1;
rb_path_check     262 intern.h       int rb_path_check _((char*));


rb_path_end

rb_path_end       702 dir.c              if (path && *(pend = rb_path_end(rb_path_skip_prefix(path)))) {
rb_path_end      2415 file.c         #define chompdirsep rb_path_end
rb_path_end       233 intern.h       char *rb_path_end _((const char *));


rb_path_last_separator

rb_path_last_separator 2395 file.c         #define strrdirsep rb_path_last_separator
rb_path_last_separator  232 intern.h       char *rb_path_last_separator _((const char *));


rb_path_next

rb_path_next      163 dir.c          		if (pathname && *rb_path_next(s))
rb_path_next      169 dir.c          		s = rb_path_next(s);
rb_path_next     2357 file.c         #define nextdirsep rb_path_next
rb_path_next      230 intern.h       char *rb_path_next _((const char *));


rb_path_skip_prefix

rb_path_skip_prefix  702 dir.c              if (path && *(pend = rb_path_end(rb_path_skip_prefix(path)))) {
rb_path_skip_prefix 2369 file.c         #define skipprefix rb_path_skip_prefix
rb_path_skip_prefix  231 intern.h       char *rb_path_skip_prefix _((const char *));


rb_proc_exec

rb_proc_exec      346 intern.h       int rb_proc_exec _((const char*));
rb_proc_exec     2983 io.c           	    rb_proc_exec(pname);
rb_proc_exec     1233 process.c      	rb_proc_exec(RSTRING(cmd)->ptr);
rb_proc_exec     1521 process.c      	    rb_proc_exec(RSTRING(argv[0])->ptr);


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       186 intern.h       VALUE rb_proc_new _((VALUE (*)(ANYARGS/* VALUE yieldarg[, VALUE procarg] */), VALUE));


rb_proc_times

rb_proc_times     350 intern.h       VALUE rb_proc_times _((VALUE));
rb_proc_times    3453 process.c          rb_define_module_function(rb_mProcess, "times", rb_proc_times, 0);
rb_proc_times    1876 time.c             return rb_proc_times(obj);


rb_protect

rb_protect        791 dir.c              ((flags & GLOB_VERBOSE) && rb_protect((VALUE (*)_((VALUE)))rb_sys_warning, (VALUE)(val), 0))
rb_protect       1114 dir.c              rb_protect(glob_func_caller, a, &status);
rb_protect        746 error.c        	    d = rb_protect(rb_inspect, obj, 0);
rb_protect       1617 eval.c             return rb_protect((VALUE (*)_((VALUE)))rb_eval_string, (VALUE)str, state);
rb_protect       9812 eval.c             val = rb_protect(run_trap_eval, (VALUE)&arg, &state);
rb_protect        399 ext/dbm/dbm.c          ret = rb_protect(rb_yield, rb_assoc_new(rb_str_dup(keystr), valstr), &status);
rb_protect        493 ext/gdbm/gdbm.c         ret = rb_protect(rb_yield, rb_assoc_new(keystr, valstr), &status);
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         40 ext/openssl/ossl_bio.c      ret = (BIO*)rb_protect((VALUE(*)_((VALUE)))ossl_obj2bio, obj, status);
rb_protect         59 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        207 ext/openssl/ossl_ssl.c     success = rb_protect((VALUE(*)_((VALUE)))ossl_call_client_cert_cb,
rb_protect        244 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         78 ext/readline/readline.c     buff = (char*)rb_protect((VALUE(*)_((VALUE)))readline, (VALUE)prompt,
rb_protect        378 ext/sdbm/init.c         ret = rb_protect(rb_yield, rb_assoc_new(rb_str_dup(keystr), valstr), &status);
rb_protect       1415 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       2217 ext/zlib/zlib.c 	    rb_protect(gzfile_finalize, (VALUE)gz, &aborted);
rb_protect       1795 gc.c           	rb_protect((VALUE(*)_((VALUE)))run_single_final, (VALUE)args, &status);
rb_protect       1803 gc.c           	    rb_protect((VALUE(*)_((VALUE)))run_single_final, (VALUE)args, &status);
rb_protect        187 intern.h       VALUE rb_protect _((VALUE (*)(VALUE), VALUE, int*));
rb_protect       5028 io.c               r = rb_protect(io_new_instance, (VALUE)args, &state);
rb_protect       5036 io.c               w = rb_protect(io_new_instance, (VALUE)args, &state);
rb_protect       1287 process.c      	    rb_protect(rb_yield, Qundef, &status);
rb_protect        356 ruby.c         	rb_protect((VALUE (*)(VALUE))rb_require, (VALUE)list->name, &state);
rb_protect       3077 win32/win32.c      RUBY_CRITICAL(rb_protect((VALUE (*)(VALUE))h->handler, (VALUE)h->arg, &h->status);


rb_protect_inspect

rb_protect_inspect 1280 array.c        		tmp = rb_protect_inspect(inspect_join, ary, (VALUE)args);
rb_protect_inspect 1455 array.c            return rb_protect_inspect(inspect_ary, ary, 0);
rb_protect_inspect 2950 file.c         		tmp = rb_protect_inspect(file_inspect_join, ary, (VALUE)args);
rb_protect_inspect 1247 hash.c             return rb_protect_inspect(inspect_hash, hash, 0);
rb_protect_inspect 1275 hash.c             return rb_protect_inspect(to_s_hash, hash, 0);
rb_protect_inspect   56 intern.h       VALUE rb_protect_inspect _((VALUE(*)(ANYARGS),VALUE,VALUE));
rb_protect_inspect 3825 io.c           		rb_protect_inspect(io_puts_ary, line, out);
rb_protect_inspect  454 object.c       	return rb_protect_inspect(inspect_obj, obj, str);
rb_protect_inspect  528 struct.c           return rb_protect_inspect(inspect_struct, s, 0);


rb_provide_feature

rb_provide_feature 6874 eval.c             rb_provide_feature(rb_str_new2(feature));
rb_provide_feature 7025 eval.c         		rb_provide_feature(feature);


rb_provided

rb_provided       178 intern.h       int rb_provided _((const char*));
rb_provided      1342 variable.c         if (!load || !(file = load->nd_lit) || rb_provided(RSTRING(file)->ptr)) {
rb_provided      1366 variable.c         if (!rb_provided(RSTRING(file)->ptr)) {


rb_push_glob

rb_push_glob     1292 dir.c              return rb_push_glob(str, 0);
rb_push_glob     1367 dir.c              return rb_push_glob(str, flags);


rb_quad_pack

rb_quad_pack       83 intern.h       void rb_quad_pack _((char*,VALUE));
rb_quad_pack      720 pack.c         		rb_quad_pack(tmp, from);


rb_quad_unpack

rb_quad_unpack     84 intern.h       VALUE rb_quad_unpack _((const char*,int));
rb_quad_unpack   1579 pack.c         		rb_ary_push(ary, rb_quad_unpack(tmp, 1));
rb_quad_unpack   1588 pack.c         		rb_ary_push(ary, rb_quad_unpack(tmp, 0));


rb_raise

rb_raise           53 array.c        	rb_raise(rb_eRuntimeError, "can't modify array during iteration");
rb_raise           55 array.c        	rb_raise(rb_eSecurityError, "Insecure: can't modify array");
rb_raise          121 array.c        	rb_raise(rb_eArgError, "negative array size (or size too big)");
rb_raise          124 array.c        	rb_raise(rb_eArgError, "array size too big");
rb_raise          291 array.c        	rb_raise(rb_eArgError, "negative array size");
rb_raise          294 array.c        	rb_raise(rb_eArgError, "array size too big");
rb_raise          355 array.c        	    rb_raise(rb_eIndexError, "index %ld out of array",
rb_raise          369 array.c        	    rb_raise(rb_eArgError, "index too big");
rb_raise          661 array.c        	    rb_raise(rb_eTypeError, "Symbol as array index");
rb_raise          679 array.c        	rb_raise(rb_eTypeError, "Symbol as array index");
rb_raise          834 array.c        	    rb_raise(rb_eIndexError, "index %ld out of array", idx);
rb_raise          946 array.c            if (len < 0) rb_raise(rb_eIndexError, "negative length (%ld)", len);
rb_raise          951 array.c        	    rb_raise(rb_eIndexError, "index %ld out of array", beg);
rb_raise         1041 array.c        	    rb_raise(rb_eTypeError, "Symbol as array index");
rb_raise         1044 array.c        	    rb_raise(rb_eTypeError, "Symbol as subarray length");
rb_raise         1050 array.c        	rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)", argc);
rb_raise         1057 array.c        	rb_raise(rb_eTypeError, "Symbol as array index");
rb_raise         1093 array.c        	rb_raise(rb_eArgError, "wrong number of arguments (at least 1)");
rb_raise         1559 array.c        	rb_raise(rb_eArgError, "array modified during sort");
rb_raise         2130 array.c        	    rb_raise(rb_eIndexError, "element size differs (%d should be %d)",
rb_raise         2366 array.c        	rb_raise(rb_eArgError, "negative argument");
rb_raise         2369 array.c        	rb_raise(rb_eArgError, "argument too big");
rb_raise         2874 array.c        	rb_raise(rb_eArgError, "tried to flatten recursive array");
rb_raise          206 bignum.c       	    rb_raise(rb_eRangeError, "bignum too big to convert into `quad int'");
rb_raise          277 bignum.c       	rb_raise(rb_eRangeError, "bignum too big to convert into `quad int'");
rb_raise          411 bignum.c       	    rb_raise(rb_eArgError, "illegal radix %d", base);
rb_raise          658 bignum.c       	rb_raise(rb_eArgError, "illegal radix %d", base);
rb_raise          739 bignum.c       	rb_raise(rb_eRangeError, "bignum too big to convert into `%s'", type);
rb_raise          768 bignum.c       	    rb_raise(rb_eRangeError, "bignum out of range of unsigned long");
rb_raise          782 bignum.c       	rb_raise(rb_eRangeError, "bignum too big to convert into `long'");
rb_raise          800 bignum.c       	rb_raise(rb_eRangeError, "bignum too big to convert into `%s'", type);
rb_raise          828 bignum.c       	rb_raise(rb_eRangeError, "bignum too big to convert into `long long'");
rb_raise          847 bignum.c       	rb_raise(rb_eFloatDomainError, d < 0 ? "-Infinity" : "Infinity");
rb_raise          850 bignum.c       	rb_raise(rb_eFloatDomainError, "NaN");
rb_raise         1977 bignum.c       	rb_raise(rb_eTypeError, "can't coerce %s to Bignum",
rb_raise           43 class.c        	rb_raise(rb_eTypeError, "can't make subclass of Class");
rb_raise           46 class.c        	rb_raise(rb_eTypeError, "can't make subclass of virtual class");
rb_raise           95 class.c        	rb_raise(rb_eTypeError, "already initialized class");
rb_raise           98 class.c        	rb_raise(rb_eTypeError, "can't copy singleton class");
rb_raise          193 class.c        	rb_raise(rb_eTypeError, "superclass must be a Class (%s given)",
rb_raise          197 class.c        	rb_raise(rb_eTypeError, "can't make subclass of virtual class");
rb_raise          221 class.c        	    rb_raise(rb_eTypeError, "%s is not a class", name);
rb_raise          253 class.c        	    rb_raise(rb_eTypeError, "%s is not a class", name);
rb_raise          310 class.c        	rb_raise(rb_eTypeError, "%s is not a module", rb_obj_classname(module));
rb_raise          332 class.c        	rb_raise(rb_eTypeError, "%s::%s is not a module",
rb_raise          395 class.c        	    rb_raise(rb_eArgError, "cyclic include detected");
rb_raise          863 class.c        	rb_raise(rb_eTypeError, "can't define singleton");
rb_raise          970 class.c        	    rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", argc, n);
rb_raise         1025 class.c        	rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", argc, i);
rb_raise           49 compar.c           rb_raise(rb_eArgError, "comparison of %s with %s failed",
rb_raise          325 dir.c              rb_raise(rb_eIOError, "closed directory");
rb_raise          642 dir.c          	    if (!dist) rb_raise(rb_eArgError, "HOME/LOGDIR not set");
rb_raise         1378 dir.c          	rb_raise(rb_eTypeError, "wrong argument type %s (expected Dir)",
rb_raise         1287 dln.c              rb_raise(rb_eLoadError, "this executable file can't load extension libraries");
rb_raise          386 enum.c         	rb_raise(rb_eRuntimeError, "sort_by reentered");
rb_raise          491 enum.c         	rb_raise(rb_eRuntimeError, "sort_by reentered");
rb_raise          278 error.c        		rb_raise(rb_eTypeError, "wrong argument type %s (expected %s)",
rb_raise          509 error.c        	    rb_raise(rb_eTypeError, err);
rb_raise          513 error.c        		rb_raise(rb_eTypeError, err);
rb_raise          796 error.c            rb_raise(rb_eArgError, "invalid value for %s: %s", type, RSTRING(s)->ptr);
rb_raise          897 error.c        		rb_raise(rb_eTypeError, "invalid instance type");
rb_raise         1085 error.c            rb_raise(rb_eNotImpError,
rb_raise         1163 error.c            rb_raise(rb_eTypeError, "can't modify frozen %s", what);
rb_raise          227 eval.c         	    rb_raise(rb_eSecurityError, "Insecure operation `%s' at level %d",
rb_raise          231 eval.c         	    rb_raise(rb_eSecurityError, "Insecure operation at level %d", ruby_safe_level);
rb_raise          249 eval.c         	    rb_raise(rb_eSecurityError, "Insecure operation - %s",
rb_raise          253 eval.c         	    rb_raise(rb_eSecurityError, "Insecure operation: -r");
rb_raise          265 eval.c         	rb_raise(rb_eTypeError, "wrong argument type %s (expected String)",
rb_raise          382 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          681 eval.c         	rb_raise(rb_eArgError, "argument needs to be symbol or string");
rb_raise         1862 eval.c         	rb_raise(rb_eTypeError, "no class variables available");
rb_raise         1965 eval.c         	rb_raise(rb_eSecurityError, "Insecure: can't undef `%s'", rb_id2name(id));
rb_raise         2555 eval.c         	rb_raise(rb_eTypeError, "trace_func needs to be Proc");
rb_raise         2752 eval.c         		rb_raise(rb_eTypeError, "`to_a' did not return Array");
rb_raise         2787 eval.c         	    rb_raise(rb_eTypeError, "%s is not a class/module",
rb_raise         3418 eval.c         		    rb_raise(rb_eNoMethodError, "super called outside of method");
rb_raise         3582 eval.c         		rb_raise(rb_eTypeError, "no class/module to define constant");
rb_raise         3590 eval.c         	    rb_raise(rb_eTypeError, "no class/module to define class variable");
rb_raise         3652 eval.c         		    rb_raise(rb_eTypeError, "%s is not a class/module",
rb_raise         3800 eval.c         	    rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)",
rb_raise         3812 eval.c         		rb_raise(rb_eTypeError, "no class/module to add method");
rb_raise         3859 eval.c         		rb_raise(rb_eSecurityError, "Insecure: can't define singleton method");
rb_raise         3862 eval.c         		rb_raise(rb_eTypeError,
rb_raise         3872 eval.c         		    rb_raise(rb_eSecurityError, "redefining method prohibited");
rb_raise         3887 eval.c         	    rb_raise(rb_eTypeError, "no class to undef method");
rb_raise         3895 eval.c         	    rb_raise(rb_eTypeError, "no class to make alias");
rb_raise         3916 eval.c         		rb_raise(rb_eTypeError, "no outer class/module");
rb_raise         3929 eval.c         		    rb_raise(rb_eTypeError, "%s is not a class",
rb_raise         3935 eval.c         			rb_raise(rb_eTypeError, "superclass mismatch for class %s",
rb_raise         3941 eval.c         		    rb_raise(rb_eSecurityError, "extending class prohibited");
rb_raise         3968 eval.c         		rb_raise(rb_eTypeError, "no outer class/module");
rb_raise         3975 eval.c         		    rb_raise(rb_eTypeError, "%s is not a module",
rb_raise         3979 eval.c         		    rb_raise(rb_eSecurityError, "extending module prohibited");
rb_raise         4002 eval.c         		rb_raise(rb_eTypeError, "no virtual class for %s",
rb_raise         4006 eval.c         		rb_raise(rb_eSecurityError, "Insecure: can't extend object");
rb_raise         4532 eval.c             rb_raise(rb_eInterrupt, "");
rb_raise         4597 eval.c         	    rb_raise(rb_eTypeError, "exception class/object expected");
rb_raise         4602 eval.c         	rb_raise(rb_eArgError, "wrong number of arguments");
rb_raise         4607 eval.c         	    rb_raise(rb_eTypeError, "exception object expected");
rb_raise         4728 eval.c         	    rb_raise(rb_eThreadError, "return can't jump across threads");
rb_raise         4824 eval.c         		    rb_raise(rb_eArgError, "wrong number of arguments (%ld for 0)",
rb_raise         4830 eval.c         		    rb_raise(rb_eArgError, "wrong number of arguments (%ld for 0)",
rb_raise         5091 eval.c             rb_raise(rb_eArgError, "wrong number of arguments (%ld for %ld)", len, i);
rb_raise         5249 eval.c         	    rb_raise(rb_eTypeError, "class or module required for rescue clause");
rb_raise         5465 eval.c         	rb_raise(rb_eArgError, "no id given");
rb_raise         5526 eval.c         	rb_raise(rb_eTypeError, "allocator undefined for %s", rb_class2name(obj));
rb_raise         5544 eval.c         	rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)",
rb_raise         5618 eval.c         	rb_raise(rb_eArgError, "too many arguments (%d)", len);
rb_raise         5700 eval.c         	    rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc);
rb_raise         5746 eval.c         		    rb_raise(rb_eSecurityError, "calling insecure method: %s",
rb_raise         5773 eval.c         			rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)",
rb_raise         5785 eval.c         			    rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)",
rb_raise         5883 eval.c         	rb_raise(rb_eNotImpError, "method `%s' called on terminated object (0x%lx)",
rb_raise         5964 eval.c             if (argc == 0) rb_raise(rb_eArgError, "no method name given");
rb_raise         6185 eval.c             if (lev < 0) rb_raise(rb_eArgError, "negative level (%d)", lev);
rb_raise         6256 eval.c         	    rb_raise(rb_eTypeError, "wrong argument type %s (expected Proc/Binding)",
rb_raise         6405 eval.c         	    rb_raise(rb_eSecurityError, "Insecure: can't modify trusted binding");
rb_raise         6532 eval.c         	    rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc);
rb_raise         6541 eval.c         	    rb_raise(rb_eArgError, "block not supplied");
rb_raise         6551 eval.c         		rb_raise(rb_eArgError, "wrong number of arguments: %s(src) or %s{..}",
rb_raise         6984 eval.c             rb_raise(rb_eLoadError, "no such file to load -- %s", RSTRING(fname)->ptr);
rb_raise         7086 eval.c         	rb_raise(rb_eSecurityError, "Insecure: can't change method visibility");
rb_raise         7309 eval.c         	rb_raise(rb_eTypeError, "module_function must be called for modules");
rb_raise         7481 eval.c         	rb_raise(rb_eArgError, "wrong number of arguments (0 for 1)");
rb_raise         7524 eval.c         	rb_raise(rb_eTypeError, "assigning non-exception to $!");
rb_raise         7543 eval.c         	rb_raise(rb_eArgError, "$! not set");
rb_raise         7694 eval.c         	rb_raise(rb_eArgError, "called without a block");
rb_raise         8224 eval.c         	rb_raise(rb_eArgError, "tried to create Proc object without a block");
rb_raise         8663 eval.c         	    rb_raise(rb_eTypeError, "wrong argument type %s (expected Proc)",
rb_raise         8671 eval.c         	rb_raise(rb_eSecurityError, "Insecure: tainted block value");
rb_raise         8992 eval.c         	rb_raise(rb_eTypeError, "can't call unbound method; bind first");
rb_raise         9107 eval.c         	    rb_raise(rb_eTypeError, "singleton method called for a different object");
rb_raise         9118 eval.c         	    rb_raise(rb_eTypeError, "bind argument must be an instance of %s",
rb_raise         9393 eval.c         	    rb_raise(rb_eTypeError, "wrong argument type %s (expected Proc/Method)",
rb_raise         9398 eval.c         	rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", argc);
rb_raise         9415 eval.c         	rb_raise(rb_eTypeError, "wrong argument type (expected Proc/Method)");
rb_raise         9872 eval.c         	rb_raise(rb_eSecurityError, "tried to downgrade safe level from %d to %d",
rb_raise         10010 eval.c         	rb_raise(rb_eTypeError, "wrong argument type %s (expected Thread)",
rb_raise         10123 eval.c         	rb_raise(rb_eSignal, "SIG%s", th_signm);
rb_raise         10826 eval.c         	    rb_raise(rb_eThreadError, "thread 0x%lx tried to join itself",
rb_raise         10829 eval.c         	    rb_raise(rb_eThreadError, "Thread#join: deadlock 0x%lx - mutual join(0x%lx)",
rb_raise         11014 eval.c         	rb_raise(rb_eThreadError, "killed thread");
rb_raise         11177 eval.c         	rb_raise(rb_eThreadError, "stopping only thread\n\tnote: use sleep to stop forever");
rb_raise         11600 eval.c         	rb_raise(rb_eThreadError,
rb_raise         11763 eval.c         	rb_raise(rb_eThreadError, "uninitialized thread - check `%s#initialize'",
rb_raise         11796 eval.c         	rb_raise(rb_eThreadError, "must be called with a block");
rb_raise         11802 eval.c         	    rb_raise(rb_eThreadError, "already initialized thread");
rb_raise         11804 eval.c         	rb_raise(rb_eThreadError, "already initialized thread - %s:%d",
rb_raise         11826 eval.c         	rb_raise(rb_eThreadError, "must be called with a block");
rb_raise         12049 eval.c         	rb_raise(rb_eSignal, "SIG%s", sig);
rb_raise         12116 eval.c         	rb_raise(rb_eArgError, "unstarted thread");
rb_raise         12184 eval.c         	rb_raise(rb_eSecurityError, "Insecure: thread locals");
rb_raise         12231 eval.c         	rb_raise(rb_eSecurityError, "Insecure: can't modify thread locals");
rb_raise         12490 eval.c         	rb_raise(rb_eRuntimeError, "continuation called across threads");
rb_raise         12493 eval.c         	rb_raise(rb_eRuntimeError, "continuation called across trap");
rb_raise         12664 eval.c         	rb_raise(rb_eTypeError, "wrong argument type %s (expected Thread)",
rb_raise         12669 eval.c               rb_raise(rb_eThreadError, "can't move to the frozen thread group");
rb_raise         12673 eval.c         	rb_raise(rb_eThreadError, "can't move to the enclosed thread group");
rb_raise         12680 eval.c         	rb_raise(rb_eThreadError, "can't move from the frozen thread group");
rb_raise         12684 eval.c         	rb_raise(rb_eThreadError, "can't move from the enclosed thread group");
rb_raise         12878 eval.c         	    rb_raise(rb_eThreadError, "uncaught throw `%s' in thread 0x%lx",
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          272 ext/dbm/dbm.c  	    rb_raise(rb_eArgError, "wrong number arguments(%d for 0)", argc);
rb_raise          348 ext/dbm/dbm.c  	rb_raise(rb_eDBMError, "dbm_delete failed");
rb_raise          411 ext/dbm/dbm.c  	    rb_raise(rb_eDBMError, "dbm_delete failed");
rb_raise          433 ext/dbm/dbm.c  	    rb_raise(rb_eDBMError, "dbm_delete failed");
rb_raise          478 ext/dbm/dbm.c  	rb_raise(rb_eArgError, "pair must be [key, value]");
rb_raise          526 ext/dbm/dbm.c  	rb_raise(rb_eDBMError, "dbm_store failed");
rb_raise           71 ext/digest/digest.c 	rb_raise(rb_eNotImpError, "Digest::Base is an abstract class");
rb_raise          154 ext/digest/digest.c 	rb_raise(rb_eTypeError, "wrong argument class");
rb_raise           94 ext/dl/dl.c          rb_raise(rb_eDLTypeError, "unsupported type `%c'", proto[i]);
rb_raise          218 ext/dl/dl.c          rb_raise(rb_eDLTypeError, "unexpected type '%c'", cstr[i]);
rb_raise          247 ext/dl/dl.c          rb_raise(rb_eDLTypeError, "unexpected type of the element #%d", i);
rb_raise          275 ext/dl/dl.c          rb_raise(rb_eDLTypeError, "unexpected type of the element #%d", i);
rb_raise          304 ext/dl/dl.c          rb_raise(rb_eDLTypeError, "unexpected type of the element #%d", i);
rb_raise          333 ext/dl/dl.c          rb_raise(rb_eDLTypeError, "unexpected type of the element #%d", i);
rb_raise          362 ext/dl/dl.c          rb_raise(rb_eDLTypeError, "unexpected type of the element #%d", i);
rb_raise          391 ext/dl/dl.c          rb_raise(rb_eDLTypeError, "unexpected type of the element #%d", i);
rb_raise          415 ext/dl/dl.c    	  rb_raise(rb_eDLTypeError, "unexpected type of the element #%d", i);
rb_raise          445 ext/dl/dl.c    	  rb_raise(rb_eDLTypeError, "unexpected type of the element #%d", i);
rb_raise          463 ext/dl/dl.c        rb_raise(rb_eDLTypeError, "an array is expected.");
rb_raise          490 ext/dl/dl.c          rb_raise(rb_eDLTypeError, "type mismatch");
rb_raise          501 ext/dl/dl.c        rb_raise(rb_eDLTypeError, "type mismatch");
rb_raise          512 ext/dl/dl.c        rb_raise(rb_eDLTypeError, "type mismatch");
rb_raise          516 ext/dl/dl.c        rb_raise(rb_eDLTypeError, "unsupported type");
rb_raise          638 ext/dl/dl.c        rb_raise(rb_eDLTypeError, "unsupported type `%c'", RSTRING(type)->ptr[0]);
rb_raise          649 ext/dl/dl.c        rb_raise(rb_eDLError, "too many callbacks are defined.");
rb_raise           69 ext/dl/handle.c     rb_raise(rb_eRuntimeError, err);
rb_raise           74 ext/dl/handle.c     rb_raise(rb_eRuntimeError, err);
rb_raise          164 ext/dl/handle.c     rb_raise(rb_eRuntimeError, "closed handle");
rb_raise          190 ext/dl/handle.c 	rb_raise(rb_eRuntimeError, "unknown symbol \"%sA\"", name);
rb_raise          194 ext/dl/handle.c     rb_raise(rb_eRuntimeError, "unknown symbol \"%s\"", name);
rb_raise          156 ext/dl/ptr.c       rb_raise(rb_eTypeError, "DL::PtrData was expected");
rb_raise          544 ext/dl/ptr.c         rb_raise(rb_eArgError, "wrong arguments");
rb_raise          587 ext/dl/ptr.c       rb_raise(rb_eArgError, "too few/many arguments");
rb_raise          681 ext/dl/ptr.c         rb_raise(rb_eDLTypeError, "unsupported type '%c'", t);
rb_raise          719 ext/dl/ptr.c         rb_raise(rb_eDLTypeError, "unsupported type '%c'", t);
rb_raise          747 ext/dl/ptr.c       rb_raise(rb_eTypeError, "the key must be a string or symbol");
rb_raise          780 ext/dl/ptr.c   	  rb_raise(rb_eDLTypeError, "unsupported type '%c'", data->stype[i]);
rb_raise          808 ext/dl/ptr.c   	rb_raise(rb_eDLTypeError, "unsupported type '%c'", data->stype[i]);
rb_raise          821 ext/dl/ptr.c     rb_raise(rb_eNameError, "undefined key `%s' for %s",
rb_raise          910 ext/dl/ptr.c   	  rb_raise(rb_eDLTypeError, "unsupported type '%c'", data->stype[i]);
rb_raise          948 ext/dl/ptr.c   	rb_raise(rb_eDLTypeError, "unsupported type '%c'", data->stype[i]);
rb_raise          980 ext/dl/ptr.c   	  rb_raise(rb_eDLTypeError, "unsupported type '%c'", data->stype[i]);
rb_raise          990 ext/dl/ptr.c     rb_raise(rb_eNameError, "undefined key `%s' for %s",
rb_raise           88 ext/dl/sym.c         rb_raise(rb_eDLTypeError, "unknown type specifier '%c'", *ptype);
rb_raise          100 ext/dl/sym.c         rb_raise(rb_eDLError, "maximum number of arguments is %d.", MAX_ARG);
rb_raise          125 ext/dl/sym.c       rb_raise(rb_eTypeError, "DL::Symbol was expected");
rb_raise          460 ext/dl/sym.c       rb_raise(rb_eArgError, "%d arguments are needed", sym->len - 1);
rb_raise          492 ext/dl/sym.c   	      rb_raise(rb_eDLTypeError, "unexpected type of argument #%d", i);
rb_raise          599 ext/dl/sym.c         rb_raise(rb_eDLTypeError,
rb_raise          643 ext/dl/sym.c       rb_raise(rb_eDLTypeError,
rb_raise          661 ext/dl/sym.c       rb_raise(rb_eDLTypeError, "unknown type '%c'.", -stk_size);
rb_raise          665 ext/dl/sym.c       rb_raise(rb_eArgError, "too many arguments.");
rb_raise          733 ext/dl/sym.c       rb_raise(rb_eDLTypeError, "unknown type `%c'", sym->type[0]);
rb_raise          802 ext/dl/sym.c         rb_raise(rb_eDLTypeError, "unknown type `%c'", sym->type[0]);
rb_raise          828 ext/dl/sym.c       rb_raise(rb_eDLTypeError, "unsupported function type `%s'", sym->type);
rb_raise          888 ext/dl/sym.c       rb_raise(rb_eDLTypeError, "unknown type `%c'", sym->type[0]);
rb_raise          930 ext/dl/sym.c   	  rb_raise(rb_eRuntimeError, "unknown argument type '%c'", i, c);
rb_raise          110 ext/enumerator/enumerator.c     if (size <= 0) rb_raise(rb_eArgError, "invalid slice size");
rb_raise          181 ext/enumerator/enumerator.c     if (size <= 0) rb_raise(rb_eArgError, "invalid size");
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          368 ext/gdbm/gdbm.c 	    rb_raise(rb_eArgError, "wrong number arguments(%d for 0)", argc);
rb_raise          437 ext/gdbm/gdbm.c 	rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
rb_raise          523 ext/gdbm/gdbm.c 	    rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
rb_raise          534 ext/gdbm/gdbm.c                 rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
rb_raise          581 ext/gdbm/gdbm.c 	rb_raise(rb_eArgError, "pair must be [key, value]");
rb_raise          626 ext/gdbm/gdbm.c 	rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
rb_raise          872 ext/gdbm/gdbm.c 	rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
rb_raise          891 ext/gdbm/gdbm.c 	rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
rb_raise          914 ext/gdbm/gdbm.c 	rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
rb_raise          229 ext/iconv/iconv.c 	rb_raise(rb_eArgError, "Iconv expected (%s)", rb_class2name(CLASS_OF(obj)));
rb_raise          386 ext/iconv/iconv.c 	rb_raise(rb_eArgError, "closed iconv");
rb_raise          640 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           70 ext/readline/readline.c     if (!isatty(0) && errno == EBADF) rb_raise(rb_eIOError, "stdin closed");
rb_raise          111 ext/readline/readline.c 	rb_raise(rb_eArgError, "argument must respond to `call'");
rb_raise          514 ext/readline/readline.c 	rb_raise(rb_eIndexError, "invalid index");
rb_raise          537 ext/readline/readline.c 	rb_raise(rb_eIndexError, "invalid index");
rb_raise          666 ext/readline/readline.c 	rb_raise(rb_eIndexError, "invalid index");
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          249 ext/sdbm/init.c 	    rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc);
rb_raise          327 ext/sdbm/init.c 	rb_raise(rb_eDBMError, "dbm_delete failed");
rb_raise          390 ext/sdbm/init.c 	    rb_raise(rb_eDBMError, "sdbm_delete failed");
rb_raise          412 ext/sdbm/init.c 	    rb_raise(rb_eDBMError, "sdbm_delete failed");
rb_raise          457 ext/sdbm/init.c 	rb_raise(rb_eArgError, "pair must be [key, value]");
rb_raise          510 ext/sdbm/init.c 	rb_raise(rb_eDBMError, "sdbm_store failed");
rb_raise          244 ext/socket/socket.c 	rb_raise(rb_eSecurityError, "Insecure: can't shutdown socket");
rb_raise          252 ext/socket/socket.c 	    rb_raise(rb_eArgError, "`how' should be either 0, 1, 2");
rb_raise          269 ext/socket/socket.c 	rb_raise(rb_eSecurityError, "Insecure: can't close socket");
rb_raise          288 ext/socket/socket.c 	rb_raise(rb_eSecurityError, "Insecure: can't close socket");
rb_raise          557 ext/socket/socket.c 	rb_raise(rb_eIOError, "recv for buffered IO");
rb_raise          588 ext/socket/socket.c 	    rb_raise(rb_eTypeError, "sockaddr size differs - should not happen");
rb_raise          640 ext/socket/socket.c 	rb_raise(rb_eSocket, "getnameinfo: %s", gai_strerror(error));
rb_raise          712 ext/socket/socket.c 	    rb_raise(rb_eArgError, "hostname too long (%d)", strlen(name));
rb_raise          740 ext/socket/socket.c 	    rb_raise(rb_eArgError, "service name too long (%d)", strlen(serv));
rb_raise          779 ext/socket/socket.c 	    rb_raise(rb_eSocket, "newline at the end of hostname");
rb_raise          781 ext/socket/socket.c 	rb_raise(rb_eSocket, "getaddrinfo: %s", gai_strerror(error));
rb_raise          850 ext/socket/socket.c 	rb_raise(rb_eSocket, "getnameinfo: %s", gai_strerror(error));
rb_raise         1199 ext/socket/socket.c 	rb_raise(rb_eSecurityError, "Insecure: can't close socket");
rb_raise         1692 ext/socket/socket.c 	rb_raise(rb_eTypeError, "neither IO nor file descriptor");
rb_raise         1801 ext/socket/socket.c       rb_raise(rb_eSocket,
rb_raise         1806 ext/socket/socket.c       rb_raise(rb_eSocket,
rb_raise         1811 ext/socket/socket.c       rb_raise(rb_eSocket,
rb_raise         1816 ext/socket/socket.c       rb_raise(rb_eSocket,
rb_raise         1822 ext/socket/socket.c 	rb_raise(rb_eSocket,
rb_raise         1975 ext/socket/socket.c 	    rb_raise(rb_eSocket, "unknown socket domain %s", ptr);
rb_raise         2006 ext/socket/socket.c 	    rb_raise(rb_eSocket, "unknown socket type %s", ptr);
rb_raise         2691 ext/socket/socket.c 	rb_raise(rb_eSocket, "host not found");
rb_raise         2723 ext/socket/socket.c         rb_raise(rb_eSocket, "unknown socket family:%d", addr->sa_family);
rb_raise         2763 ext/socket/socket.c 	rb_raise(rb_eSocket, "%s", (char*)hstrerror(h_errno));
rb_raise         2765 ext/socket/socket.c 	rb_raise(rb_eSocket, "host not found");
rb_raise         2813 ext/socket/socket.c 	    rb_raise(rb_eSocket, "no such service %s/%s", s, RSTRING(proto)->ptr);
rb_raise         2882 ext/socket/socket.c 	rb_raise(rb_eSocket, "getaddrinfo: %s", gai_strerror(error));
rb_raise         2916 ext/socket/socket.c 	    rb_raise(rb_eTypeError, "sockaddr length too big");
rb_raise         2920 ext/socket/socket.c 	    rb_raise(rb_eTypeError, "sockaddr size differs - should not happen");
rb_raise         2952 ext/socket/socket.c 	    rb_raise(rb_eArgError, "array size should be 3 or 4, %ld given",
rb_raise         3001 ext/socket/socket.c 	rb_raise(rb_eTypeError, "expecting String or Array");
rb_raise         3018 ext/socket/socket.c 		rb_raise(rb_eSocket, "sockaddr resolved to multiple nodename");
rb_raise         3027 ext/socket/socket.c     rb_raise(rb_eSocket, "getaddrinfo: %s", gai_strerror(error));
rb_raise         3031 ext/socket/socket.c     rb_raise(rb_eSocket, "getnameinfo: %s", gai_strerror(error));
rb_raise         3087 ext/socket/socket.c 	rb_raise(rb_eTypeError, "sockaddr_un size differs - %ld required; %d given",
rb_raise           81 ext/stringio/stringio.c 	rb_raise(rb_eTypeError, "wrong argument type %s (expected StringIO)",
rb_raise           94 ext/stringio/stringio.c 	rb_raise(rb_eIOError, "uninitialized stream");
rb_raise          110 ext/stringio/stringio.c 	rb_raise(rb_eIOError, "not opened for reading");
rb_raise          120 ext/stringio/stringio.c 	rb_raise(rb_eIOError, "not opened for writing");
rb_raise          133 ext/stringio/stringio.c 	rb_raise(rb_eIOError, "not modifiable string");
rb_raise          386 ext/stringio/stringio.c 	rb_raise(rb_eIOError, "closed stream");
rb_raise          405 ext/stringio/stringio.c 	rb_raise(rb_eIOError, "closing non-duplex IO for reading");
rb_raise          424 ext/stringio/stringio.c 	rb_raise(rb_eIOError, "closing non-duplex IO for writing");
rb_raise          658 ext/stringio/stringio.c 	rb_raise(rb_eArgError, "invalid whence %ld", NUM2LONG(whence));
rb_raise         1106 ext/stringio/stringio.c 		rb_raise(rb_eArgError, "negative length %ld given", len);
rb_raise         1138 ext/stringio/stringio.c 	rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc);
rb_raise         1211 ext/stringio/stringio.c 	rb_raise(rb_eIOError, "not opened");
rb_raise           65 ext/strscan/strscan.c     if (NIL_P(var->str)) rb_raise(rb_eArgError, "uninitialized StringScanner object");\
rb_raise          385 ext/strscan/strscan.c     if (i < 0) rb_raise(rb_eRangeError, "index out of range");
rb_raise          386 ext/strscan/strscan.c     if (i > S_LEN(p)) rb_raise(rb_eRangeError, "index out of range");
rb_raise          425 ext/strscan/strscan.c     if (ret == -2) rb_raise(ScanError, "regexp buffer overflow");
rb_raise          797 ext/strscan/strscan.c         rb_raise(ScanError, "can't unscan: prev match had failed");
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         1635 ext/syck/rubyext.c             rb_raise( rb_eTypeError, "wrong argument type" );
rb_raise         1670 ext/syck/rubyext.c             rb_raise( rb_eTypeError, "wrong argument type" );
rb_raise         1745 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           75 ext/win32ole/win32ole.c         rb_raise(rb_eRuntimeError, "failed to get Dispatch Interface");\
rb_raise          588 ext/win32ole/win32ole.c         rb_raise(ecs, "%s\n%s", buf, StringValuePtr(err_msg));
rb_raise          591 ext/win32ole/win32ole.c         rb_raise(ecs, "%s", buf);
rb_raise          779 ext/win32ole/win32ole.c             rb_raise(rb_eRuntimeError, "memory allocation error");
rb_raise          931 ext/win32ole/win32ole.c             rb_raise(rb_eRuntimeError, "memory allocation error");
rb_raise         1386 ext/win32ole/win32ole.c         rb_raise(rb_eRuntimeError, "failed to load OLE32");
rb_raise         1391 ext/win32ole/win32ole.c         rb_raise(rb_eRuntimeError, "CoCreateInstanceEx is not supported in this environment");
rb_raise         1495 ext/win32ole/win32ole.c         rb_raise(rb_eSecurityError, "Insecure Object Connection - %s",
rb_raise         1580 ext/win32ole/win32ole.c         rb_raise(rb_eTypeError, "2nd parameter must be Class or Module");
rb_raise         1622 ext/win32ole/win32ole.c         rb_raise(rb_eTypeError, "1st parameter must be WIN32OLE instance");
rb_raise         1767 ext/win32ole/win32ole.c             rb_raise(rb_eRuntimeError, "no helpfile of `%s'",
rb_raise         1775 ext/win32ole/win32ole.c         rb_raise(rb_eTypeError, "1st parameter must be (String|WIN32OLE_TYPE|WIN32OLE_METHOD)");
rb_raise         1779 ext/win32ole/win32ole.c         rb_raise(rb_eRuntimeError, "failed to open help file `%s'",
rb_raise         1824 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         1872 ext/win32ole/win32ole.c         rb_raise(rb_eSecurityError, "Insecure Object Creation - %s",
rb_raise         1877 ext/win32ole/win32ole.c             rb_raise(rb_eSecurityError, "Insecure Object Creation - %s",
rb_raise         2002 ext/win32ole/win32ole.c         rb_raise(rb_eRuntimeError, "failed to get dispatch interface");
rb_raise         2307 ext/win32ole/win32ole.c                         rb_raise(rb_eTypeError, "not valid value");
rb_raise         2672 ext/win32ole/win32ole.c         rb_raise(rb_eRuntimeError, "fail: unknown method or property");
rb_raise         3244 ext/win32ole/win32ole.c         rb_raise(eWIN32OLE_RUNTIME_ERROR, "not found %s",
rb_raise         3280 ext/win32ole/win32ole.c         rb_raise(rb_eTypeError, "1st argument should be TypeLib string");
rb_raise         3474 ext/win32ole/win32ole.c         rb_raise(eWIN32OLE_RUNTIME_ERROR, "not found `%s` in `%s`",
rb_raise         4366 ext/win32ole/win32ole.c             rb_raise(eWIN32OLE_RUNTIME_ERROR, "not found %s",
rb_raise         4371 ext/win32ole/win32ole.c         rb_raise(rb_eTypeError, "1st argument should be WIN32OLE_TYPE object");
rb_raise         5931 ext/win32ole/win32ole.c         rb_raise(rb_eTypeError, "1st parameter must be WIN32OLE object");
rb_raise         5936 ext/win32ole/win32ole.c             rb_raise(rb_eSecurityError, "Insecure Event Creation - %s",
rb_raise          850 ext/zlib/zlib.c 	rb_raise(cZError, "stream is not ready");
rb_raise         1869 ext/zlib/zlib.c 	    rb_raise(cGzError, "unexpected end of file");
rb_raise         1976 ext/zlib/zlib.c 	rb_raise(cGzError, "not in gzip format");
rb_raise         1982 ext/zlib/zlib.c 	rb_raise(cGzError, "not in gzip format");
rb_raise         1985 ext/zlib/zlib.c 	rb_raise(cGzError, "unsupported compression method %d", head[2]);
rb_raise         1990 ext/zlib/zlib.c 	rb_raise(cGzError, "multi-part gzip file is not supported");
rb_raise         1993 ext/zlib/zlib.c 	rb_raise(cGzError, "encrypted gzip file is not supported");
rb_raise         1996 ext/zlib/zlib.c 	rb_raise(cGzError, "unknown flags 0x%02x", flags);
rb_raise         2015 ext/zlib/zlib.c 	    rb_raise(cGzError, "unexpected end of file");
rb_raise         2019 ext/zlib/zlib.c 	    rb_raise(cGzError, "unexpected end of file");
rb_raise         2052 ext/zlib/zlib.c 	rb_raise(cNoFooter, "footer is not found");
rb_raise         2062 ext/zlib/zlib.c 	rb_raise(cCRCError, "invalid compressed data -- crc error");
rb_raise         2065 ext/zlib/zlib.c 	rb_raise(cLengthError, "invalid compressed data -- length error");
rb_raise         2097 ext/zlib/zlib.c 		rb_raise(cGzError, "unexpected end of file");
rb_raise         2133 ext/zlib/zlib.c         rb_raise(rb_eArgError, "negative length %d given", len);
rb_raise         2286 ext/zlib/zlib.c 	rb_raise(cGzError, "closed gzip stream");
rb_raise         2350 ext/zlib/zlib.c 	rb_raise(rb_eArgError, "wrong number of arguments (0 for 1)");
rb_raise         2475 ext/zlib/zlib.c 	rb_raise(cGzError, "header is already written");
rb_raise         2500 ext/zlib/zlib.c 	rb_raise(cGzError, "header is already written");
rb_raise         2523 ext/zlib/zlib.c 	rb_raise(cGzError, "header is already written");
rb_raise         2972 ext/zlib/zlib.c 	rb_raise(rb_eArgError, "negative length %d given", len);
rb_raise         3004 ext/zlib/zlib.c 	rb_raise(rb_eEOFError, "end of file reached");
rb_raise         3074 ext/zlib/zlib.c 	rb_raise(rb_eRuntimeError, "rs modified");
rb_raise         3186 ext/zlib/zlib.c 	rb_raise(rb_eEOFError, "end of file reached");
rb_raise          176 file.c             if (!st) rb_raise(rb_eTypeError, "uninitialized File::Stat");
rb_raise         2279 file.c         	rb_raise(rb_eArgError, "wrong number of arguments");
rb_raise         2472 file.c         		rb_raise(rb_eArgError, "couldn't find HOME environment -- expanding `%s'", s);
rb_raise         2503 file.c         		rb_raise(rb_eArgError, "user %s doesn't exist", buf);
rb_raise         3073 file.c         	rb_raise(rb_eIOError, "not opened for writing");
rb_raise         3213 file.c             if (n != argc) rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", argc, n);
rb_raise         3294 file.c             if (argc == 0) rb_raise(rb_eArgError, "wrong number of arguments");
rb_raise         3419 file.c             rb_raise(rb_eArgError, "unknown command ?%c", cmd);
rb_raise         3489 file.c         	rb_raise(rb_eTypeError, "wrong argument class");
rb_raise         4166 file.c         	    rb_raise(rb_eSecurityError, "loading from unsafe file %s", f);
rb_raise         4220 file.c         	    rb_raise(rb_eSecurityError, "loading from unsafe path %s", f);
rb_raise         4229 file.c         	    rb_raise(rb_eSecurityError, "loading from unsafe file %s", f);
rb_raise         4237 file.c         	    rb_raise(rb_eSecurityError, "loading from unsafe file %s", f);
rb_raise         4243 file.c         	rb_raise(rb_eSecurityError, "loading from non-absolute path %s", f);
rb_raise         4265 file.c         		rb_raise(rb_eSecurityError, "loading from unsafe path %s", lpath);
rb_raise         4278 file.c         	rb_raise(rb_eSecurityError, "loading from unsafe file %s", f);
rb_raise          113 gc.c           	rb_raise(rb_eNoMemError, "negative allocation size (or too big)");
rb_raise          153 gc.c           	rb_raise(rb_eArgError, "negative re-allocation size");
rb_raise         1655 gc.c           	rb_raise(rb_eArgError, "wrong type argument %s (should be callable)",
rb_raise         1738 gc.c           	rb_raise(rb_eArgError, "wrong type argument %s (should be callable)",
rb_raise         1898 gc.c           	rb_raise(rb_eRangeError, "0x%lx is not id value", p0);
rb_raise         1901 gc.c           	rb_raise(rb_eRangeError, "0x%lx is recycled object", p0);
rb_raise           31 hash.c             if (!RHASH(hash)->tbl) rb_raise(rb_eTypeError, "uninitialized Hash");
rb_raise           34 hash.c         	rb_raise(rb_eSecurityError, "Insecure: can't modify hash");
rb_raise          150 hash.c         	rb_raise(rb_eRuntimeError, "hash modified during iteration");
rb_raise          172 hash.c         	rb_raise(rb_eRuntimeError, "rehash occurred during iteration");
rb_raise          206 hash.c          	rb_raise(rb_eRuntimeError, "hash modified during iteration");
rb_raise          292 hash.c         	    rb_raise(rb_eArgError, "wrong number of arguments");
rb_raise          337 hash.c         	rb_raise(rb_eArgError, "odd number of arguments for Hash");
rb_raise          473 hash.c         	    rb_raise(rb_eIndexError, "key not found");
rb_raise          854 hash.c         	rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc);
rb_raise         1657 hash.c         	rb_raise(rb_eArgError, "bad environment variable name");
rb_raise         1697 hash.c         	rb_raise(rb_eArgError, "bad environment variable name");
rb_raise         1734 hash.c         	rb_raise(rb_eArgError, "bad environment variable name");
rb_raise         1740 hash.c         	    rb_raise(rb_eIndexError, "key not found");
rb_raise         1887 hash.c         	rb_raise(rb_eSecurityError, "can't change environment variable");
rb_raise         1900 hash.c         	rb_raise(rb_eArgError, "bad environment variable name");
rb_raise         1902 hash.c         	rb_raise(rb_eArgError, "bad environment variable value");
rb_raise         2083 hash.c         	rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc);
rb_raise         2217 hash.c         	rb_raise(rb_eArgError, "bad environment variable name");
rb_raise          190 io.c               rb_raise(rb_eEOFError, "end of file reached");
rb_raise          198 io.c           	rb_raise(rb_eSecurityError, "Insecure: operation on untainted IO");
rb_raise          208 io.c           	rb_raise(rb_eIOError, "uninitialized stream");
rb_raise          218 io.c           	rb_raise(rb_eIOError, "closed stream");
rb_raise          251 io.c           	rb_raise(rb_eIOError, "not opened for reading");
rb_raise          270 io.c           	rb_raise(rb_eIOError, "not opened for writing");
rb_raise         1126 io.c           		rb_raise(rb_eIOError, "file too big for single read");
rb_raise         1181 io.c                   rb_raise(rb_eArgError, "negative length %ld given", len);
rb_raise         1203 io.c                   rb_raise(rb_eRuntimeError, "buffer string modified");
rb_raise         1331 io.c           	rb_raise(rb_eArgError, "negative length %ld given", len);
rb_raise         1351 io.c           	rb_raise(rb_eRuntimeError, "buffer string modified");
rb_raise         1541 io.c           	rb_raise(rb_eRuntimeError, "rs modified");
rb_raise         1992 io.c           	rb_raise(rb_eIOError, "unread stream");
rb_raise         1996 io.c           	rb_raise(rb_eIOError, "ungetc failed");
rb_raise         2142 io.c           	rb_raise(rb_eSecurityError, "Insecure: can't close");
rb_raise         2215 io.c           	rb_raise(rb_eSecurityError, "Insecure: can't close");
rb_raise         2219 io.c           	rb_raise(rb_eIOError, "closing non-duplex IO for reading");
rb_raise         2260 io.c           	rb_raise(rb_eSecurityError, "Insecure: can't close");
rb_raise         2264 io.c           	rb_raise(rb_eIOError, "closing non-duplex IO for writing");
rb_raise         2307 io.c           	rb_raise(rb_eIOError, "sysseek for buffered IO");
rb_raise         2404 io.c           	rb_raise(rb_eIOError, "sysread for buffered IO");
rb_raise         2412 io.c           	rb_raise(rb_eRuntimeError, "buffer string modified");
rb_raise         2493 io.c               rb_raise(rb_eArgError, "illegal access modenum %o", flags);
rb_raise         2516 io.c           	rb_raise(rb_eArgError, "illegal access mode %s", mode);
rb_raise         2587 io.c           	rb_raise(rb_eArgError, "illegal access mode %s", mode);
rb_raise         2633 io.c               rb_raise(rb_eArgError, "illegal access modenum %o", flags);
rb_raise         3361 io.c           	rb_raise(rb_eSecurityError, "Insecure: can't reopen");
rb_raise         3961 io.c           	rb_raise(rb_eTypeError, "%s must have %s method, %s given",
rb_raise         4114 io.c           	rb_raise(rb_eRuntimeError, "reinitializing File");
rb_raise         4767 io.c           	rb_raise(rb_eArgError, "return value overflowed string");
rb_raise         4887 io.c           	rb_raise(rb_eArgError, "too few arguments for syscall");
rb_raise         5192 io.c           	rb_raise(rb_eArgError, "no stream to tell");
rb_raise         5205 io.c           	rb_raise(rb_eArgError, "no stream to seek");
rb_raise         5216 io.c           	rb_raise(rb_eArgError, "no stream to set position");
rb_raise         5226 io.c           	rb_raise(rb_eArgError, "no stream to rewind");
rb_raise         5236 io.c           	rb_raise(rb_eArgError, "no stream");
rb_raise          109 marshal.c      	rb_raise(rb_eTypeError, "can't dump anonymous %s %s",
rb_raise          114 marshal.c      	rb_raise(rb_eTypeError, "%s can't be referred", n);
rb_raise          174 marshal.c      	rb_raise(rb_eTypeError, "long too big to dump");
rb_raise          351 marshal.c      	rb_raise(rb_eTypeError, "can't dump anonymous class %s", s);
rb_raise          379 marshal.c      	    rb_raise(rb_eTypeError, "singleton can't be dumped");
rb_raise          458 marshal.c      	rb_raise(rb_eArgError, "exceed depth limit");
rb_raise          518 marshal.c      		rb_raise(rb_eTypeError, "_dump() must return string");
rb_raise          534 marshal.c      		rb_raise(rb_eTypeError, "singleton class can't be dumped");
rb_raise          618 marshal.c      		rb_raise(rb_eTypeError, "can't dump hash with default proc");
rb_raise          657 marshal.c      		    rb_raise(rb_eTypeError,
rb_raise          667 marshal.c      	    rb_raise(rb_eTypeError, "can't dump %s",
rb_raise          753 marshal.c      	    rb_raise(rb_eTypeError, "instance of IO needed");
rb_raise          803 marshal.c      	    rb_raise(rb_eArgError, "marshal data too short");
rb_raise          819 marshal.c          rb_raise(rb_eTypeError, "long too big for this architecture (size %d, given %d)",
rb_raise          882 marshal.c      	    rb_raise(rb_eArgError, "marshal data too short");
rb_raise          907 marshal.c          rb_raise(rb_eArgError, "bad symbol");
rb_raise          980 marshal.c      	rb_raise(rb_eArgError, "%s does not refer class", path);
rb_raise          992 marshal.c      	rb_raise(rb_eArgError, "%s does not refer module", path);
rb_raise         1013 marshal.c      	    rb_raise(rb_eArgError, "dump format error (unlinked)");
rb_raise         1046 marshal.c      		rb_raise(rb_eTypeError, "singleton can't be loaded");
rb_raise         1051 marshal.c      		rb_raise(rb_eArgError, "dump format error (user class)");
rb_raise         1203 marshal.c      		rb_raise(rb_eTypeError, "uninitialized struct");
rb_raise         1217 marshal.c      		    rb_raise(rb_eTypeError, "struct %s not compatible (:%s for :%s)",
rb_raise         1233 marshal.c      		rb_raise(rb_eTypeError, "class %s needs to have method `_load'",
rb_raise         1259 marshal.c      		rb_raise(rb_eTypeError, "instance of %s needs to have method `marshal_load'",
rb_raise         1274 marshal.c      		rb_raise(rb_eArgError, "dump format error");
rb_raise         1296 marshal.c                     rb_raise(rb_eArgError, "dump format error");
rb_raise         1300 marshal.c                     rb_raise(rb_eTypeError,
rb_raise         1343 marshal.c      	rb_raise(rb_eArgError, "dump format error(0x%x)", type);
rb_raise         1407 marshal.c      	rb_raise(rb_eTypeError, "instance of IO needed");
rb_raise         1415 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          121 numeric.c          rb_raise(rb_eTypeError, "%s can't be coerced into %s",
rb_raise          142 numeric.c      	    rb_raise(rb_eTypeError, "coerce must return [x, y]");
rb_raise          194 numeric.c          rb_raise(rb_eTypeError,
rb_raise          207 numeric.c          rb_raise(rb_eTypeError, "can't copy %s", rb_obj_classname(x));
rb_raise         1443 numeric.c      	    rb_raise(rb_eArgError, "wrong number of arguments");
rb_raise         1446 numeric.c      	    rb_raise(rb_eArgError, "step can't be 0");
rb_raise         1509 numeric.c      	rb_raise(rb_eTypeError, "no implicit conversion from nil to integer");
rb_raise         1526 numeric.c      	    rb_raise(rb_eRangeError, "float %s out of range of integer", buf);
rb_raise         1564 numeric.c          rb_raise(rb_eRangeError, "integer %ld too %s to convert to `int'", num, s);
rb_raise         1572 numeric.c      	rb_raise(rb_eRangeError, "integer %lu too big to convert to `unsigned int'", num);
rb_raise         1649 numeric.c      	rb_raise(rb_eRangeError, "integer %ld out of range of fixnum", v);
rb_raise         1660 numeric.c      	rb_raise(rb_eTypeError, "no implicit conversion from nil");
rb_raise         1677 numeric.c      	    rb_raise(rb_eRangeError, "float %s out of range of long long", buf);
rb_raise         1684 numeric.c      	rb_raise(rb_eTypeError, "no implicit conversion from string");
rb_raise         1689 numeric.c      	rb_raise(rb_eTypeError, "no implicit conversion from boolean");
rb_raise         1796 numeric.c      	rb_raise(rb_eRangeError, "%ld out of char range", i);
rb_raise         1853 numeric.c             rb_raise(rb_eTypeError, "failed to convert %s into Integer",
rb_raise         1876 numeric.c             rb_raise(rb_eTypeError, "failed to convert %s into Float",
rb_raise         1906 numeric.c      	rb_raise(rb_eArgError, "illegal radix %d", base);
rb_raise          208 object.c               rb_raise(rb_eTypeError, "[bug] frozen object (%s) allocated", rb_obj_classname(dest));
rb_raise          262 object.c               rb_raise(rb_eTypeError, "can't clone %s", rb_obj_classname(obj));
rb_raise          298 object.c               rb_raise(rb_eTypeError, "can't dup %s", rb_obj_classname(obj));
rb_raise          314 object.c       	rb_raise(rb_eTypeError, "initialize_copy should take same class object");
rb_raise          478 object.c       	rb_raise(rb_eTypeError, "class or module required");
rb_raise          525 object.c       	rb_raise(rb_eTypeError, "class or module required");
rb_raise          743 object.c       	    rb_raise(rb_eSecurityError, "Insecure: can't freeze object");
rb_raise          869 object.c       	rb_raise(rb_eTypeError, "tried to add %s(%s) to nil",
rb_raise         1339 object.c       	rb_raise(rb_eTypeError, "compared with non class/module");
rb_raise         1402 object.c       	rb_raise(rb_eTypeError, "compared with non class/module");
rb_raise         1532 object.c       	rb_raise(rb_eTypeError, "already initialized class");
rb_raise         1564 object.c       	rb_raise(rb_eTypeError, "can't instantiate uninitialized class");
rb_raise         1567 object.c       	rb_raise(rb_eTypeError, "can't create instance of virtual class");
rb_raise         1571 object.c       	rb_raise(rb_eTypeError, "wrong instance allocation");
rb_raise         1631 object.c       	rb_raise(rb_eTypeError, "uninitialized class");
rb_raise         1650 object.c       	rb_raise(rb_eArgError, "empty symbol string");
rb_raise         1672 object.c       	    rb_raise(rb_eArgError, "%ld is not a symbol", id);
rb_raise         1683 object.c       	rb_raise(rb_eTypeError, "%s is not a symbol", RSTRING(rb_inspect(name))->ptr);
rb_raise         2122 object.c       	    rb_raise(rb_eTypeError, "can't convert %s into %s",
rb_raise         2147 object.c       	rb_raise(rb_eTypeError, "%s#%s should return %s",
rb_raise         2166 object.c       	rb_raise(rb_eTypeError, "%s#%s should return %s",
rb_raise         2180 object.c       	rb_raise(rb_eTypeError, "%s#%s should return Integer",
rb_raise         2312 object.c       	rb_raise(rb_eArgError, "Float %s out of range", q);
rb_raise         2337 object.c       	    rb_raise(rb_eArgError, "string for Float contains null byte");
rb_raise         2361 object.c       	rb_raise(rb_eTypeError, "can't convert nil into Float");
rb_raise         2368 object.c       	      rb_raise(rb_eArgError, "invalid value for Float()");
rb_raise         2403 object.c       	rb_raise(rb_eTypeError, "no implicit conversion to float from string");
rb_raise         2407 object.c       	rb_raise(rb_eTypeError, "no implicit conversion to float from nil");
rb_raise          346 pack.c             rb_raise(rb_eTypeError, "can't convert %s to `integer'", rb_obj_classname(x));
rb_raise          464 pack.c         #define NEXTFROM (items-- > 0 ? RARRAY(ary)->ptr[idx++] : (rb_raise(rb_eArgError, toofew),0))
rb_raise          468 pack.c         	    rb_raise(rb_eRuntimeError, "format string modified");
rb_raise          492 pack.c         		rb_raise(rb_eArgError, "'%c' allowed only after types %s", *p, natstr);
rb_raise          852 pack.c         		rb_raise(rb_eArgError, "X outside of string");
rb_raise          865 pack.c         	    rb_raise(rb_eArgError, "%% is not supported");
rb_raise          878 pack.c         		    rb_raise(rb_eRangeError, "pack(U): value out of range");
rb_raise          921 pack.c         		    rb_raise(rb_eArgError, "too short buffer for P(%ld for %ld)",
rb_raise          965 pack.c         			rb_raise(rb_eArgError, "can't compress negative numbers");
rb_raise         1348 pack.c         		rb_raise(rb_eArgError, "'%c' allowed only after types %s", *p, natstr);
rb_raise         1367 pack.c         	    rb_raise(rb_eArgError, "%% is not supported");
rb_raise         1857 pack.c         		rb_raise(rb_eArgError, "@ outside of string");
rb_raise         1863 pack.c         		rb_raise(rb_eArgError, "X outside of string");
rb_raise         1869 pack.c         		rb_raise(rb_eArgError, "x outside of string");
rb_raise         1885 pack.c         			rb_raise(rb_eArgError, "no associated pointer");
rb_raise         1899 pack.c         			rb_raise(rb_eArgError, "non associated pointer");
rb_raise         1927 pack.c         			    rb_raise(rb_eArgError, "no associated pointer");
rb_raise         1938 pack.c         			    rb_raise(rb_eArgError, "non associated pointer");
rb_raise         2036 pack.c             rb_raise(rb_eRangeError, "pack(U): value out of range");
rb_raise         2064 pack.c         	rb_raise(rb_eArgError, "malformed UTF-8 character");
rb_raise         2074 pack.c         	rb_raise(rb_eArgError, "malformed UTF-8 character");
rb_raise         2077 pack.c         	rb_raise(rb_eArgError, "malformed UTF-8 character (expected %d bytes, given %d bytes)",
rb_raise         2086 pack.c         		rb_raise(rb_eArgError, "malformed UTF-8 character");
rb_raise         2096 pack.c         	rb_raise(rb_eArgError, "redundant UTF-8 sequence");
rb_raise           92 prec.c             rb_raise(rb_eTypeError, "undefined conversion from %s into %s",
rb_raise          604 process.c      	rb_raise(rb_eArgError, "can't do waitpid with flags");
rb_raise          929 process.c      	    rb_raise(rb_eSecurityError, "Insecure PATH - %s", str);
rb_raise         1217 process.c      	rb_raise(rb_eArgError, "wrong number of arguments");
rb_raise         1223 process.c      	    rb_raise(rb_eArgError, "wrong first argument");
rb_raise         1426 process.c      	rb_raise(rb_eArgError, "wrong number of arguments");
rb_raise         1431 process.c      	    rb_raise(rb_eArgError, "wrong first argument");
rb_raise         1447 process.c      	rb_raise(rb_eArgError, "wrong number of arguments");
rb_raise         1452 process.c      	    rb_raise(rb_eArgError, "wrong first argument");
rb_raise         1477 process.c      	rb_raise(rb_eArgError, "wrong number of arguments");
rb_raise         1482 process.c      	    rb_raise(rb_eArgError, "wrong first argument");
rb_raise         1500 process.c      	rb_raise(rb_eArgError, "wrong number of arguments");
rb_raise         1505 process.c      	    rb_raise(rb_eArgError, "wrong first argument");
rb_raise         1581 process.c      	rb_raise(rb_eArgError, "wrong number of arguments");
rb_raise         1828 process.c      	rb_raise(rb_eRuntimeError, "can't handle UID while evaluating block given to Process::UID.switch method");
rb_raise         1838 process.c      	rb_raise(rb_eRuntimeError, "can't handle GID while evaluating block given to Process::UID.switch method");
rb_raise         2470 process.c      	rb_raise(rb_eArgError, "too many groups, %d max", maxgroups);
rb_raise         2489 process.c      		    rb_raise(rb_eArgError,
rb_raise          215 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          314 range.c        	rb_raise(rb_eArgError, "step can't be negative");
rb_raise          320 range.c        	if (unit == 0) rb_raise(rb_eArgError, "step can't be 0");
rb_raise          334 range.c        	    if (unit == 0) rb_raise(rb_eArgError, "step can't be 0");
rb_raise          343 range.c        	    if (rb_equal(step, INT2FIX(0))) rb_raise(rb_eArgError, "step can't be 0");
rb_raise          352 range.c        	    if (unit == 0) rb_raise(rb_eArgError, "step can't be 0");
rb_raise          354 range.c        		rb_raise(rb_eTypeError, "can't iterate from %s",
rb_raise          402 range.c        	rb_raise(rb_eTypeError, "can't iterate from %s",
rb_raise          497 range.c        	rb_raise(rb_eRangeError, "%ld..%s%ld out of range",
rb_raise          265 re.c           	rb_raise(rb_eTypeError, "uninitialized Regexp");
rb_raise          532 re.c           	rb_raise(rb_eRegexpError, "%s: %s", err, RSTRING(desc)->ptr);
rb_raise          691 re.c           	rb_raise(rb_eTypeError, "wrong argument class");
rb_raise          741 re.c           	rb_raise(rb_eIndexError, "index %d out of matches", i);
rb_raise          770 re.c           	rb_raise(rb_eIndexError, "index %d out of matches", i);
rb_raise          798 re.c           	rb_raise(rb_eIndexError, "index %d out of matches", i);
rb_raise         1257 re.c           	rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc);
rb_raise         1658 re.c           	rb_raise(rb_eArgError, "wrong number of arguments");
rb_raise         1944 re.c                                   rb_raise(rb_eArgError, "mixed kcode: %s and %s",
rb_raise         1988 re.c           	rb_raise(rb_eTypeError, "wrong argument type");
rb_raise          755 ruby.c         		    rb_raise(rb_eRuntimeError, "illegal switch in RUBYOPT: -%c", *s);
rb_raise          882 ruby.c         	    rb_raise(rb_eLoadError, "no Ruby script found in input");
rb_raise         1012 ruby.c             if (origargv == 0) rb_raise(rb_eRuntimeError, "$0 not initialized");
rb_raise         1110 ruby.c                 rb_raise(rb_eSecurityError, "no %s allowed while running setuid", s);
rb_raise         1112 ruby.c                 rb_raise(rb_eSecurityError, "no %s allowed while running setgid", s);
rb_raise         1114 ruby.c                 rb_raise(rb_eSecurityError, "no %s allowed in tainted mode", s);
rb_raise          535 ruby.h         NORETURN(void rb_raise __((VALUE, const char*, ...)));
rb_raise          238 signal.c       	rb_raise(rb_eArgError, "wrong number of arguments -- kill(sig, pid...)");
rb_raise          246 signal.c       	if (!s) rb_raise(rb_eArgError, "bad signal");
rb_raise          259 signal.c       	    rb_raise(rb_eArgError, "unsupported name `SIG%s'", s);
rb_raise          274 signal.c       	    rb_raise(rb_eArgError, "bad signal type %s",
rb_raise          567 signal.c       	if (!s) rb_raise(rb_eArgError, "bad signal");
rb_raise          578 signal.c       	    rb_raise(rb_eArgError, "unsupported signal SIG%s", s);
rb_raise          582 signal.c       	rb_raise(rb_eArgError, "invalid signal number (%d)", sig);
rb_raise          586 signal.c       	rb_raise(rb_eArgError, "SIGVTALRM reserved for Thread; can't set handler");
rb_raise          712 signal.c       	rb_raise(rb_eArgError, "wrong number of arguments -- trap(sig, cmd)/trap(sig){...}");
rb_raise          724 signal.c       	rb_raise(rb_eSecurityError, "Insecure: tainted signal trap");
rb_raise          101 sprintf.c          (rb_raise(rb_eArgError, "unnumbered(%d) mixed with numbered", nextarg), 0) : \
rb_raise          105 sprintf.c          (rb_raise(rb_eArgError, "numbered(%d) after unnumbered(%d)", n, posarg), 0) : \
rb_raise          106 sprintf.c          ((n < 1) ? (rb_raise(rb_eArgError, "invalid index - %d$", n), 0) : \
rb_raise          110 sprintf.c          ((nth >= argc) ? (rb_raise(rb_eArgError, "too few arguments"), 0) : argv[nth])
rb_raise          118 sprintf.c      	    rb_raise(rb_eArgError, #val " too big"); \
rb_raise          123 sprintf.c      	rb_raise(rb_eArgError, "malformed format string - %%*[0-9]"); \
rb_raise          282 sprintf.c      		rb_raise(rb_eArgError, "malformed format string - %%%c", *p);
rb_raise          284 sprintf.c      		rb_raise(rb_eArgError, "malformed format string");
rb_raise          318 sprintf.c      		    rb_raise(rb_eArgError, "width too big");
rb_raise          323 sprintf.c      		rb_raise(rb_eArgError, "malformed format string - %%[0-9]");
rb_raise          327 sprintf.c      		    rb_raise(rb_eArgError, "value given twice - %d$", n);
rb_raise          339 sprintf.c      		rb_raise(rb_eArgError, "width given twice");
rb_raise          353 sprintf.c      		rb_raise(rb_eArgError, "precision given twice");
rb_raise          372 sprintf.c      		rb_raise(rb_eArgError, "malformed format string - %%.[0-9]");
rb_raise          381 sprintf.c      		rb_raise(rb_eArgError, "illegal format character - %%");
rb_raise          787 sprintf.c      	if (RTEST(ruby_debug)) rb_raise(rb_eArgError, mesg);
rb_raise           49 string.c       	rb_raise(rb_eRuntimeError, "string modified");
rb_raise           58 string.c       	rb_raise(rb_eRuntimeError, "string frozen");
rb_raise           86 string.c       	rb_raise(rb_eArgError, "negative string size (or size too big)");
rb_raise          113 string.c       	rb_raise(rb_eArgError, "NULL pointer given");
rb_raise          420 string.c       	rb_raise(rb_eArgError, "negative argument");
rb_raise          423 string.c       	rb_raise(rb_eArgError, "argument too big");
rb_raise          476 string.c       	rb_raise(rb_eRuntimeError, "can't modify string; temporarily locked");
rb_raise          480 string.c       	rb_raise(rb_eSecurityError, "Insecure: can't modify string");
rb_raise          572 string.c       	rb_raise(rb_eArgError, "string contains null byte");
rb_raise          654 string.c       	rb_raise(rb_eRuntimeError, "temporal locking already locked string");
rb_raise          665 string.c       	rb_raise(rb_eRuntimeError, "temporal unlocking already unlocked string");
rb_raise          677 string.c       	rb_raise(rb_eArgError, "negative string size (or size too big)");
rb_raise          704 string.c       	rb_raise(rb_eArgError, "negative string size (or size too big)");
rb_raise          743 string.c       	rb_raise(rb_eArgError, "negative string size (or size too big)");
rb_raise         1146 string.c       	      rb_raise(rb_eTypeError, "type mismatch: %s given",
rb_raise         1270 string.c       	rb_raise(rb_eTypeError, "type mismatch: %s given",
rb_raise         1298 string.c       	rb_raise(rb_eTypeError, "type mismatch: String given");
rb_raise         1623 string.c       	rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", argc);
rb_raise         1634 string.c           if (len < 0) rb_raise(rb_eIndexError, "negative length %ld", len);
rb_raise         1641 string.c       	rb_raise(rb_eIndexError, "index %ld out of string", beg);
rb_raise         1695 string.c       	rb_raise(rb_eIndexError, "regexp not matched");
rb_raise         1700 string.c       	rb_raise(rb_eIndexError, "index %d out of regexp", nth);
rb_raise         1711 string.c       	rb_raise(rb_eIndexError, "regexp group %d not matched", nth);
rb_raise         1731 string.c       	    rb_raise(rb_eIndexError, "index %ld out of string", idx);
rb_raise         1758 string.c       	    rb_raise(rb_eIndexError, "string not matched");
rb_raise         1818 string.c       	rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)", argc);
rb_raise         1889 string.c       	rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", argc);
rb_raise         1963 string.c       	rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)", argc);
rb_raise         2071 string.c       	rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)", argc);
rb_raise         2100 string.c       		rb_raise(rb_eRuntimeError, "block should not cheat");
rb_raise         2283 string.c       	rb_raise(rb_eTypeError, "$_ value need to be String (%s given)",
rb_raise         2502 string.c       	rb_raise(rb_eArgError, "illegal radix %d", base);
rb_raise         3196 string.c       	rb_raise(rb_eArgError, "wrong number of arguments");
rb_raise         3402 string.c       	rb_raise(rb_eArgError, "wrong number of arguments");
rb_raise         4356 string.c       	rb_raise(rb_eArgError, "salt too short(need >=2 bytes)");
rb_raise         4395 string.c       	rb_raise(rb_eArgError, "interning empty string");
rb_raise         4398 string.c       	rb_raise(rb_eArgError, "symbol string may not contain `\\0'");
rb_raise         4487 string.c       	    rb_raise(rb_eArgError, "zero width padding");
rb_raise         4611 string.c       	rb_raise(rb_eTypeError, "value of %s must be String", rb_id2name(id));
rb_raise           56 struct.c       	rb_raise(rb_eTypeError, "struct size differs (%d required %d given)",
rb_raise          155 struct.c              rb_raise(rb_eSecurityError, "Insecure: can't modify Struct");
rb_raise          346 struct.c       	rb_raise(rb_eArgError, "struct size differs");
rb_raise          558 struct.c       	rb_raise(rb_eTypeError, "wrong argument class");
rb_raise          618 struct.c               rb_raise(rb_eIndexError, "offset %ld too small for struct(size:%ld)",
rb_raise          621 struct.c               rb_raise(rb_eIndexError, "offset %ld too large for struct(size:%ld)",
rb_raise          638 struct.c       	rb_raise(rb_eTypeError, "struct size differs (%d required %d given)",
rb_raise          684 struct.c               rb_raise(rb_eIndexError, "offset %ld too small for struct(size:%ld)",
rb_raise          688 struct.c               rb_raise(rb_eIndexError, "offset %ld too large for struct(size:%ld)",
rb_raise          759 struct.c       	rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc);
rb_raise           66 time.c         	rb_raise(rb_eSecurityError, "Insecure: can't modify Time");
rb_raise          122 time.c         	    rb_raise(rb_eRangeError, "out of Time range");
rb_raise          130 time.c         	    rb_raise(rb_eRangeError, "out of Time range");
rb_raise          136 time.c         	rb_raise(rb_eArgError, "time must be positive");
rb_raise          181 time.c         	    rb_raise(rb_eArgError, "%s must be positive", tstr);
rb_raise          187 time.c         	    rb_raise(rb_eArgError, "%s must be positive", tstr);
rb_raise          194 time.c         		rb_raise(rb_eRangeError, "%f out of Time range", RFLOAT(time)->value);
rb_raise          203 time.c         	    rb_raise(rb_eArgError, "%s must be positive", tstr);
rb_raise          208 time.c         	rb_raise(rb_eTypeError, "can't convert %s into %s",
rb_raise          396 time.c         	rb_raise(rb_eArgError, "argument out of range");
rb_raise          736 time.c             rb_raise(rb_eArgError, "time out of range");
rb_raise          739 time.c             rb_raise(rb_eArgError, "gmtime/localtime error");
rb_raise         1044 time.c         	rb_raise(rb_eTypeError, "wrong argument type");
rb_raise         1094 time.c         	rb_raise(rb_eArgError, "localtime error");
rb_raise         1138 time.c         	rb_raise(rb_eArgError, "gmtime error");
rb_raise         1287 time.c                 rb_raise(rb_eRangeError, "time %s %f out of Time range",
rb_raise         1295 time.c                     rb_raise(rb_eRangeError, "time - %f out of Time range", v);
rb_raise         1301 time.c                     rb_raise(rb_eRangeError, "time + %f out of Time range", v);
rb_raise         1330 time.c         	rb_raise(rb_eTypeError, "time + time?");
rb_raise         1688 time.c         	    rb_raise(rb_eArgError, "gmtime error");
rb_raise         1900 time.c         	rb_raise(rb_eArgError, "year too big to marshal");
rb_raise         1967 time.c         	rb_raise(rb_eTypeError, "marshaled time format differ");
rb_raise          246 variable.c     	rb_raise(rb_eArgError, "can't retrieve anonymous class %s", path);
rb_raise          262 variable.c     	    rb_raise(rb_eArgError, "undefined class/module %.*s", p-path, path);
rb_raise          270 variable.c     	    rb_raise(rb_eTypeError, "%s does not refer class/module", path);
rb_raise          585 variable.c     	rb_raise(rb_eSecurityError, "Insecure: tainted variable trace");
rb_raise          717 variable.c     	rb_raise(rb_eSecurityError, "Insecure: can't change global variable value");
rb_raise          802 variable.c     	rb_raise(rb_eSecurityError, "Insecure: can't alias global variable");
rb_raise          813 variable.c     	    rb_raise(rb_eRuntimeError, "can't alias in tracer");
rb_raise         1049 variable.c     	rb_raise(rb_eSecurityError, "Insecure: can't modify instance variable");
rb_raise         1173 variable.c     	rb_raise(rb_eSecurityError, "Insecure: can't modify instance variable");
rb_raise         1267 variable.c     	rb_raise(rb_eTypeError, "wrong autoload table: %s", RSTRING(rb_inspect(av))->ptr);
rb_raise         1282 variable.c     	rb_raise(rb_eNameError, "autoload must be constant name", rb_id2name(id));
rb_raise         1285 variable.c     	rb_raise(rb_eArgError, "empty file name");
rb_raise         1364 variable.c     	rb_raise(rb_eArgError, "empty file name");
rb_raise         1476 variable.c     	rb_raise(rb_eSecurityError, "Insecure: can't remove constant");
rb_raise         1641 variable.c     	rb_raise(rb_eSecurityError, "Insecure: can't set %s", dest);
rb_raise         1744 variable.c     		rb_raise(rb_eSecurityError, "Insecure: can't modify class variable");
rb_raise         1922 variable.c     	rb_raise(rb_eSecurityError, "Insecure: can't remove class variable");


rb_raise_jump

rb_raise_jump    4564 eval.c             rb_raise_jump(rb_make_exception(argc, argv));
rb_raise_jump    10120 eval.c         	rb_raise_jump(th_raise_exception);
rb_raise_jump    12121 eval.c         	rb_raise_jump(exc);


rb_range_beg_len

rb_range_beg_len  682 array.c            switch (rb_range_beg_len(arg, &beg, &len, RARRAY(ary)->len, 0)) {
rb_range_beg_len 1059 array.c            if (rb_range_beg_len(argv[0], &beg, &len, RARRAY(ary)->len, 1)) {
rb_range_beg_len 1751 array.c        	switch (rb_range_beg_len(argv[i], &beg, &len, olen, 0)) {
rb_range_beg_len 1964 array.c            if (!FIXNUM_P(arg1) && rb_range_beg_len(arg1, &pos, &len, RARRAY(ary)->len, 1)) {
rb_range_beg_len 2244 array.c        	if (rb_range_beg_len(arg1, &beg, &len, RARRAY(ary)->len, 1)) {
rb_range_beg_len  354 intern.h       VALUE rb_range_beg_len _((VALUE, long*, long*, long, int));
rb_range_beg_len 1545 string.c       	    switch (rb_range_beg_len(indx, &beg, &len, RSTRING(str)->len, 0)) {
rb_range_beg_len 1767 string.c       	    if (rb_range_beg_len(indx, &beg, &len, RSTRING(str)->len, 2)) {


rb_range_new

rb_range_new     3281 eval.c         	    result = rb_range_new(beg, end, nd_type(node) == NODE_DOT3);
rb_range_new      353 intern.h       VALUE rb_range_new _((VALUE, VALUE, int));
rb_range_new     4608 parse.c        			    yyvsp[-2].node->nd_lit = rb_range_new(yyvsp[-2].node->nd_lit, yyvsp[0].node->nd_lit, Qfalse);
rb_range_new     4623 parse.c        			    yyvsp[-2].node->nd_lit = rb_range_new(yyvsp[-2].node->nd_lit, yyvsp[0].node->nd_lit, Qtrue);
rb_range_new     1079 parse.y        			    $1->nd_lit = rb_range_new($1->nd_lit, $3->nd_lit, Qfalse);
rb_range_new     1092 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      85 rubyio.h       void rb_read_check _((FILE*));


rb_read_pending

rb_read_pending    68 ext/io/wait/wait.c     if (rb_read_pending(fp)) return Qtrue;
rb_read_pending   108 ext/io/wait/wait.c     if (rb_read_pending(fp)) return Qtrue;
rb_read_pending   556 ext/socket/socket.c     if (rb_read_pending(fptr->f)) {
rb_read_pending    86 rubyio.h       int rb_read_pending _((FILE*));


rb_reg_adjust_startpos

rb_reg_adjust_startpos   34 re.h           long rb_reg_adjust_startpos _((VALUE, VALUE, long, long));
rb_reg_adjust_startpos 1125 string.c       	pos = rb_reg_adjust_startpos(sub, str, pos, 0);
rb_reg_adjust_startpos 1241 string.c       	    pos = rb_reg_adjust_startpos(sub, str, pos, 1);


rb_reg_check

rb_reg_check      338 re.c           	rb_reg_check(re);
rb_reg_check      383 re.c               rb_reg_check(re);
rb_reg_check      404 re.c               rb_reg_check(re);
rb_reg_check      439 re.c               rb_reg_check(re);
rb_reg_check      547 re.c               rb_reg_check(re);
rb_reg_check      825 re.c               rb_reg_check(re);
rb_reg_check      851 re.c           	rb_reg_check(re);
rb_reg_check      867 re.c               rb_reg_check(re);
rb_reg_check      901 re.c               rb_reg_check(re);
rb_reg_check     1448 re.c               rb_reg_check(re);
rb_reg_check     1481 re.c               rb_reg_check(re1); rb_reg_check(re2);
rb_reg_check     1664 re.c           	rb_reg_check(argv[0]);
rb_reg_check     1879 re.c               rb_reg_check(re);
rb_reg_check     1990 re.c               rb_reg_check(re);


rb_reg_desc

rb_reg_desc       405 re.c               return rb_reg_desc(RREGEXP(re)->str, RREGEXP(re)->len, re);
rb_reg_desc       527 re.c               VALUE desc = rb_reg_desc(s, len, re);


rb_reg_equal

rb_reg_equal     2262 re.c               rb_define_method(rb_cRegexp, "eql?", rb_reg_equal, 1);
rb_reg_equal     2263 re.c               rb_define_method(rb_cRegexp, "==", rb_reg_equal, 1);


rb_reg_expr_str

rb_reg_expr_str   335 re.c               rb_reg_expr_str(str, s, len);
rb_reg_expr_str   513 re.c               rb_reg_expr_str(str, ptr, len);


rb_reg_initialize

rb_reg_initialize 1399 re.c               rb_reg_initialize(re, s, len, options);
rb_reg_initialize 1716 re.c               rb_reg_initialize(self, s, len, flags);
rb_reg_initialize 1991 re.c               rb_reg_initialize(copy, RREGEXP(re)->str, RREGEXP(re)->len,


rb_reg_last_match

rb_reg_last_match 3674 eval.c         	    result = rb_reg_last_match(MATCH_DATA);
rb_reg_last_match  362 intern.h       VALUE rb_reg_last_match _((VALUE));
rb_reg_last_match 1071 re.c               return rb_reg_last_match(rb_backref_get());
rb_reg_last_match 1292 re.c               VALUE str = rb_reg_last_match(match);


rb_reg_match

rb_reg_match     2879 eval.c         	    result = rb_reg_match(l, r);
rb_reg_match     2889 eval.c         		result = rb_reg_match(r, l);
rb_reg_match      367 intern.h       VALUE rb_reg_match _((VALUE, VALUE));
rb_reg_match     1608 re.c               VALUE result = rb_reg_match(re, str);
rb_reg_match     2264 re.c               rb_define_method(rb_cRegexp, "=~", rb_reg_match, 1);
rb_reg_match     1301 string.c       	return rb_reg_match(y, x);


rb_reg_match2

rb_reg_match2    2871 eval.c         	result = rb_reg_match2(node->nd_lit);
rb_reg_match2     368 intern.h       VALUE rb_reg_match2 _((VALUE));
rb_reg_match2    2266 re.c               rb_define_method(rb_cRegexp, "~", rb_reg_match2, 0);


rb_reg_match_last

rb_reg_match_last 3683 eval.c         	    result = rb_reg_match_last(MATCH_DATA);
rb_reg_match_last  365 intern.h       VALUE rb_reg_match_last _((VALUE));
rb_reg_match_last 1089 re.c               return rb_reg_match_last(rb_backref_get());


rb_reg_match_post

rb_reg_match_post 3680 eval.c         	    result = rb_reg_match_post(MATCH_DATA);
rb_reg_match_post  364 intern.h       VALUE rb_reg_match_post _((VALUE));
rb_reg_match_post 1083 re.c               return rb_reg_match_post(rb_backref_get());
rb_reg_match_post 2298 re.c               rb_define_method(rb_cMatch, "post_match", rb_reg_match_post, 0);


rb_reg_match_pre

rb_reg_match_pre 3677 eval.c         	    result = rb_reg_match_pre(MATCH_DATA);
rb_reg_match_pre  363 intern.h       VALUE rb_reg_match_pre _((VALUE));
rb_reg_match_pre 1077 re.c               return rb_reg_match_pre(rb_backref_get());
rb_reg_match_pre 2297 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       3765 eval.c         		result = rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len,
rb_reg_new       3769 eval.c         		result = rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len,
rb_reg_new        366 intern.h       VALUE rb_reg_new _((const char*, long, int));
rb_reg_new       1159 marshal.c      	    v = r_entry(rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len, options), arg);
rb_reg_new       5732 parse.c        			    node = NEW_LIT(rb_reg_new("", 0, options & ~RE_OPTION_ONCE));
rb_reg_new       5739 parse.c        				node->nd_lit = rb_reg_new(RSTRING(src)->ptr,
rb_reg_new       1992 parse.y        			    node = NEW_LIT(rb_reg_new("", 0, options & ~RE_OPTION_ONCE));
rb_reg_new       1999 parse.y        				node->nd_lit = rb_reg_new(RSTRING(src)->ptr,
rb_reg_new       1420 re.c               return reg_cache = rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len,
rb_reg_new        622 ruby.c         		rb_fs = rb_reg_new(s, strlen(s), 0);


rb_reg_nth_defined

rb_reg_nth_defined 2413 eval.c         	if (RTEST(rb_reg_nth_defined(node->nd_nth, MATCH_DATA))) {
rb_reg_nth_defined 2420 eval.c         	if (RTEST(rb_reg_nth_defined(0, MATCH_DATA))) {
rb_reg_nth_defined  360 intern.h       VALUE rb_reg_nth_defined _((int, VALUE));


rb_reg_nth_match

rb_reg_nth_match 3668 eval.c         	result = rb_reg_nth_match(node->nd_nth, MATCH_DATA);
rb_reg_nth_match  361 intern.h       VALUE rb_reg_nth_match _((int, VALUE));
rb_reg_nth_match  997 re.c               return rb_reg_nth_match(0, match);
rb_reg_nth_match 1065 re.c               return rb_reg_nth_match(i, match);
rb_reg_nth_match 1203 re.c               return rb_reg_nth_match(FIX2INT(idx), match);
rb_reg_nth_match 1212 re.c               return rb_reg_nth_match(n, match);
rb_reg_nth_match 2205 re.c           	return rb_reg_nth_match(NUM2INT(nth), rb_backref_get());
rb_reg_nth_match 1506 string.c       	return rb_reg_nth_match(nth, rb_backref_get());
rb_reg_nth_match 1976 string.c       	    repl = rb_obj_as_string(rb_yield(rb_reg_nth_match(0, match)));
rb_reg_nth_match 2096 string.c       	    val = rb_obj_as_string(rb_yield(rb_reg_nth_match(0, match)));
rb_reg_nth_match 4201 string.c       	    return rb_reg_nth_match(0, match);
rb_reg_nth_match 4205 string.c       	    rb_ary_push(result, rb_reg_nth_match(i, match));


rb_reg_options

rb_reg_options    369 intern.h       int rb_reg_options _((VALUE));
rb_reg_options    593 marshal.c      	    w_byte(rb_reg_options(obj), arg);
rb_reg_options    580 re.c               int options = rb_reg_options(re);
rb_reg_options   1992 re.c           		      rb_reg_options(re));


rb_reg_prepare_re

rb_reg_prepare_re  868 re.c               if (may_need_recompile) rb_reg_prepare_re(re);
rb_reg_prepare_re  902 re.c               if (may_need_recompile) rb_reg_prepare_re(re);


rb_reg_quote

rb_reg_quote     1834 re.c               str = rb_reg_quote(str);
rb_reg_quote       36 re.h           VALUE rb_reg_quote _((VALUE));
rb_reg_quote     1925 string.c       	pat = rb_reg_quote(pat);
rb_reg_quote     3504 string.c       		spat = rb_reg_regcomp(rb_reg_quote(spat));


rb_reg_raise

rb_reg_raise      645 re.c           	rb_reg_raise(s, len, err, 0);
rb_reg_raise      855 re.c           	    rb_reg_raise(RREGEXP(re)->str, RREGEXP(re)->len, err, re);
rb_reg_raise      922 re.c           	rb_reg_raise(RREGEXP(re)->str, RREGEXP(re)->len,


rb_reg_regcomp

rb_reg_regcomp     31 re.h           VALUE rb_reg_regcomp _((VALUE));
rb_reg_regcomp   1928 string.c           return rb_reg_regcomp(pat);
rb_reg_regcomp   3504 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    1982 string.c       	    repl = rb_reg_regsub(repl, str, regs);
rb_reg_regsub    2105 string.c       	    val = rb_reg_regsub(repl, str, regs);


rb_reg_s_alloc

rb_reg_s_alloc   1376 re.c           static VALUE rb_reg_s_alloc _((VALUE));
rb_reg_s_alloc   1397 re.c               VALUE re = rb_reg_s_alloc(rb_cRegexp);
rb_reg_s_alloc   2252 re.c               rb_define_alloc_func(rb_cRegexp, rb_reg_s_alloc);


rb_reg_s_quote

rb_reg_s_quote   1920 re.c                       args[0] = rb_reg_s_quote(argc, argv);
rb_reg_s_quote   1952 re.c                           v = rb_reg_s_quote(1, args);
rb_reg_s_quote   2254 re.c               rb_define_singleton_method(rb_cRegexp, "quote", rb_reg_s_quote, -1);
rb_reg_s_quote   2255 re.c               rb_define_singleton_method(rb_cRegexp, "escape", rb_reg_s_quote, -1);


rb_reg_search

rb_reg_search    1514 re.c               start = rb_reg_search(re, str, 0, 0);
rb_reg_search    1554 re.c               start = rb_reg_search(re, str, 0, 0);
rb_reg_search    1585 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    1126 string.c       	pos = rb_reg_search(sub, str, pos, 0);
rb_reg_search    1242 string.c       	    pos = rb_reg_search(sub, str, pos, 1);
rb_reg_search    1505 string.c           if (rb_reg_search(re, str, 0, 0) >= 0) {
rb_reg_search    1694 string.c           if (rb_reg_search(re, str, 0, 0) < 0) {
rb_reg_search    1967 string.c           if (rb_reg_search(pat, str, 0, 0) >= 0) {
rb_reg_search    2076 string.c           beg = rb_reg_search(pat, str, 0, 0);
rb_reg_search    2136 string.c       	beg = rb_reg_search(pat, str, offset, 0);
rb_reg_search    3550 string.c       	while ((end = rb_reg_search(spat, str, start, 0)) >= 0) {
rb_reg_search    4185 string.c           if (rb_reg_search(pat, str, *start, 0) >= 0) {


rb_reg_to_s

rb_reg_to_s      1948 re.c                           v = rb_reg_to_s(v);
rb_reg_to_s      2268 re.c               rb_define_method(rb_cRegexp, "to_s", rb_reg_to_s, 0);


rb_remove_event_hook

rb_remove_event_hook 2551 eval.c         	rb_remove_event_hook(call_trace_func);
rb_remove_event_hook  375 node.h         int rb_remove_event_hook _((rb_event_hook_func_t));


rb_remove_history

rb_remove_history  603 ext/readline/readline.c 	return rb_remove_history(history_length - 1);
rb_remove_history  615 ext/readline/readline.c 	return rb_remove_history(0);
rb_remove_history  668 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         27 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        356 ruby.c         	rb_protect((VALUE (*)(VALUE))rb_require, (VALUE)list->name, &state);
rb_require        560 ruby.h         VALUE rb_require _((const char*));


rb_require_safe

rb_require_safe  6918 eval.c             return rb_require_safe(fname, ruby_safe_level);
rb_require_safe  7078 eval.c             return rb_require_safe(fn, ruby_safe_level);
rb_require_safe   181 intern.h       VALUE rb_require_safe _((VALUE, int));
rb_require_safe  1345 variable.c         return rb_require_safe(file, load->nd_nth);


rb_rescue

rb_rescue          90 compar.c           return rb_rescue(cmp_eq, (VALUE)a, cmp_failed, 0);
rb_rescue         139 numeric.c          ary = rb_rescue(coerce_body, (VALUE)a, err?coerce_rescue:0, (VALUE)a);
rb_rescue          48 range.c        	v = rb_rescue(range_check, (VALUE)args, range_failed, 0);
rb_rescue         554 ruby.h         VALUE rb_rescue _((VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE));


rb_rescue2

rb_rescue2       5318 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        555 ruby.h         VALUE rb_rescue2 __((VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE,...));


rb_reserved_word

rb_reserved_word 8437 parse.c        		kw = rb_reserved_word(tok(), toklen());
rb_reserved_word 4439 parse.y        		kw = rb_reserved_word(tok(), toklen());


rb_respond_to

rb_respond_to     932 array.c            if (rb_respond_to(obj, rb_intern("to_ary"))) {
rb_respond_to    2474 array.c        	if (!rb_respond_to(ary2, rb_intern("to_ary"))) {
rb_respond_to    4596 eval.c         	if (!rb_respond_to(argv[0], exception)) {
rb_respond_to     267 ext/openssl/ossl.c     if(rb_respond_to(obj, ossl_s_to_der))
rb_respond_to     110 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    1120 ext/syck/rubyext.c                     if ( RARRAY(subclass_parts)->len > 0 && rb_respond_to( target_class, s_tag_subclasses ) &&
rb_respond_to    1148 ext/syck/rubyext.c         if ( rb_respond_to( target_class, s_call ) )
rb_respond_to    1154 ext/syck/rubyext.c             if ( rb_respond_to( target_class, s_yaml_new ) )
rb_respond_to    1161 ext/syck/rubyext.c                 if ( rb_respond_to( obj, s_yaml_initialize ) )
rb_respond_to    1571 ext/syck/rubyext.c     if ( rb_respond_to( emitter, s_node_export ) ) {
rb_respond_to    1697 ext/syck/rubyext.c     if ( rb_respond_to( emitter, s_node_export ) ) {
rb_respond_to    1990 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    1806 ext/zlib/zlib.c     if (closeflag && rb_respond_to(io, id_close)) {
rb_respond_to    1822 ext/zlib/zlib.c 	    && rb_respond_to(gz->io, id_flush))
rb_respond_to    2755 ext/zlib/zlib.c     if (rb_respond_to(gz->io, id_flush)) {
rb_respond_to    1654 gc.c               if (!rb_respond_to(block, rb_intern("call"))) {
rb_respond_to    1737 gc.c               else if (!rb_respond_to(block, rb_intern("call"))) {
rb_respond_to    1455 hash.c         	if (!rb_respond_to(hash2, rb_intern("to_hash"))) {
rb_respond_to     168 intern.h       int rb_respond_to _((VALUE, ID));
rb_respond_to    3960 io.c               if (!rb_respond_to(val, mid)) {
rb_respond_to     504 marshal.c      	if (rb_respond_to(obj, s_mdump)) {
rb_respond_to     513 marshal.c      	if (rb_respond_to(obj, s_dump)) {
rb_respond_to     656 marshal.c      		if (!rb_respond_to(obj, s_dump_data)) {
rb_respond_to     751 marshal.c      	if (!rb_respond_to(port, s_write)) {
rb_respond_to     757 marshal.c      	if (rb_respond_to(port, s_binmode)) {
rb_respond_to    1232 marshal.c      	    if (!rb_respond_to(klass, s_load)) {
rb_respond_to    1258 marshal.c      	    if (!rb_respond_to(v, s_mload)) {
rb_respond_to    1284 marshal.c                 if (rb_respond_to(klass, s_alloc)) {
rb_respond_to    1299 marshal.c                 if (!rb_respond_to(v, s_load_data)) {
rb_respond_to    1396 marshal.c          if (rb_respond_to(port, rb_intern("to_str"))) {
rb_respond_to    1400 marshal.c          else if (rb_respond_to(port, s_getc) && rb_respond_to(port, s_read)) {
rb_respond_to    1401 marshal.c      	if (rb_respond_to(port, s_binmode)) {
rb_respond_to    2120 object.c           if (!rb_respond_to(val, m)) {
rb_respond_to     353 range.c        	    if (!rb_respond_to(b, id_succ)) {
rb_respond_to     401 range.c            if (!rb_respond_to(beg, id_succ)) {
rb_respond_to     938 string.c       	if (!rb_respond_to(str2, rb_intern("to_str"))) {
rb_respond_to    1005 string.c       	if (!rb_respond_to(str2, rb_intern("to_str"))) {
rb_respond_to    1008 string.c       	else if (!rb_respond_to(str2, rb_intern("<=>"))) {


rb_safe_level

rb_safe_level      54 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     243 ext/socket/socket.c     if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) {
rb_safe_level     268 ext/socket/socket.c     if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) {
rb_safe_level     287 ext/socket/socket.c     if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) {
rb_safe_level    1198 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    4165 file.c         	if (rb_safe_level() >= 2 && OBJ_TAINTED(fname)) {
rb_safe_level    4219 file.c         	if (rb_safe_level() >= 1 && OBJ_TAINTED(path)) {
rb_safe_level    4228 file.c         	if (rb_safe_level() >= 1 && !fpath_check(f)) {
rb_safe_level    4236 file.c         	if (rb_safe_level() >= 1 && !fpath_check(f)) {
rb_safe_level    4242 file.c             if (rb_safe_level() >= 4) {
rb_safe_level    4264 file.c         	    if (rb_safe_level() >= 1 && !rb_path_check(lpath)) {
rb_safe_level    4277 file.c             if (rb_safe_level() >= 1 && !fpath_check(f)) {
rb_safe_level      98 gc.c               if (recurse > 0 && rb_safe_level() < 4) {
rb_safe_level      33 hash.c             if (!OBJ_TAINTED(hash) && rb_safe_level() >= 4)
rb_safe_level    1886 hash.c             if (rb_safe_level() >= 4) {
rb_safe_level     197 io.c               if (!OBJ_TAINTED(io) && rb_safe_level() >= 4)
rb_safe_level    2141 io.c               if (rb_safe_level() >= 4 && !OBJ_TAINTED(io)) {
rb_safe_level    2214 io.c               if (rb_safe_level() >= 4 && !OBJ_TAINTED(io)) {
rb_safe_level    2259 io.c               if (rb_safe_level() >= 4 && !OBJ_TAINTED(io)) {
rb_safe_level    3360 io.c               if (rb_safe_level() >= 4 && (!OBJ_TAINTED(io) || !OBJ_TAINTED(nfile))) {
rb_safe_level     742 object.c       	if (rb_safe_level() >= 4 && !OBJ_TAINTED(obj)) {
rb_safe_level    6571 parse.c            if (!compile_for_eval && rb_safe_level() == 0 &&
rb_safe_level    2573 parse.y            if (!compile_for_eval && rb_safe_level() == 0 &&
rb_safe_level     928 process.c      	if (rb_safe_level() > 0) {
rb_safe_level     936 re.c           	if (rb_safe_level() >= 3)
rb_safe_level     286 ruby.c             if (rb_safe_level() == 0) {
rb_safe_level     307 ruby.c             if (rb_safe_level() == 0) {
rb_safe_level     731 ruby.c             if (rb_safe_level() == 0 && (s = getenv("RUBYOPT"))) {
rb_safe_level     769 ruby.c             if (rb_safe_level() >= 4) {
rb_safe_level     825 ruby.c             if (rb_safe_level() >= 4) {
rb_safe_level    1113 ruby.c             if (rb_safe_level() > 0)
rb_safe_level     294 ruby.h             if (rb_safe_level() >= 3) FL_SET(obj, FL_TAINT);\
rb_safe_level     479 string.c           if (!OBJ_TAINTED(str) && rb_safe_level() >= 4)
rb_safe_level     154 struct.c           if (!OBJ_TAINTED(s) && rb_safe_level() >= 4)
rb_safe_level      65 time.c             if (!OBJ_TAINTED(time) && rb_safe_level() >= 4)
rb_safe_level     716 variable.c         if (rb_safe_level() >= 4)
rb_safe_level     801 variable.c         if (rb_safe_level() >= 4)
rb_safe_level    1048 variable.c         if (!OBJ_TAINTED(obj) && rb_safe_level() >= 4)
rb_safe_level    1172 variable.c         if (!OBJ_TAINTED(obj) && rb_safe_level() >= 4)
rb_safe_level    1475 variable.c         if (!OBJ_TAINTED(mod) && rb_safe_level() >= 4)
rb_safe_level    1640 variable.c         if (!OBJ_TAINTED(klass) && rb_safe_level() >= 4)
rb_safe_level    1743 variable.c     	    if (!OBJ_TAINTED(tmp) && rb_safe_level() >= 4)
rb_safe_level    1921 variable.c         if (!OBJ_TAINTED(mod) && rb_safe_level() >= 4)


rb_scan_args

rb_scan_args      273 array.c            if (rb_scan_args(argc, argv, "02", &size, &val) == 0) {
rb_scan_args      671 array.c        	rb_scan_args(argc, argv, "11", 0, 0);
rb_scan_args      744 array.c        	rb_scan_args(argc, argv, "01", &nv);
rb_scan_args      780 array.c        	rb_scan_args(argc, argv, "01", &nv);
rb_scan_args      821 array.c            rb_scan_args(argc, argv, "11", &pos, &ifnone);
rb_scan_args     1315 array.c            rb_scan_args(argc, argv, "01", &sep);
rb_scan_args     1952 array.c            if (rb_scan_args(argc, argv, "11", &arg1, &arg2) == 2) {
rb_scan_args     2232 array.c        	rb_scan_args(argc, argv, "02", &arg1, &arg2);
rb_scan_args     2236 array.c        	rb_scan_args(argc, argv, "12", &item, &arg1, &arg2);
rb_scan_args      723 bignum.c           rb_scan_args(argc, argv, "01", &b);
rb_scan_args      618 class.c        	rb_scan_args(argc, argv, "01", &r);
rb_scan_args      775 class.c            rb_scan_args(argc, argv, "01", &recur);
rb_scan_args      635 dir.c              if (rb_scan_args(argc, argv, "01", &path) == 1) {
rb_scan_args      755 dir.c              if (rb_scan_args(argc, argv, "11", &path, &vmode) == 2) {
rb_scan_args     1362 dir.c              if (rb_scan_args(argc, argv, "11", &str, &rflags) == 2)
rb_scan_args     1502 dir.c              if (rb_scan_args(argc, argv, "21", &pattern, &path, &rflags) == 3)
rb_scan_args      116 enum.c             rb_scan_args(argc, argv, "01", &if_none);
rb_scan_args      308 enum.c             if (rb_scan_args(argc, argv, "01", &memo) == 0)
rb_scan_args      356 error.c            rb_scan_args(argc, argv, "01", &arg);
rb_scan_args      890 error.c        	rb_scan_args(argc, argv, "11", &mesg, &error);
rb_scan_args      903 error.c        	rb_scan_args(argc, argv, "01", &mesg);
rb_scan_args     4148 eval.c             rb_scan_args(argc, argv, "11", &mid, &priv);
rb_scan_args     4383 eval.c             if (rb_scan_args(argc, argv, "01", &status) == 1) {
rb_scan_args     4433 eval.c         	rb_scan_args(argc, argv, "1", &mesg);
rb_scan_args     6181 eval.c             rb_scan_args(argc, argv, "01", &level);
rb_scan_args     6401 eval.c             rb_scan_args(argc, argv, "13", &src, &scope, &vfile, &vline);
rb_scan_args     6782 eval.c             rb_scan_args(argc, argv, "11", &fname, &wrap);
rb_scan_args     10910 eval.c             rb_scan_args(argc, argv, "01", &limit);
rb_scan_args     12868 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      187 ext/digest/digest.c     rb_scan_args(argc, argv, "01", &arg);
rb_scan_args      540 ext/dl/dl.c      switch (rb_scan_args(argc, argv, "01", &t)) {
rb_scan_args      599 ext/dl/dl.c      switch (rb_scan_args(argc, argv, "11", &type, &proc)) {
rb_scan_args       53 ext/dl/handle.c   switch (rb_scan_args(argc, argv, "11", &lib, &flag)) {
rb_scan_args      142 ext/dl/handle.c   if (rb_scan_args(argc, argv, "11", &sym, &type) == 2) {
rb_scan_args      192 ext/dl/ptr.c     switch (rb_scan_args(argc, argv, "12", &ptr, &size, &sym)) {
rb_scan_args      230 ext/dl/ptr.c     switch (rb_scan_args(argc, argv, "11", &size, &sym)) {
rb_scan_args      317 ext/dl/ptr.c     switch (rb_scan_args(argc, argv, "11", &type, &size)) {
rb_scan_args      424 ext/dl/ptr.c     switch (rb_scan_args(argc, argv, "01", &arg1)) {
rb_scan_args      447 ext/dl/ptr.c     switch (rb_scan_args(argc, argv, "01", &arg1)) {
rb_scan_args      525 ext/dl/ptr.c     rb_scan_args(argc, argv, "11*", &data_type, &type, &rest);
rb_scan_args      736 ext/dl/ptr.c     if (rb_scan_args(argc, argv, "11", &key, &num) == 1) {
rb_scan_args      853 ext/dl/ptr.c     switch (rb_scan_args(argc, argv, "21", &key, &num, &val)) {
rb_scan_args     1001 ext/dl/ptr.c     if (rb_scan_args(argc, argv, "01", &size) == 0){
rb_scan_args      154 ext/dl/sym.c     rb_scan_args(argc, argv, "12", &addr, &name, &type);
rb_scan_args      226 ext/enumerator/enumerator.c     rb_scan_args(argc, argv, "11*", &enum_obj, &enum_method, &enum_args);
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      759 ext/iconv/iconv.c     rb_scan_args(argc, argv, "12", &str, &n1, &n2);
rb_scan_args       97 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      157 ext/openssl/ossl_ssl.c     if (rb_scan_args(argc, argv, "01", &ssl_method) == 0){
rb_scan_args      519 ext/openssl/ossl_ssl.c     if (rb_scan_args(argc, argv, "11", &io, &ctx) == 1) {
rb_scan_args      626 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       65 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      246 ext/socket/socket.c     rb_scan_args(argc, argv, "01", &howto);
rb_scan_args      492 ext/socket/socket.c     rb_scan_args(argc, argv, "21", &mesg, &flags, &to);
rb_scan_args      549 ext/socket/socket.c     rb_scan_args(argc, argv, "11", &len, &flg);
rb_scan_args     1169 ext/socket/socket.c     rb_scan_args(argc, argv, "22", &remote_host, &remote_serv,
rb_scan_args     1298 ext/socket/socket.c     if (rb_scan_args(argc, argv, "11", &arg1, &arg2) == 2)
rb_scan_args     1501 ext/socket/socket.c     if (rb_scan_args(argc, argv, "01", &arg) == 1) {
rb_scan_args     1589 ext/socket/socket.c     rb_scan_args(argc, argv, "4", &mesg, &flags, &host, &port);
rb_scan_args     1764 ext/socket/socket.c     rb_scan_args(argc, argv, "02", &klass, &mode);
rb_scan_args     2062 ext/socket/socket.c     rb_scan_args(argc, argv, "02", &type, &protocol);
rb_scan_args     2749 ext/socket/socket.c     rb_scan_args(argc, argv, "11", &addr, &type);
rb_scan_args     2798 ext/socket/socket.c     rb_scan_args(argc, argv, "11", &service, &proto);
rb_scan_args     2831 ext/socket/socket.c     rb_scan_args(argc, argv, "24", &host, &port, &family, &socktype, &protocol, &flags);
rb_scan_args     2906 ext/socket/socket.c     rb_scan_args(argc, argv, "11", &sa, &flags);
rb_scan_args      227 ext/stringio/stringio.c     switch (rb_scan_args(argc, argv, "02", &string, &mode)) {
rb_scan_args      646 ext/stringio/stringio.c     rb_scan_args(argc, argv, "11", NULL, &whence);
rb_scan_args      845 ext/stringio/stringio.c 	rb_scan_args(argc, argv, "1", &str);
rb_scan_args      212 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     1981 ext/syck/rubyext.c     if (rb_scan_args(argc, argv, "01", &options) == 0)
rb_scan_args     2023 ext/syck/rubyext.c     rb_scan_args(argc, argv, "1&", &oid, &proc);
rb_scan_args     2092 ext/syck/rubyext.c     if (rb_scan_args(argc, argv, "11", &type_id, &style) == 1) {
rb_scan_args     2111 ext/syck/rubyext.c     if (rb_scan_args(argc, argv, "11", &type_id, &style) == 1) {
rb_scan_args     2132 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     1392 ext/win32ole/win32ole.c     rb_scan_args(argc, argv, "2*", &ole, &host, &others);
rb_scan_args     1493 ext/win32ole/win32ole.c     rb_scan_args(argc, argv, "1*", &svr_name, &others);
rb_scan_args     1576 ext/win32ole/win32ole.c     rb_scan_args(argc, argv, "11", &ole, &klass);
rb_scan_args     1761 ext/win32ole/win32ole.c     rb_scan_args(argc, argv, "11", &target, &helpcontext);
rb_scan_args     1869 ext/win32ole/win32ole.c     rb_scan_args(argc, argv, "11*", &svr_name, &host, &others);
rb_scan_args     1999 ext/win32ole/win32ole.c     rb_scan_args(argc, argv, "1*", &cmd, &paramS);
rb_scan_args     5928 ext/win32ole/win32ole.c     rb_scan_args(argc, argv, "11", &ole, &itf);
rb_scan_args     6033 ext/win32ole/win32ole.c     rb_scan_args(argc, argv, "01*", &event, &args);
rb_scan_args      268 ext/zlib/zlib.c     rb_scan_args(argc, argv, "02", &str, &vsum);
rb_scan_args     1146 ext/zlib/zlib.c     rb_scan_args(argc, argv, "04", &level, &wbits, &memlevel, &strategy);
rb_scan_args     1221 ext/zlib/zlib.c     rb_scan_args(argc, argv, "11", &src, &level);
rb_scan_args     1279 ext/zlib/zlib.c     rb_scan_args(argc, argv, "11", &src, &flush);
rb_scan_args     1323 ext/zlib/zlib.c     rb_scan_args(argc, argv, "01", &v_flush);
rb_scan_args     1435 ext/zlib/zlib.c     rb_scan_args(argc, argv, "01", &wbits);
rb_scan_args     2714 ext/zlib/zlib.c     rb_scan_args(argc, argv, "12", &io, &level, &strategy);
rb_scan_args     2747 ext/zlib/zlib.c     rb_scan_args(argc, argv, "01", &v_flush);
rb_scan_args     2965 ext/zlib/zlib.c     rb_scan_args(argc, argv, "01", &vlen);
rb_scan_args     3094 ext/zlib/zlib.c 	rb_scan_args(argc, argv, "1", &rs);
rb_scan_args     1723 file.c             rb_scan_args(argc, argv, "1*", &vmode, &rest);
rb_scan_args     1797 file.c             rb_scan_args(argc, argv, "1*", &vmode, &rest);
rb_scan_args     1854 file.c             rb_scan_args(argc, argv, "2*", &o, &g, &rest);
rb_scan_args     1944 file.c             rb_scan_args(argc, argv, "2*", &o, &g, &rest);
rb_scan_args     2005 file.c             rb_scan_args(argc, argv, "2*", &atime, &mtime, &rest);
rb_scan_args     2043 file.c             rb_scan_args(argc, argv, "2*", &atime, &mtime, &rest);
rb_scan_args     2689 file.c             rb_scan_args(argc, argv, "11", &fname, &dname);
rb_scan_args     2743 file.c             if (rb_scan_args(argc, argv, "11", &fname, &fext) == 2) {
rb_scan_args     1636 gc.c               if (rb_scan_args(argc, argv, "01", &of) == 0) {
rb_scan_args     1733 gc.c               rb_scan_args(argc, argv, "11", &obj, &block);
rb_scan_args      298 hash.c         	rb_scan_args(argc, argv, "01", &ifnone);
rb_scan_args      464 hash.c             rb_scan_args(argc, argv, "11", &key, &if_none);
rb_scan_args      509 hash.c             rb_scan_args(argc, argv, "01", &key);
rb_scan_args     1726 hash.c             rb_scan_args(argc, argv, "11", &key, &if_none);
rb_scan_args      705 io.c               if (rb_scan_args(argc, argv, "11", &offset, &ptrname) == 2) {
rb_scan_args     1178 io.c               rb_scan_args(argc, argv, "11", &length, &str);
rb_scan_args     1321 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     1788 io.c           	rb_scan_args(argc, argv, "1", &rs);
rb_scan_args     1831 io.c           	rb_scan_args(argc, argv, "1", &rs);
rb_scan_args     2301 io.c               if (rb_scan_args(argc, argv, "11", &offset, &ptrname) == 2) {
rb_scan_args     2387 io.c               rb_scan_args(argc, argv, "11", &len, &str);
rb_scan_args     3083 io.c               if (rb_scan_args(argc, argv, "11", &pname, &pmode) == 1) {
rb_scan_args     3121 io.c               rb_scan_args(argc, argv, "12", &fname, &vmode, &perm);
rb_scan_args     3191 io.c               rb_scan_args(argc, argv, "12", &fname, &vmode, &perm);
rb_scan_args     3475 io.c               if (rb_scan_args(argc, argv, "11", &fname, &nmode) == 1) {
rb_scan_args     3930 io.c               if (rb_scan_args(argc, argv, "01", &out) == 0) {
rb_scan_args     4060 io.c               rb_scan_args(argc, argv, "11", &fnum, &mode);
rb_scan_args     4345 io.c           	    rb_scan_args(argc, argv, "1", &rs);
rb_scan_args     4561 io.c               rb_scan_args(argc, argv, "13", &read, &write, &except, &timeout);
rb_scan_args     4812 io.c               rb_scan_args(argc, argv, "11", &req, &arg);
rb_scan_args     4838 io.c               rb_scan_args(argc, argv, "11", &req, &arg);
rb_scan_args     5094 io.c               rb_scan_args(argc, argv, "11", &fname, &arg.sep);
rb_scan_args     5138 io.c               rb_scan_args(argc, argv, "11", &fname, &arg.sep);
rb_scan_args     5176 io.c               rb_scan_args(argc, argv, "12", &fname, &arg.sep, &offset);
rb_scan_args     5271 io.c               rb_scan_args(argc, argv, "02", &length, &str);
rb_scan_args      738 marshal.c          rb_scan_args(argc, argv, "12", &obj, &a1, &a2);
rb_scan_args     1395 marshal.c          rb_scan_args(argc, argv, "11", &port, &proc);
rb_scan_args     1950 numeric.c          rb_scan_args(argc, argv, "01", &b);
rb_scan_args     1534 object.c           if (rb_scan_args(argc, argv, "01", &super) == 0) {
rb_scan_args     1722 object.c           rb_scan_args(argc, argv, "11", &name, &pub);
rb_scan_args     1903 object.c       	rb_scan_args(argc, argv, "1", &recur);
rb_scan_args      731 process.c          rb_scan_args(argc, argv, "02", &vpid, &vflags);
rb_scan_args     1326 process.c          if (rb_scan_args(argc, argv, "01", &status) == 1) {
rb_scan_args      331 random.c           if (rb_scan_args(argc, argv, "01", &seed) == 0) {
rb_scan_args      447 random.c           rb_scan_args(argc, argv, "01", &vmax);
rb_scan_args       85 range.c            rb_scan_args(argc, argv, "21", &beg, &end, &flags);
rb_scan_args      308 range.c            if (rb_scan_args(argc, argv, "01", &step) == 0) {
rb_scan_args     1198 re.c               rb_scan_args(argc, argv, "11", &idx, &rest);
rb_scan_args     1827 re.c               rb_scan_args(argc, argv, "11", &str, &kcode);
rb_scan_args     2204 re.c               if (rb_scan_args(argc, argv, "01", &nth) == 1) {
rb_scan_args      523 ruby.h         int rb_scan_args __((int, const VALUE*, const char*, ...));
rb_scan_args      334 string.c           if (rb_scan_args(argc, argv, "01", &orig) == 1)
rb_scan_args     1107 string.c           if (rb_scan_args(argc, argv, "11", &sub, &initpos) == 2) {
rb_scan_args     1221 string.c           if (rb_scan_args(argc, argv, "11", &sub, &position) == 2) {
rb_scan_args     2497 string.c           rb_scan_args(argc, argv, "01", &b);
rb_scan_args     3479 string.c           if (rb_scan_args(argc, argv, "02", &spat, &limit) == 2) {
rb_scan_args     3674 string.c           if (rb_scan_args(argc, argv, "01", &rs) == 0) {
rb_scan_args     3875 string.c           if (rb_scan_args(argc, argv, "01", &rs) == 0) {
rb_scan_args     4426 string.c           if (rb_scan_args(argc, argv, "01", &vbits) == 0) {
rb_scan_args     4480 string.c           rb_scan_args(argc, argv, "11", &w, &pad);
rb_scan_args      309 struct.c           rb_scan_args(argc, argv, "1*", &name, &rest);
rb_scan_args      261 time.c             if (rb_scan_args(argc, argv, "11", &time, &t) == 2) {
rb_scan_args      319 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     1938 time.c             rb_scan_args(argc, argv, "01", 0);
rb_scan_args      577 variable.c         if (rb_scan_args(argc, argv, "11", &var, &cmd) == 1) {
rb_scan_args      640 variable.c         rb_scan_args(argc, argv, "11", &var, &cmd);


rb_secure

rb_secure         379 class.c        	rb_secure(4);
rb_secure         634 dir.c              rb_secure(2);
rb_secure         684 dir.c              rb_secure(4);
rb_secure         700 dir.c              rb_secure(2);
rb_secure         240 eval.c             if (!OBJ_TAINTED(obj)) rb_secure(4);
rb_secure         256 eval.c             rb_secure(4);
rb_secure         522 eval.c         	rb_secure(4);
rb_secure         604 eval.c         	rb_secure(4);
rb_secure        1962 eval.c         	rb_secure(4);
rb_secure        2071 eval.c         	rb_secure(4);
rb_secure        2548 eval.c             rb_secure(4);
rb_secure        4382 eval.c             rb_secure(4);
rb_secure        4423 eval.c             rb_secure(4);
rb_secure        6674 eval.c         	rb_secure(4);		/* should alter global state */
rb_secure        7506 eval.c             rb_secure(4);
rb_secure        11071 eval.c         	rb_secure(4);
rb_secure        11282 eval.c             rb_secure(4);
rb_secure        11367 eval.c             rb_secure(4);
rb_secure        11403 eval.c             rb_secure(4);
rb_secure        12168 eval.c         	rb_secure(4);
rb_secure        12661 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         318 ext/dbm/dbm.c      rb_secure(4);
rb_secure         566 ext/dl/dl.c      rb_secure(4);
rb_secure         573 ext/dl/dl.c      rb_secure(4);
rb_secure         597 ext/dl/dl.c      rb_secure(4);
rb_secure         666 ext/dl/dl.c      rb_secure(4);
rb_secure         141 ext/dl/handle.c   rb_secure(2);
rb_secure          29 ext/dl/ptr.c     rb_secure(4);
rb_secure          94 ext/dl/ptr.c     rb_secure(4);
rb_secure         136 ext/dl/ptr.c     rb_secure(4);
rb_secure         168 ext/dl/ptr.c     rb_secure(4);
rb_secure         852 ext/dl/ptr.c     rb_secure(4);
rb_secure          81 ext/dl/sym.c     rb_secure(4);
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         413 ext/gdbm/gdbm.c     rb_secure(4);
rb_secure          64 ext/readline/readline.c     rb_secure(4);
rb_secure         109 ext/readline/readline.c     rb_secure(4);
rb_secure         119 ext/readline/readline.c     rb_secure(4);
rb_secure         128 ext/readline/readline.c     rb_secure(4);
rb_secure         136 ext/readline/readline.c     rb_secure(4);
rb_secure         212 ext/readline/readline.c     rb_secure(4);
rb_secure         226 ext/readline/readline.c     rb_secure(4);
rb_secure         240 ext/readline/readline.c     rb_secure(4);
rb_secure         266 ext/readline/readline.c     rb_secure(4);
rb_secure         286 ext/readline/readline.c     rb_secure(4);
rb_secure         311 ext/readline/readline.c     rb_secure(4);
rb_secure         328 ext/readline/readline.c     rb_secure(4);
rb_secure         353 ext/readline/readline.c     rb_secure(4);
rb_secure         370 ext/readline/readline.c     rb_secure(4);
rb_secure         396 ext/readline/readline.c     rb_secure(4);
rb_secure         413 ext/readline/readline.c     rb_secure(4);
rb_secure         439 ext/readline/readline.c     rb_secure(4);
rb_secure         456 ext/readline/readline.c     rb_secure(4);
rb_secure         482 ext/readline/readline.c     rb_secure(4);
rb_secure         507 ext/readline/readline.c     rb_secure(4);
rb_secure         529 ext/readline/readline.c     rb_secure(4);
rb_secure         551 ext/readline/readline.c     rb_secure(4);
rb_secure         565 ext/readline/readline.c     rb_secure(4);
rb_secure         582 ext/readline/readline.c     rb_secure(4);
rb_secure         601 ext/readline/readline.c     rb_secure(4);
rb_secure         613 ext/readline/readline.c     rb_secure(4);
rb_secure         628 ext/readline/readline.c     rb_secure(4);
rb_secure         642 ext/readline/readline.c     rb_secure(4);
rb_secure         650 ext/readline/readline.c     rb_secure(4);
rb_secure         661 ext/readline/readline.c     rb_secure(4);
rb_secure         295 ext/sdbm/init.c     rb_secure(4);
rb_secure         355 ext/socket/socket.c     rb_secure(2);
rb_secure         491 ext/socket/socket.c     rb_secure(4);
rb_secure         625 ext/socket/socket.c     rb_secure(4);
rb_secure        1286 ext/socket/socket.c     rb_secure(3);
rb_secure        1314 ext/socket/socket.c     rb_secure(3);
rb_secure        1500 ext/socket/socket.c     rb_secure(3);
rb_secure        1541 ext/socket/socket.c     rb_secure(3);
rb_secure        1558 ext/socket/socket.c     rb_secure(3);
rb_secure        1588 ext/socket/socket.c     rb_secure(4);
rb_secure        2020 ext/socket/socket.c     rb_secure(3);
rb_secure        2371 ext/socket/socket.c     rb_secure(4);
rb_secure        2651 ext/socket/socket.c     rb_secure(3);
rb_secure        2669 ext/socket/socket.c     rb_secure(3);
rb_secure        2733 ext/socket/socket.c     rb_secure(3);
rb_secure         123 ext/stringio/stringio.c 	rb_secure(4);
rb_secure         364 ext/stringio/stringio.c     if (!OBJ_TAINTED(self)) rb_secure(4);
rb_secure         569 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        1489 ext/win32ole/win32ole.c     rb_secure(4);
rb_secure        1575 ext/win32ole/win32ole.c     rb_secure(4);
rb_secure        1640 ext/win32ole/win32ole.c     rb_secure(4);
rb_secure        1867 ext/win32ole/win32ole.c     rb_secure(4);
rb_secure        2555 ext/win32ole/win32ole.c     rb_secure(4);
rb_secure        3265 ext/win32ole/win32ole.c     rb_secure(4);
rb_secure        5927 ext/win32ole/win32ole.c     rb_secure(4);
rb_secure         657 file.c         	rb_secure(2);
rb_secure         806 file.c             rb_secure(2);
rb_secure        1430 file.c             rb_secure(2);
rb_secure        1722 file.c             rb_secure(2);
rb_secure        1750 file.c             rb_secure(2);
rb_secure        1796 file.c             rb_secure(2);
rb_secure        1853 file.c             rb_secure(2);
rb_secure        1894 file.c             rb_secure(2);
rb_secure        1943 file.c             rb_secure(2);
rb_secure        2201 file.c             rb_secure(2);
rb_secure        2270 file.c             rb_secure(2);
rb_secure        3013 file.c             rb_secure(2);
rb_secure        3069 file.c             rb_secure(2);
rb_secure        3176 file.c             rb_secure(2);
rb_secure        1635 gc.c               rb_secure(4);
rb_secure        1886 gc.c               rb_secure(4);
rb_secure        1653 hash.c             rb_secure(4);
rb_secure        2036 hash.c             rb_secure(4);
rb_secure        2109 hash.c             rb_secure(4);
rb_secure         548 io.c               rb_secure(4);
rb_secure        2340 io.c               rb_secure(4);
rb_secure        3474 io.c               rb_secure(4);
rb_secure        4059 io.c               rb_secure(4);
rb_secure        4722 io.c               rb_secure(2);
rb_secure        4885 io.c               rb_secure(2);
rb_secure         678 object.c           rb_secure(4);
rb_secure         700 object.c           rb_secure(3);
rb_secure         127 process.c          rb_secure(2);
rb_secure         151 process.c          rb_secure(2);
rb_secure         729 process.c          rb_secure(2);
rb_secure         804 process.c          rb_secure(2);
rb_secure         905 process.c          rb_secure(2);
rb_secure        1271 process.c          rb_secure(2);
rb_secure        1325 process.c          rb_secure(4);
rb_secure        1606 process.c          rb_secure(2);
rb_secure        1634 process.c          rb_secure(2);
rb_secure        1667 process.c          rb_secure(2);
rb_secure        1692 process.c          rb_secure(2);
rb_secure        1721 process.c          rb_secure(2);
rb_secure        1729 process.c        rb_secure(2);
rb_secure        1776 process.c          rb_secure(2);
rb_secure        1809 process.c          rb_secure(2);
rb_secure        1826 process.c          rb_secure(2);
rb_secure        1836 process.c          rb_secure(2);
rb_secure        2334 process.c          rb_secure(2);
rb_secure         330 random.c           rb_secure(4);
rb_secure         239 ruby.h         void rb_secure _((int));
rb_secure         236 signal.c           rb_secure(2);
rb_secure         710 signal.c           rb_secure(2);
rb_secure         576 variable.c         rb_secure(4);
rb_secure        1688 variable.c     	rb_secure(4);


rb_secure_update

rb_secure_update  454 ext/dl/sym.c     rb_secure_update(self);
rb_secure_update  243 ruby.h         void rb_secure_update _((VALUE));


rb_set_class_path

rb_set_class_path  265 class.c            rb_set_class_path(klass, outer, name);
rb_set_class_path  337 class.c            rb_set_class_path(module, outer, name);
rb_set_class_path 3947 eval.c         		rb_set_class_path(klass, cbase, rb_id2name(cname));
rb_set_class_path 3984 eval.c         		rb_set_class_path(module, cbase, rb_id2name(cname));
rb_set_class_path  450 intern.h       void rb_set_class_path _((VALUE, VALUE, const char*));


rb_set_end_proc

rb_set_end_proc  7663 eval.c             rb_set_end_proc(call_end_proc, rb_block_proc());
rb_set_end_proc  7697 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   188 intern.h       void rb_set_end_proc _((void (*)(VALUE), VALUE));


rb_set_kcode

rb_set_kcode      370 intern.h       void rb_set_kcode _((const char*));
rb_set_kcode     1829 re.c           	rb_set_kcode(StringValuePtr(kcode));
rb_set_kcode     2141 re.c               rb_set_kcode(StringValuePtr(val));
rb_set_kcode      628 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  643 ruby.c         		rb_set_safe_level(v);
rb_set_safe_level  742 ruby.c         	    rb_set_safe_level(v);
rb_set_safe_level 1101 ruby.c         	rb_set_safe_level(1);
rb_set_safe_level  242 ruby.h         void rb_set_safe_level _((int));


rb_setegid_core

rb_setegid_core  2969 process.c          return rb_setegid_core(NUM2INT(id));
rb_setegid_core  3227 process.c          return rb_setegid_core(id);


rb_seteuid_core

rb_seteuid_core  2855 process.c          return rb_seteuid_core(NUM2INT(id));
rb_seteuid_core  3116 process.c          return rb_seteuid_core(id);


rb_singleton_class

rb_singleton_class  899 class.c            rb_define_method(rb_singleton_class(obj), name, func, argc);
rb_singleton_class 3845 eval.c         		rb_add_method(rb_singleton_class(ruby_class),
rb_singleton_class 3869 eval.c         	    klass = rb_singleton_class(recv);
rb_singleton_class 4007 eval.c         	    klass = rb_singleton_class(result);
rb_singleton_class 6599 eval.c         	klass = rb_singleton_class(self);
rb_singleton_class 7337 eval.c         	rb_add_method(rb_singleton_class(module), id, body->nd_body, NOEX_PUBLIC);
rb_singleton_class 7409 eval.c             rb_include_module(rb_singleton_class(obj), module);
rb_singleton_class  124 intern.h       VALUE rb_singleton_class _((VALUE));


rb_singleton_class_attached

rb_singleton_class_attached  132 class.c        	rb_singleton_class_attached(RBASIC(clone)->klass, (VALUE)clone);
rb_singleton_class_attached  157 class.c            rb_singleton_class_attached(klass, obj);
rb_singleton_class_attached  103 intern.h       void rb_singleton_class_attached _((VALUE,VALUE));
rb_singleton_class_attached  298 ruby.h             rb_singleton_class_attached(RBASIC(clone)->klass, (VALUE)clone);\


rb_singleton_class_clone

rb_singleton_class_clone   68 class.c        	RBASIC(clone)->klass = rb_singleton_class_clone(orig);
rb_singleton_class_clone  120 class.c        	    RBASIC(clone)->klass = rb_singleton_class_clone(klass);
rb_singleton_class_clone  102 intern.h       VALUE rb_singleton_class_clone _((VALUE));
rb_singleton_class_clone  265 object.c           RBASIC(clone)->klass = rb_singleton_class_clone(obj);
rb_singleton_class_clone  297 ruby.h             OBJSETUP(clone,rb_singleton_class_clone((VALUE)obj),RBASIC(obj)->flags);\


rb_source_filename

rb_source_filename 1605 eval.c             ruby_sourcefile = rb_source_filename("(eval)");
rb_source_filename 7040 eval.c         		    ruby_sourcefile = rb_source_filename(RSTRING(path)->ptr);
rb_source_filename  238 intern.h       char *rb_source_filename _((const char*));
rb_source_filename 6598 parse.c            ruby_sourcefile = rb_source_filename(f);
rb_source_filename 2600 parse.y            ruby_sourcefile = rb_source_filename(f);
rb_source_filename  795 ruby.c         		script = ruby_sourcefile = rb_source_filename(script);
rb_source_filename  810 ruby.c             ruby_sourcefile = rb_source_filename(argv0);
rb_source_filename  919 ruby.c         		    ruby_sourcefile = rb_source_filename(fname);
rb_source_filename 1083 ruby.c         	ruby_sourcefile = rb_source_filename(name);
rb_source_filename 1131 ruby.c             ruby_sourcefile = rb_source_filename("ruby");


rb_stat

rb_stat           717 file.c             if (rb_stat(fname, &st) < 0) {
rb_stat           923 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
rb_stat           946 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
rb_stat          1033 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
rb_stat          1062 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
rb_stat          1085 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
rb_stat          1106 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
rb_stat          1231 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
rb_stat          1250 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
rb_stat          1269 file.c             if (rb_stat(fname, &st) < 0) return Qnil;
rb_stat          1289 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
rb_stat          1300 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
rb_stat          1321 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          1474 file.c             if (rb_stat(fname, &st) < 0)
rb_stat          1566 file.c             if (rb_stat(fname, &st) < 0)
rb_stat          1612 file.c             if (rb_stat(fname, &st) < 0)
rb_stat          1659 file.c             if (rb_stat(fname, &st) < 0)
rb_stat          3378 file.c         	if (rb_stat(argv[1], &st) == -1) {
rb_stat          3401 file.c         	if (rb_stat(argv[1], &st1) < 0) return Qfalse;
rb_stat          3402 file.c         	if (rb_stat(argv[2], &st2) < 0) return Qfalse;


rb_stat_atime

rb_stat_atime     220 file.c         static VALUE rb_stat_atime _((VALUE));
rb_stat_atime     606 file.c         	{"atime",   rb_stat_atime},
rb_stat_atime    4453 file.c             rb_define_method(rb_cStat, "atime", rb_stat_atime, 0);


rb_stat_blksize

rb_stat_blksize   218 file.c         static VALUE rb_stat_blksize _((VALUE));
rb_stat_blksize   604 file.c         	{"blksize", rb_stat_blksize},
rb_stat_blksize  4451 file.c             rb_define_method(rb_cStat, "blksize", rb_stat_blksize, 0);


rb_stat_blocks

rb_stat_blocks    219 file.c         static VALUE rb_stat_blocks _((VALUE));
rb_stat_blocks    605 file.c         	{"blocks",  rb_stat_blocks},
rb_stat_blocks   4452 file.c             rb_define_method(rb_cStat, "blocks", rb_stat_blocks, 0);


rb_stat_ctime

rb_stat_ctime     222 file.c         static VALUE rb_stat_ctime _((VALUE));
rb_stat_ctime     608 file.c         	{"ctime",   rb_stat_ctime},
rb_stat_ctime    4455 file.c             rb_define_method(rb_cStat, "ctime", rb_stat_ctime, 0);


rb_stat_dev

rb_stat_dev       210 file.c         static VALUE rb_stat_dev _((VALUE));
rb_stat_dev       596 file.c         	{"dev",	    rb_stat_dev},
rb_stat_dev      4439 file.c             rb_define_method(rb_cStat, "dev", rb_stat_dev, 0);


rb_stat_gid

rb_stat_gid       215 file.c         static VALUE rb_stat_gid _((VALUE));
rb_stat_gid       601 file.c         	{"gid",	    rb_stat_gid},
rb_stat_gid      4446 file.c             rb_define_method(rb_cStat, "gid", rb_stat_gid, 0);


rb_stat_grpowned

rb_stat_grpowned 3730 file.c             if (rb_stat_grpowned(obj))
rb_stat_grpowned 3794 file.c             if (rb_stat_grpowned(obj))
rb_stat_grpowned 3858 file.c             if (rb_stat_grpowned(obj))
rb_stat_grpowned 4472 file.c             rb_define_method(rb_cStat, "grpowned?",  rb_stat_grpowned, 0);


rb_stat_ino

rb_stat_ino       211 file.c         static VALUE rb_stat_ino _((VALUE));
rb_stat_ino       597 file.c         	{"ino",	    rb_stat_ino},
rb_stat_ino      4442 file.c             rb_define_method(rb_cStat, "ino", rb_stat_ino, 0);


rb_stat_mode

rb_stat_mode      212 file.c         static VALUE rb_stat_mode _((VALUE));
rb_stat_mode      598 file.c         	{"mode",    rb_stat_mode},
rb_stat_mode     4443 file.c             rb_define_method(rb_cStat, "mode", rb_stat_mode, 0);


rb_stat_mtime

rb_stat_mtime     221 file.c         static VALUE rb_stat_mtime _((VALUE));
rb_stat_mtime     607 file.c         	{"mtime",   rb_stat_mtime},
rb_stat_mtime    4454 file.c             rb_define_method(rb_cStat, "mtime", rb_stat_mtime, 0);


rb_stat_nlink

rb_stat_nlink     213 file.c         static VALUE rb_stat_nlink _((VALUE));
rb_stat_nlink     599 file.c         	{"nlink",   rb_stat_nlink},
rb_stat_nlink    4444 file.c             rb_define_method(rb_cStat, "nlink", rb_stat_nlink, 0);


rb_stat_owned

rb_stat_owned    3726 file.c             if (rb_stat_owned(obj))
rb_stat_owned    3790 file.c             if (rb_stat_owned(obj))
rb_stat_owned    3854 file.c             if (rb_stat_owned(obj))
rb_stat_owned    4471 file.c             rb_define_method(rb_cStat, "owned?",  rb_stat_owned, 0);


rb_stat_rdev

rb_stat_rdev      216 file.c         static VALUE rb_stat_rdev _((VALUE));
rb_stat_rdev      602 file.c         	{"rdev",    rb_stat_rdev},
rb_stat_rdev     4447 file.c             rb_define_method(rb_cStat, "rdev", rb_stat_rdev, 0);


rb_stat_rowned

rb_stat_rowned   3759 file.c             if (rb_stat_rowned(obj))
rb_stat_rowned   3821 file.c             if (rb_stat_rowned(obj))
rb_stat_rowned   3883 file.c             if (rb_stat_rowned(obj))


rb_stat_s_alloc

rb_stat_s_alloc  3439 file.c         static VALUE rb_stat_s_alloc _((VALUE));
rb_stat_s_alloc  4431 file.c             rb_define_alloc_func(rb_cStat,  rb_stat_s_alloc);


rb_stat_size

rb_stat_size      217 file.c         static VALUE rb_stat_size _((VALUE));
rb_stat_size      603 file.c         	{"size",    rb_stat_size},
rb_stat_size     4450 file.c             rb_define_method(rb_cStat, "size", rb_stat_size, 0);


rb_stat_uid

rb_stat_uid       214 file.c         static VALUE rb_stat_uid _((VALUE));
rb_stat_uid       600 file.c         	{"uid",	    rb_stat_uid},
rb_stat_uid      4445 file.c             rb_define_method(rb_cStat, "uid", rb_stat_uid, 0);


rb_str2cstr

rb_str2cstr       281 ruby.h         char *rb_str2cstr _((VALUE,long*));
rb_str2cstr       283 ruby.h         #define STR2CSTR(x) rb_str2cstr((VALUE)(x),0)


rb_str_append

rb_str_append    1592 eval.c         	rb_str_append(str, rb_obj_as_string(ruby_errinfo));
rb_str_append    3758 eval.c         		    rb_str_append(str, str2);
rb_str_append     671 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     469 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     338 ext/strscan/strscan.c     rb_str_append(p->str, str);
rb_str_append    1110 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     637 file.c         	    rb_str_append(str, rb_inspect(v));
rb_str_append     422 intern.h       VALUE rb_str_append _((VALUE, VALUE));
rb_str_append    5292 io.c               else if (!NIL_P(tmp)) rb_str_append(str, tmp);
rb_str_append     400 object.c           rb_str_append(str, str2);
rb_str_append    1270 object.c       	    rb_str_append(s, rb_inspect(v));
rb_str_append    1273 object.c       	    rb_str_append(s, rb_any_to_s(v));
rb_str_append     520 range.c            rb_str_append(str, str2);
rb_str_append     546 range.c            rb_str_append(str, str2);
rb_str_append     846 string.c           str1 = rb_str_append(str1, str2);
rb_str_append     496 struct.c       	    rb_str_append(str, rb_inspect(slot));
rb_str_append     499 struct.c       	rb_str_append(str, rb_inspect(RSTRUCT(s)->ptr[i]));
rb_str_append      57 variable.c     	    rb_str_append(tmp, path);
rb_str_append      63 variable.c     	rb_str_append(tmp, path);


rb_str_aref_m

rb_str_aref_m    1895 string.c           result = rb_str_aref_m(argc, buf, str);
rb_str_aref_m    4647 string.c           rb_define_method(rb_cString, "[]", rb_str_aref_m, -1);
rb_str_aref_m    4748 string.c           rb_define_method(rb_cString, "slice", rb_str_aref_m, -1);


rb_str_aset_m

rb_str_aset_m    1897 string.c       	rb_str_aset_m(argc+1, buf, str);
rb_str_aset_m    4648 string.c           rb_define_method(rb_cString, "[]=", rb_str_aset_m, -1);


rb_str_associate

rb_str_associate  431 intern.h       void rb_str_associate _((VALUE, VALUE));
rb_str_associate 1000 pack.c         	rb_str_associate(res, associates);


rb_str_associated

rb_str_associated  432 intern.h       VALUE rb_str_associated _((VALUE));
rb_str_associated 1884 pack.c         		    if (!(a = rb_str_associated(str))) {
rb_str_associated 1926 pack.c         			if (!(a = rb_str_associated(str))) {


rb_str_buf_append

rb_str_buf_append 1287 array.c        	    rb_str_buf_append(result, sep);
rb_str_buf_append 1288 array.c        	rb_str_buf_append(result, tmp);
rb_str_buf_append 1435 array.c        	rb_str_buf_append(str, s);
rb_str_buf_append  450 error.c            rb_str_buf_append(str, klass);
rb_str_buf_append  452 error.c            rb_str_buf_append(str, exc);
rb_str_buf_append 9231 eval.c         	    rb_str_buf_append(str, rb_inspect(data->klass));
rb_str_buf_append 9234 eval.c         	    rb_str_buf_append(str, rb_inspect(v));
rb_str_buf_append 9238 eval.c         	    rb_str_buf_append(str, rb_inspect(data->recv));
rb_str_buf_append 9240 eval.c         	    rb_str_buf_append(str, rb_inspect(v));
rb_str_buf_append  833 ext/iconv/iconv.c     str = rb_str_buf_append(str, rb_inspect(success));
rb_str_buf_append  835 ext/iconv/iconv.c     str = rb_str_buf_append(str, rb_inspect(failed));
rb_str_buf_append 2963 file.c         		rb_str_buf_append(result, sep);
rb_str_buf_append 2966 file.c         	rb_str_buf_append(result, tmp);
rb_str_buf_append 1209 hash.c             rb_str_buf_append(str, str2);
rb_str_buf_append 1213 hash.c             rb_str_buf_append(str, str2);
rb_str_buf_append 2146 hash.c         	    rb_str_buf_append(str, i);
rb_str_buf_append  405 intern.h       VALUE rb_str_buf_append _((VALUE, VALUE));
rb_str_buf_append 1954 re.c                       rb_str_buf_append(source, v);
rb_str_buf_append  811 string.c       	    return rb_str_buf_append(str, str2);


rb_str_buf_cat

rb_str_buf_cat    451 error.c            rb_str_buf_cat(str, ": ", 2);
rb_str_buf_cat    453 error.c            rb_str_buf_cat(str, ">", 1);
rb_str_buf_cat   1590 eval.c             rb_str_buf_cat(str, "\n", 1);
rb_str_buf_cat    453 ext/iconv/iconv.c 			ret = rb_str_buf_cat(ret, instart, tmpstart - instart);
rb_str_buf_cat    459 ext/iconv/iconv.c 		    ret = rb_str_buf_cat(ret, buffer, outlen);
rb_str_buf_cat    832 ext/iconv/iconv.c     str = rb_str_buf_cat(str, ": ", 2);
rb_str_buf_cat    834 ext/iconv/iconv.c     str = rb_str_buf_cat(str, ", ", 2);
rb_str_buf_cat    836 ext/iconv/iconv.c     return rb_str_buf_cat(str, ">", 1);
rb_str_buf_cat    491 ext/zlib/zlib.c 	rb_str_buf_cat(z->buf, src, len);
rb_str_buf_cat    594 ext/zlib/zlib.c 	rb_str_buf_cat(z->input, src, len);
rb_str_buf_cat    598 ext/zlib/zlib.c 	rb_str_buf_cat(z->input, src, len);
rb_str_buf_cat   2143 hash.c         	    rb_str_buf_cat(str, *env, s-*env);
rb_str_buf_cat    406 intern.h       VALUE rb_str_buf_cat _((VALUE, const char*, long));
rb_str_buf_cat   1413 io.c           		rb_str_buf_cat(str, &ch, 1);
rb_str_buf_cat    128 marshal.c          rb_str_buf_cat(buf, s, n);
rb_str_buf_cat    530 pack.c         		    rb_str_buf_cat(res, ptr, len);
rb_str_buf_cat    532 pack.c         			rb_str_buf_cat(res, nul10, 1);
rb_str_buf_cat    535 pack.c         		    rb_str_buf_cat(res, ptr, plen);
rb_str_buf_cat    538 pack.c         			rb_str_buf_cat(res, (type == 'A')?spc10:nul10, 10);
rb_str_buf_cat    541 pack.c         		    rb_str_buf_cat(res, (type == 'A')?spc10:nul10, len);
rb_str_buf_cat    561 pack.c         			    rb_str_buf_cat(res, &c, 1);
rb_str_buf_cat    569 pack.c         			rb_str_buf_cat(res, &c, 1);
rb_str_buf_cat    591 pack.c         			    rb_str_buf_cat(res, &c, 1);
rb_str_buf_cat    599 pack.c         			rb_str_buf_cat(res, &c, 1);
rb_str_buf_cat    624 pack.c         			    rb_str_buf_cat(res, &c, 1);
rb_str_buf_cat    630 pack.c         			rb_str_buf_cat(res, &c, 1);
rb_str_buf_cat    655 pack.c         			    rb_str_buf_cat(res, &c, 1);
rb_str_buf_cat    661 pack.c         			rb_str_buf_cat(res, &c, 1);
rb_str_buf_cat    677 pack.c         		rb_str_buf_cat(res, &c, sizeof(char));
rb_str_buf_cat    688 pack.c         		rb_str_buf_cat(res, OFF16(&s), NATINT_LEN(short,2));
rb_str_buf_cat    699 pack.c         		rb_str_buf_cat(res, OFF32(&i), NATINT_LEN(int,4));
rb_str_buf_cat    710 pack.c         		rb_str_buf_cat(res, OFF32(&l), NATINT_LEN(long,4));
rb_str_buf_cat    721 pack.c         		rb_str_buf_cat(res, (char*)&tmp, QUAD_SIZE);
rb_str_buf_cat    732 pack.c         		rb_str_buf_cat(res, OFF16(&s), NATINT_LEN(short,2));
rb_str_buf_cat    743 pack.c         		rb_str_buf_cat(res, OFF32(&l), NATINT_LEN(long,4));
rb_str_buf_cat    754 pack.c         		rb_str_buf_cat(res, OFF16(&s), NATINT_LEN(short,2));
rb_str_buf_cat    765 pack.c         		rb_str_buf_cat(res, OFF32(&l), NATINT_LEN(long,4));
rb_str_buf_cat    776 pack.c         		rb_str_buf_cat(res, (char*)&f, sizeof(float));
rb_str_buf_cat    788 pack.c         		rb_str_buf_cat(res, (char*)&f, sizeof(float));
rb_str_buf_cat    800 pack.c         		rb_str_buf_cat(res, (char*)&d, sizeof(double));
rb_str_buf_cat    811 pack.c         		rb_str_buf_cat(res, (char*)&d, sizeof(double));
rb_str_buf_cat    823 pack.c         		rb_str_buf_cat(res, (char*)&f, sizeof(float));
rb_str_buf_cat    835 pack.c         		rb_str_buf_cat(res, (char*)&d, sizeof(double));
rb_str_buf_cat    842 pack.c         		rb_str_buf_cat(res, nul10, 10);
rb_str_buf_cat    845 pack.c         	    rb_str_buf_cat(res, nul10, len);
rb_str_buf_cat    881 pack.c         		rb_str_buf_cat(res, (char*)buf, le);
rb_str_buf_cat    941 pack.c         		rb_str_buf_cat(res, (char*)&t, sizeof(char*));
rb_str_buf_cat    957 pack.c         			rb_str_buf_cat(buf, &c, sizeof(char));
rb_str_buf_cat    972 pack.c         		    rb_str_buf_cat(buf, &c, sizeof(char));
rb_str_buf_cat    985 pack.c         		    rb_str_buf_cat(res, RSTRING(buf)->ptr, RSTRING(buf)->len);
rb_str_buf_cat    989 pack.c         		    rb_str_buf_cat(res, &c, sizeof(char));
rb_str_buf_cat   1050 pack.c             rb_str_buf_cat(str, buff, i);
rb_str_buf_cat   1096 pack.c         	    rb_str_buf_cat(str, buff, i);
rb_str_buf_cat   1106 pack.c         	rb_str_buf_cat(str, buff, i);
rb_str_buf_cat    289 re.c           	rb_str_buf_cat(str, s, len);
rb_str_buf_cat    296 re.c           		rb_str_buf_cat(str, p, n);
rb_str_buf_cat    302 re.c           		rb_str_buf_cat(str, &c, 1);
rb_str_buf_cat    303 re.c           		rb_str_buf_cat(str, p, 1);
rb_str_buf_cat    306 re.c           	    	rb_str_buf_cat(str, p, mbclen(*p));
rb_str_buf_cat    311 re.c           		rb_str_buf_cat(str, p, 1);
rb_str_buf_cat    317 re.c           		rb_str_buf_cat(str, b, 4);
rb_str_buf_cat    320 re.c           		rb_str_buf_cat(str, p, 1);
rb_str_buf_cat   2020 re.c           	    rb_str_buf_cat(val, p, ss-p);
rb_str_buf_cat   2023 re.c           	    rb_str_buf_cat(val, p, ss-p);
rb_str_buf_cat   2038 re.c           	    rb_str_buf_cat(val, RSTRING(src)->ptr, BEG(0));
rb_str_buf_cat   2042 re.c           	    rb_str_buf_cat(val, RSTRING(src)->ptr+END(0), RSTRING(src)->len-END(0));
rb_str_buf_cat   2052 re.c           	    rb_str_buf_cat(val, s-1, 1);
rb_str_buf_cat   2056 re.c           	    rb_str_buf_cat(val, s-2, 2);
rb_str_buf_cat   2063 re.c           	    rb_str_buf_cat(val, RSTRING(src)->ptr+BEG(no), END(no)-BEG(no));
rb_str_buf_cat   2070 re.c           	    rb_str_buf_cat(val, p, e-p);
rb_str_buf_cat   2073 re.c           	    rb_str_buf_cat(val, p, e-p);
rb_str_buf_cat    246 string.c           rb_str_buf_cat(str, ptr, len);
rb_str_buf_cat    733 string.c           return rb_str_buf_cat(str, ptr, strlen(ptr));
rb_str_buf_cat    754 string.c           return rb_str_buf_cat(str, ptr, len);
rb_str_buf_cat   2575 string.c       	    rb_str_buf_cat(result, p - 1, len);
rb_str_buf_cat   2580 string.c       	    rb_str_buf_cat(result, s, 2);
rb_str_buf_cat   2584 string.c       	    rb_str_buf_cat(result, s, 1);
rb_str_buf_cat   2588 string.c       	    rb_str_buf_cat(result, s, 2);
rb_str_buf_cat   2592 string.c       	    rb_str_buf_cat(result, s, 2);
rb_str_buf_cat   2596 string.c       	    rb_str_buf_cat(result, s, 2);
rb_str_buf_cat   2600 string.c       	    rb_str_buf_cat(result, s, 2);
rb_str_buf_cat   2604 string.c       	    rb_str_buf_cat(result, s, 2);
rb_str_buf_cat   2608 string.c       	    rb_str_buf_cat(result, s, 2);
rb_str_buf_cat   2612 string.c       	    rb_str_buf_cat(result, s, 2);


rb_str_buf_cat2

rb_str_buf_cat2  1434 array.c        	if (i > 0) rb_str_buf_cat2(str, ", ");
rb_str_buf_cat2  1437 array.c            rb_str_buf_cat2(str, "]");
rb_str_buf_cat2  1587 eval.c         	rb_str_buf_cat2(str, " in ");
rb_str_buf_cat2  1588 eval.c         	rb_str_buf_cat2(str, at);
rb_str_buf_cat2  9224 eval.c             rb_str_buf_cat2(str, s);
rb_str_buf_cat2  9225 eval.c             rb_str_buf_cat2(str, ": ");
rb_str_buf_cat2  9239 eval.c         	    rb_str_buf_cat2(str, "(");
rb_str_buf_cat2  9241 eval.c         	    rb_str_buf_cat2(str, ")");
rb_str_buf_cat2  9246 eval.c         	rb_str_buf_cat2(str, rb_class2name(data->rklass));
rb_str_buf_cat2  9248 eval.c         	    rb_str_buf_cat2(str, "(");
rb_str_buf_cat2  9249 eval.c         	    rb_str_buf_cat2(str, rb_class2name(data->klass));
rb_str_buf_cat2  9250 eval.c         	    rb_str_buf_cat2(str, ")");
rb_str_buf_cat2  9253 eval.c             rb_str_buf_cat2(str, sharp);
rb_str_buf_cat2  9254 eval.c             rb_str_buf_cat2(str, rb_id2name(data->oid));
rb_str_buf_cat2  9255 eval.c             rb_str_buf_cat2(str, ">");
rb_str_buf_cat2   831 ext/iconv/iconv.c     VALUE str = rb_str_buf_cat2(rb_str_new2("#<"), cname);
rb_str_buf_cat2   612 file.c             rb_str_buf_cat2(str, rb_obj_classname(self));
rb_str_buf_cat2   613 file.c             rb_str_buf_cat2(str, " ");
rb_str_buf_cat2   619 file.c         	    rb_str_buf_cat2(str, ", ");
rb_str_buf_cat2   621 file.c         	rb_str_buf_cat2(str, member[i].name);
rb_str_buf_cat2   622 file.c         	rb_str_buf_cat2(str, "=");
rb_str_buf_cat2   628 file.c         	    rb_str_buf_cat2(str, buf);
rb_str_buf_cat2   634 file.c         	    rb_str_buf_cat2(str, buf);
rb_str_buf_cat2   640 file.c             rb_str_buf_cat2(str, ">");
rb_str_buf_cat2  1211 hash.c             rb_str_buf_cat2(str, "=>");
rb_str_buf_cat2  1227 hash.c             rb_str_buf_cat2(str, "}");
rb_str_buf_cat2  2139 hash.c         	    rb_str_buf_cat2(str, ", ");
rb_str_buf_cat2  2142 hash.c         	    rb_str_buf_cat2(str, "\"");
rb_str_buf_cat2  2144 hash.c         	    rb_str_buf_cat2(str, "\"=>");
rb_str_buf_cat2  2151 hash.c             rb_str_buf_cat2(str, "}");
rb_str_buf_cat2   407 intern.h       VALUE rb_str_buf_cat2 _((VALUE, const char*));
rb_str_buf_cat2   336 re.c               rb_str_buf_cat2(str, "/");
rb_str_buf_cat2   340 re.c           	    rb_str_buf_cat2(str, "m");
rb_str_buf_cat2   342 re.c           	    rb_str_buf_cat2(str, "i");
rb_str_buf_cat2   344 re.c           	    rb_str_buf_cat2(str, "x");
rb_str_buf_cat2   349 re.c           		rb_str_buf_cat2(str, "n");
rb_str_buf_cat2   352 re.c           		rb_str_buf_cat2(str, "e");
rb_str_buf_cat2   355 re.c           		rb_str_buf_cat2(str, "s");
rb_str_buf_cat2   358 re.c           		rb_str_buf_cat2(str, "u");
rb_str_buf_cat2   501 re.c               if (options & RE_OPTION_MULTILINE) rb_str_buf_cat2(str, "m");
rb_str_buf_cat2   502 re.c               if (options & RE_OPTION_IGNORECASE) rb_str_buf_cat2(str, "i");
rb_str_buf_cat2   503 re.c               if (options & RE_OPTION_EXTENDED) rb_str_buf_cat2(str, "x");
rb_str_buf_cat2   506 re.c           	rb_str_buf_cat2(str, "-");
rb_str_buf_cat2   507 re.c           	if (!(options & RE_OPTION_MULTILINE)) rb_str_buf_cat2(str, "m");
rb_str_buf_cat2   508 re.c           	if (!(options & RE_OPTION_IGNORECASE)) rb_str_buf_cat2(str, "i");
rb_str_buf_cat2   509 re.c           	if (!(options & RE_OPTION_EXTENDED)) rb_str_buf_cat2(str, "x");
rb_str_buf_cat2   512 re.c               rb_str_buf_cat2(str, ":");
rb_str_buf_cat2   514 re.c               rb_str_buf_cat2(str, ")");
rb_str_buf_cat2  1932 re.c                           rb_str_buf_cat2(source, "|");
rb_str_buf_cat2  2616 string.c       	    rb_str_buf_cat2(result, s);
rb_str_buf_cat2  2619 string.c           rb_str_buf_cat2(result, "\"");


rb_str_buf_new

rb_str_buf_new   1265 array.c            result = rb_str_buf_new(len);
rb_str_buf_new    490 ext/zlib/zlib.c 	z->buf = rb_str_buf_new(len);
rb_str_buf_new    593 ext/zlib/zlib.c 	z->input = rb_str_buf_new(len);
rb_str_buf_new   2935 file.c             result = rb_str_buf_new(len);
rb_str_buf_new    403 intern.h       VALUE rb_str_buf_new _((long));
rb_str_buf_new   1400 io.c           		*strp = str = rb_str_buf_new(len);
rb_str_buf_new   1416 io.c           		*strp = str = rb_str_buf_new(1);
rb_str_buf_new    755 marshal.c      	arg.str = rb_str_buf_new(0);
rb_str_buf_new    762 marshal.c      	port = rb_str_buf_new(0);
rb_str_buf_new    458 pack.c             res = rb_str_buf_new(0);
rb_str_buf_new   1927 re.c                   VALUE source = rb_str_buf_new(0);
rb_str_buf_new   2019 re.c           	    val = rb_str_buf_new(ss-p);
rb_str_buf_new   2069 re.c           	    val = rb_str_buf_new(e-p);
rb_str_buf_new    261 sprintf.c          result = rb_str_buf_new(bsiz);
rb_str_buf_new    245 string.c           str = rb_str_buf_new(len);


rb_str_buf_new2

rb_str_buf_new2  1430 array.c            str = rb_str_buf_new2("[");
rb_str_buf_new2   448 error.c            str = rb_str_buf_new2("#<");
rb_str_buf_new2  1585 eval.c             str = rb_str_buf_new2("compile error");
rb_str_buf_new2  9222 eval.c             str = rb_str_buf_new2("#<");
rb_str_buf_new2   611 file.c             str = rb_str_buf_new2("#<");
rb_str_buf_new2  1225 hash.c             str = rb_str_buf_new2("{");
rb_str_buf_new2  2131 hash.c             VALUE str = rb_str_buf_new2("{");
rb_str_buf_new2   404 intern.h       VALUE rb_str_buf_new2 _((const char*));
rb_str_buf_new2   333 re.c               VALUE str = rb_str_buf_new2("/");
rb_str_buf_new2   437 re.c               VALUE str = rb_str_buf_new2("(?");
rb_str_buf_new2  2567 string.c           VALUE result = rb_str_buf_new2("\"");
rb_str_buf_new2   478 struct.c           str = rb_str_buf_new2("#<struct ");


rb_str_capitalize_bang

rb_str_capitalize_bang 2896 string.c           rb_str_capitalize_bang(str);
rb_str_capitalize_bang 4678 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        223 ext/dl/sym.c         rb_str_cat(val, " ", 1);
rb_str_cat        231 ext/dl/sym.c       rb_str_cat(val, "(", 1);
rb_str_cat        237 ext/dl/sym.c   	rb_str_cat(val, ", ", 2);
rb_str_cat        240 ext/dl/sym.c       rb_str_cat(val, ");", 2);
rb_str_cat        479 ext/iconv/iconv.c 		rb_str_cat(ret, instart, inptr - instart);
rb_str_cat        502 ext/iconv/iconv.c 	rb_str_cat(ret, instart, inptr - instart);
rb_str_cat       1012 ext/stringio/stringio.c 	rb_str_cat(ptr->string, RSTRING(str)->ptr, len);
rb_str_cat       1890 ext/syck/rubyext.c         rb_str_cat( dest, str, len );
rb_str_cat        548 ext/win32ole/win32ole.c         rb_str_cat(error_msg, pSource, strlen(pSource));
rb_str_cat        551 ext/win32ole/win32ole.c         rb_str_cat(error_msg, "<Unknown>", 9);
rb_str_cat       3085 ext/win32ole/win32ole.c            rb_str_cat(type, ",", 1);
rb_str_cat       2830 file.c         	rb_str_cat(dirname, skiproot(name + 2), p - skiproot(name + 2));
rb_str_cat       2837 file.c         	rb_str_cat(dirname, ".", 1);
rb_str_cat        420 intern.h       VALUE rb_str_cat _((VALUE, const char*, long));
rb_str_cat       1446 io.c           		    rb_str_cat(str, buf, cnt);
rb_str_cat       1465 io.c           	    rb_str_cat(str, &ch, 1);
rb_str_cat       7294 parse.c        		rb_str_cat(str, p, pend - p);
rb_str_cat       7297 parse.c        	    if (pend < lex_pend) rb_str_cat(str, "\n", 1);
rb_str_cat       3296 parse.y        		rb_str_cat(str, p, pend - p);
rb_str_cat       3299 parse.y        	    if (pend < lex_pend) rb_str_cat(str, "\n", 1);
rb_str_cat        519 range.c            rb_str_cat(str, "...", EXCL(range)?3:2);
rb_str_cat        545 range.c            rb_str_cat(str, "...", EXCL(range)?3:2);
rb_str_cat        409 ruby.c         			rb_str_cat(name_error[0], s, p - s);
rb_str_cat        762 string.c           return rb_str_cat(str, ptr, strlen(ptr));
rb_str_cat        843 string.c       	    return rb_str_cat(str1, &c, 1);
rb_str_cat       1845 time.c         	    rb_str_cat(str, buf, len);
rb_str_cat       1852 time.c         	    if (p > fmt) rb_str_cat(str, fmt, p - fmt);
rb_str_cat        175 util.c             rb_str_cat(str, suffix, extlen);


rb_str_cat2

rb_str_cat2       755 error.c        	    rb_str_cat2(d, ":");
rb_str_cat2       756 error.c        	    rb_str_cat2(d, rb_obj_classname(obj));
rb_str_cat2      1557 error.c        	    rb_str_cat2(str, "\n");
rb_str_cat2      1558 error.c        	    rb_str_cat2(str, s);
rb_str_cat2      6950 eval.c         	    rb_str_cat2(tmp, DLEXT);
rb_str_cat2       226 ext/dl/sym.c         rb_str_cat2(val, sym->name);
rb_str_cat2       229 ext/dl/sym.c         rb_str_cat2(val, "(null)");
rb_str_cat2       235 ext/dl/sym.c         rb_str_cat2(val, ty);
rb_str_cat2       245 ext/dl/sym.c         rb_str_cat2(val, sym->name);
rb_str_cat2       248 ext/dl/sym.c         rb_str_cat2(val, "(null)");
rb_str_cat2       250 ext/dl/sym.c       rb_str_cat2(val, ")()");
rb_str_cat2       320 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       470 ext/openssl/ossl_ssl.c             if (i < RARRAY(v)->len-1) rb_str_cat2(str, ":");
rb_str_cat2       833 ext/openssl/ossl_ssl.c         rb_str_cat2(ret, ": ");
rb_str_cat2       834 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       516 ext/win32ole/win32ole.c             rb_str_cat2(msg, p_msg);
rb_str_cat2       553 ext/win32ole/win32ole.c     rb_str_cat2(error_msg, "\n      ");
rb_str_cat2       555 ext/win32ole/win32ole.c         rb_str_cat2(error_msg, pDescription);
rb_str_cat2       558 ext/win32ole/win32ole.c         rb_str_cat2(error_msg, "<No Description>");
rb_str_cat2      1347 ext/win32ole/win32ole.c     rb_str_cat2(subkey, "\\CLSID");
rb_str_cat2      4063 file.c         	rb_str_cat2(newpath, "/");
rb_str_cat2      4064 file.c         	rb_str_cat2(newpath, p0);
rb_str_cat2      4176 file.c         	    rb_str_cat2(fname, ext[i]);
rb_str_cat2      4197 file.c         	    rb_str_cat2(fname, ext[j]);
rb_str_cat2      1206 hash.c         	rb_str_cat2(str, ", ");
rb_str_cat2       421 intern.h       VALUE rb_str_cat2 _((VALUE, const char*));
rb_str_cat2      4261 io.c           			rb_str_cat2(str, ruby_inplace_mode);
rb_str_cat2       391 object.c       	rb_str_cat2(str, " ");
rb_str_cat2       394 object.c       	rb_str_cat2(str, ", ");
rb_str_cat2       397 object.c           rb_str_cat2(str, ivname);
rb_str_cat2       398 object.c           rb_str_cat2(str, "=");
rb_str_cat2       411 object.c           rb_str_cat2(str, ">");
rb_str_cat2      1267 object.c       	rb_str_cat2(s, "Class:");
rb_str_cat2      1276 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       406 ruby.c         			rb_str_cat2(name_error[0], s);
rb_str_cat2       576 ruby.c         	    rb_str_cat2(e_script, s);
rb_str_cat2       577 ruby.c         	    rb_str_cat2(e_script, "\n");
rb_str_cat2       479 struct.c           rb_str_cat2(str, cname);
rb_str_cat2       480 struct.c           rb_str_cat2(str, " ");
rb_str_cat2       487 struct.c       	    rb_str_cat2(str, ", ");
rb_str_cat2       493 struct.c       	    rb_str_cat2(str, p);
rb_str_cat2       498 struct.c       	rb_str_cat2(str, "=");
rb_str_cat2       501 struct.c           rb_str_cat2(str, ">");
rb_str_cat2        56 variable.c     	    rb_str_cat2(tmp, "::");
rb_str_cat2        62 variable.c     	rb_str_cat2(tmp, "::");
rb_str_cat2       231 variable.c     	rb_str_cat2(str, "::");
rb_str_cat2       232 variable.c     	rb_str_cat2(str, name);


rb_str_chomp_bang

rb_str_chomp_bang 3963 string.c           rb_str_chomp_bang(argc, argv, str);
rb_str_chomp_bang 3987 string.c           return rb_str_chomp_bang(argc, argv, uscore_get());
rb_str_chomp_bang 4015 string.c           if (NIL_P(rb_str_chomp_bang(argc, argv, dup)))
rb_str_chomp_bang 4711 string.c           rb_define_method(rb_cString, "chomp!", rb_str_chomp_bang, -1);


rb_str_chop_bang

rb_str_chop_bang 3795 string.c           rb_str_chop_bang(str);
rb_str_chop_bang 3821 string.c           return rb_str_chop_bang(uscore_get());
rb_str_chop_bang 3849 string.c       	rb_str_chop_bang(str);
rb_str_chop_bang 4710 string.c           rb_define_method(rb_cString, "chop!", rb_str_chop_bang, 0);


rb_str_cmp

rb_str_cmp       1591 array.c        	if (TYPE(b) == T_STRING) return rb_str_cmp(a, b);
rb_str_cmp        285 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       1174 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       1229 ext/win32ole/win32ole.c             if (rb_str_cmp(typelib, ole) == 0) {
rb_str_cmp       2867 ext/win32ole/win32ole.c         if (SUCCEEDED(hr) && rb_str_cmp(WC2VSTR(bstr), type) == 0) {
rb_str_cmp       3424 ext/win32ole/win32ole.c         if (rb_str_cmp(oleclass, typelib) == 0) {
rb_str_cmp       4678 ext/win32ole/win32ole.c             if (rb_str_cmp(method_name, name) == 0) {
rb_str_cmp       5427 ext/win32ole/win32ole.c                  rb_str_cmp(ev, event_name) == 0) {
rb_str_cmp       5455 ext/win32ole/win32ole.c         else if (rb_str_cmp(ev, event_name) == 0) {
rb_str_cmp         68 hash.c         	return rb_str_cmp(a, b);
rb_str_cmp        425 intern.h       int rb_str_cmp _((VALUE, VALUE));
rb_str_cmp        944 string.c       	rb_str_cmp(str1, str2) == 0) {
rb_str_cmp       1022 string.c       	result = rb_str_cmp(str1, str2);
rb_str_cmp       1454 string.c           n = rb_str_cmp(beg, end);


rb_str_concat

rb_str_concat     484 ext/iconv/iconv.c 		    rb_str_concat(ret, RARRAY(rescue)->ptr[0]);
rb_str_concat     493 ext/iconv/iconv.c 		rb_str_concat(ret, rescue);
rb_str_concat    1346 ext/win32ole/win32ole.c     rb_str_concat(subkey, com);
rb_str_concat    3086 ext/win32ole/win32ole.c            rb_str_concat(type, ole_typedesc2val(pTypeInfo, p, typedetails));
rb_str_concat    3208 ext/win32ole/win32ole.c         rb_str_concat(str, rb_fix2str(INT2FIX(pTypeDesc->vt), 10));
rb_str_concat     423 intern.h       VALUE rb_str_concat _((VALUE, VALUE));
rb_str_concat    8692 parse.c        	    rb_str_concat(head->nd_lit, tail->nd_lit);
rb_str_concat    8702 parse.c        	    rb_str_concat(head->nd_lit, tail->nd_lit);
rb_str_concat    4694 parse.y        	    rb_str_concat(head->nd_lit, tail->nd_lit);
rb_str_concat    4704 parse.y        	    rb_str_concat(head->nd_lit, tail->nd_lit);
rb_str_concat    4686 string.c           rb_define_method(rb_cString, "concat", rb_str_concat, 1);
rb_str_concat    4687 string.c           rb_define_method(rb_cString, "<<", rb_str_concat, 1);


rb_str_delete_bang

rb_str_delete_bang 2999 string.c       static VALUE rb_str_delete_bang _((int,VALUE*,VALUE));
rb_str_delete_bang 3021 string.c       	return rb_str_delete_bang(1, &src, str);
rb_str_delete_bang 3246 string.c           rb_str_delete_bang(argc, argv, str);
rb_str_delete_bang 4724 string.c           rb_define_method(rb_cString, "delete!", rb_str_delete_bang, -1);


rb_str_downcase_bang

rb_str_downcase_bang 2833 string.c           rb_str_downcase_bang(str);
rb_str_downcase_bang 4677 string.c           rb_define_method(rb_cString, "downcase!", rb_str_downcase_bang, 0);


rb_str_dump

rb_str_dump      1154 ext/strscan/strscan.c     return rb_str_dump(rb_str_new(buf, bp - buf));
rb_str_dump      1175 ext/strscan/strscan.c     return rb_str_dump(rb_str_new(buf, bp - buf));
rb_str_dump       429 intern.h       VALUE rb_str_dump _((VALUE));
rb_str_dump      1178 object.c       	str = rb_str_dump(str);
rb_str_dump      4669 string.c           rb_define_method(rb_cString, "dump", rb_str_dump, 0);


rb_str_dup

rb_str_dup        445 error.c        	return rb_str_dup(rb_class_name(klass));
rb_str_dup        399 ext/dbm/dbm.c          ret = rb_protect(rb_yield, rb_assoc_new(rb_str_dup(keystr), valstr), &status);
rb_str_dup        378 ext/sdbm/init.c         ret = rb_protect(rb_yield, rb_assoc_new(rb_str_dup(keystr), valstr), &status);
rb_str_dup        309 ext/strscan/strscan.c     p->str = rb_str_dup(str);
rb_str_dup       2273 ext/zlib/zlib.c     str = rb_str_dup(gz->z.input);
rb_str_dup       2420 ext/zlib/zlib.c 	str = rb_str_dup(str);
rb_str_dup       2436 ext/zlib/zlib.c 	str = rb_str_dup(str);
rb_str_dup       2502 ext/zlib/zlib.c     s = rb_str_dup(rb_str_to_str(str));
rb_str_dup       2525 ext/zlib/zlib.c     s = rb_str_dup(rb_str_to_str(str));
rb_str_dup       4175 file.c         	    fname = rb_str_dup(*filep);
rb_str_dup       4196 file.c         	    fname = rb_str_dup(*filep);
rb_str_dup        410 intern.h       VALUE rb_str_dup _((VALUE));
rb_str_dup       1280 object.c           return rb_str_dup(rb_class_name(klass));
rb_str_dup        518 range.c            str = rb_str_dup(str);
rb_str_dup        544 range.c            str = rb_str_dup(str);
rb_str_dup        644 string.c           str = rb_str_dup(str);
rb_str_dup       1536 string.c       	    return rb_str_dup(indx);
rb_str_dup       2042 string.c           str = rb_str_dup(str);
rb_str_dup       2079 string.c       	return rb_str_dup(str);
rb_str_dup       2319 string.c           VALUE str = rb_str_dup(uscore_get());
rb_str_dup       2366 string.c           VALUE str = rb_str_dup(uscore_get());
rb_str_dup       2419 string.c           if (RSTRING(str)->len <= 1) return rb_str_dup(str);
rb_str_dup       2778 string.c           str = rb_str_dup(str);
rb_str_dup       2832 string.c           str = rb_str_dup(str);
rb_str_dup       2895 string.c           str = rb_str_dup(str);
rb_str_dup       2953 string.c           str = rb_str_dup(str);
rb_str_dup       3135 string.c           str = rb_str_dup(str);
rb_str_dup       3245 string.c           str = rb_str_dup(str);
rb_str_dup       3329 string.c           str = rb_str_dup(str);
rb_str_dup       3368 string.c           str = rb_str_dup(str);
rb_str_dup       3794 string.c           str = rb_str_dup(str);
rb_str_dup       3848 string.c       	str = rb_str_dup(str);
rb_str_dup       3962 string.c           str = rb_str_dup(str);
rb_str_dup       4013 string.c           VALUE dup = rb_str_dup(str);
rb_str_dup       4072 string.c           str = rb_str_dup(str);
rb_str_dup       4131 string.c           str = rb_str_dup(str);
rb_str_dup       4171 string.c           str = rb_str_dup(str);
rb_str_dup       4490 string.c           if (width < 0 || RSTRING(str)->len >= width) return rb_str_dup(str);
rb_str_dup         55 variable.c     	    tmp = rb_str_dup(tmp);
rb_str_dup        182 variable.c         if (!NIL_P(path)) return rb_str_dup(path);
rb_str_dup        230 variable.c     	str = rb_str_dup(rb_class_path(under));


rb_str_each_line

rb_str_each_line 4727 string.c           rb_define_method(rb_cString, "each_line", rb_str_each_line, -1);
rb_str_each_line 4728 string.c           rb_define_method(rb_cString, "each", rb_str_each_line, -1);


rb_str_equal

rb_str_equal     1458 string.c           while (!rb_str_equal(current, after_end)) {
rb_str_equal     1460 string.c       	if (!excl && rb_str_equal(current, end)) break;
rb_str_equal     1463 string.c       	if (excl && rb_str_equal(current, end)) break;
rb_str_equal     4640 string.c           rb_define_method(rb_cString, "==", rb_str_equal, 1);


rb_str_freeze

rb_str_freeze      22 ext/strscan/strscan.c #  define rb_obj_freeze(obj) rb_str_freeze(obj)
rb_str_freeze     418 intern.h       VALUE rb_str_freeze _((VALUE));


rb_str_gsub_bang

rb_str_gsub_bang 2345 string.c           return rb_str_gsub_bang(argc, argv, uscore_get());
rb_str_gsub_bang 2368 string.c           if (NIL_P(rb_str_gsub_bang(argc, argv, str)))
rb_str_gsub_bang 4709 string.c           rb_define_method(rb_cString, "gsub!", rb_str_gsub_bang, -1);


rb_str_hash

rb_str_hash       100 hash.c         	return rb_str_hash(a);
rb_str_hash       424 intern.h       int rb_str_hash _((VALUE));
rb_str_hash       898 string.c           int key = rb_str_hash(str);


rb_str_index

rb_str_index      937 dln.c              int rb_str_index;
rb_str_index     1005 dln.c          	    char *name = name_base + base->rb_str_index;
rb_str_index     1153 string.c       	pos = rb_str_index(str, sub, pos);
rb_str_index     1535 string.c       	if (rb_str_index(str, indx, 0) != -1)
rb_str_index     1756 string.c       	beg = rb_str_index(str, indx, 0);
rb_str_index     2460 string.c           i = rb_str_index(str, arg, 0);


rb_str_inspect

rb_str_inspect    794 error.c            VALUE s = rb_str_inspect(rb_str_new2(str));
rb_str_inspect    428 intern.h       VALUE rb_str_inspect _((VALUE));
rb_str_inspect   4668 string.c           rb_define_method(rb_cString, "inspect", rb_str_inspect, 0);


rb_str_intern

rb_str_intern    3781 eval.c         		result = rb_str_intern(str);
rb_str_intern     434 intern.h       VALUE rb_str_intern _((VALUE));
rb_str_intern    4689 string.c           rb_define_method(rb_cString, "intern", rb_str_intern, 0);
rb_str_intern    4690 string.c           rb_define_method(rb_cString, "to_sym", rb_str_intern, 0);


rb_str_justify

rb_str_justify   4555 string.c           return rb_str_justify(argc, argv, str, 'l');
rb_str_justify   4578 string.c           return rb_str_justify(argc, argv, str, 'r');
rb_str_justify   4601 string.c           return rb_str_justify(argc, argv, str, 'c');


rb_str_length

rb_str_length    4650 string.c           rb_define_method(rb_cString, "length", rb_str_length, 0);
rb_str_length    4651 string.c           rb_define_method(rb_cString, "size", rb_str_length, 0);


rb_str_locktmp

rb_str_locktmp    564 ext/socket/socket.c     rb_str_locktmp(str);
rb_str_locktmp    411 intern.h       VALUE rb_str_locktmp _((VALUE));
rb_str_locktmp   1150 io.c           	rb_str_locktmp(str);
rb_str_locktmp   1348 io.c               rb_str_locktmp(str);
rb_str_locktmp   2406 io.c               rb_str_locktmp(str);
rb_str_locktmp   2089 string.c           rb_str_locktmp(dest);


rb_str_lstrip_bang

rb_str_lstrip_bang 4073 string.c           rb_str_lstrip_bang(str);
rb_str_lstrip_bang 4149 string.c           VALUE l = rb_str_lstrip_bang(str);
rb_str_lstrip_bang 4713 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     631 ext/openssl/ossl_ssl.c         rb_str_modify(str);
rb_str_modify     740 ext/stringio/stringio.c 	rb_str_modify(ptr->string);
rb_str_modify    1101 ext/stringio/stringio.c 	rb_str_modify(str);
rb_str_modify     417 intern.h       void rb_str_modify _((VALUE));
rb_str_modify    1189 io.c                   rb_str_modify(str);
rb_str_modify    1339 io.c           	rb_str_modify(str);
rb_str_modify    2395 io.c           	rb_str_modify(str);
rb_str_modify    4751 io.c           	    rb_str_modify(arg);
rb_str_modify    4894 io.c           	    rb_str_modify(v);
rb_str_modify     263 string.c           rb_str_modify(str);
rb_str_modify     680 string.c           rb_str_modify(str);
rb_str_modify     706 string.c           rb_str_modify(str);
rb_str_modify     746 string.c       	rb_str_modify(str);
rb_str_modify     771 string.c           rb_str_modify(str);
rb_str_modify     800 string.c           rb_str_modify(str);
rb_str_modify    1637 string.c           rb_str_modify(str);
rb_str_modify    1739 string.c       	    rb_str_modify(str);
rb_str_modify    1968 string.c       	rb_str_modify(str);
rb_str_modify    2263 string.c       	rb_str_modify(str);
rb_str_modify    2390 string.c       	rb_str_modify(str);
rb_str_modify    2745 string.c           rb_str_modify(str);
rb_str_modify    2799 string.c           rb_str_modify(str);
rb_str_modify    2858 string.c           rb_str_modify(str);
rb_str_modify    2916 string.c           rb_str_modify(str);
rb_str_modify    3057 string.c           rb_str_modify(str);
rb_str_modify    3206 string.c           rb_str_modify(str);
rb_str_modify    3286 string.c           rb_str_modify(str);
rb_str_modify    3758 string.c       	rb_str_modify(str);
rb_str_modify    3882 string.c       	    rb_str_modify(str);
rb_str_modify    3913 string.c       	    rb_str_modify(str);
rb_str_modify    3928 string.c       	rb_str_modify(str);
rb_str_modify    4047 string.c       	rb_str_modify(str);
rb_str_modify    4107 string.c       	rb_str_modify(str);


rb_str_new

rb_str_new       1254 array.c            if (RARRAY(ary)->len == 0) return rb_str_new(0, 0);
rb_str_new       1335 array.c            if (RARRAY(ary)->len == 0) return rb_str_new(0, 0);
rb_str_new        670 bignum.c           ss = rb_str_new(0, j);
rb_str_new        703 dir.c          	*dir = rb_str_new(path, pend - path);
rb_str_new        321 error.c            return rb_funcall(etype, rb_intern("new"), 1, rb_str_new(ptr, len));
rb_str_new        914 error.c        	mesg = rb_str_new(0, len);
rb_str_new       4329 eval.c         	terminate_process(status, rb_str_new("exit", 4));
rb_str_new       6940 eval.c         	    tmp = rb_str_new(RSTRING(fname)->ptr, ext-RSTRING(fname)->ptr);
rb_str_new       8568 eval.c         	str = rb_str_new(0, len);
rb_str_new       8574 eval.c         	str = rb_str_new(0, len);
rb_str_new       12343 eval.c             str = rb_str_new(0, len); /* 7:tags 16:addr 9:status 1:nul */
rb_str_new        107 ext/digest/digest.c     obj = rb_str_new(digest, len);
rb_str_new        136 ext/digest/digest.c     obj = rb_str_new(hexdigest, len);
rb_str_new        217 ext/digest/digest.c     str = rb_str_new(digest, len);
rb_str_new        248 ext/digest/digest.c     str = rb_str_new(hexdigest, len);
rb_str_new        174 ext/iconv/iconv.c 	    volatile VALUE msg = rb_str_new(0, strlen(s) + RSTRING(to)->len +
rb_str_new        351 ext/iconv/iconv.c 	return rb_str_new(ptr, len);
rb_str_new        357 ext/iconv/iconv.c 	ret = rb_str_new(ptr, len);
rb_str_new        403 ext/iconv/iconv.c 		str = rb_str_new(&c, 1);
rb_str_new        449 ext/iconv/iconv.c 		    ret = rb_str_new(buffer, outlen);
rb_str_new        456 ext/iconv/iconv.c 			ret = rb_str_new(instart, tmpstart - instart);
rb_str_new        672 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         51 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        258 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        628 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        270 ext/readline/readline.c     str = rb_str_new("", 1);
rb_str_new        445 ext/socket/socket.c     return rb_str_new(buf, len);
rb_str_new        462 ext/socket/socket.c     return rb_str_new(buf, len);
rb_str_new        476 ext/socket/socket.c     return rb_str_new(buf, len);
rb_str_new        600 ext/socket/socket.c 	return rb_assoc_new(str, rb_str_new(buf, alen));
rb_str_new       2588 ext/socket/socket.c     return rb_assoc_new(sock2, rb_str_new(buf, len));
rb_str_new       2641 ext/socket/socket.c     return rb_assoc_new(sock2, rb_str_new(buf, len));
rb_str_new       2726 ext/socket/socket.c     return rb_str_new(ptr, len);
rb_str_new       2780 ext/socket/socket.c 	rb_ary_push(ary, rb_str_new(*pch, h->h_length));
rb_str_new       2783 ext/socket/socket.c     rb_ary_push(ary, rb_str_new(h->h_addr, h->h_length));
rb_str_new       3039 ext/socket/socket.c     VALUE addr = rb_str_new((char*)res->ai_addr, res->ai_addrlen);
rb_str_new       3072 ext/socket/socket.c     addr = rb_str_new((char*)&sockaddr, sizeof(sockaddr));
rb_str_new        253 ext/stringio/stringio.c 	string = rb_str_new("", 0);
rb_str_new       1126 ext/stringio/stringio.c 		str = rb_str_new(0, 0);
rb_str_new       1150 ext/stringio/stringio.c 	if (!(ptr->flags & STRIO_EOF)) str = rb_str_new(0, 0);
rb_str_new        147 ext/strscan/strscan.c     return infect(rb_str_new(S_PBEG(p) + beg_i, end_i - beg_i), p);
rb_str_new        158 ext/strscan/strscan.c     return infect(rb_str_new(S_PBEG(p) + beg_i, len), p);
rb_str_new        759 ext/strscan/strscan.c         return infect(rb_str_new("", 0), p);
rb_str_new       1049 ext/strscan/strscan.c         return infect(rb_str_new("", 0), p);
rb_str_new       1112 ext/strscan/strscan.c         return infect(rb_str_new(buf, len), p);
rb_str_new       1117 ext/strscan/strscan.c         return infect(rb_str_new(buf, len), p);
rb_str_new       1125 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       1154 ext/strscan/strscan.c     return rb_str_dump(rb_str_new(buf, bp - buf));
rb_str_new       1175 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       1270 ext/syck/rubyext.c             v = rb_str_new( n->data.str->ptr, n->data.str->len );
rb_str_new       1892 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       2676 ext/win32ole/win32ole.c         argv[0] = rb_str_new(mname, n-1);
rb_str_new        438 ext/zlib/zlib.c 	z->buf = rb_str_new(0, ZSTREAM_INITIAL_BUFSIZE);
rb_str_new        470 ext/zlib/zlib.c 	z->buf = rb_str_new(0, size);
rb_str_new        526 ext/zlib/zlib.c 	dst = rb_str_new(0, 0);
rb_str_new        644 ext/zlib/zlib.c 	dst = rb_str_new(0, 0);
rb_str_new        787 ext/zlib/zlib.c 	    rest = rb_str_new(z->stream.next_in, z->stream.avail_in);
rb_str_new        802 ext/zlib/zlib.c 	rest = rb_str_new(z->stream.next_in, z->stream.avail_in);
rb_str_new       1545 ext/zlib/zlib.c 	    dst = rb_str_new(0, 0);
rb_str_new       2026 ext/zlib/zlib.c 	gz->orig_name = rb_str_new(RSTRING(gz->z.input)->ptr, len);
rb_str_new       2033 ext/zlib/zlib.c 	gz->comment = rb_str_new(RSTRING(gz->z.input)->ptr, len);
rb_str_new       2135 ext/zlib/zlib.c 	return rb_str_new(0, 0);
rb_str_new       2166 ext/zlib/zlib.c 	return rb_str_new(0, 0);
rb_str_new       2659 file.c             return file_expand_path(fname, dname, rb_str_new(0, MAXPATHLEN + 2));
rb_str_new       2788 file.c             basename = rb_str_new(p, f);
rb_str_new       2829 file.c         	dirname = rb_str_new(name, 3);
rb_str_new       2834 file.c             dirname = rb_str_new(name, p - name);
rb_str_new       2874 file.c              extname = rb_str_new(e, chompdirsep(e) - e);	/* keep the dot, too! */
rb_str_new       2919 file.c             if (RARRAY(ary)->len == 0) return rb_str_new(0, 0);
rb_str_new       4116 file.c         	if (!path_check_0(rb_str_new(p0, p - p0), Qtrue)) {
rb_str_new        396 intern.h       VALUE rb_str_new _((const char*, long));
rb_str_new        520 io.c               return io_fwrite(rb_str_new(ptr, len), &of);
rb_str_new       1144 io.c           	str = rb_str_new(0, siz);
rb_str_new       1185 io.c                   str = rb_str_new(0, len);
rb_str_new       1448 io.c           		    *strp = str = rb_str_new(buf, cnt);
rb_str_new       1468 io.c           	    *strp = str = rb_str_new(&ch, 1);
rb_str_new       2391 io.c           	str = rb_str_new(0, ilen);
rb_str_new       3300 io.c           	    VALUE tmp = rb_str_new(str+1, RSTRING(argv[0])->len-1);
rb_str_new       3747 io.c               rb_io_write(io, rb_str_new(&c, 1));
rb_str_new       3944 io.c               rb_io_write(rb_stderr, rb_str_new(mesg, len));
rb_str_new       4522 io.c               if (NIL_P(port)) return rb_str_new(0,0);
rb_str_new        874 marshal.c          if (len == 0) return rb_str_new(0, 0);
rb_str_new        877 marshal.c      	    str = rb_str_new(RSTRING(arg->src)->ptr+arg->offset, len);
rb_str_new       1798 numeric.c          return rb_str_new(&c, 1);
rb_str_new        362 object.c           str = rb_str_new(0, len); /* 6:tags 16:addr */
rb_str_new        445 object.c       	    str = rb_str_new(0, len); /* 10:tags 16:addr 1:nul */
rb_str_new        451 object.c       	str = rb_str_new(0, len);     /* 6:tags 16:addr 1:nul */
rb_str_new       1174 object.c           str = rb_str_new(0, strlen(name)+1);
rb_str_new        948 pack.c         		VALUE buf = rb_str_new(0, 0);
rb_str_new       1157 pack.c             VALUE s = rb_str_new(ptr, len);
rb_str_new       1414 pack.c         		rb_ary_push(ary, bitstr = rb_str_new(0, len));
rb_str_new       1434 pack.c         		rb_ary_push(ary, bitstr = rb_str_new(0, len));
rb_str_new       1454 pack.c         		rb_ary_push(ary, bitstr = rb_str_new(0, len));
rb_str_new       1476 pack.c         		rb_ary_push(ary, bitstr = rb_str_new(0, len));
rb_str_new       5683 parse.c        			    node = NEW_STR(rb_str_new(0, 0));
rb_str_new       5708 parse.c        			    node = NEW_XSTR(rb_str_new(0, 0));
rb_str_new       5719 parse.c        				node = NEW_NODE(NODE_DXSTR, rb_str_new(0, 0), 1, NEW_LIST(node));
rb_str_new       5745 parse.c        			    node = NEW_NODE(NODE_DSTR, rb_str_new(0, 0), 1, NEW_LIST(node));
rb_str_new       5921 parse.c        				yyval.node = NEW_NODE(NODE_DSYM, rb_str_new(0, 0), 1, NEW_LIST(yyval.node));
rb_str_new       6585 parse.c        	    VALUE str = rb_str_new(0,0);
rb_str_new       6643 parse.c            return rb_str_new(beg, end - beg);
rb_str_new       6677 parse.c            return rb_compile_string(f, rb_str_new(s, len), line);
rb_str_new       7158 parse.c            yylval.node = NEW_STR(rb_str_new(tok(), toklen()));
rb_str_new       7215 parse.c        				  rb_str_new(tok(), toklen()),	/* nd_lit */
rb_str_new       7296 parse.c        		str = rb_str_new(p, pend - p);
rb_str_new       7322 parse.c        		yylval.node = NEW_STR(rb_str_new(tok(), toklen()));
rb_str_new       7328 parse.c        	str = rb_str_new(tok(), toklen());
rb_str_new       8686 parse.c        	NODE *node = NEW_DSTR(rb_str_new(0, 0));
rb_str_new       8730 parse.c        	node = list_append(NEW_DSTR(rb_str_new(0, 0)), node);
rb_str_new       1942 parse.y        			    node = NEW_STR(rb_str_new(0, 0));
rb_str_new       1968 parse.y        			    node = NEW_XSTR(rb_str_new(0, 0));
rb_str_new       1979 parse.y        				node = NEW_NODE(NODE_DXSTR, rb_str_new(0, 0), 1, NEW_LIST(node));
rb_str_new       2005 parse.y        			    node = NEW_NODE(NODE_DSTR, rb_str_new(0, 0), 1, NEW_LIST(node));
rb_str_new       2165 parse.y        				$$ = NEW_NODE(NODE_DSYM, rb_str_new(0, 0), 1, NEW_LIST($$));
rb_str_new       2587 parse.y        	    VALUE str = rb_str_new(0,0);
rb_str_new       2645 parse.y            return rb_str_new(beg, end - beg);
rb_str_new       2679 parse.y            return rb_compile_string(f, rb_str_new(s, len), line);
rb_str_new       3160 parse.y            yylval.node = NEW_STR(rb_str_new(tok(), toklen()));
rb_str_new       3217 parse.y        				  rb_str_new(tok(), toklen()),	/* nd_lit */
rb_str_new       3298 parse.y        		str = rb_str_new(p, pend - p);
rb_str_new       3324 parse.y        		yylval.node = NEW_STR(rb_str_new(tok(), toklen()));
rb_str_new       3330 parse.y        	str = rb_str_new(tok(), toklen());
rb_str_new       4688 parse.y        	NODE *node = NEW_DSTR(rb_str_new(0, 0));
rb_str_new       4732 parse.y        	node = list_append(NEW_DSTR(rb_str_new(0, 0)), node);
rb_str_new        384 re.c               str = rb_str_new(RREGEXP(re)->str,RREGEXP(re)->len);
rb_str_new       1294 re.c               if (NIL_P(str)) str = rb_str_new(0,0);
rb_str_new       1753 re.c               tmp = rb_str_new(0, RSTRING(str)->len*2);
rb_str_new        170 ruby.c         #define rubylib_mangled_path(s, l) rb_str_new((s), (l))
rb_str_new        573 ruby.c         		e_script = rb_str_new(0,0);
rb_str_new        671 ruby.c         		    rb_rs = rb_str_new(&c, 1);
rb_str_new        615 sprintf.c      			tmp = rb_str_new(0, 3+strlen(s));
rb_str_new        115 string.c           return rb_str_new(ptr, strlen(ptr));
rb_str_new        123 string.c           VALUE str = rb_str_new(ptr, len);
rb_str_new        389 string.c           str3 = rb_str_new(0, RSTRING(str1)->len+RSTRING(str2)->len);
rb_str_new       1894 string.c           buf[i] = rb_str_new(0,0);
rb_str_new       3554 string.c       		    rb_ary_push(result, rb_str_new("", 0));
rb_str_new        522 struct.c       	VALUE str = rb_str_new(0, len);
rb_str_new       1255 time.c             return rb_str_new(buf, len);
rb_str_new       1644 time.c             return rb_str_new(buf, len);
rb_str_new       1842 time.c         	str = rb_str_new(0, 0);
rb_str_new       1859 time.c             str = rb_str_new(buf, len);
rb_str_new       1920 time.c             return rb_str_new(buf, 8);
rb_str_new        183 variable.c         return rb_str_new(0,0);
rb_str_new        210 variable.c     	path = rb_str_new(0, len);
rb_str_new        253 variable.c     	str = rb_str_new(pbeg, p-pbeg);


rb_str_new2

rb_str_new2      1273 array.c        		tmp = rb_str_new2("[...]");
rb_str_new2      1453 array.c            if (RARRAY(ary)->len == 0) return rb_str_new2("[]");
rb_str_new2      1454 array.c            if (rb_inspecting_p(ary)) return rb_str_new2("[...]");
rb_str_new2       632 bignum.c       	return rb_str_new2("0");
rb_str_new2       544 class.c        	rb_ary_push(ary, rb_str_new2(rb_id2name(name)));
rb_str_new2       350 dir.c              return rb_str_new2(dirp->path);
rb_str_new2       644 dir.c          	path = rb_str_new2(dist);
rb_str_new2       612 error.c            argv[0] = rb_str_new2(buf);
rb_str_new2       754 error.c        	    d = rb_str_new2(desc);
rb_str_new2       794 error.c            VALUE s = rb_str_inspect(rb_str_new2(str));
rb_str_new2       920 error.c        	mesg = rb_str_new2(err);
rb_str_new2      1122 error.c            arg = mesg ? rb_str_new2(mesg) : Qnil;
rb_str_new2      1606 eval.c             v = eval(ruby_top_self, rb_str_new2(str), Qnil, 0, 0);
rb_str_new2      2637 eval.c         	srcfile = rb_str_new2(ruby_sourcefile?ruby_sourcefile:"(ruby)");
rb_str_new2      2639 eval.c         	proc_invoke(trace_func, rb_ary_new3(6, rb_str_new2(event_name),
rb_str_new2      4023 eval.c         	    if (desc) result = rb_str_new2(desc);
rb_str_new2      5495 eval.c         			       3, rb_str_new2(format), obj, argv[0]);
rb_str_new2      6120 eval.c         	rb_ary_push(ary, rb_str_new2(buf));
rb_str_new2      6142 eval.c         	rb_ary_push(ary, rb_str_new2(buf));
rb_str_new2      6358 eval.c         			rb_str_update(mesg, 0, 0, rb_str_new2(": "));
rb_str_new2      6874 eval.c             rb_provide_feature(rb_str_new2(feature));
rb_str_new2      7076 eval.c             VALUE fn = rb_str_new2(fname);
rb_str_new2      7574 eval.c         	    rb_ary_push(ary, rb_str_new2(rb_id2name(tbl[i])));
rb_str_new2      7581 eval.c         	    rb_ary_push(ary, rb_str_new2(rb_id2name(vars->id)));
rb_str_new2      11890 eval.c             return rb_str_new2(thread_status_name(th->status));
rb_str_new2      12095 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       814 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "VERSION",  rb_str_new2(DB_VERSION_STRING));
rb_str_new2       471 ext/dl/ptr.c     return rb_str_new2(str);
rb_str_new2       184 ext/dl/sym.c       return rb_str_new2(type);
rb_str_new2      1021 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "VERSION",  rb_str_new2(gdbm_version));
rb_str_new2       313 ext/iconv/iconv.c 	args[0] = rb_str_new2(mesg);
rb_str_new2       831 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       275 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       416 ext/openssl/ossl_ssl.c     rb_ary_push(ary, rb_str_new2(SSL_CIPHER_get_name(cipher)));
rb_str_new2       417 ext/openssl/ossl_ssl.c     rb_ary_push(ary, rb_str_new2(SSL_CIPHER_get_version(cipher)));
rb_str_new2       464 ext/openssl/ossl_ssl.c         str = rb_str_new2(NULL);
rb_str_new2       831 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       496 ext/readline/readline.c     return rb_str_new2("HISTORY");
rb_str_new2       804 ext/readline/readline.c     rb_define_const(mReadline, "VERSION", rb_str_new2(rl_library_version));
rb_str_new2       807 ext/readline/readline.c                     rb_str_new2("2.0 or before version"));
rb_str_new2       651 ext/socket/socket.c     return rb_str_new2(buf);
rb_str_new2       815 ext/socket/socket.c 	family = rb_str_new2("AF_UNSPEC");
rb_str_new2       818 ext/socket/socket.c 	family = rb_str_new2("AF_INET");
rb_str_new2       822 ext/socket/socket.c 	family = rb_str_new2("AF_INET6");
rb_str_new2       827 ext/socket/socket.c 	family = rb_str_new2("AF_LOCAL");
rb_str_new2       831 ext/socket/socket.c 	family = rb_str_new2("AF_UNIX");
rb_str_new2       836 ext/socket/socket.c 	family = rb_str_new2(pbuf);
rb_str_new2       844 ext/socket/socket.c 	    addr1 = rb_str_new2(hbuf);
rb_str_new2       852 ext/socket/socket.c     addr2 = rb_str_new2(hbuf);
rb_str_new2      1237 ext/socket/socket.c     rb_ary_push(ary, rb_str_new2(hostp));
rb_str_new2      1243 ext/socket/socket.c 		rb_ary_push(names, rb_str_new2(*pch));
rb_str_new2      1634 ext/socket/socket.c     return rb_str_new2(fptr->path);
rb_str_new2      1882 ext/socket/socket.c     return rb_assoc_new(rb_str_new2("AF_UNIX"),
rb_str_new2      1883 ext/socket/socket.c 			rb_str_new2(sockaddr->sun_path));
rb_str_new2      2656 ext/socket/socket.c     return rb_str_new2(buf);
rb_str_new2      2671 ext/socket/socket.c     return rb_str_new2(un.nodename);
rb_str_new2      2769 ext/socket/socket.c     rb_ary_push(ary, rb_str_new2(h->h_name));
rb_str_new2      2774 ext/socket/socket.c 	    rb_ary_push(names, rb_str_new2(*pch));
rb_str_new2      2799 ext/socket/socket.c     if (NIL_P(proto)) proto = rb_str_new2("tcp");
rb_str_new2      3023 ext/socket/socket.c     return rb_assoc_new(rb_str_new2(hbuf), rb_str_new2(pbuf));
rb_str_new2      3091 ext/socket/socket.c     path = rb_str_new2(sockaddr->sun_path);
rb_str_new2      1145 ext/strscan/strscan.c     if (p->curr == 0) return rb_str_new2("");
rb_str_new2      1165 ext/strscan/strscan.c     if (EOS_P(p)) return rb_str_new2("");
rb_str_new2      1296 ext/strscan/strscan.c     tmp = rb_str_new2(STRSCAN_VERSION);
rb_str_new2      1299 ext/strscan/strscan.c     tmp = rb_str_new2("$Id: strscan.c,v 1.7.2.7 2005/10/06 11:13:36 aamine Exp $");
rb_str_new2       125 ext/syck/rubyext.c     bc = rb_str_new2( ret );  S_FREE( 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      1087 ext/syck/rubyext.c         VALUE str_xprivate = rb_str_new2( "x-private" );
rb_str_new2      1088 ext/syck/rubyext.c         VALUE colon = rb_str_new2( ":" );
rb_str_new2      1205 ext/syck/rubyext.c         val = rb_str_new2( taguri );
rb_str_new2      1226 ext/syck/rubyext.c         return rb_str_new2( type_id );
rb_str_new2      1229 ext/syck/rubyext.c     return rb_str_new2( "" );
rb_str_new2      1244 ext/syck/rubyext.c         obj = rb_funcall( self, s_transfer, 2, rb_str_new2( n->type_id ), obj );
rb_str_new2      1263 ext/syck/rubyext.c         t = rb_str_new2(n->type_id);
rb_str_new2      1978 ext/syck/rubyext.c     bonus->port = rb_str_new2( "" );
rb_str_new2      2148 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       466 ext/win32ole/win32ole.c     return rb_str_new2(szTime);
rb_str_new2       500 ext/win32ole/win32ole.c     msg = rb_str_new2(strhr);
rb_str_new2       546 ext/win32ole/win32ole.c     error_msg = rb_str_new2(error_code);
rb_str_new2       686 ext/win32ole/win32ole.c     VALUE vstr = rb_str_new2(p);
rb_str_new2      1019 ext/win32ole/win32ole.c         obj = rb_str_new2(p);
rb_str_new2      1098 ext/win32ole/win32ole.c             obj = rb_str_new2(p);
rb_str_new2      1136 ext/win32ole/win32ole.c         return rb_str_new2(buf);
rb_str_new2      1150 ext/win32ole/win32ole.c         return rb_str_new2(buf);
rb_str_new2      1311 ext/win32ole/win32ole.c                     rb_hash_aset(constant, rb_str_new2(pName), val);
rb_str_new2      1345 ext/win32ole/win32ole.c     subkey = rb_str_new2("SOFTWARE\\Classes\\");
rb_str_new2      2681 ext/win32ole/win32ole.c         argv[0] = rb_str_new2(mname);
rb_str_new2      3079 ext/win32ole/win32ole.c     VALUE type = rb_str_new2("");
rb_str_new2      3102 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("I2"));
rb_str_new2      3103 ext/win32ole/win32ole.c         return rb_str_new2("I2");
rb_str_new2      3106 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("I4"));
rb_str_new2      3107 ext/win32ole/win32ole.c         return rb_str_new2("I4");
rb_str_new2      3110 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("R4"));
rb_str_new2      3111 ext/win32ole/win32ole.c         return rb_str_new2("R4");
rb_str_new2      3114 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("R8"));
rb_str_new2      3115 ext/win32ole/win32ole.c         return rb_str_new2("R8");
rb_str_new2      3118 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("CY"));
rb_str_new2      3119 ext/win32ole/win32ole.c         return rb_str_new2("CY");
rb_str_new2      3122 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("DATE"));
rb_str_new2      3123 ext/win32ole/win32ole.c         return rb_str_new2("DATE");
rb_str_new2      3126 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("BSTR"));
rb_str_new2      3127 ext/win32ole/win32ole.c         return rb_str_new2("BSTR");
rb_str_new2      3130 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("BOOL"));
rb_str_new2      3131 ext/win32ole/win32ole.c         return rb_str_new2("BOOL");
rb_str_new2      3134 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("VARIANT"));
rb_str_new2      3135 ext/win32ole/win32ole.c         return rb_str_new2("VARIANT");
rb_str_new2      3138 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("DECIMAL"));
rb_str_new2      3139 ext/win32ole/win32ole.c         return rb_str_new2("DECIMAL");
rb_str_new2      3142 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("I1"));
rb_str_new2      3143 ext/win32ole/win32ole.c         return rb_str_new2("I1");
rb_str_new2      3146 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("UI1"));
rb_str_new2      3147 ext/win32ole/win32ole.c         return rb_str_new2("UI1");
rb_str_new2      3150 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("UI2"));
rb_str_new2      3151 ext/win32ole/win32ole.c         return rb_str_new2("UI2");
rb_str_new2      3154 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("UI4"));
rb_str_new2      3155 ext/win32ole/win32ole.c         return rb_str_new2("UI4");
rb_str_new2      3158 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("I8"));
rb_str_new2      3159 ext/win32ole/win32ole.c         return rb_str_new2("I8");
rb_str_new2      3162 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("UI8"));
rb_str_new2      3163 ext/win32ole/win32ole.c         return rb_str_new2("UI8");
rb_str_new2      3166 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("INT"));
rb_str_new2      3167 ext/win32ole/win32ole.c         return rb_str_new2("INT");
rb_str_new2      3170 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("UINT"));
rb_str_new2      3171 ext/win32ole/win32ole.c         return rb_str_new2("UINT");
rb_str_new2      3174 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("VOID"));
rb_str_new2      3175 ext/win32ole/win32ole.c         return rb_str_new2("VOID");
rb_str_new2      3178 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("HRESULT"));
rb_str_new2      3179 ext/win32ole/win32ole.c         return rb_str_new2("HRESULT");
rb_str_new2      3182 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("PTR"));
rb_str_new2      3186 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("SAFEARRAY"));
rb_str_new2      3190 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("CARRAY"));
rb_str_new2      3191 ext/win32ole/win32ole.c         return rb_str_new2("CARRAY");
rb_str_new2      3194 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("USERDEFINED"));
rb_str_new2      3199 ext/win32ole/win32ole.c         return rb_str_new2("USERDEFINED");
rb_str_new2      3201 ext/win32ole/win32ole.c         return rb_str_new2("UNKNOWN");
rb_str_new2      3204 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("DISPATCH"));
rb_str_new2      3205 ext/win32ole/win32ole.c         return rb_str_new2("DISPATCH");
rb_str_new2      3207 ext/win32ole/win32ole.c         str = rb_str_new2("Unknown Type ");
rb_str_new2      3348 ext/win32ole/win32ole.c     VALUE v = rb_str_new2("");
rb_str_new2      3509 ext/win32ole/win32ole.c         type = rb_str_new2("Enum");
rb_str_new2      3512 ext/win32ole/win32ole.c         type = rb_str_new2("Record");
rb_str_new2      3515 ext/win32ole/win32ole.c         type = rb_str_new2("Module");
rb_str_new2      3518 ext/win32ole/win32ole.c         type = rb_str_new2("Interface");
rb_str_new2      3521 ext/win32ole/win32ole.c         type = rb_str_new2("Dispatch");
rb_str_new2      3524 ext/win32ole/win32ole.c         type = rb_str_new2("Class");
rb_str_new2      3527 ext/win32ole/win32ole.c         type = rb_str_new2("Alias");
rb_str_new2      3530 ext/win32ole/win32ole.c         type = rb_str_new2("Union");
rb_str_new2      3533 ext/win32ole/win32ole.c         type = rb_str_new2("Max");
rb_str_new2      4205 ext/win32ole/win32ole.c     VALUE kind = rb_str_new2("UNKNOWN");
rb_str_new2      4211 ext/win32ole/win32ole.c         kind = rb_str_new2("PERINSTANCE");
rb_str_new2      4214 ext/win32ole/win32ole.c         kind = rb_str_new2("STATIC");
rb_str_new2      4217 ext/win32ole/win32ole.c         kind = rb_str_new2("CONSTANT");
rb_str_new2      4220 ext/win32ole/win32ole.c         kind = rb_str_new2("DISPATCH");
rb_str_new2      4526 ext/win32ole/win32ole.c     VALUE type = rb_str_new2("UNKNOWN");
rb_str_new2      4530 ext/win32ole/win32ole.c         type = rb_str_new2("PROPERTY");
rb_str_new2      4532 ext/win32ole/win32ole.c         type =  rb_str_new2("PROPERTYGET");
rb_str_new2      4534 ext/win32ole/win32ole.c         type = rb_str_new2("PROPERTYPUT");
rb_str_new2      4536 ext/win32ole/win32ole.c         type = rb_str_new2("PROPERTYPUTREF");
rb_str_new2      4538 ext/win32ole/win32ole.c         type = rb_str_new2("FUNC");
rb_str_new2      5090 ext/win32ole/win32ole.c     VALUE type = rb_str_new2("UNKNOWN");
rb_str_new2      6138 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "VERSION", rb_str_new2(WIN32OLE_VERSION));
rb_str_new2       254 ext/zlib/zlib.c     str = rb_str_new2(zlibVersion());
rb_str_new2      3330 ext/zlib/zlib.c     rb_define_const(mZlib, "VERSION", rb_str_new2(RUBY_ZLIB_VERSION));
rb_str_new2      3331 ext/zlib/zlib.c     rb_define_const(mZlib, "ZLIB_VERSION", rb_str_new2(ZLIB_VERSION));
rb_str_new2      1518 file.c             return rb_str_new2(t);
rb_str_new2      2826 file.c         	return rb_str_new2(".");
rb_str_new2      2873 file.c         	 return rb_str_new2("");
rb_str_new2      2943 file.c         		tmp = rb_str_new2("[...]");
rb_str_new2      4060 file.c         	newpath = rb_str_new2(buf);
rb_str_new2      4094 file.c             return path_check_0(rb_str_new2(path), Qfalse);
rb_str_new2      4258 file.c         	tmp = rb_ary_join(tmp, rb_str_new2(PATH_SEP));
rb_str_new2      4281 file.c         	tmp = rb_str_new2(f);
rb_str_new2      4394 file.c             separator = rb_obj_freeze(rb_str_new2("/"));
rb_str_new2      4401 file.c             rb_define_const(rb_cFile, "ALT_SEPARATOR", rb_obj_freeze(rb_str_new2("\\")));
rb_str_new2      4405 file.c             rb_define_const(rb_cFile, "PATH_SEPARATOR", rb_obj_freeze(rb_str_new2(PATH_SEP)));
rb_str_new2      1245 hash.c         	return rb_str_new2("{}");
rb_str_new2      1246 hash.c             if (rb_inspecting_p(hash)) return rb_str_new2("{...}");
rb_str_new2      1274 hash.c             if (rb_inspecting_p(hash)) return rb_str_new2("{...}");
rb_str_new2      1707 hash.c         	    VALUE str = rb_str_new2(env);
rb_str_new2      1749 hash.c         	return rb_str_new2(env);
rb_str_new2      2124 hash.c             return rb_str_new2("ENV");
rb_str_new2      2145 hash.c         	    i = rb_inspect(rb_str_new2(s+1));
rb_str_new2       397 intern.h       VALUE rb_str_new2 _((const char*));
rb_str_new2       997 io.c               return rb_str_new2(buf);
rb_str_new2      3679 io.c           	    rb_io_write(out, rb_str_new2("nil"));
rb_str_new2      3777 io.c           	    tmp = rb_str_new2("[...]");
rb_str_new2      3820 io.c           	    line = rb_str_new2("nil");
rb_str_new2      4257 io.c           			str = rb_str_new2(fn);
rb_str_new2      4317 io.c           	filename = rb_str_new2("-");
rb_str_new2      5434 io.c               return rb_str_new2("ARGF");
rb_str_new2      5441 io.c               return rb_str_new2(ruby_inplace_mode);
rb_str_new2      5598 io.c               rb_rs = rb_default_rs = rb_str_new2("\n");
rb_str_new2      5733 io.c               filename = rb_str_new2("-");
rb_str_new2       498 numeric.c      	return rb_str_new2(value < 0 ? "-Infinity" : "Infinity");
rb_str_new2       500 numeric.c      	return rb_str_new2("NaN");
rb_str_new2       516 numeric.c          return rb_str_new2(buf);
rb_str_new2      1909 numeric.c      	return rb_str_new2("0");
rb_str_new2      1923 numeric.c          return rb_str_new2(b);
rb_str_new2      2586 numeric.c          if (name) return rb_str_new2(name);
rb_str_new2       822 object.c           return rb_str_new2("");
rb_str_new2       852 object.c           return rb_str_new2("nil");
rb_str_new2       881 object.c           return rb_str_new2("main");
rb_str_new2       906 object.c           return rb_str_new2("true");
rb_str_new2       987 object.c           return rb_str_new2("false");
rb_str_new2      1200 object.c           return rb_str_new2(rb_id2name(SYM2ID(sym)));
rb_str_new2      1264 object.c       	VALUE s = rb_str_new2("#<");
rb_str_new2      1940 pack.c         			tmp = rb_str_new2(t);
rb_str_new2      6577 parse.c        	    fname = rb_str_new2(f);
rb_str_new2      8827 parse.c        	return NEW_STR(rb_str_new2(ruby_sourcefile));
rb_str_new2      2579 parse.y        	    fname = rb_str_new2(f);
rb_str_new2      4829 parse.y        	return NEW_STR(rb_str_new2(ruby_sourcefile));
rb_str_new2       278 process.c          str = rb_str_new2(buf);
rb_str_new2      1435 process.c          cmd = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" "));
rb_str_new2      1486 process.c          cmd = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" "));
rb_str_new2       612 re.c           	return rb_str_new2(kcode);
rb_str_new2      1910 re.c                   args[0] = rb_str_new2("(?!)");
rb_str_new2      1963 re.c                       args[2] = rb_str_new2("n");
rb_str_new2      1966 re.c                       args[2] = rb_str_new2("e");
rb_str_new2      1969 re.c                       args[2] = rb_str_new2("s");
rb_str_new2      1972 re.c                       args[2] = rb_str_new2("u");
rb_str_new2      2099 re.c               return rb_str_new2(rb_get_kcode());
rb_str_new2       167 ruby.c         #define rubylib_mangled_path(s, l) rb_str_new2(rubylib_mangle((s), (l)))
rb_str_new2       168 ruby.c         #define rubylib_mangled_path2(s) rb_str_new2(rubylib_mangle((s), 0))
rb_str_new2       171 ruby.c         #define rubylib_mangled_path2(s) rb_str_new2(s)
rb_str_new2       396 ruby.c         		    v = rb_str_new2(p);
rb_str_new2       404 ruby.c         		    name_error[0] = rb_str_new2("invalid name for global variable - ");
rb_str_new2       667 ruby.c         		    rb_rs = rb_str_new2("\n\n");
rb_str_new2       629 signal.c       	if (oldfunc == SIG_IGN) oldcmd = rb_str_new2("IGNORE");
rb_str_new2       630 signal.c       	else if (oldfunc == sighandler) oldcmd = rb_str_new2("DEFAULT");
rb_str_new2       757 signal.c       	rb_hash_aset(h, rb_str_new2(sigs->signm), INT2FIX(sigs->signo));
rb_str_new2       133 string.c           VALUE str = rb_str_new2(ptr);
rb_str_new2      3608 string.c           sep = rb_str_new2(sep0);
rb_str_new2      4360 string.c           result = rb_str_new2(crypt(s, RSTRING(salt)->ptr));
rb_str_new2        73 struct.c       	rb_ary_push(ary, rb_str_new2(rb_id2name(SYM2ID(*p))));
rb_str_new2       251 struct.c           else nm = rb_str_new2(name);
rb_str_new2      1221 time.c             return rb_str_new2(s);
rb_str_new2      1636 time.c         	return rb_str_new2("UTC");
rb_str_new2      1639 time.c             return rb_str_new2(tobj->tm.tm_zone);
rb_str_new2      1641 time.c             return rb_str_new2(tzname[daylight && tobj->tm.tm_isdst]);
rb_str_new2        50 variable.c         path = rb_str_new2(rb_id2name(name));
rb_str_new2        61 variable.c     	tmp = rb_str_new2(rb_id2name(fc->name));
rb_str_new2       157 variable.c     	    path = rb_str_new2(rb_id2name(SYM2ID(path)));
rb_str_new2       227 variable.c     	str = rb_str_new2(name);
rb_str_new2       764 variable.c         rb_ary_push(ary, rb_str_new2(rb_id2name(key)));
rb_str_new2       788 variable.c     	    rb_ary_push(ary, rb_str_new2(buf));
rb_str_new2      1092 variable.c     	rb_ary_push(ary, rb_str_new2(rb_id2name(key)));
rb_str_new2      1301 variable.c         fn = rb_str_new2(file);
rb_str_new2      1544 variable.c         rb_ary_push(ary, rb_str_new2(rb_id2name(key)));
rb_str_new2      1850 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      3731 eval.c         	result = rb_str_new3(node->nd_lit);
rb_str_new3      3747 eval.c         	    str = rb_str_new3(node->nd_lit);
rb_str_new3      3791 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       398 intern.h       VALUE rb_str_new3 _((VALUE));
rb_str_new3       613 string.c       	str2 = rb_str_new3(rb_str_new4(str));


rb_str_new4

rb_str_new4      6662 eval.c             fname = rb_str_new4(fname);
rb_str_new4      7006 eval.c             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      2191 ext/socket/socket.c     addr = rb_str_new4(addr);
rb_str_new4      1447 file.c             fname1 = rb_str_new4(fname1);
rb_str_new4       918 hash.c         	st_add_direct(RHASH(hash)->tbl, rb_str_new4(key), val);
rb_str_new4       399 intern.h       VALUE rb_str_new4 _((VALUE));
rb_str_new4       943 re.c               RMATCH(match)->str = rb_str_new4(str);
rb_str_new4       256 sprintf.c          fmt = rb_str_new4(fmt);
rb_str_new4       613 string.c       	str2 = rb_str_new3(rb_str_new4(str));
rb_str_new4      1832 time.c             format = rb_str_new4(format);


rb_str_new5

rb_str_new5       400 intern.h       VALUE rb_str_new5 _((VALUE, const char*, long));
rb_str_new5       426 string.c           str2 = rb_str_new5(str,0, len *= RSTRING(str)->len);
rb_str_new5       609 string.c       	str2 = rb_str_new5(str,0,0);
rb_str_new5       618 string.c       	str2 = rb_str_new5(str, RSTRING(str)->ptr+beg, len);
rb_str_new5      1392 string.c           str = rb_str_new5(orig, RSTRING(orig)->ptr, RSTRING(orig)->len);
rb_str_new5      2421 string.c           obj = rb_str_new5(str, 0, RSTRING(str)->len);
rb_str_new5      2670 string.c           result = rb_str_new5(str, 0, len);
rb_str_new5      3576 string.c       		    tmp = rb_str_new5(str, 0, 0);
rb_str_new5      3586 string.c       	    tmp = rb_str_new5(str, 0, 0);
rb_str_new5      3699 string.c       	    line = rb_str_new5(str, s, p - s);
rb_str_new5      3709 string.c       	line = rb_str_new5(str, s, p - s);
rb_str_new5      4491 string.c           res = rb_str_new5(str, 0, width);


rb_str_plus

rb_str_plus       414 intern.h       VALUE rb_str_plus _((VALUE, VALUE));
rb_str_plus      4644 string.c           rb_define_method(rb_cString, "+", rb_str_plus, 1);


rb_str_replace

rb_str_replace    307 string.c       static VALUE rb_str_replace _((VALUE, VALUE));
rb_str_replace    314 string.c           rb_str_replace(dup, str);
rb_str_replace    335 string.c       	rb_str_replace(str, orig);
rb_str_replace   2544 string.c       	rb_str_replace(dup, str);
rb_str_replace   4638 string.c           rb_define_method(rb_cString, "initialize_copy", rb_str_replace, 1);
rb_str_replace   4662 string.c           rb_define_method(rb_cString, "replace", rb_str_replace, 1);


rb_str_resize

rb_str_resize     917 error.c        	rb_str_resize(mesg, strlen(RSTRING(mesg)->ptr));
rb_str_resize      64 ext/nkf/nkf.c      rb_str_resize(result, o_len);
rb_str_resize     632 ext/openssl/ossl_ssl.c         rb_str_resize(str, ilen);
rb_str_resize     245 ext/stringio/stringio.c 	    rb_str_resize(string, 0);
rb_str_resize     735 ext/stringio/stringio.c 	rb_str_resize(ptr->string, pos + len);
rb_str_resize    1110 ext/stringio/stringio.c 		if (!NIL_P(str)) rb_str_resize(str, 0);
rb_str_resize    1114 ext/stringio/stringio.c 		if (!NIL_P(str)) rb_str_resize(str, 0);
rb_str_resize    1129 ext/stringio/stringio.c 		rb_str_resize(str, 0);
rb_str_resize    1146 ext/stringio/stringio.c 	rb_str_resize(str, len);
rb_str_resize    1233 ext/stringio/stringio.c     rb_str_resize(string, l);
rb_str_resize     455 ext/zlib/zlib.c 	rb_str_resize(z->buf, z->buf_filled + inc);
rb_str_resize     477 ext/zlib/zlib.c 	rb_str_resize(z->buf, z->buf_filled + size);
rb_str_resize     500 ext/zlib/zlib.c 	rb_str_resize(z->buf, z->buf_filled + len);
rb_str_resize     530 ext/zlib/zlib.c 	rb_str_resize(dst, z->buf_filled);
rb_str_resize     616 ext/zlib/zlib.c 	rb_str_resize(z->input, RSTRING(z->input)->len - len);
rb_str_resize    2505 ext/zlib/zlib.c 	rb_str_resize(s, p - RSTRING(s)->ptr);
rb_str_resize    2528 ext/zlib/zlib.c 	rb_str_resize(s, p - RSTRING(s)->ptr);
rb_str_resize    2438 file.c             rb_str_resize(result, buflen);\
rb_str_resize     419 intern.h       VALUE rb_str_resize _((VALUE, long));
rb_str_resize    1147 io.c           	rb_str_resize(str, siz);
rb_str_resize    1163 io.c           	rb_str_resize(str, siz);
rb_str_resize    1165 io.c               if (bytes != siz) rb_str_resize(str, bytes);
rb_str_resize    1190 io.c                   rb_str_resize(str, len);
rb_str_resize    1218 io.c               rb_str_resize(str, n);
rb_str_resize    1340 io.c           	rb_str_resize(str,len);
rb_str_resize    1358 io.c           	    rb_str_resize(str, 0);
rb_str_resize    1363 io.c               rb_str_resize(str, n);
rb_str_resize    1397 io.c           		rb_str_resize(str, last + len);
rb_str_resize    2396 io.c           	rb_str_resize(str, ilen);
rb_str_resize    2422 io.c               rb_str_resize(str, n);
rb_str_resize    4757 io.c           		rb_str_resize(arg, len+1);
rb_str_resize    5277 io.c           	rb_str_resize(str,0);
rb_str_resize     132 marshal.c      	rb_str_resize(buf, 0);
rb_str_resize     684 marshal.c      	rb_str_resize(arg->arg->str, 0);
rb_str_resize    1800 re.c               rb_str_resize(tmp, t - RSTRING(tmp)->ptr);
rb_str_resize      89 sprintf.c          rb_str_resize(result, bsiz);\
rb_str_resize     790 sprintf.c          rb_str_resize(result, blen);
rb_str_resize    2264 string.c       	rb_str_resize(str, RSTRING(str2)->len);
rb_str_resize     224 util.c             rb_str_resize(str, strlen(buf));


rb_str_rstrip_bang

rb_str_rstrip_bang 4132 string.c           rb_str_rstrip_bang(str);
rb_str_rstrip_bang 4150 string.c           VALUE r = rb_str_rstrip_bang(str);
rb_str_rstrip_bang 4714 string.c           rb_define_method(rb_cString, "rstrip!", rb_str_rstrip_bang, 0);


rb_str_scan

rb_str_scan      4288 string.c           return rb_str_scan(uscore_get(), pat);
rb_str_scan      4694 string.c           rb_define_method(rb_cString, "scan", rb_str_scan, 1);


rb_str_setter

rb_str_setter     433 intern.h       void rb_str_setter _((VALUE, ID, VALUE*));
rb_str_setter    5595 io.c               rb_define_hooked_variable("$,", &rb_output_fs, 0, rb_str_setter);
rb_str_setter    5601 io.c               rb_define_hooked_variable("$/", &rb_rs, 0, rb_str_setter);
rb_str_setter    5602 io.c               rb_define_hooked_variable("$-0", &rb_rs, 0, rb_str_setter);
rb_str_setter    5603 io.c               rb_define_hooked_variable("$\\", &rb_output_rs, 0, rb_str_setter);


rb_str_splice

rb_str_splice    1682 string.c           rb_str_splice(str, beg, len, val);
rb_str_splice    1715 string.c           rb_str_splice(str, start, len, val);
rb_str_splice    1747 string.c       	    rb_str_splice(str, idx, 1, val);
rb_str_splice    1760 string.c       	rb_str_splice(str, beg, RSTRING(indx)->len, val);
rb_str_splice    1768 string.c       		rb_str_splice(str, beg, len, val);
rb_str_splice    1813 string.c       	    rb_str_splice(str, NUM2LONG(argv[0]), NUM2LONG(argv[1]), argv[2]);
rb_str_splice    1852 string.c           rb_str_splice(str, pos, 0, str2);


rb_str_split

rb_str_split     1063 ext/syck/rubyext.c     VALUE tparts = rb_str_split( const_name, "::" );
rb_str_split     1100 ext/syck/rubyext.c             VALUE parts = rb_str_split( type, ":" );
rb_str_split     1172 ext/syck/rubyext.c                 VALUE parts = rb_str_split( type, ":" );
rb_str_split      430 intern.h       VALUE rb_str_split _((VALUE, const char*));


rb_str_split_m

rb_str_split_m   3609 string.c           return rb_str_split_m(1, &sep, str);
rb_str_split_m   3625 string.c           return rb_str_split_m(argc, argv, uscore_get());
rb_str_split_m   4683 string.c           rb_define_method(rb_cString, "split", rb_str_split_m, -1);


rb_str_squeeze_bang

rb_str_squeeze_bang 3330 string.c           rb_str_squeeze_bang(argc, argv, str);
rb_str_squeeze_bang 4725 string.c           rb_define_method(rb_cString, "squeeze!", rb_str_squeeze_bang, -1);


rb_str_strip_bang

rb_str_strip_bang 4172 string.c           rb_str_strip_bang(str);
rb_str_strip_bang 4712 string.c           rb_define_method(rb_cString, "strip!", rb_str_strip_bang, 0);


rb_str_sub_bang

rb_str_sub_bang  2043 string.c           rb_str_sub_bang(argc, argv, str);
rb_str_sub_bang  2302 string.c           return rb_str_sub_bang(argc, argv, uscore_get());
rb_str_sub_bang  2321 string.c           if (NIL_P(rb_str_sub_bang(argc, argv, str)))
rb_str_sub_bang  4708 string.c           rb_define_method(rb_cString, "sub!", rb_str_sub_bang, -1);


rb_str_subpat

rb_str_subpat    1532 string.c       	return rb_str_subpat(str, indx, 0);
rb_str_subpat    1618 string.c       	    return rb_str_subpat(str, argv[0], NUM2INT(argv[1]));


rb_str_subpat_set

rb_str_subpat_set 1752 string.c       	rb_str_subpat_set(str, indx, 0, val);
rb_str_subpat_set 1810 string.c       	    rb_str_subpat_set(str, argv[0], NUM2INT(argv[1]), argv[2]);


rb_str_substr

rb_str_substr     319 ext/iconv/iconv.c 	args[0] = rb_inspect(rb_str_substr(failed, 0, FAILED_MAXLEN));
rb_str_substr     355 ext/iconv/iconv.c 	ret = rb_str_substr(str, ptr - RSTRING(str)->ptr, len);
rb_str_substr     857 ext/stringio/stringio.c 	str = rb_str_substr(ptr->string, ptr->pos, e - s);
rb_str_substr     874 ext/stringio/stringio.c 	str = rb_str_substr(ptr->string, s - RSTRING(ptr->string)->ptr, e - s);
rb_str_substr     880 ext/stringio/stringio.c 	str = rb_str_substr(ptr->string, ptr->pos, e - s);
rb_str_substr     901 ext/stringio/stringio.c 	str = rb_str_substr(ptr->string, ptr->pos, e - s);
rb_str_substr    1141 ext/stringio/stringio.c 	str = rb_str_substr(ptr->string, ptr->pos, len);
rb_str_substr     552 ext/zlib/zlib.c     dst = rb_str_substr(z->buf, 0, len);
rb_str_substr     416 intern.h       VALUE rb_str_substr _((VALUE, long, long));
rb_str_substr     988 re.c               str = rb_str_substr(RMATCH(match)->str, start, len);
rb_str_substr    1020 re.c               str = rb_str_substr(RMATCH(match)->str, 0, RMATCH(match)->BEG(0));
rb_str_substr    1048 re.c               str = rb_str_substr(str, pos, RSTRING(str)->len - pos);
rb_str_substr    1108 re.c           	    VALUE str = rb_str_substr(target, regs->beg[i], regs->end[i]-regs->beg[i]);
rb_str_substr    1267 re.c           	    VALUE str = rb_str_substr(target, regs->beg[i], regs->end[i]-regs->beg[i]);
rb_str_substr    1551 string.c       		tmp = rb_str_substr(str, beg, len);
rb_str_substr    1620 string.c       	return rb_str_substr(str, NUM2LONG(argv[0]), NUM2LONG(argv[1]));
rb_str_substr    3533 string.c       		    rb_ary_push(result, rb_str_substr(str, beg, end-beg));
rb_str_substr    3558 string.c       		    rb_ary_push(result, rb_str_substr(str, beg, mbclen2(RSTRING(str)->ptr[beg],spat)));
rb_str_substr    3568 string.c       		rb_ary_push(result, rb_str_substr(str, beg, end-beg));
rb_str_substr    3578 string.c       		    tmp = rb_str_substr(str, BEG(idx), END(idx)-BEG(idx));
rb_str_substr    3588 string.c       	    tmp = rb_str_substr(str, beg, RSTRING(str)->len-beg);


rb_str_succ

rb_str_succ      1439 string.c           rb_str_shared_replace(str, rb_str_succ(str));
rb_str_succ      4655 string.c           rb_define_method(rb_cString, "succ", rb_str_succ, 0);
rb_str_succ      4657 string.c           rb_define_method(rb_cString, "next", rb_str_succ, 0);


rb_str_succ_bang

rb_str_succ_bang 4656 string.c           rb_define_method(rb_cString, "succ!", rb_str_succ_bang, 0);
rb_str_succ_bang 4658 string.c           rb_define_method(rb_cString, "next!", rb_str_succ_bang, 0);


rb_str_swapcase_bang

rb_str_swapcase_bang 2954 string.c           rb_str_swapcase_bang(str);
rb_str_swapcase_bang 4679 string.c           rb_define_method(rb_cString, "swapcase!", rb_str_swapcase_bang, 0);


rb_str_times

rb_str_times      415 intern.h       VALUE rb_str_times _((VALUE, VALUE));
rb_str_times     4645 string.c           rb_define_method(rb_cString, "*", rb_str_times, 1);


rb_str_to_dbl

rb_str_to_dbl     324 intern.h       double rb_str_to_dbl _((VALUE, int));
rb_str_to_dbl    2358 object.c       	return rb_float_new(rb_str_to_dbl(val, Qtrue));
rb_str_to_dbl    2526 string.c           return rb_float_new(rb_str_to_dbl(str, Qfalse));


rb_str_to_inum

rb_str_to_inum    612 bignum.c           return rb_str_to_inum(str, base, base==0);
rb_str_to_inum     69 intern.h       VALUE rb_str_to_inum _((VALUE, int, int));
rb_str_to_inum   2212 object.c       	return rb_str_to_inum(val, 0, Qtrue);
rb_str_to_inum    499 sprintf.c      		    val = rb_str_to_inum(val, 0, Qtrue);
rb_str_to_inum   2504 string.c           return rb_str_to_inum(str, base, Qfalse);
rb_str_to_inum   4310 string.c           return rb_str_to_inum(str, 16, Qfalse);
rb_str_to_inum   4332 string.c           return rb_str_to_inum(str, -8, Qfalse);
rb_str_to_inum    289 time.c         	obj = rb_str_to_inum(obj, 10, Qfalse);


rb_str_to_s

rb_str_to_s      4666 string.c           rb_define_method(rb_cString, "to_s", rb_str_to_s, 0);
rb_str_to_s      4667 string.c           rb_define_method(rb_cString, "to_str", rb_str_to_s, 0);


rb_str_to_str

rb_str_to_str      37 ext/dl/dl.h    # define StringValue(v) if(TYPE(v) != T_STRING) v = rb_str_to_str(v)
rb_str_to_str      40 ext/dl/dl.h    # define StringValuePtr(v) RSTRING((TYPE(v) == T_STRING) ? (v) : rb_str_to_str(v))->ptr
rb_str_to_str    2502 ext/zlib/zlib.c     s = rb_str_dup(rb_str_to_str(str));
rb_str_to_str    2525 ext/zlib/zlib.c     s = rb_str_dup(rb_str_to_str(str));
rb_str_to_str     221 ruby.h         VALUE rb_str_to_str _((VALUE));
rb_str_to_str     547 string.c       	s = rb_str_to_str(s);


rb_str_unlocktmp

rb_str_unlocktmp  569 ext/socket/socket.c     rb_str_unlocktmp(str);
rb_str_unlocktmp  412 intern.h       VALUE rb_str_unlocktmp _((VALUE));
rb_str_unlocktmp 1153 io.c           	rb_str_unlocktmp(str);
rb_str_unlocktmp 1354 io.c               rb_str_unlocktmp(str);
rb_str_unlocktmp 2418 io.c               rb_str_unlocktmp(str);
rb_str_unlocktmp 2151 string.c           rb_str_unlocktmp(dest);


rb_str_upcase_bang

rb_str_upcase_bang 2779 string.c           rb_str_upcase_bang(str);
rb_str_upcase_bang 4676 string.c           rb_define_method(rb_cString, "upcase!", rb_str_upcase_bang, 0);


rb_str_update

rb_str_update    6358 eval.c         			rb_str_update(mesg, 0, 0, rb_str_new2(": "));
rb_str_update    6359 eval.c         			rb_str_update(mesg, 0, 0, RARRAY(errat)->ptr[0]);
rb_str_update    1016 ext/stringio/stringio.c 	rb_str_update(ptr->string, ptr->pos, len, str);
rb_str_update     427 intern.h       void rb_str_update _((VALUE, long, long, VALUE));


rb_str_upto

rb_str_upto       426 intern.h       VALUE rb_str_upto _((VALUE, VALUE, int));
rb_str_upto       229 range.c            return rb_str_upto(args[0], args[1], EXCL(args[2]));
rb_str_upto      1497 string.c           return rb_str_upto(beg, end, Qfalse);


rb_strftime

rb_strftime      1844 time.c         	    len = rb_strftime(&buf, p, &tobj->tm);
rb_strftime      1857 time.c         	len = rb_strftime(&buf, RSTRING(format)->ptr, &tobj->tm);


rb_string_value

rb_string_value   222 ruby.h         VALUE rb_string_value _((volatile VALUE*));
rb_string_value   226 ruby.h         #define StringValue(v) rb_string_value(&(v))
rb_string_value   561 string.c           return RSTRING(rb_string_value(ptr))->ptr;
rb_string_value   568 string.c           VALUE str = rb_string_value(ptr);


rb_string_value_cstr

rb_string_value_cstr  224 ruby.h         char *rb_string_value_cstr _((volatile VALUE*));
rb_string_value_cstr  228 ruby.h         #define StringValueCStr(v) rb_string_value_cstr(&(v))


rb_string_value_ptr

rb_string_value_ptr  223 ruby.h         char *rb_string_value_ptr _((volatile VALUE*));
rb_string_value_ptr  227 ruby.h         #define StringValuePtr(v) rb_string_value_ptr(&(v))


rb_struct_alloc

rb_struct_alloc   438 intern.h       VALUE rb_struct_alloc _((VALUE, VALUE));
rb_struct_alloc  1211 marshal.c      	    v = rb_struct_alloc(klass, values);


rb_struct_aref

rb_struct_aref    439 intern.h       VALUE rb_struct_aref _((VALUE, VALUE));
rb_struct_aref    701 struct.c           return rb_struct_aref(s, LONG2NUM(n));
rb_struct_aref    916 struct.c           rb_define_method(rb_cStruct, "[]", rb_struct_aref, 1);


rb_struct_aset

rb_struct_aset    440 intern.h       VALUE rb_struct_aset _((VALUE, VALUE, VALUE));
rb_struct_aset   1222 marshal.c      		rb_struct_aset(v, LONG2FIX(i), r_object(arg));
rb_struct_aset    917 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  437 intern.h       VALUE rb_struct_define __((const char*, ...));
rb_struct_define 3456 process.c          S_Tms = rb_struct_define("Tms", "utime", "stime", "cutime", "cstime", NULL);


rb_struct_getmember

rb_struct_getmember  441 intern.h       VALUE rb_struct_getmember _((VALUE, ID));
rb_struct_getmember  122 struct.c           return rb_struct_getmember(obj, ruby_frame->orig_func);


rb_struct_inspect

rb_struct_inspect  907 struct.c           rb_define_method(rb_cStruct, "to_s", rb_struct_inspect, 0);
rb_struct_inspect  908 struct.c           rb_define_method(rb_cStruct, "inspect", rb_struct_inspect, 0);


rb_struct_iv_get

rb_struct_iv_get  442 intern.h       VALUE rb_struct_iv_get _((VALUE, char*));
rb_struct_iv_get   41 struct.c           VALUE members = rb_struct_iv_get(klass, "__members__");
rb_struct_iv_get  343 struct.c           size = rb_struct_iv_get(klass, "__size__");
rb_struct_iv_get  365 struct.c           size = rb_struct_iv_get(klass, "__size__");
rb_struct_iv_get  395 struct.c           sz = rb_struct_iv_get(klass, "__size__");


rb_struct_members

rb_struct_members  444 intern.h       VALUE rb_struct_members _((VALUE));
rb_struct_members  638 marshal.c      		mem = rb_struct_members(obj);
rb_struct_members  107 struct.c           members = rb_struct_members(obj);
rb_struct_members  166 struct.c           members = rb_struct_members(obj);
rb_struct_members  462 struct.c           members = rb_struct_members(s);
rb_struct_members  477 struct.c           members = rb_struct_members(s);
rb_struct_members  575 struct.c           members = rb_struct_members(s);
rb_struct_members  634 struct.c           members = rb_struct_members(s);


rb_struct_modify

rb_struct_modify  167 struct.c           rb_struct_modify(obj);
rb_struct_modify  342 struct.c           rb_struct_modify(self);
rb_struct_modify  635 struct.c           rb_struct_modify(s);
rb_struct_modify  691 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     436 intern.h       VALUE rb_struct_new __((VALUE, ...));
rb_struct_new    3338 process.c          return rb_struct_new(S_Tms,


rb_struct_s_members

rb_struct_s_members  443 intern.h       VALUE rb_struct_s_members _((VALUE));
rb_struct_s_members 1201 marshal.c      	    mem = rb_struct_s_members(klass);
rb_struct_s_members   53 struct.c           VALUE members = rb_struct_s_members(rb_obj_class(s));
rb_struct_s_members   69 struct.c           members = rb_struct_s_members(klass);


rb_struct_s_members_m

rb_struct_s_members_m   96 struct.c           return rb_struct_s_members_m(rb_obj_class(obj));
rb_struct_s_members_m  212 struct.c           rb_define_singleton_method(nstr, "members", rb_struct_s_members_m, 0);


rb_struct_size

rb_struct_size    911 struct.c           rb_define_method(rb_cStruct, "size", rb_struct_size, 0);
rb_struct_size    912 struct.c           rb_define_method(rb_cStruct, "length", rb_struct_size, 0);


rb_struct_to_a

rb_struct_to_a    909 struct.c           rb_define_method(rb_cStruct, "to_a", rb_struct_to_a, 0);
rb_struct_to_a    910 struct.c           rb_define_method(rb_cStruct, "values", rb_struct_to_a, 0);


rb_svar

rb_svar          2217 eval.c         #define MATCH_DATA *rb_svar(node->nd_cnt)
rb_svar          3287 eval.c         	    VALUE *flip = rb_svar(node->nd_cnt);
rb_svar          3309 eval.c         	    VALUE *flip = rb_svar(node->nd_cnt);
rb_svar           165 intern.h       VALUE *rb_svar _((int));
rb_svar          10194 parse.c            VALUE *var = rb_svar(1);
rb_svar          10205 parse.c            VALUE *var = rb_svar(1);
rb_svar          10217 parse.c            VALUE *var = rb_svar(0);
rb_svar          10228 parse.c            VALUE *var = rb_svar(0);
rb_svar          6196 parse.y            VALUE *var = rb_svar(1);
rb_svar          6207 parse.y            VALUE *var = rb_svar(1);
rb_svar          6219 parse.y            VALUE *var = rb_svar(0);
rb_svar          6230 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 1954 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 1955 ext/syck/rubyext.c     syck_output_handler( emitter, rb_syck_output_handler );


rb_sym_all_symbols

rb_sym_all_symbols  344 intern.h       VALUE rb_sym_all_symbols _((void));
rb_sym_all_symbols 2685 object.c       			       rb_sym_all_symbols, 0); /* in parse.y */


rb_symname_p

rb_symname_p      339 intern.h       int rb_symname_p _((const char*));
rb_symname_p     1177 object.c           if (!rb_symname_p(name)) {


rb_sys_fail

rb_sys_fail       287 dir.c          	    rb_sys_fail(RSTRING(dirname)->ptr);
rb_sys_fail       382 dir.c          	rb_sys_fail(0);
rb_sys_fail       551 dir.c          	rb_sys_fail(RSTRING(path)->ptr);
rb_sys_fail       724 dir.c          	rb_sys_fail(RSTRING(path)->ptr);
rb_sys_fail       764 dir.c          	rb_sys_fail(RSTRING(path)->ptr);
rb_sys_fail       784 dir.c          	rb_sys_fail(RSTRING(dir)->ptr);
rb_sys_fail      10692 eval.c         		    rb_sys_fail("sleep");
rb_sys_fail       142 ext/dbm/dbm.c  	rb_sys_fail(RSTRING(file)->ptr);
rb_sys_fail       525 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       625 ext/gdbm/gdbm.c 	if (errno == EPERM) rb_sys_fail(0);
rb_sys_fail       181 ext/iconv/iconv.c 	    if (!inval) rb_sys_fail(s);
rb_sys_fail       214 ext/iconv/iconv.c 	rb_sys_fail("iconv_close");
rb_sys_fail       270 ext/iconv/iconv.c 	    rb_sys_fail("iconv");
rb_sys_fail        69 ext/io/wait/wait.c     if (ioctl(fileno(fp), FIONREAD, &n)) rb_sys_fail(0);
rb_sys_fail       113 ext/io/wait/wait.c 	rb_sys_fail(0);
rb_sys_fail       116 ext/io/wait/wait.c     if (ioctl(fileno(fp), FIONREAD, &n)) rb_sys_fail(0);
rb_sys_fail       595 ext/openssl/ossl_ssl.c 	    if (errno) rb_sys_fail(0);
rb_sys_fail       656 ext/openssl/ossl_ssl.c 		rb_sys_fail(0);
rb_sys_fail       700 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       509 ext/sdbm/init.c 	if (errno == EPERM) rb_sys_fail(0);
rb_sys_fail       257 ext/socket/socket.c 	rb_sys_fail(0);
rb_sys_fail       380 ext/socket/socket.c 	rb_sys_fail(fptr->path);
rb_sys_fail       443 ext/socket/socket.c 	rb_sys_fail(fptr->path);
rb_sys_fail       461 ext/socket/socket.c 	rb_sys_fail("getsockname(2)");
rb_sys_fail       475 ext/socket/socket.c 	rb_sys_fail("getpeername(2)");
rb_sys_fail       516 ext/socket/socket.c 	rb_sys_fail("send(2)");
rb_sys_fail       575 ext/socket/socket.c 	rb_sys_fail("recvfrom(2)");
rb_sys_fail      1129 ext/socket/socket.c 	rb_sys_fail(syscall);
rb_sys_fail      1339 ext/socket/socket.c 	rb_sys_fail(0);
rb_sys_fail      1399 ext/socket/socket.c 	rb_sys_fail("socket(2)");
rb_sys_fail      1424 ext/socket/socket.c 	rb_sys_fail(sockaddr.sun_path);
rb_sys_fail      1448 ext/socket/socket.c 	rb_sys_fail("getsockname(2)");
rb_sys_fail      1463 ext/socket/socket.c 	rb_sys_fail("getpeername(2)");
rb_sys_fail      1506 ext/socket/socket.c 	rb_sys_fail("socket(2) - udp");
rb_sys_fail      1547 ext/socket/socket.c     if (!ret) rb_sys_fail("connect(2)");
rb_sys_fail      1569 ext/socket/socket.c     rb_sys_fail("bind(2)");
rb_sys_fail      1608 ext/socket/socket.c     rb_sys_fail("sendto(2)");
rb_sys_fail      1631 ext/socket/socket.c 	    rb_sys_fail(0);
rb_sys_fail      1721 ext/socket/socket.c 	rb_sys_fail("sendmsg(2)");
rb_sys_fail      1797 ext/socket/socket.c 	rb_sys_fail("recvmsg(2)");
rb_sys_fail      1897 ext/socket/socket.c 	rb_sys_fail("getsockname(2)");
rb_sys_fail      1914 ext/socket/socket.c 	rb_sys_fail("getsockname(2)");
rb_sys_fail      2023 ext/socket/socket.c     if (fd < 0) rb_sys_fail("socket(2)");
rb_sys_fail      2042 ext/socket/socket.c 	rb_sys_fail("socketpair(2)");
rb_sys_fail      2195 ext/socket/socket.c 	rb_sys_fail("connect(2)");
rb_sys_fail      2289 ext/socket/socket.c 	rb_sys_fail("bind(2)");
rb_sys_fail      2375 ext/socket/socket.c 	rb_sys_fail("listen(2)");
rb_sys_fail      2653 ext/socket/socket.c 	rb_sys_fail("gethostname");
rb_sys_fail        43 ext/stringio/stringio.c #define error_inval(msg) (errno = EINVAL, rb_sys_fail(msg))
rb_sys_fail       242 ext/stringio/stringio.c 	    rb_sys_fail(0);
rb_sys_fail       228 ext/zlib/zlib.c 	rb_sys_fail(msg);
rb_sys_fail       718 file.c         	rb_sys_fail(StringValueCStr(fname));
rb_sys_fail       747 file.c         	rb_sys_fail(fptr->path);
rb_sys_fail       775 file.c         	rb_sys_fail(RSTRING(fname)->ptr);
rb_sys_fail       810 file.c         	rb_sys_fail(fptr->path);
rb_sys_fail      1475 file.c         	rb_sys_fail(StringValueCStr(fname));
rb_sys_fail      1544 file.c         	rb_sys_fail(RSTRING(fname)->ptr);
rb_sys_fail      1567 file.c         	rb_sys_fail(StringValueCStr(fname));
rb_sys_fail      1591 file.c         	rb_sys_fail(fptr->path);
rb_sys_fail      1613 file.c         	rb_sys_fail(RSTRING(fname)->ptr);
rb_sys_fail      1636 file.c         	rb_sys_fail(fptr->path);
rb_sys_fail      1660 file.c         	rb_sys_fail(RSTRING(fname)->ptr);
rb_sys_fail      1684 file.c         	rb_sys_fail(fptr->path);
rb_sys_fail      1696 file.c         	rb_sys_fail(path);
rb_sys_fail      1756 file.c         	rb_sys_fail(fptr->path);
rb_sys_fail      1760 file.c         	rb_sys_fail(fptr->path);
rb_sys_fail      1774 file.c         	rb_sys_fail(path);
rb_sys_fail      1826 file.c         	rb_sys_fail(path);
rb_sys_fail      1901 file.c         	rb_sys_fail(fptr->path);
rb_sys_fail      1904 file.c         	rb_sys_fail(fptr->path);
rb_sys_fail      1919 file.c         	rb_sys_fail(path);
rb_sys_fail      1984 file.c         	rb_sys_fail(path);
rb_sys_fail      2030 file.c         	rb_sys_fail(path);
rb_sys_fail      2067 file.c             rb_sys_fail(buf);
rb_sys_fail      2163 file.c         	rb_sys_fail(RSTRING(path)->ptr);
rb_sys_fail      2182 file.c         	rb_sys_fail(path);
rb_sys_fail      3019 file.c         	rb_sys_fail(RSTRING(path)->ptr);
rb_sys_fail      3027 file.c         	    rb_sys_fail(RSTRING(path)->ptr);
rb_sys_fail      3031 file.c         	    rb_sys_fail(RSTRING(path)->ptr);
rb_sys_fail      3036 file.c         	    rb_sys_fail(RSTRING(path)->ptr);
rb_sys_fail      3080 file.c         	rb_sys_fail(fptr->path);
rb_sys_fail      3084 file.c         	rb_sys_fail(fptr->path);
rb_sys_fail      3198 file.c         	rb_sys_fail(fptr->path);
rb_sys_fail      3379 file.c         	    rb_sys_fail(RSTRING(argv[1])->ptr);
rb_sys_fail      3465 file.c         	rb_sys_fail(RSTRING(fname)->ptr);
rb_sys_fail       309 io.c           	    rb_sys_fail(0);
rb_sys_fail       344 io.c           	    rb_sys_fail(fptr->path);
rb_sys_fail       562 io.c               if (n == -1L) rb_sys_fail(fptr->path);
rb_sys_fail       654 io.c               if (pos < 0) rb_sys_fail(fptr->path);
rb_sys_fail       669 io.c               if (pos < 0) rb_sys_fail(fptr->path);
rb_sys_fail       733 io.c               if (pos != 0) rb_sys_fail(fptr->path);
rb_sys_fail       760 io.c               if (io_seek(fptr, 0L, 0) != 0) rb_sys_fail(fptr->path);
rb_sys_fail       908 io.c           	rb_sys_fail(fptr->path);
rb_sys_fail      1158 io.c           	    rb_sys_fail(fptr->path);
rb_sys_fail      1215 io.c                       rb_sys_fail(fptr->path);
rb_sys_fail      1361 io.c           	if (len > 0) rb_sys_fail(fptr->path);
rb_sys_fail      1433 io.c           		    rb_sys_fail(fptr->path);
rb_sys_fail      1496 io.c           		rb_sys_fail(fptr->path);
rb_sys_fail      1876 io.c           		    rb_sys_fail(fptr->path);
rb_sys_fail      1883 io.c               if (ferror(f)) rb_sys_fail(fptr->path);
rb_sys_fail      1922 io.c           		rb_sys_fail(fptr->path);
rb_sys_fail      2065 io.c           	rb_sys_fail(fptr->path);
rb_sys_fail      2228 io.c               if (n != 0) rb_sys_fail(fptr->path);
rb_sys_fail      2272 io.c               if (n != 0) rb_sys_fail(fptr->path);
rb_sys_fail      2313 io.c               if (pos == -1) rb_sys_fail(fptr->path);
rb_sys_fail      2358 io.c               if (n == -1) rb_sys_fail(fptr->path);
rb_sys_fail      2420 io.c           	rb_sys_fail(fptr->path);
rb_sys_fail      2457 io.c           	rb_sys_fail(fptr->path);
rb_sys_fail      2459 io.c           	rb_sys_fail(fptr->path);
rb_sys_fail      2652 io.c           	    rb_sys_fail(fname);
rb_sys_fail      2672 io.c           	    rb_sys_fail(fname);
rb_sys_fail      2715 io.c           	    rb_sys_fail(0);
rb_sys_fail      2891 io.c               if (!f) rb_sys_fail(pname);
rb_sys_fail      2922 io.c           	rb_sys_fail(pname);
rb_sys_fail      2951 io.c           	rb_sys_fail(pname);
rb_sys_fail      2998 io.c           	rb_sys_fail(pname);
rb_sys_fail      3002 io.c           	if (pid < 0) rb_sys_fail(pname);
rb_sys_fail      3397 io.c           		rb_sys_fail(orig->path);
rb_sys_fail      3407 io.c           		rb_sys_fail(orig->path);
rb_sys_fail      3435 io.c           		rb_sys_fail(orig->path);
rb_sys_fail      3511 io.c           	rb_sys_fail(fptr->path);
rb_sys_fail      3520 io.c           	    rb_sys_fail(fptr->path);
rb_sys_fail      4074 io.c           	if (flags == -1) rb_sys_fail(0);
rb_sys_fail      4631 io.c           	rb_sys_fail(0);
rb_sys_fail      4765 io.c               if (retval < 0) rb_sys_fail(fptr->path);
rb_sys_fail      4958 io.c               if (retval < 0) rb_sys_fail(0);
rb_sys_fail      5023 io.c           	rb_sys_fail(0);
rb_sys_fail       112 math.c         	rb_sys_fail("acos");
rb_sys_fail       134 math.c         	rb_sys_fail("asin");
rb_sys_fail       246 math.c         	rb_sys_fail("acosh");
rb_sys_fail       283 math.c         	rb_sys_fail("atanh");
rb_sys_fail       329 math.c         	rb_sys_fail("log");
rb_sys_fail       351 math.c         	rb_sys_fail("log10");
rb_sys_fail       374 math.c         	rb_sys_fail("sqrt");
rb_sys_fail       742 process.c      	rb_sys_fail(0);
rb_sys_fail       820 process.c      	    rb_sys_fail(0);
rb_sys_fail       832 process.c      	    rb_sys_fail(0);
rb_sys_fail      1238 process.c          rb_sys_fail(RSTRING(argv[0])->ptr);
rb_sys_fail      1293 process.c      	rb_sys_fail("fork(2)");
rb_sys_fail      1534 process.c      	rb_sys_fail(0);
rb_sys_fail      1609 process.c          if (pgrp < 0) rb_sys_fail(0);
rb_sys_fail      1614 process.c          if (pgrp < 0) rb_sys_fail(0);
rb_sys_fail      1640 process.c          if (setpgid(0,0) < 0) rb_sys_fail(0);
rb_sys_fail      1642 process.c          if (setpgrp() < 0) rb_sys_fail(0);
rb_sys_fail      1669 process.c          if (i < 0) rb_sys_fail(0);
rb_sys_fail      1696 process.c          if (setpgid(ipid, ipgrp) < 0) rb_sys_fail(0);
rb_sys_fail      1723 process.c          if (pid < 0) rb_sys_fail(0);
rb_sys_fail      1739 process.c        if (ret == -1) rb_sys_fail(0);
rb_sys_fail      1782 process.c          if (errno) rb_sys_fail(0);
rb_sys_fail      1815 process.c      	rb_sys_fail(0);
rb_sys_fail      1869 process.c          if (setuid(NUM2INT(id)) != 0) rb_sys_fail(0);
rb_sys_fail      1893 process.c          if (setruid(NUM2INT(id)) != 0) rb_sys_fail(0);
rb_sys_fail      1916 process.c          if (seteuid(NUM2INT(id)) != 0) rb_sys_fail(0);
rb_sys_fail      1941 process.c          if (setreuid(NUM2INT(rid),NUM2INT(eid)) != 0) rb_sys_fail(0);
rb_sys_fail      1966 process.c          if (setresuid(NUM2INT(rid),NUM2INT(eid),NUM2INT(sid)) != 0) rb_sys_fail(0);
rb_sys_fail      2010 process.c          if (setresuid(uid, -1, -1) < 0) rb_sys_fail(0);
rb_sys_fail      2012 process.c          if (setreuid(uid, -1) < 0) rb_sys_fail(0);
rb_sys_fail      2014 process.c          if (setruid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2018 process.c      	    if (setuid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2069 process.c      	if (setresuid(uid, uid, uid) < 0) rb_sys_fail(0);
rb_sys_fail      2072 process.c      	if (setuid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2077 process.c      		if (setreuid(-1, uid) < 0) rb_sys_fail(0);
rb_sys_fail      2080 process.c      		    if (setreuid(-1, SAVED_USER_ID) < 0) rb_sys_fail(0);
rb_sys_fail      2081 process.c      		    if (setreuid(SAVED_USER_ID, 0) < 0) rb_sys_fail(0);
rb_sys_fail      2083 process.c      		    if (setreuid(uid, uid) < 0) rb_sys_fail(0);
rb_sys_fail      2086 process.c      		    if (setreuid(0, -1) < 0) rb_sys_fail(0);
rb_sys_fail      2088 process.c      		    if (setreuid(uid, uid) < 0) rb_sys_fail(0);
rb_sys_fail      2093 process.c      	    if (setreuid(uid, uid) < 0) rb_sys_fail(0);
rb_sys_fail      2099 process.c      		if (seteuid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2102 process.c      		    if (setruid(SAVED_USER_ID) < 0) rb_sys_fail(0);
rb_sys_fail      2104 process.c      		    if (setruid(0) < 0) rb_sys_fail(0);
rb_sys_fail      2106 process.c      		    if (setruid(0) < 0) rb_sys_fail(0);
rb_sys_fail      2108 process.c      		    if (seteuid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2109 process.c      		    if (setruid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2114 process.c      	    if (seteuid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2115 process.c      	    if (setruid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2125 process.c      		      (SAVED_USER_ID == uid)? -1: uid) < 0) rb_sys_fail(0);
rb_sys_fail      2130 process.c      			 (geteuid() == uid)? -1: uid) < 0) rb_sys_fail(0);
rb_sys_fail      2132 process.c      	    if (setreuid(uid, (geteuid() == uid)? -1: uid) < 0) rb_sys_fail(0);
rb_sys_fail      2135 process.c      	    if (setreuid(geteuid(), uid) < 0) rb_sys_fail(0);
rb_sys_fail      2137 process.c      	    if (setreuid(uid, -1) < 0) rb_sys_fail(0);
rb_sys_fail      2139 process.c      	    if (setreuid(-1, SAVED_USER_ID) < 0) rb_sys_fail(0);
rb_sys_fail      2140 process.c      	    if (setreuid(SAVED_USER_ID, uid) < 0) rb_sys_fail(0);
rb_sys_fail      2142 process.c      	    if (setreuid(uid, -1) < 0) rb_sys_fail(0);
rb_sys_fail      2146 process.c      	    if (geteuid() != uid && seteuid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2147 process.c      	    if (getuid() != uid && setruid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2150 process.c      		if (setruid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2153 process.c      		if (setruid(SAVED_USER_ID) < 0) rb_sys_fail(0);
rb_sys_fail      2155 process.c      		if (setruid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2158 process.c      	    if (seteuid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2159 process.c      	    if (setruid(SAVED_USER_ID) < 0) rb_sys_fail(0);
rb_sys_fail      2161 process.c      	    if (setruid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2164 process.c      	    rb_sys_fail(0);
rb_sys_fail      2169 process.c      	    if (setuid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2173 process.c      	    rb_sys_fail(0);
rb_sys_fail      2177 process.c      	    if (seteuid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2180 process.c      	    rb_sys_fail(0);
rb_sys_fail      2184 process.c      	    if (setuid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2187 process.c      	    rb_sys_fail(0);
rb_sys_fail      2213 process.c          if (setgid(NUM2INT(id)) != 0) rb_sys_fail(0);
rb_sys_fail      2236 process.c          if (setrgid(NUM2INT(id)) != 0) rb_sys_fail(0);
rb_sys_fail      2260 process.c          if (setegid(NUM2INT(id)) != 0) rb_sys_fail(0);
rb_sys_fail      2285 process.c          if (setregid(NUM2INT(rid),NUM2INT(eid)) != 0) rb_sys_fail(0);
rb_sys_fail      2309 process.c          if (setresgid(NUM2INT(rid),NUM2INT(eid),NUM2INT(sid)) != 0) rb_sys_fail(0);
rb_sys_fail      2382 process.c          if (setresgid(gid, -1, -1) < 0) rb_sys_fail(0);
rb_sys_fail      2384 process.c          if (setregid(gid, -1) < 0) rb_sys_fail(0);
rb_sys_fail      2386 process.c          if (setrgid((GIDTYPE)gid) < 0) rb_sys_fail(0);
rb_sys_fail      2390 process.c      	    if (setgid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2430 process.c      	rb_sys_fail(0);
rb_sys_fail      2498 process.c      	rb_sys_fail(0);
rb_sys_fail      2531 process.c      	rb_sys_fail(0);
rb_sys_fail      2619 process.c      	if (setresgid(gid, gid, gid) < 0) rb_sys_fail(0);
rb_sys_fail      2622 process.c      	if (setgid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2627 process.c      		if (setregid(-1, gid) < 0) rb_sys_fail(0);
rb_sys_fail      2630 process.c      		    if (setregid(-1, SAVED_GROUP_ID) < 0) rb_sys_fail(0);
rb_sys_fail      2631 process.c      		    if (setregid(SAVED_GROUP_ID, 0) < 0) rb_sys_fail(0);
rb_sys_fail      2633 process.c      		    if (setregid(gid, gid) < 0) rb_sys_fail(0);
rb_sys_fail      2636 process.c      		    if (setregid(0, 0) < 0) rb_sys_fail(0);
rb_sys_fail      2638 process.c      		    if (setregid(gid, gid) < 0) rb_sys_fail(0);
rb_sys_fail      2643 process.c      	    if (setregid(gid, gid) < 0) rb_sys_fail(0);
rb_sys_fail      2649 process.c      		if (setegid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2652 process.c      		    if (setegid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2653 process.c      		    if (setrgid(SAVED_GROUP_ID) < 0) rb_sys_fail(0);
rb_sys_fail      2655 process.c      		    if (setrgid(0) < 0) rb_sys_fail(0);
rb_sys_fail      2657 process.c      		    if (setrgid(0) < 0) rb_sys_fail(0);
rb_sys_fail      2659 process.c      		    if (setegid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2660 process.c      		    if (setrgid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2665 process.c      	    if (setegid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2666 process.c      	    if (setrgid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2676 process.c      		      (SAVED_GROUP_ID == gid)? -1: gid) < 0) rb_sys_fail(0);
rb_sys_fail      2681 process.c      			 (getegid() == gid)? -1: gid) < 0) rb_sys_fail(0);
rb_sys_fail      2683 process.c      	    if (setregid(gid, (getegid() == gid)? -1: gid) < 0) rb_sys_fail(0);
rb_sys_fail      2686 process.c      	    if (setregid(getegid(), gid) < 0) rb_sys_fail(0);
rb_sys_fail      2688 process.c      	    if (setregid(gid, -1) < 0) rb_sys_fail(0);
rb_sys_fail      2690 process.c      	    if (setregid(-1, SAVED_GROUP_ID) < 0) rb_sys_fail(0);
rb_sys_fail      2691 process.c      	    if (setregid(SAVED_GROUP_ID, gid) < 0) rb_sys_fail(0);
rb_sys_fail      2693 process.c      	    if (setregid(gid, -1) < 0) rb_sys_fail(0);
rb_sys_fail      2697 process.c      	    if (getegid() != gid && setegid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2698 process.c      	    if (getgid() != gid && setrgid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2701 process.c      		if (setrgid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2704 process.c      		if (setrgid(SAVED_GROUP_ID) < 0) rb_sys_fail(0);
rb_sys_fail      2706 process.c      		if (setrgid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2709 process.c      	    if (setegid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2710 process.c      	    if (setrgid(SAVED_GROUP_ID) < 0) rb_sys_fail(0);
rb_sys_fail      2712 process.c      	    if (setrgid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2715 process.c      	    rb_sys_fail(0);
rb_sys_fail      2720 process.c      	    if (setgid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2724 process.c      	    rb_sys_fail(0);
rb_sys_fail      2728 process.c      	    if (setegid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2731 process.c      	    rb_sys_fail(0);
rb_sys_fail      2735 process.c      	    if (setgid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2738 process.c      	    rb_sys_fail(0);
rb_sys_fail      2782 process.c          if (setresuid(-1, NUM2INT(euid), -1) < 0) rb_sys_fail(0);
rb_sys_fail      2784 process.c          if (setreuid(-1, NUM2INT(euid)) < 0) rb_sys_fail(0);
rb_sys_fail      2786 process.c          if (seteuid(NUM2INT(euid)) < 0) rb_sys_fail(0);
rb_sys_fail      2790 process.c      	if (setuid(euid) < 0) rb_sys_fail(0);
rb_sys_fail      2813 process.c      	if (setresuid(-1,euid,euid) < 0) rb_sys_fail(0);
rb_sys_fail      2816 process.c      	if (setresuid(-1,euid,-1) < 0) rb_sys_fail(0);
rb_sys_fail      2819 process.c          if (setreuid(-1, euid) < 0) rb_sys_fail(0);
rb_sys_fail      2821 process.c      	if (setreuid(euid,uid) < 0) rb_sys_fail(0);
rb_sys_fail      2822 process.c      	if (setreuid(uid,euid) < 0) rb_sys_fail(0);
rb_sys_fail      2826 process.c          if (seteuid(euid) < 0) rb_sys_fail(0);
rb_sys_fail      2828 process.c          if (geteuid() == 0) rb_sys_fail(0);
rb_sys_fail      2829 process.c          if (setuid(euid) < 0) rb_sys_fail(0);
rb_sys_fail      2896 process.c          if (setresgid(-1, NUM2INT(egid), -1) < 0) rb_sys_fail(0);
rb_sys_fail      2898 process.c          if (setregid(-1, NUM2INT(egid)) < 0) rb_sys_fail(0);
rb_sys_fail      2900 process.c          if (setegid(NUM2INT(egid)) < 0) rb_sys_fail(0);
rb_sys_fail      2904 process.c      	if (setgid(egid) < 0) rb_sys_fail(0);
rb_sys_fail      2927 process.c      	if (setresgid(-1,egid,egid) < 0) rb_sys_fail(0);
rb_sys_fail      2930 process.c      	if (setresgid(-1,egid,-1) < 0) rb_sys_fail(0);
rb_sys_fail      2933 process.c          if (setregid(-1, egid) < 0) rb_sys_fail(0);
rb_sys_fail      2935 process.c      	if (setregid(egid,gid) < 0) rb_sys_fail(0);
rb_sys_fail      2936 process.c      	if (setregid(gid,egid) < 0) rb_sys_fail(0);
rb_sys_fail      2940 process.c          if (setegid(egid) < 0) rb_sys_fail(0);
rb_sys_fail      2942 process.c          if (geteuid() == 0 /* root user */) rb_sys_fail(0);
rb_sys_fail      2943 process.c          if (setgid(egid) < 0) rb_sys_fail(0);
rb_sys_fail      3019 process.c          if (setresuid(euid, uid, uid) < 0) rb_sys_fail(0);
rb_sys_fail      3022 process.c          if (setreuid(euid,uid) < 0) rb_sys_fail(0);
rb_sys_fail      3077 process.c          if (setresgid(egid, gid, gid) < 0) rb_sys_fail(0);
rb_sys_fail      3080 process.c          if (setregid(egid,gid) < 0) rb_sys_fail(0);
rb_sys_fail      3162 process.c      	rb_sys_fail(0);
rb_sys_fail      3187 process.c      	rb_sys_fail(0);
rb_sys_fail      3273 process.c      	rb_sys_fail(0);
rb_sys_fail      3297 process.c      	rb_sys_fail(0);
rb_sys_fail       538 ruby.h         NORETURN(void rb_sys_fail _((const char*)));
rb_sys_fail       289 signal.c       		rb_sys_fail(0);
rb_sys_fail       296 signal.c       		rb_sys_fail(0);
rb_sys_fail       103 time.c         	rb_sys_fail("gettimeofday");
rb_sys_fail       648 util.c         	    rb_sys_fail("getcwd");
rb_sys_fail       661 util.c         	rb_sys_fail("getwd");


rb_sys_warning

rb_sys_warning    791 dir.c              ((flags & GLOB_VERBOSE) && rb_protect((VALUE (*)_((VALUE)))rb_sys_warning, (VALUE)(val), 0))
rb_sys_warning    544 ruby.h         void rb_sys_warning __((const char*, ...));	/* reports if `-w' specified */


rb_sysopen

rb_sysopen       2764 io.c               fd = rb_sysopen(fptr->path, flags, mode);
rb_sysopen       3205 io.c               fd = rb_sysopen(path, flags, fmode);


rb_syswait

rb_syswait        349 intern.h       void rb_syswait _((int));
rb_syswait       2119 io.c           	rb_syswait(fptr->pid);
rb_syswait       1538 process.c      	rb_syswait(pid);
rb_syswait        741 win32/win32.c  	rb_syswait(child->pid);
rb_syswait        832 win32/win32.c  	rb_syswait(child->pid);


rb_tainted_str_new

rb_tainted_str_new  376 dir.c          	return rb_tainted_str_new(dp->d_name, NAMLEN(dp));
rb_tainted_str_new  414 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  278 ext/dbm/dbm.c              assoc = rb_assoc_new(rb_tainted_str_new(key.dptr, key.dsize),
rb_tainted_str_new  279 ext/dbm/dbm.c                                   rb_tainted_str_new(val.dptr, val.dsize));
rb_tainted_str_new  344 ext/dbm/dbm.c      valstr = rb_tainted_str_new(value.dptr, value.dsize);
rb_tainted_str_new  372 ext/dbm/dbm.c      keystr = rb_tainted_str_new(key.dptr, key.dsize);
rb_tainted_str_new  373 ext/dbm/dbm.c      valstr = rb_tainted_str_new(val.dptr, val.dsize);
rb_tainted_str_new  397 ext/dbm/dbm.c  	keystr = rb_tainted_str_new(key.dptr, key.dsize);
rb_tainted_str_new  398 ext/dbm/dbm.c  	valstr = rb_tainted_str_new(val.dptr, val.dsize);
rb_tainted_str_new  454 ext/dbm/dbm.c  	keystr = rb_tainted_str_new(key.dptr, key.dsize);
rb_tainted_str_new  455 ext/dbm/dbm.c  	valstr = rb_tainted_str_new(val.dptr, val.dsize);
rb_tainted_str_new  587 ext/dbm/dbm.c  	rb_yield(rb_tainted_str_new(val.dptr, val.dsize));
rb_tainted_str_new  603 ext/dbm/dbm.c  	rb_yield(rb_tainted_str_new(key.dptr, key.dsize));
rb_tainted_str_new  622 ext/dbm/dbm.c  	keystr = rb_tainted_str_new(key.dptr, key.dsize);
rb_tainted_str_new  623 ext/dbm/dbm.c  	valstr = rb_tainted_str_new(val.dptr, val.dsize);
rb_tainted_str_new  644 ext/dbm/dbm.c  	rb_ary_push(ary, rb_tainted_str_new(key.dptr, key.dsize));
rb_tainted_str_new  663 ext/dbm/dbm.c  	rb_ary_push(ary, rb_tainted_str_new(val.dptr, val.dsize));
rb_tainted_str_new  722 ext/dbm/dbm.c  	rb_ary_push(ary, rb_assoc_new(rb_tainted_str_new(key.dptr, key.dsize),
rb_tainted_str_new  723 ext/dbm/dbm.c  				      rb_tainted_str_new(val.dptr, val.dsize)));
rb_tainted_str_new  742 ext/dbm/dbm.c  	rb_hash_aset(hash, rb_tainted_str_new(key.dptr, key.dsize),
rb_tainted_str_new  743 ext/dbm/dbm.c  		           rb_tainted_str_new(val.dptr, val.dsize));
rb_tainted_str_new  430 ext/dl/ptr.c       val = rb_tainted_str_new((char*)(data->ptr), len);
rb_tainted_str_new  449 ext/dl/ptr.c       val = rb_tainted_str_new((char*)(data->ptr),data->size);
rb_tainted_str_new  453 ext/dl/ptr.c       val = rb_tainted_str_new((char*)(data->ptr), len);
rb_tainted_str_new  634 ext/dl/ptr.c   			rb_tainted_str_new(data->stype, data->slen));
rb_tainted_str_new  221 ext/dl/sym.c       val = rb_tainted_str_new(typestr, 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  255 ext/sdbm/init.c             assoc = rb_assoc_new(rb_tainted_str_new(key.dptr, key.dsize),
rb_tainted_str_new  256 ext/sdbm/init.c                                  rb_tainted_str_new(val.dptr, val.dsize));
rb_tainted_str_new  323 ext/sdbm/init.c     valstr = rb_tainted_str_new(value.dptr, value.dsize);
rb_tainted_str_new  349 ext/sdbm/init.c     keystr = rb_tainted_str_new(key.dptr, key.dsize);
rb_tainted_str_new  350 ext/sdbm/init.c     valstr = rb_tainted_str_new(val.dptr, val.dsize);
rb_tainted_str_new  376 ext/sdbm/init.c 	keystr = rb_tainted_str_new(key.dptr, key.dsize);
rb_tainted_str_new  377 ext/sdbm/init.c 	valstr = rb_tainted_str_new(val.dptr, val.dsize);
rb_tainted_str_new  433 ext/sdbm/init.c 	keystr = rb_tainted_str_new(key.dptr, key.dsize);
rb_tainted_str_new  434 ext/sdbm/init.c 	valstr = rb_tainted_str_new(val.dptr, val.dsize);
rb_tainted_str_new  571 ext/sdbm/init.c 	rb_yield(rb_tainted_str_new(val.dptr, val.dsize));
rb_tainted_str_new  587 ext/sdbm/init.c 	rb_yield(rb_tainted_str_new(key.dptr, key.dsize));
rb_tainted_str_new  605 ext/sdbm/init.c 	keystr = rb_tainted_str_new(key.dptr, key.dsize);
rb_tainted_str_new  606 ext/sdbm/init.c 	valstr = rb_tainted_str_new(val.dptr, val.dsize);
rb_tainted_str_new  626 ext/sdbm/init.c 	rb_ary_push(ary, rb_tainted_str_new(key.dptr, key.dsize));
rb_tainted_str_new  645 ext/sdbm/init.c 	rb_ary_push(ary, rb_tainted_str_new(val.dptr, val.dsize));
rb_tainted_str_new  704 ext/sdbm/init.c 	rb_ary_push(ary, rb_assoc_new(rb_tainted_str_new(key.dptr, key.dsize),
rb_tainted_str_new  705 ext/sdbm/init.c 				      rb_tainted_str_new(val.dptr, val.dsize)));
rb_tainted_str_new  724 ext/sdbm/init.c 	rb_hash_aset(hash, rb_tainted_str_new(key.dptr, key.dsize),
rb_tainted_str_new  725 ext/sdbm/init.c 		           rb_tainted_str_new(val.dptr, val.dsize));
rb_tainted_str_new  561 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 2165 file.c             v = rb_tainted_str_new(buf, rv);
rb_tainted_str_new 1633 hash.c             VALUE str = rb_tainted_str_new(ptr, len);
rb_tainted_str_new  401 intern.h       VALUE rb_tainted_str_new _((const char*, long));
rb_tainted_str_new 1335 io.c           	str = rb_tainted_str_new(0, len);
rb_tainted_str_new 1901 pack.c         		    tmp = rb_tainted_str_new(t, len);
rb_tainted_str_new 1030 ruby.c             rb_progname = rb_tainted_str_new(s, i);
rb_tainted_str_new 1033 ruby.c             rb_progname = rb_tainted_str_new(s, i);


rb_tainted_str_new2

rb_tainted_str_new2  656 dir.c          	args.old_path = rb_tainted_str_new2(cwd); free(cwd);
rb_tainted_str_new2  686 dir.c              cwd = rb_tainted_str_new2(path);
rb_tainted_str_new2 1158 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   90 ext/dl/dl.c    	val = rb_tainted_str_new2(v);
rb_tainted_str_new2  709 ext/dl/dl.c      rb_define_const(rb_mDL, "DLSTACK", rb_tainted_str_new2(DLSTACK_METHOD));
rb_tainted_str_new2  383 ext/dl/ptr.c   	  rb_ary_push(ary, rb_tainted_str_new2(str));
rb_tainted_str_new2  394 ext/dl/ptr.c   	  rb_ary_push(ary, rb_tainted_str_new2(str));
rb_tainted_str_new2  426 ext/dl/ptr.c       val = rb_tainted_str_new2((char*)(data->ptr));
rb_tainted_str_new2  193 ext/dl/sym.c     return sym->name ? rb_tainted_str_new2(sym->name) : Qnil;
rb_tainted_str_new2  202 ext/dl/sym.c     return sym->type ? rb_tainted_str_new2(sym->type) : Qnil;
rb_tainted_str_new2  243 ext/dl/sym.c       val = rb_tainted_str_new2("void (");
rb_tainted_str_new2  273 ext/dl/sym.c     val = rb_tainted_str_new2(str);
rb_tainted_str_new2  868 ext/dl/sym.c         val = rb_tainted_str_new2((char*)(ANY2S(ret)));
rb_tainted_str_new2  876 ext/dl/sym.c         val = rb_tainted_str_new2((char*)(ANY2S(ret)));
rb_tainted_str_new2  920 ext/dl/sym.c   	rb_ary_push(dvals, rb_tainted_str_new2((char*)ANY2S(args[i])));
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   97 ext/readline/readline.c 	result = rb_tainted_str_new2(buff);
rb_tainted_str_new2  158 ext/readline/readline.c     ary = rb_funcall(proc, rb_intern("call"), 1, rb_tainted_str_new2(text));
rb_tainted_str_new2  314 ext/readline/readline.c     return rb_tainted_str_new2(rl_basic_word_break_characters);
rb_tainted_str_new2  356 ext/readline/readline.c     return rb_tainted_str_new2(rl_completer_word_break_characters);
rb_tainted_str_new2  399 ext/readline/readline.c     return rb_tainted_str_new2(rl_basic_quote_characters);
rb_tainted_str_new2  442 ext/readline/readline.c     return rb_tainted_str_new2(rl_completer_quote_characters);
rb_tainted_str_new2  485 ext/readline/readline.c     return rb_tainted_str_new2(rl_filename_quote_characters);
rb_tainted_str_new2  516 ext/readline/readline.c     return rb_tainted_str_new2(entry->line);
rb_tainted_str_new2  585 ext/readline/readline.c         val = rb_tainted_str_new2(entry->line);
rb_tainted_str_new2  633 ext/readline/readline.c 	rb_yield(rb_tainted_str_new2(entry->line));
rb_tainted_str_new2  685 ext/readline/readline.c 	    rb_ary_push(result, rb_tainted_str_new2(matches[i]));
rb_tainted_str_new2  712 ext/readline/readline.c 	    rb_ary_push(result, rb_tainted_str_new2(matches[i]));
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  146 file.c             return rb_tainted_str_new2(fptr->path);
rb_tainted_str_new2  402 intern.h       VALUE rb_tainted_str_new2 _((const char*));
rb_tainted_str_new2 1073 ruby.c             rb_progname = rb_tainted_str_new2(origargv[0]);
rb_tainted_str_new2 1082 ruby.c         	rb_progname = rb_tainted_str_new2(name);
rb_tainted_str_new2 1172 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  11705 eval.c             return rb_thread_start_0(fn, arg, rb_thread_alloc(rb_cThread));
rb_thread_alloc  11757 eval.c             rb_thread_t th = rb_thread_alloc(klass);
rb_thread_alloc  11828 eval.c             return rb_thread_start_0(rb_thread_yield, args, rb_thread_alloc(klass));
rb_thread_alloc  12775 eval.c             main_thread = rb_thread_alloc(rb_cThread);


rb_thread_alone

rb_thread_alone  12356 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  3111 file.c             if (rb_thread_alone() || (op & LOCK_NB)) {
rb_thread_alone   202 intern.h       int rb_thread_alone _((void));
rb_thread_alone   450 io.c                       !rb_thread_alone() &&
rb_thread_alone   571 process.c          if (!rb_thread_alone()) {	/* there're other threads to run */
rb_thread_alone   593 process.c      	if (rb_thread_alone()) flags = oflags;
rb_thread_alone   624 process.c      	if (!rb_thread_alone()) rb_thread_schedule();


rb_thread_atfork

rb_thread_atfork  221 intern.h       void rb_thread_atfork _((void));
rb_thread_atfork 1283 process.c      	rb_thread_atfork();


rb_thread_check

rb_thread_check  10908 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_check  11011 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_check  11068 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_check  11249 eval.c             return INT2NUM(rb_thread_check(thread)->priority);
rb_thread_check  11283 eval.c             th = rb_thread_check(thread);
rb_thread_check  11309 eval.c             th = rb_thread_check(thread);
rb_thread_check  11386 eval.c             return rb_thread_check(thread)->abort?Qtrue:Qfalse;
rb_thread_check  11404 eval.c             rb_thread_check(thread)->abort = RTEST(val);
rb_thread_check  11423 eval.c             VALUE group = rb_thread_check(thread)->thgroup;
rb_thread_check  11798 eval.c             th = rb_thread_check(thread);
rb_thread_check  11847 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_check  11882 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_check  11910 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_check  11933 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_check  12165 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_check  12182 eval.c             th = rb_thread_check(thread);
rb_thread_check  12228 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_check  12281 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_check  12317 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_check  12338 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_check  12487 eval.c             rb_thread_t th = rb_thread_check(cont);
rb_thread_check  12662 eval.c             th = rb_thread_check(thread);


rb_thread_cleanup

rb_thread_cleanup 1373 eval.c         static void rb_thread_cleanup _((void));
rb_thread_cleanup 1514 eval.c         	rb_thread_cleanup();
rb_thread_cleanup 11671 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  210 intern.h       VALUE rb_thread_create _((VALUE (*)(ANYARGS), void*));
rb_thread_create  857 process.c          return rb_thread_create(detach_process_watcher, (void*)&pid);


rb_thread_current

rb_thread_current 1358 array.c            VALUE inspect_tbl = rb_thread_local_aref(rb_thread_current(), inspect_key);
rb_thread_current 1364 array.c        	    rb_thread_local_aset(rb_thread_current(), inspect_key, inspect_tbl);
rb_thread_current 1370 array.c        	rb_thread_local_aset(rb_thread_current(), inspect_key, Qnil);
rb_thread_current  570 dir.c          	chdir_thread = rb_thread_current();
rb_thread_current  648 dir.c          	if (!rb_block_given_p() || rb_thread_current() != chdir_thread)
rb_thread_current 8157 eval.c             data->orig_thread = rb_thread_current();
rb_thread_current 8236 eval.c             data->orig_thread = rb_thread_current();
rb_thread_current 8330 eval.c             if (data->orig_thread != rb_thread_current()) {
rb_thread_current 12719 eval.c             rb_define_singleton_method(rb_cThread, "current", rb_thread_current, 0);
rb_thread_current  326 ext/dl/sym.c     return rb_thread_local_aref(rb_thread_current(), rb_dl_id_DLErrno);
rb_thread_current  333 ext/dl/sym.c     rb_thread_local_aset(rb_thread_current(), rb_dl_id_DLErrno, val);
rb_thread_current  344 ext/dl/sym.c     return rb_thread_local_aref(rb_thread_current(), rb_dl_id_DLW32Error);
rb_thread_current  351 ext/dl/sym.c       rb_thread_local_aset(rb_thread_current(), rb_dl_id_DLW32Error, val);
rb_thread_current  816 ext/dl/sym.c       rb_thread_local_aset(rb_thread_current(), rb_dl_id_DLErrno, INT2NUM(last_errno));
rb_thread_current  818 ext/dl/sym.c       rb_thread_local_aset(rb_thread_current(), rb_dl_id_DLW32Error, INT2NUM(win32_last_err));
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  217 intern.h       VALUE rb_thread_current _((void));


rb_thread_dead

rb_thread_dead   10428 eval.c         	    if (rb_thread_dead(th->join)) {
rb_thread_dead   10600 eval.c         	if (!rb_thread_dead(curr_thread)) {
rb_thread_dead   10824 eval.c             if (!rb_thread_dead(th)) {
rb_thread_dead   10841 eval.c         	if (!rb_thread_dead(th)) return Qfalse;
rb_thread_dead   11884 eval.c             if (rb_thread_dead(th)) {
rb_thread_dead   11912 eval.c             if (rb_thread_dead(th)) return Qfalse;
rb_thread_dead   11935 eval.c             if (rb_thread_dead(th)) return Qtrue;
rb_thread_dead   12032 eval.c             if (!rb_thread_dead(curr_thread)) {
rb_thread_dead   12052 eval.c             if (!rb_thread_dead(curr_thread)) {
rb_thread_dead   12072 eval.c             if (!rb_thread_dead(curr_thread)) {
rb_thread_dead   12097 eval.c             if (!rb_thread_dead(curr_thread)) {
rb_thread_dead   12118 eval.c             if (rb_thread_dead(th)) return Qnil;
rb_thread_dead   12124 eval.c             if (!rb_thread_dead(curr_thread)) {


rb_thread_deadlock

rb_thread_deadlock 10603 eval.c         	rb_thread_deadlock();
rb_thread_deadlock 10823 eval.c             if (rb_thread_critical) rb_thread_deadlock();


rb_thread_die

rb_thread_die    10253 eval.c             rb_thread_die(th);
rb_thread_die    12359 eval.c         	    rb_thread_die(th);


rb_thread_fd_close

rb_thread_fd_close  201 intern.h       void rb_thread_fd_close _((int));
rb_thread_fd_close 2115 io.c               rb_thread_fd_close(fd);
rb_thread_fd_close 2116 io.c               if (fd2 >= 0) rb_thread_fd_close(fd2);
rb_thread_fd_close 3417 io.c           	rb_thread_fd_close(fd);
rb_thread_fd_close 3428 io.c           	    rb_thread_fd_close(fd);
rb_thread_fd_close 3433 io.c           	    rb_thread_fd_close(fd);


rb_thread_fd_writable

rb_thread_fd_writable  499 ext/socket/socket.c     rb_thread_fd_writable(fd);
rb_thread_fd_writable  200 intern.h       int rb_thread_fd_writable _((int));
rb_thread_fd_writable  335 io.c               if (!rb_thread_fd_writable(fileno(f))) {
rb_thread_fd_writable  388 io.c           	rb_thread_fd_writable(f);
rb_thread_fd_writable  443 io.c           	if (!rb_thread_fd_writable(fileno(f))) {
rb_thread_fd_writable 2351 io.c               if (!rb_thread_fd_writable(fileno(f))) {


rb_thread_interrupt

rb_thread_interrupt  211 intern.h       void rb_thread_interrupt _((void));
rb_thread_interrupt  376 signal.c       	    rb_thread_interrupt();


rb_thread_join

rb_thread_join   10814 eval.c         static int rb_thread_join _((rb_thread_t, double));
rb_thread_join   10912 eval.c             if (!rb_thread_join(th, delay))
rb_thread_join   11849 eval.c             while (!rb_thread_join(th, DELAY_INFTY));


rb_thread_kill

rb_thread_kill   11102 eval.c             return rb_thread_kill(th);
rb_thread_kill   11119 eval.c             return rb_thread_kill(curr_thread->thread);
rb_thread_kill   12731 eval.c             rb_define_method(rb_cThread, "kill", rb_thread_kill, 0);
rb_thread_kill   12732 eval.c             rb_define_method(rb_cThread, "terminate", rb_thread_kill, 0);
rb_thread_kill   12733 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    209 intern.h       VALUE rb_thread_kill _((VALUE));


rb_thread_local_aref

rb_thread_local_aref 1358 array.c            VALUE inspect_tbl = rb_thread_local_aref(rb_thread_current(), inspect_key);
rb_thread_local_aref 12219 eval.c             return rb_thread_local_aref(thread, rb_to_id(id));
rb_thread_local_aref  326 ext/dl/sym.c     return rb_thread_local_aref(rb_thread_current(), rb_dl_id_DLErrno);
rb_thread_local_aref  344 ext/dl/sym.c     return rb_thread_local_aref(rb_thread_current(), rb_dl_id_DLW32Error);
rb_thread_local_aref  219 intern.h       VALUE rb_thread_local_aref _((VALUE, ID));


rb_thread_local_aset

rb_thread_local_aset 1364 array.c        	    rb_thread_local_aset(rb_thread_current(), inspect_key, inspect_tbl);
rb_thread_local_aset 1370 array.c        	rb_thread_local_aset(rb_thread_current(), inspect_key, Qnil);
rb_thread_local_aset 12260 eval.c             return rb_thread_local_aset(thread, rb_to_id(id), val);
rb_thread_local_aset  333 ext/dl/sym.c     rb_thread_local_aset(rb_thread_current(), rb_dl_id_DLErrno, val);
rb_thread_local_aset  351 ext/dl/sym.c       rb_thread_local_aset(rb_thread_current(), rb_dl_id_DLW32Error, val);
rb_thread_local_aset  816 ext/dl/sym.c       rb_thread_local_aset(rb_thread_current(), rb_dl_id_DLErrno, INT2NUM(last_errno));
rb_thread_local_aset  818 ext/dl/sym.c       rb_thread_local_aset(rb_thread_current(), rb_dl_id_DLW32Error, INT2NUM(win32_last_err));
rb_thread_local_aset  220 intern.h       VALUE rb_thread_local_aset _((VALUE, ID, VALUE));


rb_thread_main

rb_thread_main   12720 eval.c             rb_define_singleton_method(rb_cThread, "main", rb_thread_main, 0);
rb_thread_main    218 intern.h       VALUE rb_thread_main _((void));


rb_thread_main_jump

rb_thread_main_jump 10308 eval.c             rb_thread_main_jump(e, RESTORE_RAISE);
rb_thread_main_jump 11682 eval.c         		rb_thread_main_jump(ruby_errinfo, RESTORE_RAISE);
rb_thread_main_jump 11688 eval.c         	    rb_thread_main_jump(ruby_errinfo, RESTORE_EXIT);
rb_thread_main_jump 12102 eval.c             rb_thread_main_jump(rb_class_new_instance(2, args, rb_eSystemExit),


rb_thread_polling

rb_thread_polling 3126 file.c         	    rb_thread_polling();	/* busy wait */
rb_thread_polling  203 intern.h       void rb_thread_polling _((void));
rb_thread_polling  585 process.c      	    rb_thread_polling();
rb_thread_polling  592 process.c      	rb_thread_polling();


rb_thread_raise

rb_thread_raise  10016 eval.c         static VALUE rb_thread_raise _((int, VALUE*, rb_thread_t));
rb_thread_raise  10278 eval.c         	    rb_thread_raise(1, &exc, th);
rb_thread_raise  12170 eval.c             rb_thread_raise(argc, argv, th);


rb_thread_ready

rb_thread_ready  9785 eval.c         static void rb_thread_ready _((rb_thread_t));
rb_thread_ready  9810 eval.c             rb_thread_ready(curr_thread);
rb_thread_ready  10252 eval.c             rb_thread_ready(th);
rb_thread_ready  10598 eval.c         	rb_thread_ready(next);
rb_thread_ready  11015 eval.c             rb_thread_ready(th);
rb_thread_ready  11077 eval.c             rb_thread_ready(th);
rb_thread_ready  11973 eval.c         	    rb_thread_ready(th);
rb_thread_ready  12028 eval.c             rb_thread_ready(main_thread);
rb_thread_ready  12048 eval.c         	rb_thread_ready(curr_thread);
rb_thread_ready  12051 eval.c             rb_thread_ready(main_thread);
rb_thread_ready  12091 eval.c         	rb_thread_ready(curr_thread);
rb_thread_ready  12096 eval.c             rb_thread_ready(main_thread);
rb_thread_ready  12130 eval.c             rb_thread_ready(th);


rb_thread_restore_context

rb_thread_restore_context 10157 eval.c             rb_thread_restore_context(th, exit);
rb_thread_restore_context 10293 eval.c             rb_thread_restore_context(main_thread, tag);
rb_thread_restore_context 10622 eval.c         	    rb_thread_restore_context(next, RESTORE_FATAL);
rb_thread_restore_context 10625 eval.c             rb_thread_restore_context(next, RESTORE_NORMAL);
rb_thread_restore_context 12038 eval.c             rb_thread_restore_context(curr_thread, RESTORE_INTERRUPT);
rb_thread_restore_context 12059 eval.c             rb_thread_restore_context(curr_thread, RESTORE_SIGNAL);
rb_thread_restore_context 12081 eval.c             rb_thread_restore_context(curr_thread, RESTORE_TRAP);
rb_thread_restore_context 12135 eval.c             rb_thread_restore_context(curr_thread, RESTORE_RAISE);
rb_thread_restore_context 12507 eval.c             rb_thread_restore_context(th, RESTORE_NORMAL);


rb_thread_run

rb_thread_run    12729 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     208 intern.h       VALUE rb_thread_run _((VALUE));


rb_thread_save_context

rb_thread_save_context 10141 eval.c             (rb_thread_save_context(th),\
rb_thread_save_context 10601 eval.c         	    rb_thread_save_context(curr_thread);


rb_thread_schedule

rb_thread_schedule 9822 eval.c         	rb_thread_schedule();
rb_thread_schedule 10640 eval.c             rb_thread_schedule();
rb_thread_schedule 10658 eval.c             rb_thread_schedule();
rb_thread_schedule 10713 eval.c             rb_thread_schedule();
rb_thread_schedule 10807 eval.c             rb_thread_schedule();
rb_thread_schedule 10839 eval.c         	rb_thread_schedule();
rb_thread_schedule 11046 eval.c             if (!rb_thread_critical) rb_thread_schedule();
rb_thread_schedule 11079 eval.c             if (!rb_thread_critical) rb_thread_schedule();
rb_thread_schedule 11146 eval.c             rb_thread_schedule();
rb_thread_schedule 11182 eval.c             rb_thread_schedule();
rb_thread_schedule 11197 eval.c         	rb_thread_schedule();
rb_thread_schedule 11231 eval.c             rb_thread_schedule();
rb_thread_schedule 11286 eval.c             rb_thread_schedule();
rb_thread_schedule 11694 eval.c             rb_thread_schedule();
rb_thread_schedule 11957 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  733 ext/zlib/zlib.c 	rb_thread_schedule();
rb_thread_schedule  198 intern.h       void rb_thread_schedule _((void));
rb_thread_schedule  613 process.c      		rb_thread_schedule();
rb_thread_schedule  624 process.c      	if (!rb_thread_alone()) rb_thread_schedule();
rb_thread_schedule  817 process.c      		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  112 ext/io/wait/wait.c     if (rb_thread_select(fd + 1, &rd, NULL, NULL, tp) < 0)
rb_thread_select  894 ext/socket/socket.c 	rb_thread_select(fd+1, 0, &fds_w, &fds_e, 0);
rb_thread_select 1739 ext/socket/socket.c     rb_thread_select(fd+1, &fds, 0, 0, 0);
rb_thread_select  215 intern.h       int rb_thread_select _((int, fd_set *, fd_set *, fd_set *, struct timeval *));
rb_thread_select  369 io.c           	rb_thread_select(f + 1, &rfds, NULL, NULL, NULL);
rb_thread_select  397 io.c           	rb_thread_select(f + 1, NULL, &wfds, NULL, NULL);
rb_thread_select 4629 io.c               n = rb_thread_select(max, rp, wp, ep, tp);


rb_thread_signal_exit

rb_thread_signal_exit  214 intern.h       void rb_thread_signal_exit _((void));
rb_thread_signal_exit  512 signal.c           rb_thread_signal_exit();


rb_thread_signal_raise

rb_thread_signal_raise  213 intern.h       void rb_thread_signal_raise _((char*));
rb_thread_signal_raise  393 signal.c       	    rb_thread_signal_raise(signo2signm(sig));


rb_thread_sleep

rb_thread_sleep   204 intern.h       void rb_thread_sleep _((int));
rb_thread_sleep  2919 io.c           	    rb_thread_sleep(1);
rb_thread_sleep  2994 io.c           	    rb_thread_sleep(1);
rb_thread_sleep   849 process.c      	rb_thread_sleep(1);
rb_thread_sleep  1531 process.c      	    rb_thread_sleep(1);


rb_thread_sleep_forever

rb_thread_sleep_forever 10716 eval.c         void rb_thread_sleep_forever _((void));
rb_thread_sleep_forever 10737 eval.c         	    rb_thread_sleep_forever();
rb_thread_sleep_forever  205 intern.h       void rb_thread_sleep_forever _((void));
rb_thread_sleep_forever 1575 process.c      	rb_thread_sleep_forever();


rb_thread_start

rb_thread_start  12712 eval.c             rb_define_singleton_method(rb_cThread, "start", rb_thread_start, -2);
rb_thread_start  12713 eval.c             rb_define_singleton_method(rb_cThread, "fork", rb_thread_start, -2);


rb_thread_start_0

rb_thread_start_0 11705 eval.c             return rb_thread_start_0(fn, arg, rb_thread_alloc(rb_cThread));
rb_thread_start_0 11807 eval.c             return rb_thread_start_0(rb_thread_yield, args, th);
rb_thread_start_0 11828 eval.c             return rb_thread_start_0(rb_thread_yield, args, rb_thread_alloc(klass));


rb_thread_start_timer

rb_thread_start_timer 11616 eval.c         	rb_thread_start_timer();
rb_thread_start_timer  196 intern.h       void rb_thread_start_timer _((void));
rb_thread_start_timer  915 process.c      #define after_exec() rb_thread_start_timer()


rb_thread_stop

rb_thread_stop   12715 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    206 intern.h       VALUE rb_thread_stop _((void));


rb_thread_stop_timer

rb_thread_stop_timer  197 intern.h       void rb_thread_stop_timer _((void));
rb_thread_stop_timer  914 process.c      #define before_exec() rb_thread_stop_timer()


rb_thread_t

rb_thread_t      1035 eval.c         static rb_thread_t curr_thread = 0;
rb_thread_t      1036 eval.c         static rb_thread_t main_thread;
rb_thread_t      6886 eval.c         	if ((rb_thread_t)th == curr_thread) return Qtrue;
rb_thread_t      9704 eval.c             rb_thread_t join;
rb_thread_t      9744 eval.c             rb_thread_t join;
rb_thread_t      9785 eval.c         static void rb_thread_ready _((rb_thread_t));
rb_thread_t      9898 eval.c             rb_thread_t th;
rb_thread_t      9913 eval.c             rb_thread_t th;
rb_thread_t      9976 eval.c             rb_thread_t th;
rb_thread_t      9989 eval.c             rb_thread_t th;
rb_thread_t      10005 eval.c         static rb_thread_t
rb_thread_t      10013 eval.c             return (rb_thread_t)RDATA(data)->data;
rb_thread_t      10016 eval.c         static VALUE rb_thread_raise _((int, VALUE*, rb_thread_t));
rb_thread_t      10036 eval.c             rb_thread_t th;
rb_thread_t      10144 eval.c         NORETURN(static void rb_thread_restore_context _((rb_thread_t,int)));
rb_thread_t      10147 eval.c         __declspec(noinline) static void stack_extend(rb_thread_t, int);
rb_thread_t      10151 eval.c             rb_thread_t th;
rb_thread_t      10162 eval.c             rb_thread_t th;
rb_thread_t      10166 eval.c             static rb_thread_t tmp;
rb_thread_t      10228 eval.c             rb_thread_t th;
rb_thread_t      10238 eval.c             rb_thread_t th;
rb_thread_t      10248 eval.c             rb_thread_t th;
rb_thread_t      10260 eval.c             rb_thread_t th;
rb_thread_t      10269 eval.c             rb_thread_t th;
rb_thread_t      10383 eval.c             rb_thread_t next;		/* OK */
rb_thread_t      10384 eval.c             rb_thread_t th;
rb_thread_t      10385 eval.c             rb_thread_t curr;
rb_thread_t      10814 eval.c         static int rb_thread_join _((rb_thread_t, double));
rb_thread_t      10818 eval.c             rb_thread_t th;
rb_thread_t      10908 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_t      10973 eval.c             rb_thread_t th;
rb_thread_t      11011 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_t      11068 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_t      11280 eval.c             rb_thread_t th;
rb_thread_t      11307 eval.c             rb_thread_t th;
rb_thread_t      11479 eval.c         static rb_thread_t
rb_thread_t      11483 eval.c             rb_thread_t th;
rb_thread_t      11591 eval.c             rb_thread_t th;
rb_thread_t      11593 eval.c             volatile rb_thread_t th_save = th;
rb_thread_t      11711 eval.c             rb_thread_t th;
rb_thread_t      11757 eval.c             rb_thread_t th = rb_thread_alloc(klass);
rb_thread_t      11793 eval.c             rb_thread_t th;
rb_thread_t      11847 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_t      11882 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_t      11910 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_t      11933 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_t      11943 eval.c             rb_thread_t th;
rb_thread_t      11964 eval.c             rb_thread_t curr, th;
rb_thread_t      12110 eval.c             rb_thread_t th;
rb_thread_t      12112 eval.c             volatile rb_thread_t th_save = th;
rb_thread_t      12165 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_t      12179 eval.c             rb_thread_t th;
rb_thread_t      12228 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_t      12281 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_t      12317 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_t      12338 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_t      12354 eval.c             rb_thread_t th;
rb_thread_t      12437 eval.c             rb_thread_t th;
rb_thread_t      12438 eval.c             volatile rb_thread_t th_save;
rb_thread_t      12487 eval.c             rb_thread_t th = rb_thread_check(cont);
rb_thread_t      12560 eval.c             rb_thread_t th;
rb_thread_t      12658 eval.c             rb_thread_t th;


rb_thread_trap_eval

rb_thread_trap_eval  212 intern.h       void rb_thread_trap_eval _((VALUE, int, int));
rb_thread_trap_eval  398 signal.c       	rb_thread_trap_eval(trap_list[sig].cmd, sig, trap_list[sig].safe);


rb_thread_wait_fd

rb_thread_wait_fd  640 ext/openssl/ossl_ssl.c 	    rb_thread_wait_fd(fileno(fptr->f));
rb_thread_wait_fd  565 ext/socket/socket.c     rb_thread_wait_fd(fd);
rb_thread_wait_fd 1316 ext/socket/socket.c     rb_thread_wait_fd(fd);
rb_thread_wait_fd  199 intern.h       void rb_thread_wait_fd _((int));
rb_thread_wait_fd  182 io.c           	rb_thread_wait_fd(fileno(fp));\
rb_thread_wait_fd  292 io.c           	rb_thread_wait_fd(fileno(fp));
rb_thread_wait_fd  360 io.c           	rb_thread_wait_fd(f);
rb_thread_wait_fd 1055 io.c                   rb_thread_wait_fd(fileno(fptr->f));
rb_thread_wait_fd 1420 io.c           	rb_thread_wait_fd(fileno(f));
rb_thread_wait_fd 1498 io.c           	rb_thread_wait_fd(fileno(f));
rb_thread_wait_fd 1937 io.c           	rb_thread_wait_fd(fileno(f));
rb_thread_wait_fd 2409 io.c               rb_thread_wait_fd(fileno(fptr->f));


rb_thread_wait_for

rb_thread_wait_for 10740 eval.c         	rb_thread_wait_for(*timeout);
rb_thread_wait_for 11211 eval.c             rb_thread_wait_for(rb_time_timeval(INT2FIX(sec)));
rb_thread_wait_for 1016 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  216 intern.h       void rb_thread_wait_for _((struct timeval));
rb_thread_wait_for 1578 process.c      	rb_thread_wait_for(rb_time_interval(argv[0]));


rb_thread_wait_other_threads

rb_thread_wait_other_threads 1374 eval.c         static void rb_thread_wait_other_threads _((void));
rb_thread_wait_other_threads 1515 eval.c         	rb_thread_wait_other_threads();


rb_thread_wakeup

rb_thread_wakeup 11045 eval.c             rb_thread_wakeup(thread);
rb_thread_wakeup 12730 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  207 intern.h       VALUE rb_thread_wakeup _((VALUE));


rb_thread_yield

rb_thread_yield  11807 eval.c             return rb_thread_start_0(rb_thread_yield, args, th);
rb_thread_yield  11828 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  102 ext/io/wait/wait.c 	timerec = rb_time_interval(timeout);
rb_time_interval  130 io.c           struct timeval rb_time_interval _((VALUE));
rb_time_interval 4566 io.c           	timerec = rb_time_interval(timeout);
rb_time_interval   40 process.c      struct timeval rb_time_interval _((VALUE));
rb_time_interval 1578 process.c      	rb_thread_wait_for(rb_time_interval(argv[0]));


rb_time_new

rb_time_new      2387 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       533 file.c             return rb_time_new(get_stat(self)->st_atime, 0);
rb_time_new       550 file.c             return rb_time_new(get_stat(self)->st_mtime, 0);
rb_time_new       569 file.c             return rb_time_new(get_stat(self)->st_ctime, 0);
rb_time_new      1568 file.c             return rb_time_new(st.st_atime, 0);
rb_time_new      1593 file.c             return rb_time_new(st.st_atime, 0);
rb_time_new      1614 file.c             return rb_time_new(st.st_mtime, 0);
rb_time_new      1638 file.c             return rb_time_new(st.st_mtime, 0);
rb_time_new      1661 file.c             return rb_time_new(st.st_ctime, 0);
rb_time_new      1686 file.c             return rb_time_new(st.st_ctime, 0);
rb_time_new      3384 file.c         	    return rb_time_new(st.st_atime, 0);
rb_time_new      3386 file.c         	    return rb_time_new(st.st_mtime, 0);
rb_time_new      3388 file.c         	    return rb_time_new(st.st_ctime, 0);
rb_time_new       446 intern.h       VALUE rb_time_new _((time_t, time_t));
rb_time_new      1303 time.c             result = rb_time_new(sec, usec);
rb_time_new      1385 time.c             return rb_time_new(tobj->tv.tv_sec + 1, tobj->tv.tv_usec);


rb_time_timeval

rb_time_timeval  11188 eval.c         struct timeval rb_time_timeval();
rb_time_timeval  11211 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  1971 file.c         struct timeval rb_time_timeval();
rb_time_timeval  2007 file.c             tvp[0] = rb_time_timeval(atime);
rb_time_timeval  2008 file.c             tvp[1] = rb_time_timeval(mtime);
rb_time_timeval  2045 file.c             tv = rb_time_timeval(atime);
rb_time_timeval  2047 file.c             tv = rb_time_timeval(mtime);
rb_time_timeval   266 time.c         	tv = rb_time_timeval(time);


rb_to_id

rb_to_id          570 eval.c         	remove_method(mod, rb_to_id(argv[i]));
rb_to_id         2054 eval.c         	rb_undef(mod, rb_to_id(argv[i]));
rb_to_id         2135 eval.c             rb_alias(mod, rb_to_id(newname), rb_to_id(oldname));
rb_to_id         4149 eval.c             id = rb_to_id(mid);
rb_to_id         4186 eval.c             return rb_method_boundp(mod, rb_to_id(mid), 1);
rb_to_id         4221 eval.c             ID id = rb_to_id(mid);
rb_to_id         4261 eval.c             ID id = rb_to_id(mid);
rb_to_id         4301 eval.c             ID id = rb_to_id(mid);
rb_to_id         5968 eval.c             vid = rb_call(CLASS_OF(recv), recv, rb_to_id(vid), argc, argv, 1);
rb_to_id         7101 eval.c         	rb_export_method(self, rb_to_id(argv[i]), ex);
rb_to_id         7322 eval.c         	id = rb_to_id(argv[i]);
rb_to_id         7868 eval.c             ID id = rb_to_id(sym);
rb_to_id         7892 eval.c             return rb_autoload_p(mod, rb_to_id(sym));
rb_to_id         8905 eval.c             return mnew(CLASS_OF(obj), obj, rb_to_id(vid), rb_cMethod);
rb_to_id         8945 eval.c             return mnew(mod, Qundef, rb_to_id(vid), rb_cUnboundMethod);
rb_to_id         9386 eval.c         	id = rb_to_id(argv[0]);
rb_to_id         9390 eval.c         	id = rb_to_id(argv[0]);
rb_to_id         12219 eval.c             return rb_thread_local_aref(thread, rb_to_id(id));
rb_to_id         12260 eval.c             return rb_thread_local_aset(thread, rb_to_id(id), val);
rb_to_id         12284 eval.c             if (st_lookup(th->locals, rb_to_id(id), 0))
rb_to_id         12817 eval.c             tag = ID2SYM(rb_to_id(tag));
rb_to_id         12869 eval.c             tag = ID2SYM(rb_to_id(tag));
rb_to_id          553 ext/dl/ptr.c       rb_to_id(rb_ary_entry(rest,i));
rb_to_id          569 ext/dl/ptr.c       data->ids[i] = rb_to_id(vid);
rb_to_id          745 ext/dl/ptr.c     rb_to_id(key);
rb_to_id          750 ext/dl/ptr.c     id = rb_to_id(key);
rb_to_id          880 ext/dl/ptr.c     id = rb_to_id(key);
rb_to_id          261 ext/enumerator/enumerator.c 				 rb_to_id(rb_ivar_get(obj, id_enum_method)),
rb_to_id         1066 ext/syck/rubyext.c         VALUE tpart = rb_to_id( rb_ary_entry( tparts, i ) );
rb_to_id         2669 ext/win32ole/win32ole.c     id = rb_to_id(argv[0]);
rb_to_id          196 numeric.c      	     rb_id2name(rb_to_id(name)),
rb_to_id         1723 object.c           rb_attr(klass, rb_to_id(name), 1, RTEST(pub), Qtrue);
rb_to_id         1745 object.c       	rb_attr(klass, rb_to_id(argv[i]), 1, 0, Qtrue);
rb_to_id         1767 object.c       	rb_attr(klass, rb_to_id(argv[i]), 0, 1, Qtrue);
rb_to_id         1794 object.c       	rb_attr(klass, rb_to_id(argv[i]), 1, 1, Qtrue);
rb_to_id         1812 object.c           ID id = rb_to_id(name);
rb_to_id         1836 object.c           ID id = rb_to_id(name);
rb_to_id         1859 object.c           ID id = rb_to_id(name);
rb_to_id         2006 object.c           ID id = rb_to_id(iv);
rb_to_id         2039 object.c           ID id = rb_to_id(iv);
rb_to_id         2068 object.c           ID id = rb_to_id(iv);
rb_to_id         2102 object.c           ID id = rb_to_id(iv);
rb_to_id          510 ruby.h         ID rb_to_id _((VALUE));
rb_to_id          311 struct.c       	id = rb_to_id(RARRAY(rest)->ptr[i]);
rb_to_id          318 struct.c       	    id = rb_to_id(name);
rb_to_id          612 struct.c       	return rb_struct_aref_id(s, rb_to_id(idx));
rb_to_id          678 struct.c       	return rb_struct_aset_id(s, rb_to_id(idx), val);
rb_to_id          583 variable.c         entry = rb_global_entry(rb_to_id(var));
rb_to_id          641 variable.c         id = rb_to_id(var);
rb_to_id         1170 variable.c         ID id = rb_to_id(name);
rb_to_id         1256 variable.c         uninitialized_constant(klass, rb_to_id(name));
rb_to_id         1469 variable.c         ID id = rb_to_id(name);
rb_to_id         1915 variable.c         ID id = rb_to_id(name);


rb_to_int

rb_to_int         197 bignum.c           val = rb_to_int(val);
rb_to_int         271 bignum.c           val = rb_to_int(val);
rb_to_int        1646 bignum.c           y = rb_to_int(yy);
rb_to_int        1702 bignum.c           y = rb_to_int(yy);
rb_to_int        1760 bignum.c           y = rb_to_int(yy);
rb_to_int         318 intern.h       VALUE rb_to_int _((VALUE));
rb_to_int        1533 numeric.c      	val = rb_to_int(val);
rb_to_int        1693 numeric.c      	  val = rb_to_int(val);
rb_to_int         340 pack.c             x = rb_to_int(x); /* is nil OK? (should not) */
rb_to_int         875 pack.c         		from = rb_to_int(from);
rb_to_int         204 random.c           seed = rb_to_int(vseed);


rb_to_integer

rb_to_integer    2190 object.c           return rb_to_integer(val, "to_int");
rb_to_integer    2219 object.c       	return rb_to_integer(val, "to_i");


rb_trap_eval

rb_trap_eval     10115 eval.c         	rb_trap_eval(th_cmd, th_sig, th_safe);
rb_trap_eval     12069 eval.c         	rb_trap_eval(cmd, sig, safe);


rb_trap_exec

rb_trap_exec     10491 eval.c         	    if (rb_trap_pending) rb_trap_exec();
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      391 intern.h       void rb_trap_exec _((void));
rb_trap_exec       70 regex.c        void rb_trap_exec _((void));
rb_trap_exec       74 regex.c        	if (rb_trap_pending) 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     1477 eval.c         	rb_trap_exit();
rb_trap_exit      390 intern.h       void rb_trap_exit _((void));


rb_trap_restore_mask

rb_trap_restore_mask 4501 eval.c             rb_trap_restore_mask();
rb_trap_restore_mask 12887 eval.c             rb_trap_restore_mask();
rb_trap_restore_mask   78 rubysig.h      void rb_trap_restore_mask _((void));


rb_uint2big

rb_uint2big       165 bignum.c           big = rb_uint2big(n);
rb_uint2big       177 bignum.c           return rb_uint2big(n);
rb_uint2big       445 bignum.c       	    VALUE big = rb_uint2big(val);
rb_uint2big      1296 bignum.c       	    *modp = rb_uint2big((unsigned long)t2);
rb_uint2big        64 intern.h       VALUE rb_uint2big _((unsigned long));
rb_uint2big       953 pack.c         		    VALUE big128 = rb_uint2big(128);
rb_uint2big      1965 pack.c         			VALUE big = rb_uint2big(ul);
rb_uint2big      1966 pack.c         			VALUE big128 = rb_uint2big(128);
rb_uint2big      1969 pack.c         			    big = rb_big_plus(big, rb_uint2big(*s & 0x7f));


rb_uint2inum

rb_uint2inum      287 ext/zlib/zlib.c     return rb_uint2inum(sum);
rb_uint2inum      341 ext/zlib/zlib.c 	rb_ary_push(dst, rb_uint2inum(crctbl[i]));
rb_uint2inum     1003 ext/zlib/zlib.c     return rb_uint2inum(z->stream.avail_out);
rb_uint2inum     1042 ext/zlib/zlib.c     return rb_uint2inum(get_zstream(obj)->stream.total_in);
rb_uint2inum     1052 ext/zlib/zlib.c     return rb_uint2inum(get_zstream(obj)->stream.total_out);
rb_uint2inum     1074 ext/zlib/zlib.c 	return rb_uint2inum(get_zstream(obj)->stream.adler);
rb_uint2inum     2377 ext/zlib/zlib.c     return rb_uint2inum(get_gzfile(obj)->crc);
rb_uint2inum     2629 ext/zlib/zlib.c     return rb_uint2inum(get_gzfile(obj)->z.stream.total_in);
rb_uint2inum     2640 ext/zlib/zlib.c     return rb_uint2inum(gz->z.stream.total_out - gz->z.buf_filled);
rb_uint2inum       66 intern.h       VALUE rb_uint2inum _((unsigned long));
rb_uint2inum      139 ruby.h         VALUE rb_uint2inum _((unsigned long));
rb_uint2inum      140 ruby.h         #define UINT2NUM(v) rb_uint2inum(v)
rb_uint2inum      142 ruby.h         #define rb_uint_new(v) rb_uint2inum(v)


rb_ull2big

rb_ull2big        574 bignum.c           big = rb_ull2big(n);
rb_ull2big        586 bignum.c           return rb_ull2big(n);


rb_ull2inum

rb_ull2inum        79 intern.h       VALUE rb_ull2inum _((unsigned LONG_LONG));
rb_ull2inum       147 ruby.h         VALUE rb_ull2inum _((unsigned LONG_LONG));
rb_ull2inum       148 ruby.h         #define ULL2NUM(v) rb_ull2inum(v)


rb_undef

rb_undef         2054 eval.c         	rb_undef(mod, rb_to_id(argv[i]));
rb_undef         3889 eval.c         	rb_undef(ruby_class, node->nd_mid);
rb_undef          120 intern.h       void rb_undef _((VALUE, ID));


rb_undef_alloc_func

rb_undef_alloc_func 9466 eval.c             rb_undef_alloc_func(rb_cProc);
rb_undef_alloc_func 9483 eval.c             rb_undef_alloc_func(rb_cMethod);
rb_undef_alloc_func 9497 eval.c             rb_undef_alloc_func(rb_cUnboundMethod);
rb_undef_alloc_func 9547 eval.c             rb_undef_alloc_func(rb_cBinding);
rb_undef_alloc_func 12708 eval.c             rb_undef_alloc_func(rb_cThread);
rb_undef_alloc_func 12757 eval.c             rb_undef_alloc_func(rb_cCont);
rb_undef_alloc_func 3334 ext/zlib/zlib.c     rb_undef_alloc_func(cZStream);
rb_undef_alloc_func 3416 ext/zlib/zlib.c     rb_undef_alloc_func(cGzipFile);
rb_undef_alloc_func  154 intern.h       void rb_undef_alloc_func _((VALUE));
rb_undef_alloc_func 2819 numeric.c          rb_undef_alloc_func(rb_cInteger);
rb_undef_alloc_func 2883 numeric.c          rb_undef_alloc_func(rb_cFloat);
rb_undef_alloc_func 2679 object.c           rb_undef_alloc_func(rb_cNilClass);
rb_undef_alloc_func 2686 object.c           rb_undef_alloc_func(rb_cSymbol);
rb_undef_alloc_func 2754 object.c           rb_undef_alloc_func(rb_cData);
rb_undef_alloc_func 2765 object.c           rb_undef_alloc_func(rb_cTrueClass);
rb_undef_alloc_func 2774 object.c           rb_undef_alloc_func(rb_cFalseClass);
rb_undef_alloc_func  897 struct.c           rb_undef_alloc_func(rb_cStruct);


rb_undef_method

rb_undef_method  7823 eval.c             rb_undef_method(rb_cClass, "module_function");
rb_undef_method  9484 eval.c             rb_undef_method(CLASS_OF(rb_cMethod), "new");
rb_undef_method  9498 eval.c             rb_undef_method(CLASS_OF(rb_cUnboundMethod), "new");
rb_undef_method  9548 eval.c             rb_undef_method(CLASS_OF(rb_cBinding), "new");
rb_undef_method  12758 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  3139 ext/socket/socket.c     rb_undef_method(rb_cBasicSocket, "initialize");
rb_undef_method  2820 numeric.c          rb_undef_method(CLASS_OF(rb_cInteger), "new");
rb_undef_method  2884 numeric.c          rb_undef_method(CLASS_OF(rb_cFloat), "new");
rb_undef_method  2680 object.c           rb_undef_method(CLASS_OF(rb_cNilClass), "new");
rb_undef_method  2687 object.c           rb_undef_method(CLASS_OF(rb_cSymbol), "new");
rb_undef_method  2750 object.c           rb_undef_method(rb_cClass, "extend_object");
rb_undef_method  2751 object.c           rb_undef_method(rb_cClass, "append_features");
rb_undef_method  2766 object.c           rb_undef_method(CLASS_OF(rb_cTrueClass), "new");
rb_undef_method  2775 object.c           rb_undef_method(CLASS_OF(rb_cFalseClass), "new");
rb_undef_method  3399 process.c          rb_undef_method(CLASS_OF(rb_cProcStatus), "new");
rb_undef_method  2284 re.c               rb_undef_method(CLASS_OF(rb_cMatch), "new");
rb_undef_method   500 ruby.h         void rb_undef_method _((VALUE,const char*));


rb_values_at

rb_values_at     1789 array.c            return rb_values_at(ary, RARRAY(ary)->len, argc, argv, rb_ary_entry);
rb_values_at       59 intern.h       VALUE rb_values_at _((VALUE, long, int, VALUE*, VALUE(*) _((VALUE,long))));
rb_values_at     1234 re.c               return rb_values_at(match, RMATCH(match)->regs->num_regs, argc, argv, match_entry);
rb_values_at      726 struct.c           return rb_values_at(s, RSTRUCT(s)->len, argc, argv, struct_entry);


rb_w32_accept

rb_w32_accept     164 win32/win32.h  extern int    rb_w32_accept(int, struct sockaddr *, int *);
rb_w32_accept     375 win32/win32.h  #define accept(s, a, l)		rb_w32_accept(s, a, l)


rb_w32_asynchronize

rb_w32_asynchronize  339 win32/win32.c      return rb_w32_asynchronize(locker,
rb_w32_asynchronize  548 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       165 win32/win32.h  extern int    rb_w32_bind(int, struct sockaddr *, int);
rb_w32_bind       380 win32/win32.h  #define bind(s, a, l)		rb_w32_bind(s, a, l)


rb_w32_close

rb_w32_close      116 win32/win32.h  #define close(h)		rb_w32_close(h)
rb_w32_close      535 win32/win32.h  int  rb_w32_close(int);


rb_w32_closedir

rb_w32_closedir    28 win32/dir.h    void           rb_w32_closedir(DIR *);
rb_w32_closedir    35 win32/dir.h    #define closedir  rb_w32_closedir


rb_w32_cmdvector

rb_w32_cmdvector  357 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    166 win32/win32.h  extern int    rb_w32_connect(int, struct sockaddr *, int);
rb_w32_connect    385 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  531 win32/win32.h  void rb_w32_enter_critical(void);


rb_w32_fclose

rb_w32_fclose     117 win32/win32.h  #define fclose(f)		rb_w32_fclose(f)
rb_w32_fclose     536 win32/win32.h  int  rb_w32_fclose(FILE*);


rb_w32_fdclr

rb_w32_fdclr      168 win32/win32.h  extern void   rb_w32_fdclr(int, fd_set*);
rb_w32_fdclr      391 win32/win32.h  #define FD_CLR(f, s)		rb_w32_fdclr(f, s)


rb_w32_fdisset

rb_w32_fdisset    169 win32/win32.h  extern int    rb_w32_fdisset(int, fd_set*);
rb_w32_fdisset    394 win32/win32.h  #define FD_ISSET(f, s)		rb_w32_fdisset(f, s)


rb_w32_fdopen

rb_w32_fdopen     134 win32/win32.h  #define fdopen(h, m)		rb_w32_fdopen(h, m)
rb_w32_fdopen     221 win32/win32.h  extern FILE *rb_w32_fdopen(int, const char *);


rb_w32_fdset

rb_w32_fdset      167 win32/win32.h  extern void   rb_w32_fdset(int, fd_set*);
rb_w32_fdset      388 win32/win32.h  #define FD_SET(f, s)		rb_w32_fdset(f, s)


rb_w32_fopen

rb_w32_fopen      132 win32/win32.h  #define fopen(p, m)		rb_w32_fopen(p, m)
rb_w32_fopen      220 win32/win32.h  extern FILE *rb_w32_fopen(const char *, const char *);


rb_w32_free_environ

rb_w32_free_environ 1613 hash.c         #define FREE_ENVIRON(e) rb_w32_free_environ(e)
rb_w32_free_environ  195 win32/win32.h  extern void   rb_w32_free_environ(char **);


rb_w32_fsopen

rb_w32_fsopen     136 win32/win32.h  #define fsopen(p, m, sh)	rb_w32_fsopen(p, m, sh)
rb_w32_fsopen     222 win32/win32.h  extern FILE *rb_w32_fsopen(const char *, const char *, int);


rb_w32_get_environ

rb_w32_get_environ 1612 hash.c         #define GET_ENVIRON(e) (e = rb_w32_get_environ())
rb_w32_get_environ  194 win32/win32.h  extern char **rb_w32_get_environ(void);


rb_w32_get_osfhandle

rb_w32_get_osfhandle  679 file.c         	f = (HANDLE)rb_w32_get_osfhandle(fileno(fptr->f));
rb_w32_get_osfhandle  183 win32/win32.h  extern SOCKET rb_w32_get_osfhandle(int);
rb_w32_get_osfhandle  497 win32/win32.h  #define get_osfhandle(h)	rb_w32_get_osfhandle(h)


rb_w32_getc

rb_w32_getc       103 win32/win32.h  #define getc(_stream)		rb_w32_getc(_stream)
rb_w32_getc       107 win32/win32.h  #define getchar()		rb_w32_getc(stdin)
rb_w32_getc       534 win32/win32.h  int  rb_w32_getc(FILE*);


rb_w32_getenv

rb_w32_getenv     191 win32/win32.h  extern char * rb_w32_getenv(const char *);
rb_w32_getenv     507 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  184 win32/win32.h  extern struct hostent * rb_w32_gethostbyaddr(char *, int, int);
rb_w32_gethostbyaddr  462 win32/win32.h  #define gethostbyaddr(a, l, t)	rb_w32_gethostbyaddr(a, l, t)


rb_w32_gethostbyname

rb_w32_gethostbyname  185 win32/win32.h  extern struct hostent * rb_w32_gethostbyname(char *);
rb_w32_gethostbyname  467 win32/win32.h  #define gethostbyname(n)	rb_w32_gethostbyname(n)


rb_w32_gethostname

rb_w32_gethostname  186 win32/win32.h  extern int    rb_w32_gethostname(char *, int);
rb_w32_gethostname  472 win32/win32.h  #define gethostname(n, l)	rb_w32_gethostname(n, l)


rb_w32_getpeername

rb_w32_getpeername  171 win32/win32.h  extern int    rb_w32_getpeername(int, struct sockaddr *, int *);
rb_w32_getpeername  402 win32/win32.h  #define getpeername(s, a, l)	rb_w32_getpeername(s, a, l)


rb_w32_getpid

rb_w32_getpid     118 win32/win32.h  #define getpid()		rb_w32_getpid()
rb_w32_getpid     210 win32/win32.h  extern rb_pid_t rb_w32_getpid(void);


rb_w32_getprotobyname

rb_w32_getprotobyname  187 win32/win32.h  extern struct protoent * rb_w32_getprotobyname(char *);
rb_w32_getprotobyname  477 win32/win32.h  #define getprotobyname(n)	rb_w32_getprotobyname(n)


rb_w32_getprotobynumber

rb_w32_getprotobynumber  188 win32/win32.h  extern struct protoent * rb_w32_getprotobynumber(int);
rb_w32_getprotobynumber  482 win32/win32.h  #define getprotobynumber(n)	rb_w32_getprotobynumber(n)


rb_w32_getservbyname

rb_w32_getservbyname  189 win32/win32.h  extern struct servent  * rb_w32_getservbyname(char *, char *);
rb_w32_getservbyname  487 win32/win32.h  #define getservbyname(n, p)	rb_w32_getservbyname(n, p)


rb_w32_getservbyport

rb_w32_getservbyport  190 win32/win32.h  extern struct servent  * rb_w32_getservbyport(int, char *);
rb_w32_getservbyport  492 win32/win32.h  #define getservbyport(p, pr)	rb_w32_getservbyport(p, pr)


rb_w32_getsockname

rb_w32_getsockname  172 win32/win32.h  extern int    rb_w32_getsockname(int, struct sockaddr *, int *);
rb_w32_getsockname  407 win32/win32.h  #define getsockname(s, a, l)	rb_w32_getsockname(s, a, l)


rb_w32_getsockopt

rb_w32_getsockopt  173 win32/win32.h  extern int    rb_w32_getsockopt(int, int, int, char *, int *);
rb_w32_getsockopt  412 win32/win32.h  #define getsockopt(s, v, n, o, l) rb_w32_getsockopt(s, v, n, o, l)


rb_w32_ioctlsocket

rb_w32_ioctlsocket  174 win32/win32.h  extern int    rb_w32_ioctlsocket(int, long, u_long *);
rb_w32_ioctlsocket  417 win32/win32.h  #define ioctlsocket(s, c, a)	rb_w32_ioctlsocket(s, c, a)


rb_w32_isatty

rb_w32_isatty     145 win32/win32.h  #define isatty(h)		rb_w32_isatty(h)
rb_w32_isatty     213 win32/win32.h  extern int rb_w32_isatty(int);


rb_w32_iswin95

rb_w32_iswin95    686 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    224 win32/win32.c  #define IsWin95() rb_w32_iswin95()


rb_w32_leave_critical

rb_w32_leave_critical   38 rubysig.h          rb_w32_leave_critical();\
rb_w32_leave_critical  532 win32/win32.h  void rb_w32_leave_critical(void);


rb_w32_listen

rb_w32_listen     175 win32/win32.h  extern int    rb_w32_listen(int, int);
rb_w32_listen     422 win32/win32.h  #define listen(s, b)		rb_w32_listen(s, b)


rb_w32_main_context

rb_w32_main_context  408 signal.c       #define IN_MAIN_CONTEXT(f, a) (rb_w32_main_context(a, f) ? (void)0 : f(a))
rb_w32_main_context  529 win32/win32.h  int  rb_w32_main_context(int arg, void (*handler)(int));


rb_w32_mkdir

rb_w32_mkdir      148 win32/win32.h  #define mkdir(p, m)		rb_w32_mkdir(p, m)
rb_w32_mkdir      215 win32/win32.h  extern int rb_w32_mkdir(const char *, int);


rb_w32_open_osfhandle

rb_w32_open_osfhandle   91 win32/win32.c  static int rb_w32_open_osfhandle(long osfhandle, int flags);
rb_w32_open_osfhandle  672 win32/win32.c  	    fd = rb_w32_open_osfhandle((long)hDupInFile,
rb_w32_open_osfhandle  692 win32/win32.c  	    fd = rb_w32_open_osfhandle((long)hDupOutFile,
rb_w32_open_osfhandle 2001 win32/win32.c  	    s = rb_w32_open_osfhandle(r, O_RDWR|O_BINARY);
rb_w32_open_osfhandle 2256 win32/win32.c  	    fd = rb_w32_open_osfhandle(s, O_RDWR|O_BINARY);


rb_w32_opendir

rb_w32_opendir     23 win32/dir.h    DIR*           rb_w32_opendir(const char*);
rb_w32_opendir     30 win32/dir.h    #define opendir   rb_w32_opendir


rb_w32_osid

rb_w32_osid        84 win32/win32.h  extern DWORD rb_w32_osid(void);
rb_w32_osid        85 win32/win32.h  #define rb_w32_iswinnt()  (rb_w32_osid() == VER_PLATFORM_WIN32_NT)
rb_w32_osid        86 win32/win32.h  #define rb_w32_iswin95()  (rb_w32_osid() == VER_PLATFORM_WIN32_WINDOWS)


rb_w32_putc

rb_w32_putc       104 win32/win32.h  #define putc(_c, _stream)	rb_w32_putc(_c, _stream)
rb_w32_putc       108 win32/win32.h  #define putchar(_c)		rb_w32_putc(_c, stdout)
rb_w32_putc       533 win32/win32.h  int  rb_w32_putc(int, FILE*);


rb_w32_readdir

rb_w32_readdir     24 win32/dir.h    struct direct* rb_w32_readdir(DIR *);
rb_w32_readdir     31 win32/dir.h    #define readdir   rb_w32_readdir


rb_w32_recv

rb_w32_recv       176 win32/win32.h  extern int    rb_w32_recv(int, char *, int, int);
rb_w32_recv       427 win32/win32.h  #define recv(s, b, l, f)	rb_w32_recv(s, b, l, f)


rb_w32_recvfrom

rb_w32_recvfrom   177 win32/win32.h  extern int    rb_w32_recvfrom(int, char *, int, int, struct sockaddr *, int *);
rb_w32_recvfrom   432 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     192 win32/win32.h  extern int    rb_w32_rename(const char *, const char *);
rb_w32_rename     512 win32/win32.h  #define rename(o, n)		rb_w32_rename(o, n)


rb_w32_rewinddir

rb_w32_rewinddir   27 win32/dir.h    void           rb_w32_rewinddir(DIR *);
rb_w32_rewinddir   34 win32/dir.h    #define rewinddir rb_w32_rewinddir


rb_w32_rmdir

rb_w32_rmdir      150 win32/win32.h  #define rmdir(p)		rb_w32_rmdir(p)
rb_w32_rmdir      216 win32/win32.h  extern int rb_w32_rmdir(const char *);


rb_w32_seekdir

rb_w32_seekdir     26 win32/dir.h    void           rb_w32_seekdir(DIR *, long);
rb_w32_seekdir     33 win32/dir.h    #define seekdir   rb_w32_seekdir


rb_w32_select

rb_w32_select     170 win32/win32.h  extern long   rb_w32_select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
rb_w32_select     397 win32/win32.h  #define select(n, r, w, e, t)	rb_w32_select(n, r, w, e, t)


rb_w32_send

rb_w32_send       178 win32/win32.h  extern int    rb_w32_send(int, char *, int, int);
rb_w32_send       437 win32/win32.h  #define send(s, b, l, f)	rb_w32_send(s, b, l, f)


rb_w32_sendto

rb_w32_sendto     179 win32/win32.h  extern int    rb_w32_sendto(int, char *, int, int, struct sockaddr *, int);
rb_w32_sendto     442 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  180 win32/win32.h  extern int    rb_w32_setsockopt(int, int, int, char *, int);
rb_w32_setsockopt  447 win32/win32.h  #define setsockopt(s, v, n, o, l) rb_w32_setsockopt(s, v, n, o, l)


rb_w32_shutdown

rb_w32_shutdown   181 win32/win32.h  extern int    rb_w32_shutdown(int, int);
rb_w32_shutdown   452 win32/win32.h  #define shutdown(s, h)		rb_w32_shutdown(s, h)


rb_w32_sleep

rb_w32_sleep      119 win32/win32.h  #define sleep(x)		rb_w32_sleep((x)*1000)
rb_w32_sleep      530 win32/win32.h  int  rb_w32_sleep(unsigned long msec);
rb_w32_sleep      538 win32/win32.h  #define Sleep(msec) (void)rb_w32_sleep(msec)


rb_w32_snprintf

rb_w32_snprintf   198 win32/win32.h  #define snprintf   rb_w32_snprintf
rb_w32_snprintf   200 win32/win32.h  extern int rb_w32_snprintf(char *, size_t, const char *, ...);


rb_w32_socket

rb_w32_socket     182 win32/win32.h  extern int    rb_w32_socket(int, int, int);
rb_w32_socket     457 win32/win32.h  #define socket(s, t, p)		rb_w32_socket(s, t, p)


rb_w32_stat

rb_w32_stat      1373 win32/win32.c      if (rb_w32_stat(filename, &sbuf) < 0)
rb_w32_stat      3457 win32/win32.c      if (rb_w32_stat(path, &stat)) {
rb_w32_stat       140 win32/win32.h  #define stat(path,st)		rb_w32_stat(path,st)
rb_w32_stat       193 win32/win32.h  extern int    rb_w32_stat(const char *, struct stat *);


rb_w32_strerror

rb_w32_strerror   307 win32/win32.h  extern char *rb_w32_strerror(int);
rb_w32_strerror   309 win32/win32.h  #define strerror(e) rb_w32_strerror(e)


rb_w32_telldir

rb_w32_telldir     25 win32/dir.h    long           rb_w32_telldir(DIR *);
rb_w32_telldir     32 win32/dir.h    #define telldir   rb_w32_telldir


rb_w32_times

rb_w32_times      524 win32/win32.h  #define times(t) rb_w32_times(t)
rb_w32_times      525 win32/win32.h  int rb_w32_times(struct tms *);


rb_w32_unlink

rb_w32_unlink     152 win32/win32.h  #define unlink(p)		rb_w32_unlink(p)
rb_w32_unlink     217 win32/win32.h  extern int rb_w32_unlink(const char*);


rb_w32_utime

rb_w32_utime      111 win32/win32.h  #define utime(_p, _t)		rb_w32_utime(_p, _t)
rb_w32_utime      537 win32/win32.h  int  rb_w32_utime(const char *, struct utimbuf *);


rb_w32_vsnprintf

rb_w32_vsnprintf  197 win32/win32.h  #define vsnprintf(s,n,f,l) rb_w32_vsnprintf(s,n,f,l)
rb_w32_vsnprintf  199 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        348 intern.h       int rb_waitpid _((int,int*,int));
rb_waitpid        741 process.c          if ((pid = rb_waitpid(pid, &status, flags)) < 0)
rb_waitpid        828 process.c      	pid = rb_waitpid(-1, &status, 0);
rb_waitpid        847 process.c      	cpid = rb_waitpid(*pid_p, &status, WNOHANG);
rb_waitpid       1379 process.c      	i = rb_waitpid(pid, &status, 0);


rb_warn

rb_warn           305 array.c        	    rb_warn("block supersedes default value argument");
rb_warn           824 array.c        	rb_warn("block supersedes default value argument");
rb_warn           916 array.c            rb_warn("Array#%s is deprecated; use Array#values_at", rb_id2name(rb_frame_last_func()));
rb_warn          1368 array.c        	rb_warn("invalid inspect_tbl value");
rb_warn           888 bignum.c       	rb_warn("Bignum out of Float range");
rb_warn          1600 bignum.c       	rb_warn("in a**b, b may be too big");
rb_warn           229 class.c        	rb_warn("no super class for `%s', Object assumed", name);
rb_warn           261 class.c        	rb_warn("no super class for `%s::%s', Object assumed",
rb_warn           649 dir.c          	    rb_warn("conflicting chdir during another chdir block");
rb_warn           391 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           591 eval.c             rb_warn("rb_enable_super() is obsolete");
rb_warn          1858 eval.c         	    rb_warn("class variable access from toplevel singleton method");
rb_warn          1969 eval.c         	rb_warn("undefining `%s' may cause serious problem", rb_id2name(id));
rb_warn          3815 eval.c         		rb_warn("redefining Object#initialize may cause infinite loop");
rb_warn          3818 eval.c         		rb_warn("redefining `%s' may cause serious problem",
rb_warn          4860 eval.c         			rb_warn("multiple values for a block parameter (%d for 1)\n\tfrom %s:%d",
rb_warn          5140 eval.c         	    rb_warn("declaring singleton class variable");
rb_warn          8227 eval.c         	rb_warn("tried to create Proc object without a block");
rb_warn          8304 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           288 ext/dbm/dbm.c  	rb_warn("DBM#select(index..) is deprecated; use DBM#values_at");
rb_warn           383 ext/gdbm/gdbm.c 	rb_warn("GDBM#select(index..) is deprecated; use GDBM#values_at");
rb_warn           304 ext/openssl/ossl.c 	    rb_warn("error on stack: %s", ERR_error_string(e, NULL));
rb_warn           178 ext/openssl/ossl.h   rb_warn(fmt, ##__VA_ARGS__); \
rb_warn           184 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           265 ext/sdbm/init.c 	rb_warn("SDBM#select(index..) is deprecated; use SDBM#values_at");
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          2212 ext/zlib/zlib.c 	rb_warn("Zlib::GzipWriter object must be closed explicitly.");
rb_warn          2220 ext/zlib/zlib.c 	    rb_warn("gzip footer is not written; broken gzip file");
rb_warn          4076 file.c         	    rb_warn("Insecure world writable dir %s, mode 0%o", p0, st.st_mode);
rb_warn          1653 gc.c               rb_warn("ObjectSpace::add_finalizer is deprecated; use define_finalizer");
rb_warn          1669 gc.c               rb_warn("ObjectSpace::remove_finalizer is deprecated; use undefine_finalizer");
rb_warn          1680 gc.c               rb_warn("ObjectSpace::finalizers is deprecated");
rb_warn          1692 gc.c               rb_warn("ObjectSpace::call_finalizer is deprecated; use define_finalizer");
rb_warn           468 hash.c         	rb_warn("block supersedes default value argument");
rb_warn           627 hash.c             rb_warn("Hash#%s is deprecated; use Hash#values_at",
rb_warn          1729 hash.c         	rb_warn("block supersedes default value argument");
rb_warn          2278 hash.c             rb_warn("ENV.%s is deprecated; use ENV.values_at",
rb_warn          2310 io.c           	rb_warn("sysseek for buffered IO");
rb_warn          2349 io.c           	rb_warn("syswrite for buffered IO");
rb_warn          2677 io.c           	rb_warn("setvbuf() can't be honoured for %s", fname);
rb_warn          2721 io.c           	rb_warn("setvbuf() can't be honoured (fd=%d)", fd);
rb_warn          3515 io.c           	rb_warn("setvbuf() can't be honoured for %s", RSTRING(fname)->ptr);
rb_warn          3984 io.c               rb_warn("$defout is obsolete; use $stdout instead");
rb_warn          3994 io.c               rb_warn("$deferr is obsolete; use $stderr instead");
rb_warn          4156 io.c           	rb_warn("%s::new() does not take block; use %s::open() instead",
rb_warn          4240 io.c           		    rb_warn("Can't do inplace edit for stdio; skipping");
rb_warn          4270 io.c           			    rb_warn("Can't rename %s to %s: %s, skipping file",
rb_warn          4282 io.c           			    rb_warn("Can't remove %s: %s, skipping file",
rb_warn          4319 io.c           	    rb_warn("Can't do inplace edit for stdio");
rb_warn          4467 io.c               rb_warn("getc is obsolete; use STDIN.getc instead");
rb_warn          1287 marshal.c      		   rb_warn("define `allocate' instead of `_alloc'");
rb_warn          1420 marshal.c      	rb_warn("incompatible marshal file format (can be read)\n\
rb_warn           152 object.c           rb_warn("Object#id will be deprecated; use Object#object_id");
rb_warn           177 object.c           rb_warn("Object#type is deprecated; use Object#class");
rb_warn           338 object.c           rb_warn("default `to_a' will be obsolete");
rb_warn          1653 object.c       	rb_warn("Symbols should not contain NUL (\\0)");
rb_warn          1669 object.c       	rb_warn("do not use Fixnums as Symbols");
rb_warn          2267 object.c       	rb_warn("Float %*s out of range", end-p, p);
rb_warn          2301 object.c       	    rb_warn("Float %*s out of range", end-p, p);
rb_warn          2425 object.c       	rb_warn("string contains \\0 character");
rb_warn          3704 parse.c        			    rb_warn("else without rescue is useless");
rb_warn          3854 parse.c        			    rb_warn("END in method; use at_exit");
rb_warn          4844 parse.c        		        rb_warn("parenthesize argument(s) for future version");
rb_warn          4889 parse.c        		        rb_warn("parenthesize argument for future version");
rb_warn          4896 parse.c        		        rb_warn("parenthesize argument for future version");
rb_warn          4903 parse.c        		        rb_warn("parenthesize argument(s) for future version");
rb_warn          5051 parse.c        		        rb_warn("don't put space before argument parentheses");
rb_warn          5062 parse.c        		        rb_warn("don't put space before argument parentheses");
rb_warn          7615 parse.c        		    rb_warn("invalid character syntax; use ?\\%c", c2);
rb_warn          7624 parse.c        	    rb_warn("multibyte character literal not supported yet; use ?\\%.3o", c);
rb_warn          7981 parse.c        		    rb_warn("Float %s out of range", tok());
rb_warn          8100 parse.c        		rb_warn("don't put space before argument parentheses");
rb_warn          8564 parse.c            rb_warn(mesg);
rb_warn          8838 parse.c        	rb_warn("ambiguous identifier; %s() or self.%s is better for method call",
rb_warn          9168 parse.c        	rb_warn("useless use of %s in void context", useless);
rb_warn          9335 parse.c        	rb_warn("string literal in condition");
rb_warn           380 parse.y        			    rb_warn("else without rescue is useless");
rb_warn           499 parse.y        			    rb_warn("END in method; use at_exit");
rb_warn          1246 parse.y        		        rb_warn("parenthesize argument(s) for future version");
rb_warn          1279 parse.y        		        rb_warn("parenthesize argument for future version");
rb_warn          1284 parse.y        		        rb_warn("parenthesize argument for future version");
rb_warn          1295 parse.y        		        rb_warn("parenthesize argument(s) for future version");
rb_warn          1405 parse.y        		        rb_warn("don't put space before argument parentheses");
rb_warn          1410 parse.y        		        rb_warn("don't put space before argument parentheses");
rb_warn          3617 parse.y        		    rb_warn("invalid character syntax; use ?\\%c", c2);
rb_warn          3626 parse.y        	    rb_warn("multibyte character literal not supported yet; use ?\\%.3o", c);
rb_warn          3983 parse.y        		    rb_warn("Float %s out of range", tok());
rb_warn          4102 parse.y        		rb_warn("don't put space before argument parentheses");
rb_warn          4566 parse.y            rb_warn(mesg);
rb_warn          4840 parse.y        	rb_warn("ambiguous identifier; %s() or self.%s is better for method call",
rb_warn          5170 parse.y        	rb_warn("useless use of %s in void context", useless);
rb_warn          5337 parse.y        	rb_warn("string literal in condition");
rb_warn          1662 re.c           	    rb_warn("flags%s ignored", (argc == 3) ? " and encoding": "");
rb_warn          2155 re.c               rb_warn("modifying %s is deprecated", rb_id2name(id));
rb_warn           188 regex.c        void rb_warn _((const char*, ...));
rb_warn           189 regex.c        # define re_warning(x) rb_warn(x)
rb_warn           545 ruby.h         void rb_warn __((const char*, ...));		/* reports always */
rb_warn           788 sprintf.c      	if (RTEST(ruby_verbose)) rb_warn(mesg);
rb_warn           201 struct.c       	    rb_warn("redefining constant Struct::%s", cname);
rb_warn          1875 time.c             rb_warn("obsolete method Time::times; use Process::times");
rb_warn          1415 variable.c     		rb_warn("toplevel constant %s referenced by %s::%s",
rb_warn          1660 variable.c     		rb_warn("already initialized %s %s", dest, rb_id2name(id));
rb_warn          1685 variable.c     	rb_warn("rb_define_const: invalide name `%s' for constant", name);


rb_warning

rb_warning        276 array.c        	    rb_warning("given block not used");
rb_warning        664 eval.c         	    rb_warning((scope_vmode == SCOPE_MODFUNC) ?
rb_warning       2096 eval.c         	    rb_warning("discarding old %s", rb_id2name(name));
rb_warning       3825 eval.c         		    rb_warning("method redefined; discarding old %s", rb_id2name(node->nd_mid));
rb_warning       3875 eval.c         		    rb_warning("redefine %s", rb_id2name(node->nd_mid));
rb_warning       5103 eval.c         	rb_warning("assigning void value");
rb_warning       7508 eval.c         	rb_warning("main#include in the wrapped load is effective only in wrapper module");
rb_warning       8354 eval.c         	rb_warning("block for %s#%s is useless",
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        173 ext/openssl/ossl.h   rb_warning(fmt, ##__VA_ARGS__); \
rb_warning        183 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        246 ext/openssl/ossl_cipher.c     rb_warning("%s#<< is deprecated; use %s#update instead", cname, cname);
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        310 ext/openssl/ossl_ssl.c 	rb_warning("using default DH parameters.");
rb_warning        378 ext/openssl/ossl_ssl.c 	    rb_warning("can't set verify locations");
rb_warning        436 ext/openssl/ossl_ssl.c         rb_warning("SSL_CTX is not initialized.");
rb_warning        664 ext/openssl/ossl_ssl.c         rb_warning("SSL session is not started yet.");
rb_warning        708 ext/openssl/ossl_ssl.c         rb_warning("SSL session is not started yet.");
rb_warning        737 ext/openssl/ossl_ssl.c         rb_warning("SSL session is not started yet.");
rb_warning        763 ext/openssl/ossl_ssl.c         rb_warning("SSL session is not started yet.");
rb_warning        789 ext/openssl/ossl_ssl.c 	rb_warning("SSL session is not started yet.");
rb_warning        812 ext/openssl/ossl_ssl.c         rb_warning("SSL session is not started yet.");
rb_warning        828 ext/openssl/ossl_ssl.c         rb_warning("SSL session is not started yet.");
rb_warning        846 ext/openssl/ossl_ssl.c         rb_warning("SSL session is not started yet.");
rb_warning        278 ext/strscan/strscan.c     rb_warning("StringScanner#clear is obsolete; use #terminate instead");
rb_warning        733 ext/strscan/strscan.c     rb_warning("StringScanner#getbyte is obsolete; use #get_byte instead");
rb_warning        774 ext/strscan/strscan.c     rb_warning("StringScanner#peep is obsolete; use #peek instead");
rb_warning        859 ext/strscan/strscan.c     rb_warning("StringScanner#empty? is obsolete; use #eos? instead");
rb_warning        956 ext/strscan/strscan.c     rb_warning("StringScanner#matchedsize is obsolete; use #matched_size instead");
rb_warning       1081 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        680 ext/zlib/zlib.c 	    rb_warning("attempt to close uninitialized zstream; ignored.");
rb_warning        686 ext/zlib/zlib.c 	    rb_warning("attempt to close unfinished zstream; reset forced.");
rb_warning       1357 ext/zlib/zlib.c 	    rb_warning("deflateParams() returned Z_BUF_ERROR");
rb_warning       1079 io.c                               rb_warning("nonblocking IO#read is obsolete; use IO#readpartial or IO#sysread");
rb_warning       1151 object.c           rb_warning("treating Symbol as an integer");
rb_warning       5137 parse.c        		        rb_warning("(...) interpreted as grouped expression");
rb_warning       7341 parse.c            rb_warning("ambiguous first argument; put parentheses or even spaces");
rb_warning       7427 parse.c        		rb_warning("`*' interpreted as argument prefix");
rb_warning       7656 parse.c        	    rb_warning("`&' interpreted as argument prefix");
rb_warning       8553 parse.c            rb_warning(mesg);
rb_warning       1479 parse.y        		        rb_warning("(...) interpreted as grouped expression");
rb_warning       3343 parse.y            rb_warning("ambiguous first argument; put parentheses or even spaces");
rb_warning       3429 parse.y        		rb_warning("`*' interpreted as argument prefix");
rb_warning       3658 parse.y        	    rb_warning("`&' interpreted as argument prefix");
rb_warning       4555 parse.y            rb_warning(mesg);
rb_warning        543 ruby.h         void rb_warning __((const char*, ...));		/* reports if `-w' specified */
rb_warning        556 sprintf.c      			    rb_warning("negative number for %%u specifier");
rb_warning        610 sprintf.c      			rb_warning("negative number for %%u specifier");
rb_warning        330 time.c         	rb_warning("2 digits year is used");
rb_warning        333 time.c         	rb_warning("2 or 3 digits year is used");
rb_warning       1836 time.c         	rb_warning("strftime called with empty format string");
rb_warning        369 variable.c         rb_warning("global variable `%s' not initialized", rb_id2name(id));
rb_warning        865 variable.c     	rb_warning("instance variable %s not initialized", rb_id2name(id));
rb_warning       1021 variable.c     	rb_warning("instance variable %s not initialized", rb_id2name(id));
rb_warning       1721 variable.c     		rb_warning("class variable %s of %s is overridden by %s",
rb_warning       1746 variable.c     		rb_warning("already initialized class variable %s", rb_id2name(id));


rb_with_disable_interrupt

rb_with_disable_interrupt   77 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   1563 error.c        	rb_write_error(s);
rb_write_error   1564 error.c        	rb_write_error("\n");
rb_write_error   1127 eval.c             rb_write_error(buf);
rb_write_error   1130 eval.c         #define warn_print(x) rb_write_error(x)
rb_write_error    284 intern.h       void rb_write_error _((const char*));


rb_write_error2

rb_write_error2   126 error.c            rb_write_error2(buf, len);
rb_write_error2  1131 eval.c         #define warn_print2(x,l) rb_write_error2(x,l)
rb_write_error2   285 intern.h       void rb_write_error2 _((const char*, long));
rb_write_error2  3951 io.c               rb_write_error2(mesg, strlen(mesg));


rb_yield

rb_yield          308 array.c        	    rb_ary_store(ary, i, rb_yield(LONG2NUM(i)));
rb_yield          832 array.c        	if (block_given) return rb_yield(pos);
rb_yield         1128 array.c        	rb_yield(RARRAY(ary)->ptr[i]);
rb_yield         1155 array.c        	rb_yield(LONG2NUM(i));
rb_yield         1182 array.c        	rb_yield(RARRAY(ary)->ptr[len]);
rb_yield         1702 array.c        	rb_ary_push(collect, rb_yield(RARRAY(ary)->ptr[i]));
rb_yield         1729 array.c        	rb_ary_store(ary, i, rb_yield(RARRAY(ary)->ptr[i]));
rb_yield         1813 array.c        	if (RTEST(rb_yield(RARRAY(ary)->ptr[i]))) {
rb_yield         1855 array.c        	    return rb_yield(item);
rb_yield         1990 array.c        	if (RTEST(rb_yield(v))) continue;
rb_yield         2082 array.c        	    rb_yield(tmp);
rb_yield         2273 array.c        	    v = rb_yield(LONG2NUM(i));
rb_yield          316 dir.c          	return rb_ensure(rb_yield, dir, dir_close, dir);
rb_yield          414 dir.c          	rb_yield(rb_tainted_str_new(dp->d_name, NAMLEN(dp)));
rb_yield          571 dir.c              return rb_yield(args->new_path);
rb_yield           42 enum.c         	rb_ary_push(arg[1], rb_yield(i));
rb_yield           85 enum.c             if (RTEST(rb_yield(i))) {
rb_yield          131 enum.c             if (RTEST(rb_yield(i))) {
rb_yield          165 enum.c             if (!RTEST(rb_yield(i))) {
rb_yield          197 enum.c             rb_ary_push(ary, rb_yield(i));
rb_yield          319 enum.c             if (RTEST(rb_yield(i))) {
rb_yield          384 enum.c             v = rb_yield(i);
rb_yield          505 enum.c             if (!RTEST(rb_yield(i))) {
rb_yield          556 enum.c             if (RTEST(rb_yield(i))) {
rb_yield          834 enum.c         	rb_yield(tmp);
rb_yield         12461 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          280 ext/dbm/dbm.c  	    v = rb_yield(assoc);
rb_yield          339 ext/dbm/dbm.c  	if (rb_block_given_p()) return rb_yield(keystr);
rb_yield          399 ext/dbm/dbm.c          ret = rb_protect(rb_yield, rb_assoc_new(rb_str_dup(keystr), valstr), &status);
rb_yield          587 ext/dbm/dbm.c  	rb_yield(rb_tainted_str_new(val.dptr, val.dsize));
rb_yield          603 ext/dbm/dbm.c  	rb_yield(rb_tainted_str_new(key.dptr, key.dsize));
rb_yield          624 ext/dbm/dbm.c  	rb_yield(rb_assoc_new(keystr, valstr));
rb_yield           86 ext/dl/handle.c     rb_ensure(rb_yield, self, rb_dlhandle_close, self);
rb_yield         1016 ext/dl/ptr.c     rb_yield(rb_assoc_new(key,(VALUE)DLNUM2LONG(val)));
rb_yield           80 ext/enumerator/enumerator.c 	rb_yield(ary);
rb_yield          117 ext/enumerator/enumerator.c     if (RARRAY(ary)->len > 0) rb_yield(ary);
rb_yield          149 ext/enumerator/enumerator.c 	rb_yield(rb_ary_dup(ary));
rb_yield          263 ext/enumerator/enumerator.c     val = rb_iterate((VALUE (*)_((VALUE)))enumerator_iter, obj, rb_yield, 0);
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          374 ext/gdbm/gdbm.c 	    VALUE v = rb_yield(assoc);
rb_yield          493 ext/gdbm/gdbm.c         ret = rb_protect(rb_yield, rb_assoc_new(keystr, valstr), &status);
rb_yield          690 ext/gdbm/gdbm.c         rb_yield(rb_gdbm_fetch2(dbm, keystr));
rb_yield          708 ext/gdbm/gdbm.c         rb_yield(keystr);
rb_yield          726 ext/gdbm/gdbm.c         rb_yield(rb_assoc_new(keystr, rb_gdbm_fetch2(dbm, keystr)));
rb_yield          334 ext/iconv/iconv.c     return rb_yield(failed);
rb_yield          576 ext/iconv/iconv.c 	return rb_ensure(rb_yield, self, (VALUE(*)())iconv_finish, self);
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          633 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          257 ext/sdbm/init.c 	    v = rb_yield(assoc);
rb_yield          318 ext/sdbm/init.c 	if (rb_block_given_p()) return rb_yield(keystr);
rb_yield          378 ext/sdbm/init.c         ret = rb_protect(rb_yield, rb_assoc_new(rb_str_dup(keystr), valstr), &status);
rb_yield          571 ext/sdbm/init.c 	rb_yield(rb_tainted_str_new(val.dptr, val.dsize));
rb_yield          587 ext/sdbm/init.c 	rb_yield(rb_tainted_str_new(key.dptr, key.dsize));
rb_yield          607 ext/sdbm/init.c 	rb_yield(rb_assoc_new(keystr, valstr));
rb_yield          205 ext/stringio/stringio.c     return rb_ensure(rb_yield, obj, strio_finalize, obj);
rb_yield          700 ext/stringio/stringio.c 	rb_yield(CHR2FIX(c));
rb_yield          960 ext/stringio/stringio.c 	rb_yield(line);
rb_yield         2097 ext/syck/rubyext.c     rb_yield( map );
rb_yield         2116 ext/syck/rubyext.c     rb_yield( seq );
rb_yield           95 ext/syslog/syslog.c         rb_ensure(rb_yield, self, mSyslog_close, self);
rb_yield         2574 ext/win32ole/win32ole.c         rb_yield(obj);
rb_yield         2330 ext/zlib/zlib.c 	return rb_ensure(rb_yield, obj, gzfile_ensure_close, obj);
rb_yield         3018 ext/zlib/zlib.c 	rb_yield(c);
rb_yield         3202 ext/zlib/zlib.c 	rb_yield(str);
rb_yield         1550 gc.c           		    rb_yield((VALUE)p);
rb_yield         1584 gc.c           			rb_yield((VALUE)p);
rb_yield          471 hash.c         	if (block_given) return rb_yield(key);
rb_yield          671 hash.c         	return rb_yield(key);
rb_yield         1010 hash.c             rb_yield(value);
rb_yield         1043 hash.c             rb_yield(key);
rb_yield         1109 hash.c             rb_yield(rb_assoc_new(key, value));
rb_yield         1684 hash.c             if (NIL_P(val) && rb_block_given_p()) rb_yield(name);
rb_yield         1738 hash.c         	if (block_given) return rb_yield(key);
rb_yield         1948 hash.c         	rb_yield(RARRAY(keys)->ptr[i]);
rb_yield         1979 hash.c         	rb_yield(RARRAY(values)->ptr[i]);
rb_yield         2009 hash.c         	    rb_yield(rb_assoc_new(RARRAY(ary)->ptr[i], RARRAY(ary)->ptr[i+1]));
rb_yield         1835 io.c           	rb_yield(str);
rb_yield         1881 io.c           	rb_yield(INT2FIX(c & 0xff));
rb_yield         3097 io.c           	    rb_yield(Qnil);
rb_yield         3106 io.c           	return rb_ensure(rb_yield, port, io_close, port);
rb_yield         3165 io.c           	return rb_ensure(rb_yield, io, io_close, io);
rb_yield         5064 io.c           	rb_yield(str);
rb_yield         5356 io.c           	    rb_iterate(rb_each, current_file, rb_yield, 0);
rb_yield         5361 io.c           	rb_yield(str);
rb_yield         5372 io.c           	rb_yield(byte);
rb_yield         1459 numeric.c      		rb_yield(LONG2FIX(i));
rb_yield         1465 numeric.c      		rb_yield(LONG2FIX(i));
rb_yield         1482 numeric.c      	    rb_yield(rb_float_new(i*unit+beg));
rb_yield         1497 numeric.c      	    rb_yield(i);
rb_yield         2658 numeric.c      	    rb_yield(LONG2FIX(i));
rb_yield         2665 numeric.c      	    rb_yield(i);
rb_yield         2697 numeric.c      	    rb_yield(LONG2FIX(i));
rb_yield         2704 numeric.c      	    rb_yield(i);
rb_yield         2737 numeric.c      	    rb_yield(LONG2FIX(i));
rb_yield         2745 numeric.c      	    rb_yield(i);
rb_yield         1287 process.c      	    rb_protect(rb_yield, Qundef, &status);
rb_yield         3148 process.c      	    return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, SAVED_USER_ID);
rb_yield         3156 process.c      	    return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, euid);
rb_yield         3192 process.c      	return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, obj);
rb_yield         3259 process.c      	    return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, SAVED_GROUP_ID);
rb_yield         3267 process.c      	    return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, egid);
rb_yield         3302 process.c      	return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, obj);
rb_yield          263 range.c        	rb_yield(i);
rb_yield          323 range.c        	    rb_yield(LONG2NUM(i));
rb_yield          345 range.c        		rb_yield(b);
rb_yield          371 range.c            rb_yield(v);
rb_yield          411 range.c        	    rb_yield(LONG2NUM(i));
rb_yield         1269 re.c           	    if (RTEST(rb_yield(str))) {
rb_yield          548 ruby.h         VALUE rb_yield _((VALUE));
rb_yield         1459 string.c       	rb_yield(current);
rb_yield         1976 string.c       	    repl = rb_obj_as_string(rb_yield(rb_reg_nth_match(0, match)));
rb_yield         2096 string.c       	    val = rb_obj_as_string(rb_yield(rb_reg_nth_match(0, match)));
rb_yield         3679 string.c       	rb_yield(str);
rb_yield         3701 string.c       	    rb_yield(line);
rb_yield         3711 string.c       	rb_yield(line);
rb_yield         3738 string.c       	rb_yield(INT2FIX(RSTRING(str)->ptr[i] & 0xff));
rb_yield         4268 string.c       	rb_yield(result);
rb_yield          432 struct.c       	rb_yield(RSTRUCT(s)->ptr[i]);
rb_yield          763 struct.c       	if (RTEST(rb_yield(RSTRUCT(s)->ptr[i]))) {


rb_yield_0

rb_yield_0       1060 eval.c         static VALUE rb_yield_0 _((VALUE, VALUE, VALUE, int, int));
rb_yield_0       3185 eval.c         	result = rb_yield_0(result, 0, 0, 0, node->nd_state);
rb_yield_0       4979 eval.c             return rb_yield_0(val, 0, 0, 0, Qfalse);
rb_yield_0       4995 eval.c         	return rb_yield_0(Qundef, 0, 0, 0, Qfalse);
rb_yield_0       5003 eval.c             return rb_yield_0(ary, 0, 0, 0, Qtrue);
rb_yield_0       5020 eval.c             return rb_yield_0(values, 0, 0, 0, avalue);
rb_yield_0       5041 eval.c         	rb_yield_0(Qundef, 0, 0, 0, Qfalse);
rb_yield_0       6513 eval.c             return rb_yield_0(self, self, ruby_class, YIELD_PUBLIC_DEF, Qfalse);
rb_yield_0       8386 eval.c         	result = rb_yield_0(args, self, (self!=Qundef)?CLASS_OF(self):0, pcall, avalue);
rb_yield_0       11730 eval.c             return rb_yield_0(arg, 0, 0, YIELD_LAMBDA_CALL, Qtrue);
rb_yield_0       12820 eval.c         	val = rb_yield_0(tag, 0, 0, 0, Qfalse);


rb_yield_values

rb_yield_values  1568 array.c            VALUE retval = rb_yield_values(2, *a, *b);
rb_yield_values   265 enum.c                 *memo = rb_yield_values(2, *memo, i);
rb_yield_values   633 enum.c         	cmp = rb_yield_values(2, i, *memo);
rb_yield_values   711 enum.c         	cmp = rb_yield_values(2, i, *memo);
rb_yield_values   786 enum.c             rb_yield_values(2, val, INT2FIX(*memo));
rb_yield_values   734 hash.c             if (RTEST(rb_yield_values(2, key, value))) {
rb_yield_values   801 hash.c             if (RTEST(rb_yield_values(2, key, value)))
rb_yield_values  1075 hash.c             rb_yield_values(2, key, value);
rb_yield_values  1550 hash.c         	value = rb_yield_values(3, key, rb_hash_aref(hash, key), value);
rb_yield_values  2006 hash.c         	    rb_yield_values(2, RARRAY(ary)->ptr[i], RARRAY(ary)->ptr[i+1]);
rb_yield_values  2042 hash.c         	    if (RTEST(rb_yield_values(2, RARRAY(keys)->ptr[i], val))) {
rb_yield_values  2092 hash.c         	    if (RTEST(rb_yield_values(2, k, v))) {
rb_yield_values  2380 hash.c         	    val = rb_yield_values(3, key, rb_f_getenv(Qnil, key), val);
rb_yield_values   549 ruby.h         VALUE rb_yield_values __((int n, ...));
rb_yield_values   464 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  3326 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    3327 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 3328 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  3325 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 3341 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 3337 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 3335 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 3344 ext/zlib/zlib.c     rb_define_method(cZStream, "closed?", rb_zstream_closed_p, 0);
rb_zstream_closed_p 3345 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 3340 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   3346 ext/zlib/zlib.c     rb_define_method(cZStream, "close", rb_zstream_end, 0);
rb_zstream_end   3347 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 3349 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 3342 ext/zlib/zlib.c     rb_define_method(cZStream, "finished?", rb_zstream_finished_p, 0);
rb_zstream_finished_p 3343 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 3350 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 3351 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 3348 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 3336 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 3338 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 3339 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);


re_adjust_startpos

re_adjust_startpos  881 re.c               return re_adjust_startpos(RREGEXP(re)->ptr,
re_adjust_startpos  190 regex.h        extern int re_adjust_startpos (struct re_pattern_buffer *, const char*, int, int, int);
re_adjust_startpos  211 regex.h        extern int re_adjust_startpos ();


re_compile_fastmap

re_compile_fastmap 3116 regex.c            re_compile_fastmap(bufp);
re_compile_fastmap 3171 regex.c            re_compile_fastmap(bufp);
re_compile_fastmap  191 regex.h        extern void re_compile_fastmap (struct re_pattern_buffer *);
re_compile_fastmap  212 regex.h        extern void re_compile_fastmap ();


re_compile_pattern

re_compile_pattern  490 re.c           	    err = re_compile_pattern(++ptr, len -= 2, rp) != 0;
re_compile_pattern  641 re.c               err = re_compile_pattern(s, len, rp);
re_compile_pattern  853 re.c           	err = re_compile_pattern(RREGEXP(re)->str, RREGEXP(re)->len, RREGEXP(re)->ptr);
re_compile_pattern  187 regex.h        extern char *re_compile_pattern (const char *, int, struct re_pattern_buffer *);
re_compile_pattern  208 regex.h        extern char *re_compile_pattern ();


re_copy_registers

re_copy_registers  696 re.c               re_copy_registers(RMATCH(obj)->regs, RMATCH(orig)->regs);
re_copy_registers  942 re.c               re_copy_registers(RMATCH(match)->regs, &regs);
re_copy_registers  197 regex.h        extern void re_copy_registers (struct re_registers*, struct re_registers*);
re_copy_registers  216 regex.h        extern void re_copy_registers ();


re_free_pattern

re_free_pattern  1184 gc.c           	    re_free_pattern(RANY(obj)->as.regexp.ptr);
re_free_pattern   492 re.c           	    re_free_pattern(rp);
re_free_pattern   644 re.c           	re_free_pattern(rp);
re_free_pattern  1335 re.c               if (re->ptr) re_free_pattern(re->ptr);
re_free_pattern   188 regex.h        void re_free_pattern (struct re_pattern_buffer *);


re_free_registers

re_free_registers  178 ext/strscan/strscan.c     re_free_registers(&(p->regs));
re_free_registers   51 gc.c           void re_free_registers _((struct re_registers*));
re_free_registers 1202 gc.c           	    re_free_registers(RANY(obj)->as.match.regs);
re_free_registers  694 re.c               re_free_registers(RMATCH(obj)->regs);
re_free_registers  198 regex.h        extern void re_free_registers (struct re_registers*);
re_free_registers  217 regex.h        extern void re_free_registers ();


re_match

re_match          412 ext/strscan/strscan.c         ret = re_match(RREGEXP(regex)->ptr,
re_match         3184 regex.c        	  val = re_match(bufp, string, size, 0, regs);
re_match         3196 regex.c              val = re_match(bufp, string, size, startpos, regs);
re_match          194 regex.h        extern int re_match (struct re_pattern_buffer *, const char *, int, int,
re_match          214 regex.h        extern int re_match ();


re_match_exec

re_match_exec    3140 regex.c        static int re_match_exec _((struct re_pattern_buffer *, const char *, int, int, int,
re_match_exec    3292 regex.c            val = re_match_exec(bufp, string, size, startpos, initpos, regs);
re_match_exec    3527 regex.c          return re_match_exec(bufp, string_arg, size, pos, pos, regs);


re_mbcinit

re_mbcinit        211 re.c           	re_mbcinit(MBCTYPE_ASCII);
re_mbcinit        214 re.c           	re_mbcinit(MBCTYPE_EUC);
re_mbcinit        217 re.c           	re_mbcinit(MBCTYPE_SJIS);
re_mbcinit        220 re.c           	re_mbcinit(MBCTYPE_UTF8);
re_mbcinit        231 re.c           	re_mbcinit(MBCTYPE_ASCII);
re_mbcinit        234 re.c           	re_mbcinit(MBCTYPE_EUC);
re_mbcinit        237 re.c           	re_mbcinit(MBCTYPE_SJIS);
re_mbcinit        240 re.c           	re_mbcinit(MBCTYPE_UTF8);
re_mbcinit       2112 re.c           	re_mbcinit(MBCTYPE_EUC);
re_mbcinit       2117 re.c           	re_mbcinit(MBCTYPE_SJIS);
re_mbcinit       2122 re.c           	re_mbcinit(MBCTYPE_UTF8);
re_mbcinit       2131 re.c           	re_mbcinit(MBCTYPE_ASCII);
re_mbcinit       2228 re.c               re_mbcinit(MBCTYPE_EUC);
re_mbcinit       2231 re.c               re_mbcinit(MBCTYPE_SJIS);
re_mbcinit       2234 re.c               re_mbcinit(MBCTYPE_UTF8);
re_mbcinit       2236 re.c               re_mbcinit(MBCTYPE_ASCII);


re_search

re_search         418 ext/strscan/strscan.c         ret = re_search(RREGEXP(regex)->ptr,
re_search         915 re.c               result = re_search(RREGEXP(re)->ptr,RSTRING(str)->ptr,RSTRING(str)->len,
re_search         192 regex.h        extern int re_search (struct re_pattern_buffer *, const char*, int, int, int,
re_search         213 regex.h        extern int re_search ();


re_set_casetable

re_set_casetable 2226 re.c               re_set_casetable(casetable);
re_set_casetable  196 regex.h        extern void re_set_casetable (const char *table);
re_set_casetable  215 regex.h        extern void re_set_casetable ();


re_warning

re_warning        192 regex.c        #ifndef re_warning
re_warning       1474 regex.c                    re_warning("character class has `]' without escape");
re_warning       1495 regex.c                  re_warning("character class has `-' without escape");
re_warning       1497 regex.c                  re_warning("character class has `[' without escape");
re_warning       1672 regex.c                    re_warning("character class has `[' without escape");
re_warning       2186 regex.c              re_warning("regexp has invalid interval");
re_warning       2368 regex.c                re_warning("regexp has `]' without escape");
re_warning       2370 regex.c                re_warning("regexp has `}' without escape");


read

read              936 class.c            rb_attr(klass, rb_intern(name), read, write, Qfalse);
read              201 dln.c              size = read(fd, hdrp, sizeof(struct exec));
read              282 dln.c              if (read(fd, reloc, size) !=  size) {
read              304 dln.c              if (read(fd, &size, sizeof(int)) != sizeof(int)) {
read              315 dln.c              if (read(fd, buffer, hdrp->a_syms + size) != hdrp->a_syms + size) {
read              388 dln.c          	if (read(fd, &c, 1) == -1) {
read              393 dln.c          	if (read(fd, &c, 1) == -1) {
read              401 dln.c          	while (read(fd, &c, 1) == 1) {
read              409 dln.c          	while (read(fd, p, 1) == 1) {
read              454 dln.c              if (read(fd, addr, size) !=  size) {
read              981 dln.c              size = read(fd, armagic, SARMAG);
read              988 dln.c              size = read(fd, &ahdr, sizeof(ahdr));
read             1000 dln.c          	size = read(fd, data, size);
read             1037 dln.c          		size = read(fd, &ahdr, sizeof(ahdr));
read              687 eval.c             if (read) {
read             10735 eval.c             if (!read && !write && !except) {
read             10766 eval.c         	    n = select(max, read, write, except, tvp);
read             10794 eval.c             if (read) curr_thread->readfds = *read;
read             10808 eval.c             if (read) *read = 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             1210 io.c                   n = read(fileno(fptr->f), RSTRING(str)->ptr, len);
read             2415 io.c               n = read(fileno(fptr->f), RSTRING(str)->ptr, ilen);
read             4551 io.c               VALUE read, write, except, timeout, res, list;
read             4561 io.c               rb_scan_args(argc, argv, "13", &read, &write, &except, &timeout);
read             4571 io.c               if (!NIL_P(read)) {
read             4572 io.c           	Check_Type(read, T_ARRAY);
read             4575 io.c           	for (i=0; i<RARRAY(read)->len; i++) {
read             4576 io.c           	    GetOpenFile(rb_io_get_io(RARRAY(read)->ptr[i]), fptr);
read             4643 io.c           	    for (i=0; i< RARRAY(read)->len; i++) {
read             4644 io.c           		GetOpenFile(rb_io_get_io(RARRAY(read)->ptr[i]), fptr);
read             4647 io.c           		    rb_ary_push(list, rb_ary_entry(read, i));
read              290 random.c                   read(fd, seed, seed_len);


read_all

read_all         1327 io.c           	return read_all(fptr, remain_size(fptr), str);
read_all         1557 io.c           	str = read_all(fptr, 0, Qnil);
read_all         4525 io.c               result = read_all(fptr, remain_size(fptr), Qnil);


read_backslash

read_backslash   1186 regex.c            return read_backslash(c);
read_backslash   1592 regex.c        	    c = read_backslash(c);
read_backslash   2343 regex.c        	c = read_backslash(c);


read_buffered_data

read_buffered_data 1049 io.c                   c = read_buffered_data(ptr, n, fptr->f);
read_buffered_data 1205 io.c               n = read_buffered_data(RSTRING(str)->ptr, len, fptr->f);


read_escape

read_escape      6836 parse.c        	    return read_escape() | 0x80;
read_escape      6851 parse.c        	    c = read_escape();
read_escape      7075 parse.c        		    c = read_escape();
read_escape      7631 parse.c        	    c = read_escape();
read_escape      2838 parse.y        	    return read_escape() | 0x80;
read_escape      2853 parse.y        	    c = read_escape();
read_escape      3077 parse.y        		    c = read_escape();
read_escape      3633 parse.y        	    c = read_escape();


read_special

read_special     1165 regex.c              return read_special(--p, pend, pp) | 0x80;
read_special     1179 regex.c              c = read_special(--p, pend, pp);
read_special     1584 regex.c        	      c = read_special(p, pend, &pp);
read_special     2336 regex.c        	c = read_special(p, pend, &p0);


readable

readable           38 ext/stringio/stringio.c static struct StringIO* readable _((struct StringIO *));
readable          487 ext/stringio/stringio.c     struct StringIO *ptr = readable(StringIO(self));
readable          697 ext/stringio/stringio.c     struct StringIO *ptr = readable(StringIO(self));
readable          715 ext/stringio/stringio.c     struct StringIO *ptr = readable(StringIO(self));
readable          758 ext/stringio/stringio.c     struct StringIO *ptr = readable(StringIO(self));
readable          920 ext/stringio/stringio.c     VALUE str = strio_getline(argc, argv, readable(StringIO(self)));
readable          938 ext/stringio/stringio.c     VALUE line = strio_getline(argc, argv, readable(StringIO(self)));
readable          959 ext/stringio/stringio.c     while (!NIL_P(line = strio_getline(argc, argv, readable(ptr)))) {
readable          979 ext/stringio/stringio.c     while (!NIL_P(line = strio_getline(argc, argv, readable(ptr)))) {
readable         1093 ext/stringio/stringio.c     struct StringIO *ptr = readable(StringIO(self));


readdir

readdir           374 dir.c              dp = readdir(dirp->dir);
readdir           413 dir.c              for (dp = readdir(dirp->dir); dp != NULL; dp = readdir(dirp->dir)) {
readdir          1008 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  810 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    812 ext/readline/readline.c     rl_event_hook = readline_event;


readonly_setter

readonly_setter   523 variable.c         rb_define_hooked_variable(name, var, 0, readonly_setter);
readonly_setter   533 variable.c         if (!setter) setter = readonly_setter;


realloc

realloc          10046 eval.c         	VALUE *ptr = realloc(th->stk_ptr, sizeof(VALUE) * len);
realloc          3946 ext/nkf/nkf-utf8/nkf.c 			lwsp_buf_new = realloc(lwsp_buf, (lwsp_size+5)*sizeof(char));
realloc          4065 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           158 gc.c               RUBY_CRITICAL(mem = realloc(ptr, size));
realloc           161 gc.c           	RUBY_CRITICAL(mem = realloc(ptr, size));
realloc           340 gc.c           		p = (struct heaps_slot *)realloc(heaps, length);
realloc           256 missing/strftime.c 			savetz = (char *) realloc(savetz, i);
realloc          1435 win32/win32.c  	#define Renew(x, y, z) (x = (z *)realloc(x, y))


recv

recv              715 error.c            ptr[1] = recv;
recv             3112 eval.c         		    VALUE recv;
recv             3116 eval.c         		    recv = rb_eval(self, node->nd_iter);
recv             3120 eval.c         		    result = rb_call(CLASS_OF(recv),recv,each,0,0,0);
recv             3344 eval.c         	    VALUE recv;
recv             3351 eval.c         		recv = self;
recv             3355 eval.c         		recv = rb_eval(self, node->nd_recv);
recv             3363 eval.c         	    rb_call(CLASS_OF(recv),recv,node->nd_mid,argc,argv,scope);
recv             3370 eval.c         	    VALUE recv;
recv             3375 eval.c         	    recv = rb_eval(self, node->nd_recv);
recv             3381 eval.c         	    result = rb_call(CLASS_OF(recv),recv,node->nd_mid,argc,argv,0);
recv             3478 eval.c         	    VALUE recv, val;
recv             3482 eval.c         	    recv = rb_eval(self, node->nd_recv);
recv             3485 eval.c         	    val = rb_funcall2(recv, aref, argc-1, argv);
recv             3499 eval.c         	    rb_funcall2(recv, aset, argc, argv);
recv             3507 eval.c         	    VALUE recv, val;
recv             3509 eval.c         	    recv = rb_eval(self, node->nd_recv);
recv             3510 eval.c         	    val = rb_funcall(recv, id, 0);
recv             3525 eval.c         	    rb_funcall2(recv, node->nd_next->nd_aid, 1, &val);
recv             3854 eval.c         	    VALUE recv = rb_eval(self, node->nd_recv);
recv             3858 eval.c         	    if (ruby_safe_level >= 4 && !OBJ_TAINTED(recv)) {
recv             3861 eval.c         	    if (FIXNUM_P(recv) || SYMBOL_P(recv)) {
recv             3865 eval.c         			 rb_obj_classname(recv));
recv             3868 eval.c         	    if (OBJ_FROZEN(recv)) rb_error_frozen("object");
recv             3869 eval.c         	    klass = rb_singleton_class(recv);
recv             5156 eval.c         	    VALUE recv;
recv             5159 eval.c         		recv = self;
recv             5163 eval.c         		recv = rb_eval(self, lhs->nd_recv);
recv             5170 eval.c         		rb_call(CLASS_OF(recv), recv, lhs->nd_mid, 1, &val, scope);
recv             5180 eval.c         		rb_call(CLASS_OF(recv), recv, lhs->nd_mid,
recv             5550 eval.c         	return (*func)(recv, rb_ary_new4(argc, argv));
recv             5553 eval.c         	return (*func)(argc, argv, recv);
recv             5556 eval.c         	return (*func)(recv);
recv             5559 eval.c         	return (*func)(recv, argv[0]);
recv             5562 eval.c         	return (*func)(recv, argv[0], argv[1]);
recv             5565 eval.c         	return (*func)(recv, argv[0], argv[1], argv[2]);
recv             5568 eval.c         	return (*func)(recv, argv[0], argv[1], argv[2], argv[3]);
recv             5571 eval.c         	return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4]);
recv             5574 eval.c         	return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
recv             5578 eval.c         	return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
recv             5582 eval.c         	return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
recv             5586 eval.c         	return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
recv             5590 eval.c         	return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
recv             5594 eval.c         	return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
recv             5598 eval.c         	return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
recv             5603 eval.c         	return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
recv             5608 eval.c         	return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
recv             5613 eval.c         	return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
recv             5663 eval.c             ruby_frame->self = recv;
recv             5680 eval.c         				recv, id, klass);
recv             5683 eval.c         		    result = call_cfunc(body->nd_cfnc, recv, len, argc, argv);
recv             5688 eval.c         				recv, id, klass);
recv             5692 eval.c         		result = call_cfunc(body->nd_cfnc, recv, len, argc, argv);
recv             5702 eval.c         	result = rb_attr_get(recv, body->nd_vid);
recv             5708 eval.c         	result = rb_eval(recv, body);
recv             5712 eval.c         	result = method_call(argc, argv, umethod_bind(body->nd_cval, recv));
recv             5716 eval.c         	result = proc_invoke(body->nd_cval, rb_ary_new4(argc, argv), recv, klass);
recv             5802 eval.c         				assign(recv, opt->nd_head, *argv, 1);
recv             5807 eval.c         				rb_eval(recv, opt);
recv             5824 eval.c         		    EXEC_EVENT_HOOK(RUBY_EVENT_CALL, b2, recv, id, klass);
recv             5826 eval.c         		result = rb_eval(recv, body);
recv             5839 eval.c         		EXEC_EVENT_HOOK(RUBY_EVENT_RETURN, body, recv, id, klass);
recv             5884 eval.c         		 rb_id2name(mid), recv);
recv             5890 eval.c         	    return method_missing(recv, mid, argc, argv, scope==2?CSTAT_VCALL:0);
recv             5898 eval.c         	    return method_missing(recv, mid, argc, argv, CSTAT_SUPER);
recv             5900 eval.c         	return method_missing(recv, mid, argc, argv, scope==2?CSTAT_VCALL:0);
recv             5906 eval.c         	    return method_missing(recv, mid, argc, argv, CSTAT_PRIV);
recv             5916 eval.c         		return method_missing(recv, mid, argc, argv, CSTAT_PROT);
recv             5920 eval.c             return rb_call0(klass, recv, mid, id, argc, argv, body, noex);
recv             5935 eval.c             return rb_call(CLASS_OF(recv), recv, mid, argc, argv, 1);
recv             5968 eval.c             vid = rb_call(CLASS_OF(recv), recv, rb_to_id(vid), argc, argv, 1);
recv             5997 eval.c             return rb_call(CLASS_OF(recv), recv, mid, n, argv, 1);
recv             6014 eval.c             return vafuncall(recv, mid, n, &ar);
recv             6036 eval.c         	result = vafuncall(recv, mid, n, &ar);
recv             6056 eval.c             return rb_call(CLASS_OF(recv), recv, mid, argc, argv, 1);
recv             6066 eval.c             return rb_call(CLASS_OF(recv), recv, mid, argc, argv, 0);
recv             8732 eval.c             VALUE recv;
recv             8744 eval.c             rb_gc_mark(data->recv);
recv             8777 eval.c             data->recv = obj;
recv             8837 eval.c         	m1->recv != m2->recv || m1->body != m2->body)
recv             8862 eval.c             data->recv = Qundef;
recv             8991 eval.c             if (data->recv == Qundef) {
recv             9001 eval.c             result = rb_call0(data->klass,data->recv,data->id,data->oid,argc,argv,data->body,safe);
recv             9102 eval.c             VALUE rklass = CLASS_OF(recv), klass = rklass;
recv             9116 eval.c         	else if (!rb_obj_is_kind_of(recv, data->rklass)) {
recv             9125 eval.c             bound->recv = recv;
recv             9230 eval.c         	if (data->recv == Qundef) {
recv             9233 eval.c         	else if (data->recv == v) {
recv             9238 eval.c         	    rb_str_buf_append(str, rb_inspect(data->recv));
recv             8761 parse.c            value_expr(recv);
recv             8769 parse.c            return NEW_CALL(recv, id, arg1);
recv             8923 parse.c            if (recv && nd_type(recv) == NODE_SELF)
recv             8924 parse.c        	recv = (NODE *)1;
recv             8926 parse.c        	value_expr(recv);
recv             8927 parse.c            return NEW_ATTRASGN(recv, tASET, idx);
recv             8944 parse.c            if (recv && nd_type(recv) == NODE_SELF)
recv             8945 parse.c        	recv = (NODE *)1;
recv             8947 parse.c        	value_expr(recv);
recv             8948 parse.c            return NEW_ATTRASGN(recv, rb_id_attrset(id), 0);
recv             4763 parse.y            value_expr(recv);
recv             4771 parse.y            return NEW_CALL(recv, id, arg1);
recv             4925 parse.y            if (recv && nd_type(recv) == NODE_SELF)
recv             4926 parse.y        	recv = (NODE *)1;
recv             4928 parse.y        	value_expr(recv);
recv             4929 parse.y            return NEW_ATTRASGN(recv, tASET, idx);
recv             4946 parse.y            if (recv && nd_type(recv) == NODE_SELF)
recv             4947 parse.y        	recv = (NODE *)1;
recv             4949 parse.y        	value_expr(recv);
recv             4950 parse.y            return NEW_ATTRASGN(recv, rb_id_attrset(id), 0);
recv             2144 win32/win32.c  	r = recv(TO_SOCKET(s), buf, len, flags);
recv              424 win32/win32.h  #ifdef recv


recvfrom

recvfrom          567 ext/socket/socket.c     slen = recvfrom(fd, RSTRING(str)->ptr, buflen, flags, (struct sockaddr*)buf, &alen);
recvfrom         2162 win32/win32.c  	r = recvfrom(TO_SOCKET(s), buf, len, flags, from, fromlen);
recvfrom          429 win32/win32.h  #ifdef recvfrom


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);


reference_count

reference_count  1688 ext/win32ole/win32ole.c     return INT2NUM(reference_count(pole));
reference_count  1709 ext/win32ole/win32ole.c         if (reference_count(pole) > 0) {


reg_enum_key

reg_enum_key     1211 ext/win32ole/win32ole.c         clsid = reg_enum_key(htypelib, i);
reg_enum_key     1219 ext/win32ole/win32ole.c             ver = reg_enum_key(hclsid, j);
reg_enum_key     1231 ext/win32ole/win32ole.c                     lang = reg_enum_key(hversion, k);
reg_enum_key     3310 ext/win32ole/win32ole.c         clsid = reg_enum_key(htypelib, i);
reg_enum_key     3318 ext/win32ole/win32ole.c             ver = reg_enum_key(hclsid, j);
reg_enum_key     3356 ext/win32ole/win32ole.c         clsid = reg_enum_key(hclsids, i);


reg_get_val

reg_get_val      1185 ext/win32ole/win32ole.c     typelib = reg_get_val(hclsid, "InprocServer32");
reg_get_val      1226 ext/win32ole/win32ole.c             typelib = reg_get_val(hversion, NULL);
reg_get_val      1236 ext/win32ole/win32ole.c                         if ((file = reg_get_val(hlang, "win32")) != Qnil)
reg_get_val      3324 ext/win32ole/win32ole.c             if ( (v = reg_get_val(hclsid, StringValuePtr(ver))) != Qnil ) {
reg_get_val      3362 ext/win32ole/win32ole.c         if ((v = reg_get_val(hclsid, "ProgID")) != Qnil)
reg_get_val      3364 ext/win32ole/win32ole.c         if ((v = reg_get_val(hclsid, "VersionIndependentProgID")) != Qnil)


reg_open_key

reg_open_key     1122 ext/win32ole/win32ole.c     return reg_open_key(hkey, StringValuePtr(key), phkey);
reg_open_key     1176 ext/win32ole/win32ole.c     err = reg_open_key(HKEY_CLASSES_ROOT, "CLSID", &hroot);
reg_open_key     1180 ext/win32ole/win32ole.c     err = reg_open_key(hroot, StringValuePtr(vclsid), &hclsid);
reg_open_key     1206 ext/win32ole/win32ole.c     err = reg_open_key(HKEY_CLASSES_ROOT, "TypeLib", &htypelib);
reg_open_key     3305 ext/win32ole/win32ole.c     err = reg_open_key(HKEY_CLASSES_ROOT, "TypeLib", &htypelib);
reg_open_key     3351 ext/win32ole/win32ole.c     err = reg_open_key(HKEY_CLASSES_ROOT, "CLSID", &hclsids);


reg_open_vkey

reg_open_vkey    1214 ext/win32ole/win32ole.c         err = reg_open_vkey(htypelib, clsid, &hclsid);
reg_open_vkey    1222 ext/win32ole/win32ole.c             err = reg_open_vkey(hclsid, ver, &hversion);
reg_open_vkey    1234 ext/win32ole/win32ole.c                     err = reg_open_vkey(hversion, lang, &hlang);
reg_open_vkey    3313 ext/win32ole/win32ole.c         err = reg_open_vkey(htypelib, clsid, &hclsid);
reg_open_vkey    3359 ext/win32ole/win32ole.c         err = reg_open_vkey(hclsids, clsid, &hclsid);


register_info_type

register_info_type 2461 regex.c          bufp->reg_info = TMALLOC(regnum, register_info_type);
register_info_type 3592 regex.c          register_info_type *reg_info = bufp->reg_info;
register_info_type  115 regex.h        } register_info_type;
register_info_type  148 regex.h            register_info_type *reg_info;


regoff_t

regoff_t          181 regex.h          regoff_t rm_so;  /* Byte offset from string's start to substring's start.  */
regoff_t          182 regex.h          regoff_t rm_eo;  /* Byte offset from string's start to substring's end.  */


regx_options

regx_options     7131 parse.c        	yylval.num = regx_options();
regx_options     3133 parse.y        	yylval.num = regx_options();


rehash

rehash             49 st.c           static void rehash(st_table *);
rehash            261 st.c           	rehash(table);\


reinit

reinit            351 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      1327 io.c           	return read_all(fptr, remain_size(fptr), str);
remain_size      4525 io.c               result = read_all(fptr, remain_size(fptr), Qnil);


remove_backslashes

remove_backslashes  933 dir.c          		remove_backslashes(newpath + (sub - path));
remove_backslashes  937 dir.c          		remove_backslashes(newpath);


remove_begin

remove_begin      233 parse.c        static NODE *remove_begin();
remove_begin      234 parse.c        #define value_expr(node) value_expr0((node) = remove_begin(node))
remove_begin      235 parse.c        #define void_expr(node) void_expr0((node) = remove_begin(node))
remove_begin      136 parse.y        static NODE *remove_begin();
remove_begin      137 parse.y        #define value_expr(node) value_expr0((node) = remove_begin(node))
remove_begin      138 parse.y        #define void_expr(node) void_expr0((node) = remove_begin(node))


remove_method

remove_method     550 eval.c             remove_method(klass, rb_intern(name));
remove_method     570 eval.c         	remove_method(mod, rb_to_id(argv[i]));


remove_sign_bits

remove_sign_bits  568 sprintf.c      			remove_sign_bits(s, base);
remove_sign_bits  614 sprintf.c      			remove_sign_bits(++s, base);


remove_trace

remove_trace      657 variable.c     	if (!entry->var->block_trace) remove_trace(entry->var);
remove_trace      664 variable.c     		if (!entry->var->block_trace) remove_trace(entry->var);
remove_trace      704 variable.c         remove_trace(var);


rename

rename            875 ext/nkf/nkf-utf8/nkf.c                   if (rename(outfname, origfname)) {
rename           2226 file.c             if (rename(src, dst) < 0) {
rename           2238 file.c         		rename(src, dst) == 0)
rename           4266 io.c           			(void)rename(fn, RSTRING(str)->ptr);
rename           4269 io.c           			if (rename(fn, RSTRING(str)->ptr) < 0) {
rename            509 win32/win32.h  #ifdef rename


require_libraries

require_libraries  812 ruby.c         	require_libraries();
require_libraries  940 ruby.c         	require_libraries();	/* Why here? unnatural */


ret_args

ret_args          249 parse.c        static NODE *ret_args();
ret_args         4025 parse.c        			yyval.node = NEW_RETURN(ret_args(yyvsp[0].node));
ret_args         4031 parse.c        			yyval.node = NEW_BREAK(ret_args(yyvsp[0].node));
ret_args         4037 parse.c        			yyval.node = NEW_NEXT(ret_args(yyvsp[0].node));
ret_args          152 parse.y        static NODE *ret_args();
ret_args          647 parse.y        			$$ = NEW_RETURN(ret_args($2));
ret_args          651 parse.y        			$$ = NEW_BREAK(ret_args($2));
ret_args          655 parse.y        			$$ = NEW_NEXT(ret_args($2));


return_jump

return_jump      3325 eval.c         	return_jump(rb_eval(self, node->nd_stts));
return_jump      8412 eval.c         	    return_jump(result);


return_value

return_value     3149 eval.c         	return_value(rb_eval(self, node->nd_stts));
return_value     3253 eval.c         	    return_value(retval);
return_value     5367 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         412 dir.c              rewinddir(dirp->dir);
rewinddir         519 dir.c              rewinddir(dirp->dir);


rl_completion_matches

rl_completion_matches  680 ext/readline/readline.c     matches = rl_completion_matches(StringValuePtr(str),
rl_completion_matches  707 ext/readline/readline.c     matches = rl_completion_matches(StringValuePtr(str),


rmext

rmext            2776 file.c         	if (NIL_P(fext) || !(f = rmext(name, StringValueCStr(fext)))) {
rmext            2784 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            3404 ext/nkf/nkf-utf8/nkf.c 	c1 = rot47(c1);
rot47            3405 ext/nkf/nkf-utf8/nkf.c 	c2 = rot47(c2);


rot_conv

rot_conv          316 ext/nkf/nkf-utf8/nkf.c STATIC  void    rot_conv PROTO((int c2,int c1));
rot_conv         1821 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          3136 ext/zlib/zlib.c 	if (!rspara) rscheck(rsptr, rslen, rs);
rscheck          1586 io.c           		(rspara || rscheck(rsptr,rslen,rs), 0) ||


ruby_add_suffix

ruby_add_suffix  4259 io.c                                   ruby_add_suffix(str, ruby_inplace_mode);
ruby_add_suffix    43 util.h         void ruby_add_suffix();


ruby_cbase

ruby_cbase       1925 eval.c             if (!NIL_P(ruby_cbase)) {
ruby_cbase       1926 eval.c         	data = rb_mod_const_of(ruby_cbase, data);
ruby_cbase       1961 eval.c             if (ruby_cbase == rb_cObject && klass == rb_cObject) {
ruby_cbase       2793 eval.c         	return ruby_cbase;
ruby_cbase       3581 eval.c         	    if (NIL_P(ruby_cbase)) {
ruby_cbase       3584 eval.c         	    rb_const_set(ruby_cbase, node->nd_vid, result);
ruby_cbase       3589 eval.c         	if (NIL_P(ruby_cbase)) {
ruby_cbase       3915 eval.c         	    if (NIL_P(ruby_cbase)) {
ruby_cbase       3967 eval.c         	    if (NIL_P(ruby_cbase)) {
ruby_cbase       4082 eval.c         	EXEC_EVENT_HOOK(RUBY_EVENT_CLASS, n, ruby_cbase,
ruby_cbase       4084 eval.c         	result = rb_eval(ruby_cbase, node->nd_next);
ruby_cbase       5134 eval.c         	    rb_const_set(ruby_cbase, lhs->nd_vid, val);
ruby_cbase       5139 eval.c         	if (RTEST(ruby_verbose) && FL_TEST(ruby_cbase, FL_SINGLETON)) {
ruby_cbase       5730 eval.c         	    PUSH_CLASS(ruby_cbase);
ruby_cbase       6296 eval.c             PUSH_CLASS(ruby_cbase);
ruby_cbase       7912 eval.c             return rb_mod_autoload(ruby_cbase, sym, file);
ruby_cbase       7932 eval.c             return rb_mod_autoload_p(ruby_cbase, sym);


ruby_cleanup

ruby_cleanup     1554 eval.c             exit(ruby_cleanup(ex));
ruby_cleanup      193 intern.h       int ruby_cleanup _((int));


ruby_connect

ruby_connect     1115 ext/socket/socket.c 		status = ruby_connect(fd, res->ai_addr, res->ai_addrlen,
ruby_connect     1382 ext/socket/socket.c     return (VALUE)ruby_connect(arg->fd, arg->sockaddr, sizeof(*arg->sockaddr),
ruby_connect     1526 ext/socket/socket.c 	if (ruby_connect(fd, res->ai_addr, res->ai_addrlen, 0) >= 0) {
ruby_connect     2194 ext/socket/socket.c     if (ruby_connect(fd, (struct sockaddr*)RSTRING(addr)->ptr, RSTRING(addr)->len, 0) < 0) {


ruby_dup

ruby_dup         3570 io.c               fd = ruby_dup(fileno(orig->f));
ruby_dup         3575 io.c           	    fd = ruby_dup(fileno(orig->f2));


ruby_exec

ruby_exec        1573 eval.c             state = ruby_exec();
ruby_exec         194 intern.h       int ruby_exec _((void));


ruby_finalize

ruby_finalize    4331 eval.c             ruby_finalize();
ruby_finalize     191 intern.h       void ruby_finalize _((void));


ruby_finalize_0

ruby_finalize_0  1496 eval.c             ruby_finalize_0();
ruby_finalize_0  1509 eval.c             ruby_finalize_0();


ruby_finalize_1

ruby_finalize_1  1497 eval.c             ruby_finalize_1();
ruby_finalize_1  1523 eval.c             ruby_finalize_1();


ruby_getcwd

ruby_getcwd        60 util.h         char *ruby_getcwd _((void));
ruby_getcwd        61 util.h         #define my_getcwd() ruby_getcwd()


ruby_globi

ruby_globi        490 ruby.h         int ruby_globi _((const char*,int,int(*)(const char*,VALUE),VALUE));
ruby_globi       1054 win32/win32.c      ruby_globi(buf, 0, insert, (VALUE)&tail);


ruby_incpush

ruby_incpush      382 intern.h       void ruby_incpush _((const char*));
ruby_incpush      287 ruby.c         	ruby_incpush(getenv("RUBYLIB"));
ruby_incpush      291 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_SEARCH_PATH));
ruby_incpush      294 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_SITE_LIB2));
ruby_incpush      296 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_SITE_THIN_ARCHLIB));
ruby_incpush      298 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_SITE_ARCHLIB));
ruby_incpush      299 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_SITE_LIB));
ruby_incpush      301 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_LIB));
ruby_incpush      303 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_THIN_ARCHLIB));
ruby_incpush      305 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_ARCHLIB));
ruby_incpush      308 ruby.c         	ruby_incpush(".");
ruby_incpush      650 ruby.c         		ruby_incpush(s);
ruby_incpush      652 ruby.c         		ruby_incpush(argv[1]);


ruby_init

ruby_init          44 main.c             ruby_init();
ruby_init         562 ruby.h         void ruby_init _((void));


ruby_init_loadpath

ruby_init_loadpath  381 intern.h       void ruby_init_loadpath _((void));
ruby_init_loadpath  248 ruby.c             if (VirtualQuery(ruby_init_loadpath, &m, sizeof(m)) && m.State == MEM_COMMIT)
ruby_init_loadpath  809 ruby.c             ruby_init_loadpath();


ruby_longjmp

ruby_longjmp      988 eval.c             ruby_longjmp(prot_tag->buf,(st));	\
ruby_longjmp     10223 eval.c             ruby_longjmp(tmp->context, ex);


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       45 main.c             ruby_options(argc, argv);
ruby_options      563 ruby.h         void ruby_options _((int, char**));


ruby_parser_stack_on_heap

ruby_parser_stack_on_heap 1042 gc.c               if (ruby_in_compile && ruby_parser_stack_on_heap()) {
ruby_parser_stack_on_heap  332 intern.h       int ruby_parser_stack_on_heap _((void));
ruby_parser_stack_on_heap  951 ruby.c             if (ruby_parser_stack_on_heap()) {


ruby_process_options

ruby_process_options 1460 eval.c         	ruby_process_options(argc, argv);
ruby_process_options  379 intern.h       void ruby_process_options _((int, char**));


ruby_prog_init

ruby_prog_init   1341 eval.c         	ruby_prog_init();
ruby_prog_init    377 intern.h       void ruby_prog_init _((void));


ruby_qsort

ruby_qsort         46 util.h         void ruby_qsort _((void*, const int, const int, int (*)(), void*));
ruby_qsort         47 util.h         #define qsort(b,n,s,c,d) ruby_qsort(b,n,s,c,d)


ruby_run

ruby_run           46 main.c             ruby_run();
ruby_run          564 ruby.h         NORETURN(void ruby_run _((void)));


ruby_script

ruby_script       376 intern.h       void ruby_script _((const char*));
ruby_script       805 ruby.c             ruby_script(script);
ruby_script      1186 ruby.c             ruby_script(argv[0]);	/* for the time being */


ruby_set_argv

ruby_set_argv     378 intern.h       void ruby_set_argv _((int, char**));
ruby_set_argv     806 ruby.c             ruby_set_argv(argc, argv);


ruby_set_current_source

ruby_set_current_source   41 error.c            ruby_set_current_source();
ruby_set_current_source 1136 eval.c             ruby_set_current_source();
ruby_set_current_source 1187 eval.c         	ruby_set_current_source();
ruby_set_current_source 4466 eval.c             ruby_set_current_source();
ruby_set_current_source 6108 eval.c         	ruby_set_current_source();
ruby_set_current_source 6292 eval.c         	ruby_set_current_source();
ruby_set_current_source 6348 eval.c             ruby_set_current_source();
ruby_set_current_source 6721 eval.c             ruby_set_current_source();
ruby_set_current_source 7054 eval.c             ruby_set_current_source();
ruby_set_current_source  144 intern.h       void ruby_set_current_source _((void));
ruby_set_current_source  350 ruby.c             ruby_set_current_source();
ruby_set_current_source  363 ruby.c         	ruby_set_current_source();


ruby_setenv

ruby_setenv      1663 hash.c         	ruby_setenv(nam, 0);
ruby_setenv      1877 hash.c             ruby_setenv(name, 0);
ruby_setenv      1904 hash.c             ruby_setenv(name, value);
ruby_setenv      1053 ruby.c         	    ruby_setenv("", NULL); /* duplicate environ vars */
ruby_setenv        49 util.h         void ruby_setenv _((const char*, const char*));
ruby_setenv        53 util.h         #define setenv(name,val) ruby_setenv(name,val)


ruby_setjmp

ruby_setjmp       983 eval.c         #define EXEC_TAG()    (FLUSH_REGISTER_WINDOWS, ruby_setjmp(prot_tag->buf))
ruby_setjmp      10142 eval.c              rb_thread_switch((FLUSH_REGISTER_WINDOWS, ruby_setjmp((th)->context))))


ruby_show_copyright

ruby_show_copyright  500 intern.h       void ruby_show_copyright _((void));
ruby_show_copyright  766 ruby.c         	ruby_show_copyright();


ruby_show_version

ruby_show_version  499 intern.h       void ruby_show_version _((void));
ruby_show_version  507 ruby.c         	    ruby_show_version();
ruby_show_version  762 ruby.c         	ruby_show_version();


ruby_signal

ruby_signal       362 signal.c           ruby_signal(signum, handler);
ruby_signal       418 signal.c           ruby_signal(sig, sighandler);
ruby_signal       626 signal.c           oldfunc = ruby_signal(sig, func);
ruby_signal       769 signal.c           old = ruby_signal(signum, handler);
ruby_signal       771 signal.c       	ruby_signal(signum, old);
ruby_signal       798 signal.c           oldfunc = ruby_signal(sig, SIG_DFL);
ruby_signal       800 signal.c       	ruby_signal(sig, oldfunc);


ruby_signal_name

ruby_signal_name  392 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      1092 ext/socket/socket.c 	status = ruby_socket(res->ai_family,res->ai_socktype,res->ai_protocol);
ruby_socket      1397 ext/socket/socket.c     fd = ruby_socket(AF_UNIX, SOCK_STREAM, 0);
ruby_socket      1504 ext/socket/socket.c     fd = ruby_socket(socktype, SOCK_DGRAM, 0);
ruby_socket      2022 ext/socket/socket.c     fd = ruby_socket(d, t, NUM2INT(protocol));


ruby_stack_check

ruby_stack_check 5403 eval.c             if (!overflowing && ruby_stack_check()) {
ruby_stack_check  719 gc.c               if (lev > GC_LEVEL_MAX || (lev == 0 && ruby_stack_check())) {
ruby_stack_check  236 intern.h       int ruby_stack_check _((void));


ruby_stack_length

ruby_stack_length 10042 eval.c             len = ruby_stack_length(&pos);
ruby_stack_length  237 intern.h       int ruby_stack_length _((VALUE**));


ruby_stop

ruby_stop        1575 eval.c             ruby_stop(ex);
ruby_stop        11659 eval.c             if (th == main_thread) ruby_stop(state);
ruby_stop        11695 eval.c             ruby_stop(0);		/* last thread termination */
ruby_stop        1288 process.c      	    ruby_stop(status);


ruby_strdup

ruby_strdup      7033 eval.c         		    ftptr = ruby_strdup(RSTRING(feature)->ptr);
ruby_strdup       101 ext/tk/stubs.c     if (ruby_tcl_dll) ruby_tcl_dll = ruby_strdup(ruby_tcl_dll);
ruby_strdup       325 util.c             p->path = ruby_strdup(path);
ruby_strdup        56 util.h         char *ruby_strdup _((const char*));
ruby_strdup        58 util.h         #define strdup(s) ruby_strdup(s)


ruby_strtod

ruby_strtod        63 util.h         double ruby_strtod _((const char*, char **));
ruby_strtod        65 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      50 util.h         void ruby_unsetenv _((const char*));
ruby_unsetenv      54 util.h         #define unsetenv(name,val) ruby_unsetenv(name);


ruby_xfree

ruby_xfree         47 defines.h      #define xfree 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        362 util.c         	ruby_xfree(buf);
ruby_xfree        376 util.c         	ruby_xfree(cur);


ruby_xmalloc

ruby_xmalloc       44 defines.h      #define xmalloc ruby_xmalloc
ruby_xmalloc       56 missing/alloca.c #define xmalloc ruby_xmalloc
ruby_xmalloc      347 util.c         	buf = ruby_xmalloc(len + 1);
ruby_xmalloc      367 util.c             rv = ruby_xmalloc((info.count + 1) * sizeof (char *));
ruby_xmalloc     1047 win32/win32.c  	buf = ruby_xmalloc(patt->len + 1);


rubylib_mangle

rubylib_mangle    167 ruby.c         #define rubylib_mangled_path(s, l) rb_str_new2(rubylib_mangle((s), (l)))
rubylib_mangle    168 ruby.c         #define rubylib_mangled_path2(s) rb_str_new2(rubylib_mangle((s), 0))


rubylib_mangled_path2

rubylib_mangled_path2  200 ruby.c         		rb_ary_push(ary, rubylib_mangled_path2(p));
rubylib_mangled_path2  207 ruby.c         	rb_ary_push(rb_load_path, rubylib_mangled_path2(path));


run_final

run_final          89 gc.c           static void run_final();
run_final        1005 gc.c           	run_final((VALUE)p);
run_final        1838 gc.c           		    run_final((VALUE)p);


run_single_final

run_single_final 1795 gc.c           	rb_protect((VALUE(*)_((VALUE)))run_single_final, (VALUE)args, &status);
run_single_final 1803 gc.c           	    rb_protect((VALUE(*)_((VALUE)))run_single_final, (VALUE)args, &status);


run_trap_eval

run_trap_eval    9787 eval.c         static VALUE run_trap_eval _((VALUE));
run_trap_eval    9812 eval.c             val = rb_protect(run_trap_eval, (VALUE)&arg, &state);


s2e_conv

s2e_conv          295 ext/nkf/nkf-utf8/nkf.c STATIC  int     s2e_conv PROTO((int c2, int c1, int *p2, int *p1));
s2e_conv         1545 ext/nkf/nkf-utf8/nkf.c               s2e_conv(ptr->buf[0], ptr->buf[1], &ptr->buf[0], &ptr->buf[1]);
s2e_conv         1556 ext/nkf/nkf-utf8/nkf.c               if (s2e_conv(ptr->buf[0], ptr->buf[1], &ptr->buf[0], &ptr->buf[1]) == 0){
s2e_conv         2399 ext/nkf/nkf-utf8/nkf.c         int ret = s2e_conv(c2, c1, &c2, &c1);
s2e_conv         2424 ext/nkf/nkf-utf8/nkf.c                 s2e_conv(s2, s1, &c2, &c1);
s2e_conv         2797 ext/nkf/nkf-utf8/nkf.c                 s2e_conv(s2, s1, &c2, &c1);


s_accept

s_accept         1355 ext/socket/socket.c     return s_accept(rb_cTCPSocket, fileno(fptr->f),
s_accept         1369 ext/socket/socket.c     return s_accept(0, fileno(fptr->f), (struct sockaddr*)&from, &fromlen);
s_accept         1861 ext/socket/socket.c     return s_accept(rb_cUNIXSocket, fileno(fptr->f),
s_accept         1875 ext/socket/socket.c     return s_accept(0, fileno(fptr->f), (struct sockaddr*)&from, &fromlen);
s_accept         2586 ext/socket/socket.c     sock2 = s_accept(rb_cSocket,fileno(fptr->f),(struct sockaddr*)buf,&len);
s_accept         2639 ext/socket/socket.c     sock2 = s_accept(0,fileno(fptr->f),(struct sockaddr*)buf,&len);


s_iconv

s_iconv           294 ext/nkf/nkf-utf8/nkf.c STATIC  int     s_iconv PROTO((int c2,int c1,int c0));
s_iconv           473 ext/nkf/nkf-utf8/nkf.c     {"Shift_JIS", 0, 0, 0, {0, 0, 0}, s_status, s_iconv, 0},
s_iconv          1867 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, s_iconv);
s_iconv          1971 ext/nkf/nkf-utf8/nkf.c                     } else if (SSP<=c1 && c1<0xe0 && iconv == s_iconv) {
s_iconv          1981 ext/nkf/nkf-utf8/nkf.c                     } else if (c1==SSO && iconv != s_iconv) {
s_iconv          2293 ext/nkf/nkf-utf8/nkf.c         }else if (iconv == s_iconv && 0xa1 <= c2 && c2 <= 0xdf){
s_iconv          3492 ext/nkf/nkf-utf8/nkf.c     e_iconv, s_iconv, 0, 0, 0, 0,


s_oconv

s_oconv           311 ext/nkf/nkf-utf8/nkf.c STATIC  void    s_oconv PROTO((int c2,int c1));
s_oconv           508 ext/nkf/nkf-utf8/nkf.c #   define  DEFAULT_CONV s_oconv
s_oconv          1109 ext/nkf/nkf-utf8/nkf.c             output_conv = s_oconv;


s_recvfrom

s_recvfrom        612 ext/socket/socket.c     return s_recvfrom(sock, argc, argv, RECV_RECV);
s_recvfrom       1473 ext/socket/socket.c     return s_recvfrom(sock, argc, argv, RECV_IP);
s_recvfrom       1650 ext/socket/socket.c     return s_recvfrom(sock, argc, argv, RECV_UNIX);
s_recvfrom       2491 ext/socket/socket.c     return s_recvfrom(sock, argc, argv, RECV_SOCKET);


s_status

s_status          463 ext/nkf/nkf-utf8/nkf.c STATIC void s_status PROTO((struct input_code *, int));
s_status          473 ext/nkf/nkf-utf8/nkf.c     {"Shift_JIS", 0, 0, 0, {0, 0, 0}, s_status, s_iconv, 0},


safe_getter

safe_getter       218 eval.c         static VALUE safe_getter _((void));
safe_getter      7845 eval.c             rb_define_virtual_variable("$SAFE", safe_getter, safe_setter);


safe_setter

safe_setter       219 eval.c         static void safe_setter _((VALUE val));
safe_setter      7845 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_hex

scan_hex         6814 parse.c        	    c = scan_hex(lex_p, 2, &numlen);
scan_hex         6903 parse.c        	    scan_hex(lex_p, 2, &numlen);
scan_hex         2816 parse.y        	    c = scan_hex(lex_p, 2, &numlen);
scan_hex         2905 parse.y        	    scan_hex(lex_p, 2, &numlen);
scan_hex         1563 regex.c        	    c = scan_hex(p, 2, &numlen);
scan_hex         2292 regex.c        	c = scan_hex(p, 2, &numlen);
scan_hex           40 util.h         unsigned long scan_hex _((const char*, int, int*));


scan_oct

scan_oct         6805 parse.c        	    c = scan_oct(lex_p, 3, &numlen);
scan_oct         2807 parse.y        	    c = scan_oct(lex_p, 3, &numlen);
scan_oct         1572 regex.c        	    c = scan_oct(p, 3, &numlen);
scan_oct         2301 regex.c        	c = scan_oct(p, 2, &numlen);
scan_oct         2320 regex.c        	  c = scan_oct(p0, 3, &numlen) & 0xff;
scan_oct          520 ruby.c         		    v = scan_oct(s, 1, &numlen);
scan_oct          639 ruby.c         		    v = scan_oct(s, 2, &numlen);
scan_oct          663 ruby.c         		v = scan_oct(s, 4, &numlen);
scan_oct          739 ruby.c         		v = scan_oct(s, 2, &numlen);
scan_oct           38 util.h         unsigned long scan_oct _((const char*, int, int*));


scan_once

scan_once        4257 string.c       	while (!NIL_P(result = scan_once(str, pat, &start))) {
scan_once        4265 string.c           while (!NIL_P(result = scan_once(str, pat, &start))) {


scope_dup

scope_dup        1037 eval.c         static void scope_dup _((struct SCOPE *));
scope_dup        1041 eval.c         	if (_old) scope_dup(_old);	\
scope_dup        1789 eval.c         	scope_dup(saved_scope);
scope_dup        4946 eval.c         	scope_dup(old_scope);
scope_dup        6335 eval.c         	    scope_dup(ruby_scope);
scope_dup        6337 eval.c         		scope_dup(tag->scope);
scope_dup        8063 eval.c         	scope_dup(tmp->scope);
scope_dup        8179 eval.c             scope_dup(data->scope);
scope_dup        8254 eval.c             scope_dup(data->scope);
scope_dup        11632 eval.c             scope_dup(ruby_scope);
scope_dup        11715 eval.c             scope_dup(ruby_block->scope);
scope_dup        12445 eval.c             scope_dup(ruby_scope);
scope_dup        12447 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       325 ext/sdbm/init.c     if (sdbm_delete(dbm, key)) {
sdbm_delete       351 ext/sdbm/init.c     sdbm_delete(dbm, key);
sdbm_delete       389 ext/sdbm/init.c 	if (sdbm_delete(dbm, key)) {
sdbm_delete       411 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        254 ext/sdbm/init.c             val = sdbm_fetch(dbm, key);
sdbm_fetch        316 ext/sdbm/init.c     value = sdbm_fetch(dbm, key);
sdbm_fetch        348 ext/sdbm/init.c     val = sdbm_fetch(dbm, key);
sdbm_fetch        375 ext/sdbm/init.c 	val = sdbm_fetch(dbm, key);
sdbm_fetch        432 ext/sdbm/init.c 	val = sdbm_fetch(dbm, key);
sdbm_fetch        570 ext/sdbm/init.c 	val = sdbm_fetch(dbm, key);
sdbm_fetch        604 ext/sdbm/init.c 	val = sdbm_fetch(dbm, key);
sdbm_fetch        644 ext/sdbm/init.c 	val = sdbm_fetch(dbm, key);
sdbm_fetch        664 ext/sdbm/init.c     val = sdbm_fetch(dbm, key);
sdbm_fetch        683 ext/sdbm/init.c 	val = sdbm_fetch(dbm, key);
sdbm_fetch        703 ext/sdbm/init.c 	val = sdbm_fetch(dbm, key);
sdbm_fetch        723 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     252 ext/sdbm/init.c         for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_firstkey     346 ext/sdbm/init.c     key = sdbm_firstkey(dbm);
sdbm_firstkey     374 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_firstkey     410 ext/sdbm/init.c     while (key = sdbm_firstkey(dbm), key.dptr) {
sdbm_firstkey     431 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_firstkey     528 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_firstkey     549 ext/sdbm/init.c 	for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_firstkey     569 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_firstkey     586 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_firstkey     603 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_firstkey     625 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_firstkey     643 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_firstkey     682 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_firstkey     702 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_firstkey     722 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      252 ext/sdbm/init.c         for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_nextkey      374 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_nextkey      431 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_nextkey      528 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_nextkey      549 ext/sdbm/init.c 	for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_nextkey      569 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_nextkey      586 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_nextkey      603 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_nextkey      625 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_nextkey      643 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_nextkey      682 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_nextkey      702 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_nextkey      722 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        505 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     455 eval.c             if ((body = search_method(klass, id, &origin)) == 0 || !body->nd_body) {
search_method     606 eval.c             body = search_method(klass, name, &origin);
search_method     608 eval.c         	body = search_method(rb_cObject, name, &origin);
search_method    1971 eval.c             body = search_method(klass, id, &origin);
search_method    2073 eval.c             orig = search_method(klass, def, &origin);
search_method    2076 eval.c         	    orig = search_method(rb_cObject, def, &origin);
search_method    2748 eval.c         	if (search_method(CLASS_OF(val), id, &origin) &&
search_method    3822 eval.c         	    body = search_method(ruby_class, node->nd_mid, &origin);
search_method    7324 eval.c         	    body = search_method(m, id, &m);
search_method    7326 eval.c         		body = search_method(rb_cObject, id, &m);


search_time_t

search_time_t     766 time.c         	return search_time_t(&buf, utc_p);
search_time_t     783 time.c         	return search_time_t(&buf, utc_p);


secure_visibility

secure_visibility 7099 eval.c             secure_visibility(self);
secure_visibility 7122 eval.c             secure_visibility(module);
secure_visibility 7148 eval.c             secure_visibility(module);
secure_visibility 7183 eval.c             secure_visibility(module);
secure_visibility 7312 eval.c             secure_visibility(module);


security

security          941 process.c          security(prog);
security         1088 process.c          security(prog);


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           10487 eval.c         	n = select(max+1, &readfds, &writefds, &exceptfds, delay_ptr);
select           10680 eval.c         	    n = select(0, 0, 0, 0, &time);
select           10766 eval.c         	    n = select(max, read, write, except, tvp);
select           11526 eval.c         	select(0, NULL, NULL, NULL, &tv);
select           1929 win32/win32.c  	r = select(nfds, rd, wr, ex, timeout);


send

send              823 dir.c          	if (send && p >= send) break;
send              509 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             1063 pack.c             unsigned char *send = s + RSTRING(from)->len;
send             1065 pack.c             while (s < send) {
send             1131 pack.c             if (len > (send-s)/sz) {			\
send             1133 pack.c         	    tmp = len-(send-s)/sz;		\
send             1135 pack.c         	len = (send-s)/sz;			\
send             1306 pack.c             char *s, *send;
send             1319 pack.c             send = s + RSTRING(str)->len;
send             1355 pack.c         	    len = send - s;
send             1371 pack.c         	    if (len > send - s) len = send - s;
send             1389 pack.c         		if (len > send-s) len = send-s;
send             1392 pack.c         		if (t < send) t++;
send             1398 pack.c         	    if (len > send - s) len = send - s;
send             1411 pack.c         		if (p[-1] == '*' || len > (send - s) * 8)
send             1412 pack.c         		    len = (send - s) * 8;
send             1431 pack.c         		if (p[-1] == '*' || len > (send - s) * 8)
send             1432 pack.c         		    len = (send - s) * 8;
send             1451 pack.c         		if (p[-1] == '*' || len > (send - s) * 2)
send             1452 pack.c         		    len = (send - s) * 2;
send             1473 pack.c         		if (p[-1] == '*' || len > (send - s) * 2)
send             1474 pack.c         		    len = (send - s) * 2;
send             1717 pack.c         	    if (len > send - s) len = send - s;
send             1718 pack.c         	    while (len > 0 && s < send) {
send             1719 pack.c         		long alen = send - s;
send             1730 pack.c         		VALUE buf = infected_str_new(0, (send - s)*3/4, str);
send             1734 pack.c         		while (s < send && *s > ' ' && *s < 'a') {
send             1749 pack.c         			if (s < send && *s >= ' ')
send             1753 pack.c         			if (s < send && *s >= ' ')
send             1757 pack.c         			if (s < send && *s >= ' ')
send             1761 pack.c         			if (s < send && *s >= ' ')
send             1774 pack.c         		    else if (s < send && (s+1 == send || s[1] == '\n'))
send             1786 pack.c         		VALUE buf = infected_str_new(0, (send - s)*3/4, str);
send             1803 pack.c         		while (s < send) {
send             1815 pack.c         		    if (s + 2 < send && s[2] == '=')
send             1817 pack.c         		    if (c != -1 && s + 3 < send && s[3] == '=') {
send             1830 pack.c         		VALUE buf = infected_str_new(0, send - s, str);
send             1834 pack.c         		while (s < send) {
send             1836 pack.c         			if (++s == send) break;
send             1839 pack.c         			    if (++s == send) break;
send             1868 pack.c         	    if (len > send - s)
send             1874 pack.c         	    if (sizeof(char *) <= send - s) {
send             1911 pack.c         	    if (len > (send - s) / sizeof(char *))
send             1912 pack.c         		len = (send - s) / sizeof(char *);
send             1914 pack.c         		if (send - s < sizeof(char *))
send             1956 pack.c         		while (len > 0 && s < send) {
send             1967 pack.c         			while (s < send) {
send             1724 re.c               char *s, *send, *t;
send             1729 re.c               send = s + RSTRING(str)->len;
send             1730 re.c               for (; s < send; s++) {
send             1735 re.c           	    while (n-- && s < send)
send             1759 re.c               for (; s < send; s++) {
send             1764 re.c           	    while (n-- && s < send)
send             2742 string.c           char *s, *send;
send             2746 string.c           s = RSTRING(str)->ptr; send = s + RSTRING(str)->len;
send             2747 string.c           while (s < send) {
send             2796 string.c           char *s, *send;
send             2800 string.c           s = RSTRING(str)->ptr; send = s + RSTRING(str)->len;
send             2801 string.c           while (s < send) {
send             2855 string.c           char *s, *send;
send             2860 string.c           s = RSTRING(str)->ptr; send = s + RSTRING(str)->len;
send             2865 string.c           while (++s < send) {
send             2913 string.c           char *s, *send;
send             2917 string.c           s = RSTRING(str)->ptr; send = s + RSTRING(str)->len;
send             2918 string.c           while (s < send) {
send             3010 string.c           char *s, *send;
send             3058 string.c           s = RSTRING(str)->ptr; send = s + RSTRING(str)->len;
send             3063 string.c       	while (s < send) {
send             3083 string.c       	while (s < send) {
send             3189 string.c           char *s, *send, *t;
send             3209 string.c           send = s + RSTRING(str)->len;
send             3210 string.c           while (s < send) {
send             3266 string.c           char *s, *send, *t;
send             3289 string.c           send = s + RSTRING(str)->len;
send             3291 string.c           while (s < send) {
send             3397 string.c           char *s, *send;
send             3414 string.c           send = s + RSTRING(str)->len;
send             3416 string.c           while (s < send) {
send             2179 win32/win32.c  	r = send(TO_SOCKET(s), buf, len, flags);
send              434 win32/win32.h  #ifdef send


sendto

sendto            503 ext/socket/socket.c 	n = sendto(fd, RSTRING(mesg)->ptr, RSTRING(mesg)->len, NUM2INT(flags),
sendto           1597 ext/socket/socket.c 	n = sendto(fileno(f), RSTRING(mesg)->ptr, RSTRING(mesg)->len, NUM2INT(flags),
sendto           2197 win32/win32.c  	r = sendto(TO_SOCKET(s), buf, len, flags, to, tolen);
sendto            439 win32/win32.h  #ifdef sendto


set_arg0

set_arg0         1140 ruby.c             rb_define_hooked_variable("$0", &rb_progname, 0, set_arg0);
set_arg0         1141 ruby.c             rb_define_hooked_variable("$PROGRAM_NAME", &rb_progname, 0, set_arg0);


set_argv

set_argv         2146 ext/win32ole/win32ole.c         set_argv(realargs, cNamedArgs, op.dp.cArgs);
set_argv         2372 ext/win32ole/win32ole.c         set_argv(realargs, 0, dispParams.cArgs);


set_backtrace

set_backtrace    4471 eval.c         	    set_backtrace(mesg, at);
set_backtrace    4609 eval.c         	    set_backtrace(mesg, argv[2]);
set_backtrace    7545 eval.c             set_backtrace(ruby_errinfo, val);
set_backtrace    10852 eval.c         	set_backtrace(errinfo, errat);


set_code_score

set_code_score   1442 ext/nkf/nkf-utf8/nkf.c         set_code_score(ptr, SCORE_ERROR);
set_code_score   1444 ext/nkf/nkf-utf8/nkf.c         set_code_score(ptr, SCORE_KANA);
set_code_score   1447 ext/nkf/nkf-utf8/nkf.c         set_code_score(ptr, SCORE_NO_EXIST);
set_code_score   1450 ext/nkf/nkf-utf8/nkf.c         set_code_score(ptr, score_table_A0[c2 & 0x0f]);
set_code_score   1452 ext/nkf/nkf-utf8/nkf.c         set_code_score(ptr, score_table_F0[c2 & 0x0f]);
set_code_score   1454 ext/nkf/nkf-utf8/nkf.c         set_code_score(ptr, SCORE_L2);
set_code_score   1557 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         293 ext/nkf/nkf-utf8/nkf.c STATIC  void    set_iconv PROTO((int f, int (*iconv_func)(int c2,int c1,int c0)));
set_iconv        1464 ext/nkf/nkf-utf8/nkf.c     if (iconv == ptr->iconv_func) set_iconv(FALSE, 0);
set_iconv        1737 ext/nkf/nkf-utf8/nkf.c             set_iconv(TRUE, result->iconv_func);
set_iconv        1865 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, e_iconv);
set_iconv        1867 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, s_iconv);
set_iconv        1870 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, w_iconv);
set_iconv        1872 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, w_iconv16);
set_iconv        1874 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, w_iconv16);
set_iconv        1877 ext/nkf/nkf-utf8/nkf.c         set_iconv(FALSE, e_iconv);
set_iconv        2158 ext/nkf/nkf-utf8/nkf.c                 input_mode = ASCII; set_iconv(FALSE, 0);
set_iconv        2269 ext/nkf/nkf-utf8/nkf.c         set_iconv(FALSE, result->iconv_func);
set_iconv        2815 ext/nkf/nkf-utf8/nkf.c             set_iconv(FALSE, 0);
set_iconv        2924 ext/nkf/nkf-utf8/nkf.c             set_iconv(FALSE, 0);
set_iconv        3588 ext/nkf/nkf-utf8/nkf.c     set_iconv(FALSE, mime_priority_func[j]);


set_input_codename

set_input_codename  434 ext/nkf/nkf-utf8/nkf.c STATIC  void    set_input_codename PROTO((char *codename));
set_input_codename 1382 ext/nkf/nkf-utf8/nkf.c             set_input_codename(p->name);
set_input_codename 2073 ext/nkf/nkf-utf8/nkf.c                         set_input_codename("ISO-2022-JP");
set_input_codename 2222 ext/nkf/nkf-utf8/nkf.c 	    set_input_codename(result->name);


set_list_bits

set_list_bits    1510 regex.c        	      set_list_bits(0x80, 0xffffffff, b);
set_list_bits    1540 regex.c        	      set_list_bits(0x80, 0xffffffff, b);
set_list_bits    1557 regex.c        	      set_list_bits(0x80, 0xffffffff, b);
set_list_bits    1694 regex.c        	    set_list_bits(last, c, b);
set_list_bits    1714 regex.c        	    set_list_bits(c, c, b);


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 7127 eval.c         	set_method_visibility(module, argc, argv, NOEX_PUBLIC);
set_method_visibility 7153 eval.c         	set_method_visibility(module, argc, argv, NOEX_PROTECTED);
set_method_visibility 7188 eval.c         	set_method_visibility(module, argc, argv, NOEX_PRIVATE);
set_method_visibility 7206 eval.c             set_method_visibility(CLASS_OF(obj), argc, argv, NOEX_PUBLIC);
set_method_visibility 7232 eval.c             set_method_visibility(CLASS_OF(obj), argc, argv, NOEX_PRIVATE);
set_method_visibility 7318 eval.c             set_method_visibility(module, argc, argv, NOEX_PRIVATE);


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_syserr

set_syserr        860 error.c        	error = set_syserr(n, name);
set_syserr       1177 error.c            set_syserr(EPERM, "EPERM");
set_syserr       1180 error.c            set_syserr(ENOENT, "ENOENT");
set_syserr       1183 error.c            set_syserr(ESRCH, "ESRCH");
set_syserr       1186 error.c            set_syserr(EINTR, "EINTR");
set_syserr       1189 error.c            set_syserr(EIO, "EIO");
set_syserr       1192 error.c            set_syserr(ENXIO, "ENXIO");
set_syserr       1195 error.c            set_syserr(E2BIG, "E2BIG");
set_syserr       1198 error.c            set_syserr(ENOEXEC, "ENOEXEC");
set_syserr       1201 error.c            set_syserr(EBADF, "EBADF");
set_syserr       1204 error.c            set_syserr(ECHILD, "ECHILD");
set_syserr       1207 error.c            set_syserr(EAGAIN, "EAGAIN");
set_syserr       1210 error.c            set_syserr(ENOMEM, "ENOMEM");
set_syserr       1213 error.c            set_syserr(EACCES, "EACCES");
set_syserr       1216 error.c            set_syserr(EFAULT, "EFAULT");
set_syserr       1219 error.c            set_syserr(ENOTBLK, "ENOTBLK");
set_syserr       1222 error.c            set_syserr(EBUSY, "EBUSY");
set_syserr       1225 error.c            set_syserr(EEXIST, "EEXIST");
set_syserr       1228 error.c            set_syserr(EXDEV, "EXDEV");
set_syserr       1231 error.c            set_syserr(ENODEV, "ENODEV");
set_syserr       1234 error.c            set_syserr(ENOTDIR, "ENOTDIR");
set_syserr       1237 error.c            set_syserr(EISDIR, "EISDIR");
set_syserr       1240 error.c            set_syserr(EINVAL, "EINVAL");
set_syserr       1243 error.c            set_syserr(ENFILE, "ENFILE");
set_syserr       1246 error.c            set_syserr(EMFILE, "EMFILE");
set_syserr       1249 error.c            set_syserr(ENOTTY, "ENOTTY");
set_syserr       1252 error.c            set_syserr(ETXTBSY, "ETXTBSY");
set_syserr       1255 error.c            set_syserr(EFBIG, "EFBIG");
set_syserr       1258 error.c            set_syserr(ENOSPC, "ENOSPC");
set_syserr       1261 error.c            set_syserr(ESPIPE, "ESPIPE");
set_syserr       1264 error.c            set_syserr(EROFS, "EROFS");
set_syserr       1267 error.c            set_syserr(EMLINK, "EMLINK");
set_syserr       1270 error.c            set_syserr(EPIPE, "EPIPE");
set_syserr       1273 error.c            set_syserr(EDOM, "EDOM");
set_syserr       1276 error.c            set_syserr(ERANGE, "ERANGE");
set_syserr       1279 error.c            set_syserr(EDEADLK, "EDEADLK");
set_syserr       1282 error.c            set_syserr(ENAMETOOLONG, "ENAMETOOLONG");
set_syserr       1285 error.c            set_syserr(ENOLCK, "ENOLCK");
set_syserr       1288 error.c            set_syserr(ENOSYS, "ENOSYS");
set_syserr       1291 error.c            set_syserr(ENOTEMPTY, "ENOTEMPTY");
set_syserr       1294 error.c            set_syserr(ELOOP, "ELOOP");
set_syserr       1297 error.c            set_syserr(EWOULDBLOCK, "EWOULDBLOCK");
set_syserr       1300 error.c            set_syserr(ENOMSG, "ENOMSG");
set_syserr       1303 error.c            set_syserr(EIDRM, "EIDRM");
set_syserr       1306 error.c            set_syserr(ECHRNG, "ECHRNG");
set_syserr       1309 error.c            set_syserr(EL2NSYNC, "EL2NSYNC");
set_syserr       1312 error.c            set_syserr(EL3HLT, "EL3HLT");
set_syserr       1315 error.c            set_syserr(EL3RST, "EL3RST");
set_syserr       1318 error.c            set_syserr(ELNRNG, "ELNRNG");
set_syserr       1321 error.c            set_syserr(EUNATCH, "EUNATCH");
set_syserr       1324 error.c            set_syserr(ENOCSI, "ENOCSI");
set_syserr       1327 error.c            set_syserr(EL2HLT, "EL2HLT");
set_syserr       1330 error.c            set_syserr(EBADE, "EBADE");
set_syserr       1333 error.c            set_syserr(EBADR, "EBADR");
set_syserr       1336 error.c            set_syserr(EXFULL, "EXFULL");
set_syserr       1339 error.c            set_syserr(ENOANO, "ENOANO");
set_syserr       1342 error.c            set_syserr(EBADRQC, "EBADRQC");
set_syserr       1345 error.c            set_syserr(EBADSLT, "EBADSLT");
set_syserr       1348 error.c            set_syserr(EDEADLOCK, "EDEADLOCK");
set_syserr       1351 error.c            set_syserr(EBFONT, "EBFONT");
set_syserr       1354 error.c            set_syserr(ENOSTR, "ENOSTR");
set_syserr       1357 error.c            set_syserr(ENODATA, "ENODATA");
set_syserr       1360 error.c            set_syserr(ETIME, "ETIME");
set_syserr       1363 error.c            set_syserr(ENOSR, "ENOSR");
set_syserr       1366 error.c            set_syserr(ENONET, "ENONET");
set_syserr       1369 error.c            set_syserr(ENOPKG, "ENOPKG");
set_syserr       1372 error.c            set_syserr(EREMOTE, "EREMOTE");
set_syserr       1375 error.c            set_syserr(ENOLINK, "ENOLINK");
set_syserr       1378 error.c            set_syserr(EADV, "EADV");
set_syserr       1381 error.c            set_syserr(ESRMNT, "ESRMNT");
set_syserr       1384 error.c            set_syserr(ECOMM, "ECOMM");
set_syserr       1387 error.c            set_syserr(EPROTO, "EPROTO");
set_syserr       1390 error.c            set_syserr(EMULTIHOP, "EMULTIHOP");
set_syserr       1393 error.c            set_syserr(EDOTDOT, "EDOTDOT");
set_syserr       1396 error.c            set_syserr(EBADMSG, "EBADMSG");
set_syserr       1399 error.c            set_syserr(EOVERFLOW, "EOVERFLOW");
set_syserr       1402 error.c            set_syserr(ENOTUNIQ, "ENOTUNIQ");
set_syserr       1405 error.c            set_syserr(EBADFD, "EBADFD");
set_syserr       1408 error.c            set_syserr(EREMCHG, "EREMCHG");
set_syserr       1411 error.c            set_syserr(ELIBACC, "ELIBACC");
set_syserr       1414 error.c            set_syserr(ELIBBAD, "ELIBBAD");
set_syserr       1417 error.c            set_syserr(ELIBSCN, "ELIBSCN");
set_syserr       1420 error.c            set_syserr(ELIBMAX, "ELIBMAX");
set_syserr       1423 error.c            set_syserr(ELIBEXEC, "ELIBEXEC");
set_syserr       1426 error.c            set_syserr(EILSEQ, "EILSEQ");
set_syserr       1429 error.c            set_syserr(ERESTART, "ERESTART");
set_syserr       1432 error.c            set_syserr(ESTRPIPE, "ESTRPIPE");
set_syserr       1435 error.c            set_syserr(EUSERS, "EUSERS");
set_syserr       1438 error.c            set_syserr(ENOTSOCK, "ENOTSOCK");
set_syserr       1441 error.c            set_syserr(EDESTADDRREQ, "EDESTADDRREQ");
set_syserr       1444 error.c            set_syserr(EMSGSIZE, "EMSGSIZE");
set_syserr       1447 error.c            set_syserr(EPROTOTYPE, "EPROTOTYPE");
set_syserr       1450 error.c            set_syserr(ENOPROTOOPT, "ENOPROTOOPT");
set_syserr       1453 error.c            set_syserr(EPROTONOSUPPORT, "EPROTONOSUPPORT");
set_syserr       1456 error.c            set_syserr(ESOCKTNOSUPPORT, "ESOCKTNOSUPPORT");
set_syserr       1459 error.c            set_syserr(EOPNOTSUPP, "EOPNOTSUPP");
set_syserr       1462 error.c            set_syserr(EPFNOSUPPORT, "EPFNOSUPPORT");
set_syserr       1465 error.c            set_syserr(EAFNOSUPPORT, "EAFNOSUPPORT");
set_syserr       1468 error.c            set_syserr(EADDRINUSE, "EADDRINUSE");
set_syserr       1471 error.c            set_syserr(EADDRNOTAVAIL, "EADDRNOTAVAIL");
set_syserr       1474 error.c            set_syserr(ENETDOWN, "ENETDOWN");
set_syserr       1477 error.c            set_syserr(ENETUNREACH, "ENETUNREACH");
set_syserr       1480 error.c            set_syserr(ENETRESET, "ENETRESET");
set_syserr       1483 error.c            set_syserr(ECONNABORTED, "ECONNABORTED");
set_syserr       1486 error.c            set_syserr(ECONNRESET, "ECONNRESET");
set_syserr       1489 error.c            set_syserr(ENOBUFS, "ENOBUFS");
set_syserr       1492 error.c            set_syserr(EISCONN, "EISCONN");
set_syserr       1495 error.c            set_syserr(ENOTCONN, "ENOTCONN");
set_syserr       1498 error.c            set_syserr(ESHUTDOWN, "ESHUTDOWN");
set_syserr       1501 error.c            set_syserr(ETOOMANYREFS, "ETOOMANYREFS");
set_syserr       1504 error.c            set_syserr(ETIMEDOUT, "ETIMEDOUT");
set_syserr       1507 error.c            set_syserr(ECONNREFUSED, "ECONNREFUSED");
set_syserr       1510 error.c            set_syserr(EHOSTDOWN, "EHOSTDOWN");
set_syserr       1513 error.c            set_syserr(EHOSTUNREACH, "EHOSTUNREACH");
set_syserr       1516 error.c            set_syserr(EALREADY, "EALREADY");
set_syserr       1519 error.c            set_syserr(EINPROGRESS, "EINPROGRESS");
set_syserr       1522 error.c            set_syserr(ESTALE, "ESTALE");
set_syserr       1525 error.c            set_syserr(EUCLEAN, "EUCLEAN");
set_syserr       1528 error.c            set_syserr(ENOTNAM, "ENOTNAM");
set_syserr       1531 error.c            set_syserr(ENAVAIL, "ENAVAIL");
set_syserr       1534 error.c            set_syserr(EISNAM, "EISNAM");
set_syserr       1537 error.c            set_syserr(EREMOTEIO, "EREMOTEIO");
set_syserr       1540 error.c            set_syserr(EDQUOT, "EDQUOT");


setbinmode

setbinmode        721 ext/nkf/nkf-utf8/nkf.c     setbinmode(stdout);
setbinmode        734 ext/nkf/nkf-utf8/nkf.c       setbinmode(stdin);
setbinmode        814 ext/nkf/nkf-utf8/nkf.c                       setbinmode(stdout);
setbinmode        823 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          1916 process.c          if (seteuid(NUM2INT(id)) != 0) rb_sys_fail(0);
seteuid          2099 process.c      		if (seteuid(uid) < 0) rb_sys_fail(0);
seteuid          2108 process.c      		    if (seteuid(uid) < 0) rb_sys_fail(0);
seteuid          2114 process.c      	    if (seteuid(uid) < 0) rb_sys_fail(0);
seteuid          2146 process.c      	    if (geteuid() != uid && seteuid(uid) < 0) rb_sys_fail(0);
seteuid          2158 process.c      	    if (seteuid(uid) < 0) rb_sys_fail(0);
seteuid          2177 process.c      	    if (seteuid(uid) < 0) rb_sys_fail(0);
seteuid          2786 process.c          if (seteuid(NUM2INT(euid)) < 0) rb_sys_fail(0);
seteuid          2826 process.c          if (seteuid(euid) < 0) rb_sys_fail(0);


setgid

setgid           2213 process.c          if (setgid(NUM2INT(id)) != 0) rb_sys_fail(0);
setgid           2390 process.c      	    if (setgid(gid) < 0) rb_sys_fail(0);
setgid           2622 process.c      	if (setgid(gid) < 0) rb_sys_fail(0);
setgid           2720 process.c      	    if (setgid(gid) < 0) rb_sys_fail(0);
setgid           2735 process.c      	    if (setgid(gid) < 0) rb_sys_fail(0);
setgid           2904 process.c      	if (setgid(egid) < 0) rb_sys_fail(0);
setgid           2943 process.c          if (setgid(egid) < 0) rb_sys_fail(0);
setgid            305 win32/win32.h  extern int       setgid (rb_gid_t);


setjmp

setjmp            151 eval.c            setjmp(function_call_may_return_twice_jmp_buf) : \
setjmp            161 eval.c         #if !defined(setjmp) && defined(HAVE__SETJMP)
setjmp            165 eval.c         #define ruby_setjmp(env) setjmp(env)
setjmp             54 gc.c           #if !defined(setjmp) && defined(HAVE__SETJMP)
setjmp           1280 gc.c           #ifdef setjmp
setjmp           1351 gc.c               setjmp(save_regs_gc_mark);


setmode

setmode           124 ext/nkf/nkf-utf8/nkf.c #define setbinmode(fp) setmode(fileno(fp), O_BINARY)
setmode          2456 io.c               if (fptr->f && setmode(fileno(fptr->f), O_BINARY) == -1)
setmode          2458 io.c               if (fptr->f2 && setmode(fileno(fptr->f2), O_BINARY) == -1)
setmode          4010 io.c           	setmode(fileno(f), O_BINARY);


setsockopt

setsockopt        379 ext/socket/socket.c     if (setsockopt(fileno(fptr->f), level, option, v, vlen) < 0)
setsockopt       1102 ext/socket/socket.c 	    setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
setsockopt       1972 win32/win32.c      setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE,
setsockopt       2214 win32/win32.c  	r = setsockopt(TO_SOCKET(s), level, optname, optval, optlen);
setsockopt        444 win32/win32.h  #ifdef setsockopt


setuid

setuid           1869 process.c          if (setuid(NUM2INT(id)) != 0) rb_sys_fail(0);
setuid           2018 process.c      	    if (setuid(uid) < 0) rb_sys_fail(0);
setuid           2072 process.c      	if (setuid(uid) < 0) rb_sys_fail(0);
setuid           2169 process.c      	    if (setuid(uid) < 0) rb_sys_fail(0);
setuid           2184 process.c      	    if (setuid(uid) < 0) rb_sys_fail(0);
setuid           2790 process.c      	if (setuid(euid) < 0) rb_sys_fail(0);
setuid           2829 process.c          if (setuid(euid) < 0) rb_sys_fail(0);
setuid            304 win32/win32.h  extern int       setuid (rb_uid_t);


setup_domain_and_type

setup_domain_and_type 2021 ext/socket/socket.c     setup_domain_and_type(domain, &d, type, &t);
setup_domain_and_type 2035 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_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);


setvbuffer

setvbuffer        727 ext/nkf/nkf-utf8/nkf.c       setvbuffer(stdout, stdobuf, IOBUF_SIZE);
setvbuffer        736 ext/nkf/nkf-utf8/nkf.c       setvbuffer(stdin, stdibuf, IOBUF_SIZE);
setvbuffer        825 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;


shift

shift            1816 bignum.c           int shift = NUM2INT(y);
shift            1817 bignum.c           int s1 = shift/BITSPERDIG;
shift            1818 bignum.c           int s2 = shift%BITSPERDIG;
shift            1823 bignum.c           if (shift < 0) return rb_big_rshift(x, INT2FIX(-shift));
shift            1852 bignum.c           int shift = NUM2INT(y);
shift            1853 bignum.c           long s1 = shift/BITSPERDIG;
shift            1854 bignum.c           long s2 = shift%BITSPERDIG;
shift            1860 bignum.c           if (shift < 0) return rb_big_lshift(x, INT2FIX(-shift));
shift            1914 bignum.c           int shift;
shift            1922 bignum.c           shift = NUM2INT(y);
shift            1923 bignum.c           if (shift < 0) return INT2FIX(0);
shift            1924 bignum.c           s1 = shift/BITSPERDIG;
shift            1925 bignum.c           s2 = shift%BITSPERDIG;
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            1133 marshal.c      		int shift = 0;
shift            1137 marshal.c      		    num |= (int)p[i] << shift;
shift            1138 marshal.c      		    shift += 8;


shutdown

shutdown          256 ext/socket/socket.c     if (shutdown(fileno(fptr->f), how) == -1)
shutdown          272 ext/socket/socket.c     shutdown(fileno(fptr->f), 0);
shutdown          294 ext/socket/socket.c     shutdown(fileno(fptr->f2), 1);
shutdown         1202 ext/socket/socket.c     shutdown(fileno(fptr->f), 2);
shutdown         1203 ext/socket/socket.c     shutdown(fileno(fptr->f2), 2);
shutdown         2231 win32/win32.c  	r = shutdown(TO_SOCKET(s), how);
shutdown          449 win32/win32.h  #ifdef shutdown


sig_trap

sig_trap          860 signal.c           rb_define_global_function("trap", sig_trap, -1);
sig_trap          861 signal.c           rb_define_module_function(mSignal, "trap", sig_trap, -1);


sigbus

sigbus            432 signal.c       static RETSIGTYPE sigbus _((int));
sigbus            611 signal.c       	    func = sigbus;
sigbus            882 signal.c           install_sighandler(SIGBUS, sigbus);


sigexit

sigexit           507 signal.c       static RETSIGTYPE sigexit _((int));
sigexit           552 signal.c       		func = sigexit;


sighandler

sighandler        402 signal.c       static RETSIGTYPE sighandler _((int));
sighandler        418 signal.c           ruby_signal(sig, sighandler);
sighandler        524 signal.c           func = sighandler;
sighandler        607 signal.c       	    func = sighandler;
sighandler        630 signal.c       	else if (oldfunc == sighandler) oldcmd = rb_str_new2("DEFAULT");
sighandler        864 signal.c           install_sighandler(SIGINT, sighandler);
sighandler        866 signal.c           install_sighandler(SIGHUP, sighandler);
sighandler        869 signal.c           install_sighandler(SIGQUIT, sighandler);
sighandler        872 signal.c           install_sighandler(SIGALRM, sighandler);
sighandler        875 signal.c           install_sighandler(SIGUSR1, sighandler);
sighandler        878 signal.c           install_sighandler(SIGUSR2, sighandler);


sighandler_t

sighandler_t      331 signal.c       static sighandler_t
sighandler_t      334 signal.c           sighandler_t handler;
sighandler_t      360 signal.c           sighandler_t handler;
sighandler_t      519 signal.c           sighandler_t func, oldfunc;
sighandler_t      765 signal.c           sighandler_t handler;
sighandler_t      767 signal.c           sighandler_t old;
sighandler_t      779 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         667 sprintf.c      		    char c = sign_bits(base, p);
sign_bits         676 sprintf.c      			c = sign_bits(base, p);


signal

signal           1486 eval.c             signal(SIGINT, SIG_DFL);
signal           11504 eval.c             signal(sig, catch_timer);
signal           11552 eval.c             signal(sig, catch_timer);
signal           11610 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           1368 process.c      	hfunc = signal(SIGHUP, SIG_IGN);
signal           1371 process.c      	qfunc = signal(SIGQUIT, SIG_IGN);
signal           1373 process.c      	ifunc = signal(SIGINT, SIG_IGN);
signal           1384 process.c      	signal(SIGHUP, hfunc);
signal           1387 process.c      	signal(SIGQUIT, qfunc);
signal           1389 process.c      	signal(SIGINT, ifunc);
signal            365 signal.c       #define ruby_signal(sig,handler) signal((sig),(handler))
signal             62 wince/signal.h   void (* signal(int sig, void (__cdecl *func)(int)))(int);


signal_exec

signal_exec       368 signal.c       static void signal_exec _((int sig));
signal_exec       422 signal.c       	IN_MAIN_CONTEXT(signal_exec, sig);
signal_exec       483 signal.c       	    signal_exec(i);


signm2signo

signm2signo       258 signal.c       	if((sig = signm2signo(s)) == 0)
signm2signo       576 signal.c       	sig = signm2signo(s);


signo2signm

signo2signm       199 signal.c           return signo2signm(no);
signo2signm       393 signal.c       	    rb_thread_signal_raise(signo2signm(sig));


sigpipe

sigpipe           452 signal.c       static RETSIGTYPE sigpipe _((int));
sigpipe           621 signal.c       	    func = sigpipe;
sigpipe           888 signal.c           install_sighandler(SIGPIPE, sigpipe);


sigsegv

sigsegv           442 signal.c       static RETSIGTYPE sigsegv _((int));
sigsegv           616 signal.c       	    func = sigsegv;
sigsegv           885 signal.c           install_sighandler(SIGSEGV, sigsegv);


sigset_t

sigset_t          493 signal.c           sigset_t mask;
sigset_t          502 signal.c       static sigset_t trap_last_mask;
sigset_t          782 signal.c           sigset_t mask;
sigset_t           55 wince/signal.h 	sigset_t sa_mask;


sinh

sinh              201 math.c             return rb_float_new(sinh(RFLOAT(x)->value));
sinh              209 math.c             return sinh(x) / cosh(x);


size_t

size_t            910 error.c        	size_t len;
size_t            658 eval.c             size_t len;
size_t           12341 eval.c             size_t len = strlen(cname)+7+16+9+1;
size_t             92 ext/digest/digest.c     size_t len;
size_t            121 ext/digest/digest.c     size_t len;
size_t            201 ext/digest/digest.c     size_t len;
size_t            232 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            112 ext/dl/dl.c    dlmalloc(size_t size)
size_t            128 ext/dl/dl.c    dlrealloc(void *ptr, size_t size)
size_t            156 ext/dl/dl.c    size_t
size_t            159 ext/dl/dl.c      size_t size;
size_t            288 ext/dl/dl.h    void *dlmalloc(size_t);
size_t            289 ext/dl/dl.h    void *dlrealloc(void*,size_t);
size_t            291 ext/dl/dl.h    size_t dlsizeof(const char *);
size_t            137 ext/dl/ptr.c     ptr = dlmalloc((size_t)size);
size_t            138 ext/dl/ptr.c     memset(ptr,0,(size_t)size);
size_t            210 ext/dl/sym.c     size_t len;
size_t            102 ext/iconv/iconv.c static VALUE iconv_try _((iconv_t cd, const char **inptr, size_t *inlen, char **outptr, size_t *outlen));
size_t            237 ext/iconv/iconv.c     (iconv_t cd, const char **inptr, size_t *inlen, char **outptr, size_t *outlen)
size_t            242 ext/iconv/iconv.c     size_t *inlen;
size_t            244 ext/iconv/iconv.c     size_t *outlen;
size_t            252 ext/iconv/iconv.c     size_t ret;
size_t            256 ext/iconv/iconv.c     if (ret == (size_t)-1) {
size_t            379 ext/iconv/iconv.c     size_t inlen;
size_t            383 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            634 ext/socket/socket.c     size_t len;
size_t            658 ext/socket/socket.c     size_t len;
size_t            689 ext/socket/socket.c     size_t len;
size_t            725 ext/socket/socket.c     size_t len;
size_t           1212 ext/socket/socket.c     VALUE (*ipaddr)_((struct sockaddr*, size_t));
size_t           1221 ext/socket/socket.c     VALUE (*ipaddr)_((struct sockaddr*, size_t)) = arg->ipaddr;
size_t           1263 ext/socket/socket.c     VALUE (*ipaddr)_((struct sockaddr*, size_t));
size_t           1277 ext/socket/socket.c     size_t len;
size_t           2707 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           1371 gc.c           			     ((size_t)(sizeof(VALUE)-1 + sizeof ctx.uc_mcontext)/sizeof(VALUE)));
size_t           1440 gc.c               size_t size;
size_t           1823 hash.c             size_t len;
size_t            111 missing.h      extern size_t strftime _((char *, size_t, const char *, const struct tm *));
size_t            134 missing.h      extern int snprintf __((char *, size_t n, char const *, ...));
size_t            135 missing.h      extern int vsnprintf _((char *, size_t n, char const *, va_list));
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            206 missing/vsnprintf.c 	size_t	iov_len;
size_t            224 missing/vsnprintf.c 	register size_t len;
size_t            234 missing/vsnprintf.c #define	COPY(n)	  (void)memcpy((void *)fp->_p, (void *)p, (size_t)(n))
size_t           1079 missing/vsnprintf.c 	size_t n;
size_t           1108 missing/vsnprintf.c snprintf(char *str, size_t n, char const *fmt, ...)
size_t           1112 missing/vsnprintf.c size_t n;
size_t            358 object.c           size_t len;
size_t            439 object.c       	size_t len;
size_t            135 parse.c        static void *rb_parser_malloc _((size_t));
size_t            136 parse.c        static void *rb_parser_realloc _((void *, size_t));
size_t            137 parse.c        static void *rb_parser_calloc _((size_t, size_t));
size_t           3024 parse.c        #   define YYSIZE_T size_t
size_t           3101 parse.c        #if ! defined (YYSIZE_T) && defined (size_t)
size_t           3102 parse.c        # define YYSIZE_T size_t
size_t           3107 parse.c        #  define YYSIZE_T size_t
size_t           10245 parse.c            size_t size;
size_t           10247 parse.c            size_t cnt = HEAPCNT(1, size);
size_t           10256 parse.c            size_t nelem, size;
size_t           10258 parse.c            size_t cnt = HEAPCNT(nelem, size);
size_t           10268 parse.c            size_t size;
size_t           10271 parse.c            size_t cnt = HEAPCNT(1, size);
size_t             38 parse.y        static void *rb_parser_malloc _((size_t));
size_t             39 parse.y        static void *rb_parser_realloc _((void *, size_t));
size_t             40 parse.y        static void *rb_parser_calloc _((size_t, size_t));
size_t           6247 parse.y            size_t size;
size_t           6249 parse.y            size_t cnt = HEAPCNT(1, size);
size_t           6258 parse.y            size_t nelem, size;
size_t           6260 parse.y            size_t cnt = HEAPCNT(nelem, size);
size_t           6270 parse.y            size_t size;
size_t           6273 parse.y            size_t cnt = HEAPCNT(1, size);
size_t           2403 process.c      static size_t maxgroups = 32;
size_t           2422 process.c          size_t ngroups;
size_t           2461 process.c          size_t ngroups;
size_t           2570 process.c          size_t  ngroups = FIX2INT(val);
size_t            174 regex.h        typedef size_t regoff_t;
size_t            521 struct.c       	size_t len = strlen(cname) + 14;
size_t            289 util.c         mblen(const char *s, size_t n)
size_t            199 variable.c     	size_t len;
size_t           3488 win32/win32.c  rb_w32_vsnprintf(char *buf, size_t size, const char *format, va_list va)
size_t           3496 win32/win32.c  rb_w32_snprintf(char *buf, size_t size, const char *format, ...)
size_t            199 win32/win32.h  extern int rb_w32_vsnprintf(char *, size_t, const char *, va_list);
size_t            200 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 2649 ext/nkf/nkf-utf8/nkf.c         if (0<=c2 && c2<sizeof_euc_to_utf8_2bytes)
sizeof_euc_to_utf8_2bytes 2657 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 2464 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 2552 ext/nkf/nkf-utf8/nkf.c             psize = sizeof_utf8_to_euc_2bytes;


sizeof_utf8_to_euc_C2

sizeof_utf8_to_euc_C2 2462 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 2548 ext/nkf/nkf-utf8/nkf.c             psize = sizeof_utf8_to_euc_C2;


sjis_startpos

sjis_startpos     482 regex.c        static unsigned int sjis_startpos _((const char *string, unsigned int pos));
sjis_startpos     486 regex.c          asc_startpos, euc_startpos, sjis_startpos, utf8_startpos


skipprefix

skipprefix       2567 file.c         	    p = skipprefix(buf);
skipprefix       2586 file.c             root = skipprefix(buf);
skipprefix       2749 file.c             name = skipprefix(name);
skipprefix       2816 file.c         	root = skipprefix(name = root - 2);


skiproot

skiproot         2544 file.c         	    p = chompdirsep(skiproot(buf));
skiproot         2571 file.c         	    p = chompdirsep(skiproot(buf));
skiproot         2647 file.c             if (p == skiproot(buf) - 1) p++;
skiproot         2813 file.c             root = skiproot(name);
skiproot         2830 file.c         	rb_str_cat(dirname, skiproot(name + 2), p - skiproot(name + 2));


sleep

sleep            9650 eval.c         #  define pause() sleep(0x7fffffff)
sleep            11207 eval.c         	sleep(sec);
sleep             287 ext/pty/pty.c  	sleep(1);


snprintf

snprintf          128 dln.c              snprintf(*buf, len, FUNCNAME_PATTERN, slash + 1);
snprintf          967 dln.c          	snprintf(p, len, "lib%s.a", lib+2);
snprintf         1247 dln.c              snprintf(errbuf, 1024, "load failed - %s ", pathname);
snprintf           46 error.c        	return snprintf(buf, len, "%s: ", ruby_sourcefile);
snprintf           49 error.c        	return snprintf(buf, len, "%s:%d: ", ruby_sourcefile, ruby_sourceline);
snprintf          143 error.c            snprintf(buf, BUFSIZ, "warning: %s", fmt);
snprintf          165 error.c            snprintf(buf, BUFSIZ, "warning: %s", fmt);
snprintf          859 error.c        	snprintf(name, sizeof(name), "E%03d", n);
snprintf          915 error.c        	snprintf(RSTRING(mesg)->ptr, len+1, "%s - %.*s", err,
snprintf         1143 error.c             snprintf(buf, BUFSIZ, "warning: %s", fmt);
snprintf         1144 error.c             snprintf(buf+strlen(buf), BUFSIZ-strlen(buf), ": %s", strerror(errno_save));
snprintf          685 eval.c             snprintf(buf, len, "@%s", name);
snprintf         4700 eval.c             snprintf(mesg, sizeof mesg, "%s from proc-closure", statement);
snprintf         6110 eval.c         	    snprintf(buf, BUFSIZ, "%s:%d:in `%s'",
snprintf         6115 eval.c         	    snprintf(buf, BUFSIZ, "%s", ruby_sourcefile);
snprintf         6118 eval.c         	    snprintf(buf, BUFSIZ, "%s:%d", ruby_sourcefile, ruby_sourceline);
snprintf         6135 eval.c         	    snprintf(buf, BUFSIZ, "%s:%d:in `%s'",
snprintf         6140 eval.c         	    snprintf(buf, BUFSIZ, "%s:%d", n->nd_file, nd_line(n));
snprintf         8569 eval.c         	snprintf(RSTRING(str)->ptr, len+1,
snprintf         8575 eval.c         	snprintf(RSTRING(str)->ptr, len+1,
snprintf         12344 eval.c             snprintf(RSTRING(str)->ptr, len, "#<%s:0x%lx %s>", cname, thread, status);
snprintf          469 ext/dl/ptr.c     snprintf(str, 1023, "#<%s:0x%p ptr=0x%p size=%ld free=0x%p>",
snprintf          270 ext/dl/sym.c     snprintf(str, str_size - 1,
snprintf          300 ext/openssl/ossl.c 	len += snprintf(buf+len, BUFSIZ-len, fmt, msg);
snprintf          154 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          731 ext/socket/socket.c 	snprintf(pbuf, len, "%ld", FIX2LONG(port));
snprintf         2844 ext/socket/socket.c 	snprintf(pbuf, sizeof(pbuf), "%ld", FIX2LONG(port));
snprintf         2970 ext/socket/socket.c 	    snprintf(pbuf, sizeof(pbuf), "%ld", NUM2LONG(port));
snprintf         1110 ext/strscan/strscan.c         len = snprintf(buf, BUFSIZE, "#<%s (uninitialized)>",
snprintf         1115 ext/strscan/strscan.c         len = snprintf(buf, BUFSIZE, "#<%s fin>",
snprintf         1121 ext/strscan/strscan.c         len = snprintf(buf, BUFSIZE, "#<%s %ld/%ld @ %s>",
snprintf         1129 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          233 ext/zlib/zlib.c 	  snprintf(buf, BUFSIZ, "unknown zlib error %d: %s", err, msg);
snprintf         2066 file.c             snprintf(buf, len, "%s or %s", RSTRING(s1)->ptr, RSTRING(s2)->ptr);
snprintf         1859 hash.c             snprintf(environ[i],len,"%s=%s",name,value); /* all that work just for this */
snprintf          996 io.c               snprintf(buf, len, "#<%s:%s%s>", cname, fptr->path, st);
snprintf          134 missing.h      extern int snprintf __((char *, size_t n, char const *, ...));
snprintf          363 object.c           snprintf(RSTRING(str)->ptr, len+1, "#<%s:0x%lx>", cname, obj);
snprintf          446 object.c       	    snprintf(RSTRING(str)->ptr, len, "#<%s:0x%lx ...>", c, obj);
snprintf          452 object.c       	snprintf(RSTRING(str)->ptr, len, "-<%s:0x%lx", c, obj);
snprintf          277 process.c          snprintf(buf, sizeof(buf), "#<%s: pid=%ld", rb_class2name(CLASS_OF(st)), NUM2LONG(pid));
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         1345 regex.c        	snprintf(error_msg, ERROR_MSG_MAX_SIZE,
snprintf         1639 regex.c        	      snprintf(error_msg, ERROR_MSG_MAX_SIZE,
snprintf         2009 regex.c        	snprintf(error_msg, ERROR_MSG_MAX_SIZE,
snprintf          524 struct.c       	snprintf(RSTRING(str)->ptr, len+1, "#<struct %s:...>", cname);
snprintf          211 variable.c     	snprintf(RSTRING(path)->ptr, len+1, "#<%s:0x%lx>", s, klass);


sock_addrinfo

sock_addrinfo    1080 ext/socket/socket.c     arg->remote.res = sock_addrinfo(arg->remote.host, arg->remote.serv, SOCK_STREAM,
sock_addrinfo    1087 ext/socket/socket.c 	arg->local.res = sock_addrinfo(arg->local.host, arg->local.serv, SOCK_STREAM, 0);
sock_addrinfo    1287 ext/socket/socket.c     return make_hostent(host, sock_addrinfo(host, Qnil, SOCK_STREAM, AI_CANONNAME), tcp_sockaddr);
sock_addrinfo    1481 ext/socket/socket.c     struct addrinfo *res = sock_addrinfo(host, Qnil, SOCK_STREAM, 0);
sock_addrinfo    1542 ext/socket/socket.c     arg.res = sock_addrinfo(host, port, SOCK_DGRAM, 0);
sock_addrinfo    1559 ext/socket/socket.c     res0 = sock_addrinfo(host, port, SOCK_DGRAM, 0);
sock_addrinfo    1592 ext/socket/socket.c     res0 = sock_addrinfo(host, port, SOCK_DGRAM, 0);
sock_addrinfo    2734 ext/socket/socket.c     return make_hostent(host, sock_addrinfo(host, Qnil, SOCK_STREAM, AI_CANONNAME), sock_sockaddr);
sock_addrinfo    3038 ext/socket/socket.c     struct addrinfo *res = sock_addrinfo(host, port, 0, 0);


sock_define_const

sock_define_const 3243 ext/socket/socket.c     sock_define_const("SOCK_STREAM", SOCK_STREAM);
sock_define_const 3244 ext/socket/socket.c     sock_define_const("SOCK_DGRAM", SOCK_DGRAM);
sock_define_const 3246 ext/socket/socket.c     sock_define_const("SOCK_RAW", SOCK_RAW);
sock_define_const 3249 ext/socket/socket.c     sock_define_const("SOCK_RDM", SOCK_RDM);
sock_define_const 3252 ext/socket/socket.c     sock_define_const("SOCK_SEQPACKET", SOCK_SEQPACKET);
sock_define_const 3255 ext/socket/socket.c     sock_define_const("SOCK_PACKET", SOCK_PACKET);
sock_define_const 3258 ext/socket/socket.c     sock_define_const("AF_INET", AF_INET);
sock_define_const 3260 ext/socket/socket.c     sock_define_const("PF_INET", PF_INET);
sock_define_const 3263 ext/socket/socket.c     sock_define_const("AF_UNIX", AF_UNIX);
sock_define_const 3264 ext/socket/socket.c     sock_define_const("PF_UNIX", PF_UNIX);
sock_define_const 3267 ext/socket/socket.c     sock_define_const("AF_AX25", AF_AX25);
sock_define_const 3268 ext/socket/socket.c     sock_define_const("PF_AX25", PF_AX25);
sock_define_const 3271 ext/socket/socket.c     sock_define_const("AF_IPX", AF_IPX);
sock_define_const 3272 ext/socket/socket.c     sock_define_const("PF_IPX", PF_IPX);
sock_define_const 3275 ext/socket/socket.c     sock_define_const("AF_APPLETALK", AF_APPLETALK);
sock_define_const 3276 ext/socket/socket.c     sock_define_const("PF_APPLETALK", PF_APPLETALK);
sock_define_const 3279 ext/socket/socket.c     sock_define_const("AF_UNSPEC", AF_UNSPEC);
sock_define_const 3280 ext/socket/socket.c     sock_define_const("PF_UNSPEC", PF_UNSPEC);
sock_define_const 3283 ext/socket/socket.c     sock_define_const("AF_INET6", AF_INET6);
sock_define_const 3286 ext/socket/socket.c     sock_define_const("PF_INET6", PF_INET6);
sock_define_const 3289 ext/socket/socket.c     sock_define_const("AF_LOCAL", AF_LOCAL);
sock_define_const 3292 ext/socket/socket.c     sock_define_const("PF_LOCAL", PF_LOCAL);
sock_define_const 3295 ext/socket/socket.c     sock_define_const("AF_IMPLINK", AF_IMPLINK);
sock_define_const 3298 ext/socket/socket.c     sock_define_const("PF_IMPLINK", PF_IMPLINK);
sock_define_const 3301 ext/socket/socket.c     sock_define_const("AF_PUP", AF_PUP);
sock_define_const 3304 ext/socket/socket.c     sock_define_const("PF_PUP", PF_PUP);
sock_define_const 3307 ext/socket/socket.c     sock_define_const("AF_CHAOS", AF_CHAOS);
sock_define_const 3310 ext/socket/socket.c     sock_define_const("PF_CHAOS", PF_CHAOS);
sock_define_const 3313 ext/socket/socket.c     sock_define_const("AF_NS", AF_NS);
sock_define_const 3316 ext/socket/socket.c     sock_define_const("PF_NS", PF_NS);
sock_define_const 3319 ext/socket/socket.c     sock_define_const("AF_ISO", AF_ISO);
sock_define_const 3322 ext/socket/socket.c     sock_define_const("PF_ISO", PF_ISO);
sock_define_const 3325 ext/socket/socket.c     sock_define_const("AF_OSI", AF_OSI);
sock_define_const 3328 ext/socket/socket.c     sock_define_const("PF_OSI", PF_OSI);
sock_define_const 3331 ext/socket/socket.c     sock_define_const("AF_ECMA", AF_ECMA);
sock_define_const 3334 ext/socket/socket.c     sock_define_const("PF_ECMA", PF_ECMA);
sock_define_const 3337 ext/socket/socket.c     sock_define_const("AF_DATAKIT", AF_DATAKIT);
sock_define_const 3340 ext/socket/socket.c     sock_define_const("PF_DATAKIT", PF_DATAKIT);
sock_define_const 3343 ext/socket/socket.c     sock_define_const("AF_CCITT", AF_CCITT);
sock_define_const 3346 ext/socket/socket.c     sock_define_const("PF_CCITT", PF_CCITT);
sock_define_const 3349 ext/socket/socket.c     sock_define_const("AF_SNA", AF_SNA);
sock_define_const 3352 ext/socket/socket.c     sock_define_const("PF_SNA", PF_SNA);
sock_define_const 3355 ext/socket/socket.c     sock_define_const("AF_DEC", AF_DEC);
sock_define_const 3358 ext/socket/socket.c     sock_define_const("PF_DEC", PF_DEC);
sock_define_const 3361 ext/socket/socket.c     sock_define_const("AF_DLI", AF_DLI);
sock_define_const 3364 ext/socket/socket.c     sock_define_const("PF_DLI", PF_DLI);
sock_define_const 3367 ext/socket/socket.c     sock_define_const("AF_LAT", AF_LAT);
sock_define_const 3370 ext/socket/socket.c     sock_define_const("PF_LAT", PF_LAT);
sock_define_const 3373 ext/socket/socket.c     sock_define_const("AF_HYLINK", AF_HYLINK);
sock_define_const 3376 ext/socket/socket.c     sock_define_const("PF_HYLINK", PF_HYLINK);
sock_define_const 3379 ext/socket/socket.c     sock_define_const("AF_ROUTE", AF_ROUTE);
sock_define_const 3382 ext/socket/socket.c     sock_define_const("PF_ROUTE", PF_ROUTE);
sock_define_const 3385 ext/socket/socket.c     sock_define_const("AF_LINK", AF_LINK);
sock_define_const 3388 ext/socket/socket.c     sock_define_const("PF_LINK", PF_LINK);
sock_define_const 3391 ext/socket/socket.c     sock_define_const("AF_COIP", AF_COIP);
sock_define_const 3394 ext/socket/socket.c     sock_define_const("PF_COIP", PF_COIP);
sock_define_const 3397 ext/socket/socket.c     sock_define_const("AF_CNT", AF_CNT);
sock_define_const 3400 ext/socket/socket.c     sock_define_const("PF_CNT", PF_CNT);
sock_define_const 3403 ext/socket/socket.c     sock_define_const("AF_SIP", AF_SIP);
sock_define_const 3406 ext/socket/socket.c     sock_define_const("PF_SIP", PF_SIP);
sock_define_const 3409 ext/socket/socket.c     sock_define_const("AF_NDRV", AF_NDRV);
sock_define_const 3412 ext/socket/socket.c     sock_define_const("PF_NDRV", PF_NDRV);
sock_define_const 3415 ext/socket/socket.c     sock_define_const("AF_ISDN", AF_ISDN);
sock_define_const 3418 ext/socket/socket.c     sock_define_const("PF_ISDN", PF_ISDN);
sock_define_const 3421 ext/socket/socket.c     sock_define_const("AF_NATM", AF_NATM);
sock_define_const 3424 ext/socket/socket.c     sock_define_const("PF_NATM", PF_NATM);
sock_define_const 3427 ext/socket/socket.c     sock_define_const("AF_SYSTEM", AF_SYSTEM);
sock_define_const 3430 ext/socket/socket.c     sock_define_const("PF_SYSTEM", PF_SYSTEM);
sock_define_const 3433 ext/socket/socket.c     sock_define_const("AF_NETBIOS", AF_NETBIOS);
sock_define_const 3436 ext/socket/socket.c     sock_define_const("PF_NETBIOS", PF_NETBIOS);
sock_define_const 3439 ext/socket/socket.c     sock_define_const("AF_PPP", AF_PPP);
sock_define_const 3442 ext/socket/socket.c     sock_define_const("PF_PPP", PF_PPP);
sock_define_const 3445 ext/socket/socket.c     sock_define_const("AF_ATM", AF_ATM);
sock_define_const 3448 ext/socket/socket.c     sock_define_const("PF_ATM", PF_ATM);
sock_define_const 3451 ext/socket/socket.c     sock_define_const("AF_NETGRAPH", AF_NETGRAPH);
sock_define_const 3454 ext/socket/socket.c     sock_define_const("PF_NETGRAPH", PF_NETGRAPH);
sock_define_const 3457 ext/socket/socket.c     sock_define_const("AF_MAX", AF_MAX);
sock_define_const 3460 ext/socket/socket.c     sock_define_const("PF_MAX", PF_MAX);
sock_define_const 3463 ext/socket/socket.c     sock_define_const("AF_E164", AF_E164);
sock_define_const 3466 ext/socket/socket.c     sock_define_const("PF_XTP", PF_XTP);
sock_define_const 3469 ext/socket/socket.c     sock_define_const("PF_RTIP", PF_RTIP);
sock_define_const 3472 ext/socket/socket.c     sock_define_const("PF_PIP", PF_PIP);
sock_define_const 3475 ext/socket/socket.c     sock_define_const("PF_KEY", PF_KEY);
sock_define_const 3478 ext/socket/socket.c     sock_define_const("MSG_OOB", MSG_OOB);
sock_define_const 3480 ext/socket/socket.c     sock_define_const("MSG_PEEK", MSG_PEEK);
sock_define_const 3483 ext/socket/socket.c     sock_define_const("MSG_DONTROUTE", MSG_DONTROUTE);
sock_define_const 3486 ext/socket/socket.c     sock_define_const("MSG_EOR", MSG_EOR);
sock_define_const 3489 ext/socket/socket.c     sock_define_const("MSG_TRUNC", MSG_TRUNC);
sock_define_const 3492 ext/socket/socket.c     sock_define_const("MSG_CTRUNC", MSG_CTRUNC);
sock_define_const 3495 ext/socket/socket.c     sock_define_const("MSG_WAITALL", MSG_WAITALL);
sock_define_const 3498 ext/socket/socket.c     sock_define_const("MSG_DONTWAIT", MSG_DONTWAIT);
sock_define_const 3501 ext/socket/socket.c     sock_define_const("MSG_EOF", MSG_EOF);
sock_define_const 3504 ext/socket/socket.c     sock_define_const("MSG_FLUSH", MSG_FLUSH);
sock_define_const 3507 ext/socket/socket.c     sock_define_const("MSG_HOLD", MSG_HOLD);
sock_define_const 3510 ext/socket/socket.c     sock_define_const("MSG_SEND", MSG_SEND);
sock_define_const 3513 ext/socket/socket.c     sock_define_const("MSG_HAVEMORE", MSG_HAVEMORE);
sock_define_const 3516 ext/socket/socket.c     sock_define_const("MSG_RCVMORE", MSG_RCVMORE);
sock_define_const 3519 ext/socket/socket.c     sock_define_const("MSG_COMPAT", MSG_COMPAT);
sock_define_const 3522 ext/socket/socket.c     sock_define_const("SOL_SOCKET", SOL_SOCKET);
sock_define_const 3524 ext/socket/socket.c     sock_define_const("SOL_IP", SOL_IP);
sock_define_const 3527 ext/socket/socket.c     sock_define_const("SOL_IPX", SOL_IPX);
sock_define_const 3530 ext/socket/socket.c     sock_define_const("SOL_AX25", SOL_AX25);
sock_define_const 3533 ext/socket/socket.c     sock_define_const("SOL_ATALK", SOL_ATALK);
sock_define_const 3536 ext/socket/socket.c     sock_define_const("SOL_TCP", SOL_TCP);
sock_define_const 3539 ext/socket/socket.c     sock_define_const("SOL_UDP", SOL_UDP);
sock_define_const 3543 ext/socket/socket.c     sock_define_const("IPPROTO_IP", IPPROTO_IP);
sock_define_const 3545 ext/socket/socket.c     sock_define_const("IPPROTO_IP", 0);
sock_define_const 3548 ext/socket/socket.c     sock_define_const("IPPROTO_ICMP", IPPROTO_ICMP);
sock_define_const 3550 ext/socket/socket.c     sock_define_const("IPPROTO_ICMP", 1);
sock_define_const 3553 ext/socket/socket.c     sock_define_const("IPPROTO_IGMP", IPPROTO_IGMP);
sock_define_const 3556 ext/socket/socket.c     sock_define_const("IPPROTO_GGP", IPPROTO_GGP);
sock_define_const 3559 ext/socket/socket.c     sock_define_const("IPPROTO_TCP", IPPROTO_TCP);
sock_define_const 3561 ext/socket/socket.c     sock_define_const("IPPROTO_TCP", 6);
sock_define_const 3564 ext/socket/socket.c     sock_define_const("IPPROTO_EGP", IPPROTO_EGP);
sock_define_const 3567 ext/socket/socket.c     sock_define_const("IPPROTO_PUP", IPPROTO_PUP);
sock_define_const 3570 ext/socket/socket.c     sock_define_const("IPPROTO_UDP", IPPROTO_UDP);
sock_define_const 3572 ext/socket/socket.c     sock_define_const("IPPROTO_UDP", 17);
sock_define_const 3575 ext/socket/socket.c     sock_define_const("IPPROTO_IDP", IPPROTO_IDP);
sock_define_const 3578 ext/socket/socket.c     sock_define_const("IPPROTO_HELLO", IPPROTO_HELLO);
sock_define_const 3581 ext/socket/socket.c     sock_define_const("IPPROTO_ND", IPPROTO_ND);
sock_define_const 3584 ext/socket/socket.c     sock_define_const("IPPROTO_TP", IPPROTO_TP);
sock_define_const 3587 ext/socket/socket.c     sock_define_const("IPPROTO_XTP", IPPROTO_XTP);
sock_define_const 3590 ext/socket/socket.c     sock_define_const("IPPROTO_EON", IPPROTO_EON);
sock_define_const 3593 ext/socket/socket.c     sock_define_const("IPPROTO_BIP", IPPROTO_BIP);
sock_define_const 3597 ext/socket/socket.c     sock_define_const("IPPROTO_RAW", IPPROTO_RAW);
sock_define_const 3599 ext/socket/socket.c     sock_define_const("IPPROTO_RAW", 255);
sock_define_const 3602 ext/socket/socket.c     sock_define_const("IPPROTO_MAX", IPPROTO_MAX);
sock_define_const 3607 ext/socket/socket.c     sock_define_const("IPPORT_RESERVED", IPPORT_RESERVED);
sock_define_const 3609 ext/socket/socket.c     sock_define_const("IPPORT_RESERVED", 1024);
sock_define_const 3612 ext/socket/socket.c     sock_define_const("IPPORT_USERRESERVED", IPPORT_USERRESERVED);
sock_define_const 3614 ext/socket/socket.c     sock_define_const("IPPORT_USERRESERVED", 5000);
sock_define_const 3618 ext/socket/socket.c     sock_define_const("INADDR_ANY", INADDR_ANY);
sock_define_const 3620 ext/socket/socket.c     sock_define_const("INADDR_ANY", 0x00000000);
sock_define_const 3623 ext/socket/socket.c     sock_define_const("INADDR_BROADCAST", INADDR_BROADCAST);
sock_define_const 3625 ext/socket/socket.c     sock_define_const("INADDR_BROADCAST", 0xffffffff);
sock_define_const 3628 ext/socket/socket.c     sock_define_const("INADDR_LOOPBACK", INADDR_LOOPBACK);
sock_define_const 3630 ext/socket/socket.c     sock_define_const("INADDR_LOOPBACK", 0x7F000001);
sock_define_const 3633 ext/socket/socket.c     sock_define_const("INADDR_UNSPEC_GROUP", INADDR_UNSPEC_GROUP);
sock_define_const 3635 ext/socket/socket.c     sock_define_const("INADDR_UNSPEC_GROUP", 0xe0000000);
sock_define_const 3638 ext/socket/socket.c     sock_define_const("INADDR_ALLHOSTS_GROUP", INADDR_ALLHOSTS_GROUP);
sock_define_const 3640 ext/socket/socket.c     sock_define_const("INADDR_ALLHOSTS_GROUP", 0xe0000001);
sock_define_const 3643 ext/socket/socket.c     sock_define_const("INADDR_MAX_LOCAL_GROUP", INADDR_MAX_LOCAL_GROUP);
sock_define_const 3645 ext/socket/socket.c     sock_define_const("INADDR_MAX_LOCAL_GROUP", 0xe00000ff);
sock_define_const 3648 ext/socket/socket.c     sock_define_const("INADDR_NONE", INADDR_NONE);
sock_define_const 3650 ext/socket/socket.c     sock_define_const("INADDR_NONE", 0xffffffff);
sock_define_const 3654 ext/socket/socket.c     sock_define_const("IP_OPTIONS", IP_OPTIONS);
sock_define_const 3657 ext/socket/socket.c     sock_define_const("IP_HDRINCL", IP_HDRINCL);
sock_define_const 3660 ext/socket/socket.c     sock_define_const("IP_TOS", IP_TOS);
sock_define_const 3663 ext/socket/socket.c     sock_define_const("IP_TTL", IP_TTL);
sock_define_const 3666 ext/socket/socket.c     sock_define_const("IP_RECVOPTS", IP_RECVOPTS);
sock_define_const 3669 ext/socket/socket.c     sock_define_const("IP_RECVRETOPTS", IP_RECVRETOPTS);
sock_define_const 3672 ext/socket/socket.c     sock_define_const("IP_RECVDSTADDR", IP_RECVDSTADDR);
sock_define_const 3675 ext/socket/socket.c     sock_define_const("IP_RETOPTS", IP_RETOPTS);
sock_define_const 3678 ext/socket/socket.c     sock_define_const("IP_MULTICAST_IF", IP_MULTICAST_IF);
sock_define_const 3681 ext/socket/socket.c     sock_define_const("IP_MULTICAST_TTL", IP_MULTICAST_TTL);
sock_define_const 3684 ext/socket/socket.c     sock_define_const("IP_MULTICAST_LOOP", IP_MULTICAST_LOOP);
sock_define_const 3687 ext/socket/socket.c     sock_define_const("IP_ADD_MEMBERSHIP", IP_ADD_MEMBERSHIP);
sock_define_const 3690 ext/socket/socket.c     sock_define_const("IP_DROP_MEMBERSHIP", IP_DROP_MEMBERSHIP);
sock_define_const 3693 ext/socket/socket.c     sock_define_const("IP_DEFAULT_MULTICAST_TTL", IP_DEFAULT_MULTICAST_TTL);
sock_define_const 3696 ext/socket/socket.c     sock_define_const("IP_DEFAULT_MULTICAST_LOOP", IP_DEFAULT_MULTICAST_LOOP);
sock_define_const 3699 ext/socket/socket.c     sock_define_const("IP_MAX_MEMBERSHIPS", IP_MAX_MEMBERSHIPS);
sock_define_const 3702 ext/socket/socket.c     sock_define_const("SO_DEBUG", SO_DEBUG);
sock_define_const 3704 ext/socket/socket.c     sock_define_const("SO_REUSEADDR", SO_REUSEADDR);
sock_define_const 3706 ext/socket/socket.c     sock_define_const("SO_REUSEPORT", SO_REUSEPORT);
sock_define_const 3709 ext/socket/socket.c     sock_define_const("SO_TYPE", SO_TYPE);
sock_define_const 3712 ext/socket/socket.c     sock_define_const("SO_ERROR", SO_ERROR);
sock_define_const 3715 ext/socket/socket.c     sock_define_const("SO_DONTROUTE", SO_DONTROUTE);
sock_define_const 3718 ext/socket/socket.c     sock_define_const("SO_BROADCAST", SO_BROADCAST);
sock_define_const 3721 ext/socket/socket.c     sock_define_const("SO_SNDBUF", SO_SNDBUF);
sock_define_const 3724 ext/socket/socket.c     sock_define_const("SO_RCVBUF", SO_RCVBUF);
sock_define_const 3727 ext/socket/socket.c     sock_define_const("SO_KEEPALIVE", SO_KEEPALIVE);
sock_define_const 3730 ext/socket/socket.c     sock_define_const("SO_OOBINLINE", SO_OOBINLINE);
sock_define_const 3733 ext/socket/socket.c     sock_define_const("SO_NO_CHECK", SO_NO_CHECK);
sock_define_const 3736 ext/socket/socket.c     sock_define_const("SO_PRIORITY", SO_PRIORITY);
sock_define_const 3739 ext/socket/socket.c     sock_define_const("SO_LINGER", SO_LINGER);
sock_define_const 3742 ext/socket/socket.c     sock_define_const("SO_PASSCRED", SO_PASSCRED);
sock_define_const 3745 ext/socket/socket.c     sock_define_const("SO_PEERCRED", SO_PEERCRED);
sock_define_const 3748 ext/socket/socket.c     sock_define_const("SO_RCVLOWAT", SO_RCVLOWAT);
sock_define_const 3751 ext/socket/socket.c     sock_define_const("SO_SNDLOWAT", SO_SNDLOWAT);
sock_define_const 3754 ext/socket/socket.c     sock_define_const("SO_RCVTIMEO", SO_RCVTIMEO);
sock_define_const 3757 ext/socket/socket.c     sock_define_const("SO_SNDTIMEO", SO_SNDTIMEO);
sock_define_const 3760 ext/socket/socket.c     sock_define_const("SO_ACCEPTCONN", SO_ACCEPTCONN);
sock_define_const 3763 ext/socket/socket.c     sock_define_const("SO_USELOOPBACK", SO_USELOOPBACK);
sock_define_const 3766 ext/socket/socket.c     sock_define_const("SO_ACCEPTFILTER", SO_ACCEPTFILTER);
sock_define_const 3769 ext/socket/socket.c     sock_define_const("SO_DONTTRUNC", SO_DONTTRUNC);
sock_define_const 3772 ext/socket/socket.c     sock_define_const("SO_WANTMORE", SO_WANTMORE);
sock_define_const 3775 ext/socket/socket.c     sock_define_const("SO_WANTOOBFLAG", SO_WANTOOBFLAG);
sock_define_const 3778 ext/socket/socket.c     sock_define_const("SO_NREAD", SO_NREAD);
sock_define_const 3781 ext/socket/socket.c     sock_define_const("SO_NKE", SO_NKE);
sock_define_const 3784 ext/socket/socket.c     sock_define_const("SO_NOSIGPIPE", SO_NOSIGPIPE);
sock_define_const 3788 ext/socket/socket.c     sock_define_const("SO_SECURITY_AUTHENTICATION", SO_SECURITY_AUTHENTICATION);
sock_define_const 3791 ext/socket/socket.c     sock_define_const("SO_SECURITY_ENCRYPTION_TRANSPORT", SO_SECURITY_ENCRYPTION_TRANSPORT);
sock_define_const 3794 ext/socket/socket.c     sock_define_const("SO_SECURITY_ENCRYPTION_NETWORK", SO_SECURITY_ENCRYPTION_NETWORK);
sock_define_const 3798 ext/socket/socket.c     sock_define_const("SO_BINDTODEVICE", SO_BINDTODEVICE);
sock_define_const 3801 ext/socket/socket.c     sock_define_const("SO_ATTACH_FILTER", SO_ATTACH_FILTER);
sock_define_const 3804 ext/socket/socket.c     sock_define_const("SO_DETACH_FILTER", SO_DETACH_FILTER);
sock_define_const 3807 ext/socket/socket.c     sock_define_const("SO_PEERNAME", SO_PEERNAME);
sock_define_const 3810 ext/socket/socket.c     sock_define_const("SO_TIMESTAMP", SO_TIMESTAMP);
sock_define_const 3814 ext/socket/socket.c     sock_define_const("SOPRI_INTERACTIVE", SOPRI_INTERACTIVE);
sock_define_const 3817 ext/socket/socket.c     sock_define_const("SOPRI_NORMAL", SOPRI_NORMAL);
sock_define_const 3820 ext/socket/socket.c     sock_define_const("SOPRI_BACKGROUND", SOPRI_BACKGROUND);
sock_define_const 3824 ext/socket/socket.c     sock_define_const("IPX_TYPE", IPX_TYPE);
sock_define_const 3828 ext/socket/socket.c     sock_define_const("TCP_NODELAY", TCP_NODELAY);
sock_define_const 3831 ext/socket/socket.c     sock_define_const("TCP_MAXSEG", TCP_MAXSEG);
sock_define_const 3835 ext/socket/socket.c     sock_define_const("EAI_ADDRFAMILY", EAI_ADDRFAMILY);
sock_define_const 3838 ext/socket/socket.c     sock_define_const("EAI_AGAIN", EAI_AGAIN);
sock_define_const 3841 ext/socket/socket.c     sock_define_const("EAI_BADFLAGS", EAI_BADFLAGS);
sock_define_const 3844 ext/socket/socket.c     sock_define_const("EAI_FAIL", EAI_FAIL);
sock_define_const 3847 ext/socket/socket.c     sock_define_const("EAI_FAMILY", EAI_FAMILY);
sock_define_const 3850 ext/socket/socket.c     sock_define_const("EAI_MEMORY", EAI_MEMORY);
sock_define_const 3853 ext/socket/socket.c     sock_define_const("EAI_NODATA", EAI_NODATA);
sock_define_const 3856 ext/socket/socket.c     sock_define_const("EAI_NONAME", EAI_NONAME);
sock_define_const 3859 ext/socket/socket.c     sock_define_const("EAI_SERVICE", EAI_SERVICE);
sock_define_const 3862 ext/socket/socket.c     sock_define_const("EAI_SOCKTYPE", EAI_SOCKTYPE);
sock_define_const 3865 ext/socket/socket.c     sock_define_const("EAI_SYSTEM", EAI_SYSTEM);
sock_define_const 3868 ext/socket/socket.c     sock_define_const("EAI_BADHINTS", EAI_BADHINTS);
sock_define_const 3871 ext/socket/socket.c     sock_define_const("EAI_PROTOCOL", EAI_PROTOCOL);
sock_define_const 3874 ext/socket/socket.c     sock_define_const("EAI_MAX", EAI_MAX);
sock_define_const 3877 ext/socket/socket.c     sock_define_const("AI_PASSIVE", AI_PASSIVE);
sock_define_const 3880 ext/socket/socket.c     sock_define_const("AI_CANONNAME", AI_CANONNAME);
sock_define_const 3883 ext/socket/socket.c     sock_define_const("AI_NUMERICHOST", AI_NUMERICHOST);
sock_define_const 3886 ext/socket/socket.c     sock_define_const("AI_MASK", AI_MASK);
sock_define_const 3889 ext/socket/socket.c     sock_define_const("AI_ALL", AI_ALL);
sock_define_const 3892 ext/socket/socket.c     sock_define_const("AI_V4MAPPED_CFG", AI_V4MAPPED_CFG);
sock_define_const 3895 ext/socket/socket.c     sock_define_const("AI_ADDRCONFIG", AI_ADDRCONFIG);
sock_define_const 3898 ext/socket/socket.c     sock_define_const("AI_V4MAPPED", AI_V4MAPPED);
sock_define_const 3901 ext/socket/socket.c     sock_define_const("AI_DEFAULT", AI_DEFAULT);
sock_define_const 3904 ext/socket/socket.c     sock_define_const("NI_MAXHOST", NI_MAXHOST);
sock_define_const 3907 ext/socket/socket.c     sock_define_const("NI_MAXSERV", NI_MAXSERV);
sock_define_const 3910 ext/socket/socket.c     sock_define_const("NI_NOFQDN", NI_NOFQDN);
sock_define_const 3913 ext/socket/socket.c     sock_define_const("NI_NUMERICHOST", NI_NUMERICHOST);
sock_define_const 3916 ext/socket/socket.c     sock_define_const("NI_NAMEREQD", NI_NAMEREQD);
sock_define_const 3919 ext/socket/socket.c     sock_define_const("NI_NUMERICSERV", NI_NUMERICSERV);
sock_define_const 3922 ext/socket/socket.c     sock_define_const("NI_DGRAM", NI_DGRAM);
sock_define_const 3925 ext/socket/socket.c     sock_define_const("SHUT_RD", SHUT_RD);
sock_define_const 3927 ext/socket/socket.c     sock_define_const("SHUT_RD", 0);
sock_define_const 3930 ext/socket/socket.c     sock_define_const("SHUT_WR", SHUT_WR);
sock_define_const 3932 ext/socket/socket.c     sock_define_const("SHUT_WR", 1);
sock_define_const 3935 ext/socket/socket.c     sock_define_const("SHUT_RDWR", SHUT_RDWR);
sock_define_const 3937 ext/socket/socket.c     sock_define_const("SHUT_RDWR", 2);


sock_listen

sock_listen      3183 ext/socket/socket.c     rb_define_method(rb_cTCPServer, "listen", sock_listen, 1);
sock_listen      3210 ext/socket/socket.c     rb_define_method(rb_cUNIXServer, "listen", sock_listen, 1);
sock_listen      3218 ext/socket/socket.c     rb_define_method(rb_cSocket, "listen", sock_listen, 1);


sock_s_pack_sockaddr_in

sock_s_pack_sockaddr_in 3232 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "sockaddr_in", sock_s_pack_sockaddr_in, 2);
sock_s_pack_sockaddr_in 3233 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 3236 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "sockaddr_un", sock_s_pack_sockaddr_un, 1);
sock_s_pack_sockaddr_un 3237 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 2068 ext/socket/socket.c     return sock_s_socketpair(klass, domain, type, protocol);
sock_s_socketpair 3224 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "socketpair", sock_s_socketpair, 3);
sock_s_socketpair 3225 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "pair", sock_s_socketpair, 3);


socket

socket            442 ext/socket/getaddrinfo.c 			s = socket(afd->a_af, SOCK_DGRAM, 0);
socket            868 ext/socket/socket.c     fd = socket(domain, type, proto);
socket            872 ext/socket/socket.c 	    fd = socket(domain, type, proto);
socket           2250 win32/win32.c  	s = socket(af, type, protocol);
socket            454 win32/win32.h  #ifdef socket


special_local_set

special_local_set 10210 parse.c        	special_local_set('~', val);
special_local_set 10233 parse.c        	special_local_set('_', val);
special_local_set 6212 parse.y        	special_local_set('~', val);
special_local_set 6235 parse.y        	special_local_set('_', val);


specific_eval

specific_eval    6601 eval.c             return specific_eval(argc, argv, klass, self);
specific_eval    6634 eval.c             return specific_eval(argc, argv, mod, mod);


splat_value

splat_value      3164 eval.c         	result = splat_value(rb_eval(self, node->nd_head));
splat_value      3331 eval.c         	    result = rb_ary_concat(args, splat_value(rb_eval(self, node->nd_body)));


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     587 ext/openssl/ossl_ssl.c 	switch(ssl_get_error(ssl, ret)){
ssl_get_error     643 ext/openssl/ossl_ssl.c 	    switch(ssl_get_error(ssl, nread)){
ssl_get_error     690 ext/openssl/ossl_ssl.c 	    switch(ssl_get_error(ssl, nwrite)){


st_add_direct

st_add_direct     232 class.c            st_add_direct(rb_class_tbl, id, klass);
st_add_direct     313 class.c            st_add_direct(rb_class_tbl, id, module);
st_add_direct     597 class.c        	st_add_direct(list, key, type);
st_add_direct     842 error.c        	st_add_direct(syserr_tbl, n, error);
st_add_direct     530 gc.c           	st_add_direct(source_filenames, (st_data_t)ptr, (st_data_t)name);
st_add_direct    1753 gc.c           	st_add_direct(finalizer_table, obj, rb_ary_new3(1, block));
st_add_direct     918 hash.c         	st_add_direct(RHASH(hash)->tbl, rb_str_new4(key), val);
st_add_direct     341 marshal.c      	st_add_direct(arg->symbols, id, arg->symbols->num_entries);
st_add_direct     503 marshal.c      	st_add_direct(arg->data, obj, arg->data->num_entries);
st_add_direct    2503 object.c           st_add_direct(rb_class_tbl, id, obj);
st_add_direct    10059 parse.c            st_add_direct(sym_tbl, (st_data_t)name, id);
st_add_direct    10060 parse.c            st_add_direct(sym_rev_tbl, id, (st_data_t)name);
st_add_direct    6061 parse.y            st_add_direct(sym_tbl, (st_data_t)name, id);
st_add_direct    6062 parse.y            st_add_direct(sym_rev_tbl, id, (st_data_t)name);
st_add_direct      52 st.h           void st_add_direct _((st_table *, st_data_t, st_data_t));
st_add_direct     360 variable.c     	st_add_direct(rb_global_tbl, id, (st_data_t)entry);
st_add_direct     808 variable.c     	st_add_direct(rb_global_tbl, name1, (st_data_t)entry1);
st_add_direct     888 variable.c     	st_add_direct(generic_iv_tbl, obj, (st_data_t)tbl);
st_add_direct     889 variable.c     	st_add_direct(tbl, id, val);
st_add_direct     995 variable.c     	    st_add_direct(generic_iv_tbl, clone, (st_data_t)st_copy(tbl));
st_add_direct    1298 variable.c     	st_add_direct(tbl, autoload, av);


st_cleanup_safe

st_cleanup_safe   194 hash.c         	    st_cleanup_safe(RHASH(hash)->tbl, Qundef);
st_cleanup_safe    54 st.h           void st_cleanup_safe _((st_table *, st_data_t));


st_copy

st_copy            74 class.c        	RCLASS(clone)->iv_tbl = st_copy(RCLASS(orig)->iv_tbl);
st_copy           127 class.c        	    clone->iv_tbl = st_copy(RCLASS(klass)->iv_tbl);
st_copy           331 hash.c         	RHASH(hash)->tbl = st_copy(RHASH(argv[0])->tbl);
st_copy           225 object.c       	    ROBJECT(dest)->iv_tbl = st_copy(ROBJECT(obj)->iv_tbl);
st_copy            55 st.h           st_table *st_copy _((st_table *));
st_copy           992 variable.c     	    st_insert(generic_iv_tbl, clone, (st_data_t)st_copy(tbl));
st_copy           995 variable.c     	    st_add_direct(generic_iv_tbl, clone, (st_data_t)st_copy(tbl));


st_data_t

st_data_t        2680 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
st_data_t        2713 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
st_data_t        2719 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
st_data_t        2754 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
st_data_t          57 class.c            st_insert(tbl, mid, (st_data_t)NEW_METHOD(body->nd_body, body->nd_noex));
st_data_t          76 class.c        	st_delete(RCLASS(clone)->iv_tbl, (st_data_t*)&id, 0);
st_data_t          78 class.c        	st_delete(RCLASS(clone)->iv_tbl, (st_data_t*)&id, 0);
st_data_t          83 class.c        	  (st_data_t)RCLASS(clone)->m_tbl);
st_data_t         131 class.c        	  (st_data_t)clone->m_tbl);
st_data_t         624 class.c        	st_foreach(RCLASS(mod)->m_tbl, method_entry, (st_data_t)list);
st_data_t         782 class.c        	st_foreach(RCLASS(klass)->m_tbl, method_entry, (st_data_t)list);
st_data_t         787 class.c        	    st_foreach(RCLASS(klass)->m_tbl, method_entry, (st_data_t)list);
st_data_t         680 dln.c          		if (st_delete(undef_tbl, (st_data_t*)&key, NULL)) {
st_data_t         693 dln.c          		if (st_delete(undef_tbl, (st_data_t*)&key, NULL)) {
st_data_t         761 dln.c          	    if (st_delete(undef_tbl, (st_data_t*)&key, NULL) != 0) {
st_data_t         398 eval.c             st_insert(RCLASS(klass)->m_tbl, mid, (st_data_t)body);
st_data_t         434 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        2094 eval.c             if (RTEST(ruby_verbose) && st_lookup(RCLASS(klass)->m_tbl, name, (st_data_t *)&node)) {
st_data_t        2100 eval.c               (st_data_t)NEW_METHOD(NEW_FBODY(body, def, origin), orig->nd_noex));
st_data_t        3870 eval.c         	    if (st_lookup(RCLASS(klass)->m_tbl, node->nd_mid, (st_data_t *)&body)) {
st_data_t        6852 eval.c             if (st_lookup(loading_tbl, (st_data_t)feature, 0)) return Qtrue;
st_data_t        6858 eval.c         	if (st_lookup(loading_tbl, (st_data_t)buf, 0)) return Qtrue;
st_data_t        6881 eval.c             st_data_t th;
st_data_t        6884 eval.c             if (!st_lookup(loading_tbl, (st_data_t)ftptr, &th)) return Qfalse;
st_data_t        6888 eval.c             } while (st_lookup(loading_tbl, (st_data_t)ftptr, &th));
st_data_t        7034 eval.c         		    st_insert(loading_tbl, (st_data_t)ftptr, (st_data_t)curr_thread);
st_data_t        7059 eval.c         	if (st_delete(loading_tbl, (st_data_t *)&ftptr, 0)) { /* loading done */
st_data_t        12239 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        1838 ext/syck/rubyext.c     st_data_t data;
st_data_t        2034 ext/syck/rubyext.c     syck_emitter_mark_node( emitter, (st_data_t)symple );
st_data_t        2041 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         241 ext/win32ole/win32ole.c         st_data_t key = p->obj;
st_data_t         317 ext/win32ole/win32ole.c     st_data_t data;
st_data_t         525 gc.c               if (!st_lookup(source_filenames, (st_data_t)f, (st_data_t *)&name)) {
st_data_t         530 gc.c           	st_add_direct(source_filenames, (st_data_t)ptr, (st_data_t)name);
st_data_t        1711 gc.c           	st_delete(finalizer_table, (st_data_t*)&obj, 0);
st_data_t        1797 gc.c               if (finalizer_table && st_delete(finalizer_table, (st_data_t*)&obj, &table)) {
st_data_t         120 hash.c             st_data_t arg;
st_data_t         125 hash.c             st_data_t key, value;
st_data_t         142 hash.c             st_data_t a;
st_data_t         149 hash.c             if (st_foreach(table, foreach_safe_i, (st_data_t)&arg)) {
st_data_t         176 hash.c          	st_delete_safe(tbl, (st_data_t*)&key, 0, Qundef);
st_data_t         205 hash.c             if (st_foreach(RHASH(arg->hash)->tbl, hash_foreach_iter, (st_data_t)arg)) {
st_data_t         392 hash.c             rb_hash_foreach(hash, rb_hash_rehash_i, (st_data_t)tbl);
st_data_t         604 hash.c             rb_hash_foreach(hash, index_i, (st_data_t)args);
st_data_t         663 hash.c         	if (st_delete_safe(RHASH(hash)->tbl, (st_data_t*)&key, &val, Qundef)) {
st_data_t         668 hash.c             else if (st_delete(RHASH(hash)->tbl, (st_data_t*)&key, &val))
st_data_t         716 hash.c             rb_hash_foreach(hash, shift_i, (st_data_t)&var);
st_data_t        1418 hash.c             rb_hash_foreach(hash, rb_hash_search_value, (st_data_t)data);
st_data_t        1470 hash.c             rb_hash_foreach(hash1, equal_i, (st_data_t)&data);
st_data_t         332 marshal.c          st_data_t num;
st_data_t         440 marshal.c      	st_foreach_safe(tbl, w_obj_each, (st_data_t)arg);
st_data_t         455 marshal.c          st_data_t num;
st_data_t         624 marshal.c      	    rb_hash_foreach(obj, hash_each, (st_data_t)&c_arg);
st_data_t        9994 parse.c            if (st_lookup(sym_tbl, (st_data_t)name, (st_data_t *)&id))
st_data_t        10059 parse.c            st_add_direct(sym_tbl, (st_data_t)name, id);
st_data_t        10060 parse.c            st_add_direct(sym_rev_tbl, id, (st_data_t)name);
st_data_t        10079 parse.c            if (st_lookup(sym_rev_tbl, id, (st_data_t *)&name))
st_data_t        5996 parse.y            if (st_lookup(sym_tbl, (st_data_t)name, (st_data_t *)&id))
st_data_t        6061 parse.y            st_add_direct(sym_tbl, (st_data_t)name, id);
st_data_t        6062 parse.y            st_add_direct(sym_rev_tbl, id, (st_data_t)name);
st_data_t        6081 parse.y            if (st_lookup(sym_rev_tbl, id, (st_data_t *)&name))
st_data_t         599 process.c      	st_delete(pid_tbl, (st_data_t*)&pid, NULL);
st_data_t          18 st.c               st_data_t key;
st_data_t          19 st.c               st_data_t record;
st_data_t         239 st.c               register st_data_t key;
st_data_t         240 st.c               st_data_t *value;
st_data_t         278 st.c               register st_data_t key;
st_data_t         279 st.c               st_data_t value;
st_data_t         300 st.c               st_data_t key;
st_data_t         301 st.c               st_data_t value;
st_data_t         380 st.c               register st_data_t *key;
st_data_t         381 st.c               st_data_t *value;
st_data_t         422 st.c               register st_data_t *key;
st_data_t         423 st.c               st_data_t *value;
st_data_t         424 st.c               st_data_t never;
st_data_t         452 st.c               st_data_t key, value, never;
st_data_t         461 st.c               st_data_t never;
st_data_t         473 st.c               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         101 variable.c     	    st_foreach_safe(RCLASS(value)->iv_tbl, fc_i, (st_data_t)&arg);
st_data_t         127 variable.c     	st_foreach_safe(RCLASS(rb_cObject)->iv_tbl, fc_i, (st_data_t)&arg);
st_data_t         130 variable.c     	st_foreach(rb_class_tbl, fc_i, (st_data_t)&arg);
st_data_t         159 variable.c     	    st_delete(RCLASS(klass)->iv_tbl, (st_data_t*)&classid, 0);
st_data_t         346 variable.c         if (!st_lookup(rb_global_tbl, id, (st_data_t *)&entry)) {
st_data_t         360 variable.c     	st_add_direct(rb_global_tbl, id, (st_data_t)entry);
st_data_t         642 variable.c         if (!st_lookup(rb_global_tbl, id, (st_data_t *)&entry)) {
st_data_t         805 variable.c         if (!st_lookup(rb_global_tbl, name1, (st_data_t *)&entry1)) {
st_data_t         808 variable.c     	st_add_direct(rb_global_tbl, name1, (st_data_t)entry1);
st_data_t         844 variable.c         if (!st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) return 0;
st_data_t         858 variable.c           if (st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) {
st_data_t         885 variable.c         if (!st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) {
st_data_t         888 variable.c     	st_add_direct(generic_iv_tbl, obj, (st_data_t)tbl);
st_data_t         904 variable.c         if (!st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) return Qfalse;
st_data_t         921 variable.c         if (!st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) return 0;
st_data_t         924 variable.c     	st_delete(generic_iv_tbl, &obj, (st_data_t *)&tbl);
st_data_t         937 variable.c         if (st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) {
st_data_t         976 variable.c         if (st_delete(generic_iv_tbl, &obj, (st_data_t *)&tbl))
st_data_t         987 variable.c         if (st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) {
st_data_t         990 variable.c     	if (st_lookup(generic_iv_tbl, clone, (st_data_t *)&old)) {
st_data_t         992 variable.c     	    st_insert(generic_iv_tbl, clone, (st_data_t)st_copy(tbl));
st_data_t         995 variable.c     	    st_add_direct(generic_iv_tbl, clone, (st_data_t)st_copy(tbl));
st_data_t        1134 variable.c     	    if (st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) {
st_data_t        1183 variable.c     	if (ROBJECT(obj)->iv_tbl && st_delete(ROBJECT(obj)->iv_tbl, (st_data_t*)&id, &val)) {
st_data_t        1304 variable.c         st_insert(tbl, id, (st_data_t)rb_node_newnode(NODE_MEMO, fn, ruby_safe_level, 0));
st_data_t        1313 variable.c         st_data_t load = 0;
st_data_t        1315 variable.c         st_delete(RCLASS(mod)->iv_tbl, (st_data_t*)&id, 0);
st_data_t        1319 variable.c     	st_delete(tbl, (st_data_t*)&id, &load);
st_data_t        1325 variable.c     	    if (st_delete(RCLASS(mod)->iv_tbl, (st_data_t*)&id, &val)) {
st_data_t        1355 variable.c         st_data_t load;
st_data_t        1371 variable.c         st_delete(tbl, (st_data_t*)&id, 0);
st_data_t        1376 variable.c     	if (st_delete(RCLASS(mod)->iv_tbl, (st_data_t*)&id, &val)) {
st_data_t        1479 variable.c         if (RCLASS(mod)->iv_tbl && st_delete(ROBJECT(mod)->iv_tbl, (st_data_t*)&id, &val)) {
st_data_t        1519 variable.c     	st_foreach_safe(RCLASS(mod)->iv_tbl, sv_i, (st_data_t)tbl);
st_data_t        1925 variable.c         if (RCLASS(mod)->iv_tbl && st_delete(ROBJECT(mod)->iv_tbl, (st_data_t*)&id, &val)) {


st_delete

st_delete        2680 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
st_delete        2713 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
st_delete        2719 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
st_delete        2754 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
st_delete          76 class.c        	st_delete(RCLASS(clone)->iv_tbl, (st_data_t*)&id, 0);
st_delete          78 class.c        	st_delete(RCLASS(clone)->iv_tbl, (st_data_t*)&id, 0);
st_delete         680 dln.c          		if (st_delete(undef_tbl, (st_data_t*)&key, NULL)) {
st_delete         693 dln.c          		if (st_delete(undef_tbl, (st_data_t*)&key, NULL)) {
st_delete         761 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        7059 eval.c         	if (st_delete(loading_tbl, (st_data_t *)&ftptr, 0)) { /* loading done */
st_delete        12239 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         242 ext/win32ole/win32ole.c         st_delete(DATA_PTR(com_hash), &key, 0);
st_delete        1711 gc.c           	st_delete(finalizer_table, (st_data_t*)&obj, 0);
st_delete        1797 gc.c               if (finalizer_table && st_delete(finalizer_table, (st_data_t*)&obj, &table)) {
st_delete         668 hash.c             else if (st_delete(RHASH(hash)->tbl, (st_data_t*)&key, &val))
st_delete         599 process.c      	st_delete(pid_tbl, (st_data_t*)&pid, NULL);
st_delete          47 st.h           int st_delete _((st_table *, st_data_t *, st_data_t *));
st_delete         137 variable.c     	st_delete(RCLASS(klass)->iv_tbl, &tmp_classpath, 0);
st_delete         159 variable.c     	    st_delete(RCLASS(klass)->iv_tbl, (st_data_t*)&classid, 0);
st_delete         922 variable.c         status = st_delete(tbl, &id, valp);
st_delete         924 variable.c     	st_delete(generic_iv_tbl, &obj, (st_data_t *)&tbl);
st_delete         976 variable.c         if (st_delete(generic_iv_tbl, &obj, (st_data_t *)&tbl))
st_delete        1183 variable.c     	if (ROBJECT(obj)->iv_tbl && st_delete(ROBJECT(obj)->iv_tbl, (st_data_t*)&id, &val)) {
st_delete        1315 variable.c         st_delete(RCLASS(mod)->iv_tbl, (st_data_t*)&id, 0);
st_delete        1319 variable.c     	st_delete(tbl, (st_data_t*)&id, &load);
st_delete        1325 variable.c     	    if (st_delete(RCLASS(mod)->iv_tbl, (st_data_t*)&id, &val)) {
st_delete        1371 variable.c         st_delete(tbl, (st_data_t*)&id, 0);
st_delete        1376 variable.c     	if (st_delete(RCLASS(mod)->iv_tbl, (st_data_t*)&id, &val)) {
st_delete        1479 variable.c         if (RCLASS(mod)->iv_tbl && st_delete(ROBJECT(mod)->iv_tbl, (st_data_t*)&id, &val)) {
st_delete        1925 variable.c         if (RCLASS(mod)->iv_tbl && st_delete(ROBJECT(mod)->iv_tbl, (st_data_t*)&id, &val)) {


st_delete_safe

st_delete_safe    176 hash.c          	st_delete_safe(tbl, (st_data_t*)&key, 0, Qundef);
st_delete_safe    663 hash.c         	if (st_delete_safe(RHASH(hash)->tbl, (st_data_t*)&key, &val, Qundef)) {
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         82 class.c        	st_foreach(RCLASS(orig)->m_tbl, clone_method,
st_foreach        130 class.c        	st_foreach(RCLASS(klass)->m_tbl, clone_method,
st_foreach        624 class.c        	st_foreach(RCLASS(mod)->m_tbl, method_entry, (st_data_t)list);
st_foreach        630 class.c            st_foreach(list, func, ary);
st_foreach        782 class.c        	st_foreach(RCLASS(klass)->m_tbl, method_entry, (st_data_t)list);
st_foreach        787 class.c        	    st_foreach(RCLASS(klass)->m_tbl, method_entry, (st_data_t)list);
st_foreach        792 class.c            st_foreach(list, ins_methods_i, ary);
st_foreach        482 dln.c              st_foreach(undef_tbl, undef_print, NULL);
st_foreach        617 dln.c              st_foreach(reloc_tbl, reloc_undef, &arg);
st_foreach        690 dln.c          		st_foreach(reloc_tbl, reloc_repl, &data);
st_foreach       1013 dln.c          	    st_foreach(undef_tbl, search_undef, lib_tbl);
st_foreach       12321 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        658 gc.c               st_foreach(tbl, mark_entry, lev);
st_foreach        685 gc.c               st_foreach(tbl, mark_keyvalue, lev);
st_foreach       1057 gc.c                   st_foreach(source_filenames, sweep_source_filename, 0);
st_foreach        149 hash.c             if (st_foreach(table, foreach_safe_i, (st_data_t)&arg)) {
st_foreach        205 hash.c             if (st_foreach(RHASH(arg->hash)->tbl, hash_foreach_iter, (st_data_t)arg)) {
st_foreach       10134 parse.c            st_foreach(sym_tbl, symbols_i, ary);
st_foreach       6136 parse.y            st_foreach(sym_tbl, symbols_i, ary);
st_foreach        808 process.c      	st_foreach(pid_tbl, waitall_each, result);
st_foreach        465 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        130 variable.c     	st_foreach(rb_class_tbl, fc_i, (st_data_t)&arg);
st_foreach        473 variable.c     	st_foreach(rb_global_tbl, mark_global_entry, 0);
st_foreach        784 variable.c         st_foreach(rb_global_tbl, gvar_i, ary);
st_foreach        957 variable.c     	st_foreach(tbl, givar_mark_i, 0);
st_foreach       1557 variable.c         st_foreach(tbl, list_i, ary);


st_foreach_safe

st_foreach_safe   253 intern.h       void st_foreach_safe _((struct st_table *, int (*)(ANYARGS), unsigned long));
st_foreach_safe   440 marshal.c      	st_foreach_safe(tbl, w_obj_each, (st_data_t)arg);
st_foreach_safe   410 object.c           st_foreach_safe(ROBJECT(obj)->iv_tbl, inspect_i, str);
st_foreach_safe   101 variable.c     	    st_foreach_safe(RCLASS(value)->iv_tbl, fc_i, (st_data_t)&arg);
st_foreach_safe   127 variable.c     	st_foreach_safe(RCLASS(rb_cObject)->iv_tbl, fc_i, (st_data_t)&arg);
st_foreach_safe   967 variable.c         st_foreach_safe(generic_iv_tbl, givar_i, 0);
st_foreach_safe  1126 variable.c     	    st_foreach_safe(ROBJECT(obj)->iv_tbl, ivar_i, ary);
st_foreach_safe  1135 variable.c     		st_foreach_safe(tbl, ivar_i, ary);
st_foreach_safe  1519 variable.c     	st_foreach_safe(RCLASS(mod)->iv_tbl, sv_i, (st_data_t)tbl);
st_foreach_safe  1883 variable.c     	    st_foreach_safe(RCLASS(obj)->iv_tbl, cv_i, ary);


st_free_table

st_free_table     631 class.c            st_free_table(list);
st_free_table     793 class.c            st_free_table(list);
st_free_table    1016 dln.c          		st_free_table(lib_tbl);
st_free_table    1023 dln.c          	st_free_table(lib_tbl);
st_free_table    9997 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    6094 ext/win32ole/win32ole.c     com_hash = Data_Wrap_Struct(rb_cData, rb_mark_hash, st_free_table, st_init_numtable());
st_free_table    1156 gc.c           	    st_free_table(RANY(obj)->as.object.iv_tbl);
st_free_table    1162 gc.c           	st_free_table(RANY(obj)->as.klass.m_tbl);
st_free_table    1164 gc.c           	    st_free_table(RANY(obj)->as.object.iv_tbl);
st_free_table    1179 gc.c           	    st_free_table(RANY(obj)->as.hash.tbl);
st_free_table     393 hash.c             st_free_table(RHASH(hash)->tbl);
st_free_table     693 marshal.c          st_free_table(arg->symbols);
st_free_table     694 marshal.c          st_free_table(arg->data);
st_free_table    1370 marshal.c          st_free_table(arg->symbols);
st_free_table     221 object.c       	    st_free_table(ROBJECT(dest)->iv_tbl);
st_free_table      53 st.h           void st_free_table _((st_table *));
st_free_table     925 variable.c     	st_free_table(tbl);
st_free_table     977 variable.c     	st_free_table(tbl);
st_free_table     991 variable.c     	    st_free_table(old);
st_free_table    1266 variable.c     	RDATA(av)->dfree != (RUBY_DATA_FUNC)st_free_table) {
st_free_table    1297 variable.c     	av = Data_Wrap_Struct(0 , rb_mark_tbl, st_free_table, 0);
st_free_table    1323 variable.c     	    st_free_table(tbl);
st_free_table    1374 variable.c     	st_free_table(tbl);
st_free_table    1558 variable.c         st_free_table(tbl);


st_init_numtable

st_init_numtable   31 class.c            klass->m_tbl = st_init_numtable();
st_init_numtable   81 class.c        	RCLASS(clone)->m_tbl = st_init_numtable();
st_init_numtable  129 class.c        	clone->m_tbl = st_init_numtable();
st_init_numtable  144 class.c        	    RCLASS(klass)->iv_tbl = st_init_numtable();
st_init_numtable  281 class.c            mdl->m_tbl = st_init_numtable();
st_init_numtable  353 class.c        	RCLASS(module)->iv_tbl = st_init_numtable();
st_init_numtable  622 class.c            list = st_init_numtable();
st_init_numtable  780 class.c            list = st_init_numtable();
st_init_numtable  534 dln.c          	reloc_tbl = st_init_numtable();
st_init_numtable 1034 error.c            syserr_tbl = st_init_numtable();
st_init_numtable 12236 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 6094 ext/win32ole/win32ole.c     com_hash = Data_Wrap_Struct(rb_cData, rb_mark_hash, st_free_table, st_init_numtable());
st_init_numtable 1747 gc.c           	finalizer_table = st_init_numtable();
st_init_numtable  766 marshal.c          arg.symbols = st_init_numtable();
st_init_numtable  767 marshal.c          arg.data    = st_init_numtable();
st_init_numtable 1425 marshal.c          arg.symbols = st_init_numtable();
st_init_numtable  622 process.c      	    pid_tbl = 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  134 variable.c     	    ROBJECT(klass)->iv_tbl = st_init_numtable();
st_init_numtable  882 variable.c     	generic_iv_tbl = st_init_numtable();
st_init_numtable  887 variable.c     	tbl = st_init_numtable();
st_init_numtable 1055 variable.c     	if (!ROBJECT(obj)->iv_tbl) ROBJECT(obj)->iv_tbl = st_init_numtable();
st_init_numtable 1299 variable.c     	DATA_PTR(av) = tbl = st_init_numtable();
st_init_numtable 1516 variable.c     	tbl = st_init_numtable();
st_init_numtable 1651 variable.c     	RCLASS(klass)->iv_tbl = st_init_numtable();


st_init_numtable_with_size

st_init_numtable_with_size 9878 parse.c            sym_rev_tbl = st_init_numtable_with_size(200);
st_init_numtable_with_size 5880 parse.y            sym_rev_tbl = st_init_numtable_with_size(200);
st_init_numtable_with_size   44 st.h           st_table *st_init_numtable_with_size _((int));


st_init_strtable

st_init_strtable  344 dln.c              tbl = st_init_strtable();
st_init_strtable  422 dln.c              undef_tbl = st_init_strtable();
st_init_strtable  997 dln.c          	lib_tbl = st_init_strtable();
st_init_strtable 7030 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 1941 gc.c               source_filenames = 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 9877 parse.c            sym_tbl = st_init_strtable_with_size(200);
st_init_strtable_with_size 5879 parse.y            sym_tbl = st_init_strtable_with_size(200);
st_init_strtable_with_size   46 st.h           st_table *st_init_strtable_with_size _((int));


st_init_table

st_init_table     235 hash.c             hash->tbl = st_init_table(&objhash);
st_init_table     173 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  391 hash.c             tbl = st_init_table_with_size(&objhash, RHASH(hash)->tbl->num_entries);
st_init_table_with_size  167 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  193 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          57 class.c            st_insert(tbl, mid, (st_data_t)NEW_METHOD(body->nd_body, body->nd_noex));
st_insert         146 class.c        	st_insert(RCLASS(klass)->iv_tbl, rb_intern("__attached__"), obj);
st_insert         351 dln.c          	st_insert(tbl, sym->n_un.n_name, sym);
st_insert         536 dln.c              st_insert(reloc_tbl, u_no++, obj);
st_insert         692 dln.c          		st_insert(undef_tbl, strdup(sym[1].n_un.n_name), NULL);
st_insert         731 dln.c          		    st_insert(undef_tbl, strdup(sym->n_un.n_name), NULL);
st_insert         769 dln.c          	    st_insert(sym_tbl, new_sym->n_un.n_name, new_sym);
st_insert        1007 dln.c          	    st_insert(lib_tbl, name, base->lib_offset + sizeof(ahdr));
st_insert         398 eval.c             st_insert(RCLASS(klass)->m_tbl, mid, (st_data_t)body);
st_insert        2099 eval.c             st_insert(RCLASS(klass)->m_tbl, name,
st_insert        7034 eval.c         		    st_insert(loading_tbl, (st_data_t)ftptr, (st_data_t)curr_thread);
st_insert        12242 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         328 ext/win32ole/win32ole.c         st_insert(tbl, val, (VALUE)pdisp | FIXNUM_FLAG);
st_insert        1767 gc.c           	st_insert(finalizer_table, dest, table);
st_insert         360 hash.c             if (key != Qundef) st_insert(tbl, key, value);
st_insert         915 hash.c         	st_insert(RHASH(hash)->tbl, key, val);
st_insert         917 marshal.c          st_insert(arg->symbols, arg->symbols->num_entries, id);
st_insert         623 process.c      	st_insert(pid_tbl, pid, st);
st_insert          49 st.h           int st_insert _((st_table *, st_data_t, st_data_t));
st_insert         136 variable.c     	st_insert(ROBJECT(klass)->iv_tbl, classpath, arg.path);
st_insert         158 variable.c     	    st_insert(ROBJECT(klass)->iv_tbl, classpath, path);
st_insert         892 variable.c         st_insert(tbl, id, val);
st_insert         992 variable.c     	    st_insert(generic_iv_tbl, clone, (st_data_t)st_copy(tbl));
st_insert        1056 variable.c     	st_insert(ROBJECT(obj)->iv_tbl, id, val);
st_insert        1304 variable.c         st_insert(tbl, id, (st_data_t)rb_node_newnode(NODE_MEMO, fn, ruby_safe_level, 0));
st_insert        1503 variable.c     	    st_insert(tbl, key, key);
st_insert        1664 variable.c         st_insert(RCLASS(klass)->iv_tbl, id, val);
st_insert        1748 variable.c     	    st_insert(RCLASS(tmp)->iv_tbl,id,val);


st_lookup

st_lookup        2649 array.c        	if (st_lookup(RHASH(hash)->tbl, RARRAY(ary1)->ptr[i], 0)) continue;
st_lookup         594 class.c            if (!st_lookup(list, key, 0)) {
st_lookup         679 dln.c          	    if (st_lookup(sym_tbl, sym[1].n_un.n_name, &old_sym)) {
st_lookup         702 dln.c          	    if (st_lookup(sym_tbl, sym->n_un.n_name, &old_sym) == 0) {
st_lookup         754 dln.c          	    if (st_lookup(sym_tbl, sym->n_un.n_name, &new_sym) != 0
st_lookup         931 dln.c              if (st_lookup(lib_tbl, key, &offset) == 0) return ST_CONTINUE;
st_lookup        1053 dln.c          			&& st_lookup(undef_tbl, sym->n_un.n_name, NULL)) {
st_lookup        1113 dln.c              if (st_lookup(sym_tbl, name, &sym))
st_lookup         839 error.c            if (!st_lookup(syserr_tbl, n, &error)) {
st_lookup         856 error.c            if (!st_lookup(syserr_tbl, n, &error)) {
st_lookup         894 error.c        	if (!NIL_P(error) && st_lookup(syserr_tbl, NUM2LONG(error), &klass)) {
st_lookup         434 eval.c             while (!st_lookup(RCLASS(klass)->m_tbl, id, (st_data_t *)&body)) {
st_lookup        1814 eval.c         	if (klass->iv_tbl && st_lookup(klass->iv_tbl, id, &result)) {
st_lookup        1838 eval.c         	while (RCLASS(klass)->iv_tbl && st_lookup(RCLASS(klass)->iv_tbl, id, &result)) {
st_lookup        2094 eval.c             if (RTEST(ruby_verbose) && st_lookup(RCLASS(klass)->m_tbl, name, (st_data_t *)&node)) {
st_lookup        3870 eval.c         	    if (st_lookup(RCLASS(klass)->m_tbl, node->nd_mid, (st_data_t *)&body)) {
st_lookup        6852 eval.c             if (st_lookup(loading_tbl, (st_data_t)feature, 0)) return Qtrue;
st_lookup        6858 eval.c         	if (st_lookup(loading_tbl, (st_data_t)buf, 0)) return Qtrue;
st_lookup        6884 eval.c             if (!st_lookup(loading_tbl, (st_data_t)ftptr, &th)) return Qfalse;
st_lookup        6888 eval.c             } while (st_lookup(loading_tbl, (st_data_t)ftptr, &th));
st_lookup        12187 eval.c             if (st_lookup(th->locals, id, &val)) {
st_lookup        12284 eval.c             if (st_lookup(th->locals, rb_to_id(id), 0))
st_lookup         141 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         319 ext/win32ole/win32ole.c     if (st_lookup(tbl, val, &data)) {
st_lookup         525 gc.c               if (!st_lookup(source_filenames, (st_data_t)f, (st_data_t *)&name)) {
st_lookup        1749 gc.c               if (st_lookup(finalizer_table, obj, &table)) {
st_lookup        1766 gc.c               if (st_lookup(finalizer_table, obj, &table)) {
st_lookup         419 hash.c             if (!st_lookup(RHASH(hash)->tbl, key, &val)) {
st_lookup         470 hash.c             if (!st_lookup(RHASH(hash)->tbl, key, &val)) {
st_lookup         914 hash.c             if (TYPE(key) != T_STRING || st_lookup(RHASH(hash)->tbl, key, 0)) {
st_lookup        1378 hash.c             if (st_lookup(RHASH(hash)->tbl, key, 0)) {
st_lookup        1435 hash.c             if (!st_lookup(data->tbl, key, &val2)) {
st_lookup         334 marshal.c          if (st_lookup(arg->symbols, id, &num)) {
st_lookup         465 marshal.c          if (st_lookup(arg->data, obj, &num)) {
st_lookup         904 marshal.c          if (st_lookup(arg->symbols, num, &id)) {
st_lookup        9994 parse.c            if (st_lookup(sym_tbl, (st_data_t)name, (st_data_t *)&id))
st_lookup        10079 parse.c            if (st_lookup(sym_rev_tbl, id, (st_data_t *)&name))
st_lookup        5996 parse.y            if (st_lookup(sym_tbl, (st_data_t)name, (st_data_t *)&id))
st_lookup        6081 parse.y            if (st_lookup(sym_rev_tbl, id, (st_data_t *)&name))
st_lookup         597 process.c          if (pid_tbl && st_lookup(pid_tbl, pid, st)) {
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          54 variable.c     	    st_lookup(ROBJECT(fc->track)->iv_tbl, classpath, &tmp)) {
st_lookup         151 variable.c     	if (!st_lookup(ROBJECT(klass)->iv_tbl, classpath, &path)) {
st_lookup         154 variable.c     	    if (!st_lookup(ROBJECT(klass)->iv_tbl, classid, &path)) {
st_lookup         193 variable.c         if (RCLASS(klass)->iv_tbl && st_lookup(RCLASS(klass)->iv_tbl,
st_lookup         346 variable.c         if (!st_lookup(rb_global_tbl, id, (st_data_t *)&entry)) {
st_lookup         642 variable.c         if (!st_lookup(rb_global_tbl, id, (st_data_t *)&entry)) {
st_lookup         805 variable.c         if (!st_lookup(rb_global_tbl, name1, (st_data_t *)&entry1)) {
st_lookup         844 variable.c         if (!st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) return 0;
st_lookup         858 variable.c           if (st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) {
st_lookup         859 variable.c     	if (st_lookup(tbl, id, &val)) {
st_lookup         885 variable.c         if (!st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) {
st_lookup         904 variable.c         if (!st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) return Qfalse;
st_lookup         905 variable.c         if (st_lookup(tbl, id, &val)) {
st_lookup         921 variable.c         if (!st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) return 0;
st_lookup         937 variable.c         if (st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) {
st_lookup         987 variable.c         if (st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) {
st_lookup         990 variable.c     	if (st_lookup(generic_iv_tbl, clone, (st_data_t *)&old)) {
st_lookup        1012 variable.c     	if (ROBJECT(obj)->iv_tbl && st_lookup(ROBJECT(obj)->iv_tbl, id, &val))
st_lookup        1074 variable.c     	if (ROBJECT(obj)->iv_tbl && st_lookup(ROBJECT(obj)->iv_tbl, id, 0))
st_lookup        1134 variable.c     	    if (st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) {
st_lookup        1288 variable.c         if ((tbl = RCLASS(mod)->iv_tbl) && st_lookup(tbl, id, &av) && av != Qundef)
st_lookup        1293 variable.c         if (st_lookup(tbl, autoload, &av)) {
st_lookup        1316 variable.c         if (st_lookup(RCLASS(mod)->iv_tbl, autoload, &val)) {
st_lookup        1357 variable.c         if (!st_lookup(RCLASS(mod)->iv_tbl, autoload, &val) ||
st_lookup        1358 variable.c     	!(tbl = check_autoload_table(val)) || !st_lookup(tbl, id, &load)) {
st_lookup        1391 variable.c         if (!tbl || !st_lookup(tbl, id, &val) || val != Qundef) {
st_lookup        1409 variable.c     	while (RCLASS(tmp)->iv_tbl && st_lookup(RCLASS(tmp)->iv_tbl,id,&value)) {
st_lookup        1502 variable.c     	if (!st_lookup(tbl, key, 0)) {
st_lookup        1591 variable.c     	if (RCLASS(tmp)->iv_tbl && st_lookup(RCLASS(tmp)->iv_tbl, id, &value)) {
st_lookup        1656 variable.c     	if (st_lookup(RCLASS(klass)->iv_tbl, id, &value)) {
st_lookup        1720 variable.c     	    if (st_lookup(RCLASS(a)->iv_tbl,id,0)) {
st_lookup        1741 variable.c     	if (RCLASS(tmp)->iv_tbl && st_lookup(RCLASS(tmp)->iv_tbl,id,0)) {
st_lookup        1771 variable.c     	    if (st_lookup(RCLASS(tmp)->iv_tbl,id,&value)) {
st_lookup        1795 variable.c     	if (RCLASS(tmp)->iv_tbl && st_lookup(RCLASS(tmp)->iv_tbl,id,0)) {


st_table

st_table           19 class.c        extern st_table *rb_class_tbl;
st_table          611 class.c            st_table *list;
st_table          773 class.c            st_table *list;
st_table          187 dln.c          static st_table *sym_tbl;
st_table          188 dln.c          static st_table *undef_tbl;
st_table          335 dln.c          static st_table *
st_table          340 dln.c              st_table *tbl;
st_table          507 dln.c          static st_table *reloc_tbl = NULL;
st_table          951 dln.c              st_table *lib_tbl = NULL;
st_table          830 error.c        static st_table *syserr_tbl;
st_table         6789 eval.c         static st_table *loading_tbl;
st_table         9110 eval.c         	    st_table *m_tbl = RCLASS(data->rklass)->m_tbl;
st_table         9710 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          182 gc.c           static st_table *finalizer_table = 0;
st_table          410 gc.c           extern st_table *rb_class_tbl;
st_table          517 gc.c           static st_table *source_filenames;
st_table          118 hash.c             st_table *tbl;
st_table          166 hash.c             st_table *tbl;
st_table          388 hash.c             st_table *tbl;
st_table         1424 hash.c             st_table *tbl;
st_table           90 marshal.c          st_table *symbols;
st_table           91 marshal.c          st_table *data;
st_table          454 marshal.c          st_table *ivtbl = 0;
st_table          784 marshal.c          st_table *symbols;
st_table         2498 object.c           extern st_table *rb_class_tbl;
st_table         9871 parse.c        static st_table *sym_tbl;
st_table         9872 parse.c        static st_table *sym_rev_tbl;
st_table         5873 parse.y        static st_table *sym_tbl;
st_table         5874 parse.y        static st_table *sym_rev_tbl;
st_table          559 process.c      static st_table *pid_tbl;
st_table          138 st.c           st_table*
st_table          143 st.c               st_table *tbl;
st_table          154 st.c               tbl = alloc(st_table);
st_table          163 st.c           st_table*
st_table          170 st.c           st_table*
st_table          176 st.c           st_table*
st_table          183 st.c           st_table*
st_table          189 st.c           st_table*
st_table          336 st.c           st_table*
st_table          340 st.c               st_table *new_table;
st_table          344 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          834 variable.c     static st_table *generic_iv_tbl;
st_table          836 variable.c     st_table*
st_table          840 variable.c         st_table *tbl;
st_table          854 variable.c         st_table *tbl;
st_table          876 variable.c         st_table *tbl;
st_table          900 variable.c         st_table *tbl;
st_table          917 variable.c         st_table *tbl;
st_table          934 variable.c         st_table *tbl;
st_table          974 variable.c         st_table *tbl;
st_table          984 variable.c         st_table *tbl;
st_table          988 variable.c     	st_table *old;
st_table         1132 variable.c     	    st_table *tbl;
st_table         1514 variable.c         st_table *tbl = data;
st_table         1552 variable.c         st_table *tbl = data;


st_table_entry

st_table_entry     20 st.c               st_table_entry *next;
st_table_entry    158 st.c               tbl->bins = (st_table_entry **)Calloc(size, sizeof(st_table_entry*));
st_table_entry    200 st.c               register st_table_entry *ptr, *next;
st_table_entry    243 st.c               register st_table_entry *ptr;
st_table_entry    259 st.c               st_table_entry *entry;\
st_table_entry    265 st.c               entry = alloc(st_table_entry);\
st_table_entry    282 st.c               register st_table_entry *ptr;
st_table_entry    314 st.c               register st_table_entry *ptr, *next, **new_bins;
st_table_entry    319 st.c               new_bins = (st_table_entry**)Calloc(new_num_bins, sizeof(st_table_entry*));
st_table_entry    341 st.c               st_table_entry *ptr, *entry;
st_table_entry    350 st.c               new_table->bins = (st_table_entry**)
st_table_entry    351 st.c           	Calloc((unsigned)num_bins, sizeof(st_table_entry*));
st_table_entry    362 st.c           	    entry = alloc(st_table_entry);
st_table_entry    384 st.c               st_table_entry *tmp;
st_table_entry    385 st.c               register st_table_entry *ptr;
st_table_entry    427 st.c               register st_table_entry *ptr;
st_table_entry    475 st.c               st_table_entry *ptr, *last, *tmp;


stack_check

stack_check      5468 eval.c             stack_check();
stack_check      5654 eval.c         	stack_check();


stack_type

stack_type        205 parse.c        static stack_type cond_stack = 0;
stack_type        211 parse.c        static stack_type cmdarg_stack = 0;
stack_type        108 parse.y        static stack_type cond_stack = 0;
stack_type        114 parse.y        static stack_type cmdarg_stack = 0;


stat

stat               67 dir.c          #define lstat stat
stat              972 dir.c          	    if (stat(dir, &st) < 0) {
stat             1054 dir.c          			if (stat(link->path, &st) == 0) {
stat             1811 dln.c          	if (stat(fbuf, &st) == 0) {
stat             1821 dln.c          	    if (stat(mac_fullpath, &st) == 0) {
stat             1855 dln.c          		if (stat(fbuf, &st) == 0)
stat              278 ext/nkf/nkf-utf8/nkf.c     int stat;
stat              849 ext/nkf/nkf-utf8/nkf.c                   if (stat(origfname, &sb)) {
stat             1461 ext/nkf/nkf-utf8/nkf.c     ptr->stat = -1;
stat             1477 ext/nkf/nkf-utf8/nkf.c     ptr->stat = 0;
stat             1508 ext/nkf/nkf-utf8/nkf.c     switch(ptr->stat){
stat             1525 ext/nkf/nkf-utf8/nkf.c               ptr->stat = 1;
stat             1530 ext/nkf/nkf-utf8/nkf.c               ptr->stat = 2;
stat             1535 ext/nkf/nkf-utf8/nkf.c               ptr->stat = 1;
stat             1574 ext/nkf/nkf-utf8/nkf.c     switch (ptr->stat){
stat             1586 ext/nkf/nkf-utf8/nkf.c               ptr->stat = 1;
stat             1590 ext/nkf/nkf-utf8/nkf.c               ptr->stat = 2;
stat             1609 ext/nkf/nkf-utf8/nkf.c               ptr->stat = 1;
stat             1623 ext/nkf/nkf-utf8/nkf.c     switch (ptr->stat){
stat             1629 ext/nkf/nkf-utf8/nkf.c                   ptr->stat = c;
stat             1637 ext/nkf/nkf-utf8/nkf.c               ptr->stat = 1;
stat             1656 ext/nkf/nkf-utf8/nkf.c           if (ptr->stat != c && (c == 0xfe || c == 0xff)){
stat             1671 ext/nkf/nkf-utf8/nkf.c     switch (ptr->stat){
stat             1683 ext/nkf/nkf-utf8/nkf.c               ptr->stat = 1;
stat             1686 ext/nkf/nkf-utf8/nkf.c               ptr->stat = 2;
stat             1696 ext/nkf/nkf-utf8/nkf.c               if (ptr->index > ptr->stat){
stat             1723 ext/nkf/nkf-utf8/nkf.c         if (p->stat > 0){
stat             1725 ext/nkf/nkf-utf8/nkf.c         }else if(p->stat == 0){
stat               68 file.c         #define lstat stat
stat               80 file.c         	if (stat(path, &st) < 0) return -1;
stat              662 file.c             return stat(StringValueCStr(file), st);
stat              861 file.c             if (stat(path, &st) < 0) return -1;
stat             1336 file.c             if (stat(StringValueCStr(fname), &st) < 0) return Qfalse;
stat             3464 file.c             if (stat(StringValueCStr(fname), &st) == -1) {
stat             4071 file.c         	if (stat(p0, &st) == 0 && S_ISDIR(st.st_mode) && (st.st_mode & S_IWOTH)
stat             2952 win32/win32.c      ret = IsWinNT() ? winnt_stat(buf1, st) : stat(buf1, st);
stat             3454 win32/win32.c      struct stat stat;
stat             3457 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          720 file.c             return stat_new(&st);
stat_new          749 file.c             return stat_new(&st);
stat_new          777 file.c             return stat_new(&st);
stat_new          812 file.c             return stat_new(&st);


stat_new_0

stat_new_0        167 file.c             return stat_new_0(rb_cStat, st);
stat_new_0       3444 file.c             return stat_new_0(klass, 0);


status_check

status_check     1510 ext/nkf/nkf-utf8/nkf.c           status_check(ptr, c);
status_check     1576 ext/nkf/nkf-utf8/nkf.c           status_check(ptr, c);
status_check     1673 ext/nkf/nkf-utf8/nkf.c           status_check(ptr, c);


status_clear

status_clear     1484 ext/nkf/nkf-utf8/nkf.c     status_clear(ptr);
status_clear     1523 ext/nkf/nkf-utf8/nkf.c               status_clear(ptr);
status_clear     1547 ext/nkf/nkf-utf8/nkf.c               status_clear(ptr);
status_clear     1558 ext/nkf/nkf-utf8/nkf.c                   status_clear(ptr);
status_clear     1601 ext/nkf/nkf-utf8/nkf.c               status_clear(ptr);
status_clear     1650 ext/nkf/nkf-utf8/nkf.c               status_clear(ptr);
status_clear     1658 ext/nkf/nkf-utf8/nkf.c               status_clear(ptr);
status_clear     1704 ext/nkf/nkf-utf8/nkf.c                   status_clear(ptr);


status_disable

status_disable   1539 ext/nkf/nkf-utf8/nkf.c               status_disable(ptr);
status_disable   1549 ext/nkf/nkf-utf8/nkf.c               status_disable(ptr);
status_disable   1564 ext/nkf/nkf-utf8/nkf.c           status_disable(ptr);
status_disable   1594 ext/nkf/nkf-utf8/nkf.c               status_disable(ptr);
status_disable   1603 ext/nkf/nkf-utf8/nkf.c               status_disable(ptr);
status_disable   1612 ext/nkf/nkf-utf8/nkf.c               status_disable(ptr);
status_disable   1633 ext/nkf/nkf-utf8/nkf.c                   status_disable(ptr);
status_disable   1640 ext/nkf/nkf-utf8/nkf.c               status_disable(ptr);
status_disable   1646 ext/nkf/nkf-utf8/nkf.c               status_disable(ptr);
status_disable   1660 ext/nkf/nkf-utf8/nkf.c               status_disable(ptr);
status_disable   1689 ext/nkf/nkf-utf8/nkf.c               status_disable(ptr);
status_disable   1707 ext/nkf/nkf-utf8/nkf.c               status_disable(ptr);


status_push_ch

status_push_ch   1520 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, SSO);
status_push_ch   1521 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1526 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1531 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1536 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1544 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1555 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1587 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1591 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1599 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1610 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1630 ext/nkf/nkf-utf8/nkf.c                   status_push_ch(ptr, c);
status_push_ch   1638 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1649 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1657 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1684 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1687 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1695 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);


status_reinit

status_reinit    1883 ext/nkf/nkf-utf8/nkf.c             status_reinit(p++);
status_reinit    4581 ext/nkf/nkf-utf8/nkf.c             status_reinit(p++);


status_reset

status_reset     1491 ext/nkf/nkf-utf8/nkf.c     status_reset(ptr);
status_reset     1500 ext/nkf/nkf-utf8/nkf.c         status_reset(ptr);
status_reset     1741 ext/nkf/nkf-utf8/nkf.c                 status_reset(ptr);


std_getc

std_getc          327 ext/nkf/nkf-utf8/nkf.c STATIC  int     std_getc PROTO((FILE *f));
std_getc          407 ext/nkf/nkf-utf8/nkf.c static int (*i_cgetc)PROTO((FILE *)) = std_getc; /* input of cgetc */
std_getc          413 ext/nkf/nkf-utf8/nkf.c static int (*i_ugetc)PROTO((FILE *)) = std_getc; /* input of ugetc */
std_getc          419 ext/nkf/nkf-utf8/nkf.c static int (*i_ngetc)PROTO((FILE *)) = std_getc; /* input of ugetc */
std_getc          536 ext/nkf/nkf-utf8/nkf.c static  int    (*i_getc)PROTO((FILE *f)) = std_getc; /* general input */
std_getc          539 ext/nkf/nkf-utf8/nkf.c static  int    (*i_bgetc)PROTO((FILE *)) = std_getc; /* input of mgetc */
std_getc          544 ext/nkf/nkf-utf8/nkf.c static  int    (*i_mgetc)PROTO((FILE *)) = std_getc; /* input of mgetc */
std_getc          548 ext/nkf/nkf-utf8/nkf.c static  int    (*i_mgetc_buf)PROTO((FILE *)) = std_getc; /* input of mgetc_buf */
std_getc         1837 ext/nkf/nkf-utf8/nkf.c     i_getc = std_getc;
std_getc         4658 ext/nkf/nkf-utf8/nkf.c     i_getc = std_getc;
std_getc         4660 ext/nkf/nkf-utf8/nkf.c     i_bgetc = std_getc;
std_getc         4663 ext/nkf/nkf-utf8/nkf.c     i_mgetc = std_getc;
std_getc         4665 ext/nkf/nkf-utf8/nkf.c     i_mgetc_buf = std_getc;


std_putc

std_putc          326 ext/nkf/nkf-utf8/nkf.c STATIC  void    std_putc PROTO((int c));
std_putc          534 ext/nkf/nkf-utf8/nkf.c static  void   (*o_putc)PROTO((int c)) = std_putc;
std_putc          542 ext/nkf/nkf-utf8/nkf.c static  void   (*o_mputc)PROTO((int c)) = std_putc ; /* output of mputc */
std_putc         1798 ext/nkf/nkf-utf8/nkf.c     o_putc = std_putc;
std_putc         4657 ext/nkf/nkf-utf8/nkf.c     o_putc = std_putc;
std_putc         4662 ext/nkf/nkf-utf8/nkf.c     o_mputc = std_putc;


std_ungetc

std_ungetc        328 ext/nkf/nkf-utf8/nkf.c STATIC  int     std_ungetc PROTO((int c,FILE *f));
std_ungetc        408 ext/nkf/nkf-utf8/nkf.c static int (*i_cungetc)PROTO((int c ,FILE *f)) = std_ungetc;
std_ungetc        414 ext/nkf/nkf-utf8/nkf.c static int (*i_uungetc)PROTO((int c ,FILE *f)) = std_ungetc;
std_ungetc        420 ext/nkf/nkf-utf8/nkf.c static int (*i_nungetc)PROTO((int c ,FILE *f)) = std_ungetc;
std_ungetc        537 ext/nkf/nkf-utf8/nkf.c static  int    (*i_ungetc)PROTO((int c,FILE *f)) =std_ungetc;
std_ungetc        540 ext/nkf/nkf-utf8/nkf.c static  int    (*i_bungetc)PROTO((int c ,FILE *f)) = std_ungetc;
std_ungetc        545 ext/nkf/nkf-utf8/nkf.c static  int    (*i_mungetc)PROTO((int c ,FILE *f)) = std_ungetc;
std_ungetc        549 ext/nkf/nkf-utf8/nkf.c static  int    (*i_mungetc_buf)PROTO((int c,FILE *f)) = std_ungetc;
std_ungetc       1838 ext/nkf/nkf-utf8/nkf.c     i_ungetc = std_ungetc;
std_ungetc       4659 ext/nkf/nkf-utf8/nkf.c     i_ungetc = std_ungetc;
std_ungetc       4661 ext/nkf/nkf-utf8/nkf.c     i_bungetc = std_ungetc;
std_ungetc       4664 ext/nkf/nkf-utf8/nkf.c     i_mungetc  = std_ungetc;
std_ungetc       4666 ext/nkf/nkf-utf8/nkf.c     i_mungetc_buf = std_ungetc;


stdout_setter

stdout_setter    3983 io.c               stdout_setter(val, id, variable);
stdout_setter    3993 io.c               stdout_setter(val, id, variable);
stdout_setter    5674 io.c               rb_define_hooked_variable("$stdout", &rb_stdout, 0, stdout_setter);
stdout_setter    5676 io.c               rb_define_hooked_variable("$stderr", &rb_stderr, 0, stdout_setter);
stdout_setter    5678 io.c               rb_define_hooked_variable("$>", &rb_stdout, 0, stdout_setter);


step_i

step_i            337 range.c        	    rb_iterate((VALUE(*)_((VALUE)))str_step, (VALUE)args, step_i,
step_i            360 range.c        	    range_each_func(range, step_i, b, e, args);
step_i            420 range.c        	rb_iterate((VALUE(*)_((VALUE)))str_step, (VALUE)args, step_i,


store_jump

store_jump        160 regex.c        static void store_jump _((char*, int, char*));
store_jump       1394 regex.c        	store_jump(b,greedy?maybe_finalize_jump:finalize_push,laststart-3);
store_jump       1906 regex.c        	store_jump(fixup_alt_jump, jump, b);
store_jump       1993 regex.c        	store_jump(fixup_alt_jump, jump_past_alt, b);
store_jump       2409 regex.c            store_jump(fixup_alt_jump, jump, b);
store_jump       2533 regex.c          store_jump(from, op, to);


store_jump_n

store_jump_n      162 regex.c        static void store_jump_n _((char*, int, char*, unsigned));
store_jump_n     2159 regex.c        	  store_jump_n(b, greedy?jump_n:finalize_push_n, laststart + 5,
store_jump_n     2576 regex.c          store_jump_n(from, op, to, n);


strEQ

strEQ             200 util.c                 if (strEQ(ext, suffix)) goto fallback;
strEQ             222 util.c         	(void)memcpy(p, strEQ(ext, suffix1) ? suffix2 : suffix1, 5);


str_alloc

str_alloc          62 string.c       static VALUE str_alloc _((VALUE));
str_alloc          89 string.c           str = str_alloc(klass);
str_alloc         143 string.c           VALUE str2 = str_alloc(klass);
str_alloc         165 string.c           VALUE str2 = str_alloc(klass);
str_alloc         224 string.c           VALUE str = str_alloc(rb_cString);
str_alloc         313 string.c           VALUE dup = str_alloc(rb_obj_class(str));
str_alloc        2543 string.c       	VALUE dup = str_alloc(rb_cString);
str_alloc        4636 string.c           rb_define_alloc_func(rb_cString, str_alloc);


str_frozen_check

str_frozen_check 1978 string.c       	    str_frozen_check(str);
str_frozen_check 2098 string.c       	    if (bang) str_frozen_check(str);


str_gsub

str_gsub         2189 string.c           return str_gsub(argc, argv, str, 1);
str_gsub         2230 string.c           return str_gsub(argc, argv, str, 0);


str_independent

str_independent   505 string.c           if (!str_independent(str))
str_independent  2153 string.c       	if (str_independent(str)) {
str_independent  2253 string.c       	if (str_independent(str)) {


str_isnumber

str_isnumber      152 ext/socket/getaddrinfo.c static int str_isnumber __P((const char *));
str_isnumber      382 ext/socket/getaddrinfo.c 		if (str_isnumber(servname)) {
str_isnumber      768 ext/socket/socket.c     if (socktype == 0 && flags == 0 && str_isnumber(portp)) {


str_make_independent

str_make_independent  506 string.c       	str_make_independent(str);
str_make_independent  519 string.c       	    str_make_independent(str);


str_mod_check

str_mod_check    1977 string.c       	    str_mod_check(str, p, len);
str_mod_check    2097 string.c       	    str_mod_check(str, sp, slen);
str_mod_check    3702 string.c       	    str_mod_check(str, ptr, len);
str_mod_check    4438 string.c       	    str_mod_check(str, ptr, len);
str_mod_check    4455 string.c       	    str_mod_check(str, ptr, len);


str_new

str_new           105 string.c           return str_new(rb_cString, ptr, len);
str_new           199 string.c       	str = str_new(klass, RSTRING(orig)->ptr, RSTRING(orig)->len);
str_new           215 string.c           return str_new(rb_obj_class(obj), ptr, len);
str_new          2083 string.c           dest = str_new(0, 0, blen);


str_new3

str_new3          158 string.c           return str_new3(rb_obj_class(str), str);
str_new3          193 string.c       	    str = str_new3(klass, str);


str_step

str_step          337 range.c        	    rb_iterate((VALUE(*)_((VALUE)))str_step, (VALUE)args, step_i,
str_step          420 range.c        	rb_iterate((VALUE(*)_((VALUE)))str_step, (VALUE)args, step_i,


str_to_id

str_to_id        1667 object.c       	return str_to_id(name);
str_to_id        1681 object.c       	    return str_to_id(tmp);


strcasecmp

strcasecmp       2716 ext/win32ole/win32ole.c         if (strcasecmp(StringValuePtr(name), StringValuePtr(fname)) == 0) {
strcasecmp       1665 hash.c         	if (strcasecmp(nam, PATH_ENV) == 0)
strcasecmp       1702 hash.c         	if (strcasecmp(nam, PATH_ENV) == 0 && !rb_env_path_tainted())
strcasecmp       1745 hash.c             if (strcasecmp(nam, PATH_ENV) == 0 && !rb_env_path_tainted())
strcasecmp       1906 hash.c             if (strcasecmp(name, PATH_ENV) == 0) {
strcasecmp         94 missing.h      extern int strcasecmp _((char *, char *));
strcasecmp        959 process.c      	if ((extension = strrchr(prog, '.')) != NULL && strcasecmp(extension, ".bat") == 0) {
strcasecmp       1094 process.c          if ((extension = strrchr(prog, '.')) != NULL && strcasecmp(extension, ".bat") == 0) {
strcasecmp        269 ruby.c         	if (p-libpath > 3 && !strcasecmp(p-4, "/bin")) {
strcasecmp        858 ruby.c         	    if (ext && strcasecmp(ext, ".exe") == 0)
strcasecmp        350 time.c         		    strcasecmp(months[i], RSTRING(v[1])->ptr) == 0) {
strcasecmp        542 win32/win32.c  	strcasecmp(interp+i, "command.com") == 0) {


strchr

strchr             59 dir.c          char *strchr _((char*,char));
strchr            202 dir.c          		&& *pat && strchr("*?[]\\", *pat)
strchr            858 dir.c              pend = strchr(path, '/');
strchr            955 dir.c          	m = strchr(p, '/');
strchr           1734 dln.c              if (exe_flag && strchr(fname, '/')) return fname;
strchr           1742 dln.c              if (exe_flag && strchr(fname, '\\')) return fname;
strchr           1751 dln.c          	ep = strchr(dp, PATH_SEP[0]);
strchr           6932 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           3302 file.c             if (strchr("bcdefgGkloOprRsSuwWxXz", cmd)) {
strchr           3374 file.c             if (strchr("MAC", cmd)) {
strchr           3397 file.c             if (strchr("=<>", cmd)) {
strchr           4112 file.c             p = strchr(path, sep);
strchr           4121 file.c         	p = strchr(p0, sep);
strchr           4133 file.c             if (strchr(path, ':')) return 1;
strchr           1930 hash.c         	char *s = strchr(*env, '=');
strchr           1961 hash.c         	char *s = strchr(*env, '=');
strchr           1995 hash.c         	char *s = strchr(*env, '=');
strchr           2088 hash.c         	char *s = strchr(*env, '=');
strchr           2136 hash.c         	char *s = strchr(*env, '=');
strchr           2165 hash.c         	char *s = strchr(*env, '=');
strchr           2231 hash.c         	char *s = strchr(*env, '=');
strchr           2255 hash.c         	char *s = strchr(*env, '=');
strchr           2302 hash.c         	char *s = strchr(*env, '=');
strchr           2326 hash.c         	char *s = strchr(*env, '=');
strchr            102 missing.h      extern char *strchr _((char *, int));
strchr            229 missing/strftime.c 	if (strchr(format, '%') == NULL && strlen(format) + 1 >= maxsize)
strchr            503 numeric.c          if (!(e = strchr(buf, 'e'))) {
strchr            508 numeric.c      	if (!(e = strchr(buf, 'e'))) {
strchr           1525 numeric.c      	    if (s = strchr(buf, ' ')) *s = '\0';
strchr           1676 numeric.c      	    if (s = strchr(buf, ' ')) *s = '\0';
strchr            485 pack.c         	    if (strchr(natstr, type)) {
strchr            496 pack.c         	    len = strchr("@Xxu", type) ? 0 : items;
strchr           1341 pack.c         	    if (strchr(natstr, type)) {
strchr           1031 process.c      	if (*s != ' ' && !ISALPHA(*s) && strchr("*?{}[]<>()~&|\\$;'`\"\n",*s)) {
strchr           1162 process.c      	if (*s != ' ' && !ISALPHA(*s) && strchr("*?{}[]<>()~&|\\$;'`\"\n",*s)) {
strchr             38 ruby.c         char *strchr _((const char*,const char));
strchr            188 ruby.c             if (strchr(path, sep)) {
strchr            195 ruby.c         	    if ((s = strchr(p, sep)) != 0) {
strchr            405 ruby.c         		    if (!(p = strchr(p, '='))) {
strchr            754 ruby.c         		if (!strchr("IdvwrK", *s))
strchr             25 util.c         char *strchr _((char*,char));
strchr             56 util.c             while (len-- && *s && (tmp = strchr(hexdigit, *s))) {
strchr             37 win32/win32.c  #define index(x, y) strchr((x), (y))
strchr            944 win32/win32.c  		if (strchr(".:*?\"/\\", *prog)) {
strchr            953 win32/win32.c  		if (ISSPACE(*prog) || strchr("<>|", *prog)) {


strdup

strdup            290 dir.c              dp->path = strdup(RSTRING(dirname)->ptr);
strdup            930 dir.c          	    newpath = strdup(path);
strdup            519 dln.c              obj->name = strdup(name);
strdup            633 dln.c          	undef->name = strdup(data->name1);
strdup            692 dln.c          		st_insert(undef_tbl, strdup(sym[1].n_un.n_name), NULL);
strdup            731 dln.c          		    st_insert(undef_tbl, strdup(sym->n_un.n_name), NULL);
strdup            768 dln.c          	    new_sym->n_un.n_name = strdup(sym->n_un.n_name);
strdup            581 ext/dl/dl.c      return rb_dlptr_new(strdup(RSTRING(str)->ptr), RSTRING(str)->len, dlfree);
strdup             95 ext/dl/sym.c       data->name = name ? strdup(name) : NULL;
strdup             96 ext/dl/sym.c       data->type = type ? strdup(type) : NULL;
strdup            166 ext/dl/sym.c       data->name = sname ? strdup(sname) : 0;
strdup            167 ext/dl/sym.c       data->type = stype ? strdup(stype) : 0;
strdup            429 ext/pty/pty.c      rfptr->path = strdup(SlaveName);
strdup            433 ext/pty/pty.c      wfptr->path = strdup(SlaveName);
strdup            173 ext/readline/readline.c         result[0] = strdup(result[1]);
strdup           1431 ext/socket/socket.c     fptr->path = strdup(RSTRING(path)->ptr);
strdup           1632 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           2340 file.c         	drvcwd = strdup(drive);
strdup           1834 hash.c         	    tmpenv[j] = strdup(environ[j]);
strdup           2736 io.c               fptr->path = strdup(fname);
strdup           2761 io.c               fptr->path = strdup(fname);
strdup           3385 io.c               if (orig->path) fptr->path = strdup(orig->path);
strdup           3499 io.c               fptr->path = strdup(RSTRING(fname)->ptr);
strdup           3556 io.c               if (orig->path) fptr->path = strdup(orig->path);
strdup           4028 io.c               fptr->path = strdup(path);
strdup           5456 io.c               ruby_inplace_mode = strdup(RSTRING(val)->ptr);
strdup           10058 parse.c            name = strdup(name);
strdup           6060 parse.y            name = strdup(name);
strdup            594 ruby.c         	    ruby_inplace_mode = strdup(s+1);
strdup           1141 win32/win32.c      ptr = cmdline = strdup(cmd);
strdup            112 wince/wince.h  char *strdup(const char * str);


strerror

strerror         1172 dln.c              char *strerror();
strerror         1188 dln.c          	return strerror(dln_errno);
strerror         1250 dln.c          	ERRBUF_APPEND(strerror(errno));
strerror         1380 dln.c          	    rb_loaderror("%s - %s", strerror(errno), file);
strerror         1387 dln.c          		rb_loaderror("%s - %s", strerror(ENOSYM), file);
strerror         1527 dln.c          	rb_loaderror(errmsg, strerror(err_stat), buf);
strerror          883 error.c            char *strerror();
strerror          906 error.c            if (!NIL_P(error)) err = strerror(NUM2LONG(error));
strerror         1144 error.c             snprintf(buf+strlen(buf), BUFSIZ-strlen(buf), ": %s", strerror(errno_save));
strerror         1156 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         4271 io.c           				    fn, RSTRING(str)->ptr, strerror(errno));
strerror         4283 io.c           				    fn, strerror(errno));
strerror          107 missing.h      extern char *strerror _((int));
strerror         1711 win32/win32.c  	strncpy(buffer, strerror(e), sizeof(buffer));


strftime

strftime          111 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         1250 time.c         	len = strftime(buf, 128, "%a %b %d %H:%M:%S UTC %Y", &tobj->tm);
strftime         1253 time.c         	len = strftime(buf, 128, "%a %b %d %H:%M:%S %Z %Y", &tobj->tm);
strftime         1643 time.c             len = strftime(buf, 64, "%Z", &tobj->tm);
strftime         1757 time.c             len = strftime(*buf, SMALLBUF, format, time);
strftime         1762 time.c         	len = strftime(*buf, size, format, time);


strhash

strhash            43 st.c           static int strhash(const char *);
strhash            46 st.c               strhash,


stricmp

stricmp           113 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        105 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) {


strio_0

strio_0           144 ext/stringio/stringio.c static VALUE strio_0 _((VALUE));
strio_0           553 ext/stringio/stringio.c #define strio_fsync strio_0


strio_alloc

strio_alloc        33 ext/stringio/stringio.c static struct StringIO* strio_alloc _((void));
strio_alloc       224 ext/stringio/stringio.c 	DATA_PTR(self) = ptr = strio_alloc();


strio_close

strio_close       149 ext/stringio/stringio.c static VALUE strio_close _((VALUE));
strio_close      1261 ext/stringio/stringio.c     rb_define_method(StringIO, "close", strio_close, 0);


strio_close_read

strio_close_read  150 ext/stringio/stringio.c static VALUE strio_close_read _((VALUE));
strio_close_read 1262 ext/stringio/stringio.c     rb_define_method(StringIO, "close_read", strio_close_read, 0);


strio_close_write

strio_close_write  151 ext/stringio/stringio.c static VALUE strio_close_write _((VALUE));
strio_close_write 1263 ext/stringio/stringio.c     rb_define_method(StringIO, "close_write", strio_close_write, 0);


strio_closed

strio_closed      152 ext/stringio/stringio.c static VALUE strio_closed _((VALUE));
strio_closed     1264 ext/stringio/stringio.c     rb_define_method(StringIO, "closed?", strio_closed, 0);


strio_closed_read

strio_closed_read  153 ext/stringio/stringio.c static VALUE strio_closed_read _((VALUE));
strio_closed_read 1265 ext/stringio/stringio.c     rb_define_method(StringIO, "closed_read?", strio_closed_read, 0);


strio_closed_write

strio_closed_write  154 ext/stringio/stringio.c static VALUE strio_closed_write _((VALUE));
strio_closed_write 1266 ext/stringio/stringio.c     rb_define_method(StringIO, "closed_write?", strio_closed_write, 0);


strio_copy

strio_copy        571 ext/stringio/stringio.c 	return strio_copy(self, *argv);
strio_copy       1252 ext/stringio/stringio.c     rb_define_method(StringIO, "initialize_copy", strio_copy, 1);


strio_each

strio_each        170 ext/stringio/stringio.c static VALUE strio_each _((int, VALUE *, VALUE));
strio_each       1281 ext/stringio/stringio.c     rb_define_method(StringIO, "each", strio_each, -1);
strio_each       1283 ext/stringio/stringio.c     rb_define_method(StringIO, "each_line", strio_each, -1);


strio_each_byte

strio_each_byte   163 ext/stringio/stringio.c static VALUE strio_each_byte _((VALUE));
strio_each_byte  1282 ext/stringio/stringio.c     rb_define_method(StringIO, "each_byte", strio_each_byte, 0);


strio_eof

strio_eof         155 ext/stringio/stringio.c static VALUE strio_eof _((VALUE));
strio_eof        1267 ext/stringio/stringio.c     rb_define_method(StringIO, "eof", strio_eof, 0);
strio_eof        1268 ext/stringio/stringio.c     rb_define_method(StringIO, "eof?", strio_eof, 0);


strio_extend

strio_extend      766 ext/stringio/stringio.c 	    strio_extend(ptr, pos, 1);
strio_extend     1015 ext/stringio/stringio.c 	strio_extend(ptr, ptr->pos, len);
strio_extend     1067 ext/stringio/stringio.c     strio_extend(ptr, ptr->pos, 1);


strio_false

strio_false       142 ext/stringio/stringio.c static VALUE strio_false _((VALUE));
strio_false      1191 ext/stringio/stringio.c #define strio_isatty strio_false


strio_finalize

strio_finalize    140 ext/stringio/stringio.c static VALUE strio_finalize _((VALUE));
strio_finalize    205 ext/stringio/stringio.c     return rb_ensure(rb_yield, obj, strio_finalize, obj);


strio_first

strio_first       145 ext/stringio/stringio.c static VALUE strio_first _((VALUE, VALUE));
strio_first       683 ext/stringio/stringio.c #define strio_set_sync strio_first


strio_free

strio_free         35 ext/stringio/stringio.c static void strio_free _((struct StringIO *));
strio_free        187 ext/stringio/stringio.c     return Data_Wrap_Struct(klass, strio_mark, strio_free, 0);
strio_free        503 ext/stringio/stringio.c 	strio_free(DATA_PTR(copy));


strio_get_lineno

strio_get_lineno  156 ext/stringio/stringio.c static VALUE strio_get_lineno _((VALUE));
strio_get_lineno 1257 ext/stringio/stringio.c     rb_define_method(StringIO, "lineno", strio_get_lineno, 0);


strio_get_pos

strio_get_pos     158 ext/stringio/stringio.c static VALUE strio_get_pos _((VALUE));
strio_get_pos     685 ext/stringio/stringio.c #define strio_tell strio_get_pos
strio_get_pos    1272 ext/stringio/stringio.c     rb_define_method(StringIO, "pos", strio_get_pos, 0);


strio_get_string

strio_get_string  147 ext/stringio/stringio.c static VALUE strio_get_string _((VALUE));
strio_get_string 1255 ext/stringio/stringio.c     rb_define_method(StringIO, "string", strio_get_string, 0);


strio_get_sync

strio_get_sync    162 ext/stringio/stringio.c static VALUE strio_get_sync _((VALUE));
strio_get_sync   1276 ext/stringio/stringio.c     rb_define_method(StringIO, "sync", strio_get_sync, 0);


strio_getc

strio_getc        164 ext/stringio/stringio.c static VALUE strio_getc _((VALUE));
strio_getc        786 ext/stringio/stringio.c     VALUE c = strio_getc(self);
strio_getc       1284 ext/stringio/stringio.c     rb_define_method(StringIO, "getc", strio_getc, 0);


strio_getline

strio_getline     167 ext/stringio/stringio.c static VALUE strio_getline _((int, VALUE *, struct StringIO *));
strio_getline     920 ext/stringio/stringio.c     VALUE str = strio_getline(argc, argv, readable(StringIO(self)));
strio_getline     938 ext/stringio/stringio.c     VALUE line = strio_getline(argc, argv, readable(StringIO(self)));
strio_getline     959 ext/stringio/stringio.c     while (!NIL_P(line = strio_getline(argc, argv, readable(ptr)))) {
strio_getline     979 ext/stringio/stringio.c     while (!NIL_P(line = strio_getline(argc, argv, readable(ptr)))) {


strio_gets

strio_gets        168 ext/stringio/stringio.c static VALUE strio_gets _((int, VALUE *, VALUE));
strio_gets       1287 ext/stringio/stringio.c     rb_define_method(StringIO, "gets", strio_gets, -1);


strio_initialize

strio_initialize  139 ext/stringio/stringio.c static VALUE strio_initialize _((int, VALUE *, VALUE));
strio_initialize  573 ext/stringio/stringio.c     return strio_initialize(argc, argv, self);
strio_initialize 1251 ext/stringio/stringio.c     rb_define_method(StringIO, "initialize", strio_initialize, -1);


strio_isatty

strio_isatty     1301 ext/stringio/stringio.c     rb_define_method(StringIO, "isatty", strio_isatty, 0);
strio_isatty     1302 ext/stringio/stringio.c     rb_define_method(StringIO, "tty?", strio_isatty, 0);


strio_mark

strio_mark         34 ext/stringio/stringio.c static void strio_mark _((struct StringIO *));
strio_mark         42 ext/stringio/stringio.c #define IS_STRIO(obj) (RDATA(obj)->dmark == (RUBY_DATA_FUNC)strio_mark)
strio_mark        187 ext/stringio/stringio.c     return Data_Wrap_Struct(klass, strio_mark, strio_free, 0);


strio_nil

strio_nil         143 ext/stringio/stringio.c static VALUE strio_nil _((VALUE));
strio_nil        1183 ext/stringio/stringio.c #define strio_path strio_nil
strio_nil        1194 ext/stringio/stringio.c #define strio_pid strio_nil
strio_nil        1197 ext/stringio/stringio.c #define strio_fileno strio_nil


strio_putc

strio_putc        173 ext/stringio/stringio.c static VALUE strio_putc _((VALUE, VALUE));
strio_putc       1297 ext/stringio/stringio.c     rb_define_method(StringIO, "putc", strio_putc, 1);


strio_read

strio_read        174 ext/stringio/stringio.c static VALUE strio_read _((int, VALUE *, VALUE));
strio_read       1173 ext/stringio/stringio.c     VALUE val = strio_read(argc, argv, self);
strio_read       1290 ext/stringio/stringio.c     rb_define_method(StringIO, "read", strio_read, -1);


strio_readchar

strio_readchar    166 ext/stringio/stringio.c static VALUE strio_readchar _((VALUE));
strio_readchar   1286 ext/stringio/stringio.c     rb_define_method(StringIO, "readchar", strio_readchar, 0);


strio_readline

strio_readline    169 ext/stringio/stringio.c static VALUE strio_readline _((int, VALUE *, VALUE));
strio_readline   1288 ext/stringio/stringio.c     rb_define_method(StringIO, "readline", strio_readline, -1);


strio_readlines

strio_readlines   171 ext/stringio/stringio.c static VALUE strio_readlines _((int, VALUE *, VALUE));
strio_readlines  1289 ext/stringio/stringio.c     rb_define_method(StringIO, "readlines", strio_readlines, -1);


strio_rewind

strio_rewind      160 ext/stringio/stringio.c static VALUE strio_rewind _((VALUE));
strio_rewind     1274 ext/stringio/stringio.c     rb_define_method(StringIO, "rewind", strio_rewind, 0);


strio_s_allocate

strio_s_allocate  137 ext/stringio/stringio.c static VALUE strio_s_allocate _((VALUE));
strio_s_allocate 1249 ext/stringio/stringio.c     rb_define_alloc_func(StringIO, strio_s_allocate);


strio_s_open

strio_s_open      138 ext/stringio/stringio.c static VALUE strio_s_open _((int, VALUE *, VALUE));
strio_s_open     1250 ext/stringio/stringio.c     rb_define_singleton_method(StringIO, "open", strio_s_open, -1);


strio_seek

strio_seek        161 ext/stringio/stringio.c static VALUE strio_seek _((int, VALUE *, VALUE));
strio_seek       1275 ext/stringio/stringio.c     rb_define_method(StringIO, "seek", strio_seek, -1);


strio_self

strio_self        141 ext/stringio/stringio.c static VALUE strio_self _((VALUE));
strio_self        544 ext/stringio/stringio.c #define strio_binmode strio_self
strio_self        550 ext/stringio/stringio.c #define strio_flush strio_self


strio_set_lineno

strio_set_lineno  157 ext/stringio/stringio.c static VALUE strio_set_lineno _((VALUE, VALUE));
strio_set_lineno 1258 ext/stringio/stringio.c     rb_define_method(StringIO, "lineno=", strio_set_lineno, 1);


strio_set_pos

strio_set_pos     159 ext/stringio/stringio.c static VALUE strio_set_pos _((VALUE, VALUE));
strio_set_pos    1273 ext/stringio/stringio.c     rb_define_method(StringIO, "pos=", strio_set_pos, 1);


strio_set_string

strio_set_string  148 ext/stringio/stringio.c static VALUE strio_set_string _((VALUE, VALUE));
strio_set_string 1256 ext/stringio/stringio.c     rb_define_method(StringIO, "string=", strio_set_string, 1);


strio_size

strio_size        175 ext/stringio/stringio.c static VALUE strio_size _((VALUE));
strio_size       1305 ext/stringio/stringio.c     rb_define_method(StringIO, "size", strio_size, 0);
strio_size       1306 ext/stringio/stringio.c     rb_define_method(StringIO, "length", strio_size, 0);


strio_truncate

strio_truncate    176 ext/stringio/stringio.c static VALUE strio_truncate _((VALUE, VALUE));
strio_truncate   1307 ext/stringio/stringio.c     rb_define_method(StringIO, "truncate", strio_truncate, 1);


strio_ungetc

strio_ungetc      165 ext/stringio/stringio.c static VALUE strio_ungetc _((VALUE, VALUE));
strio_ungetc     1285 ext/stringio/stringio.c     rb_define_method(StringIO, "ungetc", strio_ungetc, 1);


strio_unimpl

strio_unimpl      146 ext/stringio/stringio.c static VALUE strio_unimpl _((int, VALUE *, VALUE));
strio_unimpl      547 ext/stringio/stringio.c #define strio_fcntl strio_unimpl


strio_write

strio_write       172 ext/stringio/stringio.c static VALUE strio_write _((VALUE, VALUE));
strio_write      1180 ext/stringio/stringio.c #define strio_syswrite strio_write
strio_write      1293 ext/stringio/stringio.c     rb_define_method(StringIO, "write", strio_write, 1);


strncasecmp

strncasecmp      1780 hash.c         	    strncasecmp(env[i],nam,len) == 0
strncasecmp        98 missing.h      extern int strncasecmp _((char *, char *, int));
strncasecmp       154 ruby.c             if (!newp || l < oldl || strncasecmp(oldp, s, oldl) != 0) {


strnicmp

strnicmp          114 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           798 win32/win32.c  	if (!*p || strpbrk(p, " \t\"")) {
strpbrk          1716 win32/win32.c      while ((p = strpbrk(p, "\r\n")) != NULL) {


strrchr

strrchr          1598 dln.c          	if (p1 = strrchr(fname,'/'))
strrchr          1600 dln.c          	if (p2 = strrchr(fname,'.'))
strrchr            75 eval.c         char *strrchr _((const char*,const char));
strrchr          6931 eval.c             ext = strrchr(ftptr = RSTRING(fname)->ptr, '.');
strrchr          6973 eval.c         	ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
strrchr            57 file.c         char *strrchr _((const char*,const char));
strrchr          2705 file.c         	e = strrchr(p, *e);
strrchr          2871 file.c              e = strrchr(p, '.');	/* get the last dot of the last component */
strrchr           103 missing.h      extern char *strrchr _((char *, int));
strrchr           959 process.c      	if ((extension = strrchr(prog, '.')) != NULL && strcasecmp(extension, ".bat") == 0) {
strrchr          1094 process.c          if ((extension = strrchr(prog, '.')) != NULL && strcasecmp(extension, ".bat") == 0) {
strrchr            39 ruby.c         char *strrchr _((const char*,const char));
strrchr           266 ruby.c             p = strrchr(libpath, '/');
strrchr           857 ruby.c         	    char *ext = strrchr(fname, '.');
strrchr           169 wince/wince.h    char *strrchr( const char *p, int c );


strrdirsep

strrdirsep       2601 file.c         			if (!(b = strrdirsep(root))) {
strrdirsep       2775 file.c             else if (!(p = strrdirsep(name))) {
strrdirsep       2821 file.c             p = strrdirsep(root);
strrdirsep       2865 file.c             p = strrdirsep(name);	/* get the last path component */
strrdirsep       4080 file.c         	s = strrdirsep(p0);


strscan_aref

strscan_aref      116 ext/strscan/strscan.c static VALUE strscan_aref _((VALUE self, VALUE idx));
strscan_aref     1348 ext/strscan/strscan.c     rb_define_method(StringScanner, "[]",          strscan_aref,        1);


strscan_bol_p

strscan_bol_p     109 ext/strscan/strscan.c static VALUE strscan_bol_p _((VALUE self));
strscan_bol_p    1338 ext/strscan/strscan.c     rb_define_method(StringScanner, "beginning_of_line?", strscan_bol_p, 0);
strscan_bol_p    1339 ext/strscan/strscan.c     rb_define_method(StringScanner, "bol?",        strscan_bol_p,       0);


strscan_check

strscan_check      94 ext/strscan/strscan.c static VALUE strscan_check _((VALUE self, VALUE re));
strscan_check    1321 ext/strscan/strscan.c     rb_define_method(StringScanner, "check",       strscan_check,       1);


strscan_check_until

strscan_check_until   99 ext/strscan/strscan.c static VALUE strscan_check_until _((VALUE self, VALUE re));
strscan_check_until 1327 ext/strscan/strscan.c     rb_define_method(StringScanner, "check_until", strscan_check_until, 1);


strscan_clear

strscan_clear      83 ext/strscan/strscan.c static VALUE strscan_clear _((VALUE self));
strscan_clear    1308 ext/strscan/strscan.c     rb_define_method(StringScanner, "clear",       strscan_clear,       0);


strscan_concat

strscan_concat     86 ext/strscan/strscan.c static VALUE strscan_concat _((VALUE self, VALUE str));
strscan_concat   1311 ext/strscan/strscan.c     rb_define_method(StringScanner, "concat",      strscan_concat,      1);
strscan_concat   1312 ext/strscan/strscan.c     rb_define_method(StringScanner, "<<",          strscan_concat,      1);


strscan_do_scan

strscan_do_scan    89 ext/strscan/strscan.c static VALUE strscan_do_scan _((VALUE self, VALUE regex,
strscan_do_scan   469 ext/strscan/strscan.c     return strscan_do_scan(self, re, 1, 1, 1);
strscan_do_scan   487 ext/strscan/strscan.c     return strscan_do_scan(self, re, 0, 0, 1);
strscan_do_scan   511 ext/strscan/strscan.c     return strscan_do_scan(self, re, 1, 0, 1);
strscan_do_scan   533 ext/strscan/strscan.c     return strscan_do_scan(self, re, 0, 1, 1);
strscan_do_scan   550 ext/strscan/strscan.c     return strscan_do_scan(self, re, RTEST(s), RTEST(f), 1);
strscan_do_scan   570 ext/strscan/strscan.c     return strscan_do_scan(self, re, 1, 1, 0);
strscan_do_scan   590 ext/strscan/strscan.c     return strscan_do_scan(self, re, 0, 0, 0);
strscan_do_scan   613 ext/strscan/strscan.c     return strscan_do_scan(self, re, 1, 0, 0);
strscan_do_scan   633 ext/strscan/strscan.c     return strscan_do_scan(self, re, 0, 1, 0);
strscan_do_scan   649 ext/strscan/strscan.c     return strscan_do_scan(self, re, RTEST(s), RTEST(f), 0);


strscan_empty_p

strscan_empty_p   111 ext/strscan/strscan.c static VALUE strscan_empty_p _((VALUE self));
strscan_empty_p  1341 ext/strscan/strscan.c     rb_define_method(StringScanner, "empty?",      strscan_empty_p,     0);


strscan_eos_p

strscan_eos_p     110 ext/strscan/strscan.c static VALUE strscan_eos_p _((VALUE self));
strscan_eos_p     860 ext/strscan/strscan.c     return strscan_eos_p(self);
strscan_eos_p    1340 ext/strscan/strscan.c     rb_define_method(StringScanner, "eos?",        strscan_eos_p,       0);


strscan_free

strscan_free       77 ext/strscan/strscan.c static void strscan_free _((struct strscanner *p));
strscan_free      193 ext/strscan/strscan.c     return Data_Wrap_Struct(klass, strscan_mark, strscan_free, p);


strscan_get_byte

strscan_get_byte  104 ext/strscan/strscan.c static VALUE strscan_get_byte _((VALUE self));
strscan_get_byte  734 ext/strscan/strscan.c     return strscan_get_byte(self);
strscan_get_byte 1331 ext/strscan/strscan.c     rb_define_method(StringScanner, "get_byte",    strscan_get_byte,    0);


strscan_get_pos

strscan_get_pos    87 ext/strscan/strscan.c static VALUE strscan_get_pos _((VALUE self));
strscan_get_pos  1313 ext/strscan/strscan.c     rb_define_method(StringScanner, "pos",         strscan_get_pos,     0);
strscan_get_pos  1315 ext/strscan/strscan.c     rb_define_method(StringScanner, "pointer",     strscan_get_pos,     0);


strscan_get_string

strscan_get_string   84 ext/strscan/strscan.c static VALUE strscan_get_string _((VALUE self));
strscan_get_string 1309 ext/strscan/strscan.c     rb_define_method(StringScanner, "string",      strscan_get_string,  0);


strscan_getbyte

strscan_getbyte   105 ext/strscan/strscan.c static VALUE strscan_getbyte _((VALUE self));
strscan_getbyte  1332 ext/strscan/strscan.c     rb_define_method(StringScanner, "getbyte",     strscan_getbyte,     0);


strscan_getch

strscan_getch     103 ext/strscan/strscan.c static VALUE strscan_getch _((VALUE self));
strscan_getch    1330 ext/strscan/strscan.c     rb_define_method(StringScanner, "getch",       strscan_getch,       0);


strscan_initialize

strscan_initialize   79 ext/strscan/strscan.c static VALUE strscan_initialize _((int argc, VALUE *argv, VALUE self));
strscan_initialize 1304 ext/strscan/strscan.c     rb_define_private_method(StringScanner, "initialize", strscan_initialize, -1);


strscan_inspect

strscan_inspect   122 ext/strscan/strscan.c static VALUE strscan_inspect _((VALUE self));
strscan_inspect  1356 ext/strscan/strscan.c     rb_define_method(StringScanner, "inspect",     strscan_inspect,     0);


strscan_mark

strscan_mark       76 ext/strscan/strscan.c static void strscan_mark _((struct strscanner *p));
strscan_mark      193 ext/strscan/strscan.c     return Data_Wrap_Struct(klass, strscan_mark, strscan_free, p);


strscan_match_p

strscan_match_p    92 ext/strscan/strscan.c static VALUE strscan_match_p _((VALUE self, VALUE re));
strscan_match_p  1320 ext/strscan/strscan.c     rb_define_method(StringScanner, "match?",      strscan_match_p,     1);


strscan_matched

strscan_matched   114 ext/strscan/strscan.c static VALUE strscan_matched _((VALUE self));
strscan_matched  1345 ext/strscan/strscan.c     rb_define_method(StringScanner, "matched",     strscan_matched,     0);


strscan_matched_p

strscan_matched_p  113 ext/strscan/strscan.c static VALUE strscan_matched_p _((VALUE self));
strscan_matched_p 1344 ext/strscan/strscan.c     rb_define_method(StringScanner, "matched?",    strscan_matched_p,   0);


strscan_matched_size

strscan_matched_size  115 ext/strscan/strscan.c static VALUE strscan_matched_size _((VALUE self));
strscan_matched_size  957 ext/strscan/strscan.c     return strscan_matched_size(self);
strscan_matched_size 1346 ext/strscan/strscan.c     rb_define_method(StringScanner, "matched_size", strscan_matched_size, 0);


strscan_peek

strscan_peek      106 ext/strscan/strscan.c static VALUE strscan_peek _((VALUE self, VALUE len));
strscan_peek      775 ext/strscan/strscan.c     return strscan_peek(self, vlen);
strscan_peek     1333 ext/strscan/strscan.c     rb_define_method(StringScanner, "peek",        strscan_peek,        1);


strscan_peep

strscan_peep      107 ext/strscan/strscan.c static VALUE strscan_peep _((VALUE self, VALUE len));
strscan_peep     1334 ext/strscan/strscan.c     rb_define_method(StringScanner, "peep",        strscan_peep,        1);


strscan_post_match

strscan_post_match  118 ext/strscan/strscan.c static VALUE strscan_post_match _((VALUE self));
strscan_post_match 1350 ext/strscan/strscan.c     rb_define_method(StringScanner, "post_match",  strscan_post_match,  0);


strscan_pre_match

strscan_pre_match  117 ext/strscan/strscan.c static VALUE strscan_pre_match _((VALUE self));
strscan_pre_match 1349 ext/strscan/strscan.c     rb_define_method(StringScanner, "pre_match",   strscan_pre_match,   0);


strscan_rest

strscan_rest      119 ext/strscan/strscan.c static VALUE strscan_rest _((VALUE self));
strscan_rest     1352 ext/strscan/strscan.c     rb_define_method(StringScanner, "rest",        strscan_rest,        0);


strscan_rest_p

strscan_rest_p    112 ext/strscan/strscan.c static VALUE strscan_rest_p _((VALUE self));
strscan_rest_p   1342 ext/strscan/strscan.c     rb_define_method(StringScanner, "rest?",       strscan_rest_p,      0);


strscan_rest_size

strscan_rest_size  120 ext/strscan/strscan.c static VALUE strscan_rest_size _((VALUE self));
strscan_rest_size 1082 ext/strscan/strscan.c     return strscan_rest_size(self);
strscan_rest_size 1353 ext/strscan/strscan.c     rb_define_method(StringScanner, "rest_size",   strscan_rest_size,   0);


strscan_s_allocate

strscan_s_allocate   78 ext/strscan/strscan.c static VALUE strscan_s_allocate _((VALUE klass));
strscan_s_allocate 1303 ext/strscan/strscan.c     rb_define_alloc_func(StringScanner, strscan_s_allocate);


strscan_s_mustc

strscan_s_mustc    81 ext/strscan/strscan.c static VALUE strscan_s_mustc _((VALUE self));
strscan_s_mustc  1305 ext/strscan/strscan.c     rb_define_singleton_method(StringScanner, "must_C_version", strscan_s_mustc, 0);


strscan_scan

strscan_scan       91 ext/strscan/strscan.c static VALUE strscan_scan _((VALUE self, VALUE re));
strscan_scan     1318 ext/strscan/strscan.c     rb_define_method(StringScanner, "scan",        strscan_scan,        1);


strscan_scan_full

strscan_scan_full   95 ext/strscan/strscan.c static VALUE strscan_scan_full _((VALUE self, VALUE re,
strscan_scan_full 1322 ext/strscan/strscan.c     rb_define_method(StringScanner, "scan_full",   strscan_scan_full,   3);


strscan_scan_until

strscan_scan_until   97 ext/strscan/strscan.c static VALUE strscan_scan_until _((VALUE self, VALUE re));
strscan_scan_until 1324 ext/strscan/strscan.c     rb_define_method(StringScanner, "scan_until",  strscan_scan_until,  1);


strscan_search_full

strscan_search_full  100 ext/strscan/strscan.c static VALUE strscan_search_full _((VALUE self, VALUE re,
strscan_search_full 1328 ext/strscan/strscan.c     rb_define_method(StringScanner, "search_full", strscan_search_full, 3);


strscan_set_pos

strscan_set_pos    88 ext/strscan/strscan.c static VALUE strscan_set_pos _((VALUE self, VALUE pos));
strscan_set_pos  1314 ext/strscan/strscan.c     rb_define_method(StringScanner, "pos=",        strscan_set_pos,     1);
strscan_set_pos  1316 ext/strscan/strscan.c     rb_define_method(StringScanner, "pointer=",    strscan_set_pos,     1);


strscan_set_string

strscan_set_string   85 ext/strscan/strscan.c static VALUE strscan_set_string _((VALUE self, VALUE str));
strscan_set_string 1310 ext/strscan/strscan.c     rb_define_method(StringScanner, "string=",     strscan_set_string,  1);


strscan_skip

strscan_skip       93 ext/strscan/strscan.c static VALUE strscan_skip _((VALUE self, VALUE re));
strscan_skip     1319 ext/strscan/strscan.c     rb_define_method(StringScanner, "skip",        strscan_skip,        1);


strscan_skip_until

strscan_skip_until   98 ext/strscan/strscan.c static VALUE strscan_skip_until _((VALUE self, VALUE re));
strscan_skip_until 1325 ext/strscan/strscan.c     rb_define_method(StringScanner, "skip_until",  strscan_skip_until,  1);


strscan_terminate

strscan_terminate   82 ext/strscan/strscan.c static VALUE strscan_terminate _((VALUE self));
strscan_terminate  279 ext/strscan/strscan.c     return strscan_terminate(self);
strscan_terminate 1307 ext/strscan/strscan.c     rb_define_method(StringScanner, "terminate",   strscan_terminate,   0);


strscan_unscan

strscan_unscan    108 ext/strscan/strscan.c static VALUE strscan_unscan _((VALUE self));
strscan_unscan   1336 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            115 missing.h      extern char *strstr _((char *, char *));
strstr             43 missing/os2.c  	if (strstr(shell, "cmd") || strstr(shell, "4os2"))
strstr             52 missing/os2.c  	if (strstr(shell, "cmd") || strstr(shell, "4os2"))
strstr             61 missing/os2.c  	if (strstr(shell, "cmd") || strstr(shell, "4os2"))
strstr             40 ruby.c         char *strstr _((const char*,const char*));
strstr            877 ruby.c         		    if ((p = strstr(RSTRING(line)->ptr, "ruby")) != 0) {
strstr            892 ruby.c         		if ((p = strstr(RSTRING(line)->ptr, "ruby")) == 0) {
strstr            929 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           1098 marshal.c      		d = strtod(ptr, &e);
strtod           2265 object.c           d = strtod(p, &end);
strtod           2299 object.c       	d = strtod(p, &end);
strtod           7979 parse.c        		double d = strtod(tok(), 0);
strtod           3981 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           428 bignum.c       	unsigned long val = strtoul((char*)str, &end, base);
strtoul           678 ext/socket/socket.c     (void)strtoul(p, &ep, 10);
strtoul          2811 ext/socket/socket.c 	port = strtoul(s, &end, 0);
strtoul           125 missing.h      extern unsigned long strtoul _((char *, char **, int));
strtoul            19 missing/strtol.c 	result = -strtoul(p, endptr, base);
strtoul            23 missing/strtol.c 	result = strtoul(p, endptr, base);
strtoul           500 pack.c         	    len = strtoul(p, (char**)&p, 10);
strtoul          1359 pack.c         	    len = strtoul(p, (char**)&p, 10);


struct_alloc

struct_alloc       18 struct.c       static VALUE struct_alloc _((VALUE));
struct_alloc      209 struct.c           rb_define_alloc_func(nstr, struct_alloc);


struct_entry

struct_entry      695 struct.c       static VALUE struct_entry _((VALUE, long));
struct_entry      726 struct.c           return rb_values_at(s, RSTRUCT(s)->len, argc, argv, struct_entry);


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 4884 eval.c         		    val = svalue_to_avalue(val);
svalue_to_avalue 9283 eval.c             a = svalue_to_avalue(args);


svalue_to_mrhs

svalue_to_mrhs   4836 eval.c         		    val = svalue_to_mrhs(val, block->var->nd_head);
svalue_to_mrhs   5150 eval.c         	massign(self, lhs, svalue_to_mrhs(val, lhs->nd_head), pcall);


swallow

swallow          1574 io.c           	    swallow(fptr, '\n');
swallow          1591 io.c           		swallow(fptr, '\n');


swap16

swap16             76 pack.c         #ifndef swap16
swap16             80 pack.c         #define swaps(x)	swap16(x)
swap16            219 pack.c         #define htov16(x) (endian()?swap16(x):(x))
swap16            221 pack.c         #define hton16(x) (endian()?(x):swap16(x))
swap16            245 pack.c         #define htov16(x) swap16(x)
swap16            276 pack.c         #define hton16(x) swap16(x)


swapd

swapd             205 pack.c         #define ntohd(x) (endian()?(x):swapd(x))
swapd             209 pack.c         #define htond(x) (endian()?(x):swapd(x))
swapd             213 pack.c         #define htovd(x) (endian()?swapd(x):(x))
swapd             217 pack.c         #define vtohd(x) (endian()?swapd(x):(x))
swapd             239 pack.c         #define htovd(x) swapd(x)
swapd             243 pack.c         #define vtohd(x) swapd(x)
swapd             262 pack.c         #define ntohd(x) swapd(x)
swapd             264 pack.c         #define htond(x) swapd(x)


swaps

swaps             166 pack.c             utmp[0] = swaps(utmp[1]);
swaps             167 pack.c             utmp[1] = swaps(utmp0);
swaps             202 pack.c         #define ntohs(x) (endian()?(x):swaps(x))
swaps             206 pack.c         #define htons(x) (endian()?(x):swaps(x))
swaps             210 pack.c         #define htovs(x) (endian()?swaps(x):(x))
swaps             214 pack.c         #define vtohs(x) (endian()?swaps(x):(x))
swaps             236 pack.c         #define htovs(x) swaps(x)
swaps             240 pack.c         #define vtohs(x) swaps(x)
swaps             257 pack.c         #define ntohs(x) swaps(x)
swaps             259 pack.c         #define htons(x) swaps(x)


switch_mime_getc

switch_mime_getc 3598 ext/nkf/nkf-utf8/nkf.c     switch_mime_getc();
switch_mime_getc 3669 ext/nkf/nkf-utf8/nkf.c     switch_mime_getc();
switch_mime_getc 4165 ext/nkf/nkf-utf8/nkf.c 	    switch_mime_getc();
switch_mime_getc 4178 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   1612 ext/syck/rubyext.c     node = syck_alloc_map();
syck_alloc_map   1793 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   1513 ext/syck/rubyext.c     node = syck_alloc_seq();
syck_alloc_seq   1805 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   1426 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        2041 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    1854 ext/syck/rubyext.c                 syck_emit_end( e );
syck_emit_end    1866 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   1851 ext/syck/rubyext.c                     syck_emit_item( e, syck_map_read( n, map_key, i ) );
syck_emit_item   1852 ext/syck/rubyext.c                     syck_emit_item( e, syck_map_read( n, map_value, i ) );
syck_emit_item   1864 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    1848 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 1872 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    1861 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 2042 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 1954 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 2034 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 2350 ext/syck/rubyext.c     rb_define_method( cEmitter, "initialize", syck_emitter_reset, -1 );
syck_emitter_reset 2351 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 1942 ext/syck/rubyext.c VALUE syck_emitter_s_alloc _((VALUE));
syck_emitter_s_alloc 2349 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 1936 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   1427 ext/syck/rubyext.c     VALUE obj = Data_Wrap_Struct( class, syck_node_mark, syck_free_node, node );
syck_free_node   1514 ext/syck/rubyext.c     obj = Data_Wrap_Struct( class, syck_node_mark, syck_free_node, node );
syck_free_node   1613 ext/syck/rubyext.c     obj = Data_Wrap_Struct( class, syck_node_mark, syck_free_node, node );
syck_free_node   1786 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     1642 ext/syck/rubyext.c             syck_map_add( node, key, rb_hash_aref(hsh, key) );
syck_map_add     1678 ext/syck/rubyext.c             syck_map_add( node, key, rb_hash_aref(hsh, key) );
syck_map_add     1701 ext/syck/rubyext.c     syck_map_add( node, key, val );
syck_map_add     1796 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   2283 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   1312 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   1673 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    1314 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    1409 ext/syck/rubyext.c                 rb_gc_mark( syck_map_read( n, map_key, i ) );
syck_map_read    1410 ext/syck/rubyext.c                 rb_gc_mark( syck_map_read( n, map_value, i ) );
syck_map_read    1796 ext/syck/rubyext.c                     syck_map_add( n, rb_funcall( syck_map_read( orig_n, map_key, i ), s_transform, 0 ),
syck_map_read    1797 ext/syck/rubyext.c                                      rb_funcall( syck_map_read( orig_n, map_value, i ), s_transform, 0 ) );
syck_map_read    1851 ext/syck/rubyext.c                     syck_emit_item( e, syck_map_read( n, map_key, i ) );
syck_map_read    1852 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 1225 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 1948 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    1814 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   1415 ext/syck/rubyext.c     if ( n->shortcut ) syck_node_mark( n->shortcut ); /* caution: maybe cyclic */
syck_node_mark   1427 ext/syck/rubyext.c     VALUE obj = Data_Wrap_Struct( class, syck_node_mark, syck_free_node, node );
syck_node_mark   1514 ext/syck/rubyext.c     obj = Data_Wrap_Struct( class, syck_node_mark, syck_free_node, node );
syck_node_mark   1613 ext/syck/rubyext.c     obj = Data_Wrap_Struct( class, syck_node_mark, syck_free_node, node );
syck_node_mark   1786 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 2264 ext/syck/rubyext.c     rb_define_method( cNode, "transform", syck_node_transform, 0);


syck_out_mark

syck_out_mark    2096 ext/syck/rubyext.c     syck_out_mark( rb_ivar_get( self, s_emitter ), map );
syck_out_mark    2115 ext/syck/rubyext.c     syck_out_mark( rb_ivar_get( self, s_emitter ), seq );
syck_out_mark    2136 ext/syck/rubyext.c     syck_out_mark( rb_ivar_get( self, s_emitter ), scalar );


syck_output_handler

syck_output_handler 1955 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 2245 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 2271 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     1552 ext/syck/rubyext.c             syck_seq_add( node, rb_ary_entry(val, i) );
syck_seq_add     1574 ext/syck/rubyext.c     syck_seq_add( node, val );
syck_seq_add     1808 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   2277 ext/syck/rubyext.c     rb_define_alloc_func( cSeq, syck_seq_alloc );


syck_seq_count

syck_seq_count   1297 ext/syck/rubyext.c             v = rb_ary_new2( syck_seq_count( n ) );
syck_seq_count   1298 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   1549 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    1300 ext/syck/rubyext.c                 rb_ary_store( v, i, syck_seq_read( n, i ) );
syck_seq_read    1402 ext/syck/rubyext.c                 rb_gc_mark( syck_seq_read( n, i ) );
syck_seq_read    1808 ext/syck/rubyext.c                     syck_seq_add( n, rb_funcall( syck_seq_read( orig_n, i ), s_transform, 0 ) );
syck_seq_read    1864 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     1496 ext/syck/rubyext.c     node->data.str->ptr = syck_strndup( RSTRING(val)->ptr, RSTRING(val)->len );
syck_strndup     1768 ext/syck/rubyext.c         node->type_id = syck_strndup( RSTRING(type_id)->ptr, RSTRING(type_id)->len );
syck_strndup     1820 ext/syck/rubyext.c         n->type_id = syck_strndup( orig_n->type_id, strlen( orig_n->type_id ) );
syck_strndup     1824 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 1204 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 2312 ext/syck/rubyext.c     rb_define_method( cYObject, "initialize", syck_yobject_initialize, 2);
syck_yobject_initialize 2313 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_i

sym_to_i         1152 object.c           return sym_to_i(sym);
sym_to_i         2689 object.c           rb_define_method(rb_cSymbol, "to_i", sym_to_i, 0);


sym_to_s

sym_to_s         2692 object.c           rb_define_method(rb_cSymbol, "to_s", sym_to_s, 0);
sym_to_s         2693 object.c           rb_define_method(rb_cSymbol, "id2name", sym_to_s, 0);


symbols_i

symbols_i        10134 parse.c            st_foreach(sym_tbl, symbols_i, ary);
symbols_i        6136 parse.y            st_foreach(sym_tbl, symbols_i, ary);


sys_fail2

sys_fail2        2091 file.c         	sys_fail2(from, to);
sys_fail2        2121 file.c         	sys_fail2(from, to);
sys_fail2        2242 file.c         	sys_fail2(from, to);


sys_nerr

sys_nerr            3 missing/strerror.c extern int sys_nerr;
sys_nerr           12 missing/strerror.c     if (error <= sys_nerr && error > 0) {
sys_nerr         1687 win32/win32.c      extern int sys_nerr;
sys_nerr         1701 win32/win32.c      if (e < 0 || e > sys_nerr) {


sys_warning

sys_warning       947 dir.c          	    sys_warning(path);
sys_warning       974 dir.c          		    sys_warning(dir);
sys_warning       990 dir.c          		    sys_warning(dir);
sys_warning      1018 dir.c          			    sys_warning(buf);
sys_warning      1065 dir.c          			    sys_warning(link->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     3035 win32/win32.c  	EnterCriticalSection(system_state());
system_state     3057 win32/win32.c  	LeaveCriticalSection(system_state());


tAMPER

tAMPER           7657 parse.c        	    c = tAMPER;
tAMPER           7660 parse.c        	    c = tAMPER;
tAMPER            310 parse.y        %token tAMPER		/* & */
tAMPER           1415 parse.y        block_arg	: tAMPER arg_value
tAMPER           2351 parse.y        		| tAMPER
tAMPER           3659 parse.y        	    c = tAMPER;
tAMPER           3662 parse.y        	    c = tAMPER;


tANDOP

tANDOP           3887 parse.c        			    else if (yyvsp[-1].id == tANDOP) {
tANDOP           3915 parse.c        			else if (yyvsp[-1].id == tANDOP) {
tANDOP           3929 parse.c        			else if (yyvsp[-1].id == tANDOP) {
tANDOP           3943 parse.c        			else if (yyvsp[-1].id == tANDOP) {
tANDOP           3957 parse.c        			else if (yyvsp[-1].id == tANDOP) {
tANDOP           4503 parse.c        			    else if (yyvsp[-1].id == tANDOP) {
tANDOP           4531 parse.c        			else if (yyvsp[-1].id == tANDOP) {
tANDOP           4545 parse.c        			else if (yyvsp[-1].id == tANDOP) {
tANDOP           4559 parse.c        			else if (yyvsp[-1].id == tANDOP) {
tANDOP           4573 parse.c        			else if (yyvsp[-1].id == tANDOP) {
tANDOP           7642 parse.c        		yylval.id = tANDOP;
tANDOP           7647 parse.c        	    return tANDOP;
tANDOP            294 parse.y        %token tANDOP tOROP	/* && and || */
tANDOP            330 parse.y        %left  tANDOP
tANDOP            526 parse.y        			    else if ($2 == tANDOP) {
tANDOP            552 parse.y        			else if ($5 == tANDOP) {
tANDOP            564 parse.y        			else if ($4 == tANDOP) {
tANDOP            576 parse.y        			else if ($4 == tANDOP) {
tANDOP            588 parse.y        			else if ($4 == tANDOP) {
tANDOP            990 parse.y        			    else if ($2 == tANDOP) {
tANDOP           1016 parse.y        			else if ($5 == tANDOP) {
tANDOP           1028 parse.y        			else if ($4 == tANDOP) {
tANDOP           1040 parse.y        			else if ($4 == tANDOP) {
tANDOP           1052 parse.y        			else if ($4 == tANDOP) {
tANDOP           1212 parse.y        		| arg tANDOP arg
tANDOP           3644 parse.y        		yylval.id = tANDOP;
tANDOP           3649 parse.y        	    return tANDOP;


tAREF

tAREF            4468 parse.c        { yyval.id = tAREF; }
tAREF            5163 parse.c        			    yyval.node = NEW_FCALL(tAREF, yyvsp[-1].node);
tAREF            5165 parse.c        			    yyval.node = NEW_CALL(yyvsp[-3].node, tAREF, yyvsp[-1].node);
tAREF            8117 parse.c        		return tAREF;
tAREF            9862 parse.c            {tAREF,	"[]"},
tAREF             297 parse.y        %token tAREF tASET	/* [] and []= */
tAREF             956 parse.y        		| tAREF		{ $$ = tAREF; }
tAREF            1497 parse.y        			    $$ = NEW_FCALL(tAREF, $3);
tAREF            1499 parse.y        			    $$ = NEW_CALL($1, tAREF, $3);
tAREF            4119 parse.y        		return tAREF;
tAREF            5864 parse.y            {tAREF,	"[]"},


tASET

tASET            4472 parse.c        { yyval.id = tASET; }
tASET            8114 parse.c        		    return tASET;
tASET            8927 parse.c            return NEW_ATTRASGN(recv, tASET, idx);
tASET            9863 parse.c            {tASET,	"[]="},
tASET             297 parse.y        %token tAREF tASET	/* [] and []= */
tASET             957 parse.y        		| tASET		{ $$ = tASET; }
tASET            4116 parse.y        		    return tASET;
tASET            4929 parse.y            return NEW_ATTRASGN(recv, tASET, idx);
tASET            5865 parse.y            {tASET,	"[]="},


tASSOC

tASSOC           7495 parse.c        	    return tASSOC;
tASSOC            302 parse.y        %token tASSOC		/* => */
tASSOC           1912 parse.y        exc_var		: tASSOC lhs
tASSOC           2427 parse.y        assoc		: arg_value tASSOC arg_value
tASSOC           3497 parse.y        	    return tASSOC;


tBACK_REF

tBACK_REF        8305 parse.c        	    return tBACK_REF;
tBACK_REF         265 parse.y        %token <node> tNTH_REF tBACK_REF
tBACK_REF         420 parse.y        		| kALIAS tGVAR tBACK_REF
tBACK_REF        2210 parse.y        		| tBACK_REF
tBACK_REF        4307 parse.y        	    return tBACK_REF;


tCMP

tCMP             4388 parse.c        { yyval.id = tCMP; }
tCMP             4717 parse.c        			yyval.node = call_op(yyvsp[-2].node, tCMP, 1, yyvsp[0].node);
tCMP             7519 parse.c        		return tCMP;
tCMP             9105 parse.c        	  case tCMP:
tCMP             9846 parse.c            {tCMP,	"<=>"},
tCMP              288 parse.y        %token tCMP  		/* <=> */
tCMP              331 parse.y        %nonassoc  tCMP tEQ tEQQ tNEQ tMATCH tNMATCH
tCMP              936 parse.y        		| tCMP		{ $$ = tCMP; }
tCMP             1156 parse.y        		| arg tCMP arg
tCMP             1158 parse.y        			$$ = call_op($1, tCMP, 1, $3);
tCMP             3521 parse.y        		return tCMP;
tCMP             5107 parse.y        	  case tCMP:
tCMP             5848 parse.y            {tCMP,	"<=>"},


tCOLON2

tCOLON2          8008 parse.c        	    return tCOLON2;
tCOLON2          9866 parse.c            {tCOLON2,	"::"},
tCOLON2           299 parse.y        %token tCOLON2		/* :: */
tCOLON2           582 parse.y        		| primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_call
tCOLON2           664 parse.y        		| block_call tCOLON2 operation2 command_args
tCOLON2           719 parse.y        		| primary_value tCOLON2 operation2 command_args	%prec tLOWEST
tCOLON2           724 parse.y        		| primary_value tCOLON2 operation2 command_args cmd_brace_block
tCOLON2           817 parse.y        		| primary_value tCOLON2 tIDENTIFIER
tCOLON2           825 parse.y        		| primary_value tCOLON2 tCONSTANT
tCOLON2           856 parse.y        		| primary_value tCOLON2 tIDENTIFIER
tCOLON2           864 parse.y        		| primary_value tCOLON2 tCONSTANT
tCOLON2           898 parse.y        		| primary_value tCOLON2 cname
tCOLON2          1046 parse.y        		| primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg
tCOLON2          1058 parse.y        		| primary_value tCOLON2 tCONSTANT tOP_ASGN arg
tCOLON2          1486 parse.y        		| primary_value tCOLON2 tCONSTANT
tCOLON2          1807 parse.y        		| block_call tCOLON2 operation2 opt_paren_args
tCOLON2          1823 parse.y        		| primary_value tCOLON2 operation2 paren_args
tCOLON2          1828 parse.y        		| primary_value tCOLON2 operation3
tCOLON2          2450 parse.y        		| tCOLON2
tCOLON2          4010 parse.y        	    return tCOLON2;
tCOLON2          5868 parse.y            {tCOLON2,	"::"},


tCOLON3

tCOLON3          8005 parse.c        		return tCOLON3;
tCOLON3           300 parse.y        %token tCOLON3		/* :: at EXPR_BEG */
tCOLON3           831 parse.y        		| tCOLON3 tCONSTANT
tCOLON3           870 parse.y        		| tCOLON3 tCONSTANT
tCOLON3           890 parse.y        cpath		: tCOLON3 cname
tCOLON3          1063 parse.y        		| tCOLON3 tCONSTANT tOP_ASGN arg
tCOLON3          1490 parse.y        		| tCOLON3 tCONSTANT
tCOLON3          4007 parse.y        		return tCOLON3;


tCONSTANT

tCONSTANT        8426 parse.c        		    result = tCONSTANT;
tCONSTANT         263 parse.y        %token <id>   tIDENTIFIER tFID tGVAR tIVAR tCONSTANT tCVAR
tCONSTANT         570 parse.y        		| primary_value '.' tCONSTANT tOP_ASGN command_call
tCONSTANT         821 parse.y        		| primary_value '.' tCONSTANT
tCONSTANT         825 parse.y        		| primary_value tCOLON2 tCONSTANT
tCONSTANT         831 parse.y        		| tCOLON3 tCONSTANT
tCONSTANT         860 parse.y        		| primary_value '.' tCONSTANT
tCONSTANT         864 parse.y        		| primary_value tCOLON2 tCONSTANT
tCONSTANT         870 parse.y        		| tCOLON3 tCONSTANT
tCONSTANT         887 parse.y        		| tCONSTANT
tCONSTANT         905 parse.y        		| tCONSTANT
tCONSTANT        1034 parse.y        		| primary_value '.' tCONSTANT tOP_ASGN arg
tCONSTANT        1058 parse.y        		| primary_value tCOLON2 tCONSTANT tOP_ASGN arg
tCONSTANT        1063 parse.y        		| tCOLON3 tCONSTANT tOP_ASGN arg
tCONSTANT        1486 parse.y        		| primary_value tCOLON2 tCONSTANT
tCONSTANT        1490 parse.y        		| tCOLON3 tCONSTANT
tCONSTANT        2187 parse.y        		| tCONSTANT
tCONSTANT        2277 parse.y        f_norm_arg	: tCONSTANT
tCONSTANT        2434 parse.y        		| tCONSTANT
tCONSTANT        2439 parse.y        		| tCONSTANT
tCONSTANT        4428 parse.y        		    result = tCONSTANT;


tCVAR

tCVAR            8404 parse.c        		result = tCVAR;
tCVAR             263 parse.y        %token <id>   tIDENTIFIER tFID tGVAR tIVAR tCONSTANT tCVAR
tCVAR            2122 parse.y        		| tCVAR {$$ = NEW_CVAR($1);}
tCVAR            2136 parse.y        		| tCVAR
tCVAR            2188 parse.y        		| tCVAR
tCVAR            2289 parse.y                        | tCVAR
tCVAR            4406 parse.y        		result = tCVAR;


tDOT2

tDOT2            7764 parse.c        	    return tDOT2;
tDOT2            9829 parse.c            {tDOT2,	".."},
tDOT2             296 parse.y        %token tDOT2 tDOT3	/* .. and ... */
tDOT2             328 parse.y        %nonassoc tDOT2 tDOT3
tDOT2            1073 parse.y        		| arg tDOT2 arg
tDOT2            3766 parse.y        	    return tDOT2;
tDOT2            5831 parse.y            {tDOT2,	".."},


tDOT3

tDOT3            7761 parse.c        		return tDOT3;
tDOT3            9830 parse.c            {tDOT3,	"..."},
tDOT3             296 parse.y        %token tDOT2 tDOT3	/* .. and ... */
tDOT3             328 parse.y        %nonassoc tDOT2 tDOT3
tDOT3            1086 parse.y        		| arg tDOT3 arg
tDOT3            3763 parse.y        		return tDOT3;
tDOT3            5832 parse.y            {tDOT3,	"..."},


tEQ

tEQ              4392 parse.c        { yyval.id = tEQ; }
tEQ              4747 parse.c        			yyval.node = call_op(yyvsp[-2].node, tEQ, 1, yyvsp[0].node);
tEQ              4759 parse.c        			yyval.node = NEW_NOT(call_op(yyvsp[-2].node, tEQ, 1, yyvsp[0].node));
tEQ              7489 parse.c        	    return tEQ;
tEQ              9110 parse.c        	  case tEQ:
tEQ              9297 parse.c        	return call_op(node,tEQ,1,NEW_GVAR(rb_intern("$.")));
tEQ              9851 parse.c            {tEQ,	"=="},
tEQ               289 parse.y        %token tEQ  		/* == */
tEQ               331 parse.y        %nonassoc  tCMP tEQ tEQQ tNEQ tMATCH tNMATCH
tEQ               937 parse.y        		| tEQ		{ $$ = tEQ; }
tEQ              1176 parse.y        		| arg tEQ arg
tEQ              1178 parse.y        			$$ = call_op($1, tEQ, 1, $3);
tEQ              1186 parse.y        			$$ = NEW_NOT(call_op($1, tEQ, 1, $3));
tEQ              3491 parse.y        	    return tEQ;
tEQ              5112 parse.y        	  case tEQ:
tEQ              5299 parse.y        	return call_op(node,tEQ,1,NEW_GVAR(rb_intern("$.")));
tEQ              5853 parse.y            {tEQ,	"=="},


tEQQ

tEQQ             4396 parse.c        { yyval.id = tEQQ; }
tEQQ             4753 parse.c        			yyval.node = call_op(yyvsp[-2].node, tEQQ, 1, yyvsp[0].node);
tEQQ             7486 parse.c        		return tEQQ;
tEQQ             9852 parse.c            {tEQQ,	"==="},
tEQQ              290 parse.y        %token tEQQ  		/* === */
tEQQ              331 parse.y        %nonassoc  tCMP tEQ tEQQ tNEQ tMATCH tNMATCH
tEQQ              938 parse.y        		| tEQQ		{ $$ = tEQQ; }
tEQQ             1180 parse.y        		| arg tEQQ arg
tEQQ             1182 parse.y        			$$ = call_op($1, tEQQ, 1, $3);
tEQQ             3488 parse.y        		return tEQQ;
tEQQ             5854 parse.y            {tEQQ,	"==="},


tFID

tFID             8411 parse.c        		result = tFID;
tFID              263 parse.y        %token <id>   tIDENTIFIER tFID tGVAR tIVAR tCONSTANT tCVAR
tFID              906 parse.y        		| tFID
tFID             1460 parse.y        		| tFID
tFID             2435 parse.y        		| tFID
tFID             2440 parse.y        		| tFID
tFID             2445 parse.y        		| tFID
tFID             4413 parse.y        		result = tFID;


tFLOAT

tFLOAT           7985 parse.c        		return tFLOAT;
tFLOAT            264 parse.y        %token <node> tINTEGER tFLOAT tSTRING_CONTENT
tFLOAT           1127 parse.y        		| tUMINUS_NUM tFLOAT tPOW arg
tFLOAT           2173 parse.y        		| tFLOAT
tFLOAT           2178 parse.y        		| tUMINUS_NUM tFLOAT	       %prec tLOWEST
tFLOAT           3987 parse.y        		return tFLOAT;


tGEQ

tGEQ             4408 parse.c        { yyval.id = tGEQ; }
tGEQ             4729 parse.c        			yyval.node = call_op(yyvsp[-2].node, tGEQ, 1, yyvsp[0].node);
tGEQ             7544 parse.c        	    return tGEQ;
tGEQ             9107 parse.c        	  case tGEQ:
tGEQ             9848 parse.c            {tGEQ,	">="},
tGEQ              292 parse.y        %token tGEQ  		/* >= */
tGEQ              332 parse.y        %left  '>' tGEQ '<' tLEQ
tGEQ              941 parse.y        		| tGEQ		{ $$ = tGEQ; }
tGEQ             1164 parse.y        		| arg tGEQ arg
tGEQ             1166 parse.y        			$$ = call_op($1, tGEQ, 1, $3);
tGEQ             3546 parse.y        	    return tGEQ;
tGEQ             5109 parse.y        	  case tGEQ:
tGEQ             5850 parse.y            {tGEQ,	">="},


tGVAR

tGVAR            8277 parse.c        	    return tGVAR;
tGVAR            8293 parse.c        	    return tGVAR;
tGVAR            8399 parse.c        	    result = tGVAR;
tGVAR             263 parse.y        %token <id>   tIDENTIFIER tFID tGVAR tIVAR tCONSTANT tCVAR
tGVAR             416 parse.y        		| kALIAS tGVAR tGVAR
tGVAR             420 parse.y        		| kALIAS tGVAR tBACK_REF
tGVAR             427 parse.y        		| kALIAS tGVAR tNTH_REF
tGVAR            2120 parse.y        string_dvar	: tGVAR {$$ = NEW_GVAR($1);}
tGVAR            2135 parse.y        		| tGVAR
tGVAR            2186 parse.y        		| tGVAR
tGVAR            2285 parse.y                        | tGVAR
tGVAR            4279 parse.y        	    return tGVAR;
tGVAR            4295 parse.y        	    return tGVAR;
tGVAR            4401 parse.y        	    result = tGVAR;


tIDENTIFIER

tIDENTIFIER      8417 parse.c        			result = tIDENTIFIER;
tIDENTIFIER      8429 parse.c        		    result = tIDENTIFIER;
tIDENTIFIER       263 parse.y        %token <id>   tIDENTIFIER tFID tGVAR tIVAR tCONSTANT tCVAR
tIDENTIFIER       558 parse.y        		| primary_value '.' tIDENTIFIER tOP_ASGN command_call
tIDENTIFIER       582 parse.y        		| primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_call
tIDENTIFIER       813 parse.y        		| primary_value '.' tIDENTIFIER
tIDENTIFIER       817 parse.y        		| primary_value tCOLON2 tIDENTIFIER
tIDENTIFIER       852 parse.y        		| primary_value '.' tIDENTIFIER
tIDENTIFIER       856 parse.y        		| primary_value tCOLON2 tIDENTIFIER
tIDENTIFIER       883 parse.y        cname		: tIDENTIFIER
tIDENTIFIER       904 parse.y        fname		: tIDENTIFIER
tIDENTIFIER      1022 parse.y        		| primary_value '.' tIDENTIFIER tOP_ASGN arg
tIDENTIFIER      1046 parse.y        		| primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg
tIDENTIFIER      2184 parse.y        variable	: tIDENTIFIER
tIDENTIFIER      2293 parse.y        		| tIDENTIFIER
tIDENTIFIER      2311 parse.y        f_opt		: tIDENTIFIER '=' arg_value
tIDENTIFIER      2336 parse.y        f_rest_arg	: restarg_mark tIDENTIFIER
tIDENTIFIER      2354 parse.y        f_block_arg	: blkarg_mark tIDENTIFIER
tIDENTIFIER      2433 parse.y        operation	: tIDENTIFIER
tIDENTIFIER      2438 parse.y        operation2	: tIDENTIFIER
tIDENTIFIER      2444 parse.y        operation3	: tIDENTIFIER
tIDENTIFIER      4419 parse.y        			result = tIDENTIFIER;
tIDENTIFIER      4431 parse.y        		    result = tIDENTIFIER;


tINTEGER

tINTEGER         7636 parse.c        	return tINTEGER;
tINTEGER         7811 parse.c        		    return tINTEGER;
tINTEGER         7835 parse.c        		    return tINTEGER;
tINTEGER         7859 parse.c        		    return tINTEGER;
tINTEGER         7890 parse.c        			return tINTEGER;
tINTEGER         7906 parse.c        		    return tINTEGER;
tINTEGER         7988 parse.c        	    return tINTEGER;
tINTEGER          264 parse.y        %token <node> tINTEGER tFLOAT tSTRING_CONTENT
tINTEGER         1123 parse.y        		| tUMINUS_NUM tINTEGER tPOW arg
tINTEGER         2172 parse.y        numeric		: tINTEGER
tINTEGER         2174 parse.y        		| tUMINUS_NUM tINTEGER	       %prec tLOWEST
tINTEGER         3638 parse.y        	return tINTEGER;
tINTEGER         3813 parse.y        		    return tINTEGER;
tINTEGER         3837 parse.y        		    return tINTEGER;
tINTEGER         3861 parse.y        		    return tINTEGER;
tINTEGER         3892 parse.y        			return tINTEGER;
tINTEGER         3908 parse.y        		    return tINTEGER;
tINTEGER         3990 parse.y        	    return tINTEGER;


tIVAR

tIVAR            8406 parse.c        		result = tIVAR;
tIVAR             263 parse.y        %token <id>   tIDENTIFIER tFID tGVAR tIVAR tCONSTANT tCVAR
tIVAR            2121 parse.y        		| tIVAR {$$ = NEW_IVAR($1);}
tIVAR            2134 parse.y        		| tIVAR
tIVAR            2185 parse.y        		| tIVAR
tIVAR            2281 parse.y                        | tIVAR
tIVAR            4408 parse.y        		result = tIVAR;


tLAST_TOKEN

tLAST_TOKEN       158 parse.c        #define is_notop_id(id) ((id)>tLAST_TOKEN)
tLAST_TOKEN      9881 parse.c        static ID last_id = tLAST_TOKEN;
tLAST_TOKEN      10035 parse.c        	    if (id > tLAST_TOKEN && !is_attrset_id(id)) {
tLAST_TOKEN      10070 parse.c            if (id < tLAST_TOKEN) {
tLAST_TOKEN        61 parse.y        #define is_notop_id(id) ((id)>tLAST_TOKEN)
tLAST_TOKEN       342 parse.y        %token tLAST_TOKEN
tLAST_TOKEN      5883 parse.y        static ID last_id = tLAST_TOKEN;
tLAST_TOKEN      6037 parse.y        	    if (id > tLAST_TOKEN && !is_attrset_id(id)) {
tLAST_TOKEN      6072 parse.y            if (id < tLAST_TOKEN) {


tLBRACE

tLBRACE          8139 parse.c        	    c = tLBRACE;      /* hash */
tLBRACE           307 parse.y        %token tLBRACE		/* { */
tLBRACE          1511 parse.y        		| tLBRACE assoc_list '}'
tLBRACE          4141 parse.y        	    c = tLBRACE;      /* hash */


tLBRACE_ARG

tLBRACE_ARG      8137 parse.c        	    c = tLBRACE_ARG;  /* block (expr) */
tLBRACE_ARG       308 parse.y        %token tLBRACE_ARG	/* { */
tLBRACE_ARG       319 parse.y        %nonassoc tLBRACE_ARG
tLBRACE_ARG       670 parse.y        cmd_brace_block	: tLBRACE_ARG
tLBRACE_ARG      4139 parse.y        	    c = tLBRACE_ARG;  /* block (expr) */


tLBRACK

tLBRACK          8123 parse.c        	    c = tLBRACK;
tLBRACK          8126 parse.c        	    c = tLBRACK;
tLBRACK           306 parse.y        %token tLBRACK		/* [ */
tLBRACK          1502 parse.y        		| tLBRACK aref_args ']'
tLBRACK          4125 parse.y        	    c = tLBRACK;
tLBRACK          4128 parse.y        	    c = tLBRACK;


tLEQ

tLEQ             4416 parse.c        { yyval.id = tLEQ; }
tLEQ             4741 parse.c        			yyval.node = call_op(yyvsp[-2].node, tLEQ, 1, yyvsp[0].node);
tLEQ             7522 parse.c        	    return tLEQ;
tLEQ             9109 parse.c        	  case tLEQ:
tLEQ             9850 parse.c            {tLEQ,	"<="},
tLEQ              293 parse.y        %token tLEQ  		/* <= */
tLEQ              332 parse.y        %left  '>' tGEQ '<' tLEQ
tLEQ              943 parse.y        		| tLEQ		{ $$ = tLEQ; }
tLEQ             1172 parse.y        		| arg tLEQ arg
tLEQ             1174 parse.y        			$$ = call_op($1, tLEQ, 1, $3);
tLEQ             3524 parse.y        	    return tLEQ;
tLEQ             5111 parse.y        	  case tLEQ:
tLEQ             5852 parse.y            {tLEQ,	"<="},


tLOWEST

tLOWEST           318 parse.y        %nonassoc tLOWEST
tLOWEST           685 parse.y        command		: operation command_args       %prec tLOWEST
tLOWEST           702 parse.y        		| primary_value '.' operation2 command_args	%prec tLOWEST
tLOWEST           719 parse.y        		| primary_value tCOLON2 operation2 command_args	%prec tLOWEST
tLOWEST          2174 parse.y        		| tUMINUS_NUM tINTEGER	       %prec tLOWEST
tLOWEST          2178 parse.y        		| tUMINUS_NUM tFLOAT	       %prec tLOWEST


tLPAREN

tLPAREN          8093 parse.c        	    c = tLPAREN;
tLPAREN           303 parse.y        %token tLPAREN		/* ( */
tLPAREN           749 parse.y        		| tLPAREN mlhs_entry ')'
tLPAREN           756 parse.y        		| tLPAREN mlhs_entry ')'
tLPAREN           789 parse.y        		| tLPAREN mlhs_entry ')'
tLPAREN          1482 parse.y        		| tLPAREN compstmt ')'
tLPAREN          4095 parse.y        	    c = tLPAREN;


tLPAREN_ARG

tLPAREN_ARG      8097 parse.c        		c = tLPAREN_ARG;
tLPAREN_ARG       304 parse.y        %token tLPAREN_ARG	/* ( */
tLPAREN_ARG      1403 parse.y        		| tLPAREN_ARG  {lex_state = EXPR_ENDARG;} ')'
tLPAREN_ARG      1408 parse.y        		| tLPAREN_ARG call_args2 {lex_state = EXPR_ENDARG;} ')'
tLPAREN_ARG      1477 parse.y        		| tLPAREN_ARG expr {lex_state = EXPR_ENDARG;} opt_nl ')'
tLPAREN_ARG      4099 parse.y        		c = tLPAREN_ARG;


tLSHFT

tLSHFT           4420 parse.c        { yyval.id = tLSHFT; }
tLSHFT           4789 parse.c        			yyval.node = call_op(yyvsp[-2].node, tLSHFT, 1, yyvsp[0].node);
tLSHFT           7526 parse.c        		yylval.id = tLSHFT;
tLSHFT           7531 parse.c        	    return tLSHFT;
tLSHFT           9864 parse.c            {tLSHFT,	"<<"},
tLSHFT            298 parse.y        %token tLSHFT tRSHFT	/* << and >> */
tLSHFT            335 parse.y        %left  tLSHFT tRSHFT
tLSHFT            944 parse.y        		| tLSHFT	{ $$ = tLSHFT; }
tLSHFT           1204 parse.y        		| arg tLSHFT arg
tLSHFT           1206 parse.y        			$$ = call_op($1, tLSHFT, 1, $3);
tLSHFT           1636 parse.y        		| kCLASS tLSHFT expr
tLSHFT           3528 parse.y        		yylval.id = tLSHFT;
tLSHFT           3533 parse.y        	    return tLSHFT;
tLSHFT           5866 parse.y            {tLSHFT,	"<<"},


tMATCH

tMATCH           4400 parse.c        { yyval.id = tMATCH; }
tMATCH           7492 parse.c        	    return tMATCH;
tMATCH           8807 parse.c            return NEW_CALL(node1, tMATCH, NEW_LIST(node2));
tMATCH           9854 parse.c            {tMATCH,	"=~"},
tMATCH            295 parse.y        %token tMATCH tNMATCH	/* =~ and !~ */
tMATCH            331 parse.y        %nonassoc  tCMP tEQ tEQQ tNEQ tMATCH tNMATCH
tMATCH            939 parse.y        		| tMATCH	{ $$ = tMATCH; }
tMATCH           1188 parse.y        		| arg tMATCH arg
tMATCH           3494 parse.y        	    return tMATCH;
tMATCH           4809 parse.y            return NEW_CALL(node1, tMATCH, NEW_LIST(node2));
tMATCH           5856 parse.y            {tMATCH,	"=~"},


tNEQ

tNEQ             7448 parse.c        	    return tNEQ;
tNEQ             9111 parse.c        	  case tNEQ:
tNEQ             9853 parse.c            {tNEQ,	"!="},
tNEQ              291 parse.y        %token tNEQ  		/* != */
tNEQ              331 parse.y        %nonassoc  tCMP tEQ tEQQ tNEQ tMATCH tNMATCH
tNEQ             1184 parse.y        		| arg tNEQ arg
tNEQ             3450 parse.y        	    return tNEQ;
tNEQ             5113 parse.y        	  case tNEQ:
tNEQ             5855 parse.y            {tNEQ,	"!="},


tNMATCH

tNMATCH          7451 parse.c        	    return tNMATCH;
tNMATCH          9855 parse.c            {tNMATCH,	"!~"},
tNMATCH           295 parse.y        %token tMATCH tNMATCH	/* =~ and !~ */
tNMATCH           331 parse.y        %nonassoc  tCMP tEQ tEQQ tNEQ tMATCH tNMATCH
tNMATCH          1192 parse.y        		| arg tNMATCH arg
tNMATCH          3453 parse.y        	    return tNMATCH;
tNMATCH          5857 parse.y            {tNMATCH,	"!~"},


tNTH_REF

tNTH_REF         8319 parse.c        	    return tNTH_REF;
tNTH_REF          265 parse.y        %token <node> tNTH_REF tBACK_REF
tNTH_REF          427 parse.y        		| kALIAS tGVAR tNTH_REF
tNTH_REF         2209 parse.y        backref		: tNTH_REF
tNTH_REF         4321 parse.y        	    return tNTH_REF;


tOP_ASGN

tOP_ASGN         7414 parse.c        		return tOP_ASGN;
tOP_ASGN         7423 parse.c        		return tOP_ASGN;
tOP_ASGN         7528 parse.c        		return tOP_ASGN;
tOP_ASGN         7550 parse.c        		return tOP_ASGN;
tOP_ASGN         7644 parse.c        		return tOP_ASGN;
tOP_ASGN         7652 parse.c        	    return tOP_ASGN;
tOP_ASGN         7679 parse.c        		return tOP_ASGN;
tOP_ASGN         7687 parse.c        	    return tOP_ASGN;
tOP_ASGN         7711 parse.c        	    return tOP_ASGN;
tOP_ASGN         7741 parse.c        	    return tOP_ASGN;
tOP_ASGN         8037 parse.c        	    return tOP_ASGN;
tOP_ASGN         8059 parse.c        	    return tOP_ASGN;
tOP_ASGN         8225 parse.c        	    return tOP_ASGN;
tOP_ASGN          301 parse.y        %token <id> tOP_ASGN	/* +=, -=  etc. */
tOP_ASGN          325 parse.y        %right '=' tOP_ASGN
tOP_ASGN          514 parse.y        		| var_lhs tOP_ASGN command_call
tOP_ASGN          539 parse.y        		| primary_value '[' aref_args ']' tOP_ASGN command_call
tOP_ASGN          558 parse.y        		| primary_value '.' tIDENTIFIER tOP_ASGN command_call
tOP_ASGN          570 parse.y        		| primary_value '.' tCONSTANT tOP_ASGN command_call
tOP_ASGN          582 parse.y        		| primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_call
tOP_ASGN          594 parse.y        		| backref tOP_ASGN command_call
tOP_ASGN          978 parse.y        		| var_lhs tOP_ASGN arg
tOP_ASGN         1003 parse.y        		| primary_value '[' aref_args ']' tOP_ASGN arg
tOP_ASGN         1022 parse.y        		| primary_value '.' tIDENTIFIER tOP_ASGN arg
tOP_ASGN         1034 parse.y        		| primary_value '.' tCONSTANT tOP_ASGN arg
tOP_ASGN         1046 parse.y        		| primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg
tOP_ASGN         1058 parse.y        		| primary_value tCOLON2 tCONSTANT tOP_ASGN arg
tOP_ASGN         1063 parse.y        		| tCOLON3 tCONSTANT tOP_ASGN arg
tOP_ASGN         1068 parse.y        		| backref tOP_ASGN arg
tOP_ASGN         3416 parse.y        		return tOP_ASGN;
tOP_ASGN         3425 parse.y        		return tOP_ASGN;
tOP_ASGN         3530 parse.y        		return tOP_ASGN;
tOP_ASGN         3552 parse.y        		return tOP_ASGN;
tOP_ASGN         3646 parse.y        		return tOP_ASGN;
tOP_ASGN         3654 parse.y        	    return tOP_ASGN;
tOP_ASGN         3681 parse.y        		return tOP_ASGN;
tOP_ASGN         3689 parse.y        	    return tOP_ASGN;
tOP_ASGN         3713 parse.y        	    return tOP_ASGN;
tOP_ASGN         3743 parse.y        	    return tOP_ASGN;
tOP_ASGN         4039 parse.y        	    return tOP_ASGN;
tOP_ASGN         4061 parse.y        	    return tOP_ASGN;
tOP_ASGN         4227 parse.y        	    return tOP_ASGN;


tOROP

tOROP            3880 parse.c        			    if (yyvsp[-1].id == tOROP) {
tOROP            3912 parse.c        			if (yyvsp[-1].id == tOROP) {
tOROP            3926 parse.c        			if (yyvsp[-1].id == tOROP) {
tOROP            3940 parse.c        			if (yyvsp[-1].id == tOROP) {
tOROP            3954 parse.c        			if (yyvsp[-1].id == tOROP) {
tOROP            4496 parse.c        			    if (yyvsp[-1].id == tOROP) {
tOROP            4528 parse.c        			if (yyvsp[-1].id == tOROP) {
tOROP            4542 parse.c        			if (yyvsp[-1].id == tOROP) {
tOROP            4556 parse.c        			if (yyvsp[-1].id == tOROP) {
tOROP            4570 parse.c        			if (yyvsp[-1].id == tOROP) {
tOROP            7677 parse.c        		yylval.id = tOROP;
tOROP            7682 parse.c        	    return tOROP;
tOROP             294 parse.y        %token tANDOP tOROP	/* && and || */
tOROP             329 parse.y        %left  tOROP
tOROP             519 parse.y        			    if ($2 == tOROP) {
tOROP             549 parse.y        			if ($5 == tOROP) {
tOROP             561 parse.y        			if ($4 == tOROP) {
tOROP             573 parse.y        			if ($4 == tOROP) {
tOROP             585 parse.y        			if ($4 == tOROP) {
tOROP             983 parse.y        			    if ($2 == tOROP) {
tOROP            1013 parse.y        			if ($5 == tOROP) {
tOROP            1025 parse.y        			if ($4 == tOROP) {
tOROP            1037 parse.y        			if ($4 == tOROP) {
tOROP            1049 parse.y        			if ($4 == tOROP) {
tOROP            1216 parse.y        		| arg tOROP arg
tOROP            1769 parse.y        		| tOROP
tOROP            3679 parse.y        		yylval.id = tOROP;
tOROP            3684 parse.y        	    return tOROP;


tPOW

tPOW             4452 parse.c        { yyval.id = tPOW; }
tPOW             4664 parse.c        			yyval.node = call_op(yyvsp[-2].node, tPOW, 1, yyvsp[0].node);
tPOW             4670 parse.c        			yyval.node = call_op(call_op(yyvsp[-2].node, tPOW, 1, yyvsp[0].node), tUMINUS, 0, 0);
tPOW             4676 parse.c        			yyval.node = call_op(call_op(yyvsp[-2].node, tPOW, 1, yyvsp[0].node), tUMINUS, 0, 0);
tPOW             7412 parse.c        		yylval.id = tPOW;
tPOW             7417 parse.c        	    c = tPOW;
tPOW             9099 parse.c        	  case tPOW:
tPOW             9838 parse.c            {tPOW,	"**"},
tPOW              287 parse.y        %token tPOW		/* ** */
tPOW              339 parse.y        %right tPOW
tPOW              952 parse.y        		| tPOW		{ $$ = tPOW; }
tPOW             1119 parse.y        		| arg tPOW arg
tPOW             1121 parse.y        			$$ = call_op($1, tPOW, 1, $3);
tPOW             1123 parse.y        		| tUMINUS_NUM tINTEGER tPOW arg
tPOW             1125 parse.y        			$$ = call_op(call_op($2, tPOW, 1, $4), tUMINUS, 0, 0);
tPOW             1127 parse.y        		| tUMINUS_NUM tFLOAT tPOW arg
tPOW             1129 parse.y        			$$ = call_op(call_op($2, tPOW, 1, $4), tUMINUS, 0, 0);
tPOW             3414 parse.y        		yylval.id = tPOW;
tPOW             3419 parse.y        	    c = tPOW;
tPOW             5101 parse.y        	  case tPOW:
tPOW             5840 parse.y            {tPOW,	"**"},


tQWORDS_BEG

tQWORDS_BEG      8202 parse.c        		return tQWORDS_BEG;
tQWORDS_BEG       311 parse.y        %token tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG tWORDS_BEG tQWORDS_BEG
tQWORDS_BEG      2047 parse.y        qwords		: tQWORDS_BEG ' ' tSTRING_END
tQWORDS_BEG      2051 parse.y        		| tQWORDS_BEG qword_list tSTRING_END
tQWORDS_BEG      4204 parse.y        		return tQWORDS_BEG;


tREGEXP_BEG

tREGEXP_BEG      8032 parse.c        	    return tREGEXP_BEG;
tREGEXP_BEG      8044 parse.c        		return tREGEXP_BEG;
tREGEXP_BEG      8210 parse.c        		return tREGEXP_BEG;
tREGEXP_BEG       311 parse.y        %token tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG tWORDS_BEG tQWORDS_BEG
tREGEXP_BEG      1987 parse.y        regexp		: tREGEXP_BEG xstring_contents tREGEXP_END
tREGEXP_BEG      4034 parse.y        	    return tREGEXP_BEG;
tREGEXP_BEG      4046 parse.y        		return tREGEXP_BEG;
tREGEXP_BEG      4212 parse.y        		return tREGEXP_BEG;


tREGEXP_END

tREGEXP_END      7132 parse.c        	return tREGEXP_END;
tREGEXP_END      7365 parse.c        	    if (token == tSTRING_END || token == tREGEXP_END) {
tREGEXP_END       266 parse.y        %token <num>  tREGEXP_END
tREGEXP_END      1987 parse.y        regexp		: tREGEXP_BEG xstring_contents tREGEXP_END
tREGEXP_END      3134 parse.y        	return tREGEXP_END;
tREGEXP_END      3367 parse.y        	    if (token == tSTRING_END || token == tREGEXP_END) {


tRSHFT

tRSHFT           4424 parse.c        { yyval.id = tRSHFT; }
tRSHFT           4795 parse.c        			yyval.node = call_op(yyvsp[-2].node, tRSHFT, 1, yyvsp[0].node);
tRSHFT           7548 parse.c        		yylval.id = tRSHFT;
tRSHFT           7553 parse.c        	    return tRSHFT;
tRSHFT           9865 parse.c            {tRSHFT,	">>"},
tRSHFT            298 parse.y        %token tLSHFT tRSHFT	/* << and >> */
tRSHFT            335 parse.y        %left  tLSHFT tRSHFT
tRSHFT            945 parse.y        		| tRSHFT	{ $$ = tRSHFT; }
tRSHFT           1208 parse.y        		| arg tRSHFT arg
tRSHFT           1210 parse.y        			$$ = call_op($1, tRSHFT, 1, $3);
tRSHFT           3550 parse.y        		yylval.id = tRSHFT;
tRSHFT           3555 parse.y        	    return tRSHFT;
tRSHFT           5867 parse.y            {tRSHFT,	">>"},


tSTAR

tSTAR            7428 parse.c        		c = tSTAR;
tSTAR            7431 parse.c        		c = tSTAR;
tSTAR             309 parse.y        %token tSTAR		/* * */
tSTAR             770 parse.y        		| mlhs_head tSTAR mlhs_node
tSTAR             774 parse.y        		| mlhs_head tSTAR
tSTAR             778 parse.y        		| tSTAR mlhs_node
tSTAR             782 parse.y        		| tSTAR
tSTAR             949 parse.y        		| tSTAR		{ $$ = '*'; }
tSTAR            1253 parse.y        		| args ',' tSTAR arg opt_nl
tSTAR            1262 parse.y        		| tSTAR arg opt_nl
tSTAR            1302 parse.y        		| args ',' tSTAR arg_value opt_block_arg
tSTAR            1312 parse.y        		| assocs ',' tSTAR arg_value opt_block_arg
tSTAR            1322 parse.y        		| args ',' assocs ',' tSTAR arg opt_block_arg
tSTAR            1328 parse.y        		| tSTAR arg_value opt_block_arg
tSTAR            1343 parse.y        		| arg_value ',' tSTAR arg_value opt_block_arg
tSTAR            1348 parse.y        		| arg_value ',' args ',' tSTAR arg_value opt_block_arg
tSTAR            1358 parse.y        		| assocs ',' tSTAR arg_value opt_block_arg
tSTAR            1373 parse.y        		| arg_value ',' assocs ',' tSTAR arg_value opt_block_arg
tSTAR            1378 parse.y        		| arg_value ',' args ',' assocs ',' tSTAR arg_value opt_block_arg
tSTAR            1383 parse.y        		| tSTAR arg_value opt_block_arg
tSTAR            1442 parse.y        		| args ',' tSTAR arg_value
tSTAR            1446 parse.y        		| tSTAR arg_value
tSTAR            1876 parse.y        		| args ',' tSTAR arg_value
tSTAR            1880 parse.y        		| tSTAR arg_value
tSTAR            2333 parse.y        		| tSTAR
tSTAR            3430 parse.y        		c = tSTAR;
tSTAR            3433 parse.y        		c = tSTAR;


tSTRING_BEG

tSTRING_BEG      7218 parse.c            return term == '`' ? tXSTRING_BEG : tSTRING_BEG;
tSTRING_BEG      7560 parse.c        	return tSTRING_BEG;
tSTRING_BEG      7579 parse.c        	return tSTRING_BEG;
tSTRING_BEG      8186 parse.c        		return tSTRING_BEG;
tSTRING_BEG      8190 parse.c        		return tSTRING_BEG;
tSTRING_BEG       311 parse.y        %token tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG tWORDS_BEG tQWORDS_BEG
tSTRING_BEG      1958 parse.y        string1		: tSTRING_BEG string_contents tSTRING_END
tSTRING_BEG      3220 parse.y            return term == '`' ? tXSTRING_BEG : tSTRING_BEG;
tSTRING_BEG      3562 parse.y        	return tSTRING_BEG;
tSTRING_BEG      3581 parse.y        	return tSTRING_BEG;
tSTRING_BEG      4188 parse.y        		return tSTRING_BEG;
tSTRING_BEG      4192 parse.y        		return tSTRING_BEG;


tSTRING_CONTENT

tSTRING_CONTENT  7159 parse.c            return tSTRING_CONTENT;
tSTRING_CONTENT  7323 parse.c        		return tSTRING_CONTENT;
tSTRING_CONTENT  7333 parse.c            return tSTRING_CONTENT;
tSTRING_CONTENT   264 parse.y        %token <node> tINTEGER tFLOAT tSTRING_CONTENT
tSTRING_CONTENT  2061 parse.y        		| qword_list tSTRING_CONTENT ' '
tSTRING_CONTENT  2087 parse.y        string_content	: tSTRING_CONTENT
tSTRING_CONTENT  3161 parse.y            return tSTRING_CONTENT;
tSTRING_CONTENT  3325 parse.y        		return tSTRING_CONTENT;
tSTRING_CONTENT  3335 parse.y            return tSTRING_CONTENT;


tSTRING_DBEG

tSTRING_DBEG     7146 parse.c        	    return tSTRING_DBEG;
tSTRING_DBEG     7314 parse.c        		return tSTRING_DBEG;
tSTRING_DBEG      312 parse.y        %token tSTRING_DBEG tSTRING_DVAR tSTRING_END
tSTRING_DBEG     2099 parse.y        		| tSTRING_DBEG
tSTRING_DBEG     3148 parse.y        	    return tSTRING_DBEG;
tSTRING_DBEG     3316 parse.y        		return tSTRING_DBEG;


tSTRING_DVAR

tSTRING_DVAR     7144 parse.c        	    return tSTRING_DVAR;
tSTRING_DVAR     7312 parse.c        		return tSTRING_DVAR;
tSTRING_DVAR      312 parse.y        %token tSTRING_DBEG tSTRING_DVAR tSTRING_END
tSTRING_DVAR     2088 parse.y        		| tSTRING_DVAR
tSTRING_DVAR     3146 parse.y        	    return tSTRING_DVAR;
tSTRING_DVAR     3314 parse.y        		return tSTRING_DVAR;


tSTRING_END

tSTRING_END      7119 parse.c            if (func == -1) return tSTRING_END;
tSTRING_END      7130 parse.c        	if (!(func & STR_FUNC_REGEXP)) return tSTRING_END;
tSTRING_END      7154 parse.c        	return tSTRING_END;
tSTRING_END      7275 parse.c        	return tSTRING_END;
tSTRING_END      7358 parse.c        	    if (token == tSTRING_END) {
tSTRING_END      7365 parse.c        	    if (token == tSTRING_END || token == tREGEXP_END) {
tSTRING_END       312 parse.y        %token tSTRING_DBEG tSTRING_DVAR tSTRING_END
tSTRING_END      1958 parse.y        string1		: tSTRING_BEG string_contents tSTRING_END
tSTRING_END      1964 parse.y        xstring		: tXSTRING_BEG xstring_contents tSTRING_END
tSTRING_END      2020 parse.y        words		: tWORDS_BEG ' ' tSTRING_END
tSTRING_END      2024 parse.y        		| tWORDS_BEG word_list tSTRING_END
tSTRING_END      2047 parse.y        qwords		: tQWORDS_BEG ' ' tSTRING_END
tSTRING_END      2051 parse.y        		| tQWORDS_BEG qword_list tSTRING_END
tSTRING_END      2139 parse.y        dsym		: tSYMBEG xstring_contents tSTRING_END
tSTRING_END      3121 parse.y            if (func == -1) return tSTRING_END;
tSTRING_END      3132 parse.y        	if (!(func & STR_FUNC_REGEXP)) return tSTRING_END;
tSTRING_END      3156 parse.y        	return tSTRING_END;
tSTRING_END      3277 parse.y        	return tSTRING_END;
tSTRING_END      3360 parse.y        	    if (token == tSTRING_END) {
tSTRING_END      3367 parse.y        	    if (token == tSTRING_END || token == tREGEXP_END) {


tSYMBEG

tSYMBEG          8027 parse.c        	return tSYMBEG;
tSYMBEG          8215 parse.c        		return tSYMBEG;
tSYMBEG           311 parse.y        %token tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG tWORDS_BEG tQWORDS_BEG
tSYMBEG          2126 parse.y        symbol		: tSYMBEG sym
tSYMBEG          2139 parse.y        dsym		: tSYMBEG xstring_contents tSTRING_END
tSYMBEG          4029 parse.y        	return tSYMBEG;
tSYMBEG          4217 parse.y        		return tSYMBEG;


tUMINUS

tUMINUS          4464 parse.c        { yyval.id = tUMINUS; }
tUMINUS          4670 parse.c        			yyval.node = call_op(call_op(yyvsp[-2].node, tPOW, 1, yyvsp[0].node), tUMINUS, 0, 0);
tUMINUS          4676 parse.c        			yyval.node = call_op(call_op(yyvsp[-2].node, tPOW, 1, yyvsp[0].node), tUMINUS, 0, 0);
tUMINUS          4693 parse.c        			yyval.node = call_op(yyvsp[0].node, tUMINUS, 0, 0);
tUMINUS          7733 parse.c        		return tUMINUS;
tUMINUS          7751 parse.c        	    return tUMINUS;
tUMINUS          9101 parse.c        	  case tUMINUS:
tUMINUS          9493 parse.c        	node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0);
tUMINUS          9840 parse.c            {tUMINUS,	"-@"},
tUMINUS          9842 parse.c            {tUMINUS,	"-(unary)"},
tUMINUS           286 parse.y        %token tUMINUS 		/* unary- */
tUMINUS           338 parse.y        %right tUMINUS_NUM tUMINUS
tUMINUS           955 parse.y        		| tUMINUS	{ $$ = tUMINUS; }
tUMINUS          1125 parse.y        			$$ = call_op(call_op($2, tPOW, 1, $4), tUMINUS, 0, 0);
tUMINUS          1129 parse.y        			$$ = call_op(call_op($2, tPOW, 1, $4), tUMINUS, 0, 0);
tUMINUS          1140 parse.y        		| tUMINUS arg
tUMINUS          1142 parse.y        			$$ = call_op($2, tUMINUS, 0, 0);
tUMINUS          3735 parse.y        		return tUMINUS;
tUMINUS          3753 parse.y        	    return tUMINUS;
tUMINUS          5103 parse.y        	  case tUMINUS:
tUMINUS          5495 parse.y        	node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0);
tUMINUS          5842 parse.y            {tUMINUS,	"-@"},
tUMINUS          5844 parse.y            {tUMINUS,	"-(unary)"},


tUMINUS_NUM

tUMINUS_NUM      7749 parse.c        		return tUMINUS_NUM;
tUMINUS_NUM       338 parse.y        %right tUMINUS_NUM tUMINUS
tUMINUS_NUM      1123 parse.y        		| tUMINUS_NUM tINTEGER tPOW arg
tUMINUS_NUM      1127 parse.y        		| tUMINUS_NUM tFLOAT tPOW arg
tUMINUS_NUM      2174 parse.y        		| tUMINUS_NUM tINTEGER	       %prec tLOWEST
tUMINUS_NUM      2178 parse.y        		| tUMINUS_NUM tFLOAT	       %prec tLOWEST
tUMINUS_NUM      3751 parse.y        		return tUMINUS_NUM;


tUPLUS

tUPLUS           4460 parse.c        { yyval.id = tUPLUS; }
tUPLUS           4686 parse.c        			    yyval.node = call_op(yyvsp[0].node, tUPLUS, 0, 0);
tUPLUS           7703 parse.c        		return tUPLUS;
tUPLUS           7722 parse.c        	    return tUPLUS;
tUPLUS           9100 parse.c        	  case tUPLUS:
tUPLUS           9839 parse.c            {tUPLUS,	"+@"},
tUPLUS           9841 parse.c            {tUPLUS,	"+(unary)"},
tUPLUS            285 parse.y        %token tUPLUS 		/* unary+ */
tUPLUS            340 parse.y        %right '!' '~' tUPLUS
tUPLUS            954 parse.y        		| tUPLUS	{ $$ = tUPLUS; }
tUPLUS           1131 parse.y        		| tUPLUS arg
tUPLUS           1137 parse.y        			    $$ = call_op($2, tUPLUS, 0, 0);
tUPLUS           3705 parse.y        		return tUPLUS;
tUPLUS           3724 parse.y        	    return tUPLUS;
tUPLUS           5102 parse.y        	  case tUPLUS:
tUPLUS           5841 parse.y            {tUPLUS,	"+@"},
tUPLUS           5843 parse.y            {tUPLUS,	"+(unary)"},


tWORDS_BEG

tWORDS_BEG       8196 parse.c        		return tWORDS_BEG;
tWORDS_BEG        311 parse.y        %token tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG tWORDS_BEG tQWORDS_BEG
tWORDS_BEG       2020 parse.y        words		: tWORDS_BEG ' ' tSTRING_END
tWORDS_BEG       2024 parse.y        		| tWORDS_BEG word_list tSTRING_END
tWORDS_BEG       4198 parse.y        		return tWORDS_BEG;


tXSTRING_BEG

tXSTRING_BEG     7218 parse.c            return term == '`' ? tXSTRING_BEG : tSTRING_BEG;
tXSTRING_BEG     7575 parse.c        	return tXSTRING_BEG;
tXSTRING_BEG     8206 parse.c        		return tXSTRING_BEG;
tXSTRING_BEG      311 parse.y        %token tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG tWORDS_BEG tQWORDS_BEG
tXSTRING_BEG     1964 parse.y        xstring		: tXSTRING_BEG xstring_contents tSTRING_END
tXSTRING_BEG     3220 parse.y            return term == '`' ? tXSTRING_BEG : tSTRING_BEG;
tXSTRING_BEG     3577 parse.y        	return tXSTRING_BEG;
tXSTRING_BEG     4208 parse.y        		return tXSTRING_BEG;


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 4329 eval.c         	terminate_process(status, rb_str_new("exit", 4));
terminate_process 4436 eval.c         	terminate_process(EXIT_FAILURE, mesg);
terminate_process 10129 eval.c         	    terminate_process(EXIT_FAILURE, ruby_errinfo);


test_R

test_R           3346 file.c         	    return test_R(0, argv[1]);
test_R           4341 file.c             define_filetest_function("readable_real?", test_R, 1);


test_S

test_S           3352 file.c         	    return test_S(0, argv[1]);
test_S           4355 file.c             define_filetest_function("socket?", test_S, 1);


test_W

test_W           3361 file.c         	    return test_W(0, argv[1]);
test_W           4343 file.c             define_filetest_function("writable_real?", test_W, 1);


test_X

test_X           3367 file.c         	    return test_X(0, argv[1]);
test_X           4345 file.c             define_filetest_function("executable_real?", test_X, 1);


test_b

test_b           3306 file.c         	    return test_b(0, argv[1]);
test_b           4357 file.c             define_filetest_function("blockdev?", test_b, 1);


test_c

test_c           3309 file.c         	    return test_c(0, argv[1]);
test_c           4358 file.c             define_filetest_function("chardev?", test_c, 1);


test_d

test_d           3312 file.c         	    return test_d(0, argv[1]);
test_d           4337 file.c             define_filetest_function("directory?", test_d, 1);


test_e

test_e           3316 file.c         	    return test_e(0, argv[1]);
test_e           4338 file.c             define_filetest_function("exist?", test_e, 1);
test_e           4339 file.c             define_filetest_function("exists?", test_e, 1); /* temporary */


test_f

test_f           3319 file.c         	    return test_f(0, argv[1]);
test_f           4346 file.c             define_filetest_function("file?", test_f, 1);


test_grpowned

test_grpowned    3325 file.c         	    return test_grpowned(0, argv[1]);
test_grpowned    4351 file.c             define_filetest_function("grpowned?", test_grpowned, 1);


test_identical

test_identical   3394 file.c         	return test_identical(0, argv[1], argv[2]);
test_identical   4364 file.c             define_filetest_function("identical?", test_identical, 2);


test_l

test_l           3331 file.c         	    return test_l(0, argv[1]);
test_l           4354 file.c             define_filetest_function("symlink?", test_l, 1);


test_owned

test_owned       3334 file.c         	    return test_owned(0, argv[1]);
test_owned       4350 file.c             define_filetest_function("owned?", test_owned, 1);


test_p

test_p           3340 file.c         	    return test_p(0, argv[1]);
test_p           4353 file.c             define_filetest_function("pipe?", test_p, 1);


test_r

test_r           3343 file.c         	    return test_r(0, argv[1]);
test_r           4340 file.c             define_filetest_function("readable?", test_r, 1);


test_s

test_s           3349 file.c         	    return test_s(0, argv[1]);
test_s           4348 file.c             define_filetest_function("size?", test_s, 1);


test_sgid

test_sgid        3322 file.c         	    return test_sgid(0, argv[1]);
test_sgid        4361 file.c             define_filetest_function("setgid?", test_sgid, 1);


test_sticky

test_sticky      3328 file.c         	    return test_sticky(0, argv[1]);
test_sticky      4362 file.c             define_filetest_function("sticky?", test_sticky, 1);


test_suid

test_suid        3355 file.c         	    return test_suid(0, argv[1]);
test_suid        4360 file.c             define_filetest_function("setuid?", test_suid, 1);


test_w

test_w           3358 file.c         	    return test_w(0, argv[1]);
test_w           4342 file.c             define_filetest_function("writable?", test_w, 1);


test_x

test_x           3364 file.c         	    return test_x(0, argv[1]);
test_x           4344 file.c             define_filetest_function("executable?", test_x, 1);


test_z

test_z           3370 file.c         	    return test_z(0, argv[1]);
test_z           4347 file.c             define_filetest_function("zero?", test_z, 1);


thgroup_s_alloc

thgroup_s_alloc  12529 eval.c         static VALUE thgroup_s_alloc _((VALUE));
thgroup_s_alloc  12765 eval.c             rb_define_alloc_func(cThGroup, thgroup_s_alloc);


thread_free

thread_free      11487 eval.c             th->thread = Data_Wrap_Struct(klass, thread_mark, thread_free, th);
thread_free      12443 eval.c             cont = Data_Wrap_Struct(rb_cCont, thread_mark, thread_free, th);


thread_mark

thread_mark      10009 eval.c             if (TYPE(data) != T_DATA || RDATA(data)->dmark != (RUBY_DATA_FUNC)thread_mark) {
thread_mark      11487 eval.c             th->thread = Data_Wrap_Struct(klass, thread_mark, thread_free, th);
thread_mark      12443 eval.c             cont = Data_Wrap_Struct(rb_cCont, thread_mark, thread_free, th);


thread_reset_raised

thread_reset_raised 1377 eval.c         static int thread_reset_raised();
thread_reset_raised 1446 eval.c             thread_reset_raised();
thread_reset_raised 2635 eval.c             raised = thread_reset_raised();
thread_reset_raised 4496 eval.c         	    thread_reset_raised();
thread_reset_raised 4511 eval.c             thread_reset_raised();


thread_set_raised

thread_set_raised 1376 eval.c         static int thread_set_raised();
thread_set_raised 1396 eval.c             if (thread_set_raised()) return EXIT_FAILURE;
thread_set_raised 2647 eval.c             if (raised) thread_set_raised();
thread_set_raised 4457 eval.c             if (thread_set_raised()) {


thread_status_name

thread_status_name 10584 eval.c         			th->thread, thread_status_name(th->status));
thread_status_name 11890 eval.c             return rb_str_new2(thread_status_name(th->status));
thread_status_name 12339 eval.c             const char *status = thread_status_name(th->status);


time

time             10675 eval.c         	limit = timeofday()+(double)time.tv_sec+(double)time.tv_usec*1e-6;
time             10680 eval.c         	    n = select(0, 0, 0, 0, &time);
time             10698 eval.c         	    time.tv_sec = (int)d;
time             10699 eval.c         	    time.tv_usec = (int)((d - (int)d)*1e6);
time             10700 eval.c         	    if (time.tv_usec < 0) {
time             10701 eval.c         		time.tv_usec += (long)1e6;
time             10702 eval.c         		time.tv_sec -= 1;
time             10704 eval.c         	    if (time.tv_sec < 0) return;
time             10709 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             1924 ext/zlib/zlib.c 	gz->mtime = time(0);
time             2478 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             1573 process.c          beg = time(0);
time             1584 process.c          end = time(0) - beg;
time               64 time.c             rb_check_frozen(time);
time               65 time.c             if (!OBJ_TAINTED(time) && rb_safe_level() >= 4)
time               97 time.c             time_modify(time);
time               98 time.c             GetTimeval(time, tobj);
time              106 time.c             return time;
time              147 time.c             VALUE time = time_s_alloc(klass);
time              150 time.c             GetTimeval(time, tobj);
time              155 time.c             return time;
time              177 time.c             switch (TYPE(time)) {
time              179 time.c         	t.tv_sec = FIX2LONG(time);
time              186 time.c         	if (interval && RFLOAT(time)->value < 0.0)
time              191 time.c         	    d = modf(RFLOAT(time)->value, &f);
time              194 time.c         		rb_raise(rb_eRangeError, "%f out of Time range", RFLOAT(time)->value);
time              201 time.c         	t.tv_sec = NUM2LONG(time);
time              209 time.c         		 rb_obj_classname(time), tstr);
time              219 time.c             return time_timeval(time, Qtrue);
time              229 time.c             if (TYPE(time) == T_DATA && RDATA(time)->dfree == time_free) {
time              230 time.c         	GetTimeval(time, tobj);
time              234 time.c             return time_timeval(time, Qfalse);
time              259 time.c             VALUE time, t;
time              261 time.c             if (rb_scan_args(argc, argv, "11", &time, &t) == 2) {
time              262 time.c         	tv.tv_sec = NUM2LONG(time);
time              266 time.c         	tv = rb_time_timeval(time);
time              269 time.c             if (TYPE(time) == T_DATA && RDATA(time)->dfree == time_free) {
time              272 time.c         	GetTimeval(time, tobj);
time              795 time.c             VALUE time;
time              799 time.c             time = time_new_internal(klass, make_time_t(&tm, utc_p), usec);
time              800 time.c             if (utc_p) return time_gmtime(time);
time              801 time.c             return time_localtime(time);
time              875 time.c             GetTimeval(time, tobj);
time              897 time.c             GetTimeval(time, tobj);
time              919 time.c             GetTimeval(time, tobj);
time             1010 time.c             GetTimeval(time, tobj);
time             1029 time.c             GetTimeval(time, tobj);
time             1041 time.c             if (copy == time) return copy;
time             1043 time.c             if (TYPE(time) != T_DATA || RDATA(time)->dfree != time_free) {
time             1046 time.c             GetTimeval(time, tobj);
time             1058 time.c             time_init_copy(dup, time);
time             1083 time.c             GetTimeval(time, tobj);
time             1086 time.c         	    return time;
time             1089 time.c         	time_modify(time);
time             1098 time.c             return time;
time             1127 time.c             GetTimeval(time, tobj);
time             1130 time.c         	    return time;
time             1133 time.c         	time_modify(time);
time             1142 time.c             return time;
time             1163 time.c             return time_localtime(time_dup(time));
time             1185 time.c             return time_gmtime(time_dup(time));
time             1193 time.c             if (gmt) return time_gmtime(time);
time             1194 time.c             return time_localtime(time);
time             1214 time.c             GetTimeval(time, tobj);
time             1216 time.c         	time_get_tm(time, tobj->gmt);
time             1245 time.c             GetTimeval(time, tobj);
time             1247 time.c         	time_get_tm(time, tobj->gmt);
time             1384 time.c             GetTimeval(time, tobj);
time             1407 time.c             GetTimeval(time, tobj);
time             1409 time.c         	time_get_tm(time, tobj->gmt);
time             1430 time.c             GetTimeval(time, tobj);
time             1432 time.c         	time_get_tm(time, tobj->gmt);
time             1453 time.c             GetTimeval(time, tobj);
time             1455 time.c         	time_get_tm(time, tobj->gmt);
time             1478 time.c             GetTimeval(time, tobj);
time             1480 time.c         	time_get_tm(time, tobj->gmt);
time             1503 time.c             GetTimeval(time, tobj);
time             1505 time.c         	time_get_tm(time, tobj->gmt);
time             1526 time.c             GetTimeval(time, tobj);
time             1528 time.c         	time_get_tm(time, tobj->gmt);
time             1550 time.c             GetTimeval(time, tobj);
time             1552 time.c         	time_get_tm(time, tobj->gmt);
time             1573 time.c             GetTimeval(time, tobj);
time             1575 time.c         	time_get_tm(time, tobj->gmt);
time             1600 time.c             GetTimeval(time, tobj);
time             1602 time.c         	time_get_tm(time, tobj->gmt);
time             1630 time.c             GetTimeval(time, tobj);
time             1632 time.c         	time_get_tm(time, tobj->gmt);
time             1669 time.c             GetTimeval(time, tobj);
time             1671 time.c         	time_get_tm(time, tobj->gmt);
time             1726 time.c             GetTimeval(time, tobj);
time             1728 time.c         	time_get_tm(time, tobj->gmt);
time             1740 time.c         		    time_zone(time));
time             1757 time.c             len = strftime(*buf, SMALLBUF, format, time);
time             1762 time.c         	len = strftime(*buf, size, format, time);
time             1827 time.c             GetTimeval(time, tobj);
time             1829 time.c         	time_get_tm(time, tobj->gmt);
time             1894 time.c             GetTimeval(time, tobj);
time             1939 time.c             str = time_mdump(time);
time             1940 time.c             if (FL_TEST(time, FL_EXIVAR)) {
time             1941 time.c         	rb_copy_generic_ivar(str, time);
time             1963 time.c             time_modify(time);
time             1997 time.c             GetTimeval(time, tobj);
time             2001 time.c             return time;
time             2015 time.c             VALUE time = time_s_alloc(klass);
time             2018 time.c         	rb_copy_generic_ivar(time, str);
time             2019 time.c         	FL_SET(time, FL_EXIVAR);
time             2021 time.c             time_mload(time, str);
time             2022 time.c             return time;
time             3430 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         1332 time.c             return time_add(tobj, time2, 1);
time_add         1368 time.c             return time_add(tobj, time2, -1);


time_asctime

time_asctime     2074 time.c             rb_define_method(rb_cTime, "ctime", time_asctime, 0);
time_asctime     2075 time.c             rb_define_method(rb_cTime, "asctime", time_asctime, 0);


time_dup

time_dup         1163 time.c             return time_localtime(time_dup(time));
time_dup         1185 time.c             return time_gmtime(time_dup(time));


time_free

time_free          35 time.c         static void time_free _((void *));
time_free          52 time.c             obj = Data_Make_Struct(klass, struct time_object, 0, time_free, tobj);
time_free         229 time.c             if (TYPE(time) == T_DATA && RDATA(time)->dfree == time_free) {
time_free         269 time.c             if (TYPE(time) == T_DATA && RDATA(time)->dfree == time_free) {
time_free         946 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
time_free         976 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
time_free        1043 time.c             if (TYPE(time) != T_DATA || RDATA(time)->dfree != time_free) {
time_free        1329 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
time_free        1357 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {


time_get_tm

time_get_tm       401 time.c         static VALUE time_get_tm _((VALUE, int));
time_get_tm      1216 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1247 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1409 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1432 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1455 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1480 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1505 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1528 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1552 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1575 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1602 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1632 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1671 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1728 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1829 time.c         	time_get_tm(time, tobj->gmt);


time_getgmtime

time_getgmtime   2071 time.c             rb_define_method(rb_cTime, "getgm", time_getgmtime, 0);
time_getgmtime   2072 time.c             rb_define_method(rb_cTime, "getutc", time_getgmtime, 0);


time_gmtime

time_gmtime       399 time.c         static VALUE time_gmtime _((VALUE));
time_gmtime       800 time.c             if (utc_p) return time_gmtime(time);
time_gmtime      1185 time.c             return time_gmtime(time_dup(time));
time_gmtime      1193 time.c             if (gmt) return time_gmtime(time);
time_gmtime      2068 time.c             rb_define_method(rb_cTime, "gmtime", time_gmtime, 0);
time_gmtime      2069 time.c             rb_define_method(rb_cTime, "utc", time_gmtime, 0);


time_init_copy

time_init_copy   1058 time.c             time_init_copy(dup, time);
time_init_copy   2065 time.c             rb_define_method(rb_cTime, "initialize_copy", time_init_copy, 1);


time_isdst

time_isdst       2094 time.c             rb_define_method(rb_cTime, "isdst", time_isdst, 0);
time_isdst       2095 time.c             rb_define_method(rb_cTime, "dst?", time_isdst, 0);


time_localtime

time_localtime    400 time.c         static VALUE time_localtime _((VALUE));
time_localtime    801 time.c             return time_localtime(time);
time_localtime   1163 time.c             return time_localtime(time_dup(time));
time_localtime   1194 time.c             return time_localtime(time);
time_localtime   2067 time.c             rb_define_method(rb_cTime, "localtime", time_localtime, 0);


time_mday

time_mday        2087 time.c             rb_define_method(rb_cTime, "mday", time_mday, 0);
time_mday        2088 time.c             rb_define_method(rb_cTime, "day", time_mday, 0);


time_mdump

time_mdump       1939 time.c             str = time_mdump(time);
time_mdump       2115 time.c             rb_define_method(rb_cTime, "marshal_dump", time_mdump, 0);


time_mload

time_mload       2021 time.c             time_mload(time, str);
time_mload       2116 time.c             rb_define_method(rb_cTime, "marshal_load", time_mload, 1);


time_modify

time_modify        97 time.c             time_modify(time);
time_modify      1042 time.c             time_modify(copy);
time_modify      1089 time.c         	time_modify(time);
time_modify      1133 time.c         	time_modify(time);
time_modify      1963 time.c             time_modify(time);


time_mon

time_mon         2089 time.c             rb_define_method(rb_cTime, "mon", time_mon, 0);
time_mon         2090 time.c             rb_define_method(rb_cTime, "month", time_mon, 0);


time_new_internal

time_new_internal  162 time.c             return time_new_internal(rb_cTime, sec, usec);
time_new_internal  268 time.c             t = time_new_internal(klass, tv.tv_sec, tv.tv_usec);
time_new_internal  799 time.c             time = time_new_internal(klass, make_time_t(&tm, utc_p), usec);


time_overflow_p

time_overflow_p   151 time.c             time_overflow_p(&sec, &usec);
time_overflow_p  1995 time.c             time_overflow_p(&sec, &usec);


time_s_alloc

time_s_alloc       44 time.c         static VALUE time_s_alloc _((VALUE));
time_s_alloc      147 time.c             VALUE time = time_s_alloc(klass);
time_s_alloc     1057 time.c             VALUE dup = time_s_alloc(rb_cTime);
time_s_alloc     2015 time.c             VALUE time = time_s_alloc(klass);
time_s_alloc     2049 time.c             rb_define_alloc_func(rb_cTime, time_s_alloc);


time_s_mktime

time_s_mktime    2054 time.c             rb_define_singleton_method(rb_cTime, "local", time_s_mktime, -1);
time_s_mktime    2055 time.c             rb_define_singleton_method(rb_cTime, "mktime", time_s_mktime, -1);


time_s_mkutc

time_s_mkutc     2052 time.c             rb_define_singleton_method(rb_cTime, "utc", time_s_mkutc, -1);
time_s_mkutc     2053 time.c             rb_define_singleton_method(rb_cTime, "gm", time_s_mkutc, -1);


time_t

time_t            839 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           1716 ext/zlib/zlib.c     time_t mtime;       /* for header */
time_t           2387 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            198 file.c         	time_t t1 = get_stat(self)->st_mtime;
time_t            199 file.c         	time_t t2 = get_stat(other)->st_mtime;
time_t            446 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            114 time.c             time_t *secp, *usecp;
time_t            116 time.c             time_t tmp, sec = *secp, usec = *usecp;
time_t            145 time.c             time_t sec, usec;
time_t            160 time.c             time_t sec, usec;
time_t            192 time.c         	    t.tv_sec = (time_t)f;
time_t            196 time.c         	    t.tv_usec = (time_t)(d*1e6);
time_t            300 time.c             time_t *usec;
time_t            412 time.c         static time_t
time_t            461 time.c                    (time_t)(tm_yday +
time_t            489 time.c         static time_t
time_t            494 time.c             time_t guess, guess_lo, guess_hi;
time_t            502 time.c             guess_lo = 1L << (8 * sizeof(time_t) - 1);
time_t            506 time.c             guess_hi = ((time_t)-1) < ((time_t)0) ?
time_t            507 time.c                        (1UL << (8 * sizeof(time_t) - 1)) - 1 :
time_t            508 time.c         	       ~(time_t)0;
time_t            666 time.c         	  time_t guess2;
time_t            743 time.c         static time_t
time_t            748 time.c             time_t t;
time_t            796 time.c             time_t usec;
time_t           1081 time.c             time_t t;
time_t           1125 time.c             time_t t;
time_t           1277 time.c             time_t usec_off, sec, usec;
time_t           1289 time.c             usec_off = (time_t)(d*1e6);
time_t           1682 time.c         	time_t t;
time_t           1891 time.c             time_t t;
time_t           1958 time.c             time_t sec, usec;
time_t           1993 time.c         	usec = (time_t)(s & 0xfffff);
time_t           2542 win32/win32.c      time_t t;
time_t           2812 win32/win32.c  static time_t
time_t           2818 win32/win32.c      time_t t;
time_t           3424 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      219 time.c             return time_timeval(time, Qtrue);
time_timeval      234 time.c             return time_timeval(time, Qfalse);


time_to_i

time_to_i        2059 time.c             rb_define_method(rb_cTime, "to_i", time_to_i, 0);
time_to_i        2104 time.c             rb_define_method(rb_cTime, "tv_sec", time_to_i, 0);


time_to_s

time_to_s        2076 time.c             rb_define_method(rb_cTime, "to_s", time_to_s, 0);
time_to_s        2077 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        2105 time.c             rb_define_method(rb_cTime, "tv_usec", time_usec, 0);
time_usec        2106 time.c             rb_define_method(rb_cTime, "usec", time_usec, 0);


time_utc_offset

time_utc_offset  2097 time.c             rb_define_method(rb_cTime, "gmtoff", time_utc_offset, 0);
time_utc_offset  2098 time.c             rb_define_method(rb_cTime, "gmt_offset", time_utc_offset, 0);
time_utc_offset  2099 time.c             rb_define_method(rb_cTime, "utc_offset", time_utc_offset, 0);


time_utc_or_local

time_utc_or_local  831 time.c             return time_utc_or_local(argc, argv, Qtrue, klass);
time_utc_or_local  853 time.c             return time_utc_or_local(argc, argv, Qfalse, klass);


time_utc_p

time_utc_p       2101 time.c             rb_define_method(rb_cTime, "utc?", time_utc_p, 0);
time_utc_p       2102 time.c             rb_define_method(rb_cTime, "gmt?", time_utc_p, 0);


time_zone

time_zone        1740 time.c         		    time_zone(time));
time_zone        2096 time.c             rb_define_method(rb_cTime, "zone", time_zone, 0);


timeofday

timeofday        10452 eval.c         	    if (now < 0.0) now = timeofday();
timeofday        10512 eval.c          	    if (now < 0.0) now = timeofday();
timeofday        10675 eval.c         	limit = timeofday()+(double)time.tv_sec+(double)time.tv_usec*1e-6;
timeofday        10696 eval.c         	    d = limit - timeofday();
timeofday        10709 eval.c             date = timeofday() + (double)time.tv_sec + (double)time.tv_usec*1e-6;
timeofday        10746 eval.c         	limit = timeofday()+
timeofday        10776 eval.c         			double d = limit - timeofday();
timeofday        10803 eval.c         	curr_thread->delay = timeofday() +
timeofday        10837 eval.c         	curr_thread->delay = timeofday() + limit;
timeofday        11195 eval.c         	curr_thread->delay = timeofday() + (double)0.06;


times

times            2358 array.c            tmp = rb_check_string_type(times);
times            2363 array.c            len = NUM2LONG(times);
times            3337 process.c          times(&buf);
times             418 string.c           len = NUM2LONG(times);
times            3461 win32/win32.c      if (unixtime_to_filetime(times->actime, &atime)) {
times            3464 win32/win32.c      if (unixtime_to_filetime(times->modtime, &mtime)) {
times             521 win32/win32.h  #ifdef times


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             513 time.c                 d = tmcmp(tptr, tm);
tmcmp             525 time.c                     d = tmcmp(tptr, tm);
tmcmp             536 time.c             d = tmcmp(tptr, tm);
tmcmp             543 time.c             d = tmcmp(tptr, tm);
tmcmp             642 time.c               d = tmcmp(tptr, tm);
tmcmp             681 time.c         		  if (tmcmp(tptr, tm) == 0) {
tmcmp             705 time.c         		  if (tmcmp(tptr, tm) == 0) {


to_ary

to_ary           2072 array.c        	argv[i] = to_ary(argv[i]);
to_ary           2121 array.c        	tmp = to_ary(rb_ary_elt(ary, i));
to_ary           2159 array.c            orig = to_ary(orig);
to_ary           2305 array.c            y = to_ary(y);
to_ary           2328 array.c            y = to_ary(y);
to_ary           2590 array.c            ary2 = to_ary(ary2);
to_ary           2645 array.c            hash = ary_make_hash(to_ary(ary2), 0);
to_ary           2673 array.c            ary2 = to_ary(ary2);
to_ary           2707 array.c            ary2 = to_ary(ary2);


to_char

to_char           371 missing/vsnprintf.c 			*--cp = to_char(val);
to_char           381 missing/vsnprintf.c 			*--cp = to_char(val % 10);
to_char           386 missing/vsnprintf.c 			*--cp = to_char(sval % 10);
to_char           393 missing/vsnprintf.c 			*--cp = to_char(val & 7);
to_char          1063 missing/vsnprintf.c 			*--t = to_char(exp % 10);
to_char          1065 missing/vsnprintf.c 		*--t = to_char(exp);
to_char          1070 missing/vsnprintf.c 		*p++ = to_char(exp);


to_digit

to_digit          345 missing/vsnprintf.c #define is_digit(c)	((unsigned)to_digit(c) <= 9)
to_digit          621 missing/vsnprintf.c 				n = 10 * n + to_digit(ch);
to_digit          638 missing/vsnprintf.c 				n = 10 * n + to_digit(ch);


to_hash

to_hash           950 hash.c             hash2 = to_hash(hash2);
to_hash          1575 hash.c             hash2 = to_hash(hash2);
to_hash          2365 hash.c             hash = to_hash(hash);
to_hash          2392 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                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              6997 parse.c        			 toklen() > 1 ? "s" : "", tok());
tok              7158 parse.c            yylval.node = NEW_STR(rb_str_new(tok(), toklen()));
tok              7215 parse.c        				  rb_str_new(tok(), toklen()),	/* nd_lit */
tok              7322 parse.c        		yylval.node = NEW_STR(rb_str_new(tok(), toklen()));
tok              7328 parse.c        	str = rb_str_new(tok(), toklen());
tok              7810 parse.c        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 16, Qfalse));
tok              7834 parse.c        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 2, Qfalse));
tok              7858 parse.c        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 10, Qfalse));
tok              7889 parse.c        			yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 8, Qfalse));
tok              7979 parse.c        		double d = strtod(tok(), 0);
tok              7981 parse.c        		    rb_warn("Float %s out of range", tok());
tok              7987 parse.c        	    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 10, Qfalse));
tok              8276 parse.c        	    yylval.id = rb_intern(tok());
tok              8291 parse.c        	    yylval.id = rb_intern(tok());
tok              8318 parse.c        	    yylval.node = NEW_NTH_REF(atoi(tok()+1));
tok              8384 parse.c            if ((c == '!' || c == '?') && is_identchar(tok()[0]) && !peek('=')) {
tok              8396 parse.c        	switch (tok()[0]) {
tok              8403 parse.c        	    if (tok()[1] == '@')
tok              8425 parse.c        		if (result == 0 && ISUPPER(tok()[0])) {
tok              8437 parse.c        		kw = rb_reserved_word(tok(), toklen());
tok              8478 parse.c        	yylval.id = rb_intern(tok());
tok              2999 parse.y        			 toklen() > 1 ? "s" : "", tok());
tok              3160 parse.y            yylval.node = NEW_STR(rb_str_new(tok(), toklen()));
tok              3217 parse.y        				  rb_str_new(tok(), toklen()),	/* nd_lit */
tok              3324 parse.y        		yylval.node = NEW_STR(rb_str_new(tok(), toklen()));
tok              3330 parse.y        	str = rb_str_new(tok(), toklen());
tok              3812 parse.y        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 16, Qfalse));
tok              3836 parse.y        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 2, Qfalse));
tok              3860 parse.y        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 10, Qfalse));
tok              3891 parse.y        			yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 8, Qfalse));
tok              3981 parse.y        		double d = strtod(tok(), 0);
tok              3983 parse.y        		    rb_warn("Float %s out of range", tok());
tok              3989 parse.y        	    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 10, Qfalse));
tok              4278 parse.y        	    yylval.id = rb_intern(tok());
tok              4293 parse.y        	    yylval.id = rb_intern(tok());
tok              4320 parse.y        	    yylval.node = NEW_NTH_REF(atoi(tok()+1));
tok              4386 parse.y            if ((c == '!' || c == '?') && is_identchar(tok()[0]) && !peek('=')) {
tok              4398 parse.y        	switch (tok()[0]) {
tok              4405 parse.y        	    if (tok()[1] == '@')
tok              4427 parse.y        		if (result == 0 && ISUPPER(tok()[0])) {
tok              4439 parse.y        		kw = rb_reserved_word(tok(), toklen());
tok              4480 parse.y        	yylval.id = rb_intern(tok());


tokadd

tokadd           6883 parse.c        	    tokadd('\\');
tokadd           6884 parse.c        	    tokadd(c);
tokadd           6892 parse.c        		tokadd(c);
tokadd           6901 parse.c        	    tokadd('\\');
tokadd           6902 parse.c        	    tokadd(c);
tokadd           6909 parse.c        		tokadd(nextc());
tokadd           6919 parse.c        	tokadd('\\'); tokadd('M'); tokadd('-');
tokadd           6928 parse.c        	tokadd('\\'); tokadd('C'); tokadd('-');
tokadd           6932 parse.c        	tokadd('\\'); tokadd('c');
tokadd           6938 parse.c        	tokadd(c);
tokadd           6948 parse.c        	    tokadd('\\');
tokadd           6949 parse.c        	tokadd(c);
tokadd           6989 parse.c        	    tokadd(c);
tokadd           7058 parse.c        		tokadd('\\');
tokadd           7062 parse.c        		if (func & STR_FUNC_ESCAPE) tokadd(c);
tokadd           7074 parse.c        		    if (func & STR_FUNC_ESCAPE) tokadd('\\');
tokadd           7081 parse.c        		    tokadd('\\');
tokadd           7089 parse.c        		tokadd(c);
tokadd           7102 parse.c        	tokadd(c);
tokadd           7148 parse.c        	tokadd('#');
tokadd           7180 parse.c        	tokadd(func);
tokadd           7184 parse.c        	    do {tokadd(c);} while (--len > 0 && (c = nextc()) != -1);
tokadd           7202 parse.c        	tokadd(func |= str_dquote);
tokadd           7205 parse.c        	    do {tokadd(c);} while (--len > 0 && (c = nextc()) != -1);
tokadd           7316 parse.c        	    tokadd('#');
tokadd           7325 parse.c        	    tokadd(nextc());
tokadd           7783 parse.c        		tokadd(c);
tokadd           7801 parse.c        			    tokadd(c);
tokadd           7825 parse.c        			    tokadd(c);
tokadd           7849 parse.c        			    tokadd(c);
tokadd           7883 parse.c        			tokadd(c);
tokadd           7901 parse.c        		    tokadd('0');
tokadd           7915 parse.c        		    tokadd(c);
tokadd           7931 parse.c        		    tokadd('.');
tokadd           7932 parse.c        		    tokadd(c);
tokadd           7948 parse.c        		    tokadd(c);
tokadd           7954 parse.c        		    tokadd(c);
tokadd           8248 parse.c        		tokadd('$');
tokadd           8249 parse.c        		tokadd('_');
tokadd           8273 parse.c        	    tokadd('$');
tokadd           8274 parse.c        	    tokadd(c);
tokadd           8280 parse.c        	    tokadd('$');
tokadd           8281 parse.c        	    tokadd(c);
tokadd           8284 parse.c        		tokadd(c);
tokadd           8300 parse.c        		tokadd('$');
tokadd           8301 parse.c        		tokadd(c);
tokadd           8310 parse.c        	    tokadd('$');
tokadd           8312 parse.c        		tokadd(c);
tokadd           8327 parse.c        	    tokadd('$');
tokadd           8334 parse.c        	tokadd('@');
tokadd           8336 parse.c        	    tokadd('@');
tokadd           8373 parse.c        	tokadd(c);
tokadd           8379 parse.c        		tokadd(c);
tokadd           8385 parse.c        	tokadd(c);
tokadd           8418 parse.c        			tokadd(c);
tokadd           2885 parse.y        	    tokadd('\\');
tokadd           2886 parse.y        	    tokadd(c);
tokadd           2894 parse.y        		tokadd(c);
tokadd           2903 parse.y        	    tokadd('\\');
tokadd           2904 parse.y        	    tokadd(c);
tokadd           2911 parse.y        		tokadd(nextc());
tokadd           2921 parse.y        	tokadd('\\'); tokadd('M'); tokadd('-');
tokadd           2930 parse.y        	tokadd('\\'); tokadd('C'); tokadd('-');
tokadd           2934 parse.y        	tokadd('\\'); tokadd('c');
tokadd           2940 parse.y        	tokadd(c);
tokadd           2950 parse.y        	    tokadd('\\');
tokadd           2951 parse.y        	tokadd(c);
tokadd           2991 parse.y        	    tokadd(c);
tokadd           3060 parse.y        		tokadd('\\');
tokadd           3064 parse.y        		if (func & STR_FUNC_ESCAPE) tokadd(c);
tokadd           3076 parse.y        		    if (func & STR_FUNC_ESCAPE) tokadd('\\');
tokadd           3083 parse.y        		    tokadd('\\');
tokadd           3091 parse.y        		tokadd(c);
tokadd           3104 parse.y        	tokadd(c);
tokadd           3150 parse.y        	tokadd('#');
tokadd           3182 parse.y        	tokadd(func);
tokadd           3186 parse.y        	    do {tokadd(c);} while (--len > 0 && (c = nextc()) != -1);
tokadd           3204 parse.y        	tokadd(func |= str_dquote);
tokadd           3207 parse.y        	    do {tokadd(c);} while (--len > 0 && (c = nextc()) != -1);
tokadd           3318 parse.y        	    tokadd('#');
tokadd           3327 parse.y        	    tokadd(nextc());
tokadd           3785 parse.y        		tokadd(c);
tokadd           3803 parse.y        			    tokadd(c);
tokadd           3827 parse.y        			    tokadd(c);
tokadd           3851 parse.y        			    tokadd(c);
tokadd           3885 parse.y        			tokadd(c);
tokadd           3903 parse.y        		    tokadd('0');
tokadd           3917 parse.y        		    tokadd(c);
tokadd           3933 parse.y        		    tokadd('.');
tokadd           3934 parse.y        		    tokadd(c);
tokadd           3950 parse.y        		    tokadd(c);
tokadd           3956 parse.y        		    tokadd(c);
tokadd           4250 parse.y        		tokadd('$');
tokadd           4251 parse.y        		tokadd('_');
tokadd           4275 parse.y        	    tokadd('$');
tokadd           4276 parse.y        	    tokadd(c);
tokadd           4282 parse.y        	    tokadd('$');
tokadd           4283 parse.y        	    tokadd(c);
tokadd           4286 parse.y        		tokadd(c);
tokadd           4302 parse.y        		tokadd('$');
tokadd           4303 parse.y        		tokadd(c);
tokadd           4312 parse.y        	    tokadd('$');
tokadd           4314 parse.y        		tokadd(c);
tokadd           4329 parse.y        	    tokadd('$');
tokadd           4336 parse.y        	tokadd('@');
tokadd           4338 parse.y        	    tokadd('@');
tokadd           4375 parse.y        	tokadd(c);
tokadd           4381 parse.y        		tokadd(c);
tokadd           4387 parse.y        	tokadd(c);
tokadd           4420 parse.y        			tokadd(c);


tokadd_escape

tokadd_escape    6935 parse.c        	    return tokadd_escape(term);
tokadd_escape    7068 parse.c        		    if (tokadd_escape(term) < 0)
tokadd_escape    2937 parse.y        	    return tokadd_escape(term);
tokadd_escape    3070 parse.y        		    if (tokadd_escape(term) < 0)


tokadd_string

tokadd_string    7151 parse.c            if (tokadd_string(func, term, paren, &quote->nd_nest) == -1) {
tokadd_string    7320 parse.c        	    if ((c = tokadd_string(func, '\n', 0, NULL)) == -1) goto error;
tokadd_string    3153 parse.y            if (tokadd_string(func, term, paren, &quote->nd_nest) == -1) {
tokadd_string    3322 parse.y        	    if ((c = tokadd_string(func, '\n', 0, NULL)) == -1) goto error;


tokfix

tokfix           6995 parse.c        	tokfix();
tokfix           7157 parse.c            tokfix();
tokfix           7211 parse.c            tokfix();
tokfix           7805 parse.c        		    tokfix();
tokfix           7829 parse.c        		    tokfix();
tokfix           7853 parse.c        		    tokfix();
tokfix           7887 parse.c        			tokfix();
tokfix           7971 parse.c        	    tokfix();
tokfix           8275 parse.c        	    tokfix();
tokfix           8290 parse.c        	    tokfix();
tokfix           8317 parse.c        	    tokfix();
tokfix           8390 parse.c            tokfix();
tokfix           8419 parse.c        			tokfix();
tokfix           2997 parse.y        	tokfix();
tokfix           3159 parse.y            tokfix();
tokfix           3213 parse.y            tokfix();
tokfix           3807 parse.y        		    tokfix();
tokfix           3831 parse.y        		    tokfix();
tokfix           3855 parse.y        		    tokfix();
tokfix           3889 parse.y        			tokfix();
tokfix           3973 parse.y        	    tokfix();
tokfix           4277 parse.y        	    tokfix();
tokfix           4292 parse.y        	    tokfix();
tokfix           4319 parse.y        	    tokfix();
tokfix           4392 parse.y            tokfix();
tokfix           4421 parse.y        			tokfix();


toklast

toklast          8410 parse.c        	    if (toklast() == '!' || toklast() == '?') {
toklast          4412 parse.y        	    if (toklast() == '!' || toklast() == '?') {


toklen

toklen           6994 parse.c            if (toklen()) {
toklen           6997 parse.c        			 toklen() > 1 ? "s" : "", tok());
toklen           7158 parse.c            yylval.node = NEW_STR(rb_str_new(tok(), toklen()));
toklen           7215 parse.c        				  rb_str_new(tok(), toklen()),	/* nd_lit */
toklen           7322 parse.c        		yylval.node = NEW_STR(rb_str_new(tok(), toklen()));
toklen           7328 parse.c        	str = rb_str_new(tok(), toklen());
toklen           7787 parse.c        		int start = toklen();
toklen           7806 parse.c        		    if (toklen() == start) {
toklen           7830 parse.c        		    if (toklen() == start) {
toklen           7854 parse.c        		    if (toklen() == start) {
toklen           7885 parse.c        		    if (toklen() > start) {
toklen           8437 parse.c        		kw = rb_reserved_word(tok(), toklen());
toklen           2996 parse.y            if (toklen()) {
toklen           2999 parse.y        			 toklen() > 1 ? "s" : "", tok());
toklen           3160 parse.y            yylval.node = NEW_STR(rb_str_new(tok(), toklen()));
toklen           3217 parse.y        				  rb_str_new(tok(), toklen()),	/* nd_lit */
toklen           3324 parse.y        		yylval.node = NEW_STR(rb_str_new(tok(), toklen()));
toklen           3330 parse.y        	str = rb_str_new(tok(), toklen());
toklen           3789 parse.y        		int start = toklen();
toklen           3808 parse.y        		    if (toklen() == start) {
toklen           3832 parse.y        		    if (toklen() == start) {
toklen           3856 parse.y        		    if (toklen() == start) {
toklen           3887 parse.y        		    if (toklen() > start) {
toklen           4439 parse.y        		kw = rb_reserved_word(tok(), toklen());


too_many_files

too_many_files   3602 win32/win32.c  	if (too_many_files())
too_many_files   3615 win32/win32.c  	else if (too_many_files())
too_many_files   3626 win32/win32.c  	if (too_many_files())


top_local_init

top_local_init    277 parse.c        static void top_local_init();
top_local_init   3672 parse.c                                top_local_init();
top_local_init   10185 parse.c            top_local_init();
top_local_init    180 parse.y        static void top_local_init();
top_local_init    347 parse.y                                top_local_init();
top_local_init   6187 parse.y            top_local_init();


top_local_setup

top_local_setup   278 parse.c        static void top_local_setup();
top_local_setup  3692 parse.c                                top_local_setup();
top_local_setup  10187 parse.c            top_local_setup();
top_local_setup   181 parse.y        static void top_local_setup();
top_local_setup   365 parse.y                                top_local_setup();
top_local_setup  6189 parse.y            top_local_setup();


tr_setup_table

tr_setup_table   3202 string.c       	tr_setup_table(s, squeez, init);
tr_setup_table   3281 string.c       	    tr_setup_table(s, squeez, init);
tr_setup_table   3408 string.c       	tr_setup_table(s, table, init);


tr_trans

tr_trans         3110 string.c           return tr_trans(str, src, repl, 0);
tr_trans         3136 string.c           tr_trans(str, src, repl, 0);
tr_trans         3347 string.c           return tr_trans(str, src, repl, 1);
tr_trans         3369 string.c           tr_trans(str, src, repl, 1);


translate_char

translate_char    216 ruby.c         static inline void translate_char _((char *, int, int));
translate_char    264 ruby.c             translate_char(libpath, '\\', '/');
translate_char    799 ruby.c         	    translate_char(script, '\\', '/');


trap

trap              735 signal.c           return rb_ensure(trap, (VALUE)&arg, trap_ensure, (VALUE)&arg);
trap              737 signal.c           return trap(&arg);
trap             1890 win32/win32.c      fd_set trap;
trap             1919 win32/win32.c  	trap = *ex;
trap             1921 win32/win32.c  	trap.fd_count = 0;
trap             1922 win32/win32.c      if (trap.fd_count < FD_SETSIZE)
trap             1923 win32/win32.c  	trap.fd_array[trap.fd_count++] = (SOCKET)interrupted_event;
trap             1925 win32/win32.c      ex = &trap;


trnext

trnext           3033 string.c       	while ((c = trnext(&trsrc)) >= 0) {
trnext           3036 string.c       	while ((c = trnext(&trrepl)) >= 0)
trnext           3050 string.c       	while ((c = trnext(&trsrc)) >= 0) {
trnext           3051 string.c       	    r = trnext(&trrepl);
trnext           3166 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 ); \


typeinfo_from_ole

typeinfo_from_ole 2892 ext/win32ole/win32ole.c     hr = typeinfo_from_ole(pole, &pTypeInfo);
typeinfo_from_ole 3237 ext/win32ole/win32ole.c     hr = typeinfo_from_ole(pole, &pTypeInfo);


typelib_file

typelib_file     1604 ext/win32ole/win32ole.c         file = typelib_file(ole);
typelib_file     3268 ext/win32ole/win32ole.c         file = typelib_file(typelib);
typelib_file     3463 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             363 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            475 ext/socket/getaddrinfo.c 			u_long v4a;
u_long            154 ext/socket/getnameinfo.c 	u_long v4a;
u_long            481 missing/vsnprintf.c 	u_long	ulval;		/* integer arguments %[diouxX] */
u_long            547 missing/vsnprintf.c 	(flags&LONGINT ? va_arg(ap, u_long) : \
u_long            548 missing/vsnprintf.c 	    flags&SHORTINT ? (u_long)(u_short)va_arg(ap, int) : \
u_long            549 missing/vsnprintf.c 	    (u_long)va_arg(ap, u_int))
u_long            785 missing/vsnprintf.c 			uqval = (u_long)va_arg(ap, void *);
u_long            788 missing/vsnprintf.c 			ulval = (u_long)va_arg(ap, void *);
u_long           2415 win32/win32.c      u_long ioctlArg;


u_short

u_short           113 ext/socket/getaddrinfo.c 	u_short	si_port;
u_short           288 ext/socket/getaddrinfo.c 	u_short port;
u_short           554 ext/socket/getaddrinfo.c 	u_short port = port0 & 0xffff;
u_short           599 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           548 missing/vsnprintf.c 	    flags&SHORTINT ? (u_long)(u_short)va_arg(ap, int) : \


uid_t

uid_t              76 file.c         be_chown(const char *path, uid_t owner, gid_t group)
uid_t              88 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            2272 file.c         	omask = umask(0);
umask            2273 file.c         	umask(omask);
umask            2276 file.c         	omask = umask(NUM2INT(argv[0]));


umethod_bind

umethod_bind      194 eval.c         static VALUE umethod_bind _((VALUE, VALUE));
umethod_bind     5712 eval.c         	result = method_call(argc, argv, umethod_bind(body->nd_cval, recv));
umethod_bind     9504 eval.c             rb_define_method(rb_cUnboundMethod, "bind", umethod_bind, 1);


undef_getter

undef_getter      328 variable.c     static VALUE undef_getter();
undef_getter      354 variable.c     	var->getter = undef_getter;
undef_getter      754 variable.c         if (entry->var->getter == undef_getter) return Qfalse;


undef_marker

undef_marker      330 variable.c     static void  undef_marker();
undef_marker      356 variable.c     	var->marker = undef_marker;


undef_setter

undef_setter      329 variable.c     static void  undef_setter();
undef_setter      355 variable.c     	var->setter = undef_setter;


ungetc

ungetc           1722 ext/zlib/zlib.c     int ungetc;
ungetc           1776 ext/zlib/zlib.c     gz->ungetc = 0;
ungetc           1792 ext/zlib/zlib.c     gz->ungetc = 0;
ungetc           2115 ext/zlib/zlib.c     if (RSTRING(str)->len <= gz->ungetc) {
ungetc           2116 ext/zlib/zlib.c 	gz->ungetc -= RSTRING(str)->len;
ungetc           2119 ext/zlib/zlib.c 	gz->crc = crc32(gz->crc, RSTRING(str)->ptr + gz->ungetc,
ungetc           2120 ext/zlib/zlib.c 			RSTRING(str)->len - gz->ungetc);
ungetc           2121 ext/zlib/zlib.c 	gz->ungetc = 0;
ungetc           2182 ext/zlib/zlib.c     gz->ungetc++;
ungetc            821 io.c           	ungetc(ch, fptr->f);
ungetc           1508 io.c           	    ungetc(c, f);
ungetc           1995 io.c               if (ungetc(cc, fptr->f) == EOF && cc != EOF) {


unix_s_socketpair

unix_s_socketpair 3202 ext/socket/socket.c     rb_define_singleton_method(rb_cUNIXSocket, "socketpair", unix_s_socketpair, -1);
unix_s_socketpair 3203 ext/socket/socket.c     rb_define_singleton_method(rb_cUNIXSocket, "pair", unix_s_socketpair, -1);


unixaddr

unixaddr          523 ext/socket/socket.c static VALUE unixaddr _((struct sockaddr_un*));
unixaddr          597 ext/socket/socket.c 	return rb_assoc_new(str, unixaddr((struct sockaddr_un*)buf));
unixaddr         1900 ext/socket/socket.c     return unixaddr(&addr);
unixaddr         1917 ext/socket/socket.c     return unixaddr(&addr);


unixtime_to_filetime

unixtime_to_filetime 3461 win32/win32.c      if (unixtime_to_filetime(times->actime, &atime)) {
unixtime_to_filetime 3464 win32/win32.c      if (unixtime_to_filetime(times->modtime, &mtime)) {


unknown_node

unknown_node     4036 eval.c         	unknown_node(node);
unknown_node     5861 eval.c         	unknown_node(body);


unlink

unlink            871 ext/nkf/nkf-utf8/nkf.c                   if (unlink(origfname)){
unlink           2181 file.c             if (unlink(path) < 0)
unlink           2237 file.c         		unlink(dst) == 0 &&
unlink           4265 io.c           			(void)unlink(RSTRING(str)->ptr);
unlink           4281 io.c           			if (unlink(fn) < 0) {


unlink_internal

unlink_internal  2175 file.c         static void unlink_internal _((const char *, void *));
unlink_internal  2202 file.c             n = apply2files(unlink_internal, args, 0);


unlink_undef

unlink_undef      681 dln.c          		    unlink_undef(key, old_sym->n_value);
unlink_undef      762 dln.c          		unlink_undef(key, sym->n_value);


unsigned_time_t

unsigned_time_t  1276 time.c             unsigned_time_t sec_off;
unsigned_time_t  1285 time.c             sec_off = (unsigned_time_t)f;


update_i

update_i          488 ext/dbm/dbm.c      rb_iterate(each_pair, other, update_i, obj);
update_i          497 ext/dbm/dbm.c      rb_iterate(each_pair, other, update_i, obj);
update_i          591 ext/gdbm/gdbm.c     rb_iterate(each_pair, other, update_i, obj);
update_i          600 ext/gdbm/gdbm.c     rb_iterate(each_pair, other, update_i, obj);
update_i          467 ext/sdbm/init.c     rb_iterate(each_pair, other, update_i, obj);
update_i          476 ext/sdbm/init.c     rb_iterate(each_pair, other, update_i, obj);


url_getc

url_getc          415 ext/nkf/nkf-utf8/nkf.c STATIC int url_getc PROTO((FILE *f));
url_getc         1846 ext/nkf/nkf-utf8/nkf.c         i_ugetc = i_getc; i_getc = url_getc;


url_ungetc

url_ungetc        416 ext/nkf/nkf-utf8/nkf.c STATIC int url_ungetc PROTO((int c,FILE *f));
url_ungetc       1847 ext/nkf/nkf-utf8/nkf.c         i_uungetc = i_ungetc; i_ungetc= url_ungetc;


usage

usage             347 ext/nkf/nkf-utf8/nkf.c STATIC  void    usage PROTO(());
usage            1147 ext/nkf/nkf-utf8/nkf.c             usage();
usage             547 ruby.c         	    usage(origargv[0]);
usage             697 ruby.c         		usage(origargv[0]);


uscore_get

uscore_get       2302 string.c           return rb_str_sub_bang(argc, argv, uscore_get());
uscore_get       2319 string.c           VALUE str = rb_str_dup(uscore_get());
uscore_get       2345 string.c           return rb_str_gsub_bang(argc, argv, uscore_get());
uscore_get       2366 string.c           VALUE str = rb_str_dup(uscore_get());
uscore_get       3625 string.c           return rb_str_split_m(argc, argv, uscore_get());
uscore_get       3821 string.c           return rb_str_chop_bang(uscore_get());
uscore_get       3845 string.c           VALUE str = uscore_get();
uscore_get       3987 string.c           return rb_str_chomp_bang(argc, argv, uscore_get());
uscore_get       4012 string.c           VALUE str = uscore_get();
uscore_get       4288 string.c           return rb_str_scan(uscore_get(), pat);


utf8_firstbyte

utf8_firstbyte    476 regex.c         ((current_mbctype != MBCTYPE_UTF8) ? ((c<0x100) ? (c) : (((c)>>8)&0xff)) : utf8_firstbyte(c))
utf8_firstbyte    516 regex.c              printf("%c%c", (int)utf8_firstbyte(c), (int)(c & 0x3f));
utf8_firstbyte    518 regex.c              printf("%c%c%c", (int)utf8_firstbyte(c), (int)((c >> 6) & 0x3f),
utf8_firstbyte    521 regex.c              printf("%c%c%c%c", (int)utf8_firstbyte(c), (int)((c >> 12) & 0x3f),
utf8_firstbyte    524 regex.c              printf("%c%c%c%c%c", (int)utf8_firstbyte(c), (int)((c >> 18) & 0x3f),
utf8_firstbyte    527 regex.c              printf("%c%c%c%c%c%c", (int)utf8_firstbyte(c), (int)((c >> 24) & 0x3f),


utf8_startpos

utf8_startpos     483 regex.c        static unsigned int utf8_startpos _((const char *string, unsigned int pos));
utf8_startpos     486 regex.c          asc_startpos, euc_startpos, sjis_startpos, utf8_startpos


utf8_to_uv

utf8_to_uv        373 pack.c         static unsigned long utf8_to_uv _((char*,long*));
utf8_to_uv       1722 pack.c         		l = utf8_to_uv(s, &alen);


utime

utime             860 ext/nkf/nkf-utf8/nkf.c                   if (utime(outfname, tb)) {
utime             866 ext/nkf/nkf-utf8/nkf.c                   if (utime(outfname, &tb)) {
utime            2029 file.c             if (utime(path, utp) < 0)
utime            3335 process.c          volatile VALUE utime, stime, cutime, sctime;
utime            3339 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   1973 file.c         static void utime_internal _((const char *, void *));
utime_internal   2010 file.c             n = apply2files(utime_internal, rest, tvp);
utime_internal   2050 file.c             n = apply2files(utime_internal, rest, &utbuf);


uv_to_utf8

uv_to_utf8        372 pack.c         static int uv_to_utf8 _((char*,unsigned long));
uv_to_utf8        880 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            172 array.c        	RARRAY(ary)->ptr[i] = va_arg(ar, VALUE);
va_arg            972 class.c        	    var = va_arg(vargs, VALUE*);
va_arg            984 class.c        	    var = va_arg(vargs, VALUE*);
va_arg            997 class.c        	var = va_arg(vargs, VALUE*);
va_arg           1009 class.c        	var = va_arg(vargs, VALUE*);
va_arg           5000 eval.c         	rb_ary_push(ary, va_arg(args, VALUE));
va_arg           5288 eval.c         	while (eclass = va_arg(args, VALUE)) {
va_arg           5989 eval.c         	    argv[i] = va_arg(*ar, VALUE);
va_arg            543 missing/vsnprintf.c 	(flags&LONGINT ? va_arg(ap, long) : \
va_arg            544 missing/vsnprintf.c 	    flags&SHORTINT ? (long)(short)va_arg(ap, int) : \
va_arg            545 missing/vsnprintf.c 	    (long)va_arg(ap, int))
va_arg            547 missing/vsnprintf.c 	(flags&LONGINT ? va_arg(ap, u_long) : \
va_arg            548 missing/vsnprintf.c 	    flags&SHORTINT ? (u_long)(u_short)va_arg(ap, int) : \
va_arg            549 missing/vsnprintf.c 	    (u_long)va_arg(ap, u_int))
va_arg            603 missing/vsnprintf.c 			if ((width = va_arg(ap, int)) >= 0)
va_arg            615 missing/vsnprintf.c 				n = va_arg(ap, int);
va_arg            660 missing/vsnprintf.c 			*(cp = buf) = va_arg(ap, int);
va_arg            671 missing/vsnprintf.c 				uqval = va_arg(ap, quad_t);
va_arg            702 missing/vsnprintf.c fp_begin:		_double = va_arg(ap, double);
va_arg            753 missing/vsnprintf.c 				*va_arg(ap, quad_t *) = ret;
va_arg            758 missing/vsnprintf.c 				*va_arg(ap, long *) = ret;
va_arg            760 missing/vsnprintf.c 				*va_arg(ap, short *) = ret;
va_arg            762 missing/vsnprintf.c 				*va_arg(ap, int *) = ret;
va_arg            770 missing/vsnprintf.c 				uqval = va_arg(ap, u_quad_t);
va_arg            785 missing/vsnprintf.c 			uqval = (u_long)va_arg(ap, void *);
va_arg            788 missing/vsnprintf.c 			ulval = (u_long)va_arg(ap, void *);
va_arg            800 missing/vsnprintf.c 			if ((cp = va_arg(ap, char *)) == NULL)
va_arg            826 missing/vsnprintf.c 				uqval = va_arg(ap, u_quad_t);
va_arg            840 missing/vsnprintf.c 				uqval = va_arg(ap, u_quad_t);
va_arg            255 struct.c           while (mem = va_arg(ar, char*)) {
va_arg            400 struct.c       	mem[i] = va_arg(args, VALUE);
va_arg           2427 win32/win32.c      arg = va_arg(va, int);


va_end

va_end            174 array.c            va_end(ar);
va_end           1018 class.c            va_end(vargs);
va_end             93 error.c            va_end(args);
va_end            111 error.c            va_end(args);
va_end            147 error.c            va_end(args);
va_end            169 error.c            va_end(args);
va_end            210 error.c        	va_end(args);
va_end            610 error.c            va_end(args);
va_end           1060 error.c            va_end(args);
va_end           1078 error.c            va_end(args);
va_end           1104 error.c            va_end(args);
va_end           1148 error.c             va_end(args);
va_end           1126 eval.c             va_end(args);
va_end           5002 eval.c             va_end(args);
va_end           5294 eval.c         	va_end(args);
va_end           5991 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            584 ext/win32ole/win32ole.c     va_end(args);
va_end           1133 missing/vsnprintf.c 	va_end(ap);
va_end            259 struct.c           va_end(ar);
va_end            402 struct.c           va_end(args);
va_end           2428 win32/win32.c      va_end(va);
va_end           3503 win32/win32.c      va_end(va);


va_init_list

va_init_list      170 array.c            va_init_list(ar, n);
va_init_list      963 class.c            va_init_list(vargs, fmt);
va_init_list       91 error.c            va_init_list(args, fmt);
va_init_list      109 error.c            va_init_list(args, fmt);
va_init_list      145 error.c            va_init_list(args, fmt);
va_init_list      167 error.c            va_init_list(args, fmt);
va_init_list      208 error.c        	va_init_list(args, fmt);
va_init_list      608 error.c            va_init_list(args, fmt);
va_init_list     1058 error.c            va_init_list(args,fmt);
va_init_list     1076 error.c            va_init_list(args, fmt);
va_init_list     1102 error.c            va_init_list(args, fmt);
va_init_list     1146 error.c             va_init_list(args, fmt);
va_init_list     1124 eval.c             va_init_list(args, fmt);
va_init_list     4998 eval.c             va_init_list(args, n);
va_init_list     5287 eval.c         	va_init_list(args, data2);
va_init_list     6012 eval.c             va_init_list(ar, n);
va_init_list     6032 eval.c             va_init_list(ar, n);
va_init_list      653 ext/tk/tcltklib.c     va_init_list(args,fmt);
va_init_list      582 ext/win32ole/win32ole.c     va_init_list(args, fmt);
va_init_list      254 struct.c           va_init_list(ar, name);
va_init_list      398 struct.c           va_init_list(args, klass);


va_list

va_list           164 array.c            va_list ar;
va_list           961 class.c            va_list vargs;
va_list            89 error.c            va_list args;
va_list           106 error.c            va_list args;
va_list           139 error.c            va_list args;
va_list           161 error.c            va_list args;
va_list           201 error.c            va_list args;
va_list           605 error.c            va_list args;
va_list          1055 error.c            va_list args;
va_list          1073 error.c            va_list args;
va_list          1099 error.c            va_list args;
va_list          1136 error.c             va_list args;
va_list          1122 eval.c             va_list args;
va_list          4991 eval.c             va_list args;
va_list          5272 eval.c             va_list args;
va_list          6011 eval.c             va_list ar;
va_list          6030 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           579 ext/win32ole/win32ole.c     va_list args;
va_list            82 missing/vsnprintf.c #define	_BSD_VA_LIST_ va_list
va_list          1117 missing/vsnprintf.c 	va_list ap;
va_list           246 struct.c           va_list ar;
va_list           393 struct.c           va_list args;
va_list          2412 win32/win32.c      va_list va;
va_list          3499 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          149 array.c        #define va_init_list(a,b) va_start(a,b)
va_start          152 array.c        #define va_init_list(a,b) va_start(a)
va_start          941 class.c        #define va_init_list(a,b) va_start(a,b)
va_start          944 class.c        #define va_init_list(a,b) va_start(a)
va_start           20 error.c        #define va_init_list(a,b) va_start(a,b)
va_start           23 error.c        #define va_init_list(a,b) va_start(a)
va_start           68 eval.c         #define va_init_list(a,b) va_start(a,b)
va_start           71 eval.c         #define va_init_list(a,b) va_start(a)
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           27 ext/win32ole/win32ole.c #define va_init_list(a,b) va_start(a,b)
va_start           30 ext/win32ole/win32ole.c #define va_init_list(a,b) va_start(a)
va_start         1124 missing/vsnprintf.c 	va_start(ap, fmt);
va_start         1126 missing/vsnprintf.c 	va_start(ap);
va_start          231 struct.c       #define va_init_list(a,b) va_start(a,b)
va_start          234 struct.c       #define va_init_list(a,b) va_start(a)
va_start         2426 win32/win32.c      va_start(va, cmd);
va_start         3501 win32/win32.c      va_start(va, format);


vafuncall

vafuncall        6014 eval.c             return vafuncall(recv, mid, n, &ar);
vafuncall        6036 eval.c         	result = vafuncall(recv, mid, n, &ar);


val_getter

val_getter        332 variable.c     static VALUE val_getter();
val_getter        381 variable.c         var->getter = val_getter;
val_getter        532 variable.c         if (!getter) getter = val_getter;


val_marker

val_marker        334 variable.c     static void  val_marker();
val_marker        383 variable.c         var->marker = val_marker;


val_setter

val_setter        333 variable.c     static void  val_setter();
val_setter        382 variable.c         var->setter = val_setter;


valid_filename

valid_filename    148 util.c         static int valid_filename(char *s);
valid_filename    179 util.c             if (valid_filename(RSTRING(str)->ptr)) return;


value_expr

value_expr       3869 parse.c        			value_expr(yyvsp[0].node);
value_expr       3877 parse.c        			value_expr(yyvsp[0].node);
value_expr       3906 parse.c        			value_expr(yyvsp[0].node);
value_expr       3925 parse.c        			value_expr(yyvsp[0].node);
value_expr       3939 parse.c        			value_expr(yyvsp[0].node);
value_expr       3953 parse.c        			value_expr(yyvsp[0].node);
value_expr       4018 parse.c        			value_expr(yyval.node);
value_expr       4493 parse.c        			value_expr(yyvsp[0].node);
value_expr       4522 parse.c        			value_expr(yyvsp[0].node);
value_expr       4541 parse.c        			value_expr(yyvsp[0].node);
value_expr       4555 parse.c        			value_expr(yyvsp[0].node);
value_expr       4569 parse.c        			value_expr(yyvsp[0].node);
value_expr       4604 parse.c        			value_expr(yyvsp[-2].node);
value_expr       4605 parse.c        			value_expr(yyvsp[0].node);
value_expr       4619 parse.c        			value_expr(yyvsp[-2].node);
value_expr       4620 parse.c        			value_expr(yyvsp[0].node);
value_expr       4837 parse.c        			value_expr(yyvsp[0].node);
value_expr       4857 parse.c        			value_expr(yyvsp[-1].node);
value_expr       4870 parse.c        			value_expr(yyvsp[-1].node);
value_expr       4944 parse.c        			value_expr(yyvsp[-1].node);
value_expr       5467 parse.c        			value_expr(yyvsp[0].node);
value_expr       6168 parse.c        		            value_expr(yyval.node);
value_expr       6194 parse.c        				value_expr(yyvsp[-2].node);
value_expr       8761 parse.c            value_expr(recv);
value_expr       8763 parse.c        	value_expr(arg1);
value_expr       8779 parse.c            value_expr(node1);
value_expr       8780 parse.c            value_expr(node2);
value_expr       8864 parse.c            value_expr(val);
value_expr       8926 parse.c        	value_expr(recv);
value_expr       8947 parse.c        	value_expr(recv);
value_expr       8994 parse.c            value_expr(rhs);
value_expr       9055 parse.c        	    if (!value_expr(node->nd_body)) return Qfalse;
value_expr       9288 parse.c            value_expr(node);
value_expr       9392 parse.c            value_expr(node);
value_expr       9405 parse.c            value_expr(left);
value_expr        510 parse.y        			value_expr($3);
value_expr        516 parse.y        			value_expr($3);
value_expr        543 parse.y        			value_expr($6);
value_expr        560 parse.y        			value_expr($5);
value_expr        572 parse.y        			value_expr($5);
value_expr        584 parse.y        			value_expr($5);
value_expr        638 parse.y        			value_expr($$);
value_expr        980 parse.y        			value_expr($3);
value_expr       1007 parse.y        			value_expr($6);
value_expr       1024 parse.y        			value_expr($5);
value_expr       1036 parse.y        			value_expr($5);
value_expr       1048 parse.y        			value_expr($5);
value_expr       1075 parse.y        			value_expr($1);
value_expr       1076 parse.y        			value_expr($3);
value_expr       1088 parse.y        			value_expr($1);
value_expr       1089 parse.y        			value_expr($3);
value_expr       1238 parse.y        			value_expr($1);
value_expr       1255 parse.y        			value_expr($4);
value_expr       1264 parse.y        			value_expr($2);
value_expr       1324 parse.y        			value_expr($6);
value_expr       1727 parse.y        			value_expr($1);
value_expr       2378 parse.y        		            value_expr($$);
value_expr       2398 parse.y        				value_expr($3);
value_expr       4763 parse.y            value_expr(recv);
value_expr       4765 parse.y        	value_expr(arg1);
value_expr       4781 parse.y            value_expr(node1);
value_expr       4782 parse.y            value_expr(node2);
value_expr       4866 parse.y            value_expr(val);
value_expr       4928 parse.y        	value_expr(recv);
value_expr       4949 parse.y        	value_expr(recv);
value_expr       4996 parse.y            value_expr(rhs);
value_expr       5057 parse.y        	    if (!value_expr(node->nd_body)) return Qfalse;
value_expr       5290 parse.y            value_expr(node);
value_expr       5394 parse.y            value_expr(node);
value_expr       5407 parse.y            value_expr(left);


value_expr0

value_expr0       230 parse.c        static int value_expr0();
value_expr0       234 parse.c        #define value_expr(node) value_expr0((node) = remove_begin(node))
value_expr0       133 parse.y        static int value_expr0();
value_expr0       137 parse.y        #define value_expr(node) value_expr0((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        336 variable.c     static VALUE var_getter();
var_getter        505 variable.c         gvar->getter = getter?getter:var_getter;


var_marker

var_marker        338 variable.c     static void  var_marker();
var_marker        507 variable.c         gvar->marker = var_marker;


var_setter

var_setter        337 variable.c     static void  var_setter();
var_setter        506 variable.c         gvar->setter = setter?setter:var_setter;


verbose_setter

verbose_setter   1132 ruby.c             rb_define_hooked_variable("$VERBOSE", &ruby_verbose, 0, verbose_setter);
verbose_setter   1133 ruby.c             rb_define_hooked_variable("$-v", &ruby_verbose, 0, verbose_setter);
verbose_setter   1134 ruby.c             rb_define_hooked_variable("$-w", &ruby_verbose, 0, verbose_setter);


version

version           348 ext/nkf/nkf-utf8/nkf.c STATIC  void    version PROTO(());
version          1143 ext/nkf/nkf-utf8/nkf.c             version();
version          4772 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           463 ruby.c             int version = 0;
version           689 ruby.c         		version = 1;
version           761 ruby.c             if (version) {
version           351 win32/win32.c      WORD version;
version          1940 win32/win32.c      WORD version;
version          1949 win32/win32.c      version = MAKEWORD(1, 1);
version          1950 win32/win32.c      if (ret = WSAStartup(version, &retdata))


vms_fileact

vms_fileact      1276 dln.c          static int vms_fileact(char *filespec, int type);
vms_fileact      1594 dln.c          	decc$to_vms(file, vms_fileact, 0, 0);


vms_fisexh

vms_fisexh       1277 dln.c          static long vms_fisexh(long *sigarr, long *mecarr);
vms_fisexh       1610 dln.c          	lib$establish(vms_fisexh);


void_expr

void_expr        3682 parse.c        			    if (nd_type(yyvsp[0].node) != NODE_BLOCK) void_expr(yyvsp[0].node);
void_expr        3688 parse.c        				void_expr(node->nd_head);
void_expr        9183 parse.c        	void_expr(node->nd_head);
void_expr         355 parse.y        			    if (nd_type($2) != NODE_BLOCK) void_expr($2);
void_expr         361 parse.y        				void_expr(node->nd_head);
void_expr        5185 parse.y        	void_expr(node->nd_head);


void_expr0

void_expr0        231 parse.c        static void void_expr0();
void_expr0        235 parse.c        #define void_expr(node) void_expr0((node) = remove_begin(node))
void_expr0        134 parse.y        static void void_expr0();
void_expr0        138 parse.y        #define void_expr(node) void_expr0((node) = remove_begin(node))


void_stmts

void_stmts        232 parse.c        static void void_stmts();
void_stmts       3716 parse.c        			void_stmts(yyvsp[-1].node);
void_stmts        135 parse.y        static void void_stmts();
void_stmts        392 parse.y        			void_stmts($1);


vsnprintf

vsnprintf          64 error.c        	vsnprintf((char*)buf+n, len-n, fmt, args);
vsnprintf         110 error.c            vsnprintf(buf, BUFSIZ, fmt, args);
vsnprintf         609 error.c            vsnprintf(buf, BUFSIZ, fmt, args);
vsnprintf        1059 error.c            vsnprintf(buf, BUFSIZ, fmt, args);
vsnprintf        1077 error.c            vsnprintf(buf, BUFSIZ, fmt, args);
vsnprintf        1103 error.c            vsnprintf(buf, BUFSIZ, fmt, args);
vsnprintf        1125 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         583 ext/win32ole/win32ole.c     vsnprintf(buf, BUFSIZ, fmt, args);
vsnprintf         135 missing.h      extern int vsnprintf _((char *, size_t n, char const *, va_list));
vsnprintf           8 vms/vms.h      extern int vsnprintf();
vsnprintf        3502 win32/win32.c      ret = vsnprintf(buf, size, format, va);


vtohd

vtohd             323 pack.c         			 y = vtohd((DOUBLE_SWAPPER)y),	\
vtohd             331 pack.c         #define VTOHD(x,y)	vtohd(x)


vtohf

vtohf             297 pack.c         			 y = vtohf((FLOAT_SWAPPER)y),	\
vtohf             305 pack.c         #define VTOHF(x,y)	vtohf(x)


w16_status

w16_status        467 ext/nkf/nkf-utf8/nkf.c STATIC void w16_status PROTO((struct input_code *, int));
w16_status        475 ext/nkf/nkf-utf8/nkf.c     {"UTF-16",    0, 0, 0, {0, 0, 0}, w16_status, w_iconv16, 0},


w16e_conv

w16e_conv        2590 ext/nkf/nkf-utf8/nkf.c     ret = w16e_conv(((c2<<8)&0xff00) + c1, &c2, &c1);
w16e_conv        2772 ext/nkf/nkf-utf8/nkf.c         w16e_conv(c1, &c2, &c1);
w16e_conv        2898 ext/nkf/nkf-utf8/nkf.c         w16e_conv(c1, &c2, &c1);
w16e_conv        2957 ext/nkf/nkf-utf8/nkf.c         w16e_conv(c1, &c2, &c1);


w16w_conv

w16w_conv        2544 ext/nkf/nkf-utf8/nkf.c     w16w_conv(val, &c2, &c1, &c0);
w16w_conv        2689 ext/nkf/nkf-utf8/nkf.c         w16w_conv(c1, &c2, &c1, &c0);
w16w_conv        2710 ext/nkf/nkf-utf8/nkf.c             w16w_conv(val, &c2, &c1, &c0);


w2e_conv

w2e_conv          298 ext/nkf/nkf-utf8/nkf.c STATIC  int     w2e_conv PROTO((int c2,int c1,int c0,int *p2,int *p1));
w2e_conv         1699 ext/nkf/nkf-utf8/nkf.c                   w2e_conv(ptr->buf[0], ptr->buf[1], ptr->buf[2],
w2e_conv         2487 ext/nkf/nkf-utf8/nkf.c     int 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            159 marshal.c          w_byte((x >> 0) & 0xff, arg);
w_byte            160 marshal.c          w_byte((x >> 8) & 0xff, arg);
w_byte            179 marshal.c      	w_byte(0, arg);
w_byte            183 marshal.c      	w_byte(x + 5, arg);
w_byte            187 marshal.c      	w_byte((x - 5)&0xff, arg);
w_byte            204 marshal.c      	w_byte(buf[i], arg);
w_byte            335 marshal.c      	w_byte(TYPE_SYMLINK, arg);
w_byte            339 marshal.c      	w_byte(TYPE_SYMBOL, arg);
w_byte            385 marshal.c      	w_byte(TYPE_EXTENDED, arg);
w_byte            402 marshal.c          w_byte(type, arg);
w_byte            417 marshal.c      	w_byte(TYPE_UCLASS, arg);
w_byte            466 marshal.c      	w_byte(TYPE_LINK, arg);
w_byte            472 marshal.c      	w_byte(TYPE_IVAR, arg);
w_byte            475 marshal.c      	w_byte(TYPE_NIL, arg);
w_byte            478 marshal.c      	w_byte(TYPE_TRUE, arg);
w_byte            481 marshal.c      	w_byte(TYPE_FALSE, arg);
w_byte            485 marshal.c      	w_byte(TYPE_FIXNUM, arg);
w_byte            489 marshal.c      	    w_byte(TYPE_FIXNUM, arg);
w_byte            521 marshal.c      		w_byte(TYPE_IVAR, arg);
w_byte            536 marshal.c      	    w_byte(TYPE_CLASS, arg);
w_byte            544 marshal.c      	    w_byte(TYPE_MODULE, arg);
w_byte            552 marshal.c      	    w_byte(TYPE_FLOAT, arg);
w_byte            557 marshal.c      	    w_byte(TYPE_BIGNUM, arg);
w_byte            563 marshal.c      		w_byte(sign, arg);
w_byte            585 marshal.c      	    w_byte(TYPE_STRING, arg);
w_byte            591 marshal.c      	    w_byte(TYPE_REGEXP, arg);
w_byte            593 marshal.c      	    w_byte(rb_reg_options(obj), arg);
w_byte            598 marshal.c      	    w_byte(TYPE_ARRAY, arg);
w_byte            614 marshal.c      		w_byte(TYPE_HASH, arg);
w_byte            621 marshal.c      		w_byte(TYPE_HASH_DEF, arg);
w_byte            773 marshal.c          w_byte(MARSHAL_MAJOR, &arg);
w_byte            774 marshal.c          w_byte(MARSHAL_MINOR, &arg);


w_bytes

w_bytes           320 marshal.c      	w_bytes(buf, len + save_mantissa(d, buf + len), arg);
w_bytes           323 marshal.c          w_bytes(buf, strlen(buf), arg);
w_bytes           340 marshal.c      	w_bytes(sym, strlen(sym), arg);
w_bytes           524 marshal.c      	    w_bytes(RSTRING(v)->ptr, RSTRING(v)->len, arg);
w_bytes           539 marshal.c      		w_bytes(RSTRING(path)->ptr, RSTRING(path)->len, arg);
w_bytes           547 marshal.c      		w_bytes(RSTRING(path)->ptr, RSTRING(path)->len, arg);
w_bytes           586 marshal.c      	    w_bytes(RSTRING(obj)->ptr, RSTRING(obj)->len, arg);
w_bytes           592 marshal.c      	    w_bytes(RREGEXP(obj)->str, RREGEXP(obj)->len, arg);


w_class

w_class           508 marshal.c      	    w_class(TYPE_USRMARSHAL, obj, arg, Qfalse);
w_class           523 marshal.c      	    w_class(TYPE_USERDEF, obj, arg, Qfalse);
w_class           631 marshal.c      	    w_class(TYPE_STRUCT, obj, arg, Qtrue);
w_class           647 marshal.c      	    w_class(TYPE_OBJECT, obj, arg, Qtrue);
w_class           655 marshal.c      		w_class(TYPE_DATA, obj, arg, Qtrue);


w_extended

w_extended        401 marshal.c          w_extended(klass, arg, check);
w_extended        414 marshal.c          w_extended(klass, arg, Qtrue);


w_iconv

w_iconv           299 ext/nkf/nkf-utf8/nkf.c STATIC  int     w_iconv PROTO((int c2,int c1,int c0));
w_iconv           474 ext/nkf/nkf-utf8/nkf.c     {"UTF-8",     0, 0, 0, {0, 0, 0}, w_status, w_iconv, 0},
w_iconv          1870 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, w_iconv);
w_iconv          3494 ext/nkf/nkf-utf8/nkf.c     w_iconv, w_iconv,


w_iconv16

w_iconv16         300 ext/nkf/nkf-utf8/nkf.c STATIC  int     w_iconv16 PROTO((int c2,int c1,int c0));
w_iconv16         475 ext/nkf/nkf-utf8/nkf.c     {"UTF-16",    0, 0, 0, {0, 0, 0}, w16_status, w_iconv16, 0},
w_iconv16        1872 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, w_iconv16);
w_iconv16        1874 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, w_iconv16);
w_iconv16        1947 ext/nkf/nkf-utf8/nkf.c                 iconv == w_iconv16


w_iconv_common

w_iconv_common    301 ext/nkf/nkf-utf8/nkf.c STATIC  int	w_iconv_common PROTO((int c1,int c0,unsigned short **pp,int psize,int *p2,int *p1));
w_iconv_common   2462 ext/nkf/nkf-utf8/nkf.c             ret = w_iconv_common(c1, c0, pp, sizeof_utf8_to_euc_C2, p2, p1);
w_iconv_common   2464 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   2549 ext/nkf/nkf-utf8/nkf.c             ret =  w_iconv_common(c1, c0, pp, psize, p2, p1);
w_iconv_common   2553 ext/nkf/nkf-utf8/nkf.c             ret =  w_iconv_common(c2, c1, pp, psize, p2, p1);


w_ivar

w_ivar            510 marshal.c      	    if (ivtbl) w_ivar(0, &c_arg);
w_ivar            526 marshal.c      		w_ivar(ivtbl, &c_arg);
w_ivar            648 marshal.c      	    w_ivar(ROBJECT(obj)->iv_tbl, &c_arg);
w_ivar            673 marshal.c      	w_ivar(ivtbl, &c_arg);


w_long

w_long            119 marshal.c      static void w_long _((long, struct dump_arg*));
w_long            150 marshal.c          w_long(n, arg);
w_long            336 marshal.c      	w_long((long)num, arg);
w_long            439 marshal.c      	w_long(tbl->num_entries, arg->arg);
w_long            443 marshal.c      	w_long(0, arg->arg);
w_long            467 marshal.c      	w_long((long)num, arg);
w_long            486 marshal.c      	w_long(FIX2INT(obj), arg);
w_long            490 marshal.c      	    w_long(FIX2LONG(obj), arg);
w_long            564 marshal.c      		w_long(SHORTLEN(len), arg); /* w_short? */
w_long            603 marshal.c      		w_long(len, arg);
w_long            623 marshal.c      	    w_long(RHASH(obj)->tbl->num_entries, arg);
w_long            637 marshal.c      		w_long(len, arg);


w_nbyte

w_nbyte           141 marshal.c          w_nbyte(&c, 1, arg);
w_nbyte           151 marshal.c          w_nbyte(s, n, arg);


w_object

w_object          356 marshal.c      static void w_object _((VALUE,struct dump_arg*,int));
w_object          363 marshal.c          w_object(key, arg->arg, arg->limit);
w_object          364 marshal.c          w_object(value, arg->arg, arg->limit);
w_object          429 marshal.c          w_object(value, arg->arg, arg->limit);
w_object          493 marshal.c      	    w_object(rb_int2big(FIX2LONG(obj)), arg, limit);
w_object          509 marshal.c      	    w_object(v, arg, limit);
w_object          605 marshal.c      		    w_object(*ptr, arg, limit);
w_object          626 marshal.c      		w_object(RHASH(obj)->ifnone, arg, limit);
w_object          641 marshal.c      		    w_object(RSTRUCT(obj)->ptr[i], arg, limit);
w_object          662 marshal.c      		w_object(v, arg, limit);
w_object          681 marshal.c          w_object(arg->obj, arg->arg, arg->limit);


w_oconv

w_oconv           306 ext/nkf/nkf-utf8/nkf.c STATIC  void    w_oconv PROTO((int c2,int c1));
w_oconv           514 ext/nkf/nkf-utf8/nkf.c #   define  DEFAULT_CONV w_oconv
w_oconv          1168 ext/nkf/nkf-utf8/nkf.c 		output_conv = w_oconv; cp++;
w_oconv          1174 ext/nkf/nkf-utf8/nkf.c                 output_conv = w_oconv;


w_oconv16

w_oconv16         307 ext/nkf/nkf-utf8/nkf.c STATIC  void    w_oconv16 PROTO((int c2,int c1));
w_oconv16        1154 ext/nkf/nkf-utf8/nkf.c 		output_conv = w_oconv16; cp+=2;


w_short

w_short           571 marshal.c      			w_short(num & SHORTMASK, arg);
w_short           576 marshal.c      		    w_short(*d, arg);


w_status

w_status          466 ext/nkf/nkf-utf8/nkf.c STATIC void w_status PROTO((struct input_code *, int));
w_status          474 ext/nkf/nkf-utf8/nkf.c     {"UTF-8",     0, 0, 0, {0, 0, 0}, w_status, w_iconv, 0},


w_symbol

w_symbol          353 marshal.c          w_symbol(rb_intern(s), arg);
w_symbol          428 marshal.c          w_symbol(id, arg->arg);
w_symbol          498 marshal.c      	w_symbol(SYM2ID(obj), arg);
w_symbol          640 marshal.c      		    w_symbol(SYM2ID(RARRAY(mem)->ptr[i]), arg);


w_uclass

w_uclass          584 marshal.c      	    w_uclass(obj, rb_cString, arg);
w_uclass          590 marshal.c      	    w_uclass(obj, rb_cRegexp, arg);
w_uclass          597 marshal.c      	    w_uclass(obj, rb_cArray, arg);
w_uclass          612 marshal.c      	    w_uclass(obj, rb_cHash, arg);


w_unique

w_unique          386 marshal.c      	w_unique(path, arg);
w_unique          404 marshal.c          w_unique(path, arg);
w_unique          418 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              609 process.c      	result = wait(st);
wait              812 process.c      	pid = wait(&status);


wait_events

wait_events        89 win32/win32.c  static DWORD wait_events(HANDLE event, DWORD timeout);
wait_events      2525 win32/win32.c  	    if (wait_events(child->hProcess, timeout) != WAIT_OBJECT_0) {
wait_events      3181 win32/win32.c      RUBY_CRITICAL(ret = wait_events(NULL, msec));
wait_events      3191 win32/win32.c      RUBY_CRITICAL(wait_events(NULL, 0));
wait_events      3286 win32/win32.c  	    if (wait_events(thr, INFINITE) != WAIT_OBJECT_0) {


waitpid

waitpid           578 process.c          result = waitpid(pid, st, flags);
waitpid           205 win32/win32.h  extern rb_pid_t waitpid (rb_pid_t, int *, int);


warn_print

warn_print        146 error.c            warn_print(buf, args);
warn_print        168 error.c            warn_print(buf, args);
warn_print       1147 error.c             warn_print(buf, args);
warn_print       1218 eval.c         	warn_print(": unhandled exception\n");
warn_print       1225 eval.c         	    warn_print(": ");
warn_print       1227 eval.c         	    warn_print("\n");
warn_print       1238 eval.c         	    warn_print(": ");
warn_print       1241 eval.c         		warn_print(" (");
warn_print       1243 eval.c         		warn_print(")\n");
warn_print       1404 eval.c         	warn_print(": unexpected return\n");
warn_print       1408 eval.c         	warn_print(": unexpected next\n");
warn_print       1412 eval.c         	warn_print(": unexpected break\n");
warn_print       1416 eval.c         	warn_print(": unexpected redo\n");
warn_print       1420 eval.c         	warn_print(": retry outside of rescue clause\n");


warn_print2

warn_print2      1201 eval.c         	    warn_print2(RSTRING(mesg)->ptr, RSTRING(mesg)->len);
warn_print2      1226 eval.c         	    warn_print2(RSTRING(epath)->ptr, RSTRING(epath)->len);
warn_print2      1239 eval.c         	    warn_print2(einfo, len);
warn_print2      1242 eval.c         		warn_print2(RSTRING(epath)->ptr, RSTRING(epath)->len);
warn_print2      1246 eval.c         		warn_print2(tail, elen-len-1);


warn_printf

warn_printf      1139 eval.c         	    warn_printf("%s:%d:in `%s'", ruby_sourcefile, ruby_sourceline,
warn_printf      1143 eval.c         	    warn_printf("%s", ruby_sourcefile);
warn_printf      1146 eval.c         	    warn_printf("%s:%d", ruby_sourcefile, ruby_sourceline);
warn_printf      1189 eval.c         	    warn_printf("%s:%d", ruby_sourcefile, ruby_sourceline);
warn_printf      1191 eval.c         	    warn_printf("%d", ruby_sourceline);
warn_printf      1262 eval.c         		warn_printf("\tfrom %s\n", RSTRING(ep->ptr[i])->ptr);
warn_printf      1265 eval.c         		warn_printf("\t ... %ld levels...\n",
warn_printf      1425 eval.c         	    warn_printf("%s:%d: uncaught throw\n",
warn_printf      1430 eval.c         	    warn_printf(": unexpected throw\n");
warn_printf      4486 eval.c         	    warn_printf("Exception `%s' at %s:%d - %s\n",
warn_printf      10583 eval.c         	    warn_printf("deadlock 0x%lx: %s:",
warn_printf      10585 eval.c         	    if (th->wait_for & WAIT_FD) warn_printf("F(%d)", th->fd);
warn_printf      10586 eval.c         	    if (th->wait_for & WAIT_SELECT) warn_printf("S");
warn_printf      10587 eval.c         	    if (th->wait_for & WAIT_TIME) warn_printf("T(%f)", th->delay);
warn_printf      10589 eval.c         		warn_printf("J(0x%lx)", th->join ? th->join->thread : 0);
warn_printf      10590 eval.c         	    if (th->wait_for & WAIT_PID) warn_printf("P");
warn_printf      10591 eval.c         	    if (!th->wait_for) warn_printf("-");
warn_printf      10592 eval.c         	    warn_printf(" %s - %s:%d\n",


warn_unless_e_option

warn_unless_e_option 9296 parse.c        	warn_unless_e_option(node, "integer literal in conditional range");
warn_unless_e_option 9373 parse.c        	    warn_unless_e_option(node, "regex literal in condition");
warn_unless_e_option 5298 parse.y        	warn_unless_e_option(node, "integer literal in conditional range");
warn_unless_e_option 5375 parse.y        	    warn_unless_e_option(node, "regex literal in condition");


warning_unless_e_option

warning_unless_e_option 9340 parse.c        	warning_unless_e_option(node, "regex literal in condition");
warning_unless_e_option 5342 parse.y        	warning_unless_e_option(node, "regex literal in condition");


was_bol

was_bol          7273 parse.c            if (was_bol() && whole_match_p(eos, len, indent)) {
was_bol          7457 parse.c        	if (was_bol()) {
was_bol          8354 parse.c        	if (was_bol() && whole_match_p("__END__", 7, 0)) {
was_bol          3275 parse.y            if (was_bol() && whole_match_p(eos, len, indent)) {
was_bol          3459 parse.y        	if (was_bol()) {
was_bol          4356 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  370 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);


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    7273 parse.c            if (was_bol() && whole_match_p(eos, len, indent)) {
whole_match_p    7303 parse.c        	} while (!whole_match_p(eos, len, indent));
whole_match_p    7327 parse.c        	} while (!whole_match_p(eos, len, indent));
whole_match_p    8354 parse.c        	if (was_bol() && whole_match_p("__END__", 7, 0)) {
whole_match_p    3275 parse.y            if (was_bol() && whole_match_p(eos, len, indent)) {
whole_match_p    3305 parse.y        	} while (!whole_match_p(eos, len, indent));
whole_match_p    3329 parse.y        	} while (!whole_match_p(eos, len, indent));
whole_match_p    4356 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           39 ext/stringio/stringio.c static struct StringIO* writable _((struct StringIO *));
writable          999 ext/stringio/stringio.c     struct StringIO *ptr = writable(StringIO(self));
writable         1058 ext/stringio/stringio.c     struct StringIO *ptr = writable(StringIO(self));
writable         1227 ext/stringio/stringio.c     VALUE string = writable(StringIO(self))->string;


write

write             936 class.c            rb_attr(klass, rb_intern(name), read, write, Qfalse);
write             690 eval.c             if (write) {
write            10735 eval.c             if (!read && !write && !except) {
write            10766 eval.c         	    n = select(max, read, write, except, tvp);
write            10796 eval.c             if (write) curr_thread->writefds = *write;
write            10809 eval.c             if (write) *write = 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             455 io.c           	r = write(fileno(f), RSTRING(str)->ptr+offset, l);
write            2355 io.c               n = write(fileno(f), RSTRING(str)->ptr, RSTRING(str)->len);
write            4551 io.c               VALUE read, write, except, timeout, res, list;
write            4561 io.c               rb_scan_args(argc, argv, "13", &read, &write, &except, &timeout);
write            4592 io.c               if (!NIL_P(write)) {
write            4593 io.c           	Check_Type(write, T_ARRAY);
write            4596 io.c           	for (i=0; i<RARRAY(write)->len; i++) {
write            4597 io.c           	    GetOpenFile(rb_io_get_io(RARRAY(write)->ptr[i]), fptr);
write            4654 io.c           	    for (i=0; i< RARRAY(write)->len; i++) {
write            4655 io.c           		GetOpenFile(rb_io_get_io(RARRAY(write)->ptr[i]), fptr);
write            4657 io.c           		    rb_ary_push(list, rb_ary_entry(write, i));
write            4660 io.c           		    rb_ary_push(list, rb_ary_entry(write, i));


ww16_conv

ww16_conv         302 ext/nkf/nkf-utf8/nkf.c STATIC  int     ww16_conv PROTO((int c2, int c1, int c0));
ww16_conv        2469 ext/nkf/nkf-utf8/nkf.c             if (p1) *p1 = CLASS_UTF16 | ww16_conv(c2, c1, c0);


x0212_shift

x0212_shift       456 ext/nkf/nkf-utf8/nkf.c static int x0212_shift PROTO((int c));
x0212_shift      2880 ext/nkf/nkf-utf8/nkf.c         c2 = x0212_shift(c2);


x0212_unshift

x0212_unshift     457 ext/nkf/nkf-utf8/nkf.c static int x0212_unshift PROTO((int c));
x0212_unshift    2381 ext/nkf/nkf-utf8/nkf.c         c2 = x0212_unshift(c2);


xcalloc

xcalloc            50 defines.h      void *xcalloc _((long,long));
xcalloc            46 dln.c          void *xcalloc();
xcalloc            77 ext/digest/digest.c     pctx = xcalloc(algo->ctx_size, 1);
xcalloc          10260 parse.c            void *ptr = xcalloc(nelem, size);
xcalloc          6262 parse.y            void *ptr = xcalloc(nelem, size);
xcalloc          1386 win32/win32.c      p = xcalloc(sizeof(DIR), 1);


xfree

xfree              52 defines.h      void xfree _((void*));
xfree             949 dir.c          	xfree(newpath);
xfree            1078 dir.c              xfree(buf);
xfree            1079 dir.c              xfree(newpath);
xfree            1227 dir.c              xfree(buf);
xfree            2489 eval.c         	    xfree(hook);
xfree            1416 ext/bigdecimal/bigdecimal.c         xfree(pv);
xfree             142 ext/dl/dl.c      xfree(ptr);
xfree             395 ext/dl/ptr.c   	  xfree(str);
xfree             469 ext/dl/sym.c   #define FREE_ARGS {xfree(args); xfree(dargs); xfree(dtypes);}
xfree              71 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            7024 parse.c            xfree(RSTRING(str)->ptr);
xfree            9609 parse.c        	if (!lvtbl->nofree) xfree(lvtbl->tbl);
xfree            9613 parse.c            xfree(lvtbl);
xfree            9721 parse.c        		xfree(ruby_scope->local_tbl);
xfree            10301 parse.c            xfree(ptr);
xfree            3026 parse.y            xfree(RSTRING(str)->ptr);
xfree            5611 parse.y        	if (!lvtbl->nofree) xfree(lvtbl->tbl);
xfree            5615 parse.y            xfree(lvtbl);
xfree            5723 parse.y        		xfree(ruby_scope->local_tbl);
xfree            6303 parse.y            xfree(ptr);
xfree             112 regex.c          if (stackb != stacka) xfree(stackb);					\
xfree             118 regex.c          if (stackb != stacka) xfree(stackb);					\
xfree            2489 regex.c          xfree(bufp->buffer);
xfree            2490 regex.c          xfree(bufp->fastmap);
xfree            2491 regex.c          if (bufp->must_skip) xfree(bufp->must_skip);
xfree            2493 regex.c          xfree(bufp->regstart);
xfree            2494 regex.c          xfree(bufp->regend);
xfree            2495 regex.c          xfree(bufp->old_regstart);
xfree            2496 regex.c          xfree(bufp->old_regend);
xfree            2497 regex.c          xfree(bufp->best_regstart);
xfree            2498 regex.c          xfree(bufp->best_regend);
xfree            2499 regex.c          xfree(bufp->reg_info);
xfree            2500 regex.c          xfree(bufp);
xfree            4437 regex.c          if (regs->beg) xfree(regs->beg);
xfree            4438 regex.c          if (regs->end) xfree(regs->end);


xmalloc

xmalloc            49 defines.h      void *xmalloc _((long));
xmalloc            44 dln.c          #ifndef xmalloc
xmalloc            45 dln.c          void *xmalloc();
xmalloc           127 dln.c              *buf = xmalloc(len);
xmalloc           276 dln.c              reloc = (struct relocation_info*)xmalloc(size);
xmalloc           308 dln.c              buffer = (struct nlist*)xmalloc(hdrp->a_syms + size);
xmalloc           448 dln.c              addr = (unsigned char*)xmalloc(size);
xmalloc           518 dln.c              obj = (struct undef*)xmalloc(sizeof(struct undef));
xmalloc           766 dln.c          	    new_sym = (struct nlist*)xmalloc(sizeof(struct nlist));
xmalloc           998 dln.c          	data = (int*)xmalloc(size);
xmalloc          1401 ext/bigdecimal/bigdecimal.c     void *p = xmalloc((unsigned int)mb);
xmalloc           104 ext/digest/digest.c     digest = xmalloc(len);
xmalloc           133 ext/digest/digest.c     hexdigest = xmalloc(len + 1); /* +1 is for '\0' */
xmalloc           209 ext/digest/digest.c     pctx2 = xmalloc(len);
xmalloc           214 ext/digest/digest.c     digest = xmalloc(len);
xmalloc           240 ext/digest/digest.c     pctx2 = xmalloc(len);
xmalloc           245 ext/digest/digest.c     hexdigest = xmalloc(len + 1); /* +1 is for '\0' */
xmalloc           118 ext/dl/dl.c        ptr = xmalloc(size);
xmalloc           123 ext/dl/dl.c        return xmalloc(size);
xmalloc           396 ext/zlib/zlib.c     return xmalloc(items * size);
xmalloc          2152 file.c             buf = xmalloc(size);
xmalloc           139 gc.c               mem = xmalloc(n * size);
xmalloc           155 gc.c               if (!ptr) return xmalloc(size);
xmalloc            61 missing/alloca.c extern pointer	xmalloc();
xmalloc           181 missing/alloca.c     register pointer	new = xmalloc (sizeof (header) + size);
xmalloc          10249 parse.c            void *ptr = xmalloc(size);
xmalloc          6251 parse.y            void *ptr = xmalloc(size);
xmalloc           126 regex.c            stackx = (type*)xmalloc(2 * xlen * sizeof(type));			\
xmalloc           139 regex.c        #define TMALLOC(n,t)    ((t*)xmalloc((n)*sizeof(t)))
xmalloc          2450 regex.c              bufp->must_skip = (int *) xmalloc((1 << BYTEWIDTH)*sizeof(int));
xmalloc           462 ruby.h         #define ALLOC_N(type,n) (type*)xmalloc(sizeof(type)*(n))
xmalloc           463 ruby.h         #define ALLOC(type) (type*)xmalloc(sizeof(type))
xmalloc          1760 time.c         	*buf = xmalloc(size);
xmalloc           632 util.c             tmp = xmalloc(len);
xmalloc           643 util.c             char *buf = xmalloc(size);
xmalloc           657 util.c             char *buf = xmalloc(PATH_MAX+1);


xrealloc

xrealloc           51 defines.h      void *xrealloc _((void*,long));
xrealloc           47 dln.c          void *xrealloc();
xrealloc          133 ext/dl/dl.c      return xrealloc(ptr, size);
xrealloc         2159 file.c         	buf = xrealloc(buf, size);
xrealloc         10276 parse.c        		n->u1.node = ptr = xrealloc(ptr, size);
xrealloc         10283 parse.c            ptr = xrealloc(ptr, size);
xrealloc         6278 parse.y        		n->u1.node = ptr = xrealloc(ptr, size);
xrealloc         6285 parse.y            ptr = xrealloc(ptr, size);
xrealloc          130 regex.c            stackx = (type*)xrealloc(stackb, 2 * xlen * sizeof(type));		\
xrealloc          140 regex.c        #define TREALLOC(s,n,t) (s=((t*)xrealloc(s,(n)*sizeof(t))))
xrealloc          565 regex.c            bufp->buffer = (char*)xrealloc(bufp->buffer, bufp->allocated);	\
xrealloc         1304 regex.c            bufp->buffer = (char*)xrealloc(bufp->buffer, INIT_BUF_SIZE);
xrealloc          464 ruby.h         #define REALLOC_N(var,type,n) (var)=(type*)xrealloc((char*)(var),sizeof(type)*(n))
xrealloc          651 util.c         	buf = xrealloc(buf, size);


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       2991 win32/win32.c  #define yield_until(condition) do yield_once(); while (!(condition))
yield_once       3155 win32/win32.c      yield_once();
yield_once       3182 win32/win32.c      yield_once();
yield_once       3190 win32/win32.c      yield_once();
yield_once       3290 win32/win32.c  		    yield_once();


yield_until

yield_until      3084 win32/win32.c      yield_until(0);
yield_until      3162 win32/win32.c  	    yield_until(harg.finished);
yield_until      3284 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;
yychar           3115 parse.c        #define yyclearin	(yychar = YYEMPTY)
yychar           3128 parse.c          if (yychar == YYEMPTY && yylen == 1)				\
yychar           3130 parse.c              yychar = (Token);						\
yychar           3132 parse.c              yychar1 = YYTRANSLATE (yychar);				\
yychar           3311 parse.c        int yychar;						\
yychar           3404 parse.c          yychar = YYEMPTY;		/* Cause a token to be read.  */
yychar           3531 parse.c          if (yychar == YYEMPTY)
yychar           3534 parse.c              yychar = YYLEX;
yychar           3539 parse.c          if (yychar <= 0)		/* This means end of input. */
yychar           3542 parse.c              yychar = YYEOF;		/* Don't call YYLEX any more */
yychar           3548 parse.c              yychar1 = YYTRANSLATE (yychar);
yychar           3556 parse.c        		     yychar, yytname[yychar1]);
yychar           3560 parse.c        	  YYPRINT (stderr, yychar, yylval);
yychar           3595 parse.c        	      yychar, yytname[yychar1]));
yychar           3598 parse.c          if (yychar != YYEOF)
yychar           3599 parse.c            yychar = YYEMPTY;
yychar           6308 parse.c        	  yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
yychar           6313 parse.c        	      yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
yychar           6352 parse.c              if (yychar == YYEOF)
yychar           6355 parse.c        		  yychar, yytname[yychar1]));
yychar           6356 parse.c              yychar = YYEMPTY;


yycompile

yycompile        6669 parse.c            return yycompile(f, line);
yycompile        6691 parse.c            return yycompile(f, start);
yycompile        2671 parse.y            return yycompile(f, line);
yycompile        2693 parse.y            return yycompile(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;
yydebug          3192 parse.c          if (yydebug)					\
yydebug          3197 parse.c        int yydebug;
yydebug          3553 parse.c              if (yydebug)
yydebug          3652 parse.c          if (yydebug)
yydebug          6252 parse.c          if (yydebug)
yydebug          6397 parse.c          if (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          5995 parse.c        {yyerrok; yyval.node = 0;}
yyerrok          6230 parse.c        {yyerrok;}
yyerrok          6234 parse.c        {yyerrok;}
yyerrok          2225 parse.y        		| error term {yyerrok; $$ = 0;}
yyerrok          2466 parse.y        term		: ';' {yyerrok;}
yyerrok          2471 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           179 parse.c        static int yyerror();
yyerror          3138 parse.c              yyerror ("syntax error: cannot back up");			\
yyerror          3766 parse.c        		        yyerror("can't make alias for the number variables");
yyerror          3836 parse.c        			    yyerror("BEGIN in method");
yyerror          4248 parse.c        			    yyerror("dynamic constant assignment");
yyerror          4256 parse.c        			    yyerror("dynamic constant assignment");
yyerror          4301 parse.c        			    yyerror("dynamic constant assignment");
yyerror          4309 parse.c        			    yyerror("dynamic constant assignment");
yyerror          4323 parse.c        			yyerror("class/module name must be CONSTANT");
yyerror          4583 parse.c        			yyerror("constant re-assignment");
yyerror          4590 parse.c        			yyerror("constant re-assignment");
yyerror          5338 parse.c        			    yyerror("class definition in method body");
yyerror          5384 parse.c        			    yyerror("module definition in method body");
yyerror          5899 parse.c        			    yyerror("empty symbol literal");
yyerror          5911 parse.c        				    yyerror("empty symbol literal");
yyerror          6067 parse.c        			yyerror("formal argument cannot be a constant");
yyerror          6073 parse.c                                yyerror("formal argument cannot be an instance variable");
yyerror          6079 parse.c                                yyerror("formal argument cannot be a global variable");
yyerror          6085 parse.c                                yyerror("formal argument cannot be a class variable");
yyerror          6092 parse.c        			    yyerror("formal argument must be local variable");
yyerror          6094 parse.c        			    yyerror("duplicate argument name");
yyerror          6109 parse.c        			    yyerror("formal argument must be local variable");
yyerror          6111 parse.c        			    yyerror("duplicate optional argument name");
yyerror          6132 parse.c        			    yyerror("rest argument must be local variable");
yyerror          6134 parse.c        			    yyerror("duplicate rest argument name");
yyerror          6148 parse.c        			    yyerror("block argument must be local variable");
yyerror          6150 parse.c        			    yyerror("duplicate block argument name");
yyerror          6180 parse.c        			    yyerror("can't define singleton method for ().");
yyerror          6192 parse.c        				yyerror("can't define singleton method for literals");
yyerror          6211 parse.c        			    yyerror("odd number list for Hash");
yyerror          6329 parse.c        	      yyerror (yymsg);
yyerror          6333 parse.c        	    yyerror ("parse error; also virtual memory exhausted");
yyerror          6337 parse.c        	yyerror ("parse error");
yyerror          6462 parse.c          yyerror ("parser stack overflow");
yyerror          6816 parse.c        		yyerror("Invalid escape character syntax");
yyerror          6831 parse.c        	    yyerror("Invalid escape character syntax");
yyerror          6845 parse.c        	    yyerror("Invalid escape character syntax");
yyerror          6860 parse.c                yyerror("Invalid escape character syntax");
yyerror          6905 parse.c        		yyerror("Invalid escape character syntax");
yyerror          6915 parse.c        	    yyerror("Invalid escape character syntax");
yyerror          6924 parse.c        	    yyerror("Invalid escape character syntax");
yyerror          6943 parse.c                yyerror("Invalid escape character syntax");
yyerror          7768 parse.c        	    yyerror("no .<digit> floating literal anymore; put 0 before dot");
yyerror          7807 parse.c        			yyerror("numeric literal without digits");
yyerror          7831 parse.c        			yyerror("numeric literal without digits");
yyerror          7855 parse.c        			yyerror("numeric literal without digits");
yyerror          7869 parse.c        			yyerror("numeric literal without digits");
yyerror          7898 parse.c        		    yyerror("Illegal octal digit");
yyerror          7976 parse.c        		yyerror(tmp);
yyerror          8168 parse.c        		    yyerror("unknown type of %string");
yyerror          8218 parse.c        		yyerror("unknown type of %string");
yyerror          8866 parse.c        	yyerror("Can't change the value of self");
yyerror          8869 parse.c        	yyerror("Can't assign to nil");
yyerror          8872 parse.c        	yyerror("Can't assign to true");
yyerror          8875 parse.c        	yyerror("Can't assign to false");
yyerror          8878 parse.c        	yyerror("Can't assign to __FILE__");
yyerror          8881 parse.c        	yyerror("Can't assign to __LINE__");
yyerror          8906 parse.c        	    yyerror("dynamic constant assignment");
yyerror          9039 parse.c        	    if (!cond) yyerror("void value expression");
yyerror          9213 parse.c        	yyerror("multiple assignment in conditional");
yyerror            82 parse.y        static int yyerror();
yyerror           429 parse.y        		        yyerror("can't make alias for the number variables");
yyerror           485 parse.y        			    yyerror("BEGIN in method");
yyerror           828 parse.y        			    yyerror("dynamic constant assignment");
yyerror           834 parse.y        			    yyerror("dynamic constant assignment");
yyerror           867 parse.y        			    yyerror("dynamic constant assignment");
yyerror           873 parse.y        			    yyerror("dynamic constant assignment");
yyerror           885 parse.y        			yyerror("class/module name must be CONSTANT");
yyerror          1060 parse.y        			yyerror("constant re-assignment");
yyerror          1065 parse.y        			yyerror("constant re-assignment");
yyerror          1623 parse.y        			    yyerror("class definition in method body");
yyerror          1661 parse.y        			    yyerror("module definition in method body");
yyerror          2143 parse.y        			    yyerror("empty symbol literal");
yyerror          2155 parse.y        				    yyerror("empty symbol literal");
yyerror          2279 parse.y        			yyerror("formal argument cannot be a constant");
yyerror          2283 parse.y                                yyerror("formal argument cannot be an instance variable");
yyerror          2287 parse.y                                yyerror("formal argument cannot be a global variable");
yyerror          2291 parse.y                                yyerror("formal argument cannot be a class variable");
yyerror          2296 parse.y        			    yyerror("formal argument must be local variable");
yyerror          2298 parse.y        			    yyerror("duplicate argument name");
yyerror          2314 parse.y        			    yyerror("formal argument must be local variable");
yyerror          2316 parse.y        			    yyerror("duplicate optional argument name");
yyerror          2339 parse.y        			    yyerror("rest argument must be local variable");
yyerror          2341 parse.y        			    yyerror("duplicate rest argument name");
yyerror          2357 parse.y        			    yyerror("block argument must be local variable");
yyerror          2359 parse.y        			    yyerror("duplicate block argument name");
yyerror          2384 parse.y        			    yyerror("can't define singleton method for ().");
yyerror          2396 parse.y        				yyerror("can't define singleton method for literals");
yyerror          2414 parse.y        			    yyerror("odd number list for Hash");
yyerror          2818 parse.y        		yyerror("Invalid escape character syntax");
yyerror          2833 parse.y        	    yyerror("Invalid escape character syntax");
yyerror          2847 parse.y        	    yyerror("Invalid escape character syntax");
yyerror          2862 parse.y                yyerror("Invalid escape character syntax");
yyerror          2907 parse.y        		yyerror("Invalid escape character syntax");
yyerror          2917 parse.y        	    yyerror("Invalid escape character syntax");
yyerror          2926 parse.y        	    yyerror("Invalid escape character syntax");
yyerror          2945 parse.y                yyerror("Invalid escape character syntax");
yyerror          3770 parse.y        	    yyerror("no .<digit> floating literal anymore; put 0 before dot");
yyerror          3809 parse.y        			yyerror("numeric literal without digits");
yyerror          3833 parse.y        			yyerror("numeric literal without digits");
yyerror          3857 parse.y        			yyerror("numeric literal without digits");
yyerror          3871 parse.y        			yyerror("numeric literal without digits");
yyerror          3900 parse.y        		    yyerror("Illegal octal digit");
yyerror          3978 parse.y        		yyerror(tmp);
yyerror          4170 parse.y        		    yyerror("unknown type of %string");
yyerror          4220 parse.y        		yyerror("unknown type of %string");
yyerror          4868 parse.y        	yyerror("Can't change the value of self");
yyerror          4871 parse.y        	yyerror("Can't assign to nil");
yyerror          4874 parse.y        	yyerror("Can't assign to true");
yyerror          4877 parse.y        	yyerror("Can't assign to false");
yyerror          4880 parse.y        	yyerror("Can't assign to __FILE__");
yyerror          4883 parse.y        	yyerror("Can't assign to __LINE__");
yyerror          4908 parse.y        	    yyerror("dynamic constant assignment");
yyerror          5041 parse.y        	    if (!cond) yyerror("void value expression");
yyerror          5215 parse.y        	yyerror("multiple assignment in conditional");


yylex

yylex             656 ext/syck/gram.c # define YYLEX yylex (&yylval, YYLEX_PARAM)
yylex             658 ext/syck/gram.c # define YYLEX yylex (&yylval)
yylex             178 parse.c        static int yylex();
yylex            3166 parse.c        #   define YYLEX		yylex (&yylval, &yylloc, YYLEX_PARAM)
yylex            3168 parse.c        #   define YYLEX		yylex (&yylval, &yylloc)
yylex            3172 parse.c        #   define YYLEX		yylex (&yylval, YYLEX_PARAM)
yylex            3174 parse.c        #   define YYLEX		yylex (&yylval)
yylex            3178 parse.c        # define YYLEX			yylex ()
yylex              81 parse.y        static int yylex();


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           3131 parse.c              yylval = (Value);						\
yylval           3166 parse.c        #   define YYLEX		yylex (&yylval, &yylloc, YYLEX_PARAM)
yylval           3168 parse.c        #   define YYLEX		yylex (&yylval, &yylloc)
yylval           3172 parse.c        #   define YYLEX		yylex (&yylval, YYLEX_PARAM)
yylval           3174 parse.c        #   define YYLEX		yylex (&yylval)
yylval           3314 parse.c        YYSTYPE yylval;						\
yylval           3560 parse.c        	  YYPRINT (stderr, yychar, yylval);
yylval           3601 parse.c          *++yyvsp = yylval;
yylval           6435 parse.c          *++yyvsp = yylval;
yylval           7131 parse.c        	yylval.num = regx_options();
yylval           7158 parse.c            yylval.node = NEW_STR(rb_str_new(tok(), toklen()));
yylval           7322 parse.c        		yylval.node = NEW_STR(rb_str_new(tok(), toklen()));
yylval           7332 parse.c            yylval.node = NEW_STR(str);
yylval           7412 parse.c        		yylval.id = tPOW;
yylval           7421 parse.c        		yylval.id = '*';
yylval           7526 parse.c        		yylval.id = tLSHFT;
yylval           7548 parse.c        		yylval.id = tRSHFT;
yylval           7635 parse.c        	yylval.node = NEW_LIT(INT2FIX(c));
yylval           7642 parse.c        		yylval.id = tANDOP;
yylval           7650 parse.c        	    yylval.id = '&';
yylval           7677 parse.c        		yylval.id = tOROP;
yylval           7685 parse.c        	    yylval.id = '|';
yylval           7709 parse.c        	    yylval.id = '+';
yylval           7739 parse.c        	    yylval.id = '-';
yylval           7810 parse.c        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 16, Qfalse));
yylval           7834 parse.c        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 2, Qfalse));
yylval           7858 parse.c        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 10, Qfalse));
yylval           7889 parse.c        			yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 8, Qfalse));
yylval           7905 parse.c        		    yylval.node = NEW_LIT(INT2FIX(0));
yylval           7984 parse.c        		yylval.node = NEW_LIT(rb_float_new(d));
yylval           7987 parse.c        	    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 10, Qfalse));
yylval           8035 parse.c        	    yylval.id = '/';
yylval           8057 parse.c        	    yylval.id = '^';
yylval           8223 parse.c        	    yylval.id = '%';
yylval           8276 parse.c        	    yylval.id = rb_intern(tok());
yylval           8291 parse.c        	    yylval.id = rb_intern(tok());
yylval           8304 parse.c        	    yylval.node = NEW_BACK_REF(c);
yylval           8318 parse.c        	    yylval.node = NEW_NTH_REF(atoi(tok()+1));
yylval           8442 parse.c        			yylval.id = rb_intern(kw->name);
yylval           8478 parse.c        	yylval.id = rb_intern(tok());
yylval           8479 parse.c        	if (is_local_id(yylval.id) &&
yylval           8481 parse.c        	    ((dyna_in_block() && rb_dvar_defined(yylval.id)) || local_id(yylval.id))) {
yylval           9790 parse.c            rb_gc_mark_maybe((VALUE)yylval.node);
yylval           3133 parse.y        	yylval.num = regx_options();
yylval           3160 parse.y            yylval.node = NEW_STR(rb_str_new(tok(), toklen()));
yylval           3324 parse.y        		yylval.node = NEW_STR(rb_str_new(tok(), toklen()));
yylval           3334 parse.y            yylval.node = NEW_STR(str);
yylval           3414 parse.y        		yylval.id = tPOW;
yylval           3423 parse.y        		yylval.id = '*';
yylval           3528 parse.y        		yylval.id = tLSHFT;
yylval           3550 parse.y        		yylval.id = tRSHFT;
yylval           3637 parse.y        	yylval.node = NEW_LIT(INT2FIX(c));
yylval           3644 parse.y        		yylval.id = tANDOP;
yylval           3652 parse.y        	    yylval.id = '&';
yylval           3679 parse.y        		yylval.id = tOROP;
yylval           3687 parse.y        	    yylval.id = '|';
yylval           3711 parse.y        	    yylval.id = '+';
yylval           3741 parse.y        	    yylval.id = '-';
yylval           3812 parse.y        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 16, Qfalse));
yylval           3836 parse.y        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 2, Qfalse));
yylval           3860 parse.y        		    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 10, Qfalse));
yylval           3891 parse.y        			yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 8, Qfalse));
yylval           3907 parse.y        		    yylval.node = NEW_LIT(INT2FIX(0));
yylval           3986 parse.y        		yylval.node = NEW_LIT(rb_float_new(d));
yylval           3989 parse.y        	    yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 10, Qfalse));
yylval           4037 parse.y        	    yylval.id = '/';
yylval           4059 parse.y        	    yylval.id = '^';
yylval           4225 parse.y        	    yylval.id = '%';
yylval           4278 parse.y        	    yylval.id = rb_intern(tok());
yylval           4293 parse.y        	    yylval.id = rb_intern(tok());
yylval           4306 parse.y        	    yylval.node = NEW_BACK_REF(c);
yylval           4320 parse.y        	    yylval.node = NEW_NTH_REF(atoi(tok()+1));
yylval           4444 parse.y        			yylval.id = rb_intern(kw->name);
yylval           4480 parse.y        	yylval.id = rb_intern(tok());
yylval           4481 parse.y        	if (is_local_id(yylval.id) &&
yylval           4483 parse.y        	    ((dyna_in_block() && rb_dvar_defined(yylval.id)) || local_id(yylval.id))) {
yylval           5792 parse.y            rb_gc_mark_maybe((VALUE)yylval.node);


yynerrs

yynerrs           952 ext/syck/gram.c int yynerrs;
yynerrs           999 ext/syck/gram.c   yynerrs = 0;
yynerrs          1683 ext/syck/gram.c       ++yynerrs;
yynerrs          3317 parse.c        int yynerrs;
yynerrs          3403 parse.c          yynerrs = 0;
yynerrs          6289 parse.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          3300 parse.c        int yyparse (void *);
yyparse          3302 parse.c        int yyparse (void);
yyparse          6599 parse.c            n = yyparse();
yyparse          2601 parse.y            n = yyparse();


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]);
yystpcpy         3247 parse.c        # ifndef yystpcpy
yystpcpy         6312 parse.c        	      char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
yystpcpy         6313 parse.c        	      yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
yystpcpy         6324 parse.c        			yyp = yystpcpy (yyp, yyq);
yystpcpy         6325 parse.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]));
yystrlen         3224 parse.c        # ifndef yystrlen
yystrlen         6306 parse.c        	      yysize += yystrlen (yytname[yyx]) + 15, yycount++;
yystrlen         6307 parse.c        	  yysize += yystrlen ("parse error, unexpected ") + 1;
yystrlen         6308 parse.c        	  yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);


yysymprint

yysymprint        678 ext/syck/gram.c     yysymprint Args;				\
yysymprint        686 ext/syck/gram.c       yysymprint (stderr, 					\


z_conv

z_conv            315 ext/nkf/nkf-utf8/nkf.c STATIC  void    z_conv PROTO((int c2,int c1));
z_conv           1834 ext/nkf/nkf-utf8/nkf.c 	o_zconv = oconv; oconv = z_conv;


zero

zero               48 missing/isinf.c static double inf()	{ return one() / zero(); }
zero              236 numeric.c          VALUE zero;
zero              238 numeric.c          zero = INT2FIX(0);
zero              239 numeric.c          do_coerce(&zero, &num, Qtrue);
zero              241 numeric.c          return rb_funcall(zero, '-', 1, num);


zlib_mem_alloc

zlib_mem_alloc     40 ext/zlib/zlib.c static voidpf zlib_mem_alloc _((voidpf, uInt, uInt));
zlib_mem_alloc    415 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     416 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  517 ext/zlib/zlib.c     zstream_append_buffer((z),RSTRING(v)->ptr,RSTRING(v)->len)
zstream_append_buffer 1941 ext/zlib/zlib.c     zstream_append_buffer(&gz->z, buf, sizeof(buf));
zstream_append_buffer 1945 ext/zlib/zlib.c 	zstream_append_buffer(&gz->z, "\0", 1);
zstream_append_buffer 1949 ext/zlib/zlib.c 	zstream_append_buffer(&gz->z, "\0", 1);
zstream_append_buffer 1963 ext/zlib/zlib.c     zstream_append_buffer(&gz->z, buf, sizeof(buf));


zstream_append_buffer2

zstream_append_buffer2  632 ext/zlib/zlib.c 	zstream_append_buffer2(z, z->input);
zstream_append_buffer2 1544 ext/zlib/zlib.c 	    zstream_append_buffer2(z, src);
zstream_append_buffer2 1578 ext/zlib/zlib.c 	    zstream_append_buffer2(z, src);
zstream_append_buffer2 1944 ext/zlib/zlib.c 	zstream_append_buffer2(&gz->z, gz->orig_name);
zstream_append_buffer2 1948 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  603 ext/zlib/zlib.c     zstream_append_input((z), RSTRING(v)->ptr, RSTRING(v)->len)
zstream_append_input  716 ext/zlib/zlib.c 	zstream_append_input(z, src, len);
zstream_append_input  748 ext/zlib/zlib.c 		zstream_append_input(z, z->stream.next_in, z->stream.avail_in);
zstream_append_input  761 ext/zlib/zlib.c 	zstream_append_input(z, z->stream.next_in, z->stream.avail_in);
zstream_append_input  782 ext/zlib/zlib.c 	    zstream_append_input(z, src, len);
zstream_append_input  798 ext/zlib/zlib.c 	zstream_append_input(z, z->stream.next_in, z->stream.avail_in);


zstream_append_input2

zstream_append_input2 1850 ext/zlib/zlib.c 	zstream_append_input2(&gz->z, str);
zstream_append_input2 1872 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 2181 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  549 ext/zlib/zlib.c 	return zstream_detach_buffer(z);
zstream_detach_buffer  955 ext/zlib/zlib.c     dst = zstream_detach_buffer(z);
zstream_detach_buffer  988 ext/zlib/zlib.c     dst = zstream_detach_buffer(z);
zstream_detach_buffer 1188 ext/zlib/zlib.c     return zstream_detach_buffer(z);
zstream_detach_buffer 1282 ext/zlib/zlib.c     dst = zstream_detach_buffer(z);
zstream_detach_buffer 1328 ext/zlib/zlib.c     dst = zstream_detach_buffer(z);
zstream_detach_buffer 1456 ext/zlib/zlib.c     return zstream_detach_buffer(z);
zstream_detach_buffer 1540 ext/zlib/zlib.c 	    dst = zstream_detach_buffer(z);
zstream_detach_buffer 1550 ext/zlib/zlib.c 	dst = zstream_detach_buffer(z);
zstream_detach_buffer 1818 ext/zlib/zlib.c 	str = zstream_detach_buffer(&gz->z);
zstream_detach_buffer 2169 ext/zlib/zlib.c     dst = zstream_detach_buffer(&gz->z);
zstream_detach_buffer 3052 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  972 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  780 ext/zlib/zlib.c 	    zstream_discard_input(z,
zstream_discard_input 2011 ext/zlib/zlib.c     zstream_discard_input(&gz->z, 10);
zstream_discard_input 2021 ext/zlib/zlib.c 	zstream_discard_input(&gz->z, 2 + len);
zstream_discard_input 2028 ext/zlib/zlib.c 	zstream_discard_input(&gz->z, len + 1);
zstream_discard_input 2035 ext/zlib/zlib.c 	zstream_discard_input(&gz->z, len + 1);
zstream_discard_input 2059 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       821 ext/zlib/zlib.c     zstream_end(z);
zstream_end       927 ext/zlib/zlib.c     zstream_end(get_zstream(obj));
zstream_end      1234 ext/zlib/zlib.c     dst = rb_ensure(deflate_run, (VALUE)args, zstream_end, (VALUE)&z);
zstream_end      1494 ext/zlib/zlib.c     dst = rb_ensure(inflate_run, (VALUE)args, zstream_end, (VALUE)&z);
zstream_end      2222 ext/zlib/zlib.c 	zstream_end(&gz->z);
zstream_end      2226 ext/zlib/zlib.c     zstream_end(&gz->z);
zstream_end      2242 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  572 ext/zlib/zlib.c 	zstream_expand_buffer(z);
zstream_expand_buffer  726 ext/zlib/zlib.c 	zstream_expand_buffer(z);
zstream_expand_buffer  756 ext/zlib/zlib.c 	zstream_expand_buffer(z);
zstream_expand_buffer 1359 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 1019 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      834 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      426 ext/zlib/zlib.c #define zstream_init_deflate(z)   zstream_init((z), &deflate_funcs)
zstream_init      427 ext/zlib/zlib.c #define zstream_init_inflate(z)   zstream_init((z), &inflate_funcs)
zstream_init      835 ext/zlib/zlib.c     zstream_init(z, funcs);
zstream_init     1767 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      834 ext/zlib/zlib.c 			   zstream_mark, zstream_free, z);
zstream_mark     1743 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       839 ext/zlib/zlib.c #define zstream_deflate_new(klass)  zstream_new((klass), &deflate_funcs)
zstream_new       840 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 1552 ext/zlib/zlib.c 	    zstream_passthrough_input(z);
zstream_passthrough_input 1584 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     688 ext/zlib/zlib.c 	zstream_reset(z);
zstream_reset     939 ext/zlib/zlib.c     zstream_reset(get_zstream(obj));
zstream_reset    1789 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  669 ext/zlib/zlib.c     zstream_reset_input(z);
zstream_reset_input  691 ext/zlib/zlib.c     zstream_reset_input(z);
zstream_reset_input  746 ext/zlib/zlib.c 	    zstream_reset_input(z);
zstream_reset_input  759 ext/zlib/zlib.c     zstream_reset_input(z);
zstream_reset_input  785 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       954 ext/zlib/zlib.c     zstream_run(z, "", 0, Z_FINISH);
zstream_run      1187 ext/zlib/zlib.c     zstream_run(z, RSTRING(src)->ptr, RSTRING(src)->len, Z_FINISH);
zstream_run      1247 ext/zlib/zlib.c 	zstream_run(z, "", 0, Z_FINISH);
zstream_run      1252 ext/zlib/zlib.c 	zstream_run(z, RSTRING(src)->ptr, RSTRING(src)->len, flush);
zstream_run      1326 ext/zlib/zlib.c 	zstream_run(z, "", 0, flush);
zstream_run      1454 ext/zlib/zlib.c     zstream_run(z, RSTRING(src)->ptr, RSTRING(src)->len, Z_SYNC_FLUSH);
zstream_run      1455 ext/zlib/zlib.c     zstream_run(z, "", 0, Z_FINISH);  /* for checking errors */
zstream_run      1506 ext/zlib/zlib.c 	zstream_run(z, "", 0, Z_FINISH);
zstream_run      1511 ext/zlib/zlib.c 	zstream_run(z, RSTRING(src)->ptr, RSTRING(src)->len, Z_SYNC_FLUSH);
zstream_run      2039 ext/zlib/zlib.c 	zstream_run(&gz->z, 0, 0, Z_SYNC_FLUSH);
zstream_run      2081 ext/zlib/zlib.c 	zstream_run(&gz->z, str, len, (gz->z.flags & GZFILE_FLAG_SYNC)
zstream_run      2102 ext/zlib/zlib.c 	    zstream_run(&gz->z, RSTRING(str)->ptr, RSTRING(str)->len,
zstream_run      2207 ext/zlib/zlib.c     zstream_run(&gz->z, "", 0, Z_FINISH);
zstream_run      2751 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 2146 ext/zlib/zlib.c     dst = zstream_shift_buffer(&gz->z, len);
zstream_shift_buffer 3063 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     1607 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_assoc_new
  14. to_ary
  15. rb_check_array_type
  16. rb_ary_initialize
  17. rb_ary_s_create
  18. rb_ary_store
  19. rb_ary_push
  20. rb_ary_push_m
  21. rb_ary_pop
  22. ary_make_shared
  23. rb_ary_shift
  24. rb_ary_unshift
  25. rb_ary_unshift_m
  26. rb_ary_elt
  27. rb_ary_entry
  28. rb_ary_subseq
  29. rb_ary_aref
  30. rb_ary_at
  31. rb_ary_first
  32. rb_ary_last
  33. rb_ary_fetch
  34. rb_ary_index
  35. rb_ary_rindex
  36. rb_ary_indexes
  37. rb_ary_to_ary
  38. rb_ary_splice
  39. rb_ary_aset
  40. rb_ary_insert
  41. rb_ary_each
  42. rb_ary_each_index
  43. rb_ary_reverse_each
  44. rb_ary_length
  45. rb_ary_empty_p
  46. rb_ary_dup
  47. inspect_join
  48. rb_ary_join
  49. rb_ary_join_m
  50. rb_ary_to_s
  51. inspect_call
  52. get_inspect_tbl
  53. inspect_ensure
  54. rb_protect_inspect
  55. rb_inspecting_p
  56. inspect_ary
  57. rb_ary_inspect
  58. rb_ary_to_a
  59. rb_ary_to_ary_m
  60. rb_ary_reverse
  61. rb_ary_reverse_bang
  62. rb_ary_reverse_m
  63. ary_sort_check
  64. sort_1
  65. sort_2
  66. sort_internal
  67. sort_unlock
  68. rb_ary_sort_bang
  69. rb_ary_sort
  70. rb_ary_collect
  71. rb_ary_collect_bang
  72. rb_values_at
  73. rb_ary_values_at
  74. rb_ary_select
  75. rb_ary_delete
  76. rb_ary_delete_at
  77. rb_ary_delete_at_m
  78. rb_ary_slice_bang
  79. rb_ary_reject_bang
  80. rb_ary_reject
  81. rb_ary_delete_if
  82. rb_ary_zip
  83. rb_ary_transpose
  84. rb_ary_replace
  85. rb_ary_clear
  86. rb_ary_fill
  87. rb_ary_plus
  88. rb_ary_concat
  89. rb_ary_times
  90. rb_ary_assoc
  91. rb_ary_rassoc
  92. rb_ary_equal
  93. rb_ary_eql
  94. rb_ary_hash
  95. rb_ary_includes
  96. rb_ary_cmp
  97. ary_make_hash
  98. rb_ary_diff
  99. rb_ary_and
  100. rb_ary_or
  101. rb_ary_uniq_bang
  102. rb_ary_uniq
  103. rb_ary_compact_bang
  104. rb_ary_compact
  105. rb_ary_nitems
  106. flatten
  107. rb_ary_flatten_bang
  108. rb_ary_flatten
  109. Init_Array
/**********************************************************************

  array.c -

  $Author: matz $
  $Date: 2005/12/22 07:08:51 $
  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"

VALUE rb_cArray;
static ID id_cmp;

#define ARY_DEFAULT_SIZE 16

void
rb_mem_clear(mem, size)
    register VALUE *mem;
    register long size;
{
    while (size--) {
        *mem++ = Qnil;
    }
}

static inline void
memfill(mem, size, val)
    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(ary)
    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(ary)
    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(ary)
    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(ary)
    VALUE ary;
{
    if (OBJ_FROZEN(ary)) return Qtrue;
    if (FL_TEST(ary, ARY_TMPLOCK)) return Qtrue;
    return Qfalse;
}

static VALUE ary_alloc _((VALUE));
static VALUE
ary_alloc(klass)
    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(klass, len)
    VALUE klass;
    long len;
{
    VALUE ary = ary_alloc(klass);

    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++;
    RARRAY(ary)->ptr = ALLOC_N(VALUE, len);
    RARRAY(ary)->aux.capa = len;

    return ary;
}

VALUE
rb_ary_new2(len)
    long len;
{
    return ary_new(rb_cArray, len);
}

VALUE
rb_ary_new()
{
    return rb_ary_new2(ARY_DEFAULT_SIZE);
}

#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

VALUE
#ifdef HAVE_STDARG_PROTOTYPES
rb_ary_new3(long n, ...)
#else
rb_ary_new3(n, va_alist)
    long n;
    va_dcl
#endif
{
    va_list ar;
    VALUE ary;
    long i;

    ary = rb_ary_new2(n);

    va_init_list(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(n, elts)
    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_assoc_new(car, cdr)
    VALUE car, cdr;
{
    VALUE ary;

    ary = rb_ary_new2(2);
    RARRAY(ary)->ptr[0] = car;
    RARRAY(ary)->ptr[1] = cdr;
    RARRAY(ary)->len = 2;

    return ary;
}

static VALUE
to_ary(ary)
    VALUE ary;
{
    return rb_convert_type(ary, T_ARRAY, "Array", "to_ary");
}

VALUE
rb_check_array_type(ary)
    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(argc, argv, ary)
    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(argc, argv, klass)
    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(ary, idx, val)
    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;
}

/*
 *  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(ary, item)
    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(argc, argv, ary)
    int argc;
    VALUE *argv;
    VALUE ary;
{
    while (argc--) {
        rb_ary_push(ary, *argv++);
    }
    return ary;
}

/*
 *  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", "m", "z" ]
 *     a.pop   #=> "z"
 *     a       #=> ["a", "m"]
 */

VALUE
rb_ary_pop(ary)
    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];
}

static VALUE
ary_make_shared(ary)
    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;
    }
}

/*
 *  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"]
 */

VALUE
rb_ary_shift(ary)
    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;
}

VALUE
rb_ary_unshift(ary, item)
    VALUE ary, 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(argc, argv, ary)
    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(ary, offset)
    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(ary, offset)
    VALUE ary;
    long offset;
{
    if (offset < 0) {
        offset += RARRAY(ary)->len;
    }
    return rb_ary_elt(ary, offset);
}

static VALUE
rb_ary_subseq(ary, beg, len)
    VALUE ary;
    long beg, 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(argc, argv, ary)
    int argc;
    VALUE *argv;
    VALUE ary;
{
    VALUE arg;
    long beg, len;

    if (argc == 2) {
        if (SYMBOL_P(argv[0])) {
            rb_raise(rb_eTypeError, "Symbol as array index");
        }
        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));
    }
    if (SYMBOL_P(arg)) {
        rb_raise(rb_eTypeError, "Symbol as array index");
    }
    /* 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(ary, pos)
    VALUE ary, 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(1) #=> ["q"]
 *     a.first(3) #=> ["q", "r", "s"]
 */

static VALUE
rb_ary_first(argc, argv, ary)
    int argc;
    VALUE *argv;
    VALUE ary;
{
    if (argc == 0) {
        if (RARRAY(ary)->len == 0) return Qnil;
        return RARRAY(ary)->ptr[0];
    }
    else {
        VALUE nv, result;
        long n, i;

        rb_scan_args(argc, argv, "01", &nv);
        n = NUM2LONG(nv);
        if (n > RARRAY(ary)->len) n = RARRAY(ary)->len;
        result = rb_ary_new2(n);
        for (i=0; i<n; i++) {
            rb_ary_push(result, RARRAY(ary)->ptr[i]);
        }
        return result;
    }
}

/*
 *  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>.
 *
 *     [ "w", "x", "y", "z" ].last   #=> "z"
 */

static VALUE
rb_ary_last(argc, argv, ary)
    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 {
        VALUE nv, result;
        long n, i;

        rb_scan_args(argc, argv, "01", &nv);
        n = NUM2LONG(nv);
        if (n > RARRAY(ary)->len) n = RARRAY(ary)->len;
        result = rb_ary_new2(n);
        for (i=RARRAY(ary)->len-n; n--; i++) {
            rb_ary_push(result, RARRAY(ary)->ptr[i]);
        }
        return result;
    }
}

/*
 *  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(argc, argv, ary)
    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
 *
 *  Returns the index of the first object in <i>self</i> such that is
 *  <code>==</code> to <i>obj</i>. Returns <code>nil</code> if
 *  no match is found.
 *
 *     a = [ "a", "b", "c" ]
 *     a.index("b")   #=> 1
 *     a.index("z")   #=> nil
 */

static VALUE
rb_ary_index(ary, val)
    VALUE ary;
    VALUE val;
{
    long i;

    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>. Returns <code>nil</code> if
 *  no match is found.
 *
 *     a = [ "a", "b", "b", "b", "c" ]
 *     a.rindex("b")   #=> 3
 *     a.rindex("z")   #=> nil
 */

static VALUE
rb_ary_rindex(ary, val)
    VALUE ary;
    VALUE val;
{
    long i = RARRAY(ary)->len;

    while (i--) {
        if (i > RARRAY(ary)->len) {
            i = RARRAY(ary)->len;
            continue;
        }
        if (rb_equal(RARRAY(ary)->ptr[i], val))
            return LONG2NUM(i);
    }
    return Qnil;
}

/*
 *  call-seq:
 *     array.indexes( i1, i2, ... iN )   -> an_array
 *     array.indices( i1, i2, ... iN )   -> an_array
 *
 *  Deprecated; use <code>Array#values_at</code>.
 */

static VALUE
rb_ary_indexes(argc, argv, ary)
    int argc;
    VALUE *argv;
    VALUE ary;
{
    VALUE new_ary;
    long i;

    rb_warn("Array#%s is deprecated; use Array#values_at", rb_id2name(rb_frame_last_func()));
    new_ary = rb_ary_new2(argc);
    for (i=0; i<argc; i++) {
        rb_ary_push(new_ary, rb_ary_aref(1, argv+i, ary));
    }

    return new_ary;
}

VALUE
rb_ary_to_ary(obj)
    VALUE obj;
{
    if (TYPE(obj) == T_ARRAY) {
        return obj;
    }
    if (rb_respond_to(obj, rb_intern("to_ary"))) {
        return rb_convert_type(obj, T_ARRAY, "Array", "to_ary");
    }
    return rb_ary_new3(1, obj);
}

static void
rb_ary_splice(ary, beg, len, rpl)
    VALUE ary;
    long beg, 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 (NIL_P(rpl)) {
        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. If +nil+ is used in the second and third form,
 *  deletes elements from _self_. 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"]
 */

static VALUE
rb_ary_aset(argc, argv, ary)
    int argc;
    VALUE *argv;
    VALUE ary;
{
    long offset, beg, len;

    if (argc == 3) {
        if (SYMBOL_P(argv[0])) {
            rb_raise(rb_eTypeError, "Symbol as array index");
        }
        if (SYMBOL_P(argv[1])) {
            rb_raise(rb_eTypeError, "Symbol as subarray length");
        }
        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 (SYMBOL_P(argv[0])) {
        rb_raise(rb_eTypeError, "Symbol as array index");
    }
    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(argc, argv, ary)
    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(ary)
    VALUE ary;
{
    long i;

    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(ary)
    VALUE ary;
{
    long i;

    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(ary)
    VALUE ary;
{
    long len = RARRAY(ary)->len;

    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(ary)
    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(ary)
    VALUE ary;
{
    if (RARRAY(ary)->len == 0)
        return Qtrue;
    return Qfalse;
}

VALUE
rb_ary_dup(ary)
    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
inspect_join(ary, arg)
    VALUE ary;
    VALUE *arg;
{
    return rb_ary_join(arg[0], arg[1]);
}

VALUE
rb_ary_join(ary, sep)
    VALUE ary, 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:
            if (rb_inspecting_p(tmp)) {
                tmp = rb_str_new2("[...]");
            }
            else {
                VALUE args[2];

                args[0] = tmp;
                args[1] = sep;
                tmp = rb_protect_inspect(inspect_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(argc, argv, ary)
    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(ary)
    VALUE ary;
{
    if (RARRAY(ary)->len == 0) return rb_str_new(0, 0);

    return rb_ary_join(ary, rb_output_fs);
}

static ID inspect_key;

struct inspect_arg {
    VALUE (*func)();
    VALUE arg1, arg2;
};

static VALUE
inspect_call(arg)
    struct inspect_arg *arg;
{
    return (*arg->func)(arg->arg1, arg->arg2);
}

static VALUE
get_inspect_tbl(create)
    int create;
{
    VALUE inspect_tbl = rb_thread_local_aref(rb_thread_current(), inspect_key);

    if (NIL_P(inspect_tbl)) {
        if (create) {
          tbl_init:
            inspect_tbl = rb_ary_new();
            rb_thread_local_aset(rb_thread_current(), inspect_key, inspect_tbl);
        }
    }
    else if (TYPE(inspect_tbl) != T_ARRAY) {
        rb_warn("invalid inspect_tbl value");
        if (create) goto tbl_init;
        rb_thread_local_aset(rb_thread_current(), inspect_key, Qnil);
        return Qnil;
    }
    return inspect_tbl;
}

static VALUE
inspect_ensure(obj)
    VALUE obj;
{
    VALUE inspect_tbl;

    inspect_tbl = get_inspect_tbl(Qfalse);
    if (!NIL_P(inspect_tbl)) {
        rb_ary_pop(inspect_tbl);
    }
    return 0;
}

VALUE
rb_protect_inspect(func, obj, arg)
    VALUE (*func)(ANYARGS);
    VALUE obj, arg;
{
    struct inspect_arg iarg;
    VALUE inspect_tbl;
    VALUE id;

    inspect_tbl = get_inspect_tbl(Qtrue);
    id = rb_obj_id(obj);
    if (rb_ary_includes(inspect_tbl, id)) {
        return (*func)(obj, arg);
    }
    rb_ary_push(inspect_tbl, id);
    iarg.func = func;
    iarg.arg1 = obj;
    iarg.arg2 = arg;

    return rb_ensure(inspect_call, (VALUE)&iarg, inspect_ensure, obj);
}

VALUE
rb_inspecting_p(obj)
    VALUE obj;
{
    VALUE inspect_tbl;

    inspect_tbl = get_inspect_tbl(Qfalse);
    if (NIL_P(inspect_tbl)) return Qfalse;
    return rb_ary_includes(inspect_tbl, rb_obj_id(obj));
}

static VALUE
inspect_ary(ary)
    VALUE ary;
{
    int tainted = OBJ_TAINTED(ary);
    long i;
    VALUE s, str;

    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(ary)
    VALUE ary;
{
    if (RARRAY(ary)->len == 0) return rb_str_new2("[]");
    if (rb_inspecting_p(ary)) return rb_str_new2("[...]");
    return rb_protect_inspect(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(ary)
    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(ary)
    VALUE ary;
{
    return ary;
}

VALUE
rb_ary_reverse(ary)
    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(ary)
    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(ary)
    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(data)
    struct ary_sort_data *data;
{
    if (RARRAY(data->ary)->ptr != data->ptr || RARRAY(data->ary)->len != data->len) {
        rb_raise(rb_eArgError, "array modified during sort");
    }
}

static int
sort_1(a, b, data)
    VALUE *a, *b;
    struct ary_sort_data *data;
{
    VALUE retval = rb_yield_values(2, *a, *b);
    int n;

    n = rb_cmpint(retval, *a, *b);
    ary_sort_check(data);
    return n;
}

static int
sort_2(ap, bp, data)
    VALUE *ap, *bp;
    struct ary_sort_data *data;
{
    VALUE retval;
    VALUE a = *ap, b = *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(data);

    return n;
}

static VALUE
sort_internal(ary)
    VALUE ary;
{
    struct ary_sort_data data;

    data.ary = ary;
    data.ptr = RARRAY(ary)->ptr; data.len = RARRAY(ary)->len;
    qsort(RARRAY(ary)->ptr, RARRAY(ary)->len, sizeof(VALUE),
          rb_block_given_p()?sort_1:sort_2, &data);
    return ary;
}

static VALUE
sort_unlock(ary)
    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(ary)
    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(ary)
    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(ary)
    VALUE ary;
{
    long i;
    VALUE collect;

    if (!rb_block_given_p()) {
        return rb_ary_new4(RARRAY(ary)->len, RARRAY(ary)->ptr);
    }

    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(ary)
    VALUE ary;
{
    long i;

    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_values_at(obj, olen, argc, argv, func)
    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(argc, argv, ary)
    int argc;
    VALUE *argv;
    VALUE ary;
{
    return rb_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(ary)
    VALUE ary;
{
    VALUE result;
    long i;

    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(ary, item)
    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(ary, pos)
    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(ary, pos)
    VALUE ary, 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(argc, argv, ary)
    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, Qnil);     /* 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(ary)
    VALUE ary;
{
    long i1, i2;

    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(ary)
    VALUE ary;
{
    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(ary)
    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(argc, argv, ary)
    int argc;
    VALUE *argv;
    VALUE ary;
{
    int i, j;
    long len;
    VALUE result;

    for (i=0; i<argc; i++) {
        argv[i] = to_ary(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(ary)
    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 (%d should be %d)",
                     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(copy, orig)
    VALUE copy, 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(ary)
    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(argc, argv, ary)
    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(x, y)
    VALUE x, 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(x, y)
    VALUE x, 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(ary, times)
    VALUE ary, 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(ary, key)
    VALUE ary, 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(ary, value)
    VALUE ary, 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(ary1, ary2)
    VALUE ary1, 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(ary1, ary2)
    VALUE ary1, 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;
}

/*
 *  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(ary)
    VALUE ary;
{
    long i, h;
    VALUE n;

    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.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(ary, item)
    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(ary1, ary2)
    VALUE ary1, 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(ary1, ary2)
    VALUE ary1, 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(ary1, ary2)
    VALUE ary1, 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(ary1, ary2)
    VALUE ary1, 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(ary1, ary2)
    VALUE ary1, 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(ary)
    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(ary)
    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(ary)
    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(ary)
    VALUE ary;
{
    ary = rb_ary_dup(ary);
    rb_ary_compact_bang(ary);
    return ary;
}

/*
 *  call-seq:
 *     array.nitems -> int
 *
 *  Returns the number of non-<code>nil</code> elements in _self_.
 *  May be zero.
 *
 *     [ 1, nil, 3, nil, 5 ].nitems   #=> 3
 */

static VALUE
rb_ary_nitems(ary)
    VALUE ary;
{
    long n = 0;
    VALUE *p, *pend;

    p = RARRAY(ary)->ptr;
    pend = p + RARRAY(ary)->len;

    while (p < pend) {
        if (!NIL_P(*p)) n++;
        p++;
    }
    return LONG2NUM(n);
}

static long
flatten(ary, idx, ary2, memo)
    VALUE ary;
    long idx;
    VALUE ary2, 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(ary)
    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(ary)
    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()
{
    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, 0);
    rb_define_method(rb_cArray, "shift", rb_ary_shift, 0);
    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, "indexes", rb_ary_indexes, -1);
    rb_define_method(rb_cArray, "indices", rb_ary_indexes, -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("<=>");
    inspect_key = rb_intern("__inspect_key__");
}
/* [<][>][^] [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_mul
  46. bigdivrem
  47. bigdivmod
  48. rb_big_div
  49. rb_big_modulo
  50. rb_big_remainder
  51. rb_big_divmod
  52. rb_big_quo
  53. rb_big_pow
  54. rb_big_and
  55. rb_big_or
  56. rb_big_xor
  57. rb_big_lshift
  58. rb_big_rshift
  59. rb_big_aref
  60. rb_big_hash
  61. rb_big_coerce
  62. rb_big_abs
  63. rb_big_rand
  64. rb_big_size
  65. Init_Bignum
/**********************************************************************

  bignum.c -

  $Author: akr $
  $Date: 2005/12/16 18:59:31 $
  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(klass, len, sign)
    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(x)
    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(x)
    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] = RBIGNUM(x)->sign ? ~0 : 1;
    }
}

void
rb_big_2comp(x)                 /* get 2's complement */
    VALUE x;
{
    get2comp(x);
}

static VALUE
bignorm(x)
    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(x)
    VALUE x;
{
    return bignorm(x);
}

VALUE
rb_uint2big(n)
    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(n)
    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(n)
    unsigned long n;
{
    if (POSFIXABLE(n)) return LONG2FIX(n);
    return rb_uint2big(n);
}

VALUE
rb_int2inum(n)
    long n;
{
    if (FIXABLE(n)) return LONG2FIX(n);
    return rb_int2big(n);
}

#ifdef HAVE_LONG_LONG

void
rb_quad_pack(buf, val)
    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)
            rb_raise(rb_eRangeError, "bignum too big to convert into `quad int'");
        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(buf, sign)
    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(str, base, badcheck)
    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(str, base, badcheck)
    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(n)
    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(n)
    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(n)
    unsigned LONG_LONG n;
{
    if (POSFIXABLE(n)) return LONG2FIX(n);
    return rb_ull2big(n);
}

VALUE
rb_ll2inum(n)
    LONG_LONG n;
{
    if (FIXABLE(n)) return LONG2FIX(n);
    return rb_ll2big(n);
}

#endif  /* HAVE_LONG_LONG */

VALUE
rb_cstr2inum(str, base)
    const char *str;
    int base;
{
    return rb_cstr_to_inum(str, base, base==0);
}

VALUE
rb_str2inum(str, base)
    VALUE str;
    int base;
{
    return rb_str_to_inum(str, base, base==0);
}

const char ruby_digitmap[] = "0123456789abcdefghijklmnopqrstuvwxyz";
VALUE
rb_big2str(x, base)
    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(argc, argv, x)
    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(x, type)
    VALUE x;
    char *type;
{
    long len = RBIGNUM(x)->len;
    BDIGIT_DBL num;
    BDIGIT *ds;

    if (len > SIZEOF_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
rb_big2ulong_pack(x)
    VALUE x;
{
    unsigned long num = big2ulong(x, "unsigned long");
    if (!RBIGNUM(x)->sign) {
        return -num;
    }
    return num;
}

unsigned long
rb_big2ulong(x)
    VALUE x;
{
    unsigned long num = big2ulong(x, "unsigned long");

    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(x)
    VALUE x;
{
    unsigned long num = big2ulong(x, "long");

    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(x, type)
    VALUE x;
    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(x)
    VALUE x;
{
    unsigned LONG_LONG num = big2ull(x, "unsigned long long");

    if (!RBIGNUM(x)->sign) return -num;
    return num;
}

LONG_LONG
rb_big2ll(x)
    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(d)
    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(d)
    double d;
{
    return bignorm(dbl2big(d));
}

double
rb_big2dbl(x)
    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(x)
    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>.
 *
 */

static VALUE
rb_big_cmp(x, y)
    VALUE x, 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
 */

static VALUE
rb_big_eq(x, y)
    VALUE x, 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(x, y)
    VALUE x, 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(x)
    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(x)
    VALUE x;
{
    VALUE z = rb_big_clone(x);
    long i;
    BDIGIT *ds;

    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(x, y)
    VALUE x, 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(x, y, sign)
    VALUE x, 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(x, y)
    VALUE x, 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(x, y)
    VALUE x, 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);
    }
}

/*
 *  call-seq:
 *     big * other  => Numeric
 *
 *  Multiplies big and other, returning the result.
 */

VALUE
rb_big_mul(x, y)
    VALUE x, y;
{
    long i, j;
    BDIGIT_DBL n = 0;
    VALUE z;
    BDIGIT *zds;

    if (FIXNUM_P(x)) x = rb_int2big(FIX2LONG(x));
    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 bignorm(z);
}

static void
bigdivrem(x, y, divp, modp)
    VALUE x, y;
    VALUE *divp, *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(x, y, divp, modp)
    VALUE x, y;
    VALUE *divp, *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.
 */

static VALUE
rb_big_div(x, y)
    VALUE x, 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.
 */

static VALUE
rb_big_modulo(x, y)
    VALUE x, 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(x, y)
    VALUE x, 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(x, y)
    VALUE x, 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(x, y)
    VALUE x, 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(x, y)
    VALUE x, 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_mul(x, x);
                }
                z = rb_big_mul(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(xx, yy)
    VALUE xx, 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(xx, yy)
    VALUE xx, 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(xx, yy)
    VALUE xx, 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(x, y)
    VALUE x, 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(x, y)
    VALUE x, 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(x, y)
    VALUE x, 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(x)
    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(x, y)
    VALUE x, 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(x)
    VALUE x;
{
    if (!RBIGNUM(x)->sign) {
        x = rb_big_clone(x);
        RBIGNUM(x)->sign = 1;
    }
    return x;
}

VALUE
rb_big_rand(max, rand_buf)
    VALUE max;
    double *rand_buf;
{
    VALUE v;
    long len = RBIGNUM(max)->len;

    if (BIGZEROP(max)) {
        return rb_float_new(rand_buf[0]);
    }
    v = bignew(len,1);
    len--;
    BDIGITS(v)[len] = BDIGITS(max)[len] * rand_buf[len];
    while (len--) {
        BDIGITS(v)[len] = ((BDIGIT)~0) * rand_buf[len];
    }

    return v;
}

/*
 *  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(big)
    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()
{
    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_class_new
  3. clone_method
  4. rb_mod_init_copy
  5. rb_class_init_copy
  6. rb_singleton_class_clone
  7. rb_singleton_class_attached
  8. rb_make_metaclass
  9. rb_define_class_id
  10. rb_check_inheritable
  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: nobu $
  $Date: 2005/09/28 14:42:46 $
  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(super)
    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;
}

VALUE
rb_class_new(super)
    VALUE super;
{
    Check_Type(super, T_CLASS);
    if (super == rb_cClass) {
        rb_raise(rb_eTypeError, "can't make subclass of Class");
    }
    if (FL_TEST(super, FL_SINGLETON)) {
        rb_raise(rb_eTypeError, "can't make subclass of virtual class");
    }
    return rb_class_boot(super);
}

static int
clone_method(mid, body, tbl)
    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(clone, orig)
    VALUE clone, 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(clone, orig)
    VALUE clone, 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(obj)
    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(klass, obj)
    VALUE klass, 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(obj, super)
    VALUE obj, super;
{
    VALUE klass = rb_class_boot(super);
    FL_SET(klass, FL_SINGLETON);
    RBASIC(obj)->klass = klass;
    rb_singleton_class_attached(klass, obj);
    if (BUILTIN_TYPE(obj) == T_CLASS && FL_TEST(obj, FL_SINGLETON)) {
        RBASIC(klass)->klass = klass;
        RCLASS(klass)->super = RBASIC(rb_class_real(RCLASS(obj)->super))->klass;
    }
    else {
        VALUE 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, super)
    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;
}

void
rb_check_inheritable(super)
    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 virtual class");
    }
}

VALUE
rb_class_inherited(super, klass)
    VALUE super, klass;
{
    if (!super) super = rb_cObject;
    return rb_funcall(super, rb_intern("inherited"), 1, klass);
}

VALUE
rb_define_class(name, super)
    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(outer, name, super)
    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()
{
    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 id;
{
    VALUE mdl;

    mdl = rb_module_new();
    rb_name_class(mdl, id);

    return mdl;
}

VALUE
rb_define_module(name)
    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(outer, name)
    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(module, super)
    VALUE module, 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(klass, module)
    VALUE klass, 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;
            }
        }
        c = RCLASS(c)->super = include_class_new(module, 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(mod)
    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(mod, mod2)
    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(mod)
    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(name, type, ary, visi)
    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(name, type, ary)
    ID name;
    long type;
    VALUE ary;
{
    return ins_methods_push(name, type, ary, -1); /* everything but private */
}

static int
ins_methods_prot_i(name, type, ary)
    ID name;
    long type;
    VALUE ary;
{
    return ins_methods_push(name, type, ary, NOEX_PROTECTED);
}

static int
ins_methods_priv_i(name, type, ary)
    ID name;
    long type;
    VALUE ary;
{
    return ins_methods_push(name, type, ary, NOEX_PRIVATE);
}

static int
ins_methods_pub_i(name, type, ary)
    ID name;
    long type;
    VALUE ary;
{
    return ins_methods_push(name, type, ary, NOEX_PUBLIC);
}

static int
method_entry(key, body, list)
    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(argc, argv, mod, func)
    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(argc, argv, mod)
    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(argc, argv, mod)
    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(argc, argv, mod)
    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(argc, argv, mod)
    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(argc, argv, obj)
    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(klass, name, func, argc)
    VALUE klass;
    ID name;
    VALUE (*func)();
    int argc;
{
    rb_add_method(klass, name, NEW_CFUNC(func,argc), NOEX_PUBLIC);
}

void
rb_define_method(klass, name, func, argc)
    VALUE klass;
    const char *name;
    VALUE (*func)();
    int argc;
{
    ID id = rb_intern(name);
    int ex = NOEX_PUBLIC;

    rb_add_method(klass, id, NEW_CFUNC(func, argc), ex);
}

void
rb_define_protected_method(klass, name, func, argc)
    VALUE klass;
    const char *name;
    VALUE (*func)();
    int argc;
{
    rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PROTECTED);
}

void
rb_define_private_method(klass, name, func, argc)
    VALUE klass;
    const char *name;
    VALUE (*func)();
    int argc;
{
    rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PRIVATE);
}

void
rb_undef_method(klass, name)
    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(obj)
    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(obj, name, func, argc)
    VALUE obj;
    const char *name;
    VALUE (*func)();
    int argc;
{
    rb_define_method(rb_singleton_class(obj), name, func, argc);
}

void
rb_define_module_function(module, name, func, argc)
    VALUE module;
    const char *name;
    VALUE (*func)();
    int argc;
{
    rb_define_private_method(module, name, func, argc);
    rb_define_singleton_method(module, name, func, argc);
}

void
rb_define_global_function(name, func, argc)
    const char *name;
    VALUE (*func)();
    int argc;
{
    rb_define_module_function(rb_mKernel, name, func, argc);
}

void
rb_define_alias(klass, name1, name2)
    VALUE klass;
    const char *name1, *name2;
{
    rb_alias(klass, rb_intern(name1), rb_intern(name2));
}

void
rb_define_attr(klass, name, read, write)
    VALUE klass;
    const char *name;
    int read, write;
{
    rb_attr(klass, rb_intern(name), read, write, Qfalse);
}

#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

int
#ifdef HAVE_STDARG_PROTOTYPES
rb_scan_args(int argc, const VALUE *argv, const char *fmt, ...)
#else
rb_scan_args(argc, argv, fmt, va_alist)
    int argc;
    const VALUE *argv;
    const char *fmt;
    va_dcl
#endif
{
    int n, i = 0;
    const char *p = fmt;
    VALUE *var;
    va_list vargs;

    va_init_list(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: dave $
  $Date: 2003/12/19 00:01:18 $
  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(val, a, b)
    VALUE val, a, 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(x, y)
    VALUE x, 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);
}

#define cmperr() (rb_cmperr(x, y), Qnil)

static VALUE
cmp_eq(a)
    VALUE *a;
{
    VALUE c = rb_funcall(a[0], cmp, 1, a[1]);

    if (NIL_P(c)) return Qnil;
    if (rb_cmpint(c, a[0], a[1]) == 0) return Qtrue;
    return Qfalse;
}

static VALUE
cmp_failed()
{
    return Qnil;
}

/*
 *  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(x, y)
    VALUE x, 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(x, y)
    VALUE x, y;
{
    VALUE c = rb_funcall(x, cmp, 1, y);

    if (NIL_P(c)) return cmperr();
    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(x, y)
    VALUE x, y;
{
    VALUE c = rb_funcall(x, cmp, 1, y);

    if (NIL_P(c)) return cmperr();
    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(x, y)
    VALUE x, y;
{
    VALUE c = rb_funcall(x, cmp, 1, y);

    if (NIL_P(c)) return cmperr();
    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(x, y)
    VALUE x, y;
{
    VALUE c = rb_funcall(x, cmp, 1, y);

    if (NIL_P(c)) return cmperr();
    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(x, min, max)
    VALUE x, min, 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()
{
    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: nobu $
  $Date: 2005/10/25 16:59:57 $
  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 xcalloc ruby_xcalloc
#define xrealloc ruby_xrealloc
#define xfree ruby_xfree

void *xmalloc _((long));
void *xcalloc _((long,long));
void *xrealloc _((void*,long));
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.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

#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 flush_register_windows(void)
#  if defined(__GNUC__) && (( __GNUC__ == 3 && __GNUC_MINOR__ > 0 ) || __GNUC__ > 3)
__attribute__ ((noinline))
#  endif
  ;
#  define FLUSH_REGISTER_WINDOWS flush_register_windows()
#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. range
  2. fnmatch
  3. free_dir
  4. dir_s_alloc
  5. dir_initialize
  6. dir_s_open
  7. dir_closed
  8. dir_path
  9. dir_read
  10. dir_each
  11. dir_tell
  12. dir_seek
  13. dir_set_pos
  14. dir_rewind
  15. dir_close
  16. dir_chdir
  17. chdir_yield
  18. chdir_restore
  19. dir_s_chdir
  20. dir_s_getwd
  21. check_dirname
  22. dir_s_chroot
  23. dir_s_mkdir
  24. dir_s_rmdir
  25. has_magic
  26. extract_path
  27. extract_elem
  28. remove_backslashes
  29. glob_func_caller
  30. glob_helper
  31. ruby_glob
  32. ruby_globi
  33. rb_glob_caller
  34. rb_glob2
  35. rb_glob
  36. rb_globi
  37. push_pattern
  38. push_globs
  39. push_braces
  40. rb_push_glob
  41. dir_s_aref
  42. dir_s_glob
  43. dir_open_dir
  44. dir_foreach
  45. dir_entries
  46. file_s_fnmatch
  47. Init_Dir
/**********************************************************************

  dir.c -

  $Author: nobu $
  $Date: 2005/09/14 13:40:58 $
  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

#define FNM_NOESCAPE    0x01
#define FNM_PATHNAME    0x02
#define FNM_DOTMATCH    0x04
#define FNM_CASEFOLD    0x08

#define FNM_NOMATCH     1
#define FNM_ERROR       2

#define downcase(c) (nocase && ISUPPER(c) ? tolower(c) : (c))

#ifndef CharNext                /* defined as CharNext[AW] on Windows. */
# if defined(DJGPP)
#   define CharNext(p) ((p) + mblen(p, MB_CUR_MAX))
# else
#   define CharNext(p) ((p) + 1)
# endif
#endif

#if defined DOSISH
#define isdirsep(c) ((c) == '/' || (c) == '\\')
#else
#define isdirsep(c) ((c) == '/')
#endif

static char *
range(pat, test, flags)
    const char *pat;
    int test;
    int flags;
{
    int not, ok = 0;
    int nocase = flags & FNM_CASEFOLD;
    int escape = !(flags & FNM_NOESCAPE);

    not = *pat == '!' || *pat == '^';
    if (not)
        pat++;

    test = downcase(test);

    while (*pat != ']') {
        int cstart, cend;
        if (escape && *pat == '\\')
            pat++;
        cstart = cend = *pat++;
        if (!cstart)
            return NULL;
        if (*pat == '-' && pat[1] != ']') {
            pat++;
            if (escape && *pat == '\\')
                pat++;
            cend = *pat++;
            if (!cend)
                return NULL;
        }
        if (downcase(cstart) <= test && test <= downcase(cend))
            ok = 1;
    }
    return ok == not ? NULL : (char *)pat + 1;
}

#define ISDIRSEP(c) (pathname && isdirsep(c))
#define PERIOD(s) (period && *(s) == '.' && \
                  ((s) == string || ISDIRSEP((s)[-1])))
static int
fnmatch(pat, string, flags)
    const char *pat;
    const char *string;
    int flags;
{
    int c;
    int test;
    const char *s = string;
    int escape = !(flags & FNM_NOESCAPE);
    int pathname = flags & FNM_PATHNAME;
    int period = !(flags & FNM_DOTMATCH);
    int nocase = flags & FNM_CASEFOLD;

    while (c = *pat++) {
        switch (c) {
        case '?':
            if (!*s || ISDIRSEP(*s) || PERIOD(s))
                return FNM_NOMATCH;
            s++;
            break;
        case '*':
            while ((c = *pat++) == '*')
                ;

            if (PERIOD(s))
                return FNM_NOMATCH;

            if (!c) {
                if (pathname && *rb_path_next(s))
                    return FNM_NOMATCH;
                else
                    return 0;
            }
            else if (ISDIRSEP(c)) {
                s = rb_path_next(s);
                if (*s) {
                    s++;
                    break;
                }
                return FNM_NOMATCH;
            }

            test = escape && c == '\\' ? *pat : c;
            test = downcase(test);
            pat--;
            while (*s) {
                if ((c == '?' || c == '[' || downcase(*s) == test) &&
                    !fnmatch(pat, s, flags | FNM_DOTMATCH))
                    return 0;
                else if (ISDIRSEP(*s))
                    break;
                s++;
            }
            return FNM_NOMATCH;

        case '[':
            if (!*s || ISDIRSEP(*s) || PERIOD(s))
                return FNM_NOMATCH;
            pat = range(pat, *s, flags);
            if (pat == NULL)
                return FNM_NOMATCH;
            s++;
            break;

        case '\\':
            if (escape
#if defined DOSISH
                && *pat && strchr("*?[]\\", *pat)
#endif
                ) {
                c = *pat;
                if (!c)
                    c = '\\';
                else
                    pat++;
            }
            /* FALLTHROUGH */

        default:
#if defined DOSISH
            if (ISDIRSEP(c) && isdirsep(*s))
                ;
            else
#endif
            if(downcase(c) != downcase(*s))
                return FNM_NOMATCH;
            s++;
            break;
        }
    }
    return !*s ? 0 : FNM_NOMATCH;
}

VALUE rb_cDir;

struct dir_data {
    DIR *dir;
    char *path;
};

static void
free_dir(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));
static VALUE
dir_s_alloc(klass)
    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(dir, dirname)
    VALUE dir, dirname;
{
    struct dir_data *dp;

    SafeStringValue(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(klass, dirname)
    VALUE klass, 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()
{
    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.path => string or nil
 *
 *  Returns the path parameter passed to <em>dir</em>'s constructor.
 *
 *     d = Dir.new("..")
 *     d.path   #=> ".."
 */
static VALUE
dir_path(dir)
    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(dir)
    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(dir)
    VALUE dir;
{
    struct dir_data *dirp;
    struct dirent *dp;

    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(dir)
    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(dir, pos)
    VALUE dir, 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(dir, pos)
    VALUE dir, 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(dir)
    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(dir)
    VALUE dir;
{
    struct dir_data *dirp;

    GetDIR(dir, dirp);
    closedir(dirp->dir);
    dirp->dir = NULL;

    return Qnil;
}

static void
dir_chdir(path)
    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(args)
    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(args)
    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(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    VALUE path = Qnil;

    rb_secure(2);
    if (rb_scan_args(argc, argv, "01", &path) == 1) {
        SafeStringValue(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(dir)
    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 *));
static void
check_dirname(dir)
    volatile VALUE *dir;
{
    char *path, *pend;

    SafeStringValue(*dir);
    rb_secure(2);
    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(dir, path)
    VALUE dir, 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(argc, argv, obj)
    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(obj, dir)
    VALUE obj, 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))

/* Return nonzero if S has any special globbing chars in it.  */
static int
has_magic(s, send, flags)
    const char *s, *send;
    int flags;
{
    register const char *p = s;
    register char c;
    int open = 0;
    int escape = !(flags & FNM_NOESCAPE);

    while ((c = *p++) != '\0') {
        switch (c) {
          case '?':
          case '*':
            return Qtrue;

          case '[':     /* Only accept an open brace if there is a close */
            open++;     /* brace to match it.  Bracket expressions must be */
            continue;   /* complete, according to Posix.2 */
          case ']':
            if (open)
                return Qtrue;
            continue;

          case '\\':
            if (escape && *p++ == '\0')
                return Qfalse;
        }

        if (send && p >= send) break;
    }
    return Qfalse;
}

static char*
extract_path(p, pend)
    const char *p, *pend;
{
    char *alloc;
    int len;

    len = pend - p;
    alloc = ALLOC_N(char, len+1);
    memcpy(alloc, p, len);
    if (len > 1 && pend[-1] == '/'
#if defined DOSISH_DRIVE_LETTER
    && pend[-2] != ':'
#endif
    ) {
        alloc[len-1] = 0;
    }
    else {
        alloc[len] = 0;
    }

    return alloc;
}

static char*
extract_elem(path)
    const char *path;
{
    const char *pend;

    pend = strchr(path, '/');
    if (!pend) pend = path + strlen(path);

    return extract_path(path, pend);
}

static void
remove_backslashes(p)
    char *p;
{
    char *pend = p + strlen(p);
    char *t = p;

    while (p < pend) {
        if (*p == '\\') {
            if (++p == pend) break;
        }
        *t++ = *p++;
    }
    *t = '\0';
}

#ifndef S_ISDIR
#   define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
#endif

struct glob_args {
    void (*func) _((const char*, VALUE));
    const char *c;
    VALUE v;
};

static VALUE glob_func_caller _((VALUE));

static VALUE
glob_func_caller(val)
    VALUE val;
{
    struct glob_args *args = (struct glob_args *)val;

    (*args->func)(args->c, args->v);
    return Qnil;
}

#define glob_call_func(func, path, arg) (*func)(path, arg)

static int glob_helper _((const char *path, const char *sub, int flags, int (*func)(const char *,VALUE), VALUE arg));

static int
glob_helper(path, sub, flags, func, arg)
    const char *path;
    const char *sub;
    int flags;
    int (*func) _((const char *, VALUE));
    VALUE arg;
{
    struct stat st;
    const char *p, *m;
    int status = 0;
    char *buf = 0;
    char *newpath = 0;

    p = sub ? sub : path;
    if (!has_magic(p, 0, flags)) {
        if (
#if defined DOSISH
            TRUE
#else
            !(flags & FNM_NOESCAPE)
#endif
            )
        {
            newpath = strdup(path);
            if (sub) {
                p = newpath + (sub - path);
                remove_backslashes(newpath + (sub - path));
                sub = p;
            }
            else {
                remove_backslashes(newpath);
                p = path = newpath;
            }
        }
        if (lstat(path, &st) == 0) {
            status = glob_call_func(func, path, arg);
        }
        else if (errno != ENOENT) {
            /* In case stat error is other than ENOENT and
               we may want to know what is wrong. */
            sys_warning(path);
        }
        xfree(newpath);
        return status;
    }

    while (p && !status) {
        if (*p == '/') p++;
        m = strchr(p, '/');
        if (has_magic(p, m, flags)) {
            char *dir, *base, *magic;
            DIR *dirp;
            struct dirent *dp;
            int recursive = 0;

            struct d_link {
                char *path;
                struct d_link *next;
            } *tmp, *link, **tail = &link;

            base = extract_path(path, p);
            if (path == p) dir = ".";
            else dir = base;

            magic = extract_elem(p);
            if (stat(dir, &st) < 0) {
                if (errno != ENOENT)
                    sys_warning(dir);
                free(base);
                free(magic);
                break;
            }
            if (S_ISDIR(st.st_mode)) {
                if (m && strcmp(magic, "**") == 0) {
                    int n = strlen(base);
                    recursive = 1;
                    REALLOC_N(buf, char, n+strlen(m)+3);
                    sprintf(buf, "%s%s", base, *base ? m : m+1);
                    status = glob_helper(buf, buf+n, flags, func, arg);
                    if (status) goto finalize;
                }
                dirp = opendir(dir);
                if (dirp == NULL) {
                    sys_warning(dir);
                    free(base);
                    free(magic);
                    break;
                }
            }
            else {
                free(base);
                free(magic);
                break;
            }

#if defined DOSISH_DRIVE_LETTER
#define BASE (*base && !((isdirsep(*base) && !base[1]) || (base[1] == ':' && isdirsep(base[2]) && !base[3])))
#else
#define BASE (*base && !(isdirsep(*base) && !base[1]))
#endif

            for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp)) {
                if (recursive) {
                    if (strcmp(".", dp->d_name) == 0 || strcmp("..", dp->d_name) == 0)
                        continue;
                    if (fnmatch("*", dp->d_name, flags) != 0)
                        continue;
                    REALLOC_N(buf, char, strlen(base)+NAMLEN(dp)+strlen(m)+6);
                    sprintf(buf, "%s%s%s", base, (BASE) ? "/" : "", dp->d_name);
                    if (lstat(buf, &st) < 0) {
                        if (errno != ENOENT)
                            sys_warning(buf);
                        continue;
                    }
                    if (S_ISDIR(st.st_mode)) {
                        char *t = buf+strlen(buf);
                        strcpy(t, "/**");
                        strcpy(t+3, m);
                        status = glob_helper(buf, t, flags, func, arg);
                        if (status) break;
                        continue;
                    }
                    continue;
                }
                if (fnmatch(magic, dp->d_name, flags) == 0) {
                    REALLOC_N(buf, char, strlen(base)+NAMLEN(dp)+2);
                    sprintf(buf, "%s%s%s", base, (BASE) ? "/" : "", dp->d_name);
                    if (!m) {
                        status = glob_call_func(func, buf, arg);
                        if (status) break;
                        continue;
                    }
                    tmp = ALLOC(struct d_link);
                    tmp->path = buf;
                    buf = 0;
                    *tail = tmp;
                    tail = &tmp->next;
                }
            }
            closedir(dirp);
          finalize:
            *tail = 0;
            free(base);
            free(magic);
            if (link) {
                while (link) {
                    if (status == 0) {
                        if (stat(link->path, &st) == 0) {
                            if (S_ISDIR(st.st_mode)) {
                                int len = strlen(link->path);
                                int mlen = strlen(m);

                                REALLOC_N(buf, char, len+mlen+1);
                                sprintf(buf, "%s%s", link->path, m);
                                status = glob_helper(buf, buf+len, flags, func, arg);
                            }
                        }
                        else {
                            sys_warning(link->path);
                        }
                    }
                    tmp = link;
                    link = link->next;
                    free(tmp->path);
                    free(tmp);
                }
                break;
            }
        }
        p = m;
    }
    xfree(buf);
    xfree(newpath);
    return status;
}

int
ruby_glob(path, flags, func, arg)
    const char *path;
    int flags;
    int (*func) _((const char *, VALUE));
    VALUE arg;
{
    return glob_helper(path, 0, flags & ~GLOB_VERBOSE, func, arg);
}

int
ruby_globi(path, flags, func, arg)
    const char *path;
    int flags;
    int (*func) _((const char *, VALUE));
    VALUE arg;
{
    return glob_helper(path, 0, flags | FNM_CASEFOLD, func, arg);
}

static int rb_glob_caller _((const char *, VALUE));

static int
rb_glob_caller(path, a)
    const char *path;
    VALUE a;
{
    int status;
    struct glob_args *args = (struct glob_args *)a;

    args->c = path;
    rb_protect(glob_func_caller, a, &status);
    return status;
}

static int
rb_glob2(path, flags, func, arg)
    const char *path;
    int flags;
    void (*func) _((const char *, VALUE));
    VALUE arg;
{
    struct glob_args args;

    args.func = func;
    args.v = arg;

    return glob_helper(path, 0, flags | GLOB_VERBOSE, rb_glob_caller, (VALUE)&args);
}

void
rb_glob(path, func, arg)
    const char *path;
    void (*func) _((const char*, VALUE));
    VALUE arg;
{
    int status = rb_glob2(path, 0, func, arg);
    if (status) rb_jump_tag(status);
}

void
rb_globi(path, func, arg)
    const char *path;
    void (*func) _((const char*, VALUE));
    VALUE arg;
{
    int status = rb_glob2(path, FNM_CASEFOLD, func, arg);
    if (status) rb_jump_tag(status);
}

static void
push_pattern(path, ary)
    const char *path;
    VALUE ary;
{
    rb_ary_push(ary, rb_tainted_str_new2(path));
}

static int
push_globs(ary, s, flags)
    VALUE ary;
    const char *s;
    int flags;
{
    return rb_glob2(s, flags, push_pattern, ary);
}

static int
push_braces(ary, str, flags)
    VALUE ary;
    const char *str;
    int flags;
{
    char *buf = 0;
    char *b;
    const char *s, *p, *t;
    const char *lbrace, *rbrace;
    int nest = 0;
    int status = 0;

    s = p = str;
    lbrace = rbrace = 0;
    while (*p) {
        if (*p == '{') {
            lbrace = p;
            break;
        }
        p++;
    }
    while (*p) {
        if (*p == '{') nest++;
        if (*p == '}' && --nest == 0) {
            rbrace = p;
            break;
        }
        p++;
    }

    if (lbrace && rbrace) {
        int len = strlen(s);
        p = lbrace;
        while (*p != '}') {
            t = p + 1;
            for (p = t; *p!='}' && *p!=','; p++) {
                /* skip inner braces */
                if (*p == '{') {
                    nest = 1;
                    while (*++p != '}' || --nest) {
                        if (*p == '{') nest++;
                    }
                }
            }
            REALLOC_N(buf, char, len+1);
            memcpy(buf, s, lbrace-s);
            b = buf + (lbrace-s);
            memcpy(b, t, p-t);
            strcpy(b+(p-t), rbrace+1);
            status = push_braces(ary, buf, flags);
            if (status) break;
        }
    }
    else {
        status = push_globs(ary, str, flags);
    }
    xfree(buf);

    return status;
}

#define isdelim(c) ((c)=='\0')

static VALUE
rb_push_glob(str, flags)
    VALUE str;
    int flags;
{
    const char *p, *pend, *buf;
    int nest, maxnest;
    int status = 0;
    int noescape = flags & FNM_NOESCAPE;
    VALUE ary;

    ary = rb_ary_new();
    SafeStringValue(str);
    p = RSTRING(str)->ptr;
    pend = p + RSTRING(str)->len;

    while (p < pend) {
        nest = maxnest = 0;
        while (p < pend && isdelim(*p)) p++;
        buf = p;
        while (p < pend && !isdelim(*p)) {
            if (*p == '{') nest++, maxnest++;
            if (*p == '}') nest--;
            if (!noescape && *p == '\\') {
                if (++p == pend) break;
            }
            p++;
        }
        if (maxnest == 0) {
            status = push_globs(ary, buf, flags);
            if (status) break;
        }
        else if (nest == 0) {
            status = push_braces(ary, buf, flags);
            if (status) break;
        }
        /* else unmatched braces */
    }
    if (status) rb_jump_tag(status);
    if (rb_block_given_p()) {
        rb_ary_each(ary);
        return Qnil;
    }
    return ary;
}

/*
 *  call-seq:
 *     Dir[ string ] => array
 *
 *  Equivalent to calling
 *  <em>dir</em>.<code>glob(</code><i>string,</i><code>0)</code>.
 *
 */
static VALUE
dir_s_aref(obj, str)
    VALUE obj, str;
{
    return rb_push_glob(str, 0);
}

/*
 *  call-seq:
 *     Dir.glob( string, [flags] ) => array
 *     Dir.glob( string, [flags] ) {| filename | block }  => nil
 *
 *  Returns the filenames found by expanding the pattern given in
 *  <i>string</i>, 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.
 *
 *  <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(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    VALUE str, rflags;
    int flags;

    if (rb_scan_args(argc, argv, "11", &str, &rflags) == 2)
        flags = NUM2INT(rflags);
    else
        flags = 0;

    return rb_push_glob(str, flags);
}

static VALUE
dir_open_dir(path)
    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(io, dirname)
    VALUE io, 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(io, dirname)
    VALUE io, 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 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
 *     File.fnmatch('cat',       'category')   #=> false
 *     File.fnmatch('c{at,ub}s', 'cats')       #=> false
 *     File.fnmatch('c{at,ub}s', 'cubs')       #=> false
 *     File.fnmatch('c{at,ub}s', 'cat')        #=> false
 *
 *     File.fnmatch('c?t',    'cat')                       #=> true
 *     File.fnmatch('c\?t',   'cat')                       #=> false
 *     File.fnmatch('c??t',   'cat')                       #=> false
 *     File.fnmatch('c*',     'cats')                      #=> true
 *     File.fnmatch('c/ * FIXME * /t', 'c/a/b/c/t')                 #=> true
 *     File.fnmatch('c*t',    'cat')                       #=> true
 *     File.fnmatch('c\at',   'cat')                       #=> true
 *     File.fnmatch('c\at',   'cat', File::FNM_NOESCAPE)   #=> false
 *     File.fnmatch('a?b',    'a/b')                       #=> true
 *     File.fnmatch('a?b',    'a/b', File::FNM_PATHNAME)   #=> false
 *
 *     File.fnmatch('*',   '.profile')                            #=> false
 *     File.fnmatch('*',   '.profile', File::FNM_DOTMATCH)        #=> true
 *     File.fnmatch('*',   'dave/.profile')                       #=> true
 *     File.fnmatch('*',   'dave/.profile', File::FNM_DOTMATCH)   #=> true
 *     File.fnmatch('*',   'dave/.profile', File::FNM_PATHNAME)   #=> false
 *     File.fnmatch('* / FIXME *', 'dave/.profile', File::FNM_PATHNAME)   #=> false
 *     STRICT = File::FNM_PATHNAME | File::FNM_DOTMATCH
 *     File.fnmatch('* / FIXME *', 'dave/.profile', STRICT)               #=> true
 */
static VALUE
file_s_fnmatch(argc, argv, obj)
    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()
{
    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,"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));
}
/* [<][>][^] [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
  27. vms_fileact
  28. vms_fisexh
/**********************************************************************

  dln.c -

  $Author: eban $
  $Date: 2005/11/26 11:01:01 $
  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();

#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(buf, file)
    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
# if defined(__NetBSD__) && defined(__NetBSD_Version__) && __NetBSD_Version__ < 105000000
#  include <nlist.h>
#  include <link.h>
# else
#  include <dlfcn.h>
# endif
#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()
{
#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

#if defined(__VMS)
#include <starlet.h>
#include <rms.h>
#include <stsdef.h>
#include <unixlib.h>
#include <descrip.h>
#include <lib$routines.h>

static char *vms_filespec;
static int vms_fileact(char *filespec, int type);
static long vms_fisexh(long *sigarr, long *mecarr);
#endif

#endif /* NO_DLN_LOAD */

void*
dln_load(file)
    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
    {
        long status;
        void (*init_fct)();
        char *fname, *p1, *p2;

        $DESCRIPTOR(fname_d, "");
        $DESCRIPTOR(image_d, "");
        $DESCRIPTOR(buf_d, "");

        decc$to_vms(file, vms_fileact, 0, 0);

        fname = (char *)__alloca(strlen(file)+1);
        strcpy(fname,file);
        if (p1 = strrchr(fname,'/'))
            fname = p1 + 1;
        if (p2 = strrchr(fname,'.'))
            *p2 = '\0';

        fname_d.dsc$w_length  = strlen(fname);
        fname_d.dsc$a_pointer = fname;
        image_d.dsc$w_length  = strlen(vms_filespec);
        image_d.dsc$a_pointer = vms_filespec;
        buf_d.dsc$w_length    = strlen(buf);
        buf_d.dsc$a_pointer   = buf;

        lib$establish(vms_fisexh);

        status = lib$find_image_symbol (
                     &fname_d,
                     &buf_d,
                     &init_fct,
                     &image_d);

        lib$establish(0);

        if (status == RMS$_FNF) {
            error = dln_strerror();
            goto failed;
        } else if (!$VMS_STATUS_SUCCESS(status)) {
            error = DLN_ERROR();
            goto failed;
        }

        /* Call the init code */
        (*init_fct)();

        return 1;
    }
#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();

char *
dln_find_exe(fname, path)
    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(fname, path)
    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(fname, path, exe_flag)
    char *fname;
    char *path;
    int exe_flag;               /* non 0 if looking for executable. */
{
    register char *dp;
    register char *ep;
    register char *bp;
    struct stat st;
#ifdef __MACOS__
    const char* mac_fullpath;
#endif

    if (!fname) return fname;
    if (fname[0] == '/') return fname;
    if (strncmp("./", fname, 2) == 0 || strncmp("../", fname, 3) == 0)
      return fname;
    if (exe_flag && strchr(fname, '/')) return fname;
#ifdef DOSISH
    if (fname[0] == '\\') return fname;
# ifdef DOSISH_DRIVE_LETTER
    if (strlen(fname) > 2 && fname[1] == ':') return fname;
# endif
    if (strncmp(".\\", fname, 2) == 0 || strncmp("..\\", fname, 3) == 0)
      return fname;
    if (exe_flag && strchr(fname, '\\')) return fname;
#endif

    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 */
    }
}

#if defined(__VMS)

/* action routine for decc$to_vms */
static int vms_fileact(char *filespec, int type)
{
    if (vms_filespec)
        free(vms_filespec);
    vms_filespec = malloc(strlen(filespec)+1);
    strcpy(vms_filespec, filespec);
    return 1;
}

/* exception handler for LIB$FIND_IMAGE_SYMBOL */
static long vms_fisexh(long *sigarr, long *mecarr)
{
    sys$unwind(1, 0);
    return 1;
}

#endif /* __VMS */
/* [<][>][^] [v] [top][bottom][index] [help] */


dln.h

root/dln.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/**********************************************************************

  dln.h -

  $Author: michal $
  $Date: 2003/01/16 07:34:01 $
  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
/* [<][>][^][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. find_i
  6. enum_find
  7. find_all_i
  8. enum_find_all
  9. reject_i
  10. enum_reject
  11. collect_i
  12. collect_all
  13. enum_collect
  14. enum_to_a
  15. inject_i
  16. enum_inject
  17. partition_i
  18. enum_partition
  19. enum_sort
  20. sort_by_i
  21. sort_by_cmp
  22. enum_sort_by
  23. all_iter_i
  24. all_i
  25. enum_all
  26. any_iter_i
  27. any_i
  28. enum_any
  29. min_i
  30. min_ii
  31. enum_min
  32. max_i
  33. max_ii
  34. enum_max
  35. member_i
  36. enum_member
  37. each_with_index_i
  38. enum_each_with_index
  39. zip_i
  40. enum_zip
  41. Init_Enumerable
/**********************************************************************

  enum.c -

  $Author: nobu $
  $Date: 2005/06/30 16:46:13 $
  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(obj)
    VALUE obj;
{
    return rb_funcall(obj, id_each, 0, 0);
}

static VALUE
grep_i(i, arg)
    VALUE i, *arg;
{
    if (RTEST(rb_funcall(arg[0], id_eqq, 1, i))) {
        rb_ary_push(arg[1], i);
    }
    return Qnil;
}

static VALUE
grep_iter_i(i, arg)
    VALUE i, *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(obj, pat)
    VALUE obj, 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
find_i(i, memo)
    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(argc, argv, obj)
    int argc;
    VALUE* argv;
    VALUE obj;
{
    VALUE memo = Qundef;
    VALUE if_none;

    rb_scan_args(argc, argv, "01", &if_none);
    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(i, ary)
    VALUE i, 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(obj)
    VALUE obj;
{
    VALUE ary = rb_ary_new();

    rb_iterate(rb_each, obj, find_all_i, ary);

    return ary;
}

static VALUE
reject_i(i, ary)
    VALUE i, 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(obj)
    VALUE obj;
{
    VALUE ary = rb_ary_new();

    rb_iterate(rb_each, obj, reject_i, ary);

    return ary;
}

static VALUE
collect_i(i, ary)
    VALUE i, ary;
{
    rb_ary_push(ary, rb_yield(i));

    return Qnil;
}

static VALUE
collect_all(i, ary)
    VALUE i, 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(obj)
    VALUE obj;
{
    VALUE ary = rb_ary_new();

    rb_iterate(rb_each, obj, rb_block_given_p() ? collect_i : collect_all, 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(obj)
    VALUE obj;
{
    VALUE ary = rb_ary_new();

    rb_iterate(rb_each, obj, collect_all, ary);

    return ary;
}

static VALUE
inject_i(i, memo)
    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(argc, argv, obj)
    int argc;
    VALUE *argv, 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(i, ary)
    VALUE i, *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(obj)
    VALUE obj;
{
    VALUE ary[2];

    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(obj)
    VALUE obj;
{
    return rb_ary_sort(enum_to_a(obj));
}

static VALUE
sort_by_i(i, ary)
    VALUE i, 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(aa, bb)
    NODE **aa, **bb;
{
    VALUE a = aa[0]->u1.value;
    VALUE b = bb[0]->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(obj)
    VALUE obj;
{
    VALUE ary;
    long i;

    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) {
        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(i, memo)
    VALUE i;
    VALUE *memo;
{
    if (!RTEST(rb_yield(i))) {
        *memo = Qfalse;
        rb_iter_break();
    }
    return Qnil;
}

static VALUE
all_i(i, memo)
    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(obj)
    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(i, memo)
    VALUE i;
    VALUE *memo;
{
    if (RTEST(rb_yield(i))) {
        *memo = Qtrue;
        rb_iter_break();
    }
    return Qnil;
}

static VALUE
any_i(i, memo)
    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(obj)
    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
min_i(i, memo)
    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(i, memo)
    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(obj)
    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;
}

/*
 *  call-seq:
 *     enum.max                    => obj
 *     enum.max {| a,b | block }   => obj
 *
 *  Returns the object in <i>enum</i> 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
max_i(i, memo)
    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(i, memo)
    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(obj)
    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
member_i(item, memo)
    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(obj, val)
    VALUE obj, 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(val, memo)
    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(obj)
    VALUE obj;
{
    VALUE memo = 0;

    rb_need_block();
    rb_iterate(rb_each, obj, each_with_index_i, (VALUE)&memo);
    return obj;
}

static VALUE
zip_i(val, memo)
    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(argc, argv, obj)
    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()
{
    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,"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,"min", enum_min, 0);
    rb_define_method(rb_mEnumerable,"max", enum_max, 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] */


env.h

root/env.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/**********************************************************************

  env.h -

  $Author: matz $
  $Date: 2003/10/20 08:33:48 $
  created at: Mon Jul 11 11:53:03 JST 1994

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#ifndef ENV_H
#define ENV_H

extern struct FRAME {
    VALUE self;
    int argc;
    VALUE *argv;
    ID last_func;
    ID orig_func;
    VALUE last_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_ALLOCA 0
#define FRAME_MALLOC 1

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

extern int ruby_in_eval;

extern VALUE ruby_class;

struct RVarmap {
    struct RBasic super;
    ID id;
    VALUE val;
    struct RVarmap *next;
};
extern struct RVarmap *ruby_dyna_vars;

#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_to_str
  19. exc_inspect
  20. exc_backtrace
  21. check_backtrace
  22. exc_set_backtrace
  23. exit_initialize
  24. exit_status
  25. exit_success_p
  26. rb_name_error
  27. name_err_initialize
  28. name_err_name
  29. name_err_to_s
  30. nometh_err_initialize
  31. name_err_mesg_mark
  32. name_err_mesg_new
  33. name_err_mesg_to_str
  34. name_err_mesg_load
  35. nometh_err_args
  36. rb_invalid_str
  37. set_syserr
  38. get_syserr
  39. syserr_initialize
  40. syserr_errno
  41. syserr_eqq
  42. Init_Exception
  43. rb_raise
  44. rb_loaderror
  45. rb_notimplement
  46. rb_fatal
  47. rb_sys_fail
  48. rb_sys_warning
  49. rb_load_fail
  50. rb_error_frozen
  51. rb_check_frozen
  52. Init_syserr
  53. err_append
/**********************************************************************

  error.c -

  $Author: matz $
  $Date: 2005/07/20 01:09:53 $
  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>
#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
#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(buf, len)
    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(buf, len, fmt, args)
    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(fmt, args)
    const char *fmt;
    va_list args;
{
    char buf[BUFSIZ];

    err_snprintf(buf, BUFSIZ, fmt, args);
    err_append(buf);
}

void
#ifdef HAVE_STDARG_PROTOTYPES
rb_compile_error(const char *fmt, ...)
#else
rb_compile_error(fmt, va_alist)
    const char *fmt;
    va_dcl
#endif
{
    va_list args;

    va_init_list(args, fmt);
    err_print(fmt, args);
    va_end(args);
    ruby_nerrs++;
}

void
#ifdef HAVE_STDARG_PROTOTYPES
rb_compile_error_append(const char *fmt, ...)
#else
rb_compile_error_append(fmt, va_alist)
    const char *fmt;
    va_dcl
#endif
{
    va_list args;
    char buf[BUFSIZ];

    va_init_list(args, fmt);
    vsnprintf(buf, BUFSIZ, fmt, args);
    va_end(args);
    err_append(buf);
}

static void
warn_print(fmt, args)
    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
#ifdef HAVE_STDARG_PROTOTYPES
rb_warn(const char *fmt, ...)
#else
rb_warn(fmt, va_alist)
    const char *fmt;
    va_dcl
#endif
{
    char buf[BUFSIZ];
    va_list args;

    if (NIL_P(ruby_verbose)) return;

    snprintf(buf, BUFSIZ, "warning: %s", fmt);

    va_init_list(args, fmt);
    warn_print(buf, args);
    va_end(args);
}

/* rb_warning() reports only in verbose mode */
void
#ifdef HAVE_STDARG_PROTOTYPES
rb_warning(const char *fmt, ...)
#else
rb_warning(fmt, va_alist)
    const char *fmt;
    va_dcl
#endif
{
    char buf[BUFSIZ];
    va_list args;

    if (!RTEST(ruby_verbose)) return;

    snprintf(buf, BUFSIZ, "warning: %s", fmt);

    va_init_list(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(self, mesg)
    VALUE self, mesg;
{
    if (!NIL_P(ruby_verbose)) {
        rb_io_write(rb_stderr, mesg);
        rb_io_write(rb_stderr, rb_default_rs);
    }
    return Qnil;
}

void
#ifdef HAVE_STDARG_PROTOTYPES
rb_bug(const char *fmt, ...)
#else
rb_bug(fmt, va_alist)
    const char *fmt;
    va_dcl
#endif
{
    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_init_list(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(x, t)
    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", t);
    }
}

/* 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_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;

VALUE
rb_exc_new(etype, ptr, len)
    VALUE etype;
    const char *ptr;
    long len;
{
    return rb_funcall(etype, rb_intern("new"), 1, rb_str_new(ptr, len));
}

VALUE
rb_exc_new2(etype, s)
    VALUE etype;
    const char *s;
{
    return rb_exc_new(etype, s, strlen(s));
}

VALUE
rb_exc_new3(etype, str)
    VALUE etype, str;
{
    StringValue(str);
    return rb_exc_new(etype, RSTRING(str)->ptr, RSTRING(str)->len);
}

/*
 * call-seq:
 *    Exception.new(msg = nil)   =>  exception
 *
 *  Construct a new Exception object, optionally passing in
 *  a message.
 */

static VALUE
exc_initialize(argc, argv, exc)
    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(argc, argv, self)
    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(exc)
    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
 *   exception.to_str    =>  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_to_str(exc)
    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(exc)
    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(exc)
    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(bt)
    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(exc, bt)
    VALUE exc;
    VALUE bt;
{
    return rb_iv_set(exc, "bt", check_backtrace(bt));
}

/*
 * call-seq:
 *   SystemExit.new(status=0)   => system_exit
 *
 * Create a new +SystemExit+ exception with the given status.
 */

static VALUE
exit_initialize(argc, argv, exc)
    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(exc)
    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(exc)
    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
#ifdef HAVE_STDARG_PROTOTYPES
rb_name_error(ID id, const char *fmt, ...)
#else
rb_name_error(id, fmt, va_alist)
    ID id;
    const char *fmt;
    va_dcl
#endif
{
    VALUE exc, argv[2];
    va_list args;
    char buf[BUFSIZ];

    va_init_list(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(argc, argv, self)
    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(self)
    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(exc)
    VALUE exc;
{
    VALUE mesg = rb_attr_get(exc, rb_intern("mesg")), 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(argc, argv, self)
    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(ptr)
    VALUE *ptr;
{
    rb_gc_mark_locations(ptr, ptr+3);
}

/* :nodoc: */
static VALUE
name_err_mesg_new(obj, mesg, recv, method)
    VALUE obj, mesg, recv, 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_to_str(obj)
    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(klass, str)
    VALUE klass, 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(self)
    VALUE self;
{
    return rb_attr_get(self, rb_intern("args"));
}

void
rb_invalid_str(str, type)
    const char *str, *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(n, name)
    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(n)
    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(argc, argv, self)
    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;
        size_t len;

        StringValue(str);
        len = strlen(err)+RSTRING(str)->len+3;
        mesg = rb_str_new(0, len);
        snprintf(RSTRING(mesg)->ptr, len+1, "%s - %.*s", err,
                (int)RSTRING(str)->len, RSTRING(str)->ptr);
        rb_str_resize(mesg, strlen(RSTRING(mesg)->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(self)
    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(self, exc)
    VALUE self, 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;
}

/*
 *  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()
{
    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, "to_s", exc_to_s, 0);
    rb_define_method(rb_eException, "to_str", exc_to_str, 0);
    rb_define_method(rb_eException, "message", exc_to_str, 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_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, "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_global_function("warn", rb_warn_m, 1);
}

void
#ifdef HAVE_STDARG_PROTOTYPES
rb_raise(VALUE exc, const char *fmt, ...)
#else
rb_raise(exc, fmt, va_alist)
    VALUE exc;
    const char *fmt;
    va_dcl
#endif
{
    va_list args;
    char buf[BUFSIZ];

    va_init_list(args,fmt);
    vsnprintf(buf, BUFSIZ, fmt, args);
    va_end(args);
    rb_exc_raise(rb_exc_new2(exc, buf));
}

void
#ifdef HAVE_STDARG_PROTOTYPES
rb_loaderror(const char *fmt, ...)
#else
rb_loaderror(fmt, va_alist)
    const char *fmt;
    va_dcl
#endif
{
    va_list args;
    char buf[BUFSIZ];

    va_init_list(args, fmt);
    vsnprintf(buf, BUFSIZ, fmt, args);
    va_end(args);
    rb_exc_raise(rb_exc_new2(rb_eLoadError, buf));
}

void
rb_notimplement()
{
    rb_raise(rb_eNotImpError,
             "the %s() function is unimplemented on this machine",
             rb_id2name(ruby_frame->last_func));
}

void
#ifdef HAVE_STDARG_PROTOTYPES
rb_fatal(const char *fmt, ...)
#else
rb_fatal(fmt, va_alist)
    const char *fmt;
    va_dcl
#endif
{
    va_list args;
    char buf[BUFSIZ];

    va_init_list(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(mesg)
    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
#ifdef HAVE_STDARG_PROTOTYPES
rb_sys_warning(const char *fmt, ...)
#else
rb_sys_warning(fmt, va_alist)
     const char *fmt;
     va_dcl
#endif
{
     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_init_list(args, fmt);
     warn_print(buf, args);
     va_end(args);
     errno = errno_save;
}

void
rb_load_fail(path)
    const char *path;
{
    rb_loaderror("%s -- %s", strerror(errno), path);
}

void
rb_error_frozen(what)
    const char *what;
{
    rb_raise(rb_eTypeError, "can't modify frozen %s", what);
}

void
rb_check_frozen(obj)
    VALUE obj;
{
    if (OBJ_FROZEN(obj)) rb_error_frozen(rb_obj_classname(obj));
}

void
Init_syserr()
{
#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
}

static void
err_append(s)
    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] */


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. rb_event_hook_t
  36. ruby_set_current_source
  37. warn_printf
  38. error_pos
  39. get_backtrace
  40. set_backtrace
  41. error_print
  42. is_ruby_native_thread
  43. ruby_init
  44. eval_node
  45. sysexit_status
  46. error_handle
  47. ruby_options
  48. ruby_finalize_0
  49. ruby_finalize_1
  50. ruby_finalize
  51. ruby_cleanup
  52. ruby_exec_internal
  53. ruby_stop
  54. ruby_exec
  55. ruby_run
  56. compile_error
  57. rb_eval_string
  58. rb_eval_string_protect
  59. rb_eval_string_wrap
  60. localjump_error
  61. localjump_xvalue
  62. localjump_reason
  63. jump_tag_but_local_jump
  64. rb_eval_cmd
  65. ev_const_defined
  66. ev_const_get
  67. cvar_cbase
  68. rb_mod_nesting
  69. rb_mod_s_constants
  70. rb_frozen_class_p
  71. rb_undef
  72. rb_mod_undef_method
  73. rb_alias
  74. rb_mod_alias_method
  75. copy_node_scope
  76. anode
  77. arg_defined
  78. is_defined
  79. rb_obj_is_proc
  80. rb_add_event_hook
  81. rb_remove_event_hook
  82. set_trace_func
  83. get_event_name
  84. call_trace_func
  85. avalue_to_svalue
  86. svalue_to_avalue
  87. svalue_to_mrhs
  88. avalue_splat
  89. rb_Array
  90. splat_value
  91. class_prefix
  92. unknown_node
  93. rb_eval
  94. module_setup
  95. rb_obj_respond_to
  96. rb_respond_to
  97. obj_respond_to
  98. rb_mod_method_defined
  99. rb_mod_public_method_defined
  100. rb_mod_private_method_defined
  101. rb_mod_protected_method_defined
  102. terminate_process
  103. rb_exit
  104. rb_f_exit
  105. rb_f_abort
  106. rb_iter_break
  107. rb_longjmp
  108. rb_exc_raise
  109. rb_exc_fatal
  110. rb_interrupt
  111. rb_f_raise
  112. rb_make_exception
  113. rb_raise_jump
  114. rb_jump_tag
  115. rb_block_given_p
  116. rb_iterator_p
  117. rb_f_block_given_p
  118. proc_jump_error
  119. return_jump
  120. break_jump
  121. rb_need_block
  122. rb_yield_0
  123. rb_yield
  124. rb_yield_values
  125. rb_yield_splat
  126. rb_f_loop
  127. massign
  128. assign
  129. rb_iterate
  130. handle_rescue
  131. rb_rescue2
  132. rb_rescue
  133. rb_protect
  134. rb_ensure
  135. rb_with_disable_interrupt
  136. stack_check
  137. rb_method_missing
  138. method_missing
  139. call_cfunc
  140. rb_call0
  141. rb_call
  142. rb_apply
  143. rb_f_send
  144. vafuncall
  145. rb_funcall
  146. rb_funcall_rescue
  147. rb_funcall2
  148. rb_funcall3
  149. rb_call_super
  150. backtrace
  151. rb_f_caller
  152. rb_backtrace
  153. make_backtrace
  154. rb_frame_last_func
  155. compile
  156. eval
  157. rb_f_eval
  158. exec_under
  159. eval_under_i
  160. eval_under
  161. yield_under_i
  162. yield_under
  163. specific_eval
  164. rb_obj_instance_eval
  165. rb_mod_module_eval
  166. rb_load
  167. rb_load_protect
  168. rb_f_load
  169. rb_feature_p
  170. rb_provided
  171. rb_provide_feature
  172. rb_provide
  173. load_wait
  174. rb_f_require
  175. search_required
  176. load_failed
  177. rb_require_safe
  178. rb_require
  179. secure_visibility
  180. set_method_visibility
  181. rb_mod_public
  182. rb_mod_protected
  183. rb_mod_private
  184. rb_mod_public_method
  185. rb_mod_private_method
  186. top_public
  187. top_private
  188. rb_mod_modfunc
  189. rb_mod_append_features
  190. rb_mod_include
  191. rb_obj_call_init
  192. rb_extend_object
  193. rb_mod_extend_object
  194. rb_obj_extend
  195. top_include
  196. errinfo_setter
  197. errat_getter
  198. errat_setter
  199. rb_f_local_variables
  200. rb_set_end_proc
  201. rb_mark_end_proc
  202. call_end_proc
  203. rb_f_END
  204. rb_f_at_exit
  205. rb_exec_end_proc
  206. Init_eval
  207. rb_mod_autoload
  208. rb_mod_autoload_p
  209. rb_f_autoload
  210. rb_f_autoload_p
  211. Init_load
  212. scope_dup
  213. blk_mark
  214. frame_free
  215. blk_free
  216. frame_dup
  217. blk_copy_prev
  218. blk_dup
  219. proc_clone
  220. proc_dup
  221. rb_f_binding
  222. proc_save_safe_level
  223. proc_get_safe_level
  224. proc_set_safe_level
  225. proc_alloc
  226. proc_s_new
  227. rb_block_proc
  228. rb_f_lambda
  229. proc_lambda
  230. block_orphan
  231. proc_invoke
  232. proc_call
  233. proc_arity
  234. proc_eq
  235. proc_to_s
  236. proc_to_self
  237. proc_binding
  238. block_pass
  239. bm_mark
  240. mnew
  241. method_eq
  242. method_unbind
  243. rb_obj_method
  244. rb_mod_method
  245. method_clone
  246. method_call
  247. umethod_bind
  248. method_arity
  249. method_inspect
  250. mproc
  251. bmcall
  252. rb_proc_new
  253. method_proc
  254. rb_obj_is_method
  255. rb_mod_define_method
  256. Init_Proc
  257. Init_Binding
  258. win32_get_exception_list
  259. win32_set_exception_list
  260. thread_set_raised
  261. thread_reset_raised
  262. run_trap_eval
  263. rb_trap_eval
  264. thread_status_name
  265. rb_set_safe_level
  266. safe_getter
  267. safe_setter
  268. timeofday
  269. mark_frame_adj
  270. thread_mark
  271. rb_gc_mark_threads
  272. thread_free
  273. rb_thread_check
  274. rb_thread_save_context
  275. rb_thread_switch
  276. __declspec
  277. rb_thread_restore_context
  278. rb_thread_ready
  279. rb_thread_die
  280. rb_thread_remove
  281. rb_thread_dead
  282. rb_thread_fd_close
  283. rb_thread_main_jump
  284. rb_thread_deadlock
  285. copy_fds
  286. match_fds
  287. intersect_fds
  288. find_bad_fds
  289. rb_thread_schedule
  290. rb_thread_wait_fd
  291. rb_thread_fd_writable
  292. rb_thread_wait_for
  293. rb_thread_alone
  294. rb_thread_select
  295. rb_thread_join
  296. rb_thread_join_m
  297. rb_thread_current
  298. rb_thread_main
  299. rb_thread_list
  300. rb_thread_wakeup
  301. rb_thread_run
  302. rb_thread_kill
  303. rb_thread_s_kill
  304. rb_thread_exit
  305. rb_thread_pass
  306. rb_thread_stop
  307. rb_thread_polling
  308. rb_thread_sleep
  309. rb_thread_sleep_forever
  310. rb_thread_priority
  311. rb_thread_priority_set
  312. rb_thread_safe_level
  313. rb_thread_s_abort_exc
  314. rb_thread_s_abort_exc_set
  315. rb_thread_abort_exc
  316. rb_thread_abort_exc_set
  317. rb_thread_group
  318. rb_thread_alloc
  319. catch_timer
  320. thread_timer
  321. rb_thread_start_timer
  322. rb_thread_stop_timer
  323. catch_timer
  324. rb_thread_start_timer
  325. rb_thread_stop_timer
  326. rb_thread_start_0
  327. rb_thread_create
  328. rb_thread_yield
  329. rb_thread_s_new
  330. rb_thread_initialize
  331. rb_thread_start
  332. rb_thread_value
  333. rb_thread_status
  334. rb_thread_alive_p
  335. rb_thread_stop_p
  336. rb_thread_wait_other_threads
  337. rb_thread_cleanup
  338. rb_thread_critical_get
  339. rb_thread_critical_set
  340. rb_thread_interrupt
  341. rb_thread_signal_raise
  342. rb_thread_trap_eval
  343. rb_thread_signal_exit
  344. rb_thread_raise
  345. rb_thread_raise_m
  346. rb_thread_local_aref
  347. rb_thread_aref
  348. rb_thread_local_aset
  349. rb_thread_aset
  350. rb_thread_key_p
  351. thread_keys_i
  352. rb_thread_keys
  353. rb_thread_inspect
  354. rb_thread_atfork
  355. rb_callcc
  356. rb_cont_call
  357. thgroup_s_alloc
  358. thgroup_list
  359. thgroup_enclose
  360. thgroup_enclosed_p
  361. thgroup_add
  362. Init_Thread
  363. rb_f_catch
  364. catch_i
  365. rb_catch
  366. rb_f_throw
  367. rb_throw
  368. flush_register_windows
/**********************************************************************

  eval.c -

  $Author: nobu $
  $Date: 2005/12/20 13:41:47 $
  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__ */

#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

#ifndef HAVE_STRING_H
char *strrchr _((const char*,const char));
#endif

#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.
 */
#if defined (__GNUC__) && (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"); })
#else
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)
#endif
#define ruby_longjmp(env, val) rb_jump_context(env, val)
#define ruby_setjmp(j) ((j)->status = 0, \
    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(env) _setjmp(env)
#define ruby_longjmp(env,val) _longjmp(env,val)
#else
#define ruby_setjmp(env) 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

#include <sys/stat.h>

VALUE rb_cProc;
static VALUE rb_cBinding;
static VALUE proc_invoke _((VALUE,VALUE,VALUE,VALUE));
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 method_call _((int, VALUE*, VALUE));
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(level)
    int level;
{
    if (level <= ruby_safe_level) {
        if (ruby_frame->last_func) {
            rb_raise(rb_eSecurityError, "Insecure operation `%s' at level %d",
                     rb_id2name(ruby_frame->last_func), ruby_safe_level);
        }
        else {
            rb_raise(rb_eSecurityError, "Insecure operation at level %d", ruby_safe_level);
        }
    }
}

void
rb_secure_update(obj)
    VALUE obj;
{
    if (!OBJ_TAINTED(obj)) rb_secure(4);
}

void
rb_check_safe_obj(x)
    VALUE x;
{
    if (ruby_safe_level > 0 && OBJ_TAINTED(x)){
        if (ruby_frame->last_func) {
            rb_raise(rb_eSecurityError, "Insecure operation - %s",
                     rb_id2name(ruby_frame->last_func));
        }
        else {
            rb_raise(rb_eSecurityError, "Insecure operation: -r");
        }
    }
    rb_secure(4);
}

void
rb_check_safe_str(x)
    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(klass, id)
    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()
{
   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(klass, id)
    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 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(klass)
    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_TAINTED 8
#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(klass, mid, node, noex)
    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(klass, 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(klass)
    VALUE klass;
{
    Check_Type(klass, T_CLASS);
    rb_add_method(CLASS_OF(klass), ID_ALLOCATOR, 0, NOEX_UNDEF);
}

static NODE*
search_method(klass, id, origin)
    VALUE klass, *origin;
    ID id;
{
    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(klassp, idp, noexp)
    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(klass, id)
    VALUE klass;
    ID id;
{
    int noex;

    return rb_get_method_body(&klass, &id, &noex);
}

static void
remove_method(klass, mid)
    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(klass, name)
    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(argc, argv, mod)
    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(klass, name)
    VALUE klass;
    const char *name;
{
    /* obsolete - no use */
}

void
rb_enable_super(klass, name)
    VALUE klass;
    const char *name;
{
    rb_warn("rb_enable_super() is obsolete");
}

static void
rb_export_method(klass, name, noex)
    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(klass, id, ex)
    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(klass, id, read, write, ex)
    VALUE klass;
    ID id;
    int read, write, 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);
    }
}

extern int ruby_in_compile;

VALUE ruby_errinfo = Qnil;
extern NODE *ruby_eval_tree_begin;
extern NODE *ruby_eval_tree;
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.argv = 0;                    \
    _frame.flags = FRAME_ALLOCA;        \
    _frame.uniq = frame_unique++;       \
    ruby_frame = &_frame

#define POP_FRAME()                     \
    ruby_current_node = _frame.node;    \
    ruby_frame = _frame.prev;           \
} while (0)

struct BLOCK {
    NODE *var;
    NODE *body;
    VALUE self;
    struct FRAME frame;
    struct SCOPE *scope;
    VALUE klass;
    NODE *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

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, value, prev)
    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 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 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 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, value)
    ID id;
    VALUE value;
{
    ruby_dyna_vars = new_dvar(id, value, ruby_dyna_vars);
}

static void
dvar_asgn_internal(id, value, curr)
    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, value)
    ID id;
    VALUE value;
{
    dvar_asgn_internal(id, value, 0);
}

static inline void
dvar_asgn_curr(id, value)
    ID id;
    VALUE value;
{
    dvar_asgn_internal(id, value, 1);
}

VALUE *
rb_svar(cnt)
    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 EXEC_TAG()    (FLUSH_REGISTER_WINDOWS, ruby_setjmp(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_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)

static VALUE rb_eval _((VALUE,NODE*));
static VALUE eval _((VALUE,VALUE,VALUE,char*,int));
static NODE *compile _((VALUE, 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

static VALUE rb_call _((VALUE,VALUE,ID,int,const VALUE*,int));
static VALUE module_setup _((VALUE,NODE*));

static VALUE massign _((VALUE,NODE*,VALUE,int));
static void assign _((VALUE,NODE*,VALUE,int));

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()
{
    if (ruby_current_node) {
        ruby_sourcefile = ruby_current_node->nd_file;
        ruby_sourceline = nd_line(ruby_current_node);
    }
}

static void
#ifdef HAVE_STDARG_PROTOTYPES
warn_printf(const char *fmt, ...)
#else
warn_printf(fmt, va_alist)
    const char *fmt;
    va_dcl
#endif
{
    char buf[BUFSIZ];
    va_list args;

    va_init_list(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()
{
    ruby_set_current_source();
    if (ruby_sourcefile) {
        if (ruby_frame->last_func) {
            warn_printf("%s:%d:in `%s'", ruby_sourcefile, ruby_sourceline,
                        rb_id2name(ruby_frame->last_func));
        }
        else if (ruby_sourceline == 0) {
            warn_printf("%s", ruby_sourcefile);
        }
        else {
            warn_printf("%s:%d", ruby_sourcefile, ruby_sourceline);
        }
    }
}

static VALUE
get_backtrace(info)
    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(info, bt)
    VALUE info, bt;
{
    rb_funcall(info, rb_intern("set_backtrace"), 1, bt);
}

static void
error_print()
{
    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() {
    return NATIVETHREAD_EQUAL(ruby_thid, NATIVETHREAD_CURRENT());
}
#endif

void
ruby_init()
{
    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();
    ruby_scope->local_vars = 0;
    ruby_scope->local_tbl  = 0;
    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(self, node)
    VALUE self;
    NODE *node;
{
    NODE *beg_tree = ruby_eval_tree_begin;

    ruby_eval_tree_begin = 0;
    if (beg_tree) {
        rb_eval(self, beg_tree);
    }

    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();
static int thread_reset_raised();

static VALUE exception_error;
static VALUE sysstack_error;

static int
sysexit_status(err)
    VALUE err;
{
    VALUE st = rb_iv_get(err, "status");
    return NUM2INT(st);
}

static int
error_handle(ex)
    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(argc, argv)
    int argc;
    char **argv;
{
    int state;

    Init_stack((void*)&state);
    PUSH_TAG(PROT_NONE);
    if ((state = EXEC_TAG()) == 0) {
        ruby_process_options(argc, argv);
    }
    else {
        trace_func = 0;
        tracing = 0;
        exit(error_handle(state));
    }
    POP_TAG();
}

void rb_exec_end_proc _((void));

static void
ruby_finalize_0()
{
    PUSH_TAG(PROT_NONE);
    if (EXEC_TAG() == 0) {
        rb_trap_exit();
    }
    POP_TAG();
    rb_exec_end_proc();
}

static void
ruby_finalize_1()
{
    signal(SIGINT, SIG_DFL);
    ruby_errinfo = 0;
    rb_gc_call_finalizer_at_exit();
    trace_func = 0;
    tracing = 0;
}

void
ruby_finalize()
{
    ruby_finalize_0();
    ruby_finalize_1();
}

int
ruby_cleanup(ex)
    int ex;
{
    int state;
    volatile VALUE err = ruby_errinfo;

    ruby_safe_level = 0;
    Init_stack((void*)&state);
    ruby_finalize_0();
    if (ruby_errinfo) err = ruby_errinfo;
    PUSH_TAG(PROT_NONE);
    PUSH_ITER(ITER_NOT);
    if ((state = EXEC_TAG()) == 0) {
        rb_thread_cleanup();
        rb_thread_wait_other_threads();
    }
    else if (ex == 0) {
        ex = state;
    }
    POP_ITER();
    ruby_errinfo = err;
    ex = error_handle(ex);
    ruby_finalize_1();
    POP_TAG();

    if (err && rb_obj_is_kind_of(err, rb_eSystemExit)) {
        VALUE st = rb_iv_get(err, "status");
        return NUM2INT(st);
    }
    return ex;
}

static int
ruby_exec_internal()
{
    int state;

    PUSH_TAG(PROT_NONE);
    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);
    }
    POP_ITER();
    POP_TAG();
    return state;
}

void
ruby_stop(ex)
    int ex;
{
    exit(ruby_cleanup(ex));
}

int
ruby_exec()
{
    volatile NODE *tmp;

    Init_stack((void*)&tmp);
    return ruby_exec_internal();
}

void
ruby_run()
{
    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(at)
    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(str)
    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(str, state)
    const char *str;
    int *state;
{
    return rb_protect((VALUE (*)_((VALUE)))rb_eval_string, (VALUE)str, state);
}

VALUE
rb_eval_string_wrap(str, state)
    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->last_func = 0;
    ruby_frame->orig_func = 0;
    ruby_frame->last_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(mesg, value, reason)
    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(exc)
    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(exc)
    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(state, val)
    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(cmd, arg, level)
    VALUE cmd, 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->last_func = 0;
    ruby_frame->orig_func = 0;
    ruby_frame->last_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(cref, id, self)
    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)) return rb_const_defined(CLASS_OF(self), id);
        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(cref, id, self)
    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)) return rb_const_get(CLASS_OF(self), id);
        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()
{
    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()
{
    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()
{
    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(klass)
    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(klass, id)
    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(argc, argv, mod)
    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(klass, name, def)
    VALUE klass;
    ID name, 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(mod, newname, oldname)
    VALUE mod, newname, oldname;
{
    rb_alias(mod, rb_to_id(newname), rb_to_id(oldname));
    return mod;
}

static NODE*
copy_node_scope(node, rval)
    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 char* is_defined _((VALUE, NODE*, char*));

static char*
arg_defined(self, node, buf, type)
    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))
                    return 0;
                node = node->nd_next;
            }
        }
    }
    else if (!is_defined(self, node, buf)) {
        return 0;
    }
    return type;
}

static char*
is_defined(self, node, buf)
    VALUE self;
    NODE *node;                 /* OK */
    char *buf;
{
    VALUE val;                  /* OK */
    int state;

  again:
    if (!node) return "expression";
    switch (nd_type(node)) {
      case NODE_SUPER:
      case NODE_ZSUPER:
        if (ruby_frame->orig_func == 0) return 0;
        else if (ruby_frame->last_class == 0) return 0;
        val = ruby_frame->last_class;
        if (rb_method_boundp(RCLASS(val)->super, ruby_frame->orig_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:
        PUSH_TAG(PROT_NONE);
        if ((state = EXEC_TAG()) == 0) {
            val = rb_eval(self, node->nd_recv);
        }
        POP_TAG();
        if (state) {
            ruby_errinfo = Qnil;
            return 0;
        }
      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:
        PUSH_TAG(PROT_NONE);
        if ((state = EXEC_TAG()) == 0) {
            val = rb_eval(self, node->nd_head);
        }
        POP_TAG();
        if (state) {
            ruby_errinfo = Qnil;
            return 0;
        }
        else {
            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))) {
            sprintf(buf, "$%d", (int)node->nd_nth);
            return buf;
        }
        break;

      case NODE_BACK_REF:
        if (RTEST(rb_reg_nth_defined(0, MATCH_DATA))) {
            sprintf(buf, "$%c", (char)node->nd_nth);
            return buf;
        }
        break;

      case NODE_NEWLINE:
        node = node->nd_next;
        goto again;

      default:
        PUSH_TAG(PROT_NONE);
        if ((state = EXEC_TAG()) == 0) {
            rb_eval(self, node);
        }
        POP_TAG();
        if (!state) {
            return "expression";
        }
        ruby_errinfo = Qnil;
        break;
    }
    return 0;
}

static int handle_rescue _((VALUE,NODE*));

static void blk_free();

static VALUE
rb_obj_is_proc(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(func, events)
    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(func)
    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(obj, trace)
    VALUE obj, 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(event, node, self, id, klass)
    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 (ruby_in_compile) return;
    if (id == ID_ALLOCATOR) return;

    if (!(node_save = ruby_current_node)) {
        node_save = NEW_NEWLINE(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),
                    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(v)
    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(v)
    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(v, lhs)
    VALUE v;
    NODE *lhs;
{
    VALUE tmp;

    if (v == Qundef) return rb_ary_new2(0);
    tmp = rb_check_array_type(v);
    if (NIL_P(tmp)) {
        return rb_ary_new3(1, v);
    }
    /* no lhs means splat lhs only */
    if (!lhs) {
        return rb_ary_new3(1, v);
    }
    return tmp;
}

static VALUE
avalue_splat(v)
    VALUE v;
{
    if (RARRAY(v)->len == 0) {
        return Qundef;
    }
    if (RARRAY(v)->len == 1) {
        return RARRAY(v)->ptr[0];
    }
    return v;
}

#if 1
VALUE
rb_Array(val)
    VALUE val;
{
    VALUE tmp = rb_check_array_type(val);

    if (NIL_P(tmp)) {
        /* hack to avoid invoke Object#to_a */
        VALUE origin;
        ID id = rb_intern("to_a");

        if (search_method(CLASS_OF(val), id, &origin) &&
            RCLASS(origin)->m_tbl != RCLASS(rb_mKernel)->m_tbl) { /* exclude Kernel#to_a */
            val = rb_funcall(val, id, 0);
            if (TYPE(val) != T_ARRAY) {
                rb_raise(rb_eTypeError, "`to_a' did not return Array");
            }
            return val;
        }
        else {
            return rb_ary_new3(1, val);
        }
    }
    return tmp;
}
#endif

static VALUE
splat_value(v)
    VALUE v;
{
    if (NIL_P(v)) return rb_ary_new3(1, Qnil);
    return rb_Array(v);
}

static VALUE
class_prefix(self, cpath)
    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)
    NODE *volatile node;
{
    ruby_current_node = 0;
    if (node->flags == 0) {
        rb_bug("terminated node (0x%lx)", node);
    }
    else if (BUILTIN_TYPE(node) != T_NODE) {
        rb_bug("not a node 0x%02lx (0x%lx)", BUILTIN_TYPE(node), node);
    }
    else {
        rb_bug("unknown node type %d (0x%lx)", nd_type(node), node);
    }
}

static VALUE
rb_eval(self, n)
    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;
    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_IF:
        EXEC_EVENT_HOOK(RUBY_EVENT_LINE, node, self,
                        ruby_frame->last_func,
                        ruby_frame->last_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->last_func,
                                ruby_frame->last_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->last_func,
                                    ruby_frame->last_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_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 {
                    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,0);
                }
                POP_ITER();
            }
            else if (state == TAG_BREAK && TAG_DST()) {
                result = prot_tag->retval;
                state = 0;
            }
            else if (state == TAG_RETRY) {
                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 */
            int scope;
            TMP_PROTECT;

            BEGIN_CALLARGS;
            if (node->nd_recv == (NODE *)1) {
                recv = self;
                scope = 1;
            }
            else {
                recv = rb_eval(self, node->nd_recv);
                scope = 0;
            }
            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,0);
        }
        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,1);
        }
        break;

      case NODE_VCALL:
        SET_CURRENT_SOURCE();
        result = rb_call(CLASS_OF(self),self,node->nd_mid,0,0,2);
        break;

      case NODE_SUPER:
      case NODE_ZSUPER:
        {
            int argc; VALUE *argv; /* used in SETUP_ARGS */
            TMP_PROTECT;

            if (ruby_frame->last_class == 0) {
                if (ruby_frame->orig_func) {
                    rb_name_error(ruby_frame->last_func,
                                  "superclass method `%s' disabled",
                                  rb_id2name(ruby_frame->orig_func));
                }
                else {
                    rb_raise(rb_eNoMethodError, "super called outside of method");
                }
            }
            if (nd_type(node) == NODE_ZSUPER) {
                argc = ruby_frame->argc;
                argv = ruby_frame->argv;
            }
            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)) ||
            !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_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_ATTRSET:
        if (ruby_frame->argc != 1)
            rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)",
                     ruby_frame->argc);
        result = rb_ivar_set(self, node->nd_vid, ruby_frame->argv[0]);
        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, node->nd_mid);
        result = Qnil;
        break;

      case NODE_ALIAS:
        if (NIL_P(ruby_class)) {
            rb_raise(rb_eTypeError, "no class to make alias");
        }
        rb_alias(ruby_class, node->nd_new, node->nd_old);
        result = Qnil;
        break;

      case NODE_VALIAS:
        rb_alias_variable(node->nd_new, node->nd_old);
        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 virtual 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];
            char *desc = is_defined(self, node->nd_head, buf);

            if (desc) result = rb_str_new2(desc);
            else result = Qnil;
        }
        break;

      case NODE_NEWLINE:
        EXEC_EVENT_HOOK(RUBY_EVENT_LINE, node, self,
                        ruby_frame->last_func,
                        ruby_frame->last_class);
        node = node->nd_next;
        goto again;

      default:
        unknown_node(node);
    }
  finish:
    CHECK_INTS;
    if (contnode) {
        node = contnode;
        contnode = 0;
        goto again;
    }
    return result;
}

static VALUE
module_setup(module, n)
    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->last_func, ruby_frame->last_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->last_func, ruby_frame->last_class);
    if (state) JUMP_TAG(state);

    return result;
}

static NODE *basic_respond_to = 0;

int
rb_obj_respond_to(obj, id, priv)
    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(obj, id)
    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(argc, argv, obj)
    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(mod, mid)
    VALUE mod, 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(mod, mid)
    VALUE mod, 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(mod, mid)
    VALUE mod, 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(mod, mid)
    VALUE mod, 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(status, mesg)
    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(status)
    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(argc, argv)
    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(argc, argv)
    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()
{
    break_jump(Qnil);
}

NORETURN(static void rb_longjmp _((int, VALUE)));
static VALUE make_backtrace _((void));

static void
rb_longjmp(tag, mesg)
    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) {
            StringValue(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->last_func,
                        ruby_frame->last_class);
    }
    if (!prot_tag) {
        error_print();
    }
    thread_reset_raised();
    JUMP_TAG(tag);
}

void
rb_exc_raise(mesg)
    VALUE mesg;
{
    rb_longjmp(TAG_RAISE, mesg);
}

void
rb_exc_fatal(mesg)
    VALUE mesg;
{
    rb_longjmp(TAG_FATAL, mesg);
}

void
rb_interrupt()
{
    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(argc, argv)
    int argc;
    VALUE *argv;
{
    rb_raise_jump(rb_make_exception(argc, argv));
    return Qnil;                /* not reached */
}

static VALUE
rb_make_exception(argc, argv)
    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(mesg)
    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(tag)
    int tag;
{
    JUMP_TAG(tag);
}

int
rb_block_given_p()
{
    if (ruby_frame->iter == ITER_CUR && ruby_block)
        return Qtrue;
    return Qfalse;
}

int
rb_iterator_p()
{
    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()
{
    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(state, result)
    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);
}

static void
return_jump(retval)
    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->dst = (VALUE)ruby_frame->uniq;
            tt->retval = retval;
            JUMP_TAG(TAG_RETURN);
        }
        if (tt->tag == PROT_LAMBDA && !yield) {
            tt->dst = (VALUE)tt->frame->uniq;
            tt->retval = retval;
            JUMP_TAG(TAG_RETURN);
        }
        if (tt->tag == PROT_THREAD) {
            rb_raise(rb_eThreadError, "return can't jump across threads");
        }
        tt = tt->prev;
    }
    localjump_error("unexpected return", retval, TAG_RETURN);
}

static void
break_jump(retval)
    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);
}

void
rb_need_block()
{
    if (!rb_block_given_p()) {
        localjump_error("no block given", Qnil, 0);
    }
}

static VALUE
rb_yield_0(val, self, klass, flags, avalue)
    VALUE val, self, klass;     /* OK */
    int flags, avalue;
{
    NODE *node;
    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;

    if (block->var) {
        PUSH_TAG(PROT_NONE);
        if ((state = EXEC_TAG()) == 0) {
            if (block->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 (block->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 (nd_type(block->var) == NODE_MASGN) {
                if (!avalue) {
                    val = svalue_to_mrhs(val, block->var->nd_head);
                }
                massign(self, block->var, val, lambda);
            }
            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 = block->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, block->var, val, lambda);
            }
        }
        POP_TAG();
        if (state) goto pop_state;
    }
    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;
            }
            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(val)
    VALUE val;
{
    return rb_yield_0(val, 0, 0, 0, Qfalse);
}

VALUE
#ifdef HAVE_STDARG_PROTOTYPES
rb_yield_values(int n, ...)
#else
rb_yield_values(n, va_alist)
    int n;
    va_dcl
#endif
{
    va_list args;
    VALUE ary;

    if (n == 0) {
        return rb_yield_0(Qundef, 0, 0, 0, Qfalse);
    }
    ary = rb_ary_new2(n);
    va_init_list(args, n);
    while (n--) {
        rb_ary_push(ary, va_arg(args, VALUE));
    }
    va_end(args);
    return rb_yield_0(ary, 0, 0, 0, Qtrue);
}

VALUE
rb_yield_splat(values)
    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()
{
    for (;;) {
        rb_yield_0(Qundef, 0, 0, 0, Qfalse);
        CHECK_INTS;
    }
    return Qnil;                /* dummy */
}

static VALUE
massign(self, node, val, pcall)
    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(self, lhs, val, pcall)
    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;
            int scope;
            if (lhs->nd_recv == (NODE *)1) {
                recv = self;
                scope = 1;
            }
            else {
                recv = rb_eval(self, lhs->nd_recv);
                scope = 0;
            }
            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(it_proc, data1, bl_proc, data2)
    VALUE (*it_proc) _((VALUE)), (*bl_proc)(ANYARGS);
    VALUE data1, 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(self, node)
    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
#ifdef HAVE_STDARG_PROTOTYPES
rb_rescue2(VALUE (*b_proc)(ANYARGS), VALUE data1, VALUE (*r_proc)(ANYARGS), VALUE data2, ...)
#else
rb_rescue2(b_proc, data1, r_proc, data2, va_alist)
    VALUE (*b_proc)(ANYARGS), (*r_proc)(ANYARGS);
    VALUE data1, data2;
    va_dcl
#endif
{
    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_init_list(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(b_proc, data1, r_proc, data2)
    VALUE (*b_proc)(), (*r_proc)();
    VALUE data1, data2;
{
    return rb_rescue2(b_proc, data1, r_proc, data2, rb_eStandardError, (VALUE)0);
}

static VALUE cont_protect;

VALUE
rb_protect(proc, data, state)
    VALUE (*proc) _((VALUE));
    VALUE data;
    int *state;
{
    VALUE result = Qnil;        /* OK */
    int status;

    PUSH_TAG(PROT_NONE);
    cont_protect = (VALUE)rb_node_newnode(NODE_MEMO, cont_protect, 0, 0);
    if ((status = EXEC_TAG()) == 0) {
        result = (*proc)(data);
    }
    cont_protect = ((NODE *)cont_protect)->u1.value;
    POP_TAG();
    if (state) {
        *state = status;
    }
    if (status != 0) {
        return Qnil;
    }

    return result;
}

VALUE
rb_ensure(b_proc, data1, e_proc, data2)
    VALUE (*b_proc)();
    VALUE data1;
    VALUE (*e_proc)();
    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(proc, data)
    VALUE (*proc)();
    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()
{
    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(argc, argv, obj)
    int argc;
    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(obj, id, argc, argv, call_status)
    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(func, recv, len, argc, argv)
    VALUE (*func)();
    VALUE recv;
    int len, argc;
    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 VALUE
rb_call0(klass, recv, id, oid, argc, argv, body, flags)
    VALUE klass, recv;
    ID    id;
    ID    oid;
    int argc;                   /* OK */
    VALUE *argv;                /* OK */
    NODE * volatile body;
    int flags;
{
    NODE *b2;           /* OK */
    volatile VALUE result = Qnil;
    int itr;
    static int tick;
    TMP_PROTECT;
    volatile int safe = -1;

    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();
    }
    PUSH_ITER(itr);
    PUSH_FRAME();

    ruby_frame->last_func = id;
    ruby_frame->orig_func = oid;
    ruby_frame->last_class = (flags & NOEX_NOSUPER)?0:klass;
    ruby_frame->self = recv;
    ruby_frame->argc = argc;
    ruby_frame->argv = argv;

    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:
        /* for re-scoped/renamed method */
      case NODE_ZSUPER:
        result = rb_eval(recv, body);
        break;

      case NODE_DMETHOD:
        result = method_call(argc, argv, umethod_bind(body->nd_cval, recv));
        break;

      case NODE_BMETHOD:
        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 (!(flags&NOEX_TAINTED) && 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;
                int i;

                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) {
                    if (nd_type(node) != NODE_ARGS) {
                        rb_bug("no argument-node");
                    }

                    i = node->nd_cnt;
                    if (i > argc) {
                        rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)",
                                 argc, i);
                    }
                    if ((long)node->nd_rest == -1) {
                        int opt = i;
                        NODE *optnode = node->nd_opt;

                        while (optnode) {
                            opt++;
                            optnode = optnode->nd_next;
                        }
                        if (opt < argc) {
                            rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)",
                                     argc, opt);
                        }
                        ruby_frame->argc = opt;
                        ruby_frame->argv = local_vars+2;
                    }

                    if (local_vars) {
                        if (i > 0) {
                            /* +2 for $_ and $~ */
                            MEMCPY(local_vars+2, argv, VALUE, i);
                        }
                        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--;
                                opt = opt->nd_next;
                            }
                            if (opt) {
                                rb_eval(recv, opt);
                            }
                        }
                        local_vars = ruby_scope->local_vars;
                        if ((long)node->nd_rest >= 0) {
                            VALUE v;

                            if (argc > 0)
                                v = rb_ary_new4(argc,argv);
                            else
                                v = rb_ary_new2(0);
                            ruby_scope->local_vars[node->nd_rest] = v;
                        }
                    }
                }

                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(klass, recv, mid, argc, argv, scope)
    VALUE klass, recv;
    ID    mid;
    int argc;                   /* OK */
    const VALUE *argv;          /* OK */
    int 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 (0x%lx)",
                 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==2?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 == 3) {
            return method_missing(recv, mid, argc, argv, CSTAT_SUPER);
        }
        return method_missing(recv, mid, argc, argv, scope==2?CSTAT_VCALL:0);
    }

    if (mid != missing && scope == 0) {
        /* 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);
        }
    }

    return rb_call0(klass, recv, mid, id, argc, argv, body, noex);
}

VALUE
rb_apply(recv, mid, args)
    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, 1);
}

/*
 *  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_.
 *
 *     class Klass
 *       def hello(*args)
 *         "Hello " + args.join(' ')
 *       end
 *     end
 *     k = Klass.new
 *     k.send :hello, "gentle", "readers"   #=> "Hello gentle readers"
 */

static VALUE
rb_f_send(argc, argv, recv)
    int argc;
    VALUE *argv;
    VALUE recv;
{
    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, 1);
    POP_ITER();

    return vid;
}

static VALUE
vafuncall(recv, mid, n, ar)
    VALUE recv;
    ID mid;
    int n;
    va_list *ar;
{
    VALUE *argv;

    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, 1);
}

VALUE
#ifdef HAVE_STDARG_PROTOTYPES
rb_funcall(VALUE recv, ID mid, int n, ...)
#else
rb_funcall(recv, mid, n, va_alist)
    VALUE recv;
    ID mid;
    int n;
    va_dcl
#endif
{
    va_list ar;
    va_init_list(ar, n);

    return vafuncall(recv, mid, n, &ar);
}

VALUE
#ifdef HAVE_STDARG_PROTOTYPES
rb_funcall_rescue(VALUE recv, ID mid, int n, ...)
#else
rb_funcall_rescue(recv, mid, n, va_alist)
    VALUE recv;
    ID mid;
    int n;
    va_dcl
#endif
{
    VALUE result = Qnil;        /* OK */
    int status;
    va_list ar;

    va_init_list(ar, n);

    PUSH_TAG(PROT_NONE);
    if ((status = EXEC_TAG()) == 0) {
        result = vafuncall(recv, mid, n, &ar);
    }
    POP_TAG();
    switch (status) {
      case 0:
        return result;
      case TAG_RAISE:
        return Qundef;
      default:
        JUMP_TAG(status);
    }
}

VALUE
rb_funcall2(recv, mid, argc, argv)
    VALUE recv;
    ID mid;
    int argc;
    const VALUE *argv;
{
    return rb_call(CLASS_OF(recv), recv, mid, argc, argv, 1);
}

VALUE
rb_funcall3(recv, mid, argc, argv)
    VALUE recv;
    ID mid;
    int argc;
    const VALUE *argv;
{
    return rb_call(CLASS_OF(recv), recv, mid, argc, argv, 0);
}

VALUE
rb_call_super(argc, argv)
    int argc;
    const VALUE *argv;
{
    VALUE result, self, klass;

    if (ruby_frame->last_class == 0) {
        rb_name_error(ruby_frame->last_func, "calling `super' from `%s' is prohibited",
                      rb_id2name(ruby_frame->orig_func));
    }

    self = ruby_frame->self;
    klass = ruby_frame->last_class;
    if (RCLASS(klass)->super == 0) {
        return method_missing(self, ruby_frame->orig_func, argc, argv, CSTAT_SUPER);
    }

    PUSH_ITER(ruby_iter->iter ? ITER_PRE : ITER_NOT);
    result = rb_call(RCLASS(klass)->super, self, ruby_frame->orig_func, argc, argv, 3);
    POP_ITER();

    return result;
}

static VALUE
backtrace(lev)
    int lev;
{
    struct FRAME *frame = ruby_frame;
    char buf[BUFSIZ];
    VALUE ary;
    NODE *n;

    ary = rb_ary_new();
    if (frame->last_func == ID_ALLOCATOR) {
        frame = frame->prev;
    }
    if (lev < 0) {
        ruby_set_current_source();
        if (frame->last_func) {
            snprintf(buf, BUFSIZ, "%s:%d:in `%s'",
                     ruby_sourcefile, ruby_sourceline,
                     rb_id2name(frame->last_func));
        }
        else if (ruby_sourceline == 0) {
            snprintf(buf, BUFSIZ, "%s", ruby_sourcefile);
        }
        else {
            snprintf(buf, BUFSIZ, "%s:%d", ruby_sourcefile, ruby_sourceline);
        }
        rb_ary_push(ary, rb_str_new2(buf));
        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->last_func) {
            if (frame->prev->node == n) continue;
            snprintf(buf, BUFSIZ, "%s:%d:in `%s'",
                     n->nd_file, nd_line(n),
                     rb_id2name(frame->prev->last_func));
        }
        else {
            snprintf(buf, BUFSIZ, "%s:%d", n->nd_file, nd_line(n));
        }
        rb_ary_push(ary, rb_str_new2(buf));
    }

    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(argc, argv)
    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()
{
    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()
{
    return backtrace(-1);
}

ID
rb_frame_last_func()
{
    return ruby_frame->last_func;
}

static NODE*
compile(src, file, line)
    VALUE src;
    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(self, src, scope, file, line)
    VALUE self, src, scope;
    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(argc, argv, self)
    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(func, under, cbase, args)
    VALUE (*func)();
    VALUE under, cbase;
    void *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->last_func = f->last_func;
    ruby_frame->orig_func = f->orig_func;
    ruby_frame->last_class = f->last_class;
    ruby_frame->argc = f->argc;
    ruby_frame->argv = f->argv;
    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(args)
    VALUE *args;
{
    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(under, self, src, file, line)
    VALUE under, self, 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, args);
}

static VALUE
yield_under_i(self)
    VALUE self;
{
    return rb_yield_0(self, self, ruby_class, YIELD_PUBLIC_DEF, Qfalse);
}

/* block eval under the class/module context */
static VALUE
yield_under(under, self)
    VALUE under, self;
{
    return exec_under(yield_under_i, under, 0, self);
}

static VALUE
specific_eval(argc, argv, klass, self)
    int argc;
    VALUE *argv;
    VALUE klass, 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);
    }
    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->last_func),
                         rb_id2name(ruby_frame->last_func));
            }
            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(argc, argv, self)
    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:
 *     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(argc, argv, mod)
    int argc;
    VALUE *argv;
    VALUE mod;
{
    return specific_eval(argc, argv, mod, mod);
}

VALUE rb_load_path;

NORETURN(static void load_failed _((VALUE)));

void
rb_load(fname, wrap)
    VALUE fname;
    int wrap;
{
    VALUE tmp;
    int state;
    volatile int prohibit_int = rb_prohibit_interrupt;
    volatile ID last_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 && ruby_safe_level >= 4) {
        StringValue(fname);
    }
    else {
        SafeStringValue(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->last_func = 0;
    ruby_frame->last_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();
    last_func = ruby_frame->last_func;
    last_node = ruby_current_node;
    if (!ruby_current_node && ruby_sourcefile) {
        last_node = NEW_NEWLINE(0);
    }
    ruby_current_node = 0;
    if (state == 0) {
        NODE *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->last_func = last_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(fname, wrap, state)
    VALUE fname;
    int wrap;
    int *state;
{
    int status;

    PUSH_TAG(PROT_NONE);
    if ((status = EXEC_TAG()) == 0) {
        rb_load(fname, wrap);
    }
    POP_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(argc, argv)
    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 char *
rb_feature_p(feature, ext, rb)
    const char *feature, *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 e;
        }
        if (*e != '.') continue;
        if ((!rb || !ext) && (IS_SOEXT(e) || IS_DLEXT(e))) {
            return e;
        }
        if ((rb || !ext) && (strcmp(e, ".rb") == 0)) {
            return e;
        }
    }
    return 0;
}

static const char *const loadable_ext[] = {
    ".rb", DLEXT,
#ifdef DLEXT2
    DLEXT2,
#endif
    0
};

int
rb_provided(feature)
    const char *feature;
{
    int i;
    char *buf;

    if (rb_feature_p(feature, 0, Qfalse))
        return Qtrue;
    if (!loading_tbl) return Qfalse;
    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; ; i++) {
        if (!loadable_ext[i]) break;
        strcpy(buf+strlen(feature), loadable_ext[i]);
        if (st_lookup(loading_tbl, (st_data_t)buf, 0)) return Qtrue;
    }
    return Qfalse;
}

static void
rb_provide_feature(feature)
    VALUE feature;
{
    rb_ary_push(rb_features, feature);
}

void
rb_provide(feature)
    const char *feature;
{
    rb_provide_feature(rb_str_new2(feature));
}

static int
load_wait(ftptr)
    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(obj, fname)
    VALUE obj, fname;
{
    return rb_require_safe(fname, ruby_safe_level);
}

static int
search_required(fname, featurep, path)
    VALUE fname, *featurep, *path;
{
    VALUE tmp;
    char *ext, *ftptr;
    int type;

    *featurep = fname;
    *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 (*path = rb_find_file(fname)) 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);
            *featurep = tmp;
#ifdef DLEXT2
            OBJ_FREEZE(tmp);
            if (rb_find_file_ext(&tmp, loadable_ext+1)) {
                *featurep = tmp;
                *path = rb_find_file(tmp);
                return 's';
            }
#else
            rb_str_cat2(tmp, DLEXT);
            OBJ_FREEZE(tmp);
            if (*path = rb_find_file(tmp)) {
                return 's';
            }
#endif
        }
        else if (IS_DLEXT(ext)) {
            if (rb_feature_p(ftptr, ext, Qfalse)) return 's';
            if (*path = rb_find_file(fname)) return 's';
        }
    }
    tmp = fname;
    switch (type = rb_find_file_ext(&tmp, loadable_ext)) {
      case 0:
        if ((ext = rb_feature_p(ftptr, 0, Qfalse))) {
            type = strcmp(".rb", ext);
            break;
        }
        return 0;

      default:
        *featurep = tmp;
        ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
        if (rb_feature_p(ftptr, ext, !--type)) break;
        *path = rb_find_file(tmp);
    }
    return type ? 's' : 'r';
}

static void
load_failed(fname)
    VALUE fname;
{
    rb_raise(rb_eLoadError, "no such file to load -- %s", RSTRING(fname)->ptr);
}

VALUE
rb_require_safe(fname, safe)
    VALUE fname;
    int safe;
{
    VALUE result = Qnil;
    volatile VALUE errinfo = ruby_errinfo;
    int state;
    struct {
        NODE *node;
        ID func;
        int vmode, safe;
    } volatile saved;
    char *volatile ftptr = 0;

    if (OBJ_TAINTED(fname)) {
        rb_check_safe_obj(fname);
    }
    StringValue(fname);
    fname = rb_str_new4(fname);
    saved.vmode = scope_vmode;
    saved.node = ruby_current_node;
    saved.func = ruby_frame->last_func;
    saved.safe = ruby_safe_level;
    PUSH_TAG(PROT_NONE);
    if ((state = EXEC_TAG()) == 0) {
        VALUE feature, path;
        long handle;
        int found;

        ruby_safe_level = safe;
        found = search_required(fname, &feature, &path);
        if (found) {
            if (!path || load_wait(RSTRING(path)->ptr)) {
                result = Qfalse;
            }
            else {
                ruby_safe_level = 0;
                rb_provide_feature(feature);
                switch (found) {
                  case 'r':
                    /* loading ruby library should be serialized. */
                    if (!loading_tbl) {
                        loading_tbl = st_init_strtable();
                    }
                    /* partial state */
                    ftptr = ruby_strdup(RSTRING(feature)->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->last_func = 0;
                    SCOPE_SET(SCOPE_PUBLIC);
                    handle = (long)dln_load(RSTRING(path)->ptr);
                    rb_ary_push(ruby_dln_librefs, LONG2NUM(handle));
                    break;
                }
                result = Qtrue;
            }
        }
    }
    POP_TAG();
    ruby_current_node = saved.node;
    ruby_set_current_source();
    ruby_frame->last_func = saved.func;
    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(fname)
    const char *fname;
{
    VALUE fn = rb_str_new2(fname);
    OBJ_FREEZE(fn);
    return rb_require_safe(fn, ruby_safe_level);
}

static void
secure_visibility(self)
    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(self, argc, argv, ex)
    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(argc, argv, module)
    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(argc, argv, module)
    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(argc, argv, module)
    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(argc, argv, obj)
    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(argc, argv, obj)
    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(argc, argv)
    int argc;
    VALUE *argv;
{
    return rb_mod_public(argc, argv, rb_cObject);
}

static VALUE
top_private(argc, argv)
    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(argc, argv, module)
    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(module, include)
    VALUE module, include;
{
    switch (TYPE(include)) {
      case T_CLASS:
      case T_MODULE:
        break;
      default:
        Check_Type(include, T_CLASS);
        break;
    }
    rb_include_module(include, module);

    return module;
}

/*
 *  call-seq:
 *     include(module, ...)    => self
 *
 *  Invokes <code>Module.append_features</code> on each parameter in turn.
 */

static VALUE
rb_mod_include(argc, argv, module)
    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(obj, argc, argv)
    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(obj, module)
    VALUE obj, 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(mod, obj)
    VALUE mod, 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(argc, argv, obj)
    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(argc, argv, self)
    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();
VALUE rb_f_untrace_var();

static void
errinfo_setter(val, id, var)
    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 id;
{
    return get_backtrace(ruby_errinfo);
}

static void
errat_setter(val, id, var)
    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()
{
    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(func, data)
    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()
{
    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));

static void
call_end_proc(data)
    VALUE data;
{
    PUSH_ITER(ITER_NOT);
    PUSH_FRAME();
    ruby_frame->self = ruby_frame->prev->self;
    ruby_frame->node = 0;
    ruby_frame->last_func = 0;
    ruby_frame->last_class = 0;
    proc_invoke(data, rb_ary_new2(0), Qundef, 0);
    POP_FRAME();
    POP_ITER();
}

static void
rb_f_END()
{
    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()
{
    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()
{
    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()
{
    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_begin);

    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, "instance_eval", rb_obj_instance_eval, -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_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(mod, sym, file)
    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(mod, sym)
    VALUE mod, 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(obj, sym, file)
    VALUE obj;
    VALUE sym;
    VALUE file;
{
    return rb_mod_autoload(ruby_cbase, sym, file);
}

/*
 *  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_p(obj, sym)
    VALUE obj;
    VALUE sym;
{
    /* use ruby_cbase as same as rb_f_autoload. */
    return rb_mod_autoload_p(ruby_cbase, sym);
}

void
Init_load()
{
    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(scope)
    struct SCOPE *scope;
{
    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(data)
    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(frame)
    struct FRAME *frame;
{
    struct FRAME *tmp;

    if (frame->argc > 0 && (frame->flags & FRAME_MALLOC))
        free(frame->argv);
    frame = frame->prev;
    while (frame) {
        if (frame->argc > 0 && (frame->flags & FRAME_MALLOC))
            free(frame->argv);
        tmp = frame;
        frame = frame->prev;
        free(tmp);
    }
}

static void
blk_free(data)
    struct BLOCK *data;
{
    void *tmp;

    while (data) {
        frame_free(&data->frame);
        tmp = data;
        data = data->prev;
        free(tmp);
    }
}

static void
frame_dup(frame)
    struct FRAME *frame;
{
    VALUE *argv;
    struct FRAME *tmp;

    for (;;) {
        if (frame->argc > 0) {
            argv = ALLOC_N(VALUE, frame->argc);
            MEMCPY(argv, frame->argv, VALUE, frame->argc);
            frame->argv = argv;
            frame->flags |= FRAME_MALLOC;
        }
        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(block)
    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(dup, orig)
    struct BLOCK *dup, *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(self)
    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(self)
    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(self)
    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.last_func = ruby_frame->prev->last_func;
        data->frame.last_class = ruby_frame->prev->last_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;
}

#define PROC_TSHIFT (FL_USHIFT+1)
#define PROC_TMASK  (FL_USER1|FL_USER2|FL_USER3)
#define PROC_TMAX   (PROC_TMASK >> PROC_TSHIFT)

#define SAFE_LEVEL_MAX PROC_TMASK

static void
proc_save_safe_level(data)
    VALUE data;
{
    int safe = ruby_safe_level;
    if (safe > PROC_TMAX) safe = PROC_TMAX;
    FL_SET(data, (safe << PROC_TSHIFT) & PROC_TMASK);
}

static int
proc_get_safe_level(data)
    VALUE data;
{
    return (RBASIC(data)->flags & PROC_TMASK) >> PROC_TSHIFT;
}

static void
proc_set_safe_level(data)
    VALUE data;
{
    ruby_safe_level = proc_get_safe_level(data);
}

static VALUE
proc_alloc(klass, proc)
    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 && CLASS_OF(ruby_block->block_obj) == klass) {
        return ruby_block->block_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(argc, argv, klass)
    int argc;
    VALUE *argv;
    VALUE klass;
{
    VALUE block = proc_alloc(klass, Qfalse);

    rb_obj_call_init(block, argc, argv);
    return block;
}

VALUE
rb_block_proc()
{
    return proc_alloc(rb_cProc, Qfalse);
}

VALUE
rb_f_lambda()
{
    rb_warn("rb_f_lambda() is deprecated; use rb_block_proc() instead");
    return proc_alloc(rb_cProc, Qtrue);
}

/*
 * call-seq:
 *   proc   { |...| block }  => a_proc
 *   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()
{
    return proc_alloc(rb_cProc, Qtrue);
}

static int
block_orphan(data)
    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(proc, args, self, klass)
    VALUE proc, args;           /* OK */
    VALUE self, 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;
    volatile VALUE tmp = args;

    if (rb_block_given_p() && ruby_frame->last_func) {
        if (klass != ruby_frame->last_class)
            klass = rb_obj_class(proc);
        rb_warning("block for %s#%s is useless",
                   rb_class2name(klass),
                   rb_id2name(ruby_frame->last_func));
    }

    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];
    }

    PUSH_VARS();
    ruby_wrapper = data->wrapper;
    ruby_dyna_vars = data->dyna_vars;
    /* PUSH BLOCK from data */
    old_block = ruby_block;
    _block = *data;
    if (self != Qundef) _block.frame.self = self;
    if (klass) _block.frame.last_class = klass;
    _block.frame.argc = RARRAY(tmp)->len;
    _block.frame.argv = ALLOCA_N(VALUE, RARRAY(tmp)->len);
    MEMCPY(_block.frame.argv, RARRAY(tmp)->ptr, VALUE, RARRAY(tmp)->len);
    _block.frame.flags = FRAME_ALLOCA;
    ruby_block = &_block;

    PUSH_ITER(ITER_CUR);
    ruby_frame->iter = ITER_CUR;
    PUSH_TAG(pcall ? 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, 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
 */

static VALUE
proc_call(proc, args)
    VALUE proc, args;           /* OK */
{
    return proc_invoke(proc, args, Qundef, 0);
}

static VALUE bmcall _((VALUE, VALUE));
static VALUE method_arity _((VALUE));

/*
 *  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(proc)
    VALUE proc;
{
    struct BLOCK *data;
    NODE *list;
    int n;

    Data_Get_Struct(proc, struct BLOCK, data);
    if (data->var == 0) {
        if (data->body && nd_type(data->body) == NODE_IFUNC &&
            data->body->nd_cfnc == bmcall) {
            return method_arity(data->body->nd_tval);
        }
        return INT2FIX(-1);
    }
    if (data->var == (NODE*)1) return INT2FIX(0);
    if (data->var == (NODE*)2) return INT2FIX(0);
    switch (nd_type(data->var)) {
      default:
        return INT2FIX(1);
      case NODE_MASGN:
        list = data->var->nd_head;
        n = 0;
        while (list) {
            n++;
            list = list->nd_next;
        }
        if (data->var->nd_args) return INT2FIX(-n-1);
        return INT2FIX(n);
    }
}

/*
 * 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(self, other)
    VALUE self, 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.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(self)
    VALUE self;
{
    struct BLOCK *data;
    NODE *node;
    char *cname = rb_obj_classname(self);
    const int w = (sizeof(VALUE) * CHAR_BIT) / 4;
    long len = strlen(cname)+6+w; /* 6:tags 16:addr */
    VALUE str;

    Data_Get_Struct(self, struct BLOCK, data);
    if ((node = data->frame.node) || (node = data->body)) {
        len += strlen(node->nd_file) + 2 + (SIZEOF_LONG*CHAR_BIT-NODE_LSHIFT)/3;
        str = rb_str_new(0, len);
        snprintf(RSTRING(str)->ptr, len+1,
                 "#<%s:0x%.*lx@%s:%d>", cname, w, (VALUE)data->body,
                 node->nd_file, nd_line(node));
    }
    else {
        str = rb_str_new(0, len);
        snprintf(RSTRING(str)->ptr, len+1,
                 "#<%s:0x%.*lx>", cname, w, (VALUE)data->body);
    }
    RSTRING(str)->len = strlen(RSTRING(str)->ptr);
    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(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(proc)
    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
block_pass(self, node)
    VALUE self;
    NODE *node;
{
    VALUE proc = rb_eval(self, node->nd_body);  /* OK */
    VALUE b;
    struct BLOCK * volatile old_block;
    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 = rb_eval(self, node->nd_iter);
        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 = rb_eval(self, node->nd_iter);
        POP_ITER();
        return result;
    }

    Data_Get_Struct(proc, struct BLOCK, data);
    orphan = block_orphan(data);

    /* PUSH BLOCK from data */
    old_block = ruby_block;
    _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 = rb_eval(self, node->nd_iter);
    }
    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 = old_block;
    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 METHOD {
    VALUE klass, rklass;
    VALUE recv;
    ID id, oid;
    int safe_level;
    NODE *body;
};

static void
bm_mark(data)
    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(klass, obj, id, mklass)
    VALUE klass, obj, mklass;
    ID id;
{
    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, free, 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(method, other)
    VALUE method, 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.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(obj)
    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"
 */

static VALUE
rb_obj_method(obj, vid)
    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(mod, vid)
    VALUE mod;
    VALUE vid;
{
    return mnew(mod, Qundef, rb_to_id(vid), rb_cUnboundMethod);
}

/*
 * MISSING: documentation
 */

static VALUE
method_clone(self)
    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
 */

static VALUE
method_call(argc, argv, method)
    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)|NOEX_TAINTED;
    }
    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(method, recv)
    VALUE method, 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;
}

/*
 *  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(method)
    VALUE method;
{
    struct METHOD *data;
    NODE *body;
    int n;

    Data_Get_Struct(method, struct METHOD, data);

    body = data->body;
    switch (nd_type(body)) {
      case NODE_CFUNC:
        if (body->nd_argc < 0) return INT2FIX(-1);
        return INT2FIX(body->nd_argc);
      case NODE_ZSUPER:
        return INT2FIX(-1);
      case NODE_ATTRSET:
        return INT2FIX(1);
      case NODE_IVAR:
        return INT2FIX(0);
      case NODE_BMETHOD:
        return proc_arity(body->nd_cval);
      case NODE_DMETHOD:
        return method_arity(body->nd_cval);
      default:
        body = body->nd_next;   /* skip NODE_SCOPE */
        if (nd_type(body) == NODE_BLOCK)
            body = body->nd_head;
        if (!body) return INT2FIX(0);
        n = body->nd_cnt;
        if (body->nd_opt || body->nd_rest != -1)
            n = -n-1;
        return INT2FIX(n);
    }
}

/*
 *  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(method)
    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(method)
    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(args, method)
    VALUE args, method;
{
    volatile VALUE a;
    VALUE ret;

    a = svalue_to_avalue(args);
    ret = method_call(RARRAY(a)->len, RARRAY(a)->ptr, method);
    a = Qnil; /* prevent tail call */
    return ret;
}

VALUE
rb_proc_new(func, val)
    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(method)
    VALUE method;
{
    VALUE proc;
    struct METHOD *mdata;
    struct BLOCK *bdata;

    proc = rb_iterate((VALUE(*)_((VALUE)))mproc, 0, bmcall, method);
    Data_Get_Struct(method, struct METHOD, mdata);
    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;

    return proc;
}

static VALUE
rb_obj_is_method(m)
    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(argc, argv, mod)
    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) {
        node = NEW_DMETHOD(method_unbind(body));
    }
    else if (RDATA(body)->dmark == (RUBY_DATA_FUNC)blk_mark) {
        struct BLOCK *block;

        body = proc_clone(body);
        Data_Get_Struct(body, struct BLOCK, block);
        block->frame.last_func = id;
        block->frame.orig_func = id;
        block->frame.last_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);
    rb_define_method(rb_cBinding, "dup", proc_dup, 0);
    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()
{
    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_eStandardError);
    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", proc_call, -2);
    rb_define_method(rb_cProc, "arity", proc_arity, 0);
    rb_define_method(rb_cProc, "[]", proc_call, -2);
    rb_define_method(rb_cProc, "==", proc_eq, 1);
    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", proc_lambda, 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, "clone", method_clone, 0);
    rb_define_method(rb_cMethod, "call", method_call, -1);
    rb_define_method(rb_cMethod, "[]", method_call, -1);
    rb_define_method(rb_cMethod, "arity", method_arity, 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, "clone", method_clone, 0);
    rb_define_method(rb_cUnboundMethod, "arity", method_arity, 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()
{
    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_global_function("binding", rb_f_binding, 0);
}

#ifdef __ia64__
#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.
 */
#define __libc_ia64_register_backing_store_base (4ULL<<61)
#else
#pragma weak __libc_ia64_register_backing_store_base
extern unsigned long __libc_ia64_register_backing_store_base;
#endif
#endif

/* 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()
{
    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(p)
    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

/* 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__
    VALUE *bstr_ptr;
    long   bstr_len;
#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;

    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;
    fd_set readfds;
    fd_set writefds;
    fd_set 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;
    fd_set readfds;
    fd_set writefds;
    fd_set 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,        \
    (dst)->select_value = (src)->select_value,  \
    (dst)->delay = (src)->delay,                \
    (dst)->join = (src)->join,                  \
    0)

static int
thread_set_raised()
{
    if (curr_thread->flags & THREAD_RAISED) return 1;
    curr_thread->flags |= THREAD_RAISED;
    return 0;
}

static int
thread_reset_raised()
{
    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));
static VALUE
run_trap_eval(arg)
    VALUE arg;
{
    VALUE *p = (VALUE *)arg;
    return rb_eval_cmd(p[0], p[1], (int)p[2]);
}

static VALUE
rb_trap_eval(cmd, sig, safe)
    VALUE cmd;
    int sig, 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(status)
    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(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()
{
    return INT2NUM(ruby_safe_level);
}

static void
safe_setter(val)
    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()
{
    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))
#ifdef C_ALLOCA
# define MARK_FRAME_ADJ(f) rb_gc_mark_frame(f)
#else
# define MARK_FRAME_ADJ(f) mark_frame_adj(f, th)
static void
mark_frame_adj(frame, th)
    struct FRAME *frame;
    rb_thread_t th;
{
    if (frame->flags & FRAME_MALLOC) {
        rb_gc_mark_locations(frame->argv, frame->argv+frame->argc);
    }
    else {
        VALUE *start = ADJ(frame->argv);
        rb_gc_mark_locations(start, start+frame->argc);
    }
    rb_gc_mark((VALUE)frame->node);
}
#endif

static void
thread_mark(th)
    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);
        MARK_FRAME_ADJ(frame);
        if (frame->tmp) {
            struct FRAME *tmp = frame->tmp;

            while (tmp && tmp != top_frame) {
                tmp = ADJ(tmp);
                MARK_FRAME_ADJ(tmp);
                tmp = tmp->prev;
            }
        }
        frame = frame->prev;
    }
    block = th->block;
    while (block) {
        block = ADJ(block);
        MARK_FRAME_ADJ(&block->frame);
        block = block->prev;
    }
}

void
rb_gc_mark_threads()
{
    rb_thread_t th;

    /* static global mark */
    rb_gc_mark((VALUE)ruby_cref);

    if (!curr_thread) return;
    FOREACH_THREAD_FROM(main_thread, th) {
        rb_gc_mark(th->thread);
    } END_FOREACH_FROM(main_thread, th);
}

static void
thread_free(th)
    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;
    }
    if (th != main_thread) free(th);
}

static rb_thread_t
rb_thread_check(data)
    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 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;

static void
rb_thread_save_context(th)
    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__
    {
        ucontext_t ctx;
        VALUE *top, *bot;

        getcontext(&ctx);
        bot = (VALUE*)__libc_ia64_register_backing_store_base;
#if defined(__FreeBSD__)
        top = (VALUE*)ctx.uc_mcontext.mc_special.bspstore;
#else
        top = (VALUE*)ctx.uc_mcontext.sc_ar_bsp;
#endif
        th->bstr_len = top - bot;
        REALLOC_N(th->bstr_ptr, VALUE, th->bstr_len);
        MEMCPY(th->bstr_ptr, (VALUE*)__libc_ia64_register_backing_store_base, 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;
    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(n)
    int n;
{
    rb_trap_immediate = (curr_thread->flags&0x100)?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->last_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_save_context(th),\
     rb_thread_switch((FLUSH_REGISTER_WINDOWS, ruby_setjmp((th)->context))))

NORETURN(static void rb_thread_restore_context _((rb_thread_t,int)));

# if _MSC_VER >= 1300
__declspec(noinline) static void stack_extend(rb_thread_t, int);
# endif
static void
stack_extend(th, exit)
    rb_thread_t th;
    int exit;
{
    VALUE space[1024];

    memset(space, 0, 1);        /* prevent array from optimization */
    rb_thread_restore_context(th, exit);
}

static void
rb_thread_restore_context(th, exit)
    rb_thread_t th;
    int exit;
{
    VALUE v;
    static rb_thread_t tmp;
    static int ex;
    static VALUE tval;

    if (!th->stk_ptr) rb_bug("unsaved context");

#if STACK_GROW_DIRECTION < 0
    if (&v > th->stk_pos) stack_extend(th, exit);
#elif STACK_GROW_DIRECTION > 0
    if (&v < th->stk_pos + th->stk_len) stack_extend(th, exit);
#else
    if (&v < rb_gc_stack_start) {
        /* Stack grows downward */
        if (&v > th->stk_pos) stack_extend(th, exit);
    }
    else {
        /* Stack grows upward */
        if (&v < th->stk_pos + th->stk_len) stack_extend(th, exit);
    }
#endif

    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((VALUE*)__libc_ia64_register_backing_store_base, 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);
}

static void
rb_thread_ready(th)
    rb_thread_t th;
{
    th->wait_for = 0;
    if (th->status != THREAD_TO_KILL) {
        th->status = THREAD_RUNNABLE;
    }
}

static void
rb_thread_die(th)
    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(th)
    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(th)
    rb_thread_t th;
{
    return th->status == THREAD_KILLED;
}

void
rb_thread_fd_close(fd)
    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(err, tag)
    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()
{
    char msg[21+SIZEOF_LONG*2];
    VALUE e;

    sprintf(msg, "Thread(0x%lx): 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(dst, src, max)
    fd_set *dst, *src;
    int max;
{
    int n = 0;
    int i;

    for (i=0; i<=max; i++) {
        if (FD_ISSET(i, src)) {
            n = i;
            FD_SET(i, dst);
        }
    }
}

static int
match_fds(dst, src, max)
    fd_set *dst, *src;
    int max;
{
    int i;

    for (i=0; i<=max; i++) {
        if (FD_ISSET(i, src) && FD_ISSET(i, dst)) {
            return Qtrue;
        }
    }
    return Qfalse;
}

static int
intersect_fds(src, dst, max)
    fd_set *src, *dst;
    int max;
{
    int i, n = 0;

    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(dst, src, max)
    fd_set *dst, *src;
    int max;
{
    int i, test = Qfalse;

    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()
{
    rb_thread_t next;           /* OK */
    rb_thread_t th;
    rb_thread_t curr;
    int found = 0;

    fd_set readfds;
    fd_set writefds;
    fd_set 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 = 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;
    }

  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 = select(max+1, &readfds, &writefds, &exceptfds, delay_ptr);
        if (n < 0) {
            int e = errno;

            if (rb_trap_pending) rb_trap_exec();
            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;
    }

    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 0x%lx: %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(0x%lx)", 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(fd)
    int fd;
{
    if (rb_thread_critical) return;
    if (ruby_in_compile) 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(fd)
    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(time)
    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()
{
    return curr_thread == curr_thread->next;
}

int
rb_thread_select(max, read, write, except, timeout)
    int max;
    fd_set *read, *write, *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) curr_thread->readfds = *read;
    else FD_ZERO(&curr_thread->readfds);
    if (write) curr_thread->writefds = *write;
    else FD_ZERO(&curr_thread->writefds);
    if (except) curr_thread->exceptfds = *except;
    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 = curr_thread->readfds;
    if (write) *write = curr_thread->writefds;
    if (except) *except = curr_thread->exceptfds;
    return curr_thread->select_value;
}

static int rb_thread_join _((rb_thread_t, double));

static int
rb_thread_join(th, limit)
    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 0x%lx tried to join itself",
                     th->thread);
        if ((th->wait_for & WAIT_JOIN) && th->join == curr_thread)
            rb_raise(rb_eThreadError, "Thread#join: deadlock 0x%lx - mutual join(0x%lx)",
                     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(argc, argv, thread)
    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()
{
    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()
{
    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()
{
    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(thread)
    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(thread)
    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(thread)
    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(obj, th)
    VALUE obj, 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()
{
    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()
{
    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()
{
    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();

void
rb_thread_polling()
{
    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(sec)
    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()
{
    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(thread)
    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(thread, prio)
    VALUE thread, 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(thread)
    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()
{
    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(self, val)
    VALUE self, 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(thread)
    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(thread, val)
    VALUE thread, 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(thread)
    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);\
    FD_ZERO(&th->readfds);\
    FD_ZERO(&th->writefds);\
    FD_ZERO(&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;\
} while (0)

static rb_thread_t
rb_thread_alloc(klass)
    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

static VALUE
rb_thread_start_0(fn, arg, th)
    VALUE (*fn)();
    void *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 (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);

    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;
    }

    PUSH_TAG(PROT_THREAD);
    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);
    }

    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 */
    return 0;                   /* not reached */
}

VALUE
rb_thread_create(fn, arg)
    VALUE (*fn)();
    void *arg;
{
    Init_stack((VALUE*)&arg);
    return rb_thread_start_0(fn, arg, rb_thread_alloc(rb_cThread));
}

static VALUE
rb_thread_yield(arg, th)
    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(argc, argv, klass)
    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(thread, args)
    VALUE thread, 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(klass, args)
    VALUE klass, 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(thread)
    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(thread)
    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(thread)
    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(thread)
    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()
{
    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()
{
    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()
{
    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(obj, val)
    VALUE obj, val;
{
    rb_thread_critical = RTEST(val);
    return val;
}

void
rb_thread_interrupt()
{
    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(sig)
    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;
    curr_thread = main_thread;
    rb_thread_restore_context(curr_thread, RESTORE_SIGNAL);
}

void
rb_thread_trap_eval(cmd, sig, safe)
    VALUE cmd;
    int sig, 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()
{
    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(argc, argv, th)
    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(argc, argv, thread)
    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(thread, id)
    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(thread, id)
    VALUE thread, id;
{
    return rb_thread_local_aref(thread, rb_to_id(id));
}

VALUE
rb_thread_local_aset(thread, id, val)
    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(thread, id, val)
    VALUE thread, id, 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(thread, id)
    VALUE thread, 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(key, value, ary)
    ID key;
    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(thread)
    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(thread)
    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;
    size_t len = strlen(cname)+7+16+9+1;

    str = rb_str_new(0, len); /* 7:tags 16:addr 9:status 1:nul */
    snprintf(RSTRING(str)->ptr, len, "#<%s:0x%lx %s>", cname, thread, status);
    RSTRING(str)->len = strlen(RSTRING(str)->ptr);
    OBJ_INFECT(str, thread);

    return str;
}

void
rb_thread_atfork()
{
    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(self)
    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(argc, argv, cont)
    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));
static VALUE
thgroup_s_alloc(klass)
    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(group)
    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(group)
    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(group)
    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(group, thread)
    VALUE group, 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;
}

/*
 *  +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()
{
    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;
}

/*
 *  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(dmy, tag)
    VALUE dmy, 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(tag)
    VALUE tag;
{
    return rb_funcall(Qnil, rb_intern("catch"), 1, tag);
}

VALUE
rb_catch(tag, func, data)
    const char *tag;
    VALUE (*func)();
    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(argc, argv)
    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 0x%lx",
                     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(tag, val)
    const char *tag;
    VALUE val;
{
    VALUE argv[2];

    argv[0] = ID2SYM(rb_intern(tag));
    argv[1] = val;
    rb_f_throw(2, argv);
}

/* flush_register_windows must not be inlined because flushrs doesn't flush
 * current frame in register stack. */
#ifdef __ia64__
void flush_register_windows(void)
{
    __asm__ ("flushrs");
}
#endif
/* [<][>][^] [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. apply2files
  4. rb_file_path
  5. stat_new_0
  6. stat_new
  7. get_stat
  8. rb_stat_cmp
  9. rb_stat_dev
  10. rb_stat_dev_major
  11. rb_stat_dev_minor
  12. rb_stat_ino
  13. rb_stat_mode
  14. rb_stat_nlink
  15. rb_stat_uid
  16. rb_stat_gid
  17. rb_stat_rdev
  18. rb_stat_rdev_major
  19. rb_stat_rdev_minor
  20. rb_stat_size
  21. rb_stat_blksize
  22. rb_stat_blocks
  23. rb_stat_atime
  24. rb_stat_mtime
  25. rb_stat_ctime
  26. rb_stat_inspect
  27. rb_stat
  28. w32_io_info
  29. rb_file_s_stat
  30. rb_io_stat
  31. rb_file_s_lstat
  32. rb_file_lstat
  33. group_member
  34. eaccess
  35. test_d
  36. test_p
  37. test_l
  38. test_S
  39. test_b
  40. test_c
  41. test_e
  42. test_r
  43. test_R
  44. test_w
  45. test_W
  46. test_x
  47. test_X
  48. test_f
  49. test_z
  50. test_s
  51. test_owned
  52. test_rowned
  53. test_grpowned
  54. check3rdbyte
  55. test_suid
  56. test_sgid
  57. test_sticky
  58. test_identical
  59. rb_file_s_size
  60. rb_file_ftype
  61. rb_file_s_ftype
  62. rb_file_s_atime
  63. rb_file_atime
  64. rb_file_s_mtime
  65. rb_file_mtime
  66. rb_file_s_ctime
  67. rb_file_ctime
  68. chmod_internal
  69. rb_file_s_chmod
  70. rb_file_chmod
  71. lchmod_internal
  72. rb_file_s_lchmod
  73. rb_file_s_lchmod
  74. chown_internal
  75. rb_file_s_chown
  76. rb_file_chown
  77. lchown_internal
  78. rb_file_s_lchown
  79. rb_file_s_lchown
  80. utime_internal
  81. rb_file_s_utime
  82. utime_internal
  83. rb_file_s_utime
  84. sys_fail2
  85. rb_file_s_link
  86. rb_file_s_symlink
  87. rb_file_s_readlink
  88. unlink_internal
  89. rb_file_s_unlink
  90. rb_file_s_rename
  91. rb_file_s_umask
  92. has_drive_letter
  93. getcwdofdrv
  94. skiproot
  95. rb_path_next
  96. rb_path_skip_prefix
  97. rb_path_last_separator
  98. rb_path_end
  99. file_expand_path
  100. rb_file_expand_path
  101. rb_file_s_expand_path
  102. rmext
  103. rb_file_s_basename
  104. rb_file_s_dirname
  105. rb_file_s_extname
  106. rb_file_s_split
  107. file_inspect_join
  108. rb_file_join
  109. rb_file_s_join
  110. rb_file_s_truncate
  111. rb_file_truncate
  112. rb_thread_flock
  113. rb_file_flock
  114. test_check
  115. rb_f_test
  116. rb_stat_s_alloc
  117. rb_stat_init
  118. rb_stat_init_copy
  119. rb_stat_ftype
  120. rb_stat_d
  121. rb_stat_p
  122. rb_stat_l
  123. rb_stat_S
  124. rb_stat_b
  125. rb_stat_c
  126. rb_stat_owned
  127. rb_stat_rowned
  128. rb_stat_grpowned
  129. rb_stat_r
  130. rb_stat_R
  131. rb_stat_w
  132. rb_stat_W
  133. rb_stat_x
  134. rb_stat_X
  135. rb_stat_f
  136. rb_stat_z
  137. rb_stat_s
  138. rb_stat_suid
  139. rb_stat_sgid
  140. rb_stat_sticky
  141. rb_file_const
  142. is_absolute_path
  143. path_check_0
  144. fpath_check
  145. rb_path_check
  146. is_macos_native_path
  147. file_load_ok
  148. rb_find_file_ext
  149. rb_find_file
  150. define_filetest_function
  151. Init_File
/**********************************************************************

  file.c -

  $Author: akr $
  $Date: 2005/12/21 09:20:15 $
  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

#ifndef HAVE_STRING_H
char *strrchr _((const char*,const char));
#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
#if !HAVE_FSEEKO && !defined(fseeko)
# define fseeko  fseek
#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;

static long apply2files _((void (*)(const char *, void *), VALUE, void *));
static long
apply2files(func, vargs, arg)
    void (*func)_((const char *, void *));
    VALUE vargs;
    void *arg;
{
    long i;
    VALUE path;
    struct RArray *args = RARRAY(vargs);

    for (i=0; i<args->len; i++) {
        path = args->ptr[i];
        SafeStringValue(path);
        (*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(obj)
    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(klass, st)
    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(st)
    struct stat *st;
{
    return stat_new_0(rb_cStat, st);
}

static struct stat*
get_stat(self)
    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(self, other)
    VALUE self, 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;
}

static VALUE rb_stat_dev _((VALUE));
static VALUE rb_stat_ino _((VALUE));
static VALUE rb_stat_mode _((VALUE));
static VALUE rb_stat_nlink _((VALUE));
static VALUE rb_stat_uid _((VALUE));
static VALUE rb_stat_gid _((VALUE));
static VALUE rb_stat_rdev _((VALUE));
static VALUE rb_stat_size _((VALUE));
static VALUE rb_stat_blksize _((VALUE));
static VALUE rb_stat_blocks _((VALUE));
static VALUE rb_stat_atime _((VALUE));
static VALUE rb_stat_mtime _((VALUE));
static VALUE rb_stat_ctime _((VALUE));

/*
 *  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(self)
    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(self)
    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(self)
    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(self)
    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(self)
    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(self)
    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(self)
    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(self)
    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(self)
    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(self)
    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(self)
    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(self)
    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(self)
    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(self)
    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(self)
    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(self)
    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(self)
    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(self)
    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(file, st)
    VALUE file;
    struct stat *st;
{
    VALUE tmp;

    tmp = rb_check_convert_type(file, T_FILE, "IO", "to_io");
    if (!NIL_P(tmp)) {
        OpenFile *fptr;

        rb_secure(2);
        GetOpenFile(tmp, fptr);
        return fstat(fileno(fptr->f), st);
    }
    SafeStringValue(file);
    return stat(StringValueCStr(file), st);
}

#ifdef _WIN32
static HANDLE
w32_io_info(file, st)
    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(fileno(fptr->f));
        if (f == (HANDLE)-1) return INVALID_HANDLE_VALUE;
    }
    else {
        SafeStringValue(*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(klass, fname)
    VALUE klass, fname;
{
    struct stat st;

    SafeStringValue(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(obj)
    VALUE obj;
{
    OpenFile *fptr;
    struct stat st;

    GetOpenFile(obj, fptr);
    if (fstat(fileno(fptr->f), &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(klass, fname)
    VALUE klass, fname;
{
#ifdef HAVE_LSTAT
    struct stat st;

    SafeStringValue(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(obj)
    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(gid)
    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(path, mode)
     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
    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(obj, fname)
    VALUE obj, 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(obj, fname)
    VALUE obj, 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(obj, fname)
    VALUE obj, fname;
{
#ifndef S_ISLNK
#  ifdef _S_ISLNK
#    define S_ISLNK(m) _S_ISLNK(m)
#  elif defined __BORLANDC__
#    ifdef _S_IFLNK
#      define S_ISLNK(m) (((unsigned short)(m) & S_IFMT) == _S_IFLNK)
#    else
#      ifdef S_IFLNK
#        define S_ISLNK(m) (((unsigned short)(m) & S_IFMT) == S_IFLNK)
#      endif
#    endif
#  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;

    SafeStringValue(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(obj, fname)
    VALUE obj, fname;
{
#ifndef S_ISSOCK
#  ifdef _S_ISSOCK
#    define S_ISSOCK(m) _S_ISSOCK(m)
#  elif defined __BORLANDC__
#    ifdef _S_IFSOCK
#      define S_ISSOCK(m) (((unsigned short)(m) & S_IFMT) == _S_IFSOCK)
#    else
#      ifdef S_IFSOCK
#        define S_ISSOCK(m) (((unsigned short)(m) & S_IFMT) == S_IFSOCK)
#      endif
#    endif
#  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(obj, fname)
    VALUE obj, 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(obj, fname)
    VALUE obj, 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(obj, fname)
    VALUE obj, 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(obj, fname)
    VALUE obj, fname;
{
    SafeStringValue(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(obj, fname)
    VALUE obj, fname;
{
    SafeStringValue(fname);
    if (access(StringValueCStr(fname), R_OK) < 0) return Qfalse;
    return Qtrue;
}

/*
 * 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(obj, fname)
    VALUE obj, fname;
{
    SafeStringValue(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(obj, fname)
    VALUE obj, fname;
{
    SafeStringValue(fname);
    if (access(StringValueCStr(fname), W_OK) < 0) return Qfalse;
    return Qtrue;
}

/*
 * 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(obj, fname)
    VALUE obj, fname;
{
    SafeStringValue(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(obj, fname)
    VALUE obj, fname;
{
    SafeStringValue(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(obj, fname)
    VALUE obj, 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(obj, fname)
    VALUE obj, 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(obj, fname)
    VALUE obj, 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(obj, fname)
    VALUE obj, 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(obj, fname)
    VALUE obj, 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(obj, fname)
    VALUE obj, 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(fname, mode)
    VALUE fname;
    int mode;
{
    struct stat st;

    SafeStringValue(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(obj, fname)
    VALUE obj, 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(obj, fname)
    VALUE obj, 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(obj, fname)
    VALUE obj, 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(obj, fname1, fname2)
    VALUE obj, fname1, 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
    SafeStringValue(fname1);
    fname1 = rb_str_new4(fname1);
    SafeStringValue(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(klass, fname)
    VALUE klass, 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(st)
    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(klass, fname)
    VALUE klass, fname;
{
    struct stat st;

    SafeStringValue(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(klass, fname)
    VALUE klass, 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(obj)
    VALUE obj;
{
    OpenFile *fptr;
    struct stat st;

    GetOpenFile(obj, fptr);
    if (fstat(fileno(fptr->f), &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(klass, fname)
    VALUE klass, 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(obj)
    VALUE obj;
{
    OpenFile *fptr;
    struct stat st;

    GetOpenFile(obj, fptr);
    if (fstat(fileno(fptr->f), &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(klass, fname)
    VALUE klass, 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(obj)
    VALUE obj;
{
    OpenFile *fptr;
    struct stat st;

    GetOpenFile(obj, fptr);
    if (fstat(fileno(fptr->f), &st) == -1) {
        rb_sys_fail(fptr->path);
    }
    return rb_time_new(st.st_ctime, 0);
}

static void chmod_internal _((const char *, void *));
static void
chmod_internal(path, mode)
    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(argc, argv)
    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(obj, vmode)
    VALUE obj, vmode;
{
    OpenFile *fptr;
    int mode;

    rb_secure(2);
    mode = NUM2INT(vmode);

    GetOpenFile(obj, fptr);
#ifdef HAVE_FCHMOD
    if (fchmod(fileno(fptr->f), 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 *, void *));
static void
lchmod_internal(path, mode)
    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(argc, argv)
    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(argc, argv)
    int argc;
    VALUE *argv;
{
    rb_notimplement();
    return Qnil;                /* not reached */
}
#endif

struct chown_args {
    int owner, group;
};

static void chown_internal _((const char *, void *));
static void
chown_internal(path, argp)
    const char *path;
    void *argp;
{
    struct chown_args *args = (struct chown_args *)argp;
    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(argc, argv)
    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(obj, owner, group)
    VALUE obj, owner, 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(fileno(fptr->f), o, g) == -1)
        rb_sys_fail(fptr->path);
#endif

    return INT2FIX(0);
}

#if defined(HAVE_LCHOWN) && !defined(__CHECKER__)
static void lchown_internal _((const char *, void *));
static void
lchown_internal(path, argp)
    const char *path;
    void *argp;
{
    struct chown_args *args = (struct chown_args *)argp;
    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(argc, argv)
    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(argc, argv)
    int argc;
    VALUE *argv;
{
    rb_notimplement();
}
#endif

struct timeval rb_time_timeval();

static void utime_internal _((const char *, void *));

#if defined(HAVE_UTIMES) && !defined(__CHECKER__)

static void
utime_internal(path, arg)
    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(argc, argv)
    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(path, arg)
    const char *path;
    void *arg;
{
    struct utimbuf *utp = arg;
    if (utime(path, utp) < 0)
        rb_sys_fail(path);
}

static VALUE
rb_file_s_utime(argc, argv)
    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(s1, s2)
    VALUE s1, s2;
{
    char *buf;
    int len;

    len = RSTRING(s1)->len + RSTRING(s2)->len + 5;
    buf = ALLOCA_N(char, len);
    snprintf(buf, len, "%s or %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(klass, from, to)
    VALUE klass, from, to;
{
#ifdef HAVE_LINK
    SafeStringValue(from);
    SafeStringValue(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(klass, from, to)
    VALUE klass, from, to;
{
#ifdef HAVE_SYMLINK
    SafeStringValue(from);
    SafeStringValue(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(klass, path)
    VALUE klass, path;
{
#ifdef HAVE_READLINK
    char *buf;
    int size = 100;
    int rv;
    VALUE v;

    SafeStringValue(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 *, void *));
static void
unlink_internal(path, arg)
    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(klass, args)
    VALUE klass, 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(klass, from, to)
    VALUE klass, from, to;
{
    const char *src, *dst;
    SafeStringValue(from);
    SafeStringValue(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(argc, argv)
    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, MB_CUR_MAX))
# 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(buf)
    const char *buf;
{
    if (ISALPHA(buf[0]) && buf[1] == ':') {
        return 1;
    }
    else {
        return 0;
    }
}

static char*
getcwdofdrv(drv)
    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(path)
    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(s)
    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(path)
    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(path)
    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(path)
    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(fname, dname, result)
    VALUE fname, dname, result;
{
    char *s, *buf, *b, *p, *pend, *root;
    long buflen, dirlen;
    int tainted;

    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(fname, dname)
    VALUE fname, 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(argc, argv)
    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(p, e)
    const char *p, *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(argc, argv)
    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(klass, fname)
    VALUE klass, 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(klass, fname)
    VALUE klass, 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.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(klass, path)
    VALUE klass, 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(ary, arg)
    VALUE ary;
    VALUE *arg;
{
    return rb_file_join(arg[0], arg[1]);
}

static VALUE
rb_file_join(ary, sep)
    VALUE ary, sep;
{
    long len, i;
    int taint = 0;
    VALUE result, tmp;
    char *name, *tail;

    if (RARRAY(ary)->len == 0) return rb_str_new(0, 0);
    if (OBJ_TAINTED(ary)) taint = 1;
    if (OBJ_TAINTED(sep)) taint = 1;

    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);
    for (i=0; i<RARRAY(ary)->len; i++) {
        tmp = RARRAY(ary)->ptr[i];
        switch (TYPE(tmp)) {
          case T_STRING:
            break;
          case T_ARRAY:
            if (rb_inspecting_p(tmp)) {
                tmp = rb_str_new2("[...]");
            }
            else {
                VALUE args[2];

                args[0] = tmp;
                args[1] = sep;
                tmp = rb_protect_inspect(file_inspect_join, ary, (VALUE)args);
            }
            break;
          default:
            StringValueCStr(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);
        if (OBJ_TAINTED(tmp)) taint = 1;
    }

    if (taint) OBJ_TAINT(result);
    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(klass, args)
    VALUE klass, 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(klass, path, len)
    VALUE klass, path, len;
{
    off_t pos;

    rb_secure(2);
    pos = NUM2OFFT(len);
    SafeStringValue(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(obj, len)
    VALUE obj, len;
{
    OpenFile *fptr;
    FILE *f;
    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");
    }
    f = GetWriteFile(fptr);
    fflush(f);
    fseeko(f, (off_t)0, SEEK_CUR);
#ifdef HAVE_TRUNCATE
    if (ftruncate(fileno(f), pos) < 0)
        rb_sys_fail(fptr->path);
#else
# ifdef HAVE_CHSIZE
    if (chsize(fileno(f), 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(fd, op, fptr)
    int fd, 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(obj, operation)
    VALUE obj;
    VALUE operation;
{
#ifndef __CHECKER__
    OpenFile *fptr;
    int op;

    rb_secure(2);
    op = NUM2INT(operation);
    GetOpenFile(obj, fptr);

    if (fptr->mode & FMODE_WRITABLE) {
        fflush(GetWriteFile(fptr));
    }
  retry:
    if (flock(fileno(fptr->f), 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(n, argc, argv)
    int n, argc;
    VALUE *argv;
{
    int i;

    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:
            SafeStringValue(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(argc, argv)
    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));
static VALUE
rb_stat_s_alloc(klass)
    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(obj, fname)
    VALUE obj, fname;
{
    struct stat st, *nst;

    SafeStringValue(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(copy, orig)
    VALUE copy, 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(obj)
    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(obj)
    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(obj)
    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(obj)
    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(obj)
    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(obj)
    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(obj)
    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(obj)
    VALUE obj;
{
    if (get_stat(obj)->st_uid == geteuid()) return Qtrue;
    return Qfalse;
}

static VALUE
rb_stat_rowned(obj)
    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(obj)
    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(obj)
    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(obj)
    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.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(obj)
    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(obj)
    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.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(obj)
    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(obj)
    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(obj)
    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(obj)
    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(obj)
    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(obj)
    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(obj)
    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(obj)
    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(name, value)
    const char *name;
    VALUE value;
{
    rb_define_const(rb_mFConst, name, value);
}

static int
is_absolute_path(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(fpath, loadpath)
     VALUE fpath;
     int loadpath;
{
    struct stat st;
    char *p0 = StringValueCStr(fpath);
    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
            ) {
            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(path)
    char *path;
{
#ifndef DOSISH
    return path_check_0(rb_str_new2(path), Qfalse);
#else
    return 1;
#endif
}

int
rb_path_check(path)
    char *path;
{
#ifndef DOSISH
    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(path)
    const char *path;
{
    if (strchr(path, ':')) return 1;
    return 0;
}
#endif

static int
file_load_ok(file)
    char *file;
{
    FILE *f;

    if (!file) return 0;
    f = fopen(file, "r");
    if (f == NULL) return 0;
    fclose(f);
    return 1;
}

extern VALUE rb_load_path;

int
rb_find_file_ext(filep, 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];

        SafeStringValue(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 = fname;
                return j+1;
            }
        }
    }
    return 0;
}

VALUE
rb_find_file(path)
    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];
            SafeStringValue(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(name, func, argc)
    const char *name;
    VALUE (*func)();
    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()
{
    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("writable?", test_w, 1);
    define_filetest_function("writable_real?", test_W, 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);

    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, "writable?",  rb_stat_w, 0);
    rb_define_method(rb_cStat, "writable_real?",  rb_stat_W, 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_xcalloc
  4. ruby_xrealloc
  5. ruby_xfree
  6. rb_gc_enable
  7. rb_gc_disable
  8. rb_gc_register_address
  9. rb_gc_unregister_address
  10. rb_global_variable
  11. RVALUE
  12. add_heap
  13. rb_newobj
  14. rb_data_object_alloc
  15. stack_end_address
  16. stack_grow_direction
  17. ruby_stack_length
  18. ruby_stack_check
  19. init_mark_stack
  20. rb_source_filename
  21. mark_source_filename
  22. sweep_source_filename
  23. gc_mark_all
  24. gc_mark_rest
  25. is_pointer_to_heap
  26. mark_locations_array
  27. rb_gc_mark_locations
  28. mark_entry
  29. mark_tbl
  30. rb_mark_tbl
  31. mark_keyvalue
  32. mark_hash
  33. rb_mark_hash
  34. rb_gc_mark_maybe
  35. gc_mark
  36. rb_gc_mark
  37. gc_mark_children
  38. finalize_list
  39. free_unused_heaps
  40. gc_sweep
  41. rb_gc_force_recycle
  42. obj_free
  43. rb_gc_mark_frame
  44. garbage_collect
  45. rb_gc
  46. rb_gc_start
  47. ruby_set_stack_size
  48. Init_stack
  49. Init_heap
  50. os_live_obj
  51. os_obj_of
  52. os_each_obj
  53. add_final
  54. rm_final
  55. finals
  56. call_final
  57. undefine_final
  58. define_final
  59. rb_gc_copy_finalizer
  60. run_single_final
  61. run_final
  62. rb_gc_finalize_deferred
  63. rb_gc_call_finalizer_at_exit
  64. id2ref
  65. Init_GC
/**********************************************************************

  gc.c -

  $Author: akr $
  $Date: 2005/12/16 04:58:51 $
  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

#ifdef __ia64__
#include <ucontext.h>
#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.
 */
#define __libc_ia64_register_backing_store_base (4ULL<<61)
#else
#pragma weak __libc_ia64_register_backing_store_base
extern unsigned long __libc_ia64_register_backing_store_base;
#endif
#endif

#if defined _WIN32 || defined __CYGWIN__
#include <windows.h>
#endif

void re_free_registers _((struct re_registers*));
void 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();
static VALUE nomem_error;
static void garbage_collect();

void
rb_memerror()
{
    static int recurse = 0;

    if (recurse > 0 && rb_safe_level() < 4) {
        fprintf(stderr, "[FATAL] failed to allocate memory\n");
        exit(1);
    }
    recurse++;
    rb_exc_raise(nomem_error);
}

void *
ruby_xmalloc(size)
    long 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 (malloc_increase > malloc_limit) {
        garbage_collect();
    }
    RUBY_CRITICAL(mem = malloc(size));
    if (!mem) {
        garbage_collect();
        RUBY_CRITICAL(mem = malloc(size));
        if (!mem) {
            rb_memerror();
        }
    }

    return mem;
}

void *
ruby_xcalloc(n, size)
    long n, size;
{
    void *mem;

    mem = xmalloc(n * size);
    memset(mem, 0, n * size);

    return mem;
}

void *
ruby_xrealloc(ptr, size)
    void *ptr;
    long size;
{
    void *mem;

    if (size < 0) {
        rb_raise(rb_eArgError, "negative re-allocation size");
    }
    if (!ptr) return xmalloc(size);
    if (size == 0) size = 1;
    malloc_increase += size;
    RUBY_CRITICAL(mem = realloc(ptr, size));
    if (!mem) {
        garbage_collect();
        RUBY_CRITICAL(mem = realloc(ptr, size));
        if (!mem) {
            rb_memerror();
        }
    }

    return mem;
}

void
ruby_xfree(x)
    void *x;
{
    if (x)
        RUBY_CRITICAL(free(x));
}

extern int ruby_in_compile;
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()
{
    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()
{
    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(addr)
    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(addr)
    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(var)
    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()
{
    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()
{
    VALUE obj;

    if (!freelist) garbage_collect();

    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(klass, datap, dmark, dfree)
    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 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

#ifdef C_ALLOCA
# define SET_STACK_END VALUE stack_end; alloca(0);
# define STACK_END (&stack_end)
#else
# if defined(__GNUC__) && defined(USE_BUILTIN_FRAME_ADDRESS) && !defined(__ia64__)
#  if ( __GNUC__ == 3 && __GNUC_MINOR__ > 0 ) || __GNUC__ > 3
__attribute__ ((noinline))
#  endif
static VALUE *
stack_end_address(void)
{
    return (VALUE *)__builtin_frame_address(0);
}
#  define  SET_STACK_END    VALUE *stack_end = stack_end_address()
# else
#  define  SET_STACK_END    VALUE *stack_end = alloca(1)
# endif
# define STACK_END (stack_end)
#endif
#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(p)
    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()
{
    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()
{
    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(f)
    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(f)
    char *f;
{
    if (f) {
        f[-1] = 1;
    }
}

static int
sweep_source_filename(key, value)
    char *key, *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()
{
    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()
{
    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(ptr)
    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(x, n)
    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(start, end)
    VALUE *start, *end;
{
    long n;

    n = end - start;
    mark_locations_array(start,n);
}

static int
mark_entry(key, value, lev)
    ID key;
    VALUE value;
    int lev;
{
    gc_mark(value, lev);
    return ST_CONTINUE;
}

static void
mark_tbl(tbl, lev)
    st_table *tbl;
    int lev;
{
    if (!tbl) return;
    st_foreach(tbl, mark_entry, lev);
}

void
rb_mark_tbl(tbl)
    st_table *tbl;
{
    mark_tbl(tbl, 0);
}

static int
mark_keyvalue(key, value, lev)
    VALUE key;
    VALUE value;
    int lev;
{
    gc_mark(key, lev);
    gc_mark(value, lev);
    return ST_CONTINUE;
}

static void
mark_hash(tbl, lev)
    st_table *tbl;
    int lev;
{
    if (!tbl) return;
    st_foreach(tbl, mark_keyvalue, lev);
}

void
rb_mark_hash(tbl)
    st_table *tbl;
{
    mark_hash(tbl, 0);
}

void
rb_gc_mark_maybe(obj)
    VALUE obj;
{
    if (is_pointer_to_heap((void *)obj)) {
        gc_mark(obj, 0);
    }
}

#define GC_LEVEL_MAX 250

static void
gc_mark(ptr, lev)
    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(ptr)
    VALUE ptr;
{
    gc_mark(ptr, 0);
}

static void
gc_mark_children(ptr, lev)
    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:
            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:
          case NODE_NEWLINE:
            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:
            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:
            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_ARGS:
          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_ALIAS:
          case NODE_VALIAS:
          case NODE_REDO:
          case NODE_RETRY:
          case NODE_UNDEF:
          case NODE_SELF:
          case NODE_NIL:
          case NODE_TRUE:
          case NODE_FALSE:
          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_BLKTAG:
        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(0x%lx) %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(p)
    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()
{
    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++;
        }
    }
}

static void
gc_sweep()
{
    RVALUE *p, *pend, *final_list;
    int freed = 0;
    int i;
    unsigned long live = 0;

    if (ruby_in_compile && ruby_parser_stack_on_heap()) {
        /* should not reclaim nodes during compilation
           if yacc's semantic stack is not allocated on machine 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) && BUILTIN_TYPE(p) == T_NODE)
                    gc_mark((VALUE)p, 0);
                p++;
            }
        }
    }

    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(p)
    VALUE p;
{
    RANY(p)->as.free.flags = 0;
    RANY(p)->as.free.next = freelist;
    freelist = RANY(p);
}

static void
obj_free(obj)
    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) {
            re_free_pattern(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) {
            re_free_registers(RANY(obj)->as.match.regs);
            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);
            RUBY_CRITICAL(free(RANY(obj)->as.file.fptr));
        }
        break;
      case T_ICLASS:
        /* iClass shares table with the module */
        break;

      case T_FLOAT:
      case T_VARMAP:
      case T_BLKTAG:
        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(0x%lx)",
               RANY(obj)->as.basic.flags & T_MASK, obj);
    }
}

void
rb_gc_mark_frame(frame)
    struct FRAME *frame;
{
    mark_locations_array(frame->argv, frame->argc);
    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 void
garbage_collect()
{
    struct gc_list *list;
    struct FRAME * volatile frame; /* gcc 2.7.2.3 -O2 bug??  */
    jmp_buf save_regs_gc_mark;
    SET_STACK_END;

#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;
    }
    if (during_gc) return;
    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 window on the stack) */
    /* the basic idea from guile GC code                         */
    {
        ucontext_t ctx;
        VALUE *top, *bot;
        getcontext(&ctx);
        mark_locations_array((VALUE*)&ctx.uc_mcontext,
                             ((size_t)(sizeof(VALUE)-1 + sizeof ctx.uc_mcontext)/sizeof(VALUE)));
        bot = (VALUE*)__libc_ia64_register_backing_store_base;
#if defined(__FreeBSD__)
        top = (VALUE*)ctx.uc_mcontext.mc_special.bspstore;
#else
        top = (VALUE*)ctx.uc_mcontext.sc_ar_bsp;
#endif
        rb_gc_mark_locations(bot, top);
    }
#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*/
    while (!MARK_STACK_EMPTY){
        if (mark_stack_overflow){
            gc_mark_all();
        }
        else {
            gc_mark_rest();
        }
    }
    gc_sweep();
}

void
rb_gc()
{
    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()
{
    rb_gc();
    return Qnil;
}

void
ruby_set_stack_size(size)
    size_t size;
{
#ifndef STACK_LEVEL_MAX
    STACK_LEVEL_MAX = size / sizeof(VALUE);
#endif
}

void
Init_stack(addr)
    VALUE *addr;
{
#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
}

/*
 * 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()
{
    if (!rb_gc_stack_start) {
        Init_stack(0);
    }
    add_heap();
}

static VALUE
os_live_obj()
{
    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(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(argc, argv)
    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(os, block)
    VALUE os, 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(os, block)
    VALUE os, block;
{
    rb_warn("ObjectSpace::remove_finalizer is deprecated; use undefine_finalizer");
    rb_ary_delete(finalizers, block);
    return block;
}

/*
 * deprecated
 */
static VALUE
finals()
{
    rb_warn("ObjectSpace::finalizers is deprecated");
    return finalizers;
}

/*
 * deprecated
 */

static VALUE
call_final(os, obj)
    VALUE os, 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(os, obj)
    VALUE os, 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(argc, argv, os)
    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(dest, obj)
    VALUE dest, 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);
    }
    RBASIC(dest)->flags |= FL_FINALIZE;
}

static VALUE
run_single_final(args)
    VALUE *args;
{
    rb_eval_cmd(args[0], args[1], (int)args[2]);
    return Qnil;
}

static void
run_final(obj)
    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()
{
    RVALUE *p = deferred_final_list;

    deferred_final_list = 0;
    if (p) {
        finalize_list(p);
        free_unused_heaps();
    }
}

void
rb_gc_call_finalizer_at_exit()
{
    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) {
                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) {
                p->as.free.flags = 0;
                rb_io_fptr_finalize(RANY(p)->as.file.fptr);
            }
            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(obj, id)
    VALUE obj, id;
{
    unsigned long ptr, p0;

    rb_secure(4);
    p0 = ptr = NUM2ULONG(id);
    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_BLKTAG) {
        rb_raise(rb_eRangeError, "0x%lx is not id value", p0);
    }
    if (BUILTIN_TYPE(ptr) == 0 || RBASIC(ptr)->klass == 0) {
        rb_raise(rb_eRangeError, "0x%lx 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()
{
    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_modify
  2. rb_hash_freeze
  3. eql
  4. rb_any_cmp
  5. rb_hash
  6. rb_any_hash
  7. foreach_safe_i
  8. st_foreach_safe
  9. hash_foreach_iter
  10. hash_foreach_ensure
  11. hash_foreach_call
  12. rb_hash_foreach
  13. hash_alloc
  14. rb_hash_new
  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. index_i
  26. rb_hash_index
  27. rb_hash_indexes
  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_index
  111. env_indexes
  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: matz $
  $Date: 2005/07/19 08:25:37 $
  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

static void
rb_hash_modify(hash)
    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");
}

VALUE
rb_hash_freeze(hash)
    VALUE hash;
{
    return rb_obj_freeze(hash);
}

VALUE rb_cHash;

static VALUE envtbl;
static ID id_hash, id_call, id_default;

static VALUE
eql(args)
    VALUE *args;
{
    return (VALUE)rb_eql(args[0], args[1]);
}

static int
rb_any_cmp(a, b)
    VALUE a, 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(obj)
    VALUE obj;
{
    return rb_funcall(obj, id_hash, 0);
}

static int
rb_any_hash(a)
    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(key, value, arg)
    st_data_t key, 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(table, func, a)
    st_table *table;
    int (*func)();
    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(key, value, arg)
    VALUE key, 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(hash)
    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(arg)
    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(hash, func, farg)
    VALUE hash;
    int (*func)();
    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(klass)
    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()
{
    return hash_alloc(rb_cHash);
}

/*
 *  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(argc, argv, hash)
    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(argc, argv, klass)
    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(hash)
    VALUE hash;
{
    return rb_convert_type(hash, T_HASH, "Hash", "to_hash");
}

static int
rb_hash_rehash_i(key, value, tbl)
    VALUE key, 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>IndexError</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(hash)
    VALUE hash;
{
    st_table *tbl;

    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(hash, key)
    VALUE hash, 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>IndexError</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 (IndexError)
 *      from prog.rb:2
 *
 */

static VALUE
rb_hash_fetch(argc, argv, hash)
    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_eIndexError, "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(argc, argv, hash)
    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(hash, ifnone)
    VALUE hash, 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(hash)
    VALUE hash;
{
    if (FL_TEST(hash, HASH_PROC_DEFAULT)) {
        return RHASH(hash)->ifnone;
    }
    return Qnil;
}

static int
index_i(key, value, args)
    VALUE key, value;
    VALUE *args;
{
    if (rb_equal(value, args[0])) {
        args[1] = key;
        return ST_STOP;
    }
    return ST_CONTINUE;
}

/*
 *  call-seq:
 *     hsh.index(value)    => key
 *
 *  Returns the key for a given value. If not found, returns <code>nil</code>.
 *
 *     h = { "a" => 100, "b" => 200 }
 *     h.index(200)   #=> "b"
 *     h.index(999)   #=> nil
 *
 */

static VALUE
rb_hash_index(hash, value)
    VALUE hash, value;
{
    VALUE args[2];

    args[0] = value;
    args[1] = Qnil;

    rb_hash_foreach(hash, index_i, (st_data_t)args);

    return args[1];
}

/*
 *  call-seq:
 *     hsh.indexes(key, ...)    => array
 *     hsh.indices(key, ...)    => array
 *
 *  Deprecated in favor of <code>Hash#select</code>.
 *
 */

static VALUE
rb_hash_indexes(argc, argv, hash)
    int argc;
    VALUE *argv;
    VALUE hash;
{
    VALUE indexes;
    int i;

    rb_warn("Hash#%s is deprecated; use Hash#values_at",
            rb_id2name(rb_frame_last_func()));
    indexes = rb_ary_new2(argc);
    for (i=0; i<argc; i++) {
        RARRAY(indexes)->ptr[i] = rb_hash_aref(hash, argv[i]);
        RARRAY(indexes)->len++;
    }
    return indexes;
}

/*
 *  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(hash, key)
    VALUE hash, 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(key, value, var)
    VALUE key, 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(hash)
    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(key, value, hash)
    VALUE key, 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(hash)
    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(hash)
    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(hash)
    VALUE hash;
{
    return rb_hash_delete_if(rb_obj_dup(hash));
}

static int
select_i(key, value, result)
    VALUE key, 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(argc, argv, hash)
    int argc;
    VALUE *argv;
    VALUE hash;
{
    VALUE result = rb_ary_new();
    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(argc, argv, hash)
    int argc;
    VALUE *argv;
    VALUE hash;
{
    VALUE result;

    if (argc > 0) {
        rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc);
    }
    result = rb_ary_new();
    rb_hash_foreach(hash, select_i, result);
    return result;
}

static int
clear_i(key, value, dummy)
    VALUE key, 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(hash)
    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(hash, key, val)
    VALUE hash, key, 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(key, val, hash)
    VALUE key, val, 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(hash, hash2)
    VALUE hash, 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(hash)
    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(hash)
    VALUE hash;
{
    if (RHASH(hash)->tbl->num_entries == 0)
        return Qtrue;
    return Qfalse;
}

static int
each_value_i(key, value)
    VALUE key, 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(hash)
    VALUE hash;
{
    rb_hash_foreach(hash, each_value_i, 0);
    return hash;
}

static int
each_key_i(key, value)
    VALUE key, 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(hash)
    VALUE hash;
{
    rb_hash_foreach(hash, each_key_i, 0);
    return hash;
}

static int
each_pair_i(key, value)
    VALUE key, 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(hash)
    VALUE hash;
{
    rb_hash_foreach(hash, each_pair_i, 0);
    return hash;
}

static int
each_i(key, value)
    VALUE key, 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(hash)
    VALUE hash;
{
    rb_hash_foreach(hash, each_i, 0);
    return hash;
}

static int
to_a_i(key, value, ary)
    VALUE key, 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(hash)
    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(hash)
    VALUE hash;
{
    VALUE entries = rb_hash_to_a(hash);
    rb_ary_sort_bang(entries);
    return entries;
}

static int
inspect_i(key, value, str)
    VALUE key, 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(hash)
    VALUE hash;
{
    VALUE str;

    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(hash)
    VALUE hash;
{
    if (RHASH(hash)->tbl == 0 || RHASH(hash)->tbl->num_entries == 0)
        return rb_str_new2("{}");
    if (rb_inspecting_p(hash)) return rb_str_new2("{...}");
    return rb_protect_inspect(inspect_hash, hash, 0);
}

static VALUE
to_s_hash(hash)
    VALUE hash;
{
    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(hash)
    VALUE hash;
{
    if (rb_inspecting_p(hash)) return rb_str_new2("{...}");
    return rb_protect_inspect(to_s_hash, hash, 0);
}

/*
 * call-seq:
 *    hsh.to_hash   => hsh
 *
 * Returns <i>self</i>.
 */

static VALUE
rb_hash_to_hash(hash)
    VALUE hash;
{
    return hash;
}

static int
keys_i(key, value, ary)
    VALUE key, 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(hash)
    VALUE hash;
{
    VALUE ary;

    ary = rb_ary_new();
    rb_hash_foreach(hash, keys_i, ary);

    return ary;
}

static int
values_i(key, value, ary)
    VALUE key, 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(hash)
    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(hash, key)
    VALUE hash;
    VALUE key;
{
    if (st_lookup(RHASH(hash)->tbl, key, 0)) {
        return Qtrue;
    }
    return Qfalse;
}

static int
rb_hash_search_value(key, value, data)
    VALUE key, 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(hash, val)
    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(key, val1, data)
    VALUE key, 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(hash1, hash2, eql)
    VALUE hash1, 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(hash1, hash2)
    VALUE hash1, hash2;
{
    return hash_equal(hash1, hash2, Qfalse);
}

static int
rb_hash_invert_i(key, value, hash)
    VALUE key, 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(hash)
    VALUE hash;
{
    VALUE h = rb_hash_new();

    rb_hash_foreach(hash, rb_hash_invert_i, h);
    return h;
}

static int
rb_hash_update_i(key, value, hash)
    VALUE key, 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(key, value, hash)
    VALUE key, 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>, overwriting
 *  entries 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}
 */

static VALUE
rb_hash_update(hash1, hash2)
    VALUE hash1, 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(hash1, hash2)
    VALUE hash1, 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(ptr, len)
    const char *ptr;
    long len;
{
    VALUE str = rb_tainted_str_new(ptr, len);

    rb_obj_freeze(str);
    return str;
}

static VALUE
env_str_new2(ptr)
    const char *ptr;
{
    if (!ptr) return Qnil;
    return env_str_new(ptr, strlen(ptr));
}

static VALUE
env_delete(obj, name)
    VALUE obj, 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(obj, name)
    VALUE obj, 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(obj, name)
    VALUE obj, name;
{
    char *nam, *env;

    StringValue(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(argc, argv)
    int argc;
    VALUE *argv;
{
    VALUE key, if_none;
    long block_given;
    char *nam, *env;

    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");
    }
    StringValue(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_eIndexError, "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(path)
    char *path;
{
    path_tainted = rb_path_check(path)?0:1;
}

int
rb_env_path_tainted()
{
    if (path_tainted < 0) {
        path_tainted_p(getenv(PATH_ENV));
    }
    return path_tainted;
}

static int
envix(nam)
    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(name, value)
    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(name)
    const char *name;
{
    ruby_setenv(name, 0);
}

static VALUE
env_aset(obj, nm, val)
    VALUE obj, nm, val;
{
    char *name, *value;

    if (rb_safe_level() >= 4) {
        rb_raise(rb_eSecurityError, "can't change environment variable");
    }

    if (NIL_P(val)) {
        env_delete(obj, nm);
        return Qnil;
    }

    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()
{
    char **env;
    VALUE 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(ehash)
    VALUE ehash;
{
    VALUE keys = env_keys();
    long i;

    for (i=0; i<RARRAY(keys)->len; i++) {
        rb_yield(RARRAY(keys)->ptr[i]);
    }
    return ehash;
}

static VALUE
env_values()
{
    char **env;
    VALUE 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(ehash)
    VALUE ehash;
{
    VALUE values = env_values();
    long i;

    for (i=0; i<RARRAY(values)->len; i++) {
        rb_yield(RARRAY(values)->ptr[i]);
    }
    return ehash;
}

static VALUE
env_each_i(ehash, values)
    VALUE ehash;
    int values;
{
    char **env;
    VALUE ary = rb_ary_new();
    long i;

    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(ehash)
    VALUE ehash;
{
    return env_each_i(ehash, Qfalse);
}

static VALUE
env_each_pair(ehash)
    VALUE ehash;
{
    return env_each_i(ehash, Qtrue);
}

static VALUE
env_reject_bang()
{
    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()
{
    env_reject_bang();
    return envtbl;
}

static VALUE
env_values_at(argc, argv)
    int argc;
    VALUE *argv;
{
    VALUE result = rb_ary_new();
    long i;

    for (i=0; i<argc; i++) {
        rb_ary_push(result, rb_f_getenv(Qnil, argv[i]));
    }
    return result;
}

static VALUE
env_select(argc, argv)
    int argc;
    VALUE *argv;
{
    VALUE result;
    char **env;

    if (argc > 0) {
        rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc);
    }
    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()
{
    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()
{
    return rb_str_new2("ENV");
}

static VALUE
env_inspect()
{
    char **env;
    VALUE str = rb_str_buf_new2("{");
    VALUE i;

    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()
{
    char **env;
    VALUE 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()
{
    return Qnil;
}

static VALUE
env_size()
{
    int i;
    char **env;

    env = GET_ENVIRON(environ);
    for(i=0; env[i]; i++)
        ;
    FREE_ENVIRON(environ);
    return INT2FIX(i);
}

static VALUE
env_empty_p()
{
    char **env;

    env = GET_ENVIRON(environ);
    if (env[0] == 0) {
        FREE_ENVIRON(environ);
        return Qtrue;
    }
    FREE_ENVIRON(environ);
    return Qfalse;
}

static VALUE
env_has_key(env, key)
    VALUE env, key;
{
    char *s;

    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(dmy, value)
    VALUE dmy, value;
{
    char **env;

    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_index(dmy, value)
    VALUE dmy, value;
{
    char **env;
    VALUE str;

    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_indexes(argc, argv)
    int argc;
    VALUE *argv;
{
    int i;
    VALUE indexes = rb_ary_new2(argc);

    rb_warn("ENV.%s is deprecated; use ENV.values_at",
            rb_id2name(rb_frame_last_func()));
    for (i=0;i<argc;i++) {
        VALUE tmp = rb_check_string_type(argv[i]);
        if (NIL_P(tmp)) {
            RARRAY(indexes)->ptr[i] = Qnil;
        }
        else {
            RARRAY(indexes)->ptr[i] = env_str_new2(getenv(RSTRING(tmp)->ptr));
        }
        RARRAY(indexes)->len = i+1;
    }

    return indexes;
}

static VALUE
env_to_hash()
{
    char **env;
    VALUE 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()
{
    return rb_hash_delete_if(env_to_hash());
}

static VALUE
env_shift()
{
    char **env;

    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()
{
    return rb_hash_invert(env_to_hash());
}

static int
env_replace_i(key, val, keys)
    VALUE key, val, 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(env, hash)
    VALUE env, hash;
{
    volatile VALUE keys = env_keys();
    long i;

    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(key, val)
    VALUE key, 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(env, hash)
    VALUE env, hash;
{
    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()
{
    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,"index", rb_hash_index, 1);
    rb_define_method(rb_cHash,"indexes", rb_hash_indexes, -1);
    rb_define_method(rb_cHash,"indices", rb_hash_indexes, -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, -1);
    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, -1);
    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,"index", env_index, 1);
    rb_define_singleton_method(envtbl,"indexes", env_indexes, -1);
    rb_define_singleton_method(envtbl,"indices", env_indexes, -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] */


inits.c

root/inits.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. rb_call_inits
/**********************************************************************

  inits.c -

  $Author: dave $
  $Date: 2003/12/19 03:58:57 $
  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_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()
{
    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_version();
}
/* [<][>][^][v] [top][bottom][index] [help] */


intern.h

root/intern.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/**********************************************************************

  intern.h -

  $Author: ocean $
  $Date: 2005/11/23 02:06:00 $
  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

**********************************************************************/

/*
 * 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_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_protect_inspect _((VALUE(*)(ANYARGS),VALUE,VALUE));
VALUE rb_inspecting_p _((VALUE));
VALUE rb_check_array_value _((VALUE));
VALUE rb_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_plus _((VALUE, VALUE));
VALUE rb_big_minus _((VALUE, VALUE));
VALUE rb_big_mul _((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));
VALUE rb_big_rand _((VALUE, double*));
/* 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 */
/* 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));
NORETURN(void rb_loaderror __((const char*, ...)));
NORETURN(void rb_name_error __((ID, const char*, ...)));
NORETURN(void rb_invalid_str _((const char*, const char*)));
void rb_compile_error __((const char*, ...));
void rb_compile_error_append __((const char*, ...));
NORETURN(void rb_load_fail _((const char*)));
NORETURN(void rb_error_frozen _((const char*)));
void rb_check_frozen _((VALUE));
/* eval.c */
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_last_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_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 _((char*));
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_funcall_rescue __((VALUE, ID, int, ...));
/* 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 */
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 _((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_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_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;
int ruby_yyparse _((void));
ID rb_id_attrset _((ID));
void rb_parser_append_print _((void));
void rb_parser_while_loop _((int, int));
int ruby_parser_stack_on_heap _((void));
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 */
int rb_proc_exec _((const char*));
VALUE rb_f_exec _((int,VALUE*));
int rb_waitpid _((int,int*,int));
void rb_syswait _((int));
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_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)));
#endif
void rb_trap_exit _((void));
void rb_trap_exec _((void));
const char *ruby_signal_name _((int));
/* sprintf.c */
VALUE rb_f_sprintf _((int, 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, 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));
/* [<][>][^][v][top][bottom][index] [help] */


io.c

root/io.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. rb_eof_error
  2. rb_io_taint_check
  3. rb_io_check_initialized
  4. rb_io_check_closed
  5. flush_before_seek
  6. rb_io_check_readable
  7. rb_io_check_writable
  8. rb_read_pending
  9. rb_read_check
  10. ruby_dup
  11. io_alloc
  12. io_fflush
  13. rb_io_wait_readable
  14. rb_io_wait_writable
  15. wsplit_p
  16. io_fwrite
  17. rb_io_fwrite
  18. io_write
  19. rb_io_write
  20. rb_io_addstr
  21. rb_io_flush
  22. rb_io_tell
  23. rb_io_seek
  24. rb_io_seek_m
  25. rb_io_set_pos
  26. rb_io_rewind
  27. rb_io_eof
  28. rb_io_sync
  29. rb_io_set_sync
  30. rb_io_fsync
  31. rb_io_fileno
  32. rb_io_pid
  33. rb_io_inspect
  34. rb_io_to_io
  35. read_buffered_data
  36. io_fread
  37. rb_io_fread
  38. remain_size
  39. read_all
  40. io_getpartial
  41. io_readpartial
  42. io_read
  43. appendline
  44. swallow
  45. rb_io_getline_fast
  46. rscheck
  47. rb_io_getline
  48. rb_io_gets
  49. rb_io_gets_m
  50. rb_io_lineno
  51. rb_io_set_lineno
  52. lineno_setter
  53. argf_set_lineno
  54. argf_lineno
  55. rb_io_readline
  56. rb_io_readlines
  57. rb_io_each_line
  58. rb_io_each_byte
  59. rb_io_getc
  60. rb_getc
  61. rb_io_readchar
  62. rb_io_ungetc
  63. rb_io_isatty
  64. fptr_finalize
  65. rb_io_fptr_cleanup
  66. rb_io_fptr_finalize
  67. rb_io_close
  68. rb_io_close_m
  69. io_close
  70. rb_io_closed
  71. rb_io_close_read
  72. rb_io_close_write
  73. rb_io_sysseek
  74. rb_io_syswrite
  75. rb_io_sysread
  76. rb_io_binmode
  77. rb_io_flags_mode
  78. rb_io_mode_flags
  79. rb_io_modenum_flags
  80. rb_io_mode_modenum
  81. rb_io_modenum_mode
  82. rb_sysopen
  83. rb_fopen
  84. rb_fdopen
  85. rb_file_open_internal
  86. rb_file_open
  87. rb_file_sysopen_internal
  88. rb_file_sysopen
  89. pipe_add_fptr
  90. pipe_del_fptr
  91. _
  92. pipe_finalize
  93. rb_io_synchronized
  94. rb_io_unbuffered
  95. pipe_open
  96. rb_io_s_popen
  97. rb_open_file
  98. rb_io_s_open
  99. rb_io_s_sysopen
  100. rb_f_open
  101. rb_io_open
  102. rb_io_get_io
  103. rb_io_check_io
  104. rb_io_mode_string
  105. io_reopen
  106. rb_io_reopen
  107. rb_io_init_copy
  108. rb_io_printf
  109. rb_f_printf
  110. rb_io_print
  111. rb_f_print
  112. rb_io_putc
  113. rb_f_putc
  114. io_puts_ary
  115. rb_io_puts
  116. rb_f_puts
  117. rb_p
  118. rb_f_p
  119. rb_obj_display
  120. rb_write_error2
  121. rb_write_error
  122. must_respond_to
  123. stdout_setter
  124. defout_setter
  125. deferr_setter
  126. prep_stdio
  127. prep_path
  128. rb_io_initialize
  129. rb_file_initialize
  130. rb_io_s_new
  131. rb_io_s_for_fd
  132. argf_forward
  133. argf_close
  134. next_argv
  135. argf_getline
  136. rb_f_gets
  137. rb_gets
  138. rb_f_readline
  139. rb_f_getc
  140. rb_f_readlines
  141. rb_f_backquote
  142. rb_f_select
  143. io_cntl
  144. rb_io_ctl
  145. rb_io_ioctl
  146. rb_io_fcntl
  147. rb_f_syscall
  148. io_new_instance
  149. rb_io_s_pipe
  150. io_s_foreach
  151. rb_io_s_foreach
  152. io_s_readlines
  153. rb_io_s_readlines
  154. io_s_read
  155. rb_io_s_read
  156. argf_tell
  157. argf_seek_m
  158. argf_set_pos
  159. argf_rewind
  160. argf_fileno
  161. argf_to_io
  162. argf_eof
  163. argf_read
  164. argf_getc
  165. argf_readchar
  166. argf_each_line
  167. argf_each_byte
  168. argf_filename
  169. argf_file
  170. argf_binmode
  171. argf_skip
  172. argf_close_m
  173. argf_closed
  174. argf_to_s
  175. opt_i_get
  176. opt_i_set
  177. Init_IO
/**********************************************************************

  io.c -

  $Author: akr $
  $Date: 2005/12/19 17:11:20 $
  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

**********************************************************************/

#if defined(__VMS)
#define _XOPEN_SOURCE
#define _POSIX_C_SOURCE 2
#endif

#include "ruby.h"
#include "rubyio.h"
#include "rubysig.h"
#include "env.h"
#include <ctype.h>
#include <errno.h>

#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
#if !HAVE_FSEEKO && !defined(fseeko)
# define fseeko  fseek
#endif
#if !HAVE_FTELLO && !defined(ftello)
# define ftello  ftell
#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
#ifdef HAVE_SYSCALL_H
#include <syscall.h>
#elif defined HAVE_SYS_SYSCALL_H
#include <sys/syscall.h>
#endif

#include <unistd.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;

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 READ_DATA_PENDING(fp) ((fp)->_IO_read_ptr != (fp)->_IO_read_end)
#    define READ_DATA_PENDING_COUNT(fp) ((fp)->_IO_read_end - (fp)->_IO_read_ptr)
#    define READ_DATA_PENDING_PTR(fp) ((fp)->_IO_read_ptr)
#  else
#    define READ_DATA_PENDING(fp) ((fp)->_gptr < (fp)->_egptr)
#    define READ_DATA_PENDING_COUNT(fp) ((fp)->_egptr - (fp)->_gptr)
#    define READ_DATA_PENDING_PTR(fp) ((fp)->_gptr)
#  endif
#elif defined(FILE_COUNT)
#  define READ_DATA_PENDING(fp) ((fp)->FILE_COUNT > 0)
#  define READ_DATA_PENDING_COUNT(fp) ((fp)->FILE_COUNT)
#elif defined(FILE_READEND)
#  define READ_DATA_PENDING(fp) ((fp)->FILE_READPTR < (fp)->FILE_READEND)
#  define READ_DATA_PENDING_COUNT(fp) ((fp)->FILE_READEND - (fp)->FILE_READPTR)
#elif defined(__BEOS__)
#  define READ_DATA_PENDING(fp) (fp->_state._eof == 0)
#elif defined(__VMS)
#  define READ_DATA_PENDING_COUNT(fp) ((unsigned int)(*(fp))->_cnt)
#  define READ_DATA_PENDING(fp)       (((unsigned int)(*(fp))->_cnt) > 0)
#  define READ_DATA_BUFFERED(fp) 0
#else
/* requires systems own version of the ReadDataPending() */
extern int ReadDataPending();
#  define READ_DATA_PENDING(fp) (!feof(fp))
#  define READ_DATA_BUFFERED(fp) 0
#endif
#ifndef READ_DATA_BUFFERED
#  define READ_DATA_BUFFERED(fp) READ_DATA_PENDING(fp)
#endif

#ifndef READ_DATA_PENDING_PTR
# ifdef FILE_READPTR
#  define READ_DATA_PENDING_PTR(fp) ((char *)(fp)->FILE_READPTR)
# endif
#endif

#if defined __DJGPP__
# undef READ_DATA_PENDING_COUNT
# undef READ_DATA_PENDING_PTR
#endif

#define READ_CHECK(fp) do {\
    if (!READ_DATA_PENDING(fp)) {\
        rb_thread_wait_fd(fileno(fp));\
        rb_io_check_closed(fptr);\
     }\
} while(0)

void
rb_eof_error()
{
    rb_raise(rb_eEOFError, "end of file reached");
}

VALUE
rb_io_taint_check(io)
    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(fptr)
    OpenFile *fptr;
{
    if (!fptr) {
        rb_raise(rb_eIOError, "uninitialized stream");
    }
}

void
rb_io_check_closed(fptr)
    OpenFile *fptr;
{
    rb_io_check_initialized(fptr);
    if (!fptr->f && !fptr->f2) {
        rb_raise(rb_eIOError, "closed stream");
    }
}

static void io_fflush _((FILE *, OpenFile *));

static OpenFile *
flush_before_seek(fptr)
    OpenFile *fptr;
{
    if (fptr->mode & FMODE_WBUF) {
        io_fflush(GetWriteFile(fptr), fptr);
    }
    return fptr;
}

#define io_seek(fptr, ofs, whence) fseeko(flush_before_seek(fptr)->f, ofs, whence)
#define io_tell(fptr) ftello(flush_before_seek(fptr)->f)

#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(fptr)
    OpenFile *fptr;
{
    rb_io_check_closed(fptr);
    if (!(fptr->mode & FMODE_READABLE)) {
        rb_raise(rb_eIOError, "not opened for reading");
    }
#if NEED_IO_SEEK_BETWEEN_RW
    if (((fptr->mode & FMODE_WBUF) ||
         (fptr->mode & (FMODE_SYNCWRITE|FMODE_RBUF)) == FMODE_SYNCWRITE) &&
        !feof(fptr->f) &&
        !fptr->f2) {
        io_seek(fptr, 0, SEEK_CUR);
    }
#endif
    fptr->mode |= FMODE_RBUF;
}

void
rb_io_check_writable(fptr)
    OpenFile *fptr;
{
    rb_io_check_closed(fptr);
    if (!(fptr->mode & FMODE_WRITABLE)) {
        rb_raise(rb_eIOError, "not opened for writing");
    }
    if ((fptr->mode & FMODE_RBUF) && !feof(fptr->f) && !fptr->f2) {
        io_seek(fptr, 0, SEEK_CUR);
    }
    if (!fptr->f2) {
        fptr->mode &= ~FMODE_RBUF;
    }
}

int
rb_read_pending(fp)
    FILE *fp;
{
    return READ_DATA_PENDING(fp);
}

void
rb_read_check(fp)
    FILE *fp;
{
    if (!READ_DATA_PENDING(fp)) {
        rb_thread_wait_fd(fileno(fp));
    }
}

static int
ruby_dup(orig)
    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));
static VALUE
io_alloc(klass)
    VALUE klass;
{
    NEWOBJ(io, struct RFile);
    OBJSETUP(io, klass, T_FILE);

    io->fptr = 0;

    return (VALUE)io;
}

static void
io_fflush(f, fptr)
    FILE *f;
    OpenFile *fptr;
{
    int n;

    if (!rb_thread_fd_writable(fileno(f))) {
        rb_io_check_closed(fptr);
    }
    for (;;) {
        TRAP_BEG;
        n = fflush(f);
        TRAP_END;
        if (n != EOF) break;
        if (!rb_io_wait_writable(fileno(f)))
            rb_sys_fail(fptr->path);
    }
    fptr->mode &= ~FMODE_WBUF;
}

int
rb_io_wait_readable(f)
    int f;
{
    fd_set 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
        FD_ZERO(&rfds);
        FD_SET(f, &rfds);
        rb_thread_select(f + 1, &rfds, NULL, NULL, NULL);
        return Qtrue;

      default:
        return Qfalse;
    }
}

int
rb_io_wait_writable(f)
    int f;
{
    fd_set 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
        FD_ZERO(&wfds);
        FD_SET(f, &wfds);
        rb_thread_select(f + 1, NULL, &wfds, NULL, NULL);
        return Qtrue;

      default:
        return Qfalse;
    }
}

#ifndef S_ISREG
#   define S_ISREG(m) ((m & S_IFMT) == S_IFREG)
#endif

static int
wsplit_p(OpenFile *fptr)
{
    FILE *f = GetWriteFile(fptr);
    int r;
    if (!(fptr->mode & FMODE_WSPLIT_INITIALIZED)) {
        struct stat buf;
        if (fstat(fileno(f), &buf) == 0 &&
            !S_ISREG(buf.st_mode)
#if defined(HAVE_FCNTL) && defined(F_GETFL) && defined(O_NONBLOCK)
            && (r = fcntl(fileno(f), F_GETFL)) != -1 &&
            !(r & O_NONBLOCK)
#endif
            ) {
            fptr->mode |= FMODE_WSPLIT;
        }
        fptr->mode |= FMODE_WSPLIT_INITIALIZED;
    }
    return fptr->mode & FMODE_WSPLIT;
}

/* writing functions */
static long
io_fwrite(str, fptr)
    VALUE str;
    OpenFile *fptr;
{
    long len, n, r, l, offset = 0;
    FILE *f = GetWriteFile(fptr);

    len = RSTRING(str)->len;
    if ((n = len) <= 0) return n;
    if (fptr->mode & FMODE_SYNC) {
        io_fflush(f, fptr);
        if (!rb_thread_fd_writable(fileno(f))) {
            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(fileno(f), RSTRING(str)->ptr+offset, l);
        TRAP_END;
        if (r == n) return len;
        if (0 <= r) {
            offset += r;
            n -= r;
            errno = EAGAIN;
        }
        if (rb_io_wait_writable(fileno(f))) {
            rb_io_check_closed(fptr);
            if (offset < RSTRING(str)->len)
                goto retry;
        }
        return -1L;
    }
#if defined(__human68k__) || defined(__vms)
    do {
        if (fputc(RSTRING(str)->ptr[offset++], f) == EOF) {
            if (ferror(f)) return -1L;
            break;
        }
    } while (--n > 0);
#else
    while (errno = 0, offset += (r = fwrite(RSTRING(str)->ptr+offset, 1, n, f)), (n -= r) > 0) {
        if (ferror(f)
#if defined __BORLANDC__
            || errno
#endif
        ) {
#ifdef __hpux
            if (!errno) errno = EAGAIN;
#elif defined(_WIN32) && !defined(__BORLANDC__)
            /* workaround for MSVCRT's bug */
            if (!errno) {
                if (GetLastError() == ERROR_NO_DATA)
                    errno = EPIPE;
                else
                    errno = EBADF;
            }
#endif
            if (rb_io_wait_writable(fileno(f))) {
                rb_io_check_closed(fptr);
                clearerr(f);
                if (offset < RSTRING(str)->len)
                    continue;
            }
            return -1L;
        }
    }
#endif
    return len - n;
}

long
rb_io_fwrite(ptr, len, f)
    const char *ptr;
    long len;
    FILE *f;
{
    OpenFile of;

    of.f = f;
    of.f2 = NULL;
    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(io, str)
    VALUE io, str;
{
    OpenFile *fptr;
    long n;

    rb_secure(4);
    if (TYPE(str) != T_STRING)
        str = rb_obj_as_string(str);

    if (TYPE(io) != T_FILE) {
        /* port is not IO, call write method for it. */
        return rb_funcall(io, id_write, 1, str);
    }
    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);
    if (!(fptr->mode & FMODE_SYNC)) {
        fptr->mode |= FMODE_WBUF;
    }

    return LONG2FIX(n);
}

VALUE
rb_io_write(io, str)
    VALUE io, 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(io, str)
    VALUE io, 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
 */

static VALUE
rb_io_flush(io)
    VALUE io;
{
    OpenFile *fptr;
    FILE *f;

    GetOpenFile(io, fptr);
    rb_io_check_writable(fptr);
    f = GetWriteFile(fptr);

    io_fflush(f, 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(io)
     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(io, offset, whence)
    VALUE io, 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);
    clearerr(fptr->f);

    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(argc, argv, io)
    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(io, offset)
     VALUE io, 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);
    clearerr(fptr->f);

    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(io)
    VALUE io;
{
    OpenFile *fptr;

    GetOpenFile(io, fptr);
    if (io_seek(fptr, 0L, 0) != 0) rb_sys_fail(fptr->path);
    clearerr(fptr->f);
    if (io == current_file) {
        gets_lineno -= fptr->lineno;
    }
    fptr->lineno = 0;

    return INT2FIX(0);
}

/*
 *  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(io)
    VALUE io;
{
    OpenFile *fptr;
    int ch;

    GetOpenFile(io, fptr);
    rb_io_check_readable(fptr);

    if (feof(fptr->f)) return Qtrue;
    if (READ_DATA_PENDING(fptr->f)) return Qfalse;
    READ_CHECK(fptr->f);
    clearerr(fptr->f);
    TRAP_BEG;
    ch = getc(fptr->f);
    TRAP_END;

    if (ch != EOF) {
        ungetc(ch, fptr->f);
        return Qfalse;
    }
    rb_io_check_closed(fptr);
    clearerr(fptr->f);
    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(io)
    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(io, mode)
    VALUE io, 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(io)
    VALUE io;
{
#ifdef HAVE_FSYNC
    OpenFile *fptr;
    FILE *f;

    GetOpenFile(io, fptr);
    f = GetWriteFile(fptr);

    io_fflush(f, fptr);
    if (fsync(fileno(f)) < 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(io)
    VALUE io;
{
    OpenFile *fptr;
    int fd;

    GetOpenFile(io, fptr);
    fd = fileno(fptr->f);
    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(io)
    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(obj)
    VALUE obj;
{
    OpenFile *fptr;
    char *buf, *cname, *st = "";
    long len;

    fptr = RFILE(rb_io_taint_check(obj))->fptr;
    if (!fptr || !fptr->path) return rb_any_to_s(obj);
    cname = rb_obj_classname(obj);
    len = strlen(cname) + strlen(fptr->path) + 5;
    if (!(fptr->f || fptr->f2)) {
        st = " (closed)";
        len += 9;
    }
    buf = ALLOCA_N(char, len);
    snprintf(buf, len, "#<%s:%s%s>", cname, fptr->path, st);
    return rb_str_new2(buf);
}

/*
 *  call-seq:
 *     ios.to_io -> ios
 *
 *  Returns <em>ios</em>.
 */

static VALUE
rb_io_to_io(io)
    VALUE io;
{
    return io;
}

/* reading functions */
static long
read_buffered_data(ptr, len, f)
    char *ptr;
    long len;
    FILE *f;
{
    long n;

#ifdef READ_DATA_PENDING_COUNT
    n = READ_DATA_PENDING_COUNT(f);
    if (n <= 0) return 0;
    if (n > len) n = len;
    return fread(ptr, 1, n, f);
#else
    int c;

    for (n = 0; n < len && READ_DATA_PENDING(f) && (c = getc(f)) != EOF; ++n) {
        *ptr++ = c;
    }
    return n;
#endif
}

long
io_fread(ptr, len, fptr)
    char *ptr;
    long len;
    OpenFile *fptr;
{
    long n = len;
    int c;
    int saved_errno;

    while (n > 0) {
        c = read_buffered_data(ptr, n, fptr->f);
        if (c < 0) goto eof;
        if (c > 0) {
            ptr += c;
            if ((n -= c) <= 0) break;
        }
        rb_thread_wait_fd(fileno(fptr->f));
        rb_io_check_closed(fptr);
        clearerr(fptr->f);
        TRAP_BEG;
        c = getc(fptr->f);
        TRAP_END;
        if (c == EOF) {
          eof:
            if (ferror(fptr->f)) {
                switch (errno) {
                  case EINTR:
#if defined(ERESTART)
                  case ERESTART:
#endif
                    clearerr(fptr->f);
                    continue;
                  case EAGAIN:
#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
                  case EWOULDBLOCK:
#endif
                    if (len > n) {
                        clearerr(fptr->f);
                    }
                    saved_errno = errno;
                    rb_warning("nonblocking IO#read is obsolete; use IO#readpartial or IO#sysread");
                    errno = saved_errno;
                }
                if (len == n) return 0;
            }
            break;
        }
        *ptr++ = c;
        n--;
    }
    return len - n;
}

long
rb_io_fread(ptr, len, f)
    char *ptr;
    long len;
    FILE *f;
{
    OpenFile of;

    of.f = f;
    of.f2 = NULL;
    return io_fread(ptr, len, &of);
}

#define SMALLBUF 100

static long
remain_size(fptr)
    OpenFile *fptr;
{
    struct stat st;
    off_t siz = BUFSIZ;
    off_t pos;

    if (feof(fptr->f)) return 0;
    if (fstat(fileno(fptr->f), &st) == 0  && S_ISREG(st.st_mode)
#ifdef __BEOS__
        && (st.st_dev > 3)
#endif
        )
    {
        pos = io_tell(fptr);
        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");
            }
        }
    }
    return (long)siz;
}

static VALUE
read_all(fptr, siz, str)
    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 (;;) {
        rb_str_locktmp(str);
        READ_CHECK(fptr->f);
        n = io_fread(RSTRING(str)->ptr+bytes, siz-bytes, fptr);
        rb_str_unlocktmp(str);
        if (n == 0 && bytes == 0) {
            if (!fptr->f) break;
            if (feof(fptr->f)) break;
            if (!ferror(fptr->f)) break;
            rb_sys_fail(fptr->path);
        }
        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->f);
    if (RSTRING(str)->len != len) {
      modified:
        rb_raise(rb_eRuntimeError, "buffer string modified");
    }
    n = read_buffered_data(RSTRING(str)->ptr, len, fptr->f);
    if (n <= 0) {
      again:
        if (RSTRING(str)->len != len) goto modified;
        TRAP_BEG;
        n = read(fileno(fptr->f), RSTRING(str)->ptr, len);
        TRAP_END;
        if (n < 0) {
            if (rb_io_wait_readable(fileno(fptr->f)))
                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.
 *
 *     f = File.new("testfile")
 *     f.read(16)   #=> "This is line one"
 */

static VALUE
io_read(argc, argv, io)
    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 (feof(fptr->f)) return Qnil;
    if (len == 0) return str;

    rb_str_locktmp(str);
    READ_CHECK(fptr->f);
    if (RSTRING(str)->len != len) {
        rb_raise(rb_eRuntimeError, "buffer string modified");
    }
    n = io_fread(RSTRING(str)->ptr, len, fptr);
    rb_str_unlocktmp(str);
    if (n == 0) {
        if (!fptr->f) return Qnil;
        if (feof(fptr->f)) {
            rb_str_resize(str, 0);
            return Qnil;
        }
        if (len > 0) rb_sys_fail(fptr->path);
    }
    rb_str_resize(str, n);
    RSTRING(str)->len = n;
    RSTRING(str)->ptr[n] = '\0';
    OBJ_TAINT(str);

    return str;
}

static int
appendline(fptr, delim, strp)
    OpenFile *fptr;
    int delim;
    VALUE *strp;
{
    FILE *f = fptr->f;
    VALUE str = *strp;
    int c = EOF;
#ifndef READ_DATA_PENDING_PTR
    char buf[8192];
    char *bp = buf, *bpe = buf + sizeof buf - 3;
    int update = Qfalse;
#endif

    do {
#ifdef READ_DATA_PENDING_PTR
        long pending = READ_DATA_PENDING_COUNT(f);
        if (pending > 0) {
            const char *p = READ_DATA_PENDING_PTR(f);
            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;
            }
            fread(RSTRING(str)->ptr + last, 1, pending, f); /* 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(fileno(f));
        rb_io_check_closed(fptr);
#else
        READ_CHECK(f);
#endif
        clearerr(f);
        TRAP_BEG;
        c = getc(f);
        TRAP_END;
        if (c == EOF) {
            if (ferror(f)) {
                clearerr(f);
                if (!rb_io_wait_readable(fileno(f)))
                    rb_sys_fail(fptr->path);
                continue;
            }
#ifdef READ_DATA_PENDING_PTR
            return c;
#endif
        }
#ifndef READ_DATA_PENDING_PTR
        if (c == EOF || (*bp++ = c) == delim || bp == bpe) {
            int cnt = bp - buf;

            if (cnt > 0) {
                if (!NIL_P(str))
                    rb_str_cat(str, buf, cnt);
                else
                    *strp = str = rb_str_new(buf, cnt);
            }
            if (c == EOF) {
                if (update)
                    return (int)RSTRING(str)->ptr[RSTRING(str)->len-1];
                return c;
            }
            bp = buf;
        }
        update = Qtrue;
#endif
    } while (c != delim);

#ifdef READ_DATA_PENDING_PTR
    {
        char ch = c;
        if (!NIL_P(str)) {
            rb_str_cat(str, &ch, 1);
        }
        else {
            *strp = str = rb_str_new(&ch, 1);
        }
    }
#endif

    return c;
}

static inline int
swallow(fptr, term)
    OpenFile *fptr;
    int term;
{
    FILE *f = fptr->f;
    int c;

    do {
#ifdef READ_DATA_PENDING_PTR
        long cnt;
        while ((cnt = READ_DATA_PENDING_COUNT(f)) > 0) {
            char buf[1024];
            const char *p = READ_DATA_PENDING_PTR(f);
            int i;
            if (cnt > sizeof buf) cnt = sizeof buf;
            if (*p != term) return Qtrue;
            i = cnt;
            while (--i && *++p == term);
            if (!fread(buf, 1, cnt - i, f)) /* must not fail */
                rb_sys_fail(fptr->path);
        }
        rb_thread_wait_fd(fileno(f));
        rb_io_check_closed(fptr);
#else
        READ_CHECK(f);
#endif
        clearerr(f);
        TRAP_BEG;
        c = getc(f);
        TRAP_END;
        if (c != term) {
            ungetc(c, f);
            return Qtrue;
        }
    } while (c != EOF);
    return Qfalse;
}

static VALUE
rb_io_getline_fast(fptr, delim)
    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(rsptr, rslen, rs)
    char *rsptr;
    long rslen;
    VALUE rs;
{
    if (RSTRING(rs)->ptr != rsptr && RSTRING(rs)->len != rslen)
        rb_raise(rb_eRuntimeError, "rs modified");
    return 1;
}

static VALUE rb_io_getline(VALUE rs, VALUE io);

static VALUE
rb_io_getline(rs, io)
    VALUE rs, 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 &&
               (c != newline || RSTRING(str)->len < rslen ||
                (rspara || rscheck(rsptr,rslen,rs), 0) ||
                memcmp(RSTRING(str)->ptr+RSTRING(str)->len-rslen,rsptr,rslen)));

        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(io)
    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(argc, argv, io)
    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(io)
    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(io, lineno)
    VALUE io, lineno;
{
    OpenFile *fptr;

    GetOpenFile(io, fptr);
    rb_io_check_readable(fptr);
    fptr->lineno = NUM2INT(lineno);
    return lineno;
}

static void
lineno_setter(val, id, var)
    VALUE val;
    ID id;
    VALUE *var;
{
    gets_lineno = NUM2INT(val);
    *var = INT2FIX(gets_lineno);
}

static VALUE
argf_set_lineno(argf, val)
    VALUE argf, val;
{
    gets_lineno = NUM2INT(val);
    lineno = INT2FIX(gets_lineno);
    return Qnil;
}

static VALUE
argf_lineno()
{
    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(argc, argv, io)
    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(argc, argv, io)
    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(argc, argv, io)
    int argc;
    VALUE *argv;
    VALUE io;
{
    VALUE str;
    VALUE rs;

    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 }  => nil
 *
 *  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(io)
    VALUE io;
{
    OpenFile *fptr;
    FILE *f;
    int c;

    GetOpenFile(io, fptr);

    for (;;) {
        rb_io_check_readable(fptr);
        f = fptr->f;
        READ_CHECK(f);
        clearerr(f);
        TRAP_BEG;
        c = getc(f);
        TRAP_END;
        if (c == EOF) {
            if (ferror(f)) {
                clearerr(f);
                if (!rb_io_wait_readable(fileno(f)))
                    rb_sys_fail(fptr->path);
                continue;
            }
            break;
        }
        rb_yield(INT2FIX(c & 0xff));
    }
    if (ferror(f)) rb_sys_fail(fptr->path);
    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(io)
    VALUE io;
{
    OpenFile *fptr;
    FILE *f;
    int c;

    GetOpenFile(io, fptr);
    rb_io_check_readable(fptr);
    f = fptr->f;

  retry:
    READ_CHECK(f);
    clearerr(f);
    TRAP_BEG;
    c = getc(f);
    TRAP_END;

    if (c == EOF) {
        if (ferror(f)) {
            clearerr(f);
            if (!rb_io_wait_readable(fileno(f)))
                rb_sys_fail(fptr->path);
            goto retry;
        }
        return Qnil;
    }
    return INT2FIX(c & 0xff);
}

int
rb_getc(f)
    FILE *f;
{
    int c;

    if (!READ_DATA_PENDING(f)) {
        rb_thread_wait_fd(fileno(f));
    }
    clearerr(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(io)
    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(io, c)
    VALUE io, c;
{
    OpenFile *fptr;
    int cc = NUM2INT(c);

    GetOpenFile(io, fptr);
    if (!(fptr->mode & FMODE_RBUF))
        rb_raise(rb_eIOError, "unread stream");
    rb_io_check_readable(fptr);

    if (ungetc(cc, fptr->f) == 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(io)
    VALUE io;
{
    OpenFile *fptr;

    GetOpenFile(io, fptr);
    if (isatty(fileno(fptr->f)) == 0)
        return Qfalse;
    return Qtrue;
}

static void
fptr_finalize(fptr, noraise)
    OpenFile *fptr;
    int noraise;
{
    int n1 = 0, n2 = 0, f1, f2 = -1;

    if (fptr->f2) {
        f2 = fileno(fptr->f2);
        while (n2 = 0, fflush(fptr->f2) < 0) {
            n2 = errno;
            if (!rb_io_wait_writable(f2)) {
                break;
            }
            if (!fptr->f2) break;
        }
        if (fclose(fptr->f2) < 0 && n2 == 0) {
            n2 = errno;
        }
        fptr->f2 = 0;
    }
    if (fptr->f) {
        f1 = fileno(fptr->f);
        if ((f2 == -1) && (fptr->mode & FMODE_WBUF)) {
            while (n1 = 0, fflush(fptr->f) < 0) {
                n1 = errno;
                if (!rb_io_wait_writable(f1)) break;
                if (!fptr->f) break;
            }
        }
        if (fclose(fptr->f) < 0 && n1 == 0) {
            n1 = errno;
        }
        fptr->f = 0;
        if (n1 == EBADF && f1 == f2) {
            n1 = 0;
        }
    }
    if (!noraise && (n1 || n2)) {
        errno = (n1 ? n1 : n2);
        rb_sys_fail(fptr->path);
    }
}

static void
rb_io_fptr_cleanup(fptr, noraise)
    OpenFile *fptr;
    int noraise;
{
    if (fptr->finalize) {
        (*fptr->finalize)(fptr, noraise);
    }
    else {
        fptr_finalize(fptr, noraise);
    }
}

void
rb_io_fptr_finalize(fptr)
    OpenFile *fptr;
{
    if (!fptr) return;
    if (fptr->path) {
        free(fptr->path);
    }
    if (!fptr->f && !fptr->f2) return;
    if (fileno(fptr->f) < 3) return;

    rb_io_fptr_cleanup(fptr, Qtrue);
}

VALUE
rb_io_close(io)
    VALUE io;
{
    OpenFile *fptr;
    int fd, fd2;

    fptr = RFILE(io)->fptr;
    if (!fptr) return Qnil;
    if (fptr->f2) {
        fd2 = fileno(fptr->f2);
    }
    else {
        if (!fptr->f) return Qnil;
        fd2 = -1;
    }

    fd = fileno(fptr->f);
    rb_io_fptr_cleanup(fptr, Qfalse);
    rb_thread_fd_close(fd);
    if (fd2 >= 0) rb_thread_fd_close(fd2);

    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(io)
    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(io)
    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(io)
    VALUE io;
{
    OpenFile *fptr;

    fptr = RFILE(io)->fptr;
    rb_io_check_initialized(fptr);
    return (fptr->f || fptr->f2)?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(io)
    VALUE io;
{
    OpenFile *fptr;
    int n;

    if (rb_safe_level() >= 4 && !OBJ_TAINTED(io)) {
        rb_raise(rb_eSecurityError, "Insecure: can't close");
    }
    GetOpenFile(io, fptr);
    if (fptr->f2 == 0 && (fptr->mode & FMODE_WRITABLE)) {
        rb_raise(rb_eIOError, "closing non-duplex IO for reading");
    }
    if (fptr->f2 == 0) {
        return rb_io_close(io);
    }
    n = fclose(fptr->f);
    fptr->mode &= ~FMODE_READABLE;
    fptr->f = fptr->f2;
    fptr->f2 = 0;
    if (n != 0) rb_sys_fail(fptr->path);

    return Qnil;
}

/*
 *  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(io)
    VALUE io;
{
    OpenFile *fptr;
    int n;

    if (rb_safe_level() >= 4 && !OBJ_TAINTED(io)) {
        rb_raise(rb_eSecurityError, "Insecure: can't close");
    }
    GetOpenFile(io, fptr);
    if (fptr->f2 == 0 && (fptr->mode & FMODE_READABLE)) {
        rb_raise(rb_eIOError, "closing non-duplex IO for writing");
    }
    if (fptr->f2 == 0) {
        return rb_io_close(io);
    }
    n = fclose(fptr->f2);
    fptr->f2 = 0;
    fptr->mode &= ~FMODE_WRITABLE;
    if (n != 0) rb_sys_fail(fptr->path);

    return Qnil;
}

/*
 *  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(argc, argv, io)
    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->f)) {
        rb_raise(rb_eIOError, "sysseek for buffered IO");
    }
    if ((fptr->mode & FMODE_WRITABLE) && (fptr->mode & FMODE_WBUF)) {
        rb_warn("sysseek for buffered IO");
    }
    pos = lseek(fileno(fptr->f), pos, whence);
    if (pos == -1) rb_sys_fail(fptr->path);
    clearerr(fptr->f);

    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(io, str)
    VALUE io, str;
{
    OpenFile *fptr;
    FILE *f;
    long n;

    rb_secure(4);
    if (TYPE(str) != T_STRING)
        str = rb_obj_as_string(str);

    GetOpenFile(io, fptr);
    rb_io_check_writable(fptr);
    f = GetWriteFile(fptr);

    if (fptr->mode & FMODE_WBUF) {
        rb_warn("syswrite for buffered IO");
    }
    if (!rb_thread_fd_writable(fileno(f))) {
        rb_io_check_closed(fptr);
    }
    TRAP_BEG;
    n = write(fileno(f), RSTRING(str)->ptr, RSTRING(str)->len);
    TRAP_END;

    if (n == -1) rb_sys_fail(fptr->path);

    return LONG2FIX(n);
}

/*
 *  call-seq:
 *     ios.sysread(integer )    => 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.
 *  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(argc, argv, io)
    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->f)) {
        rb_raise(rb_eIOError, "sysread for buffered IO");
    }
    rb_str_locktmp(str);

    n = fileno(fptr->f);
    rb_thread_wait_fd(fileno(fptr->f));
    rb_io_check_closed(fptr);
    if (RSTRING(str)->len != ilen) {
        rb_raise(rb_eRuntimeError, "buffer string modified");
    }
    TRAP_BEG;
    n = read(fileno(fptr->f), RSTRING(str)->ptr, ilen);
    TRAP_END;

    rb_str_unlocktmp(str);
    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(io)
    VALUE io;
{
#if defined(_WIN32) || defined(DJGPP) || defined(__CYGWIN__) || defined(__human68k__) || defined(__EMX__)
    OpenFile *fptr;

    GetOpenFile(io, fptr);
#ifdef __human68k__
    if (fptr->f)
        fmode(fptr->f, _IOBIN);
    if (fptr->f2)
        fmode(fptr->f2, _IOBIN);
#else
    if (fptr->f && setmode(fileno(fptr->f), O_BINARY) == -1)
        rb_sys_fail(fptr->path);
    if (fptr->f2 && setmode(fileno(fptr->f2), O_BINARY) == -1)
        rb_sys_fail(fptr->path);
#endif

    fptr->mode |= FMODE_BINMODE;
#endif
    return io;
}

char*
rb_io_flags_mode(flags)
    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(mode)
    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(mode)
    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(mode)
    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(flags)
    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(fname, flags, mode)
    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(fname, mode)
    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__
    fmode(file, _IOTEXT);
#endif
    return file;
}

FILE *
rb_fdopen(fd, mode)
    int fd;
    const char *mode;
{
    FILE *file;

#if defined(sun)
    errno = 0;
#endif
    file = fdopen(fd, mode);
    if (!file) {
#if defined(sun)
        if (errno == 0 || errno == EMFILE || errno == ENFILE) {
#else
        if (errno == EMFILE || errno == ENFILE) {
#endif
            rb_gc();
#if defined(sun)
            errno = 0;
#endif
            file = fdopen(fd, mode);
        }
        if (!file) {
#ifdef _WIN32
            if (errno == 0) errno = EINVAL;
#endif
#if defined(sun)
            if (errno == 0) errno = EMFILE;
#endif
            rb_sys_fail(0);
        }
    }

#ifdef USE_SETVBUF
    if (setvbuf(file, NULL, _IOFBF, 0) != 0)
        rb_warn("setvbuf() can't be honoured (fd=%d)", fd);
#endif
    return file;
}

static VALUE
rb_file_open_internal(io, fname, mode)
    VALUE io;
    const char *fname, *mode;
{
    OpenFile *fptr;

    MakeOpenFile(io, fptr);

    fptr->mode = rb_io_mode_flags(mode);
    fptr->path = strdup(fname);
    fptr->f = rb_fopen(fptr->path, rb_io_flags_mode(fptr->mode));

    return io;
}

VALUE
rb_file_open(fname, mode)
    const char *fname, *mode;
{
    return rb_file_open_internal(io_alloc(rb_cFile), fname, mode);
}

static VALUE
rb_file_sysopen_internal(io, fname, flags, mode)
    VALUE io;
    char *fname;
    int flags, mode;
{
    OpenFile *fptr;
    int fd;
    char *m;

    MakeOpenFile(io, fptr);

    fptr->path = strdup(fname);
    m = rb_io_modenum_mode(flags);
    fptr->mode = rb_io_modenum_flags(flags);
    fd = rb_sysopen(fptr->path, flags, mode);
    fptr->f = rb_fdopen(fd, m);

    return io;
}

VALUE
rb_file_sysopen(fname, flags, mode)
    const char *fname;
    int flags, mode;
{
    return rb_file_sysopen_internal(io_alloc(rb_cFile), fname, flags, mode);
}

#if defined (_WIN32) || defined(DJGPP) || defined(__CYGWIN__) || defined(__human68k__) || defined(__VMS)
static struct pipe_list {
    OpenFile *fptr;
    struct pipe_list *next;
} *pipe_list;

static void
pipe_add_fptr(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(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));

static void
pipe_finalize(fptr, noraise)
    OpenFile *fptr;
    int noraise;
{
#if !defined (__CYGWIN__) && !defined(_WIN32)
    extern VALUE rb_last_status;
    int status;
    if (fptr->f) {
        status = pclose(fptr->f);
    }
    if (fptr->f2) {
        status = pclose(fptr->f2);
    }
    fptr->f = fptr->f2 = 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(fptr)
    OpenFile *fptr;
{
    fptr->mode |= FMODE_SYNC;
}

void
rb_io_unbuffered(fptr)
    OpenFile *fptr;
{
    rb_io_synchronized(fptr);
}

static VALUE pipe_open(VALUE pstr, char *pname, char *mode);

static VALUE
pipe_open(pstr, pname, mode)
    VALUE pstr;
    char *pname, *mode;
{
    int modef = rb_io_mode_flags(mode);
    OpenFile *fptr;

#if defined(DJGPP) || defined(__human68k__) || defined(__VMS)
    FILE *f;

    if (!pname) pname = StringValuePtr(pstr);
    f = popen(pname, mode);

    if (!f) rb_sys_fail(pname);
    else {
        VALUE port = io_alloc(rb_cIO);

        MakeOpenFile(port, fptr);
        fptr->finalize = pipe_finalize;
        fptr->mode = modef;

        pipe_add_fptr(fptr);
        if (modef & FMODE_READABLE) fptr->f  = f;
        if (modef & FMODE_WRITABLE) {
            if (fptr->f) fptr->f2 = f;
            else fptr->f = f;
            rb_io_synchronized(fptr);
        }
        return (VALUE)port;
    }
#else
#ifdef _WIN32
    int pid;
    FILE *fpr, *fpw;

    if (!pname) pname = StringValuePtr(pstr);

retry:
    pid = pipe_exec(pname, rb_io_mode_modenum(mode), &fpr, &fpw);
    if (pid == -1) {            /* exec failed */
        if (errno == EAGAIN) {
            rb_thread_sleep(1);
            goto retry;
        }
        rb_sys_fail(pname);
    }
    else {
        VALUE port = io_alloc(rb_cIO);

        MakeOpenFile(port, fptr);
        fptr->mode = modef;
        fptr->mode |= FMODE_SYNC;
        fptr->pid = pid;

        if (modef & FMODE_READABLE) {
            fptr->f = fpr;
        }
        if (modef & FMODE_WRITABLE) {
            if (fptr->f) fptr->f2 = fpw;
            else fptr->f = fpw;
        }
        fptr->finalize = pipe_finalize;
        pipe_add_fptr(fptr);
        return (VALUE)port;
    }
#else
    int pid, pr[2], pw[2];
    volatile int doexec;

    if (!pname) pname = StringValuePtr(pstr);

    if (((modef & FMODE_READABLE) && pipe(pr) == -1) ||
        ((modef & FMODE_WRITABLE) && pipe(pw) == -1))
        rb_sys_fail(pname);

    doexec = (strcmp("-", pname) != 0);
    if (!doexec) {
        fflush(stdin);          /* is it really needed? */
        fflush(stdout);
        fflush(stderr);
    }

  retry:
    switch ((pid = fork())) {
      case 0:                   /* child */
        if (modef & FMODE_READABLE) {
            close(pr[0]);
            if (pr[1] != 1) {
                dup2(pr[1], 1);
                close(pr[1]);
            }
        }
        if (modef & FMODE_WRITABLE) {
            close(pw[1]);
            if (pw[0] != 0) {
                dup2(pw[0], 0);
                close(pw[0]);
            }
        }

        if (doexec) {
            int fd;

            for (fd = 3; fd < NOFILE; fd++)
                close(fd);
            rb_proc_exec(pname);
            fprintf(stderr, "%s:%d: command not found: %s\n",
                    ruby_sourcefile, ruby_sourceline, pname);
            _exit(127);
        }
        rb_io_synchronized(RFILE(orig_stdout)->fptr);
        rb_io_synchronized(RFILE(orig_stderr)->fptr);
        return Qnil;

      case -1:                  /* fork failed */
        if (errno == EAGAIN) {
            rb_thread_sleep(1);
            goto retry;
        }
        close(pr[0]); close(pw[1]);
        rb_sys_fail(pname);
        break;

      default:                  /* parent */
        if (pid < 0) rb_sys_fail(pname);
        else {
            VALUE port = io_alloc(rb_cIO);

            MakeOpenFile(port, fptr);
            fptr->mode = modef;
            fptr->mode |= FMODE_SYNC;
            fptr->pid = pid;

            if (modef & FMODE_READABLE) {
                close(pr[1]);
                fptr->f  = rb_fdopen(pr[0], "r");
            }
            if (modef & FMODE_WRITABLE) {
                FILE *f = rb_fdopen(pw[1], "w");

                close(pw[0]);
                if (fptr->f) fptr->f2 = f;
                else fptr->f = f;
            }
#if defined (__CYGWIN__)
            fptr->finalize = pipe_finalize;
            pipe_add_fptr(fptr);
#endif
            return port;
        }
    }
#endif
#endif
}

/*
 *  call-seq:
 *     IO.popen(cmd_string, mode="r" )               => io
 *     IO.popen(cmd_string, mode="r" ) {|io| block } => obj
 *
 *  Runs the specified command string as a subprocess; the subprocess's
 *  standard input and output will be connected to the returned
 *  <code>IO</code> object. If <i>cmd_string</i> starts with a
 *  ``<code>-</code>'', then a new instance of Ruby is started as the
 *  subprocess. 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.
 *
 *  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 <i>cmd_string</i> 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}"}
 *
 *  <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>
 */

static VALUE
rb_io_s_popen(argc, argv, klass)
    int argc;
    VALUE *argv;
    VALUE klass;
{
    char *mode;
    VALUE pname, pmode, port;

    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)));
    }
    SafeStringValue(pname);
    port = pipe_open(pname, 0, mode);
    if (NIL_P(port)) {
        /* child */
        if (rb_block_given_p()) {
            rb_yield(Qnil);
            fflush(stdout);
            fflush(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(argc, argv, io)
    int argc;
    VALUE *argv;
    VALUE io;
{
    VALUE fname, vmode, perm;
    char *mode;
    int flags, fmode;

    rb_scan_args(argc, argv, "12", &fname, &vmode, &perm);
    SafeStringValue(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(argc, argv, klass)
    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(argc, argv)
    int argc;
    VALUE *argv;
{
    VALUE fname, vmode, perm;
    int flags, fmode, fd;
    char *path;

    rb_scan_args(argc, argv, "12", &fname, &vmode, &perm);
    SafeStringValue(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(argc, argv)
    int argc;
    VALUE *argv;
{
    if (argc >= 1) {
        char *str = StringValuePtr(argv[0]);

        if (str[0] == '|') {
            VALUE tmp = rb_str_new(str+1, RSTRING(argv[0])->len-1);
            OBJ_INFECT(tmp, argv[0]);
            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(fname, mode)
    char *fname, *mode;
{
    if (fname[0] == '|') {
        return pipe_open(0, fname+1, mode);
    }
    else {
        return rb_file_open(fname, mode);
    }
}

static VALUE
rb_io_get_io(io)
    VALUE io;
{
    return rb_convert_type(io, T_FILE, "IO", "to_io");
}

static VALUE
rb_io_check_io(io)
    VALUE io;
{
    return rb_check_convert_type(io, T_FILE, "IO", "to_io");
}

static char*
rb_io_mode_string(fptr)
    OpenFile *fptr;
{
    switch (fptr->mode & FMODE_READWRITE) {
      case FMODE_READABLE:
      default:
        return "r";
      case FMODE_WRITABLE:
        return "w";
      case FMODE_READWRITE:
        return "r+";
    }
}

static VALUE
io_reopen(io, nfile)
    VALUE io, nfile;
{
    OpenFile *fptr, *orig;
    char *mode;
    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 (orig->mode & FMODE_READABLE) {
        pos = io_tell(orig);
    }
    if (orig->f2) {
        io_fflush(orig->f2, orig);
    }
    else if (orig->mode & FMODE_WRITABLE) {
        io_fflush(orig->f, orig);
    }
    if (fptr->mode & FMODE_WRITABLE) {
        io_fflush(GetWriteFile(fptr), 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;

    mode = rb_io_mode_string(fptr);
    fd = fileno(fptr->f);
    fd2 = fileno(orig->f);
    if (fd != fd2) {
        if (fptr->f == stdin || fptr->f == stdout || fptr->f == stderr) {
            clearerr(fptr->f);
            /* need to keep stdio objects */
            if (dup2(fd2, fd) < 0)
                rb_sys_fail(orig->path);
        }
        else {
            FILE *f2 = fptr->f2;
            int m = fptr->mode;
            fclose(fptr->f);
            fptr->f = f2;
            fptr->f2 = NULL;
            fptr->mode &= (m & FMODE_READABLE) ? ~FMODE_READABLE : ~FMODE_WRITABLE;
            if (dup2(fd2, fd) < 0)
                rb_sys_fail(orig->path);
            if (f2) {
                fptr->f = rb_fdopen(fd, "r");
                fptr->f2 = f2;
            }
            else {
                fptr->f = rb_fdopen(fd, mode);
            }
            fptr->mode = m;
        }
        rb_thread_fd_close(fd);
        if ((orig->mode & FMODE_READABLE) && pos >= 0) {
            io_seek(fptr, pos, SEEK_SET);
            io_seek(orig, pos, SEEK_SET);
        }
    }

    if (fptr->f2 && fd != fileno(fptr->f2)) {
        fd = fileno(fptr->f2);
        if (!orig->f2) {
            fclose(fptr->f2);
            rb_thread_fd_close(fd);
            fptr->f2 = 0;
        }
        else if (fd != (fd2 = fileno(orig->f2))) {
            fclose(fptr->f2);
            rb_thread_fd_close(fd);
            if (dup2(fd2, fd) < 0)
                rb_sys_fail(orig->path);
            fptr->f2 = rb_fdopen(fd, "w");
        }
    }

    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(argc, argv, file)
    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);
        }
    }

    SafeStringValue(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)) {
        fptr->mode = rb_io_mode_flags(StringValuePtr(nmode));
    }

    if (fptr->path) {
        free(fptr->path);
        fptr->path = 0;
    }

    fptr->path = strdup(RSTRING(fname)->ptr);
    mode = rb_io_flags_mode(fptr->mode);
    if (!fptr->f) {
        fptr->f = rb_fopen(fptr->path, mode);
        if (fptr->f2) {
            fclose(fptr->f2);
            fptr->f2 = 0;
        }
        return file;
    }

    if (freopen(RSTRING(fname)->ptr, mode, fptr->f) == 0) {
        rb_sys_fail(fptr->path);
    }
#ifdef USE_SETVBUF
    if (setvbuf(fptr->f, NULL, _IOFBF, 0) != 0)
        rb_warn("setvbuf() can't be honoured for %s", RSTRING(fname)->ptr);
#endif

    if (fptr->f2) {
        if (freopen(RSTRING(fname)->ptr, "w", fptr->f2) == 0) {
            rb_sys_fail(fptr->path);
        }
    }

    return file;
}

/* :nodoc: */
static VALUE
rb_io_init_copy(dest, io)
    VALUE dest, io;
{
    OpenFile *fptr, *orig;
    int fd;
    char *mode;

    io = rb_io_get_io(io);
    if (dest == io) return dest;
    GetOpenFile(io, orig);
    MakeOpenFile(dest, fptr);

    if (orig->f2) {
        io_fflush(orig->f2, orig);
        fseeko(orig->f, 0L, SEEK_CUR);
    }
    else if (orig->mode & FMODE_WRITABLE) {
        io_fflush(orig->f, orig);
    }
    else {
        fseeko(orig->f, 0L, SEEK_CUR);
    }

    /* copy OpenFile structure */
    fptr->mode = orig->mode;
    fptr->pid = orig->pid;
    fptr->lineno = orig->lineno;
    if (orig->path) fptr->path = strdup(orig->path);
    fptr->finalize = orig->finalize;

    switch (fptr->mode & FMODE_READWRITE) {
      case FMODE_READABLE:
      default:
        mode = "r"; break;
      case FMODE_WRITABLE:
        mode = "w"; break;
      case FMODE_READWRITE:
        if (orig->f2) mode = "r";
        else          mode = "r+";
        break;
    }
    fd = ruby_dup(fileno(orig->f));
    fptr->f = rb_fdopen(fd, mode);
    fseeko(fptr->f, ftello(orig->f), SEEK_SET);
    if (orig->f2) {
        if (fileno(orig->f) != fileno(orig->f2)) {
            fd = ruby_dup(fileno(orig->f2));
        }
        fptr->f2 = rb_fdopen(fd, "w");
        fseeko(fptr->f2, ftello(orig->f2), 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(argc, argv, out)
    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(argc, argv)
    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(argc, argv, out)
    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(argc, argv)
    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(io, ch)
    VALUE io, 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(recv, ch)
    VALUE recv, ch;
{
    return rb_io_putc(rb_stdout, ch);
}

static VALUE
io_puts_ary(ary, out)
    VALUE ary, out;
{
    VALUE tmp;
    long i;

    for (i=0; i<RARRAY(ary)->len; i++) {
        tmp = RARRAY(ary)->ptr[i];
        if (rb_inspecting_p(tmp)) {
            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(argc, argv, out)
    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_protect_inspect(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(argc, argv)
    int argc;
    VALUE *argv;
{
    rb_io_puts(argc, argv, rb_stdout);
    return Qnil;
}

void
rb_p(obj)                       /* for debug print within C code */
    VALUE obj;
{
    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(argc, argv)
    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(argc, argv, self)
    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(mesg, len)
    const char *mesg;
    long len;
{
    rb_io_write(rb_stderr, rb_str_new(mesg, len));
}

void
rb_write_error(mesg)
    const char *mesg;
{
    rb_write_error2(mesg, strlen(mesg));
}

static void
must_respond_to(mid, val, id)
    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(val, id, variable)
    VALUE val;
    ID id;
    VALUE *variable;
{
    must_respond_to(id_write, val, id);
    *variable = val;
}

static void
defout_setter(val, id, variable)
    VALUE val;
    ID id;
    VALUE *variable;
{
    stdout_setter(val, id, variable);
    rb_warn("$defout is obsolete; use $stdout instead");
}

static void
deferr_setter(val, id, variable)
    VALUE val;
    ID id;
    VALUE *variable;
{
    stdout_setter(val, id, variable);
    rb_warn("$deferr is obsolete; use $stderr instead");
}

static VALUE
prep_stdio(f, mode, klass)
    FILE *f;
    int mode;
    VALUE klass;
{
    OpenFile *fp;
    VALUE io = io_alloc(klass);

    MakeOpenFile(io, fp);
#ifdef __CYGWIN__
    if (!isatty(fileno(f))) {
        mode |= O_BINARY;
        setmode(fileno(f), O_BINARY);
    }
#endif
    fp->f = f;
    fp->mode = mode;

    return io;
}

static void
prep_path(io, path)
    VALUE io;
    char *path;
{
    OpenFile *fptr;

    GetOpenFile(io, fptr);
    if (fptr->path) rb_bug("illegal prep_path() call");
    fptr->path = strdup(path);
}

/*
 *  call-seq:
 *     IO.new(fd, mode)   => 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_initialize(argc, argv, io)
    int argc;
    VALUE *argv;
    VALUE io;
{
    VALUE fnum, mode;
    OpenFile *fp;
    int fd, flags;

    rb_secure(4);
    rb_scan_args(argc, argv, "11", &fnum, &mode);
    fd = NUM2INT(fnum);
    if (argc == 2) {
        if (FIXNUM_P(mode)) {
            flags = FIX2LONG(mode);
        }
        else {
            SafeStringValue(mode);
            flags = rb_io_mode_modenum(RSTRING(mode)->ptr);
        }
    }
    else {
#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->mode = rb_io_modenum_flags(flags);
    fp->f = rb_fdopen(fd, rb_io_modenum_mode(flags));

    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(argc, argv, io)
    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(argc, argv, klass)
    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(argc, argv, klass)
    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()
{
    return rb_funcall3(current_file, ruby_frame->last_func,
                       ruby_frame->argc, ruby_frame->argv);
}

#define ARGF_FORWARD() do { if (TYPE(current_file) != T_FILE) return argf_forward(); } while (0)
#define NEXT_ARGF_FORWARD() do {\
     if (!next_argv()) return Qnil;\
      ARGF_FORWARD();\
} while (0)

static void
argf_close(file)
    VALUE file;
{
    if (TYPE(file) == T_FILE)
        rb_io_close(file);
    else
        rb_funcall3(file, rb_intern("close"), 0, 0);
}

static int
next_argv()
{
    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 {
                FILE *fr = rb_fopen(fn, "r");

                if (ruby_inplace_mode) {
                    struct stat st, st2;
                    VALUE str;
                    FILE *fw;

                    if (TYPE(rb_stdout) == T_FILE && rb_stdout != orig_stdout) {
                        rb_io_close(rb_stdout);
                    }
                    fstat(fileno(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)fclose(fr);
                        (void)unlink(RSTRING(str)->ptr);
                        (void)rename(fn, RSTRING(str)->ptr);
                        fr = rb_fopen(RSTRING(str)->ptr, "r");
#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));
                            fclose(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));
                            fclose(fr);
                            goto retry;
                        }
#endif
                    }
                    fw = rb_fopen(fn, "w");
#ifndef NO_SAFE_RENAME
                    fstat(fileno(fw), &st2);
#ifdef HAVE_FCHMOD
                    fchmod(fileno(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(fileno(fw), st.st_uid, st.st_gid);
                    }
#endif
                    rb_stdout = prep_stdio(fw, FMODE_WRITABLE, rb_cFile);
                    prep_path(rb_stdout, fn);
                    if (stdout_binmode) rb_io_binmode(rb_stdout);
                }
                current_file = prep_stdio(fr, FMODE_READABLE, rb_cFile);
                prep_path(current_file, 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(argc, argv)
    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(argc, argv)
    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()
{
    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(argc, argv)
    int argc;
    VALUE *argv;
{
    VALUE line;

    if (!next_argv()) rb_eof_error();
    ARGF_FORWARD();
    line = rb_f_gets(argc, argv);
    if (NIL_P(line)) {
        rb_eof_error();
    }

    return line;
}

/*
 * obsolete
 */

static VALUE
rb_f_getc()
{
    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(argc, argv)
    int argc;
    VALUE *argv;
{
    VALUE line, ary;

    NEXT_ARGF_FORWARD();
    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(obj, str)
    VALUE obj, str;
{
    volatile VALUE port;
    VALUE result;
    OpenFile *fptr;

    SafeStringValue(str);
    port = pipe_open(str, 0, "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

/*
 *  call-seq:
 *     IO.select(read_array
 *               [, write_array
 *               [, error_array
 *               [, timeout]]] ) =>  array  or  nil
 *
 *  See <code>Kernel#select</code>.
 */

static VALUE
rb_f_select(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    VALUE read, write, except, timeout, res, list;
    fd_set rset, wset, eset, pset;
    fd_set *rp, *wp, *ep;
    struct timeval *tp, timerec;
    OpenFile *fptr;
    long i;
    int max = 0, n;
    int interrupt_flag = 0;
    int pending = 0;

    rb_scan_args(argc, argv, "13", &read, &write, &except, &timeout);
    if (NIL_P(timeout)) {
        tp = 0;
    }
    else {
        timerec = rb_time_interval(timeout);
        tp = &timerec;
    }

    FD_ZERO(&pset);
    if (!NIL_P(read)) {
        Check_Type(read, T_ARRAY);
        rp = &rset;
        FD_ZERO(rp);
        for (i=0; i<RARRAY(read)->len; i++) {
            GetOpenFile(rb_io_get_io(RARRAY(read)->ptr[i]), fptr);
            FD_SET(fileno(fptr->f), rp);
            if (READ_DATA_PENDING(fptr->f)) { /* check for buffered data */
                pending++;
                FD_SET(fileno(fptr->f), &pset);
            }
            if (max < fileno(fptr->f)) max = fileno(fptr->f);
        }
        if (pending) {          /* no blocking if there's buffered data */
            timerec.tv_sec = timerec.tv_usec = 0;
            tp = &timerec;
        }
    }
    else
        rp = 0;

    if (!NIL_P(write)) {
        Check_Type(write, T_ARRAY);
        wp = &wset;
        FD_ZERO(wp);
        for (i=0; i<RARRAY(write)->len; i++) {
            GetOpenFile(rb_io_get_io(RARRAY(write)->ptr[i]), fptr);
            FD_SET(fileno(fptr->f), wp);
            if (max < fileno(fptr->f)) max = fileno(fptr->f);
            if (fptr->f2) {
                FD_SET(fileno(fptr->f2), wp);
                if (max < fileno(fptr->f2)) max = fileno(fptr->f2);
            }
        }
    }
    else
        wp = 0;

    if (!NIL_P(except)) {
        Check_Type(except, T_ARRAY);
        ep = &eset;
        FD_ZERO(ep);
        for (i=0; i<RARRAY(except)->len; i++) {
            GetOpenFile(rb_io_get_io(RARRAY(except)->ptr[i]), fptr);
            FD_SET(fileno(fptr->f), ep);
            if (max < fileno(fptr->f)) max = fileno(fptr->f);
            if (fptr->f2) {
                FD_SET(fileno(fptr->f2), ep);
                if (max < fileno(fptr->f2)) max = fileno(fptr->f2);
            }
        }
    }
    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 (FD_ISSET(fileno(fptr->f), rp)
                    || FD_ISSET(fileno(fptr->f), &pset)) {
                    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 (FD_ISSET(fileno(fptr->f), wp)) {
                    rb_ary_push(list, rb_ary_entry(write, i));
                }
                else if (fptr->f2 && FD_ISSET(fileno(fptr->f2), wp)) {
                    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 (FD_ISSET(fileno(fptr->f), ep)) {
                    rb_ary_push(list, rb_ary_entry(except, i));
                }
                else if (fptr->f2 && FD_ISSET(fileno(fptr->f2), ep)) {
                    rb_ary_push(list, rb_ary_entry(except, i));
                }
            }
        }
    }

    return res;                 /* returns an empty array on interrupt */
}

#if !defined(MSDOS) && !defined(__human68k__)
static int
io_cntl(fd, cmd, narg, io_p)
    int fd, cmd, io_p;
    long narg;
{
    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(io, req, arg, io_p)
    VALUE io, req, 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(fileno(fptr->f), 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 (fptr->f2 && fileno(fptr->f) != fileno(fptr->f2)) {
        /* call on f2 too; ignore result */
        io_cntl(fileno(fptr->f2), cmd, narg, io_p);
    }

    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(argc, argv, io)
    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(argc, argv, io)
    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(argc, argv)
    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));
static VALUE
io_new_instance(args)
    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(klass)
    VALUE klass;
{
#ifndef __human68k__
    int pipes[2], state;
    VALUE r, w, args[3];

#ifdef _WIN32
    if (_pipe(pipes, 1024, O_BINARY) == -1)
#else
    if (pipe(pipes) == -1)
#endif
        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(arg)
    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(argc, argv)
    int argc;
    VALUE *argv;
{
    VALUE fname;
    struct foreach_arg arg;

    rb_scan_args(argc, argv, "11", &fname, &arg.sep);
    SafeStringValue(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(arg)
    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(argc, argv, io)
    int argc;
    VALUE *argv;
    VALUE io;
{
    VALUE fname;
    struct foreach_arg arg;

    rb_scan_args(argc, argv, "11", &fname, &arg.sep);
    SafeStringValue(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(arg)
    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(argc, argv, io)
    int argc;
    VALUE *argv;
    VALUE io;
{
    VALUE fname, offset;
    struct foreach_arg arg;

    rb_scan_args(argc, argv, "12", &fname, &arg.sep, &offset);
    SafeStringValue(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()
{
    if (!next_argv()) {
        rb_raise(rb_eArgError, "no stream to tell");
    }
    ARGF_FORWARD();
    return rb_io_tell(current_file);
}

static VALUE
argf_seek_m(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    if (!next_argv()) {
        rb_raise(rb_eArgError, "no stream to seek");
    }
    ARGF_FORWARD();
    return rb_io_seek_m(argc, argv, current_file);
}

static VALUE
argf_set_pos(self, offset)
     VALUE self, offset;
{
    if (!next_argv()) {
        rb_raise(rb_eArgError, "no stream to set position");
    }
    ARGF_FORWARD();
    return rb_io_set_pos(current_file, offset);
}

static VALUE
argf_rewind()
{
    if (!next_argv()) {
        rb_raise(rb_eArgError, "no stream to rewind");
    }
    ARGF_FORWARD();
    return rb_io_rewind(current_file);
}

static VALUE
argf_fileno()
{
    if (!next_argv()) {
        rb_raise(rb_eArgError, "no stream");
    }
    ARGF_FORWARD();
    return rb_io_fileno(current_file);
}

static VALUE
argf_to_io()
{
    next_argv();
    ARGF_FORWARD();
    return current_file;
}

static VALUE
argf_eof()
{
    if (current_file) {
        if (init_p == 0) return Qtrue;
        ARGF_FORWARD();
        if (rb_io_eof(current_file)) {
            return Qtrue;
        }
    }
    return Qfalse;
}

static VALUE
argf_read(argc, argv)
    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();
    }
    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_getc()
{
    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()
{
    VALUE c;

    NEXT_ARGF_FORWARD();
    c = argf_getc();
    if (NIL_P(c)) {
        rb_eof_error();
    }
    return c;
}

static VALUE
argf_each_line(argc, argv)
    int argc;
    VALUE *argv;
{
    VALUE str;

    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 byte;

    while (!NIL_P(byte = argf_getc())) {
        rb_yield(byte);
    }
    return argf;
}

static VALUE
argf_filename()
{
    next_argv();
    return filename;
}

static VALUE
argf_file()
{
    next_argv();
    return current_file;
}

static VALUE
argf_binmode()
{
    binmode = 1;
    next_argv();
    ARGF_FORWARD();
    rb_io_binmode(current_file);
    return argf;
}

static VALUE
argf_skip()
{
    if (next_p != -1) {
        argf_close(current_file);
        next_p = 1;
    }
    return argf;
}

static VALUE
argf_close_m()
{
    next_argv();
    argf_close(current_file);
    if (next_p != -1) {
        next_p = 1;
    }
    gets_lineno = 0;
    return argf;
}

static VALUE
argf_closed()
{
    next_argv();
    ARGF_FORWARD();
    return rb_io_closed(current_file);
}

static VALUE
argf_to_s()
{
    return rb_str_new2("ARGF");
}

static VALUE
opt_i_get()
{
    if (!ruby_inplace_mode) return Qnil;
    return rb_str_new2(ruby_inplace_mode);
}

static void
opt_i_set(val)
    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()
{
#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");

    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);
    rb_define_hooked_variable("$stdout", &rb_stdout, 0, stdout_setter);
    rb_stdout = prep_stdio(stdout, FMODE_WRITABLE, rb_cIO);
    rb_define_hooked_variable("$stderr", &rb_stderr, 0, stdout_setter);
    rb_stderr = prep_stdio(stderr, FMODE_WRITABLE, rb_cIO);
    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, "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 -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 state;};

#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 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
struct kwtable *
rb_reserved_word (str, len)
     register const char *str;
     register unsigned int len;
{
  static struct kwtable wordlist[] =
    {
      {""}, {""}, {""}, {""}, {""}, {""},
      {"end", {kEND, kEND}, EXPR_END},
      {"else", {kELSE, kELSE}, EXPR_BEG},
      {"case", {kCASE, kCASE}, EXPR_BEG},
      {"ensure", {kENSURE, kENSURE}, EXPR_BEG},
      {"module", {kMODULE, kMODULE}, EXPR_BEG},
      {"elsif", {kELSIF, kELSIF}, EXPR_BEG},
      {"def", {kDEF, kDEF}, EXPR_FNAME},
      {"rescue", {kRESCUE, kRESCUE_MOD}, EXPR_MID},
      {"not", {kNOT, kNOT}, EXPR_BEG},
      {"then", {kTHEN, kTHEN}, EXPR_BEG},
      {"yield", {kYIELD, kYIELD}, EXPR_ARG},
      {"for", {kFOR, kFOR}, EXPR_BEG},
      {"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_BEG},
      {"defined?", {kDEFINED, kDEFINED}, EXPR_ARG},
      {"super", {kSUPER, kSUPER}, EXPR_ARG},
      {"undef", {kUNDEF, kUNDEF}, EXPR_FNAME},
      {"break", {kBREAK, kBREAK}, EXPR_MID},
      {"in", {kIN, kIN}, EXPR_BEG},
      {"do", {kDO, kDO}, EXPR_BEG},
      {"nil", {kNIL, kNIL}, EXPR_END},
      {"until", {kUNTIL, kUNTIL_MOD}, EXPR_BEG},
      {"unless", {kUNLESS, kUNLESS_MOD}, EXPR_BEG},
      {"or", {kOR, kOR}, EXPR_BEG},
      {"next", {kNEXT, kNEXT}, EXPR_MID},
      {"when", {kWHEN, kWHEN}, EXPR_BEG},
      {"redo", {kREDO, kREDO}, EXPR_END},
      {"and", {kAND, kAND}, EXPR_BEG},
      {"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_BEG},
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
      {""},
      {"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;
}
/* [<][>][^] [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: eban $
  $Date: 2004/10/31 16:06:57 $
  created at: Fri Aug 19 13:19:58 JST 1994

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#include "ruby.h"

#ifdef __human68k__
int _stacksize = 262144;
#endif

#if defined __MINGW32__
int _CRT_glob = 0;
#endif

#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(argc, argv, envp)
    int argc;
    char **argv, **envp;
{
#ifdef _WIN32
    NtInitialize(&argc, &argv);
#endif
#if defined(__MACOS__) && defined(__MWERKS__)
    argc = ccommand(&argv);
#endif

    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:04:14 $
  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(len, ds)
    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(klass)
    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(s, n, arg)
    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(c, arg)
    char c;
    struct dump_arg *arg;
{
    w_nbyte(&c, 1, arg);
}

static void
w_bytes(s, n, arg)
    char *s;
    int n;
    struct dump_arg *arg;
{
    w_long(n, arg);
    w_nbyte(s, n, arg);
}

static void
w_short(x, arg)
    int x;
    struct dump_arg *arg;
{
    w_byte((x >> 0) & 0xff, arg);
    w_byte((x >> 8) & 0xff, arg);
}

static void
w_long(x, arg)
    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(d, buf)
    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(d, buf, len)
    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(d, arg)
    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, arg)
    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(s, arg)
    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(key, value, arg)
    VALUE key, 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(klass, arg, check)
    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(type, obj, arg, check)
    int 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(obj, base_klass, arg)
    VALUE obj, 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, value, arg)
    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(tbl, arg)
    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(obj, arg, limit)
    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(arg)
    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(arg)
    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(argc, argv)
    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(arg)
    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(size)
    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(arg)
    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(len, arg)
    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(arg)
    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(arg)
    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(arg)
    struct load_arg *arg;
{
    if (r_byte(arg) == TYPE_SYMLINK) {
        return r_symlink(arg);
    }
    return r_symreal(arg);
}

static char*
r_unique(arg)
    struct load_arg *arg;
{
    return rb_id2name(r_symbol(arg));
}

static VALUE
r_string(arg)
    struct load_arg *arg;
{
    return r_bytes(arg);
}

static VALUE
r_entry(v, arg)
    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(obj, arg)
    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(path)
    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(path)
    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(arg, proc, ivp, extmod)
    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(arg)
    struct load_arg *arg;
{
    return r_object0(arg, arg->proc, 0, Qnil);
}

static VALUE
load(arg)
    struct load_arg *arg;
{
    return r_object(arg);
}

static VALUE
load_ensure(arg)
    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(argc, argv)
    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()
{
    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(obj, port)
    VALUE obj, 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(port)
    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: dave $
  $Date: 2003/12/28 15:43:33 $
  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(obj, y, x)
    VALUE obj, x, y;
{
    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(obj, x)
    VALUE obj, 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(obj, x)
    VALUE obj, 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(obj, x)
    VALUE obj, 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(obj, x)
    VALUE obj, 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(obj, x)
    VALUE obj, 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(obj, x)
    VALUE obj, 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(obj, x)
    VALUE obj, 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(obj, x)
    VALUE obj, 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(obj, x)
    VALUE obj, 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(obj, x)
    VALUE obj, 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(obj, x)
    VALUE obj, 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(obj, x)
    VALUE obj, 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(obj, x)
    VALUE obj, 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(obj, x)
    VALUE obj, 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(obj, x)
    VALUE obj, 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(obj, x)
    VALUE obj, 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(obj, x)
    VALUE obj, 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(obj, x, n)
    VALUE obj, x, 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(obj, x, y)
    VALUE obj, x, 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(obj, x)
    VALUE obj, 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(obj, x)
    VALUE obj, 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()
{
    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: matz $
  $Date: 2005/06/12 16:58:41 $
  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 _((char *, 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 HAVE_ISINF
# if defined(HAVE_FINITE) && defined(HAVE_ISNAN)
# define isinf(x) (!finite(x) && !isnan(x))
# else
extern int isinf _((double));
# endif
#endif

#ifndef HAVE_ISNAN
extern int isnan _((double));
#endif

/*
#ifndef HAVE_MEMCMP
extern int memcmp _((char *, char *, int));
#endif
*/

#ifndef HAVE_MEMMOVE
extern void *memmove _((void *, void *, int));
#endif

/*
#ifndef HAVE_MODF
extern double modf _((double, double *));
#endif
*/

#ifndef HAVE_STRCASECMP
extern int strcasecmp _((char *, char *));
#endif

#ifndef HAVE_STRNCASECMP
extern int strncasecmp _((char *, char *, int));
#endif

#ifndef HAVE_STRCHR
extern char *strchr _((char *, int));
extern char *strrchr _((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 _((char *, char *));
#endif

/*
#ifndef HAVE_STRTOL
extern long strtol _((char *, char **, int));
#endif
*/

#ifndef HAVE_STRTOUL
extern unsigned long strtoul _((char *, char **, int));
#endif

#ifndef HAVE_VSNPRINTF
# ifdef HAVE_STDARG_PROTOTYPES
#  include <stdarg.h>
# else
#  include <varargs.h>
# endif
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/10/08 09:57:12 $
  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_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_DEFINED,
    NODE_NEWLINE,
    NODE_POSTEXE,
    NODE_ALLOCA,
    NODE_DMETHOD,
    NODE_BMETHOD,
    NODE_MEMO,
    NODE_IFUNC,
    NODE_DSYM,
    NODE_ATTRASGN,
    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))

#define nd_type(n) ((int)(((RNODE(n))->flags>>FL_USHIFT)&0xff))
#define nd_set_type(n,t) \
    RNODE(n)->flags=((RNODE(n)->flags&~FL_UMASK)|(((t)<<FL_USHIFT)&FL_UMASK))

#define NODE_LSHIFT (FL_USHIFT+8)
#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  u1.node
#define nd_rest  u2.argc
#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_old   u1.id
#define nd_new   u2.id

#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_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,o,n,0)
#define NEW_VALIAS(n,o) NEW_NODE(NODE_VALIAS,o,n,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_DEFINED(e) NEW_NODE(NODE_DEFINED,e,0,0)
#define NEW_NEWLINE(n) NEW_NODE(NODE_NEWLINE,0,0,n)
#define NEW_PREEXE(b) NEW_SCOPE(b)
#define NEW_POSTEXE() NEW_NODE(NODE_POSTEXE,0,0,0)
#define NEW_DMETHOD(b) NEW_NODE(NODE_DMETHOD,0,0,b)
#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 NOEX_PUBLIC    0
#define NOEX_NOSUPER   1
#define NOEX_PRIVATE   2
#define NOEX_PROTECTED 4
#define NOEX_MASK      6

#define NOEX_UNDEF     NOEX_NOSUPER

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));

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_int_p
  19. num_abs
  20. num_zero_p
  21. num_nonzero_p
  22. num_to_int
  23. rb_float_new
  24. flo_to_s
  25. flo_coerce
  26. flo_uminus
  27. flo_plus
  28. flo_minus
  29. flo_mul
  30. flo_div
  31. flodivmod
  32. flo_mod
  33. flo_divmod
  34. flo_pow
  35. num_eql
  36. num_cmp
  37. num_equal
  38. flo_eq
  39. flo_hash
  40. rb_dbl_cmp
  41. flo_cmp
  42. flo_gt
  43. flo_ge
  44. flo_lt
  45. flo_le
  46. flo_eql
  47. flo_to_f
  48. flo_abs
  49. flo_zero_p
  50. flo_is_nan_p
  51. flo_is_infinite_p
  52. flo_is_finite_p
  53. flo_floor
  54. flo_ceil
  55. flo_round
  56. flo_truncate
  57. num_floor
  58. num_ceil
  59. num_round
  60. num_truncate
  61. num_step
  62. rb_num2long
  63. rb_num2ulong
  64. check_int
  65. check_uint
  66. rb_num2int
  67. rb_fix2int
  68. rb_num2uint
  69. rb_fix2uint
  70. rb_num2int
  71. rb_fix2int
  72. rb_num2fix
  73. rb_num2ll
  74. rb_num2ull
  75. int_to_i
  76. int_int_p
  77. int_succ
  78. int_chr
  79. rb_fix_induced_from
  80. rb_int_induced_from
  81. rb_flo_induced_from
  82. fix_uminus
  83. rb_fix2str
  84. fix_to_s
  85. fix_plus
  86. fix_minus
  87. fix_mul
  88. fixdivmod
  89. fix_quo
  90. fix_div
  91. fix_mod
  92. fix_divmod
  93. fix_pow
  94. fix_equal
  95. fix_cmp
  96. fix_gt
  97. fix_ge
  98. fix_lt
  99. fix_le
  100. fix_rev
  101. fix_and
  102. fix_or
  103. fix_xor
  104. fix_lshift
  105. fix_rshift
  106. fix_aref
  107. fix_to_f
  108. fix_abs
  109. fix_id2name
  110. fix_to_sym
  111. fix_size
  112. int_upto
  113. int_downto
  114. int_dotimes
  115. fix_zero_p
  116. Init_Numeric
/**********************************************************************

  numeric.c -

  $Author: matz $
  $Date: 2005/10/30 18:20:53 $
  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()
{
    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(x, y)
    VALUE x, 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(x)
    VALUE *x;
{
    return rb_funcall(x[1], id_coerce, 1, x[0]);
}

static VALUE
coerce_rescue(x)
    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(x, y, err)
    VALUE *x, *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(x, y)
    VALUE x, y;
{
    do_coerce(&x, &y, Qtrue);
    return rb_funcall(x, ruby_frame->orig_func, 1, y);
}

VALUE
rb_num_coerce_cmp(x, y)
    VALUE x, y;
{
    if (do_coerce(&x, &y, Qfalse))
        return rb_funcall(x, ruby_frame->orig_func, 1, y);
    return Qnil;
}

VALUE
rb_num_coerce_relop(x, y)
    VALUE x, y;
{
    VALUE c, x0 = x, y0 = y;

    if (!do_coerce(&x, &y, Qfalse) ||
        NIL_P(c = rb_funcall(x, ruby_frame->orig_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(x, name)
    VALUE x, 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(x, y)
    VALUE x, 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(num)
    VALUE num;
{
    return num;
}

/*
 *  call-seq:
 *     -num    => numeric
 *
 *  Unary Minus---Returns the receiver's value, negated.
 */

static VALUE
num_uminus(num)
    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(x, y)
    VALUE x, y;
{
    return rb_funcall(x, '/', 1, y);
}

/*
 *  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(x, y)
    VALUE x, y;
{
    return rb_Integer(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(x, y)
    VALUE x, 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(x, y)
    VALUE x, 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(x, y)
    VALUE x, 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.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(num)
    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(num)
    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(num)
    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(num)
    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(num)
    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(d)
    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(flt)
    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(x, y)
    VALUE x, y;
{
    return rb_assoc_new(rb_Float(y), x);
}

/*
 * call-seq:
 *    -float   => float
 *
 * Returns float, negated.
 */

static VALUE
flo_uminus(flt)
    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(x, y)
    VALUE x, 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(x, y)
    VALUE x, 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(x, y)
    VALUE x, 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(x, y)
    VALUE x, 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(x, y, divp, modp)
    double x, y;
    double *divp, *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(x, y)
    VALUE x, 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(x, y)
    VALUE x, 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(x, y)
    VALUE x, 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(x, y)
    VALUE x, 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(x, y)
    VALUE x, y;
{
    if (x == y) return INT2FIX(0);
    return Qnil;
}

static VALUE
num_equal(x, y)
    VALUE x, 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(x, y)
    VALUE x, 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(num)
    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(a, b)
    double a, 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(x, y)
    VALUE x, 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(x, y)
    VALUE x, 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(x, y)
    VALUE x, 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(x, y)
    VALUE x, 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(x, y)
    VALUE x, 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(x, y)
    VALUE x, 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(num)
    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(flt)
    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(num)
    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(num)
     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(num)
     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(num)
     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(num)
    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(num)
    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(num)
    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(num)
    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(num)
    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(num)
    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(num)
    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(num)
    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(argc, argv, from)
    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(val)
    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(val)
    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(val)
    VALUE val;
{
    return rb_num2long(val);
}

long
rb_fix2int(val)
    VALUE val;
{
    return FIX2INT(val);
}
#endif

VALUE
rb_num2fix(val)
    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(val)
    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(val)
    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(num)
    VALUE num;
{
    return num;
}

/*
 *  call-seq:
 *     int.integer? -> true
 *
 *  Always returns <code>true</code>.
 */

static VALUE
int_int_p(num)
    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(num)
    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(num)
    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(klass, x)
    VALUE klass, 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(klass, x)
    VALUE klass, 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(klass, x)
    VALUE klass, 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(num)
    VALUE num;
{
    return LONG2NUM(-FIX2LONG(num));
}

VALUE
rb_fix2str(x, base)
    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(argc, argv, x)
    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(x, y)
    VALUE x, 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;
    }
    if (TYPE(y) == T_FLOAT) {
        return rb_float_new((double)FIX2LONG(x) + RFLOAT(y)->value);
    }
    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(x, y)
    VALUE x, 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;
    }
    if (TYPE(y) == T_FLOAT) {
        return rb_float_new((double)FIX2LONG(x) - RFLOAT(y)->value);
    }
    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(x, y)
    VALUE x, y;
{
    if (FIXNUM_P(y)) {
        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;
    }
    if (TYPE(y) == T_FLOAT) {
        return rb_float_new((double)FIX2LONG(x) * RFLOAT(y)->value);
    }
    return rb_num_coerce_bin(x, y);
}

static void
fixdivmod(x, y, divp, modp)
    long x, y;
    long *divp, *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(x, y)
    VALUE x, y;
{
    if (FIXNUM_P(y)) {
        return rb_float_new((double)FIX2LONG(x) / (double)FIX2LONG(y));
    }
    return rb_num_coerce_bin(x, y);
}

/*
 * call-seq:
 *   fix / numeric      =>  numeric_result
 *   fix.div(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(x, y)
    VALUE x, y;
{
    if (FIXNUM_P(y)) {
        long div;

        fixdivmod(FIX2LONG(x), FIX2LONG(y), &div, 0);
        return LONG2NUM(div);
    }
    return rb_num_coerce_bin(x, y);
}

/*
 *  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(x, y)
    VALUE x, y;
{
    if (FIXNUM_P(y)) {
        long mod;

        fixdivmod(FIX2LONG(x), FIX2LONG(y), 0, &mod);
        return LONG2NUM(mod);
    }
    return rb_num_coerce_bin(x, y);
}

/*
 *  call-seq:
 *     fix.divmod(numeric)    => array
 *
 *  See <code>Numeric#divmod</code>.
 */
static VALUE
fix_divmod(x, y)
    VALUE x, y;
{
    if (FIXNUM_P(y)) {
        long div, mod;

        fixdivmod(FIX2LONG(x), FIX2LONG(y), &div, &mod);

        return rb_assoc_new(LONG2NUM(div), LONG2NUM(mod));
    }
    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(x, y)
    VALUE x, 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));
    } else if (TYPE(y) == T_FLOAT) {
        long a = FIX2LONG(x);
        return rb_float_new(pow((double)a, RFLOAT(y)->value));
    }
    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(x, y)
    VALUE x, y;
{
    if (FIXNUM_P(y)) {
        return (FIX2LONG(x) == FIX2LONG(y))?Qtrue:Qfalse;
    }
    else {
        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(x, y)
    VALUE x, 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);
    }
    else {
        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(x, y)
    VALUE x, y;
{
    if (FIXNUM_P(y)) {
        long a = FIX2LONG(x), b = FIX2LONG(y);

        if (a > b) return Qtrue;
        return Qfalse;
    }
    else {
        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(x, y)
    VALUE x, y;
{
    if (FIXNUM_P(y)) {
        long a = FIX2LONG(x), b = FIX2LONG(y);

        if (a >= b) return Qtrue;
        return Qfalse;
    }
    else {
        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(x, y)
    VALUE x, y;
{
    if (FIXNUM_P(y)) {
        long a = FIX2LONG(x), b = FIX2LONG(y);

        if (a < b) return Qtrue;
        return Qfalse;
    }
    else {
        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(x, y)
    VALUE x, y;
{
    if (FIXNUM_P(y)) {
        long a = FIX2LONG(x), b = FIX2LONG(y);

        if (a <= b) return Qtrue;
        return Qfalse;
    }
    else {
        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(num)
    VALUE num;
{
    long val = FIX2LONG(num);

    val = ~val;
    return LONG2NUM(val);
}

/*
 * call-seq:
 *   fix & other     => integer
 *
 * Bitwise AND.
 */

static VALUE
fix_and(x, y)
    VALUE x, 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(x, y)
    VALUE x, 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(x, y)
    VALUE x, 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(x, y)
    VALUE x, 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(x, y)
    VALUE x, 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(fix, idx)
    VALUE fix, 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(num)
    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(fix)
    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(fix)
    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(fix)
    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(fix)
    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(from, to)
    VALUE from, 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(from, to)
    VALUE from, 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(num)
    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(num)
    VALUE num;
{
    if (FIX2LONG(num) == 0) {
        return Qtrue;
    }
    return Qfalse;
}

void
Init_Numeric()
{
#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, "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_div, 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_obj_id_obsolete
  6. rb_class_real
  7. rb_obj_type
  8. rb_obj_class
  9. init_copy
  10. rb_obj_clone
  11. rb_obj_dup
  12. rb_obj_init_copy
  13. rb_any_to_a
  14. rb_any_to_s
  15. rb_inspect
  16. inspect_i
  17. inspect_obj
  18. rb_obj_inspect
  19. rb_obj_is_instance_of
  20. rb_obj_is_kind_of
  21. rb_obj_dummy
  22. rb_obj_tainted
  23. rb_obj_taint
  24. rb_obj_untaint
  25. rb_obj_infect
  26. rb_obj_freeze
  27. rb_obj_frozen_p
  28. nil_to_i
  29. nil_to_f
  30. nil_to_s
  31. nil_to_a
  32. nil_inspect
  33. nil_plus
  34. main_to_s
  35. true_to_s
  36. true_and
  37. true_or
  38. true_xor
  39. false_to_s
  40. false_and
  41. false_or
  42. false_xor
  43. rb_true
  44. rb_false
  45. rb_obj_pattern_match
  46. sym_to_i
  47. sym_to_int
  48. sym_inspect
  49. sym_to_s
  50. sym_to_sym
  51. rb_mod_to_s
  52. rb_mod_freeze
  53. rb_mod_eqq
  54. rb_class_inherited_p
  55. rb_mod_lt
  56. rb_mod_ge
  57. rb_mod_gt
  58. rb_mod_cmp
  59. rb_module_s_alloc
  60. rb_class_s_alloc
  61. rb_mod_initialize
  62. rb_class_initialize
  63. rb_obj_alloc
  64. rb_class_allocate_instance
  65. rb_class_new_instance
  66. rb_class_superclass
  67. str_to_id
  68. rb_to_id
  69. rb_mod_attr
  70. rb_mod_attr_reader
  71. rb_mod_attr_writer
  72. rb_mod_attr_accessor
  73. rb_mod_const_get
  74. rb_mod_const_set
  75. rb_mod_const_defined
  76. rb_obj_methods
  77. rb_obj_protected_methods
  78. rb_obj_private_methods
  79. rb_obj_public_methods
  80. rb_obj_ivar_get
  81. rb_obj_ivar_set
  82. rb_mod_cvar_get
  83. rb_mod_cvar_set
  84. convert_type
  85. rb_convert_type
  86. rb_check_convert_type
  87. rb_to_integer
  88. rb_to_int
  89. rb_Integer
  90. rb_f_integer
  91. rb_cstr_to_dbl
  92. rb_str_to_dbl
  93. rb_Float
  94. rb_f_float
  95. rb_num2dbl
  96. rb_str2cstr
  97. rb_String
  98. rb_f_string
  99. rb_Array
  100. rb_f_array
  101. boot_defclass
  102. Init_Object
/**********************************************************************

  object.c -

  $Author: akr $
  $Date: 2005/12/12 03:36:49 $
  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(obj1, obj2)
    VALUE obj1, 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(obj1, obj2)
    VALUE obj1, 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(obj1, obj2)
    VALUE obj1, 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(obj)
    VALUE obj;
{
    if (SPECIAL_CONST_P(obj)) {
        return LONG2NUM((long)obj);
    }
    return (VALUE)((long)obj|FIXNUM_FLAG);
}

/*
 *  call-seq:
 *     obj.id    => fixnum
 *
 *  Soon-to-be deprecated version of <code>Object#object_id</code>.
 */

VALUE
rb_obj_id_obsolete(obj)
    VALUE obj;
{
    rb_warn("Object#id will be deprecated; use Object#object_id");
    return rb_obj_id(obj);
}

VALUE
rb_class_real(cl)
    VALUE cl;
{
    while (FL_TEST(cl, FL_SINGLETON) || TYPE(cl) == T_ICLASS) {
        cl = RCLASS(cl)->super;
    }
    return cl;
}

/*
 *  call-seq:
 *     obj.type   => class
 *
 *  Deprecated synonym for <code>Object#class</code>.
 */

VALUE
rb_obj_type(obj)
    VALUE obj;
{
    rb_warn("Object#type is deprecated; use Object#class");
    return rb_class_real(CLASS_OF(obj));
}

/*
 *  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(obj)
    VALUE obj;
{
    return rb_class_real(CLASS_OF(obj));
}

static void
init_copy(dest, obj)
    VALUE dest, 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);
    if (FL_TEST(obj, FL_EXIVAR)) {
        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(obj)
    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(obj)
    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(obj, orig)
    VALUE obj, 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_a -> anArray
 *
 *  Returns an array representation of <i>obj</i>. For objects of class
 *  <code>Object</code> and others that don't explicitly override the
 *  method, the return value is an array containing <code>self</code>.
 *  However, this latter behavior will soon be obsolete.
 *
 *     self.to_a       #=> -:1: warning: default `to_a' will be obsolete
 *     "hello".to_a    #=> ["hello"]
 *     Time.new.to_a   #=> [39, 54, 8, 9, 4, 2003, 3, 99, true, "CDT"]
 */

static VALUE
rb_any_to_a(obj)
    VALUE obj;
{
    rb_warn("default `to_a' will be obsolete");
    return rb_ary_new3(1, 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(obj)
    VALUE obj;
{
    char *cname = rb_obj_classname(obj);
    size_t len;
    VALUE str;

    len = strlen(cname)+6+16;
    str = rb_str_new(0, len); /* 6:tags 16:addr */
    snprintf(RSTRING(str)->ptr, len+1, "#<%s:0x%lx>", cname, obj);
    RSTRING(str)->len = strlen(RSTRING(str)->ptr);
    if (OBJ_TAINTED(obj)) OBJ_TAINT(str);

    return str;
}

VALUE
rb_inspect(obj)
    VALUE obj;
{
    return rb_obj_as_string(rb_funcall(obj, id_inspect, 0, 0));
}

static int
inspect_i(id, value, str)
    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(obj, str)
    VALUE obj, str;
{
    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(obj)
    VALUE obj;
{
    if (TYPE(obj) == T_OBJECT
        && ROBJECT(obj)->iv_tbl
        && ROBJECT(obj)->iv_tbl->num_entries > 0) {
        VALUE str;
        size_t len;
        char *c;

        c = rb_obj_classname(obj);
        if (rb_inspecting_p(obj)) {
            len = strlen(c)+10+16+1;
            str = rb_str_new(0, len); /* 10:tags 16:addr 1:nul */
            snprintf(RSTRING(str)->ptr, len, "#<%s:0x%lx ...>", c, obj);
            RSTRING(str)->len = strlen(RSTRING(str)->ptr);
            return str;
        }
        len = strlen(c)+6+16+1;
        str = rb_str_new(0, len);     /* 6:tags 16:addr 1:nul */
        snprintf(RSTRING(str)->ptr, len, "-<%s:0x%lx", c, obj);
        RSTRING(str)->len = strlen(RSTRING(str)->ptr);
        return rb_protect_inspect(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(obj, c)
    VALUE obj, 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(obj, c)
    VALUE obj, 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()
{
    return Qnil;
}

/*
 *  call-seq:
 *     obj.tainted?    => true or false
 *
 *  Returns <code>true</code> if the object is tainted.
 */

VALUE
rb_obj_tainted(obj)
    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(obj)
    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(obj)
    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(obj1, obj2)
    VALUE obj1, 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(obj)
    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(obj)
    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(obj)
    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(obj)
    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(obj)
    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(obj)
    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(obj)
    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(obj)
    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(obj, obj2)
    VALUE obj, 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(obj, obj2)
    VALUE obj, 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(obj, obj2)
    VALUE obj, 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(obj)
    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(obj, obj2)
    VALUE obj, 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(obj, obj2)
    VALUE obj, 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(obj, obj2)
    VALUE obj, 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(obj)
    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(obj)
    VALUE obj;
{
    return Qfalse;
}

/*
 *  call-seq:
 *     obj =~ other  => false
 *
 *  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(obj1, obj2)
    VALUE obj1, obj2;
{
    return Qfalse;
}

/**********************************************************************
 * 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(sym)
    VALUE sym;
{
    ID id = SYM2ID(sym);

    return LONG2FIX(id);
}

/* :nodoc: */

static VALUE
sym_to_int(sym)
    VALUE sym;
{
    rb_warning("treating Symbol as an integer");
    return sym_to_i(sym);
}

/*
 *  call-seq:
 *     sym.inspect    => string
 *
 *  Returns the representation of <i>sym</i> as a symbol literal.
 *
 *     :fred.inspect   #=> ":fred"
 */

static VALUE
sym_inspect(sym)
    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(sym)
    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(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(klass)
    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(mod)
    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(mod, arg)
    VALUE mod, 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(mod, arg)
    VALUE mod, 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");
    }

    if (FL_TEST(mod, FL_SINGLETON)) {
        if (RCLASS(mod)->m_tbl == RCLASS(arg)->m_tbl)
            return Qtrue;
        mod = RBASIC(mod)->klass;
    }
    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(mod, arg)
    VALUE mod, 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(mod, arg)
    VALUE mod, 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(mod, arg)
    VALUE mod, 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(mod, arg)
    VALUE mod, 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));
static VALUE
rb_module_s_alloc(klass)
    VALUE klass;
{
    VALUE mod = rb_module_new();

    RBASIC(mod)->klass = klass;
    return mod;
}

static VALUE rb_class_s_alloc _((VALUE));
static VALUE
rb_class_s_alloc(klass)
    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(module)
    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(argc, argv, klass)
    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_mod_initialize(klass);
    rb_class_inherited(super, 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(klass)
    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 virtual 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));
static VALUE
rb_class_allocate_instance(klass)
    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(argc, argv, klass)
    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(klass)
    VALUE klass;
{
    VALUE super = RCLASS(klass)->super;

    if (!super) {
        rb_raise(rb_eTypeError, "uninitialized class");
    }
    if (FL_TEST(klass, FL_SINGLETON)) {
        super = RBASIC(klass)->klass;
    }
    while (TYPE(super) == T_ICLASS) {
        super = RCLASS(super)->super;
    }
    if (!super) {
        return Qnil;
    }
    return super;
}

static ID
str_to_id(str)
    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_warn("Symbols should not contain NUL (\\0)");
    }
    return rb_intern(RSTRING(str)->ptr);
}

ID
rb_to_id(name)
    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(argc, argv, klass)
    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(argc, argv, klass)
    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(argc, argv, klass)
    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(argc, argv, klass)
    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(mod, name)
    VALUE mod, 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(mod, name, value)
    VALUE mod, name, 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(mod, name)
    VALUE mod, 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(argc, argv, obj)
    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(argc, argv, obj)
    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(argc, argv, obj)
    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(argc, argv, obj)
    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(obj, iv)
    VALUE obj, 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(obj, iv, val)
    VALUE obj, iv, 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
 *
 *     def Fred.foo
 *       class_variable_get(:@@foo)     #=> 99
 *     end
 */

static VALUE
rb_mod_cvar_get(obj, iv)
    VALUE obj, 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
 *
 *     def Fred.foo
 *       class_variable_set(:@@foo, 101)      #=> 101
 *     end
 *     Fred.foo
 *     Fred.new.foo                             #=> 101
 */

static VALUE
rb_mod_cvar_set(obj, iv, val)
    VALUE obj, iv, 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(val, tname, method, raise)
    VALUE val;
    const char *tname, *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(val, type, tname, method)
    VALUE val;
    int type;
    const char *tname, *method;
{
    VALUE v;

    if (TYPE(val) == type) return val;
    v = convert_type(val, tname, method, Qtrue);
    if (TYPE(v) != type) {
        rb_raise(rb_eTypeError, "%s#%s should return %s",
                 rb_obj_classname(val), method, tname);
    }
    return v;
}

VALUE
rb_check_convert_type(val, type, tname, method)
    VALUE val;
    int type;
    const char *tname, *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) {
        rb_raise(rb_eTypeError, "%s#%s should return %s",
                 rb_obj_classname(val), method, tname);
    }
    return v;
}

static VALUE
rb_to_integer(val, method)
    VALUE val;
    const char *method;
{
    VALUE v = convert_type(val, "Integer", method, Qtrue);
    if (!rb_obj_is_kind_of(v, rb_cInteger)) {
        rb_raise(rb_eTypeError, "%s#%s should return Integer",
                 rb_obj_classname(val), method);
    }
    return v;
}

VALUE
rb_to_int(val)
    VALUE val;
{
    return rb_to_integer(val, "to_int");
}

VALUE
rb_Integer(val)
    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(obj, arg)
    VALUE obj, arg;
{
    return rb_Integer(arg);
}

double
rb_cstr_to_dbl(p, badcheck)
    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(str, badcheck)
    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(val)
    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(obj, arg)
    VALUE obj, arg;
{
    return rb_Float(arg);
}

double
rb_num2dbl(val)
    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(str, len)
    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(val)
    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(obj, arg)
    VALUE obj, arg;
{
    return rb_String(arg);
}

#if 0
VALUE
rb_Array(val)
    VALUE val;
{
    VALUE tmp = rb_check_array_type(val);

    if (NIL_P(tmp)) {
        tmp = rb_check_convert_type(val, T_ARRAY, "Array", "to_a");
        if (NIL_P(tmp)) {
            return rb_ary_new3(1, val);
        }
    }
    return tmp;
}
#endif

/*
 *  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>.
 *  If both fail, creates a single element array containing <i>arg</i>
 *  (unless <i>arg</i> is <code>nil</code>).
 *
 *     Array(1..5)   #=> [1, 2, 3, 4, 5]
 */

static VALUE
rb_f_array(obj, arg)
    VALUE obj, arg;
{
    return rb_Array(arg);
}

static VALUE
boot_defclass(name, super)
    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()
{
    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_obsolete, 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, "type", rb_obj_type, 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_a", rb_any_to_a, 0); /* to be removed */
    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, "to_int", sym_to_int, 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_private_method(rb_cModule, "remove_class_variable",
                             rb_mod_remove_cvar, 1); /* in variable.c */
    rb_define_private_method(rb_cModule, "class_variable_get", rb_mod_cvar_get, 1);
    rb_define_private_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] */


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:49 $
  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(d)
    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(x)
    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(ary, fmt)
    VALUE ary, 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(str, s, len, type)
    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(str, from, len)
    VALUE str, 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(c)
    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(ptr, len, str)
    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(str, fmt)
    VALUE str, 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(buf, uv)
    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(p, lenp)
    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 %d bytes, given %d 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()
{
    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. yyerror
  4. yycompile
  5. lex_get_str
  6. lex_getline
  7. rb_compile_string
  8. rb_compile_cstr
  9. rb_compile_file
  10. nextc
  11. pushback
  12. newtok
  13. tokadd
  14. read_escape
  15. tokadd_escape
  16. regx_options
  17. dispose_string
  18. tokadd_string
  19. parse_string
  20. heredoc_identifier
  21. heredoc_restore
  22. whole_match_p
  23. here_document
  24. arg_ambiguous
  25. yylex
  26. rb_node_newnode
  27. nodetype
  28. nodeline
  29. newline_node
  30. fixpos
  31. parser_warning
  32. parser_warn
  33. block_append
  34. list_append
  35. list_concat
  36. literal_concat
  37. evstr2dstr
  38. new_evstr
  39. call_op
  40. match_gen
  41. gettable
  42. assignable
  43. aryset
  44. rb_id_attrset
  45. attrset
  46. rb_backref_error
  47. arg_concat
  48. arg_add
  49. node_assign
  50. value_expr0
  51. void_expr0
  52. void_stmts
  53. remove_begin
  54. assign_in_cond
  55. e_option_supplied
  56. warn_unless_e_option
  57. warning_unless_e_option
  58. range_op
  59. literal_node
  60. cond0
  61. cond
  62. logop
  63. cond_negative
  64. no_blockarg
  65. ret_args
  66. new_yield
  67. negate_lit
  68. arg_blk_pass
  69. arg_prepend
  70. new_call
  71. new_fcall
  72. new_super
  73. local_push
  74. local_pop
  75. local_tbl
  76. local_append
  77. local_cnt
  78. local_id
  79. top_local_init
  80. top_local_setup
  81. dyna_push
  82. dyna_pop
  83. dyna_in_block
  84. dyna_init
  85. ruby_parser_stack_on_heap
  86. rb_gc_mark_parser
  87. rb_parser_append_print
  88. rb_parser_while_loop
  89. Init_sym
  90. internal_id
  91. is_special_global_name
  92. rb_symname_p
  93. rb_intern
  94. rb_id2name
  95. symbols_i
  96. rb_sym_all_symbols
  97. rb_is_const_id
  98. rb_is_class_id
  99. rb_is_instance_id
  100. rb_is_local_id
  101. rb_is_junk_id
  102. special_local_set
  103. rb_backref_get
  104. rb_backref_set
  105. rb_lastline_get
  106. rb_lastline_set
  107. rb_parser_malloc
  108. rb_parser_calloc
  109. rb_parser_realloc
  110. rb_parser_free
/**********************************************************************

  parse.y -

  $Author: nobu $
  $Date: 2005/12/19 14:33:05 $
  created at: Fri May 28 18:02:42 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

%{

#define YYDEBUG 1
#define YYERROR_VERBOSE 1
#ifndef YYSTACK_USE_ALLOCA
#define YYSTACK_USE_ALLOCA 0
#endif

#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        rb_parser_malloc
#define YYREALLOC       rb_parser_realloc
#define YYCALLOC        rb_parser_calloc
#define YYFREE  rb_parser_free
#define malloc  YYMALLOC
#define realloc YYREALLOC
#define calloc  YYCALLOC
#define free    YYFREE
static void *rb_parser_malloc _((size_t));
static void *rb_parser_realloc _((void *, size_t));
static void *rb_parser_calloc _((size_t, size_t));
static void rb_parser_free _((void *));

#define yyparse ruby_yyparse
#define yylex ruby_yylex
#define yyerror ruby_yyerror
#define yylval ruby_yylval
#define yychar ruby_yychar
#define yydebug ruby_yydebug

#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))

NODE *ruby_eval_tree_begin = 0;
NODE *ruby_eval_tree = 0;

char *ruby_sourcefile;          /* current source file */
int   ruby_sourceline;          /* current line no. */

static int yylex();
static int yyerror();

static enum lex_state {
    EXPR_BEG,                   /* ignore newline, +/- is a sign. */
    EXPR_END,                   /* 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. */
} lex_state;
static NODE *lex_strterm;

#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 >>= 1)
#define BITSTACK_LEXPOP(stack)  (stack = (stack >> 1) | (stack & 1))
#define BITSTACK_SET_P(stack)   (stack&1)

static stack_type cond_stack = 0;
#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)

static stack_type cmdarg_stack = 0;
#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)

static int class_nest = 0;
static int in_single = 0;
static int in_def = 0;
static int compile_for_eval = 0;
static ID cur_mid = 0;

static NODE *cond();
static NODE *logop();
static int cond_negative();

static NODE *newline_node();
static void fixpos();

static int value_expr0();
static void void_expr0();
static void void_stmts();
static NODE *remove_begin();
#define value_expr(node) value_expr0((node) = remove_begin(node))
#define void_expr(node) void_expr0((node) = remove_begin(node))

static NODE *block_append();
static NODE *list_append();
static NODE *list_concat();
static NODE *arg_concat();
static NODE *arg_prepend();
static NODE *literal_concat();
static NODE *new_evstr();
static NODE *evstr2dstr();
static NODE *call_op();
static int in_defined = 0;

static NODE *negate_lit();
static NODE *ret_args();
static NODE *arg_blk_pass();
static NODE *new_call();
static NODE *new_fcall();
static NODE *new_super();
static NODE *new_yield();

static NODE *gettable();
static NODE *assignable();
static NODE *aryset();
static NODE *attrset();
static void rb_backref_error();
static NODE *node_assign();

static NODE *match_gen();
static void local_push();
static void local_pop();
static int  local_append();
static int  local_cnt();
static int  local_id();
static ID  *local_tbl();
static ID   internal_id();

static struct RVarmap *dyna_push();
static void dyna_pop();
static int dyna_in_block();
static NODE *dyna_init();

static void top_local_init();
static void top_local_setup();

#define RE_OPTION_ONCE 0x80

#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.id

/* 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

%}

%union {
    NODE *node;
    ID id;
    int num;
    struct RVarmap *vars;
}

%token  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
        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
%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_optarg f_opt f_block_arg opt_f_block_arg
%type <node> assoc_list assocs assoc undef_list backref string_dvar
%type <node> block_var opt_block_var brace_block cmd_brace_block do_block lhs none
%type <node> mlhs mlhs_head mlhs_basic mlhs_entry mlhs_item mlhs_node
%type <id>   fitem variable sym symbol operation operation2 operation3
%type <id>   cname fname op f_rest_arg
%type <num>  f_norm_arg f_arg
%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 tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG tWORDS_BEG tQWORDS_BEG
%token tSTRING_DBEG tSTRING_DVAR tSTRING_END

/*
 *      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;
                    }
                  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;
                    }
                ;

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) {
                            $$ = NEW_ENSURE($$, $4);
                        }
                        fixpos($$, $1);
                    }
                ;

compstmt        : stmts opt_terms
                    {
                        void_stmts($1);
                        $$ = $1;
                    }
                ;

stmts           : none
                | stmt
                    {
                        $$ = newline_node($1);
                    }
                | stmts terms stmt
                    {
                        $$ = block_append($1, newline_node($3));
                    }
                | error stmt
                    {
                        $$ = $2;
                    }
                ;

stmt            : kALIAS fitem {lex_state = EXPR_FNAME;} fitem
                    {
                        $$ = NEW_ALIAS($2, $4);
                    }
                | kALIAS tGVAR tGVAR
                    {
                        $$ = NEW_VALIAS($2, $3);
                    }
                | kALIAS tGVAR tBACK_REF
                    {
                        char buf[3];

                        sprintf(buf, "$%c", (char)$3->nd_nth);
                        $$ = NEW_VALIAS($2, rb_intern(buf));
                    }
                | kALIAS tGVAR tNTH_REF
                    {
                        yyerror("can't make alias for the number variables");
                        $$ = 0;
                    }
                | kUNDEF undef_list
                    {
                        $$ = $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;
                        }
                    }
                | 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;
                        }
                    }
                | 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);
                        }
                    }
                | 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);
                        }
                    }
                | stmt kRESCUE_MOD stmt
                    {
                        $$ = NEW_RESCUE($1, NEW_RESBODY(0,$3,0), 0);
                    }
                | klBEGIN
                    {
                        if (in_def || in_single) {
                            yyerror("BEGIN in method");
                        }
                        local_push(0);
                    }
                  '{' compstmt '}'
                    {
                        ruby_eval_tree_begin = block_append(ruby_eval_tree_begin,
                                                            NEW_PREEXE($4));
                        local_pop();
                        $$ = 0;
                    }
                | klEND '{' compstmt '}'
                    {
                        if (in_def || in_single) {
                            rb_warn("END in method; use at_exit");
                        }

                        $$ = NEW_ITER(0, NEW_POSTEXE(), $3);
                    }
                | lhs '=' command_call
                    {
                        $$ = node_assign($1, $3);
                    }
                | mlhs '=' command_call
                    {
                        value_expr($3);
                        $1->nd_value = ($1->nd_head) ? NEW_TO_ARY($3) : NEW_ARRAY($3);
                        $$ = $1;
                    }
                | 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;
                        }
                    }
                | 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);
                    }
                | 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);
                    }
                | 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);
                    }
                | 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);
                    }
                | backref tOP_ASGN command_call
                    {
                        rb_backref_error($1);
                        $$ = 0;
                    }
                | lhs '=' mrhs
                    {
                        $$ = node_assign($1, NEW_SVALUE($3));
                    }
                | mlhs '=' arg_value
                    {
                        $1->nd_value = ($1->nd_head) ? NEW_TO_ARY($3) : NEW_ARRAY($3);
                        $$ = $1;
                    }
                | mlhs '=' mrhs
                    {
                        $1->nd_value = $3;
                        $$ = $1;
                    }
                | expr
                ;

expr            : command_call
                | expr kAND expr
                    {
                        $$ = logop(NODE_AND, $1, $3);
                    }
                | expr kOR expr
                    {
                        $$ = logop(NODE_OR, $1, $3);
                    }
                | kNOT expr
                    {
                        $$ = NEW_NOT(cond($2));
                    }
                | '!' command_call
                    {
                        $$ = NEW_NOT(cond($2));
                    }
                | arg
                ;

expr_value      : expr
                    {
                        value_expr($$);
                        $$ = $1;
                    }
                ;

command_call    : command
                | block_command
                | kRETURN call_args
                    {
                        $$ = NEW_RETURN(ret_args($2));
                    }
                | kBREAK call_args
                    {
                        $$ = NEW_BREAK(ret_args($2));
                    }
                | kNEXT call_args
                    {
                        $$ = NEW_NEXT(ret_args($2));
                    }
                ;

block_command   : block_call
                | block_call '.' operation2 command_args
                    {
                        $$ = new_call($1, $3, $4);
                    }
                | block_call tCOLON2 operation2 command_args
                    {
                        $$ = new_call($1, $3, $4);
                    }
                ;

cmd_brace_block : tLBRACE_ARG
                    {
                        $<vars>$ = dyna_push();
                        $<num>1 = ruby_sourceline;
                    }
                  opt_block_var {$<vars>$ = ruby_dyna_vars;}
                  compstmt
                  '}'
                    {
                        $$ = NEW_ITER($3, 0, dyna_init($5, $<vars>4));
                        nd_set_line($$, $<num>1);
                        dyna_pop($<vars>2);
                    }
                ;

command         : operation command_args       %prec tLOWEST
                    {
                        $$ = new_fcall($1, $2);
                        fixpos($$, $2);
                   }
                | operation command_args cmd_brace_block
                    {
                        $$ = new_fcall($1, $2);
                        if ($3) {
                            if (nd_type($$) == NODE_BLOCK_PASS) {
                                rb_compile_error("both block arg and actual block given");
                            }
                            $3->nd_iter = $$;
                            $$ = $3;
                        }
                        fixpos($$, $2);
                   }
                | primary_value '.' operation2 command_args     %prec tLOWEST
                    {
                        $$ = new_call($1, $3, $4);
                        fixpos($$, $1);
                    }
                | primary_value '.' operation2 command_args cmd_brace_block
                    {
                        $$ = new_call($1, $3, $4);
                        if ($5) {
                            if (nd_type($$) == NODE_BLOCK_PASS) {
                                rb_compile_error("both block arg and actual block given");
                            }
                            $5->nd_iter = $$;
                            $$ = $5;
                        }
                        fixpos($$, $1);
                   }
                | primary_value tCOLON2 operation2 command_args %prec tLOWEST
                    {
                        $$ = new_call($1, $3, $4);
                        fixpos($$, $1);
                    }
                | primary_value tCOLON2 operation2 command_args cmd_brace_block
                    {
                        $$ = new_call($1, $3, $4);
                        if ($5) {
                            if (nd_type($$) == NODE_BLOCK_PASS) {
                                rb_compile_error("both block arg and actual block given");
                            }
                            $5->nd_iter = $$;
                            $$ = $5;
                        }
                        fixpos($$, $1);
                   }
                | kSUPER command_args
                    {
                        $$ = new_super($2);
                        fixpos($$, $2);
                    }
                | kYIELD command_args
                    {
                        $$ = new_yield($2);
                        fixpos($$, $2);
                    }
                ;

mlhs            : mlhs_basic
                | tLPAREN mlhs_entry ')'
                    {
                        $$ = $2;
                    }
                ;

mlhs_entry      : mlhs_basic
                | tLPAREN mlhs_entry ')'
                    {
                        $$ = NEW_MASGN(NEW_LIST($2), 0);
                    }
                ;

mlhs_basic      : mlhs_head
                    {
                        $$ = NEW_MASGN($1, 0);
                    }
                | mlhs_head mlhs_item
                    {
                        $$ = NEW_MASGN(list_append($1,$2), 0);
                    }
                | mlhs_head tSTAR mlhs_node
                    {
                        $$ = NEW_MASGN($1, $3);
                    }
                | mlhs_head tSTAR
                    {
                        $$ = NEW_MASGN($1, -1);
                    }
                | tSTAR mlhs_node
                    {
                        $$ = NEW_MASGN(0, $2);
                    }
                | tSTAR
                    {
                        $$ = NEW_MASGN(0, -1);
                    }
                ;

mlhs_item       : mlhs_node
                | tLPAREN mlhs_entry ')'
                    {
                        $$ = $2;
                    }
                ;

mlhs_head       : mlhs_item ','
                    {
                        $$ = NEW_LIST($1);
                    }
                | mlhs_head mlhs_item ','
                    {
                        $$ = list_append($1, $2);
                    }
                ;

mlhs_node       : variable
                    {
                        $$ = assignable($1, 0);
                    }
                | primary_value '[' aref_args ']'
                    {
                        $$ = aryset($1, $3);
                    }
                | primary_value '.' tIDENTIFIER
                    {
                        $$ = attrset($1, $3);
                    }
                | primary_value tCOLON2 tIDENTIFIER
                    {
                        $$ = attrset($1, $3);
                    }
                | primary_value '.' tCONSTANT
                    {
                        $$ = attrset($1, $3);
                    }
                | primary_value tCOLON2 tCONSTANT
                    {
                        if (in_def || in_single)
                            yyerror("dynamic constant assignment");
                        $$ = NEW_CDECL(0, 0, NEW_COLON2($1, $3));
                    }
                | tCOLON3 tCONSTANT
                    {
                        if (in_def || in_single)
                            yyerror("dynamic constant assignment");
                        $$ = NEW_CDECL(0, 0, NEW_COLON3($2));
                    }
                | backref
                    {
                        rb_backref_error($1);
                        $$ = 0;
                    }
                ;

lhs             : variable
                    {
                        $$ = assignable($1, 0);
                    }
                | primary_value '[' aref_args ']'
                    {
                        $$ = aryset($1, $3);
                    }
                | primary_value '.' tIDENTIFIER
                    {
                        $$ = attrset($1, $3);
                    }
                | primary_value tCOLON2 tIDENTIFIER
                    {
                        $$ = attrset($1, $3);
                    }
                | primary_value '.' tCONSTANT
                    {
                        $$ = attrset($1, $3);
                    }
                | primary_value tCOLON2 tCONSTANT
                    {
                        if (in_def || in_single)
                            yyerror("dynamic constant assignment");
                        $$ = NEW_CDECL(0, 0, NEW_COLON2($1, $3));
                    }
                | tCOLON3 tCONSTANT
                    {
                        if (in_def || in_single)
                            yyerror("dynamic constant assignment");
                        $$ = NEW_CDECL(0, 0, NEW_COLON3($2));
                    }
                | backref
                    {
                        rb_backref_error($1);
                        $$ = 0;
                    }
                ;

cname           : tIDENTIFIER
                    {
                        yyerror("class/module name must be CONSTANT");
                    }
                | tCONSTANT
                ;

cpath           : tCOLON3 cname
                    {
                        $$ = NEW_COLON3($2);
                    }
                | cname
                    {
                        $$ = NEW_COLON2(0, $$);
                    }
                | primary_value tCOLON2 cname
                    {
                        $$ = NEW_COLON2($1, $3);
                    }
                ;

fname           : tIDENTIFIER
                | tCONSTANT
                | tFID
                | op
                    {
                        lex_state = EXPR_END;
                        $$ = $1;
                    }
                | reswords
                    {
                        lex_state = EXPR_END;
                        $$ = $<id>1;
                    }
                ;

fitem           : fname
                | symbol
                ;

undef_list      : fitem
                    {
                        $$ = NEW_UNDEF($1);
                    }
                | undef_list ',' {lex_state = EXPR_FNAME;} fitem
                    {
                        $$ = block_append($1, NEW_UNDEF($4));
                    }
                ;

op              : '|'           { $$ = '|'; }
                | '^'           { $$ = '^'; }
                | '&'           { $$ = '&'; }
                | tCMP          { $$ = tCMP; }
                | tEQ           { $$ = tEQ; }
                | tEQQ          { $$ = tEQQ; }
                | tMATCH        { $$ = tMATCH; }
                | '>'           { $$ = '>'; }
                | tGEQ          { $$ = tGEQ; }
                | '<'           { $$ = '<'; }
                | tLEQ          { $$ = tLEQ; }
                | tLSHFT        { $$ = tLSHFT; }
                | tRSHFT        { $$ = tRSHFT; }
                | '+'           { $$ = '+'; }
                | '-'           { $$ = '-'; }
                | '*'           { $$ = '*'; }
                | tSTAR         { $$ = '*'; }
                | '/'           { $$ = '/'; }
                | '%'           { $$ = '%'; }
                | tPOW          { $$ = tPOW; }
                | '~'           { $$ = '~'; }
                | tUPLUS        { $$ = tUPLUS; }
                | tUMINUS       { $$ = tUMINUS; }
                | tAREF         { $$ = tAREF; }
                | tASET         { $$ = tASET; }
                | '`'           { $$ = '`'; }
                ;

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);
                    }
                | lhs '=' arg kRESCUE_MOD arg
                    {
                        $$ = node_assign($1, NEW_RESCUE($3, NEW_RESBODY(0,$5,0), 0));
                    }
                | 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;
                        }
                    }
                | 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);
                    }
                | 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);
                    }
                | 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);
                    }
                | 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);
                    }
                | primary_value tCOLON2 tCONSTANT tOP_ASGN arg
                    {
                        yyerror("constant re-assignment");
                        $$ = 0;
                    }
                | tCOLON3 tCONSTANT tOP_ASGN arg
                    {
                        yyerror("constant re-assignment");
                        $$ = 0;
                    }
                | backref tOP_ASGN arg
                    {
                        rb_backref_error($1);
                        $$ = 0;
                    }
                | 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);
                        }
                    }
                | 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);
                        }
                    }
                | arg '+' arg
                    {
                        $$ = call_op($1, '+', 1, $3);
                    }
                | arg '-' arg
                    {
                        $$ = call_op($1, '-', 1, $3);
                    }
                | arg '*' arg
                    {
                        $$ = call_op($1, '*', 1, $3);
                    }
                | arg '/' arg
                    {
                        $$ = call_op($1, '/', 1, $3);
                    }
                | arg '%' arg
                    {
                        $$ = call_op($1, '%', 1, $3);
                    }
                | arg tPOW arg
                    {
                        $$ = call_op($1, tPOW, 1, $3);
                    }
                | tUMINUS_NUM tINTEGER tPOW arg
                    {
                        $$ = call_op(call_op($2, tPOW, 1, $4), tUMINUS, 0, 0);
                    }
                | tUMINUS_NUM tFLOAT tPOW arg
                    {
                        $$ = call_op(call_op($2, tPOW, 1, $4), tUMINUS, 0, 0);
                    }
                | tUPLUS arg
                    {
                        if ($2 && nd_type($2) == NODE_LIT) {
                            $$ = $2;
                        }
                        else {
                            $$ = call_op($2, tUPLUS, 0, 0);
                        }
                    }
                | tUMINUS arg
                    {
                        $$ = call_op($2, tUMINUS, 0, 0);
                    }
                | arg '|' arg
                    {
                        $$ = call_op($1, '|', 1, $3);
                    }
                | arg '^' arg
                    {
                        $$ = call_op($1, '^', 1, $3);
                    }
                | arg '&' arg
                    {
                        $$ = call_op($1, '&', 1, $3);
                    }
                | arg tCMP arg
                    {
                        $$ = call_op($1, tCMP, 1, $3);
                    }
                | arg '>' arg
                    {
                        $$ = call_op($1, '>', 1, $3);
                    }
                | arg tGEQ arg
                    {
                        $$ = call_op($1, tGEQ, 1, $3);
                    }
                | arg '<' arg
                    {
                        $$ = call_op($1, '<', 1, $3);
                    }
                | arg tLEQ arg
                    {
                        $$ = call_op($1, tLEQ, 1, $3);
                    }
                | arg tEQ arg
                    {
                        $$ = call_op($1, tEQ, 1, $3);
                    }
                | arg tEQQ arg
                    {
                        $$ = call_op($1, tEQQ, 1, $3);
                    }
                | arg tNEQ arg
                    {
                        $$ = NEW_NOT(call_op($1, tEQ, 1, $3));
                    }
                | arg tMATCH arg
                    {
                        $$ = match_gen($1, $3);
                    }
                | arg tNMATCH arg
                    {
                        $$ = NEW_NOT(match_gen($1, $3));
                    }
                | '!' arg
                    {
                        $$ = NEW_NOT(cond($2));
                    }
                | '~' arg
                    {
                        $$ = call_op($2, '~', 0, 0);
                    }
                | arg tLSHFT arg
                    {
                        $$ = call_op($1, tLSHFT, 1, $3);
                    }
                | arg tRSHFT arg
                    {
                        $$ = call_op($1, tRSHFT, 1, $3);
                    }
                | arg tANDOP arg
                    {
                        $$ = logop(NODE_AND, $1, $3);
                    }
                | arg tOROP arg
                    {
                        $$ = logop(NODE_OR, $1, $3);
                    }
                | kDEFINED opt_nl {in_defined = 1;} arg
                    {
                        in_defined = 0;
                        $$ = NEW_DEFINED($4);
                    }
                | arg '?' arg ':' arg
                    {
                        $$ = NEW_IF(cond($1), $3, $5);
                        fixpos($$, $1);
                    }
                | primary
                    {
                        $$ = $1;
                    }
                ;

arg_value       : arg
                    {
                        value_expr($1);
                        $$ = $1;
                    }
                ;

aref_args       : none
                | command opt_nl
                    {
                        rb_warn("parenthesize argument(s) for future version");
                        $$ = NEW_LIST($1);
                    }
                | args trailer
                    {
                        $$ = $1;
                    }
                | args ',' tSTAR arg opt_nl
                    {
                        value_expr($4);
                        $$ = arg_concat($1, $4);
                    }
                | assocs trailer
                    {
                        $$ = NEW_LIST(NEW_HASH($1));
                    }
                | tSTAR arg opt_nl
                    {
                        value_expr($2);
                        $$ = NEW_NEWLINE(NEW_SPLAT($2));
                    }
                ;

paren_args      : '(' none ')'
                    {
                        $$ = $2;
                    }
                | '(' call_args opt_nl ')'
                    {
                        $$ = $2;
                    }
                | '(' block_call opt_nl ')'
                    {
                        rb_warn("parenthesize argument for future version");
                        $$ = NEW_LIST($2);
                    }
                | '(' args ',' block_call opt_nl ')'
                    {
                        rb_warn("parenthesize argument for future version");
                        $$ = list_append($2, $4);
                    }
                ;

opt_paren_args  : none
                | paren_args
                ;

call_args       : command
                    {
                        rb_warn("parenthesize argument(s) for future version");
                        $$ = NEW_LIST($1);
                    }
                | args opt_block_arg
                    {
                        $$ = arg_blk_pass($1, $2);
                    }
                | args ',' tSTAR arg_value opt_block_arg
                    {
                        $$ = arg_concat($1, $4);
                        $$ = arg_blk_pass($$, $5);
                    }
                | assocs opt_block_arg
                    {
                        $$ = NEW_LIST(NEW_HASH($1));
                        $$ = arg_blk_pass($$, $2);
                    }
                | assocs ',' tSTAR arg_value opt_block_arg
                    {
                        $$ = arg_concat(NEW_LIST(NEW_HASH($1)), $4);
                        $$ = arg_blk_pass($$, $5);
                    }
                | args ',' assocs opt_block_arg
                    {
                        $$ = list_append($1, NEW_HASH($3));
                        $$ = arg_blk_pass($$, $4);
                    }
                | args ',' assocs ',' tSTAR arg opt_block_arg
                    {
                        value_expr($6);
                        $$ = arg_concat(list_append($1, NEW_HASH($3)), $6);
                        $$ = arg_blk_pass($$, $7);
                    }
                | tSTAR arg_value opt_block_arg
                    {
                        $$ = arg_blk_pass(NEW_SPLAT($2), $3);
                    }
                | block_arg
                ;

call_args2      : arg_value ',' args opt_block_arg
                    {
                        $$ = arg_blk_pass(list_concat(NEW_LIST($1),$3), $4);
                    }
                | arg_value ',' block_arg
                    {
                        $$ = arg_blk_pass($1, $3);
                    }
                | arg_value ',' tSTAR arg_value opt_block_arg
                    {
                        $$ = arg_concat(NEW_LIST($1), $4);
                        $$ = arg_blk_pass($$, $5);
                    }
                | arg_value ',' args ',' tSTAR arg_value opt_block_arg
                    {
                       $$ = arg_concat(list_concat(NEW_LIST($1),$3), $6);
                        $$ = arg_blk_pass($$, $7);
                    }
                | assocs opt_block_arg
                    {
                        $$ = NEW_LIST(NEW_HASH($1));
                        $$ = arg_blk_pass($$, $2);
                    }
                | assocs ',' tSTAR arg_value opt_block_arg
                    {
                        $$ = arg_concat(NEW_LIST(NEW_HASH($1)), $4);
                        $$ = arg_blk_pass($$, $5);
                    }
                | arg_value ',' assocs opt_block_arg
                    {
                        $$ = list_append(NEW_LIST($1), NEW_HASH($3));
                        $$ = arg_blk_pass($$, $4);
                    }
                | arg_value ',' args ',' assocs opt_block_arg
                    {
                        $$ = list_append(list_concat(NEW_LIST($1),$3), NEW_HASH($5));
                        $$ = arg_blk_pass($$, $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_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);
                    }
                | tSTAR arg_value opt_block_arg
                    {
                        $$ = arg_blk_pass(NEW_SPLAT($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;} ')'
                    {
                        rb_warn("don't put space before argument parentheses");
                        $$ = 0;
                    }
                | tLPAREN_ARG call_args2 {lex_state = EXPR_ENDARG;} ')'
                    {
                        rb_warn("don't put space before argument parentheses");
                        $$ = $2;
                    }
                ;

block_arg       : tAMPER arg_value
                    {
                        $$ = NEW_BLOCK_PASS($2);
                    }
                ;

opt_block_arg   : ',' block_arg
                    {
                        $$ = $2;
                    }
                | none
                ;

args            : arg_value
                    {
                        $$ = NEW_LIST($1);
                    }
                | args ',' arg_value
                    {
                        $$ = list_append($1, $3);
                    }
                ;

mrhs            : args ',' arg_value
                    {
                        $$ = list_append($1, $3);
                    }
                | args ',' tSTAR arg_value
                    {
                        $$ = arg_concat($1, $4);
                    }
                | tSTAR arg_value
                    {
                        $$ = NEW_SPLAT($2);
                    }
                ;

primary         : literal
                | strings
                | xstring
                | regexp
                | words
                | qwords
                | var_ref
                | backref
                | tFID
                    {
                        $$ = NEW_FCALL($1, 0);
                    }
                | kBEGIN
                    {
                        $<num>1 = ruby_sourceline;
                    }
                  bodystmt
                  kEND
                    {
                        if ($3 == NULL)
                            $$ = NEW_NIL();
                        else
                            $$ = NEW_BEGIN($3);
                        nd_set_line($$, $<num>1);
                    }
                | tLPAREN_ARG expr {lex_state = EXPR_ENDARG;} opt_nl ')'
                    {
                        rb_warning("(...) interpreted as grouped expression");
                        $$ = $2;
                    }
                | tLPAREN compstmt ')'
                    {
                        $$ = $2;
                    }
                | primary_value tCOLON2 tCONSTANT
                    {
                        $$ = NEW_COLON2($1, $3);
                    }
                | tCOLON3 tCONSTANT
                    {
                        $$ = NEW_COLON3($2);
                    }
                | primary_value '[' aref_args ']'
                    {
                        if ($1 && nd_type($1) == NODE_SELF)
                            $$ = NEW_FCALL(tAREF, $3);
                        else
                            $$ = NEW_CALL($1, tAREF, $3);
                        fixpos($$, $1);
                    }
                | tLBRACK aref_args ']'
                    {
                        if ($2 == 0) {
                            $$ = NEW_ZARRAY(); /* zero length array*/
                        }
                        else {
                            $$ = $2;
                        }
                    }
                | tLBRACE assoc_list '}'
                    {
                        $$ = NEW_HASH($2);
                    }
                | kRETURN
                    {
                        $$ = NEW_RETURN(0);
                    }
                | kYIELD '(' call_args ')'
                    {
                        $$ = new_yield($3);
                    }
                | kYIELD '(' ')'
                    {
                        $$ = NEW_YIELD(0, Qfalse);
                    }
                | kYIELD
                    {
                        $$ = NEW_YIELD(0, Qfalse);
                    }
                | kDEFINED opt_nl '(' {in_defined = 1;} expr ')'
                    {
                        in_defined = 0;
                        $$ = NEW_DEFINED($5);
                    }
                | operation brace_block
                    {
                        $2->nd_iter = NEW_FCALL($1, 0);
                        $$ = $2;
                        fixpos($2->nd_iter, $2);
                    }
                | method_call
                | method_call brace_block
                    {
                        if ($1 && nd_type($1) == NODE_BLOCK_PASS) {
                            rb_compile_error("both block arg and actual block given");
                        }
                        $2->nd_iter = $1;
                        $$ = $2;
                        fixpos($$, $1);
                    }
                | 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;
                        }
                    }
                | 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;
                        }
                    }
                | 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);
                        }
                    }
                | 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);
                        }
                    }
                | kCASE expr_value opt_terms
                  case_body
                  kEND
                    {
                        $$ = NEW_CASE($2, $4);
                        fixpos($$, $2);
                    }
                | kCASE opt_terms case_body kEND
                    {
                        $$ = $3;
                    }
                | kCASE opt_terms kELSE compstmt kEND
                    {
                        $$ = $4;
                    }
                | kFOR block_var kIN {COND_PUSH(1);} expr_value do {COND_POP();}
                  compstmt
                  kEND
                    {
                        $$ = NEW_FOR($2, $5, $8);
                        fixpos($$, $2);
                    }
                | kCLASS cpath superclass
                    {
                        if (in_def || in_single)
                            yyerror("class definition in method body");
                        class_nest++;
                        local_push(0);
                        $<num>$ = ruby_sourceline;
                    }
                  bodystmt
                  kEND
                    {
                        $$ = NEW_CLASS($2, $5, $3);
                        nd_set_line($$, $<num>4);
                        local_pop();
                        class_nest--;
                    }
                | kCLASS tLSHFT expr
                    {
                        $<num>$ = in_def;
                        in_def = 0;
                    }
                  term
                    {
                        $<num>$ = in_single;
                        in_single = 0;
                        class_nest++;
                        local_push(0);
                    }
                  bodystmt
                  kEND
                    {
                        $$ = NEW_SCLASS($3, $7);
                        fixpos($$, $3);
                        local_pop();
                        class_nest--;
                        in_def = $<num>4;
                        in_single = $<num>6;
                    }
                | kMODULE cpath
                    {
                        if (in_def || in_single)
                            yyerror("module definition in method body");
                        class_nest++;
                        local_push(0);
                        $<num>$ = ruby_sourceline;
                    }
                  bodystmt
                  kEND
                    {
                        $$ = NEW_MODULE($2, $4);
                        nd_set_line($$, $<num>3);
                        local_pop();
                        class_nest--;
                    }
                | kDEF fname
                    {
                        $<id>$ = cur_mid;
                        cur_mid = $2;
                        in_def++;
                        local_push(0);
                    }
                  f_arglist
                  bodystmt
                  kEND
                    {
                        if (!$5) $5 = NEW_NIL();
                        $$ = NEW_DEFN($2, $4, $5, NOEX_PRIVATE);
                        fixpos($$, $4);
                        local_pop();
                        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 */
                    }
                  f_arglist
                  bodystmt
                  kEND
                    {
                        $$ = NEW_DEFS($2, $5, $7, $8);
                        fixpos($$, $2);
                        local_pop();
                        in_single--;
                    }
                | kBREAK
                    {
                        $$ = NEW_BREAK(0);
                    }
                | kNEXT
                    {
                        $$ = NEW_NEXT(0);
                    }
                | kREDO
                    {
                        $$ = NEW_REDO();
                    }
                | kRETRY
                    {
                        $$ = NEW_RETRY();
                    }
                ;

primary_value   : primary
                    {
                        value_expr($1);
                        $$ = $1;
                    }
                ;

then            : term
                | ':'
                | kTHEN
                | term kTHEN
                ;

do              : term
                | ':'
                | kDO_COND
                ;

if_tail         : opt_else
                | kELSIF expr_value then
                  compstmt
                  if_tail
                    {
                        $$ = NEW_IF(cond($2), $4, $5);
                        fixpos($$, $2);
                    }
                ;

opt_else        : none
                | kELSE compstmt
                    {
                        $$ = $2;
                    }
                ;

block_var       : lhs
                | mlhs
                ;

opt_block_var   : none
                | '|' /* none */ '|'
                    {
                        $$ = (NODE*)1;
                    }
                | tOROP
                    {
                        $$ = (NODE*)1;
                    }
                | '|' block_var '|'
                    {
                        $$ = $2;
                    }
                ;

do_block        : kDO_BLOCK
                    {
                        $<vars>$ = dyna_push();
                        $<num>1 = ruby_sourceline;
                    }
                  opt_block_var {$<vars>$ = ruby_dyna_vars;}
                  compstmt
                  kEND
                    {
                        $$ = NEW_ITER($3, 0, dyna_init($5, $<vars>4));
                        nd_set_line($$, $<num>1);
                        dyna_pop($<vars>2);
                    }
                ;

block_call      : command do_block
                    {
                        if ($1 && nd_type($1) == NODE_BLOCK_PASS) {
                            rb_compile_error("both block arg and actual block given");
                        }
                        $2->nd_iter = $1;
                        $$ = $2;
                        fixpos($$, $1);
                    }
                | block_call '.' operation2 opt_paren_args
                    {
                        $$ = new_call($1, $3, $4);
                    }
                | block_call tCOLON2 operation2 opt_paren_args
                    {
                        $$ = new_call($1, $3, $4);
                    }
                ;

method_call     : operation paren_args
                    {
                        $$ = new_fcall($1, $2);
                        fixpos($$, $2);
                    }
                | primary_value '.' operation2 opt_paren_args
                    {
                        $$ = new_call($1, $3, $4);
                        fixpos($$, $1);
                    }
                | primary_value tCOLON2 operation2 paren_args
                    {
                        $$ = new_call($1, $3, $4);
                        fixpos($$, $1);
                    }
                | primary_value tCOLON2 operation3
                    {
                        $$ = new_call($1, $3, 0);
                    }
                | kSUPER paren_args
                    {
                        $$ = new_super($2);
                    }
                | kSUPER
                    {
                        $$ = NEW_ZSUPER();
                    }
                ;

brace_block     : '{'
                    {
                        $<vars>$ = dyna_push();
                        $<num>1 = ruby_sourceline;
                    }
                  opt_block_var {$<vars>$ = ruby_dyna_vars;}
                  compstmt '}'
                    {
                        $$ = NEW_ITER($3, 0, dyna_init($5, $<vars>4));
                        nd_set_line($$, $<num>1);
                        dyna_pop($<vars>2);
                    }
                | kDO
                    {
                        $<vars>$ = dyna_push();
                        $<num>1 = ruby_sourceline;
                    }
                  opt_block_var {$<vars>$ = ruby_dyna_vars;}
                  compstmt kEND
                    {
                        $$ = NEW_ITER($3, 0, dyna_init($5, $<vars>4));
                        nd_set_line($$, $<num>1);
                        dyna_pop($<vars>2);
                    }
                ;

case_body       : kWHEN when_args then
                  compstmt
                  cases
                    {
                        $$ = NEW_WHEN($2, $4, $5);
                    }
                ;
when_args       : args
                | args ',' tSTAR arg_value
                    {
                        $$ = list_append($1, NEW_WHEN($4, 0, 0));
                    }
                | tSTAR arg_value
                    {
                        $$ = NEW_LIST(NEW_WHEN($2, 0, 0));
                    }
                ;

cases           : opt_else
                | case_body
                ;

opt_rescue      : kRESCUE exc_list exc_var then
                  compstmt
                  opt_rescue
                    {
                        if ($3) {
                            $3 = node_assign($3, NEW_GVAR(rb_intern("$!")));
                            $5 = block_append($3, $5);
                        }
                        $$ = NEW_RESBODY($2, $5, $6);
                        fixpos($$, $2?$2:$5);
                    }
                | none
                ;

exc_list        : arg_value
                    {
                        $$ = NEW_LIST($1);
                    }
                | mrhs
                | none
                ;

exc_var         : tASSOC lhs
                    {
                        $$ = $2;
                    }
                | none
                ;

opt_ensure      : kENSURE compstmt
                    {
                        if ($2)
                            $$ = $2;
                        else
                            /* place holder */
                            $$ = NEW_NIL();
                    }
                | none
                ;

literal         : numeric
                | symbol
                    {
                        $$ = NEW_LIT(ID2SYM($1));
                    }
                | dsym
                ;

strings         : string
                    {
                        NODE *node = $1;
                        if (!node) {
                            node = NEW_STR(rb_str_new(0, 0));
                        }
                        else {
                            node = evstr2dstr(node);
                        }
                        $$ = node;
                    }
                ;

string          : string1
                | string string1
                    {
                        $$ = literal_concat($1, $2);
                    }
                ;

string1         : tSTRING_BEG string_contents tSTRING_END
                    {
                        $$ = $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;
                    }
                ;

regexp          : tREGEXP_BEG xstring_contents tREGEXP_END
                    {
                        int options = $3;
                        NODE *node = $2;
                        if (!node) {
                            node = NEW_LIT(rb_reg_new("", 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_new(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;
                    }
                ;

words           : tWORDS_BEG ' ' tSTRING_END
                    {
                        $$ = NEW_ZARRAY();
                    }
                | tWORDS_BEG word_list tSTRING_END
                    {
                        $$ = $2;
                    }
                ;

word_list       : /* none */
                    {
                        $$ = 0;
                    }
                | word_list word ' '
                    {
                        $$ = list_append($1, evstr2dstr($2));
                    }
                ;

word            : string_content
                | word string_content
                    {
                        $$ = literal_concat($1, $2);
                    }
                ;

qwords          : tQWORDS_BEG ' ' tSTRING_END
                    {
                        $$ = NEW_ZARRAY();
                    }
                | tQWORDS_BEG qword_list tSTRING_END
                    {
                        $$ = $2;
                    }
                ;

qword_list      : /* none */
                    {
                        $$ = 0;
                    }
                | qword_list tSTRING_CONTENT ' '
                    {
                        $$ = list_append($1, $2);
                    }
                ;

string_contents : /* none */
                    {
                        $$ = 0;
                    }
                | string_contents string_content
                    {
                        $$ = literal_concat($1, $2);
                    }
                ;

xstring_contents: /* none */
                    {
                        $$ = 0;
                    }
                | xstring_contents string_content
                    {
                        $$ = literal_concat($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);
                    }
                | 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) && nd_type($$) == NODE_NEWLINE) {
                            $$ = $$->nd_next;
                            rb_gc_force_recycle((VALUE)$3);
                        }
                        $$ = new_evstr($$);
                    }
                ;

string_dvar     : tGVAR {$$ = NEW_GVAR($1);}
                | tIVAR {$$ = NEW_IVAR($1);}
                | tCVAR {$$ = NEW_CVAR($1);}
                | backref
                ;

symbol          : tSYMBEG sym
                    {
                        lex_state = EXPR_END;
                        $$ = $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;
                            }
                        }
                    }
                ;

numeric         : tINTEGER
                | tFLOAT
                | tUMINUS_NUM tINTEGER         %prec tLOWEST
                    {
                        $$ = negate_lit($2);
                    }
                | tUMINUS_NUM tFLOAT           %prec tLOWEST
                    {
                        $$ = negate_lit($2);
                    }
                ;

variable        : tIDENTIFIER
                | tIVAR
                | tGVAR
                | tCONSTANT
                | tCVAR
                | kNIL {$$ = kNIL;}
                | kSELF {$$ = kSELF;}
                | kTRUE {$$ = kTRUE;}
                | kFALSE {$$ = kFALSE;}
                | k__FILE__ {$$ = k__FILE__;}
                | k__LINE__ {$$ = k__LINE__;}
                ;

var_ref         : variable
                    {
                        $$ = gettable($1);
                    }
                ;

var_lhs         : variable
                    {
                        $$ = assignable($1, 0);
                    }
                ;

backref         : tNTH_REF
                | tBACK_REF
                ;

superclass      : term
                    {
                        $$ = 0;
                    }
                | '<'
                    {
                        lex_state = EXPR_BEG;
                    }
                  expr_value term
                    {
                        $$ = $3;
                    }
                | error term {yyerrok; $$ = 0;}
                ;

f_arglist       : '(' f_args opt_nl ')'
                    {
                        $$ = $2;
                        lex_state = EXPR_BEG;
                    }
                | f_args term
                    {
                        $$ = $1;
                    }
                ;

f_args          : f_arg ',' f_optarg ',' f_rest_arg opt_f_block_arg
                    {
                        $$ = block_append(NEW_ARGS($1, $3, $5), $6);
                    }
                | f_arg ',' f_optarg opt_f_block_arg
                    {
                        $$ = block_append(NEW_ARGS($1, $3, -1), $4);
                    }
                | f_arg ',' f_rest_arg opt_f_block_arg
                    {
                        $$ = block_append(NEW_ARGS($1, 0, $3), $4);
                    }
                | f_arg opt_f_block_arg
                    {
                        $$ = block_append(NEW_ARGS($1, 0, -1), $2);
                    }
                | f_optarg ',' f_rest_arg opt_f_block_arg
                    {
                        $$ = block_append(NEW_ARGS(0, $1, $3), $4);
                    }
                | f_optarg opt_f_block_arg
                    {
                        $$ = block_append(NEW_ARGS(0, $1, -1), $2);
                    }
                | f_rest_arg opt_f_block_arg
                    {
                        $$ = block_append(NEW_ARGS(0, 0, $1), $2);
                    }
                | f_block_arg
                    {
                        $$ = block_append(NEW_ARGS(0, 0, -1), $1);
                    }
                | /* none */
                    {
                        $$ = NEW_ARGS(0, 0, -1);
                    }
                ;

f_norm_arg      : tCONSTANT
                    {
                        yyerror("formal argument cannot be a constant");
                    }
                | tIVAR
                    {
                        yyerror("formal argument cannot be an instance variable");
                    }
                | tGVAR
                    {
                        yyerror("formal argument cannot be a global variable");
                    }
                | tCVAR
                    {
                        yyerror("formal argument cannot be a class variable");
                    }
                | tIDENTIFIER
                    {
                        if (!is_local_id($1))
                            yyerror("formal argument must be local variable");
                        else if (local_id($1))
                            yyerror("duplicate argument name");
                        local_cnt($1);
                        $$ = 1;
                    }
                ;

f_arg           : f_norm_arg
                | f_arg ',' f_norm_arg
                    {
                        $$ += 1;
                    }
                ;

f_opt           : tIDENTIFIER '=' arg_value
                    {
                        if (!is_local_id($1))
                            yyerror("formal argument must be local variable");
                        else if (local_id($1))
                            yyerror("duplicate optional argument name");
                        $$ = assignable($1, $3);
                    }
                ;

f_optarg        : f_opt
                    {
                        $$ = NEW_BLOCK($1);
                        $$->nd_end = $$;
                    }
                | f_optarg ',' f_opt
                    {
                        $$ = block_append($1, $3);
                    }
                ;

restarg_mark    : '*'
                | tSTAR
                ;

f_rest_arg      : restarg_mark tIDENTIFIER
                    {
                        if (!is_local_id($2))
                            yyerror("rest argument must be local variable");
                        else if (local_id($2))
                            yyerror("duplicate rest argument name");
                        $$ = local_cnt($2);
                    }
                | restarg_mark
                    {
                        $$ = -2;
                    }
                ;

blkarg_mark     : '&'
                | tAMPER
                ;

f_block_arg     : blkarg_mark tIDENTIFIER
                    {
                        if (!is_local_id($2))
                            yyerror("block argument must be local variable");
                        else if (local_id($2))
                            yyerror("duplicate block argument name");
                        $$ = NEW_BLOCK_ARG($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($$);
                        }
                    }
                | '(' {lex_state = EXPR_BEG;} expr opt_nl ')'
                    {
                        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;
                    }
                ;

assoc_list      : none
                | assocs trailer
                    {
                        $$ = $1;
                    }
                | args trailer
                    {
                        if ($1->nd_alen%2 != 0) {
                            yyerror("odd number list for Hash");
                        }
                        $$ = $1;
                    }
                ;

assocs          : assoc
                | assocs ',' assoc
                    {
                        $$ = list_concat($1, $3);
                    }
                ;

assoc           : arg_value tASSOC arg_value
                    {
                        $$ = list_append(NEW_LIST($1), $3);
                    }
                ;

operation       : tIDENTIFIER
                | tCONSTANT
                | tFID
                ;

operation2      : tIDENTIFIER
                | tCONSTANT
                | tFID
                | op
                ;

operation3      : tIDENTIFIER
                | tFID
                | op
                ;

dot_or_colon    : '.'
                | tCOLON2
                ;

opt_terms       : /* none */
                | terms
                ;

opt_nl          : /* none */
                | '\n'
                ;

trailer         : /* none */
                | '\n'
                | ','
                ;

term            : ';' {yyerrok;}
                | '\n'
                ;

terms           : term
                | terms ';' {yyerrok;}
                ;

none            : /* none */ {$$ = 0;}
                ;
%%
#ifdef yystacksize
#undef YYMALLOC
#endif

#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 char *tokenbuf = NULL;
static int   tokidx, toksiz = 0;

#define LEAVE_BS 1

static VALUE (*lex_gets)();     /* gets function */
static VALUE lex_input;         /* non-nil if File */
static VALUE lex_lastline;      /* gc protect */
static char *lex_pbeg;
static char *lex_p;
static char *lex_pend;

static int
yyerror(msg)
    const char *msg;
{
    char *p, *pe, *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) {
        buf = ALLOCA_N(char, len+2);
        MEMCPY(buf, p, char, len);
        buf[len] = '\0';
        rb_compile_error_append("%s", buf);

        i = lex_p - p;
        p = buf; pe = p + len;

        while (p < pe) {
            if (*p != '\t') *p = ' ';
            p++;
        }
        buf[i] = '^';
        buf[i+1] = '\0';
        rb_compile_error_append("%s", buf);
    }

    return 0;
}

static int heredoc_end;
static int command_start = Qtrue;

int ruby_in_compile = 0;
int ruby__end__seen;

static VALUE ruby_debug_lines;
#ifdef YYMALLOC
static NODE *parser_heap;
#endif

static NODE*
yycompile(f, line)
    char *f;
    int line;
{
    int n;
    NODE *node = 0;
    struct RVarmap *vp, *vars = ruby_dyna_vars;

    ruby_in_compile = 1;
    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);
            while (line > 1) {
                rb_ary_push(ruby_debug_lines, str);
                line--;
            }
        }
    }

    ruby__end__seen = 0;
    ruby_eval_tree = 0;
    heredoc_end = 0;
    lex_strterm = 0;
    ruby_current_node = 0;
    ruby_sourcefile = rb_source_filename(f);
    n = yyparse();
    ruby_debug_lines = 0;
    compile_for_eval = 0;
    ruby_in_compile = 0;
    cond_stack = 0;
    cmdarg_stack = 0;
    command_start = 1;
    class_nest = 0;
    in_single = 0;
    in_def = 0;
    cur_mid = 0;

    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 (n == 0) node = ruby_eval_tree;
    else ruby_eval_tree_begin = 0;
    return node;
}

static int lex_gets_ptr;

static VALUE
lex_get_str(s)
    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()
{
    VALUE line = (*lex_gets)(lex_input);
    if (ruby_debug_lines && !NIL_P(line)) {
        rb_ary_push(ruby_debug_lines, line);
    }
    return line;
}

NODE*
rb_compile_string(f, s, line)
    const char *f;
    VALUE s;
    int line;
{
    lex_gets = lex_get_str;
    lex_gets_ptr = 0;
    lex_input = s;
    lex_pbeg = lex_p = lex_pend = 0;
    ruby_sourceline = line - 1;
    compile_for_eval = ruby_in_eval;

    return yycompile(f, line);
}

NODE*
rb_compile_cstr(f, s, len, line)
    const char *f, *s;
    int len, line;
{
    return rb_compile_string(f, rb_str_new(s, len), line);
}

NODE*
rb_compile_file(f, file, start)
    const char *f;
    VALUE file;
    int start;
{
    lex_gets = rb_io_gets;
    lex_input = file;
    lex_pbeg = lex_p = lex_pend = 0;
    ruby_sourceline = start - 1;

    return yycompile(f, start);
}

static inline int
nextc()
{
    int c;

    if (lex_p == lex_pend) {
        if (lex_input) {
            VALUE v = lex_getline();

            if (NIL_P(v)) return -1;
            if (heredoc_end > 0) {
                ruby_sourceline = heredoc_end;
                heredoc_end = 0;
            }
            ruby_sourceline++;
            lex_pbeg = lex_p = RSTRING(v)->ptr;
            lex_pend = lex_p + RSTRING(v)->len;
            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
pushback(c)
    int c;
{
    if (c == -1) return;
    lex_p--;
}

#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*
newtok()
{
    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
tokadd(c)
    char c;
{
    tokenbuf[tokidx++] = c;
    if (tokidx >= toksiz) {
        toksiz *= 2;
        REALLOC_N(tokenbuf, char, toksiz);
    }
}

static int
read_escape()
{
    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
tokadd_escape(term)
    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
regx_options()
{
    char kcode = 0;
    int options = 0;
    int c;

    newtok();
    while (c = nextc(), ISALPHA(c)) {
        switch (c) {
          case 'i':
            options |= RE_OPTION_IGNORECASE;
            break;
          case 'x':
            options |= RE_OPTION_EXTENDED;
            break;
          case 'm':
            options |= RE_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();
        rb_compile_error("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(str)
    VALUE str;
{
    xfree(RSTRING(str)->ptr);
    rb_gc_force_recycle(str);
}

static int
tokadd_string(func, term, paren, nest)
    int func, term, paren, *nest;
{
    int c;

    while ((c = nextc()) != -1) {
        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(c)) {
            int i, len = mbclen(c)-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("symbol cannot contain '\\0'");
            continue;
        }
        tokadd(c);
    }
    return c;
}

#define NEW_STRTERM(func, term, paren) \
        rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0)

static int
parse_string(quote)
    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;
        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("unterminated string meets end of file");
        return tSTRING_END;
    }

    tokfix();
    yylval.node = NEW_STR(rb_str_new(tok(), toklen()));
    return tSTRING_CONTENT;
}

static int
heredoc_identifier()
{
    int c = nextc(), term, func = 0, len;

    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) {
            len = mbclen(c);
            do {tokadd(c);} while (--len > 0 && (c = nextc()) != -1);
        }
        if (c == -1) {
            rb_compile_error("unterminated here document identifier");
            return 0;
        }
        break;

      default:
        if (!is_identchar(c)) {
            pushback(c);
            if (func & STR_FUNC_INDENT) {
                pushback('-');
            }
            return 0;
        }
        newtok();
        term = '"';
        tokadd(func |= str_dquote);
        do {
            len = mbclen(c);
            do {tokadd(c);} while (--len > 0 && (c = nextc()) != -1);
        } while ((c = nextc()) != -1 && is_identchar(c));
        pushback(c);
        break;
    }

    tokfix();
    len = lex_p - lex_pbeg;
    lex_p = lex_pend;
    lex_strterm = rb_node_newnode(NODE_HEREDOC,
                                  rb_str_new(tok(), toklen()),  /* nd_lit */
                                  len,                          /* nd_nth */
                                  lex_lastline);                /* nd_orig */
    return term == '`' ? tXSTRING_BEG : tSTRING_BEG;
}

static void
heredoc_restore(here)
    NODE *here;
{
    VALUE 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);
}

static int
whole_match_p(eos, len, indent)
    char *eos;
    int len, indent;
{
    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
here_document(here)
    NODE *here;
{
    int c, func, indent = 0;
    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("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_p = lex_pend;
            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') {
                yylval.node = NEW_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);
    yylval.node = NEW_STR(str);
    return tSTRING_CONTENT;
}

#include "lex.c"

static void
arg_ambiguous()
{
    rb_warning("ambiguous first argument; put parentheses or even spaces");
}

#define IS_ARG() (lex_state == EXPR_ARG || lex_state == EXPR_CMDARG)

static int
yylex()
{
    register int c;
    int space_seen = 0;
    int cmd_state;
    enum lex_state last_state;

    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:
    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 */
        while ((c = nextc()) != '\n') {
            if (c == -1)
                return 0;
        }
        /* fall through */
      case '\n':
        switch (lex_state) {
          case EXPR_BEG:
          case EXPR_FNAME:
          case EXPR_DOT:
          case EXPR_CLASS:
            goto retry;
          default:
            break;
        }
        command_start = Qtrue;
        lex_state = EXPR_BEG;
        return '\n';

      case '*':
        if ((c = nextc()) == '*') {
            if ((c = nextc()) == '=') {
                yylval.id = tPOW;
                lex_state = EXPR_BEG;
                return tOP_ASGN;
            }
            pushback(c);
            c = tPOW;
        }
        else {
            if (c == '=') {
                yylval.id = '*';
                lex_state = EXPR_BEG;
                return tOP_ASGN;
            }
            pushback(c);
            if (IS_ARG() && space_seen && !ISSPACE(c)){
                rb_warning("`*' interpreted as argument prefix");
                c = tSTAR;
            }
            else if (lex_state == EXPR_BEG || lex_state == EXPR_MID) {
                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])) {
                for (;;) {
                    lex_p = lex_pend;
                    c = nextc();
                    if (c == -1) {
                        rb_compile_error("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_p = lex_pend;
                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_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()) == '=') {
                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()) == '=') {
                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_ENDARG) {
            lex_state = EXPR_BEG;
            return '?';
        }
        c = nextc();
        if (c == -1) {
            rb_compile_error("incomplete character syntax");
            return 0;
        }
        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_warn("invalid character syntax; use ?\\%c", c2);
                }
            }
          ternary:
            pushback(c);
            lex_state = EXPR_BEG;
            return '?';
        }
        else if (ismbchar(c)) {
            rb_warn("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;
        yylval.node = NEW_LIT(INT2FIX(c));
        return tINTEGER;

      case '&':
        if ((c = nextc()) == '&') {
            lex_state = EXPR_BEG;
            if ((c = nextc()) == '=') {
                yylval.id = tANDOP;
                lex_state = EXPR_BEG;
                return tOP_ASGN;
            }
            pushback(c);
            return tANDOP;
        }
        else if (c == '=') {
            yylval.id = '&';
            lex_state = EXPR_BEG;
            return tOP_ASGN;
        }
        pushback(c);
        if (IS_ARG() && space_seen && !ISSPACE(c)){
            rb_warning("`&' interpreted as argument prefix");
            c = tAMPER;
        }
        else if (lex_state == EXPR_BEG || lex_state == EXPR_MID) {
            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()) == '=') {
                yylval.id = tOROP;
                lex_state = EXPR_BEG;
                return tOP_ASGN;
            }
            pushback(c);
            return tOROP;
        }
        if (c == '=') {
            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 == '=') {
            yylval.id = '+';
            lex_state = EXPR_BEG;
            return tOP_ASGN;
        }
        if (lex_state == EXPR_BEG || lex_state == EXPR_MID ||
            (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 == '=') {
            yylval.id = '-';
            lex_state = EXPR_BEG;
            return tOP_ASGN;
        }
        if (lex_state == EXPR_BEG || lex_state == EXPR_MID ||
            (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;
                    yylval.node = NEW_LIT(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;
                    yylval.node = NEW_LIT(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;
                    yylval.node = NEW_LIT(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;
                        yylval.node = NEW_LIT(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);
                    yylval.node = NEW_LIT(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_warn("Float %s out of range", tok());
                    errno = 0;
                }
                yylval.node = NEW_LIT(rb_float_new(d));
                return tFLOAT;
            }
            yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 10, Qfalse));
            return tINTEGER;
        }

      case ']':
      case '}':
      case ')':
        COND_LEXPOP();
        CMDARG_LEXPOP();
        lex_state = EXPR_END;
        return c;

      case ':':
        c = nextc();
        if (c == ':') {
            if (lex_state == EXPR_BEG ||  lex_state == EXPR_MID ||
                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_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 (lex_state == EXPR_BEG || lex_state == EXPR_MID) {
            lex_strterm = NEW_STRTERM(str_regexp, '/', 0);
            return tREGEXP_BEG;
        }
        if ((c = nextc()) == '=') {
            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()) == '=') {
            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 ';':
        command_start = Qtrue;
      case ',':
        lex_state = EXPR_BEG;
        return c;

      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 '(':
        command_start = Qtrue;
        if (lex_state == EXPR_BEG || lex_state == EXPR_MID) {
            c = tLPAREN;
        }
        else if (space_seen) {
            if (lex_state == EXPR_CMDARG) {
                c = tLPAREN_ARG;
            }
            else if (lex_state == EXPR_ARG) {
                rb_warn("don't put space before argument parentheses");
                c = '(';
            }
        }
        COND_PUSH(0);
        CMDARG_PUSH(0);
        lex_state = EXPR_BEG;
        return c;

      case '[':
        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 (lex_state == EXPR_BEG || lex_state == EXPR_MID) {
            c = tLBRACK;
        }
        else if (IS_ARG() && space_seen) {
            c = tLBRACK;
        }
        lex_state = EXPR_BEG;
        COND_PUSH(0);
        CMDARG_PUSH(0);
        return c;

      case '{':
        if (IS_ARG() || lex_state == EXPR_END)
            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;
            goto retry; /* skip \\n */
        }
        pushback(c);
        return '\\';

      case '%':
        if (lex_state == EXPR_BEG || lex_state == EXPR_MID) {
            int term;
            int paren;

            c = nextc();
          quotation:
            if (!ISALNUM(c)) {
                term = c;
                c = 'Q';
            }
            else {
                term = nextc();
                if (ISALNUM(term) || ismbchar(term)) {
                    yyerror("unknown type of %string");
                    return 0;
                }
            }
            if (c == -1 || term == -1) {
                rb_compile_error("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()) == '=') {
            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();
            if (is_identchar(c)) {
                tokadd('$');
                tokadd('_');
                break;
            }
            pushback(c);
            c = '_';
            /* fall through */
          case '~':             /* $~: match-data */
            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();
            yylval.id = rb_intern(tok());
            return tGVAR;

          case '-':
            tokadd('$');
            tokadd(c);
            c = nextc();
            if (is_identchar(c)) {
                tokadd(c);
            }
            else {
                pushback(c);
            }
          gvar:
            tokfix();
            yylval.id = rb_intern(tok());
            /* xxx shouldn't check if valid option variable */
            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;
            }
            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();
            yylval.node = NEW_NTH_REF(atoi(tok()+1));
            return tNTH_REF;

          default:
            if (!is_identchar(c)) {
                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("`@%c' is not allowed as an instance variable name", c);
            }
            else {
                rb_compile_error("`@@%c' is not allowed as a class variable name", c);
            }
        }
        if (!is_identchar(c)) {
            pushback(c);
            return '@';
        }
        break;

      case '_':
        if (was_bol() && whole_match_p("__END__", 7, 0)) {
            ruby__end__seen = 1;
            lex_lastline = 0;
            return -1;
        }
        newtok();
        break;

      default:
        if (!is_identchar(c)) {
            rb_compile_error("Invalid char `\\%03o' in expression", c);
            goto retry;
        }

        newtok();
        break;
    }

    do {
        tokadd(c);
        if (ismbchar(c)) {
            int i, len = mbclen(c)-1;

            for (i = 0; i < len; i++) {
                c = nextc();
                tokadd(c);
            }
        }
        c = nextc();
    } while (is_identchar(c));
    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) {
                struct kwtable *kw;

                /* See if it is a reserved word.  */
                kw = rb_reserved_word(tok(), toklen());
                if (kw) {
                    enum lex_state state = lex_state;
                    lex_state = kw->state;
                    if (state == EXPR_FNAME) {
                        yylval.id = rb_intern(kw->name);
                    }
                    if (kw->id[0] == kDO) {
                        if (COND_P()) return kDO_COND;
                        if (CMDARG_P() && state != EXPR_CMDARG)
                            return kDO_BLOCK;
                        if (state == EXPR_ENDARG)
                            return kDO_BLOCK;
                        return kDO;
                    }
                    if (state == EXPR_BEG)
                        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 ||
                lex_state == EXPR_MID ||
                lex_state == EXPR_DOT ||
                lex_state == EXPR_ARG ||
                lex_state == EXPR_CMDARG) {
                if (cmd_state) {
                    lex_state = EXPR_CMDARG;
                }
                else {
                    lex_state = EXPR_ARG;
                }
            }
            else {
                lex_state = EXPR_END;
            }
        }
        yylval.id = rb_intern(tok());
        if (is_local_id(yylval.id) &&
            last_state != EXPR_DOT &&
            ((dyna_in_block() && rb_dvar_defined(yylval.id)) || local_id(yylval.id))) {
            lex_state = EXPR_END;
        }
        return result;
    }
}

NODE*
rb_node_newnode(type, a0, a1, a2)
    enum node_type type;
    VALUE a0, a1, 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)                  /* for debug */
    NODE *node;
{
    return (enum node_type)nd_type(node);
}

static int
nodeline(node)
    NODE *node;
{
    return nd_line(node);
}

static NODE*
newline_node(node)
    NODE *node;
{
    NODE *nl = 0;
    if (node) {
        if (nd_type(node) == NODE_NEWLINE) return node;
        nl = NEW_NEWLINE(node);
        fixpos(nl, node);
        nl->nd_nth = nd_line(node);
    }
    return nl;
}

static void
fixpos(node, orig)
    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, mesg)
    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, mesg)
    NODE *node;
    const char *mesg;
{
    int line = ruby_sourceline;
    ruby_sourceline = nd_line(node);
    rb_warn(mesg);
    ruby_sourceline = line;
}

static NODE*
block_append(head, tail)
    NODE *head, *tail;
{
    NODE *end, *h = head;

    if (tail == 0) return head;

  again:
    if (h == 0) return tail;
    switch (nd_type(h)) {
      case NODE_NEWLINE:
        h = h->nd_next;
        goto again;
      case NODE_LIT:
      case NODE_STR:
        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;
    }

    if (RTEST(ruby_verbose)) {
        NODE *nd = end->nd_head;
      newline:
        switch (nd_type(nd)) {
          case NODE_RETURN:
          case NODE_BREAK:
          case NODE_NEXT:
          case NODE_REDO:
          case NODE_RETRY:
            parser_warning(nd, "statement not reached");
            break;

        case NODE_NEWLINE:
            nd = nd->nd_next;
            goto newline;

          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(list, item)
    NODE *list, *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(head, tail)
    NODE *head, *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(head, tail)
    NODE *head, *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 *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;
{
    NODE *head = node;

  again:
    if (node) {
        switch (nd_type(node)) {
          case NODE_STR: case NODE_DSTR: case NODE_EVSTR:
            return node;
          case NODE_NEWLINE:
            node = node->nd_next;
            goto again;
        }
    }
    return NEW_EVSTR(head);
}

static NODE *
call_op(recv, id, narg, arg1)
    NODE *recv;
    ID id;
    int narg;
    NODE *arg1;
{
    value_expr(recv);
    if (narg == 1) {
        value_expr(arg1);
        arg1 = NEW_LIST(arg1);
    }
    else {
        arg1 = 0;
    }
    return NEW_CALL(recv, id, arg1);
}

static NODE*
match_gen(node1, node2)
    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(id)
    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 */
#if 0
        /* Rite will warn this */
        rb_warn("ambiguous identifier; %s() or self.%s is better for method call",
                rb_id2name(id), rb_id2name(id));
#endif
        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(id, val)
    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{
            rb_dvar_push(id, Qnil);
            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 NODE *
aryset(recv, idx)
    NODE *recv, *idx;
{
    if (recv && nd_type(recv) == NODE_SELF)
        recv = (NODE *)1;
    else
        value_expr(recv);
    return NEW_ATTRASGN(recv, tASET, idx);
}

ID
rb_id_attrset(id)
    ID id;
{
    id &= ~ID_SCOPE_MASK;
    id |= ID_ATTRSET;
    return id;
}

static NODE *
attrset(recv, id)
    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 *node;
{
    switch (nd_type(node)) {
      case NODE_NTH_REF:
        rb_compile_error("Can't set variable $%d", 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(node1, node2)
    NODE *node1;
    NODE *node2;
{
    if (!node2) return node1;
    return NEW_ARGSCAT(node1, node2);
}

static NODE *
arg_add(node1, node2)
    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(lhs, rhs)
    NODE *lhs, *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_expr0(node)
    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;

          case NODE_NEWLINE:
            node = node->nd_next;
            break;

          default:
            return Qtrue;
        }
    }

    return Qtrue;
}

static void
void_expr0(node)
    NODE *node;
{
    char *useless = 0;

    if (!RTEST(ruby_verbose)) return;

  again:
    if (!node) return;
    switch (nd_type(node)) {
      case NODE_NEWLINE:
        node = node->nd_next;
        goto again;

      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(node)
    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;
{
    NODE **n = &node;
    while (*n) {
        switch (nd_type(*n)) {
          case NODE_NEWLINE:
            n = &(*n)->nd_next;
            continue;
          case NODE_BEGIN:
            *n = (*n)->nd_body;
          default:
            return node;
        }
    }
    return node;
}

static int
assign_in_cond(node)
    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;

      case NODE_NEWLINE:
      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;
    }
#if 0
    if (assign_in_cond(node->nd_value) == 0) {
        parser_warning(node->nd_value, "assignment in condition");
    }
#endif
    return 1;
}

static int
e_option_supplied()
{
    if (strcmp(ruby_sourcefile, "-e") == 0)
        return Qtrue;
    return Qfalse;
}

static void
warn_unless_e_option(node, str)
    NODE *node;
    const char *str;
{
    if (!e_option_supplied()) parser_warn(node, str);
}

static void
warning_unless_e_option(node, str)
    NODE *node;
    const char *str;
{
    if (!e_option_supplied()) parser_warning(node, str);
}

static NODE *cond0();

static NODE*
range_op(node)
    NODE *node;
{
    enum node_type type;

    if (!e_option_supplied()) return node;
    if (node == 0) return 0;

    value_expr(node);
    node = cond0(node);
    type = nd_type(node);
    if (type == NODE_NEWLINE) {
        node = node->nd_next;
        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 *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(node)
    NODE *node;
{
    if (node == 0) return 0;
    assign_in_cond(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(node->nd_1st);
        node->nd_2nd = cond0(node->nd_2nd);
        break;

      case NODE_DOT2:
      case NODE_DOT3:
        node->nd_beg = range_op(node->nd_beg);
        node->nd_end = range_op(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(node)
    NODE *node;
{
    if (node == 0) return 0;
    value_expr(node);
    if (nd_type(node) == NODE_NEWLINE){
        node->nd_next = cond0(node->nd_next);
        return node;
    }
    return cond0(node);
}

static NODE*
logop(type, left, right)
    enum node_type type;
    NODE *left, *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(nodep)
    NODE **nodep;
{
    NODE *c = *nodep;

    if (!c) return 0;
    switch (nd_type(c)) {
      case NODE_NOT:
        *nodep = c->nd_body;
        return 1;
      case NODE_NEWLINE:
        if (c->nd_next && nd_type(c->nd_next) == NODE_NOT) {
            c->nd_next = c->nd_next->nd_body;
            return 1;
        }
    }
    return 0;
}

static void
no_blockarg(node)
    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 *node;
{
    if (node) {
        no_blockarg(node);
        if (nd_type(node) == NODE_ARRAY && node->nd_next == 0) {
            node = node->nd_head;
        }
        if (node && nd_type(node) == NODE_SPLAT) {
            node = NEW_SVALUE(node);
        }
    }
    return node;
}

static NODE *
new_yield(node)
    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;
        }
        if (node && nd_type(node) == NODE_SPLAT) {
            state = Qtrue;
        }
    }
    else {
        state = Qfalse;
    }
    return NEW_YIELD(node, state);
}

static NODE*
negate_lit(node)
    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(node1, node2)
    NODE *node1;
    NODE *node2;
{
    if (node2) {
        node2->nd_head = node1;
        return node2;
    }
    return node1;
}

static NODE*
arg_prepend(node1, node2)
    NODE *node1, *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 NODE*
new_call(r,m,a)
    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(m,a)
    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(a)
    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 struct local_vars {
    ID *tbl;
    int nofree;
    int cnt;
    int dlev;
    struct RVarmap* dyna_vars;
    struct local_vars *prev;
} *lvtbl;

static void
local_push(top)
    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->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()
{
    struct local_vars *local = lvtbl->prev;

    if (lvtbl->tbl) {
        if (!lvtbl->nofree) xfree(lvtbl->tbl);
        else lvtbl->tbl[0] = lvtbl->cnt;
    }
    ruby_dyna_vars = lvtbl->dyna_vars;
    xfree(lvtbl);
    lvtbl = local;
}

static ID*
local_tbl()
{
    lvtbl->nofree = 1;
    return lvtbl->tbl;
}

static int
local_append(id)
    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(id)
    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(id)
    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()
{
    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()
{
    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 struct RVarmap*
dyna_push()
{
    struct RVarmap* vars = ruby_dyna_vars;

    rb_dvar_push(0, 0);
    lvtbl->dlev++;
    return vars;
}

static void
dyna_pop(vars)
    struct RVarmap* vars;
{
    lvtbl->dlev--;
    ruby_dyna_vars = vars;
}

static int
dyna_in_block()
{
    return (lvtbl->dlev > 0);
}

static NODE *
dyna_init(node, pre)
    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);
}

int
ruby_parser_stack_on_heap()
{
#if defined(YYMALLOC)
    return Qfalse;
#else
    return Qtrue;
#endif
}

void
rb_gc_mark_parser()
{
#if defined YYMALLOC
    rb_gc_mark((VALUE)parser_heap);
#elif defined yystacksize
    if (yyvsp) rb_gc_mark_locations((VALUE *)yyvs, (VALUE *)yyvsp);
#endif

    if (!ruby_in_compile) return;

    rb_gc_mark_maybe((VALUE)yylval.node);
    rb_gc_mark(ruby_debug_lines);
    rb_gc_mark(lex_lastline);
    rb_gc_mark(lex_input);
    rb_gc_mark((VALUE)lex_strterm);
}

void
rb_parser_append_print()
{
    ruby_eval_tree =
        block_append(ruby_eval_tree,
                     NEW_FCALL(rb_intern("print"),
                               NEW_ARRAY(NEW_GVAR(rb_intern("$_")))));
}

void
rb_parser_while_loop(chop, split)
    int chop, split;
{
    if (split) {
        ruby_eval_tree =
            block_append(NEW_GASGN(rb_intern("$F"),
                                   NEW_CALL(NEW_GVAR(rb_intern("$_")),
                                            rb_intern("split"), 0)),
                                   ruby_eval_tree);
    }
    if (chop) {
        ruby_eval_tree =
            block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")),
                                  rb_intern("chop!"), 0), ruby_eval_tree);
    }
    ruby_eval_tree = NEW_OPT_N(ruby_eval_tree);
}

static 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 st_table *sym_tbl;
static st_table *sym_rev_tbl;

void
Init_sym()
{
    sym_tbl = st_init_strtable_with_size(200);
    sym_rev_tbl = st_init_numtable_with_size(200);
}

static ID last_id = tLAST_TOKEN;

static ID
internal_id()
{
    return ID_INTERNAL | (++last_id << ID_SCOPE_SHIFT);
}

static int
is_special_global_name(m)
    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(name)
    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(name)
    const char *name;
{
    const char *m = name;
    ID id;
    int last;

    if (st_lookup(sym_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 |= ++last_id << ID_SCOPE_SHIFT;
  id_regist:
    name = strdup(name);
    st_add_direct(sym_tbl, (st_data_t)name, id);
    st_add_direct(sym_rev_tbl, id, (st_data_t)name);
    return id;
}

char *
rb_id2name(id)
    ID id;
{
    char *name;

    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(sym_rev_tbl, id, (st_data_t *)&name))
        return name;

    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(key, value, ary)
    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()
{
    VALUE ary = rb_ary_new2(sym_tbl->num_entries);

    st_foreach(sym_tbl, symbols_i, ary);
    return ary;
}

int
rb_is_const_id(id)
    ID id;
{
    if (is_const_id(id)) return Qtrue;
    return Qfalse;
}

int
rb_is_class_id(id)
    ID id;
{
    if (is_class_id(id)) return Qtrue;
    return Qfalse;
}

int
rb_is_instance_id(id)
    ID id;
{
    if (is_instance_id(id)) return Qtrue;
    return Qfalse;
}

int
rb_is_local_id(id)
    ID id;
{
    if (is_local_id(id)) return Qtrue;
    return Qfalse;
}

int
rb_is_junk_id(id)
    ID id;
{
    if (is_junk_id(id)) return Qtrue;
    return Qfalse;
}

static void
special_local_set(c, val)
    char c;
    VALUE val;
{
    int cnt;

    top_local_init();
    cnt = local_cnt(c);
    top_local_setup();
    ruby_scope->local_vars[cnt] = val;
}

VALUE
rb_backref_get()
{
    VALUE *var = rb_svar(1);
    if (var) {
        return *var;
    }
    return Qnil;
}

void
rb_backref_set(val)
    VALUE val;
{
    VALUE *var = rb_svar(1);
    if (var) {
        *var = val;
    }
    else {
        special_local_set('~', val);
    }
}

VALUE
rb_lastline_get()
{
    VALUE *var = rb_svar(0);
    if (var) {
        return *var;
    }
    return Qnil;
}

void
rb_lastline_set(val)
    VALUE val;
{
    VALUE *var = rb_svar(0);
    if (var) {
        *var = val;
    }
    else {
        special_local_set('_', val);
    }
}

#ifdef YYMALLOC
#define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE))
#define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser_heap, 0)
#define ADD2HEAP(n, c, p) ((parser_heap = (n))->u1.node = (p), \
                           (n)->u3.cnt = (c), (p))

static void *
rb_parser_malloc(size)
    size_t size;
{
    size_t cnt = HEAPCNT(1, size);
    NODE *n = NEWHEAP();
    void *ptr = xmalloc(size);

    return ADD2HEAP(n, cnt, ptr);
}

static void *
rb_parser_calloc(nelem, size)
    size_t nelem, size;
{
    size_t cnt = HEAPCNT(nelem, size);
    NODE *n = NEWHEAP();
    void *ptr = xcalloc(nelem, size);

    return ADD2HEAP(n, cnt, ptr);
}

static void *
rb_parser_realloc(ptr, size)
    void *ptr;
    size_t size;
{
    NODE *n;
    size_t cnt = HEAPCNT(1, size);

    if (ptr && (n = parser_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);
}

static void
rb_parser_free(ptr)
    void *ptr;
{
    NODE **prev = &parser_heap, *n;

    while (n = *prev) {
        if (n->u1.node == ptr) {
            *prev = n->u2.node;
            rb_gc_force_recycle((VALUE)n);
            break;
        }
        prev = &n->u2.node;
    }
    xfree(ptr);
}
#endif
/* [<][>][^] [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: nobu $
  $Date: 2004/04/14 04:06:52 $
  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(x, klass)
    VALUE x, 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(x)
    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(x)
    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(module, x)
    VALUE module, 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(module, include)
    VALUE module, 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()
{
    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. proc_exec_n
  31. rb_proc_exec
  32. proc_spawn_v
  33. proc_spawn_n
  34. proc_spawn
  35. rb_f_exec
  36. rb_f_fork
  37. rb_f_exit_bang
  38. rb_syswait
  39. rb_f_system
  40. rb_f_sleep
  41. proc_getpgrp
  42. proc_setpgrp
  43. proc_getpgid
  44. proc_setpgid
  45. proc_setsid
  46. proc_getpriority
  47. proc_setpriority
  48. check_uid_switch
  49. check_gid_switch
  50. p_sys_setuid
  51. p_sys_setruid
  52. p_sys_seteuid
  53. p_sys_setreuid
  54. p_sys_setresuid
  55. proc_getuid
  56. proc_setuid
  57. p_uid_change_privilege
  58. p_sys_setgid
  59. p_sys_setrgid
  60. p_sys_setegid
  61. p_sys_setregid
  62. p_sys_setresgid
  63. p_sys_issetugid
  64. proc_getgid
  65. proc_setgid
  66. proc_getgroups
  67. proc_setgroups
  68. proc_initgroups
  69. proc_getmaxgroups
  70. proc_setmaxgroups
  71. p_gid_change_privilege
  72. proc_geteuid
  73. proc_seteuid
  74. rb_seteuid_core
  75. p_uid_grant_privilege
  76. proc_getegid
  77. proc_setegid
  78. rb_setegid_core
  79. p_gid_grant_privilege
  80. p_uid_exchangeable
  81. p_uid_exchange
  82. p_gid_exchangeable
  83. p_gid_exchange
  84. p_uid_have_saved_id
  85. p_uid_sw_ensure
  86. p_uid_switch
  87. p_uid_sw_ensure
  88. p_uid_switch
  89. p_gid_have_saved_id
  90. p_gid_sw_ensure
  91. p_gid_switch
  92. p_gid_sw_ensure
  93. p_gid_switch
  94. rb_proc_times
  95. Init_process
/**********************************************************************

  process.c -

  $Author: akr $
  $Date: 2005/11/20 03:30:47 $
  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 __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_GETPRIORITY
# 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

/*
 *  call-seq:
 *     Process.pid   => fixnum
 *
 *  Returns the process id of this process. Not available on all
 *  platforms.
 *
 *     Process.pid   #=> 27415
 */

static VALUE
get_pid()
{
    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()
{
    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(status, pid)
    int status, 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(st)
    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(st)
    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(st)
    VALUE st;
{
    return rb_iv_get(st, "pid");
}

/*
 *  call-seq:
 *     stat.inspect   => string
 *
 *  Override the inspection method.
 */

static VALUE
pst_inspect(st)
    VALUE st;
{
    VALUE pid;
    int status;
    VALUE str;
    char buf[256];

    pid = pst_pid(st);
    status = NUM2INT(st);

    snprintf(buf, sizeof(buf), "#<%s: pid=%ld", rb_class2name(CLASS_OF(st)), NUM2LONG(pid));
    str = rb_str_new2(buf);
    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(st1, st2)
    VALUE st1, 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(st1, st2)
    VALUE st1, 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(st1, st2)
    VALUE st1, 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(st)
    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(st)
    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(st)
    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(st)
    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(st)
    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(st)
    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(st)
    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(st)
    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(pid, st, flags)
    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)) {
        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);
        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(argc, argv)
    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(argc, argv)
    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()
{
    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(pid_p)
    int *pid_p;
{
    int cpid, status;

    for (;;) {
        cpid = rb_waitpid(*pid_p, &status, WNOHANG);
        if (cpid != 0) return Qnil;
        rb_thread_sleep(1);
    }
}

VALUE
rb_detach_process(pid)
    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).
 *
 *  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();

static void
security(str)
    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(argv, prog)
    char **argv;
    char *prog;
{
    if (!prog)
        prog = argv[0];
    security(prog);
    prog = dln_find_exe(prog, 0);
    if (!prog)
        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);
    after_exec();
    return -1;
}

static int
proc_exec_n(argc, argv, progv)
    int argc;
    VALUE *argv;
    VALUE progv;
{
    char *prog = 0;
    char **args;
    int i;

    if (progv) {
        prog = RSTRING(progv)->ptr;
    }
    args = ALLOCA_N(char*, argc+1);
    for (i=0; i<argc; i++) {
        SafeStringValue(argv[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(str)
    const char *str;
{
    const char *s = str;
    char *ss, *t;
    char **argv, **a;

    while (*str && ISSPACE(*str))
        str++;

#ifdef _WIN32
    before_exec();
    do_spawn(P_OVERLAY, (char *)str);
    after_exec();
#else
    for (s=str; *s; s++) {
        if (*s != ' ' && !ISALPHA(*s) && strchr("*?{}[]<>()~&|\\$;'`\"\n",*s)) {
#if defined(MSDOS)
            int status;
            before_exec();
            status = system(str);
            after_exec();
            if (status != -1)
                exit(status);
#else
#if 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);
            after_exec();
#endif
#endif
            return -1;
        }
    }
    a = argv = ALLOCA_N(char*, (s-str)/2+2);
    ss = ALLOCA_N(char, s-str+1);
    strcpy(ss, str);
    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(__human68k__) || defined(__DJGPP__) || defined(_WIN32)
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();
#if defined(_WIN32)
    status = do_aspawn(P_WAIT, prog, argv);
#else
    status = spawnv(P_WAIT, prog, argv);
#endif
    after_exec();
    return status;
}

static int
proc_spawn_n(argc, argv, prog)
    int argc;
    VALUE *argv;
    VALUE prog;
{
    char **args;
    int i;

    args = ALLOCA_N(char*, argc + 1);
    for (i = 0; i < argc; i++) {
        SafeStringValue(argv[i]);
        args[i] = RSTRING(argv[i])->ptr;
    }
    if (prog)
        SafeStringValue(prog);
    args[i] = (char*) 0;
    if (args[0])
        return proc_spawn_v(args, prog ? RSTRING(prog)->ptr : 0);
    return -1;
}

#if !defined(_WIN32)
static int
proc_spawn(sv)
    VALUE sv;
{
    char *str;
    char *s, *t;
    char **argv, **a;
    int status;

    SafeStringValue(sv);
    str = s = RSTRING(sv)->ptr;
    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);
            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

/*
 *  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).
 *
 *     exec "echo *"       # echoes list of files in current directory
 *     # never get here
 *
 *
 *     exec "echo", "*"    # echoes an asterisk
 *     # never get here
 */

VALUE
rb_f_exec(argc, argv)
    int argc;
    VALUE *argv;
{
    VALUE prog = 0;
    VALUE tmp;

    if (argc == 0) {
        rb_raise(rb_eArgError, "wrong number of arguments");
    }

    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);
    }
    if (argc == 1 && prog == 0) {
        VALUE cmd = argv[0];

        SafeStringValue(cmd);
        rb_proc_exec(RSTRING(cmd)->ptr);
    }
    else {
        proc_exec_n(argc, argv, prog);
    }
    rb_sys_fail(RSTRING(argv[0])->ptr);
    return Qnil;                /* dummy */
}

/*
 *  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(obj)
    VALUE obj;
{
#if !defined(__human68k__) && !defined(_WIN32) && !defined(__MACOS__) && !defined(__EMX__) && !defined(__VMS)
    int pid;

    rb_secure(2);

#ifndef __VMS
    fflush(stdout);
    fflush(stderr);
#endif

    switch (pid = fork()) {
      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(argc, argv, obj)
    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(pid)
    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;
    }
}

/*
 *  call-seq:
 *     system(cmd [, arg, ...])    => true or false
 *
 *  Executes _cmd_ in a subshell, returning +true+ if
 *  the command was found and 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>.
 *
 *     system("echo *")
 *     system("echo", "*")
 *
 *  <em>produces:</em>
 *
 *     config.h main.rb
 *     *
 */

static VALUE
rb_f_system(argc, argv)
    int argc;
    VALUE *argv;
{
    int status;
#if defined(__EMX__)
    VALUE cmd;

    fflush(stdout);
    fflush(stderr);
    if (argc == 0) {
        rb_last_status = Qnil;
        rb_raise(rb_eArgError, "wrong number of arguments");
    }

    if (TYPE(argv[0]) == T_ARRAY) {
        if (RARRAY(argv[0])->len != 2) {
            rb_raise(rb_eArgError, "wrong first argument");
        }
        argv[0] = RARRAY(argv[0])->ptr[0];
    }
    cmd = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" "));

    SafeStringValue(cmd);
    status = do_spawn(RSTRING(cmd)->ptr);
    last_status_set(status, 0);
#elif defined(__human68k__) || defined(__DJGPP__) || defined(_WIN32)
    volatile VALUE prog = 0;

    fflush(stdout);
    fflush(stderr);
    if (argc == 0) {
        rb_last_status = Qnil;
        rb_raise(rb_eArgError, "wrong number of arguments");
    }

    if (TYPE(argv[0]) == T_ARRAY) {
        if (RARRAY(argv[0])->len != 2) {
            rb_raise(rb_eArgError, "wrong first argument");
        }
        prog = RARRAY(argv[0])->ptr[0];
        argv[0] = RARRAY(argv[0])->ptr[1];
    }

    if (argc == 1 && prog == 0) {
#if defined(_WIN32)
        SafeStringValue(argv[0]);
        status = do_spawn(P_WAIT, RSTRING(argv[0])->ptr);
#else
        status = proc_spawn(argv[0]);
#endif
    }
    else {
        status = proc_spawn_n(argc, argv, prog);
    }
#if !defined(_WIN32)
    last_status_set(status == -1 ? 127 : status, 0);
#endif
#elif defined(__VMS)
    VALUE cmd;

    if (argc == 0) {
        rb_last_status = Qnil;
        rb_raise(rb_eArgError, "wrong number of arguments");
    }

    if (TYPE(argv[0]) == T_ARRAY) {
        if (RARRAY(argv[0])->len != 2) {
            rb_raise(rb_eArgError, "wrong first argument");
        }
        argv[0] = RARRAY(argv[0])->ptr[0];
    }
    cmd = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" "));

    SafeStringValue(cmd);
    status = system(RSTRING(cmd)->ptr);
    last_status_set((status & 0xff) << 8, 0);
#else
    volatile VALUE prog = 0;
    int pid;
    int i;

    fflush(stdout);
    fflush(stderr);
    if (argc == 0) {
        rb_last_status = Qnil;
        rb_raise(rb_eArgError, "wrong number of arguments");
    }

    if (TYPE(argv[0]) == T_ARRAY) {
        if (RARRAY(argv[0])->len != 2) {
            rb_raise(rb_eArgError, "wrong first argument");
        }
        prog = RARRAY(argv[0])->ptr[0];
        argv[0] = RARRAY(argv[0])->ptr[1];
    }

    if (prog) {
        SafeStringValue(prog);
    }
    for (i = 0; i < argc; i++) {
        SafeStringValue(argv[i]);
    }
  retry:
    switch (pid = fork()) {
      case 0:
        if (argc == 1 && prog == 0) {
            rb_proc_exec(RSTRING(argv[0])->ptr);
        }
        else {
            proc_exec_n(argc, argv, prog);
        }
        _exit(127);
        break;                  /* not reached */

      case -1:
        if (errno == EAGAIN) {
            rb_thread_sleep(1);
            goto retry;
        }
        rb_sys_fail(0);
        break;

      default:
        rb_syswait(pid);
    }

    status = NUM2INT(rb_last_status);
#endif

    if (status == EXIT_SUCCESS) return Qtrue;
    return Qfalse;
}

/*
 *  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(argc, argv)
    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()
{
    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()
{
    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(obj, pid)
    VALUE obj, 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(obj, pid, pgrp)
    VALUE obj, pid, 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()
{
#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(obj, which, who)
    VALUE obj, which, 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(obj, which, who, prio)
    VALUE obj, which, who, 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
}

static int under_uid_switch = 0;
static void
check_uid_switch()
{
    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()
{
    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(obj, id)
    VALUE obj, 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(obj, id)
    VALUE obj, 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(obj, id)
    VALUE obj, 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(obj, rid, eid)
    VALUE obj, rid, 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(obj, rid, eid, sid)
    VALUE obj, rid, eid, 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(obj)
    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(obj, id)
    VALUE obj, 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(obj, id)
    VALUE obj, 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(obj, id)
    VALUE obj, 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(obj, id)
    VALUE obj, 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(obj, id)
    VALUE obj, 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(obj, rid, eid)
    VALUE obj, rid, 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(obj, rid, eid, sid)
    VALUE obj, rid, eid, 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(obj)
    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(obj)
    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(obj, id)
    VALUE obj, 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, %d max", 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(obj, uname, base_grp)
    VALUE obj, uname, 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(obj)
    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);
}

/********************************************************************
 *
 * 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(obj, id)
    VALUE obj, 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(obj)
    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(obj, euid)
    VALUE obj, 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(euid)
    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(obj, id)
    VALUE obj, 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(obj)
    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(obj, egid)
    VALUE obj, 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(egid)
    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(obj, id)
    VALUE obj, 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()
{
#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(obj)
    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()
{
#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(obj)
    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()
{
#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(obj)
    VALUE obj;
{
    under_uid_switch = 0;
    return p_uid_exchange(obj);
}

static VALUE
p_uid_switch(obj)
    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()
{
#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(obj)
    VALUE obj;
{
    under_gid_switch = 0;
    return p_gid_exchange(obj);
}

static VALUE
p_gid_switch(obj)
    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(obj)
    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()
{
    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("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, "fork", rb_f_fork, 0);
    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

    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, "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: nobu $
  $Date: 2005/02/12 06:07:47 $
  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(s)
    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()
{
    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(vseed)
    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()
{
    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(argc, argv, obj)
    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(argc, argv, obj)
    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()
{
    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. rb_range_beg_len
  21. range_to_s
  22. range_inspect
  23. range_include
  24. Init_Range
/**********************************************************************

  range.c -

  $Author: nobu $
  $Date: 2005/08/14 15:39:39 $
  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()
{
    rb_raise(rb_eArgError, "bad value for range");
    return Qnil;                /* dummy */
}

static VALUE
range_check(args)
    VALUE *args;
{
    return rb_funcall(args[0], id_cmp, 1, args[1]);
}

static void
range_init(range, beg, end, exclude_end)
    VALUE range, beg, 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(beg, end, exclude_end)
    VALUE beg, 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(argc, argv, range)
    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(range)
    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(range, obj)
    VALUE range, 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(a, b)
    VALUE a, 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(a, b)
    VALUE a, 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(range, obj)
    VALUE range, 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(range)
    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(args)
    VALUE *args;
{
    return rb_str_upto(args[0], args[1], EXCL(args[2]));
}

static void
range_each_func(range, func, v, e, arg)
    VALUE range;
    void (*func) _((VALUE, void*));
    VALUE v, 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(i, iter)
    VALUE i;
    long *iter;
{
    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(argc, argv, range)
    int argc;
    VALUE *argv;
    VALUE range;
{
    VALUE b, e, step;
    long unit;

    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 (FIXNUM_P(b) && FIXNUM_P(e)) { /* fixnums are special */
        long end = FIX2LONG(e);
        long i;

        if (unit == 0) rb_raise(rb_eArgError, "step can't be 0");
        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;
            if (unit == 0) rb_raise(rb_eArgError, "step can't be 0");
            args[0] = b; args[1] = e; args[2] = range;
            iter[0] = 1; iter[1] = unit;
            rb_iterate((VALUE(*)_((VALUE)))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 (unit == 0) rb_raise(rb_eArgError, "step can't be 0");
            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 void
each_i(v, arg)
    VALUE v;
    void *arg;
{
    rb_yield(v);
}

/*
 *  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(range)
    VALUE range;
{
    VALUE beg, end;

    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((VALUE(*)_((VALUE)))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(range)
    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(range)
    VALUE range;
{
    return rb_ivar_get(range, id_end);
}

VALUE
rb_range_beg_len(range, begp, lenp, len, err)
    VALUE range;
    long *begp, *lenp;
    long len;
    int err;
{
    long beg, end, b, e;

    if (!rb_obj_is_kind_of(range, rb_cRange)) return Qfalse;

    beg = b = NUM2LONG(rb_ivar_get(range, id_beg));
    end = e = NUM2LONG(rb_ivar_get(range, id_end));

    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(range)) 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(range)? "." : "", e);
    }
    return Qnil;
}

/*
 * call-seq:
 *   rng.to_s   => string
 *
 * Convert this range object to a printable form.
 */

static VALUE
range_to_s(range)
    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(range)
    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(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()
{
    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, "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);

    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_regcomp
  55. rb_reg_cur_kcode
  56. rb_reg_hash
  57. rb_reg_equal
  58. rb_reg_match
  59. rb_reg_eqq
  60. rb_reg_match2
  61. rb_reg_match_m
  62. rb_reg_initialize_m
  63. rb_reg_quote
  64. rb_reg_s_quote
  65. rb_kcode
  66. rb_reg_get_kcode
  67. rb_reg_options
  68. rb_reg_s_union
  69. rb_reg_init_copy
  70. rb_reg_regsub
  71. rb_get_kcode
  72. kcode_getter
  73. rb_set_kcode
  74. kcode_setter
  75. ignorecase_getter
  76. ignorecase_setter
  77. match_getter
  78. match_setter
  79. rb_reg_s_last_match
  80. 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 <ctype.h>

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(p1, p2, len)
    char *p1, *p2;
    long len;
{
    int tmp;

    while (len--) {
        if (tmp = casetable[(unsigned)*p1++] - casetable[(unsigned)*p2++])
            return tmp;
    }
    return 0;
}

int
rb_memcmp(p1, p2, len)
    char *p1, *p2;
    long len;
{
    if (!ruby_ignorecase) {
        return memcmp(p1, p2, len);
    }
    return rb_memcicmp(p1, p2, len);
}

long
rb_memsearch(x0, m, y0, n)
    char *x0, *y0;
    long m, 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(re)
    struct RRegexp *re;
{
    FL_UNSET(re, KCODE_MASK);
    FL_SET(re, KCODE_EUC);
    FL_SET(re, KCODE_FIXED);
}

static void
kcode_sjis(re)
    struct RRegexp *re;
{
    FL_UNSET(re, KCODE_MASK);
    FL_SET(re, KCODE_SJIS);
    FL_SET(re, KCODE_FIXED);
}

static void
kcode_utf8(re)
    struct RRegexp *re;
{
    FL_UNSET(re, KCODE_MASK);
    FL_SET(re, KCODE_UTF8);
    FL_SET(re, KCODE_FIXED);
}

static void
kcode_none(re)
    struct RRegexp *re;
{
    FL_UNSET(re, KCODE_MASK);
    FL_SET(re, KCODE_FIXED);
}

static int curr_kcode;

static void
kcode_set_option(re)
    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:
        re_mbcinit(MBCTYPE_ASCII);
        break;
      case KCODE_EUC:
        re_mbcinit(MBCTYPE_EUC);
        break;
      case KCODE_SJIS:
        re_mbcinit(MBCTYPE_SJIS);
        break;
      case KCODE_UTF8:
        re_mbcinit(MBCTYPE_UTF8);
        break;
    }
}

static void
kcode_reset_option()
{
    if (reg_kcode == curr_kcode) return;
    switch (reg_kcode) {
      case KCODE_NONE:
        re_mbcinit(MBCTYPE_ASCII);
        break;
      case KCODE_EUC:
        re_mbcinit(MBCTYPE_EUC);
        break;
      case KCODE_SJIS:
        re_mbcinit(MBCTYPE_SJIS);
        break;
      case KCODE_UTF8:
        re_mbcinit(MBCTYPE_UTF8);
        break;
    }
}

int
rb_reg_mbclen2(c, re)
    unsigned int c;
    VALUE re;
{
    int len;

    if (!FL_TEST(re, KCODE_FIXED))
        return mbclen(c);
    kcode_set_option(re);
    len = mbclen(c);
    kcode_reset_option();
    return len;
}

static void
rb_reg_check(re)
    VALUE re;
{
    if (!RREGEXP(re)->ptr || !RREGEXP(re)->str) {
        rb_raise(rb_eTypeError, "uninitialized Regexp");
    }
}

extern int ruby_in_compile;

static void
rb_reg_expr_str(str, s, len)
    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(s, len, re)
    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 & RE_OPTION_MULTILINE)
            rb_str_buf_cat2(str, "m");
        if (RREGEXP(re)->ptr->options & RE_OPTION_IGNORECASE)
            rb_str_buf_cat2(str, "i");
        if (RREGEXP(re)->ptr->options & RE_OPTION_EXTENDED)
            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(re)
    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(re)
    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(re)
    VALUE re;
{
    int options;
    const int embeddable = RE_OPTION_MULTILINE|RE_OPTION_IGNORECASE|RE_OPTION_EXTENDED;
    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 |= RE_OPTION_MULTILINE;
                }
                else if (*ptr == 'i') {
                    options |= RE_OPTION_IGNORECASE;
                }
                else if (*ptr == 'x') {
                    options |= RE_OPTION_EXTENDED;
                }
                else break;
                ++ptr;
            } while (--len > 0);
        }
        if (len > 1 && *ptr == '-') {
            ++ptr;
            --len;
            do {
                if (*ptr == 'm') {
                    options &= ~RE_OPTION_MULTILINE;
                }
                else if (*ptr == 'i') {
                    options &= ~RE_OPTION_IGNORECASE;
                }
                else if (*ptr == 'x') {
                    options &= ~RE_OPTION_EXTENDED;
                }
                else break;
                ++ptr;
            } while (--len > 0);
        }
        if (*ptr == ')') {
            --len;
            ++ptr;
            goto again;
        }
        if (*ptr == ':' && ptr[len-1] == ')') {
            Regexp *rp;
            kcode_set_option(re);
            rp = ALLOC(Regexp);
            MEMZERO((char *)rp, Regexp, 1);
            err = re_compile_pattern(++ptr, len -= 2, rp) != 0;
            kcode_reset_option();
            re_free_pattern(rp);
        }
        if (err) {
            options = RREGEXP(re)->ptr->options;
            ptr = RREGEXP(re)->str;
            len = RREGEXP(re)->len;
        }
    }

    if (options & RE_OPTION_MULTILINE) rb_str_buf_cat2(str, "m");
    if (options & RE_OPTION_IGNORECASE) rb_str_buf_cat2(str, "i");
    if (options & RE_OPTION_EXTENDED) rb_str_buf_cat2(str, "x");

    if ((options & embeddable) != embeddable) {
        rb_str_buf_cat2(str, "-");
        if (!(options & RE_OPTION_MULTILINE)) rb_str_buf_cat2(str, "m");
        if (!(options & RE_OPTION_IGNORECASE)) rb_str_buf_cat2(str, "i");
        if (!(options & RE_OPTION_EXTENDED)) 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(s, len, err, re)
    const char *s;
    long len;
    const char *err;
    VALUE re;
{
    VALUE desc = rb_reg_desc(s, len, re);

    if (ruby_in_compile)
        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(re)
    VALUE re;
{
    rb_reg_check(re);
    if (RREGEXP(re)->ptr->options & RE_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(re)
    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(re)
    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(s, len, flags)
    const char *s;
    long len;
    int flags;
{
    Regexp *rp;
    char *err;

    /* Handle escaped characters first. */

    /* Build a copy of the string (in dest) with the
       escaped characters translated,  and generate the regex
       from that.
    */

    rp = ALLOC(Regexp);
    MEMZERO((char *)rp, Regexp, 1);
    rp->buffer = ALLOC_N(char, 16);
    rp->allocated = 16;
    rp->fastmap = ALLOC_N(char, 256);
    if (flags) {
        rp->options = flags;
    }
    err = re_compile_pattern(s, len, rp);

    if (err != NULL) {
        re_free_pattern(rp);
        rb_reg_raise(s, len, err, 0);
        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));
static VALUE
match_alloc(klass)
    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(obj, orig)
    VALUE obj, 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;
    re_free_registers(RMATCH(obj)->regs);
    RMATCH(obj)->regs->allocated = 0;
    re_copy_registers(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(match)
    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(match, n)
    VALUE match, 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(match, n)
    VALUE match, 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(match, n)
    VALUE match, 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(match)
    VALUE match;
{
    FL_SET(match, MATCH_BUSY);
}

int ruby_ignorecase;
static int may_need_recompile;

static void
rb_reg_prepare_re(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 |= RE_OPTION_IGNORECASE;
        need_recompile = 1;
    }
    if (!ruby_ignorecase && state) {
        FL_UNSET(re, REG_CASESTATE);
        RREGEXP(re)->ptr->options &= ~RE_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;

        if (FL_TEST(re, KCODE_FIXED))
            kcode_set_option(re);
        rb_reg_check(re);
        RREGEXP(re)->ptr->fastmap_accurate = 0;
        err = re_compile_pattern(RREGEXP(re)->str, RREGEXP(re)->len, RREGEXP(re)->ptr);
        if (err != NULL) {
            rb_reg_raise(RREGEXP(re)->str, RREGEXP(re)->len, err, re);
        }
    }
}

long
rb_reg_adjust_startpos(re, str, pos, reverse)
    VALUE re, str;
    long pos, reverse;
{
    long range;

    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;
    }
    return re_adjust_startpos(RREGEXP(re)->ptr,
                              RSTRING(str)->ptr, RSTRING(str)->len,
                              pos, range);
}

long
rb_reg_search(re, str, pos, reverse)
    VALUE re, str;
    long pos, 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 = re_search(RREGEXP(re)->ptr,RSTRING(str)->ptr,RSTRING(str)->len,
                       pos, range, &regs);

    if (FL_TEST(re, KCODE_FIXED))
        kcode_reset_option();

    if (result == -2) {
        rb_reg_raise(RREGEXP(re)->str, RREGEXP(re)->len,
                     "Stack overflow in regexp matcher", re);
    }

    if (result < 0) {
        rb_backref_set(Qnil);
        return result;
    }

    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);
    }

    re_copy_registers(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(nth, match)
    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(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(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(match)
    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(match)
    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(match)
    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()
{
    return rb_reg_last_match(rb_backref_get());
}

static VALUE
prematch_getter()
{
    return rb_reg_match_pre(rb_backref_get());
}

static VALUE
postmatch_getter()
{
    return rb_reg_match_post(rb_backref_get());
}

static VALUE
last_paren_match_getter()
{
    return rb_reg_match_last(rb_backref_get());
}

static VALUE
match_array(match, start)
    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(match)
    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(match)
    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(argc, argv, match)
    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, long));
static VALUE
match_entry(match, n)
    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(argc, argv, match)
    int argc;
    VALUE *argv;
    VALUE match;
{
    return rb_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(argc, argv, match)
    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(match)
    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(match)
    VALUE match;
{
    return RMATCH(match)->str;  /* str is frozen */
}

VALUE rb_cRegexp;

static void
rb_reg_initialize(obj, s, len, options)
    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 */
{
    struct RRegexp *re = RREGEXP(obj);

    if (re->ptr) re_free_pattern(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 |= RE_OPTION_IGNORECASE;
        FL_SET(re, REG_CASESTATE);
    }
    re->ptr = make_regexp(s, len, options & 0xf);
    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));
static VALUE
rb_reg_s_alloc(klass)
    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(s, len, options)
    const char *s;
    long len;
    int options;
{
    VALUE re = rb_reg_s_alloc(rb_cRegexp);

    rb_reg_initialize(re, s, len, options);
    return (VALUE)re;
}

static int case_cache;
static int kcode_cache;
static VALUE reg_cache;

VALUE
rb_reg_regcomp(str)
    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(re)
    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(re)
    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(re1, re2)
    VALUE re1, 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;
}

/*
 *  call-seq:
 *     rxp.match(str)   => 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.
 *
 *     /(.)(.)(.)/.match("abc")[2]   #=> "b"
 */

VALUE
rb_reg_match(re, str)
    VALUE re, str;
{
    long start;

    if (NIL_P(str)) {
        rb_backref_set(Qnil);
        return Qnil;
    }
    StringValue(str);
    start = rb_reg_search(re, str, 0, 0);
    if (start < 0) {
        return Qnil;
    }
    return LONG2FIX(start);
}

/*
 *  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(re, str)
    VALUE re, 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(re)
    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
 *
 *  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.
 *
 *     /(.)(.)(.)/.match("abc")[2]   #=> "b"
 */

static VALUE
rb_reg_match_m(re, str)
    VALUE re, str;
{
    VALUE result = rb_reg_match(re, str);

    if (NIL_P(result)) 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(argc, argv, self)
    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 = RE_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);
    return self;
}

VALUE
rb_reg_quote(str)
    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(c)) {
            int n = mbclen(c);

            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(c)) {
            int n = mbclen(c);

            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(argc, argv)
    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()
{
    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(re)
    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(re)
    VALUE re;
{
    int options;

    rb_reg_check(re);
    options = RREGEXP(re)->ptr->options &
        (RE_OPTION_IGNORECASE|RE_OPTION_MULTILINE|RE_OPTION_EXTENDED);
    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(argc, argv)
    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(copy, re)
    VALUE copy, 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));
    return copy;
}

VALUE
rb_reg_regsub(str, src, regs)
    VALUE str, src;
    struct re_registers *regs;
{
    VALUE val = 0;
    char *p, *s, *e, c;
    int no;

    p = s = RSTRING(str)->ptr;
    e = s + RSTRING(str)->len;

    while (s < e) {
        char *ss = s;

        c = *s++;
        if (ismbchar(c)) {
            s += mbclen(c) - 1;
            continue;
        }
        if (c != '\\' || 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);
        }

        c = *s++;
        p = s;
        switch (c) {
          case '0': case '1': case '2': case '3': case '4':
          case '5': case '6': case '7': case '8': case '9':
            no = c - '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()
{
    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()
{
    return rb_str_new2(rb_get_kcode());
}

void
rb_set_kcode(code)
    const char *code;
{
    if (code == 0) goto set_no_conversion;

    switch (code[0]) {
      case 'E':
      case 'e':
        reg_kcode = KCODE_EUC;
        re_mbcinit(MBCTYPE_EUC);
        break;
      case 'S':
      case 's':
        reg_kcode = KCODE_SJIS;
        re_mbcinit(MBCTYPE_SJIS);
        break;
      case 'U':
      case 'u':
        reg_kcode = KCODE_UTF8;
        re_mbcinit(MBCTYPE_UTF8);
        break;
      default:
      case 'N':
      case 'n':
      case 'A':
      case 'a':
      set_no_conversion:
        reg_kcode = KCODE_NONE;
        re_mbcinit(MBCTYPE_ASCII);
        break;
    }
}

static void
kcode_setter(val)
    VALUE val;
{
    may_need_recompile = 1;
    rb_set_kcode(StringValuePtr(val));
}

static VALUE
ignorecase_getter()
{
    return ruby_ignorecase?Qtrue:Qfalse;
}

static void
ignorecase_setter(val, id)
    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()
{
    VALUE match = rb_backref_get();

    if (NIL_P(match)) return Qnil;
    rb_match_busy(match);
    return match;
}

static void
match_setter(val)
    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(argc, argv)
    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()
{
    rb_eRegexpError = rb_define_class("RegexpError", rb_eStandardError);

    re_set_casetable(casetable);
#if DEFAULT_KCODE == KCODE_EUC
    re_mbcinit(MBCTYPE_EUC);
#else
#if DEFAULT_KCODE == KCODE_SJIS
    re_mbcinit(MBCTYPE_SJIS);
#else
#if DEFAULT_KCODE == KCODE_UTF8
    re_mbcinit(MBCTYPE_UTF8);
#else
    re_mbcinit(MBCTYPE_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(RE_OPTION_IGNORECASE));
    rb_define_const(rb_cRegexp, "EXTENDED", INT2FIX(RE_OPTION_EXTENDED));
    rb_define_const(rb_cRegexp, "MULTILINE", INT2FIX(RE_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: nobu $
  $Date: 2003/03/04 14:12:19 $
  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] */


regex.c

root/regex.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. init_syntax_once
  2. re_set_casetable
  3. re_set_syntax
  4. utf8_firstbyte
  5. print_mbc
  6. set_list_bits
  7. is_in_list_sbc
  8. is_in_list_mbc
  9. is_in_list
  10. print_partial_compiled_pattern
  11. print_compiled_pattern
  12. calculate_must_string
  13. read_backslash
  14. read_special
  15. re_compile_pattern
  16. re_free_pattern
  17. store_jump
  18. insert_jump
  19. store_jump_n
  20. insert_jump_n
  21. insert_op
  22. insert_op_2
  23. slow_match
  24. slow_search
  25. bm_init_skip
  26. bm_search
  27. re_compile_fastmap
  28. re_adjust_startpos
  29. re_search
  30. init_regs
  31. re_match
  32. re_match_exec
  33. memcmp_translate
  34. re_copy_registers
  35. re_free_registers
  36. re_mbcinit
  37. asc_startpos
  38. euc_startpos
  39. sjis_startpos
  40. utf8_startpos
/* Extended regular expression matching and search library.
   Copyright (C) 1993, 94, 95, 96, 97, 98 Free Software Foundation, Inc.

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public License as
   published by the Free Software Foundation; either version 2 of the
   License, or (at your option) any later version.

   The GNU C Library 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
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public
   License along with the GNU C Library; see the file LGPL.  If not,
   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.  */
/* Multi-byte extension added May, 1993 by t^2 (Takahiro Tanimoto)
   Last change: May 21, 1993 by t^2  */
/* removed gapped buffer support, multiple syntax support by matz <matz@nts.co.jp> */
/* Perl5 extension added by matz <matz@caelum.co.jp> */
/* UTF-8 extension added Jan 16 1999 by Yoshida Masato  <yoshidam@tau.bekkoame.ne.jp> */

#include "config.h"

#ifdef HAVE_STRING_H
# include <string.h>
#else
# include <strings.h>
#endif

/* We write fatal error messages on standard error.  */
#include <stdio.h>

/* isalpha(3) etc. are used for the character classes.  */
#include <ctype.h>
#include <sys/types.h>

#ifndef PARAMS
# if defined __GNUC__ || (defined __STDC__ && __STDC__)
#  define PARAMS(args) args
# else
#  define PARAMS(args) ()
# endif  /* GCC.  */
#endif  /* Not PARAMS.  */

#if defined(STDC_HEADERS)
# include <stddef.h>
#else
/* We need this for `regex.h', and perhaps for the Emacs include files.  */
# include <sys/types.h>
#endif

#if !defined(__STDC__) && !defined(_MSC_VER)
# define volatile
#endif

#ifdef HAVE_PROTOTYPES
# define _(args) args
#else
# define _(args) ()
#endif

#ifdef RUBY_PLATFORM
#include "defines.h"

# define RUBY
extern int rb_prohibit_interrupt;
extern int rb_trap_pending;
void rb_trap_exec _((void));

# define CHECK_INTS do {\
    if (!rb_prohibit_interrupt) {\
        if (rb_trap_pending) rb_trap_exec();\
    }\
} while (0)
#endif

/* Make alloca work the best possible way.  */
#ifdef __GNUC__
# ifndef atarist
#  ifndef alloca
#   define alloca __builtin_alloca
#  endif
# endif /* atarist */
#else
# if defined(HAVE_ALLOCA_H)
#  include <alloca.h>
# elif !defined(alloca)
char *alloca();
# endif
#endif /* __GNUC__ */

#ifdef _AIX
#pragma alloca
#endif

#ifdef HAVE_STRING_H
# include <string.h>
#else
# include <strings.h>
#endif

#ifdef C_ALLOCA
#define FREE_VARIABLES() alloca(0)
#else
#define FREE_VARIABLES()
#endif

#define FREE_AND_RETURN_VOID(stackb)   do {                             \
  FREE_VARIABLES();                                                     \
  if (stackb != stacka) xfree(stackb);                                  \
  return;                                                               \
} while(0)

#define FREE_AND_RETURN(stackb,val)    do {                             \
  FREE_VARIABLES();                                                     \
  if (stackb != stacka) xfree(stackb);                                  \
  return(val);                                                          \
} while(0)

#define DOUBLE_STACK(type) do {                                         \
  type *stackx;                                                         \
  unsigned int xlen = stacke - stackb;                                  \
  if (stackb == stacka) {                                               \
    stackx = (type*)xmalloc(2 * xlen * sizeof(type));                   \
    memcpy(stackx, stackb, xlen * sizeof (type));                       \
  }                                                                     \
  else {                                                                \
    stackx = (type*)xrealloc(stackb, 2 * xlen * sizeof(type));          \
  }                                                                     \
  /* Rearrange the pointers. */                                         \
  stackp = stackx + (stackp - stackb);                                  \
  stackb = stackx;                                                      \
  stacke = stackb + 2 * xlen;                                           \
} while (0)

#define RE_TALLOC(n,t)  ((t*)alloca((n)*sizeof(t)))
#define TMALLOC(n,t)    ((t*)xmalloc((n)*sizeof(t)))
#define TREALLOC(s,n,t) (s=((t*)xrealloc(s,(n)*sizeof(t))))

#define EXPAND_FAIL_STACK() DOUBLE_STACK(unsigned char*)
#define ENSURE_FAIL_STACK(n)                                            \
  do {                                                                  \
    if (stacke - stackp <= (n)) {                                       \
        /* if (len > re_max_failures * MAX_NUM_FAILURE_ITEMS)           \
           {                                                            \
           FREE_AND_RETURN(stackb,(-2));                                \
           }*/                                                          \
                                                                        \
        /* Roughly double the size of the stack.  */                    \
        EXPAND_FAIL_STACK();                                            \
      }                                                                 \
  } while (0)

/* Get the interface, including the syntax bits.  */
#include "regex.h"

/* Subroutines for re_compile_pattern.  */
static void store_jump _((char*, int, char*));
static void insert_jump _((int, char*, char*, char*));
static void store_jump_n _((char*, int, char*, unsigned));
static void insert_jump_n _((int, char*, char*, char*, unsigned));
static void insert_op _((int, char*, char*));
static void insert_op_2 _((int, char*, char*, int, int));
static int memcmp_translate _((unsigned char*, unsigned char*, int));

/* Define the syntax stuff, so we can do the \<, \>, etc.  */

/* This must be nonzero for the wordchar and notwordchar pattern
   commands in re_match.  */
#define Sword  1
#define Sword2 2

#define SYNTAX(c) re_syntax_table[c]

static char re_syntax_table[256];
static void init_syntax_once _((void));
static const unsigned char *translate = 0;
static void init_regs _((struct re_registers*, unsigned int));
static void bm_init_skip _((int *, unsigned char*, int, const unsigned char*));
static int current_mbctype = MBCTYPE_ASCII;

#undef P

#ifdef RUBY
#include "util.h"
void rb_warn _((const char*, ...));
# define re_warning(x) rb_warn(x)
#endif

#ifndef re_warning
# define re_warning(x)
#endif

static void
init_syntax_once()
{
   register int c;
   static int done = 0;

   if (done)
     return;

   memset(re_syntax_table, 0, sizeof re_syntax_table);

   for (c=0; c<=0x7f; c++)
     if (isalnum(c))
       re_syntax_table[c] = Sword;
   re_syntax_table['_'] = Sword;

   for (c=0x80; c<=0xff; c++)
     if (isalnum(c))
       re_syntax_table[c] = Sword2;
   done = 1;
}

void
re_set_casetable(table)
     const char *table;
{
  translate = (const unsigned char*)table;
}

/* Jim Meyering writes:

   "... Some ctype macros are valid only for character codes that
   isascii says are ASCII (SGI's IRIX-4.0.5 is one such system --when
   using /bin/cc or gcc but without giving an ansi option).  So, all
   ctype uses should be through macros like ISPRINT...  If
   STDC_HEADERS is defined, then autoconf has verified that the ctype
   macros don't need to be guarded with references to isascii. ...
   Defining isascii to 1 should let any compiler worth its salt
   eliminate the && through constant folding."
   Solaris defines some of these symbols so we must undefine them first.  */

#undef ISASCII
#if defined STDC_HEADERS || (!defined isascii && !defined HAVE_ISASCII)
# define ISASCII(c) 1
#else
# define ISASCII(c) isascii(c)
#endif

#ifdef isblank
# define ISBLANK(c) (ISASCII(c) && isblank(c))
#else
# define ISBLANK(c) ((c) == ' ' || (c) == '\t')
#endif
#ifdef isgraph
# define ISGRAPH(c) (ISASCII(c) && isgraph(c))
#else
# define ISGRAPH(c) (ISASCII(c) && isprint(c) && !isspace(c))
#endif

#undef ISPRINT
#define ISPRINT(c) (ISASCII(c) && isprint(c))
#define ISDIGIT(c) (ISASCII(c) && isdigit(c))
#define ISALNUM(c) (ISASCII(c) && isalnum(c))
#define ISALPHA(c) (ISASCII(c) && isalpha(c))
#define ISCNTRL(c) (ISASCII(c) && iscntrl(c))
#define ISLOWER(c) (ISASCII(c) && islower(c))
#define ISPUNCT(c) (ISASCII(c) && ispunct(c))
#define ISSPACE(c) (ISASCII(c) && isspace(c))
#define ISUPPER(c) (ISASCII(c) && isupper(c))
#define ISXDIGIT(c) (ISASCII(c) && isxdigit(c))

#ifndef NULL
# define NULL (void *)0
#endif

/* 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

/* These are the command codes that appear in compiled regular
   expressions, one per byte.  Some command codes are followed by
   argument bytes.  A command code can specify any interpretation
   whatsoever for its arguments.  Zero-bytes may appear in the compiled
   regular expression.

   The value of `exactn' is needed in search.c (search_buffer) in emacs.
   So regex.h defines a symbol `RE_EXACTN_VALUE' to be 1; the value of
   `exactn' we use here must also be 1.  */

enum regexpcode
  {
    unused=0,
    exactn=1, /* Followed by one byte giving n, then by n literal bytes.  */
    begline,  /* Fail unless at beginning of line.  */
    endline,  /* Fail unless at end of line.  */
    begbuf,   /* Succeeds if at beginning of buffer (if emacs) or at beginning
                 of string to be matched (if not).  */
    endbuf,   /* Analogously, for end of buffer/string.  */
    endbuf2,  /* End of buffer/string, or newline just before it.  */
    begpos,   /* Matches where last scan//gsub left off.  */
    jump,     /* Followed by two bytes giving relative address to jump to.  */
    jump_past_alt,/* Same as jump, but marks the end of an alternative.  */
    on_failure_jump,     /* Followed by two bytes giving relative address of
                            place to resume at in case of failure.  */
    finalize_jump,       /* Throw away latest failure point and then jump to
                            address.  */
    maybe_finalize_jump, /* Like jump but finalize if safe to do so.
                            This is used to jump back to the beginning
                            of a repeat.  If the command that follows
                            this jump is clearly incompatible with the
                            one at the beginning of the repeat, such that
                            we can be sure that there is no use backtracking
                            out of repetitions already completed,
                            then we finalize.  */
    dummy_failure_jump,  /* Jump, and push a dummy failure point. This
                            failure point will be thrown away if an attempt
                            is made to use it for a failure. A + construct
                            makes this before the first repeat.  Also
                            use it as an intermediary kind of jump when
                            compiling an or construct.  */
    push_dummy_failure, /* Push a dummy failure point and continue.  Used at the end of
                           alternatives.  */
    succeed_n,   /* Used like on_failure_jump except has to succeed n times;
                    then gets turned into an on_failure_jump. The relative
                    address following it is useless until then.  The
                    address is followed by two bytes containing n.  */
    jump_n,      /* Similar to jump, but jump n times only; also the relative
                    address following is in turn followed by yet two more bytes
                    containing n.  */
    try_next,    /* Jump to next pattern for the first time,
                    leaving this pattern on the failure stack. */
    finalize_push,      /* Finalize stack and push the beginning of the pattern
                           on the stack to retry (used for non-greedy match) */
    finalize_push_n,    /* Similar to finalize_push, buf finalize n time only */
    set_number_at,      /* Set the following relative location to the
                           subsequent number.  */
    anychar,     /* Matches any (more or less) one character excluding newlines.  */
    anychar_repeat,      /* Matches sequence of characters excluding newlines.  */
    charset,     /* Matches any one char belonging to specified set.
                    First following byte is number of bitmap bytes.
                    Then come bytes for a bitmap saying which chars are in.
                    Bits in each byte are ordered low-bit-first.
                    A character is in the set if its bit is 1.
                    A character too large to have a bit in the map
                    is automatically not in the set.  */
    charset_not, /* Same parameters as charset, but match any character
                    that is not one of those specified.  */
    start_memory, /* Start remembering the text that is matched, for
                    storing in a memory register.  Followed by one
                    byte containing the register number.  Register numbers
                    must be in the range 0 through RE_NREGS.  */
    stop_memory, /* Stop remembering the text that is matched
                    and store it in a memory register.  Followed by
                    one byte containing the register number. Register
                    numbers must be in the range 0 through RE_NREGS.  */
    start_paren,    /* Place holder at the start of (?:..). */
    stop_paren,    /* Place holder at the end of (?:..). */
    casefold_on,   /* Turn on casefold flag. */
    casefold_off,  /* Turn off casefold flag. */
    option_set,    /* Turn on multi line match (match with newlines). */
    start_nowidth, /* Save string point to the stack. */
    stop_nowidth,  /* Restore string place at the point start_nowidth. */
    pop_and_fail,  /* Fail after popping nowidth entry from stack. */
    stop_backtrack,  /* Restore backtrack stack at the point start_nowidth. */
    duplicate,   /* Match a duplicate of something remembered.
                    Followed by one byte containing the index of the memory
                    register.  */
    wordchar,    /* Matches any word-constituent character.  */
    notwordchar, /* Matches any char that is not a word-constituent.  */
    wordbeg,     /* Succeeds if at word beginning.  */
    wordend,     /* Succeeds if at word end.  */
    wordbound,   /* Succeeds if at a word boundary.  */
    notwordbound /* Succeeds if not at a word boundary.  */
  };

/* Number of failure points to allocate space for initially,
   when matching.  If this number is exceeded, more space is allocated,
   so it is not a hard limit.  */

#ifndef NFAILURES
#define NFAILURES 160
#endif

/* Store NUMBER in two contiguous bytes starting at DESTINATION.  */
#define STORE_NUMBER(destination, number)                               \
  do { (destination)[0] = (number) & 0377;                              \
    (destination)[1] = (number) >> 8; } while (0)

/* Same as STORE_NUMBER, except increment the destination pointer to
   the byte after where the number is stored.  Watch out that values for
   DESTINATION such as p + 1 won't work, whereas p will.  */
#define STORE_NUMBER_AND_INCR(destination, number)                      \
  do { STORE_NUMBER(destination, number);                               \
    (destination) += 2; } while (0)

/* Put into DESTINATION a number stored in two contingous bytes starting
   at SOURCE.  */
#define EXTRACT_NUMBER(destination, source)                             \
  do { (destination) = *(source) & 0377;                                \
    (destination) += SIGN_EXTEND_CHAR(*(char*)((source) + 1)) << 8; } while (0)

/* Same as EXTRACT_NUMBER, except increment the pointer for source to
   point to second byte of SOURCE.  Note that SOURCE has to be a value
   such as p, not, e.g., p + 1. */
#define EXTRACT_NUMBER_AND_INCR(destination, source)                    \
  do { EXTRACT_NUMBER(destination, source);                             \
       (source) += 2; } while (0)

/* Specify the precise syntax of regexps for compilation.  This provides
   for compatibility for various utilities which historically have
   different, incompatible syntaxes.

   The argument SYNTAX is a bit-mask comprised of the various bits
   defined in regex.h.  */

long
re_set_syntax(syntax)
  long syntax;
{
    /* obsolete */
    return 0;
}

/* Macros for re_compile_pattern, which is found below these definitions.  */

#define TRANSLATE_P() ((options&RE_OPTION_IGNORECASE) && translate)
#define MAY_TRANSLATE() ((bufp->options&(RE_OPTION_IGNORECASE|RE_MAY_IGNORECASE)) && translate)
/* Fetch the next character in the uncompiled pattern---translating it
   if necessary.  Also cast from a signed character in the constant
   string passed to us by the user to an unsigned char that we can use
   as an array index (in, e.g., `translate').  */
#define PATFETCH(c)                                                     \
  do {if (p == pend) goto end_of_pattern;                               \
    c = (unsigned char) *p++;                                           \
    if (TRANSLATE_P()) c = (unsigned char)translate[c]; \
  } while (0)

/* Fetch the next character in the uncompiled pattern, with no
   translation.  */
#define PATFETCH_RAW(c)                                                 \
  do {if (p == pend) goto end_of_pattern;                               \
    c = (unsigned char)*p++;                                            \
  } while (0)

/* Go backwards one character in the pattern.  */
#define PATUNFETCH p--

#define MBC2WC(c, p)                                                    \
  do {                                                                  \
    if (current_mbctype == MBCTYPE_UTF8) {                              \
      int n = mbclen(c) - 1;                                            \
      c &= (1<<(BYTEWIDTH-2-n)) - 1;                                    \
      while (n--) {                                                     \
        c = c << 6 | (*p++ & ((1<<6)-1));                               \
      }                                                                 \
    }                                                                   \
    else {                                                              \
      c <<= 8;                                                          \
      c |= (unsigned char)*(p)++;                                       \
    }                                                                   \
  } while (0)

#define PATFETCH_MBC(c)                                                 \
  do {                                                                  \
    if (p + mbclen(c) - 1 >= pend) goto end_of_pattern;                 \
    MBC2WC(c, p);                                                       \
  } while(0)

#define WC2MBC1ST(c)                                                    \
 ((current_mbctype != MBCTYPE_UTF8) ? ((c<0x100) ? (c) : (((c)>>8)&0xff)) : utf8_firstbyte(c))

typedef unsigned int (*mbc_startpos_func_t) _((const char *string, unsigned int pos));

static unsigned int asc_startpos _((const char *string, unsigned int pos));
static unsigned int euc_startpos _((const char *string, unsigned int pos));
static unsigned int sjis_startpos _((const char *string, unsigned int pos));
static unsigned int utf8_startpos _((const char *string, unsigned int pos));

static const mbc_startpos_func_t mbc_startpos_func[4] = {
  asc_startpos, euc_startpos, sjis_startpos, utf8_startpos
};

#define mbc_startpos(start, pos) (*mbc_startpos_func[current_mbctype])((start), (pos))

static unsigned int
utf8_firstbyte(c)
     unsigned long c;
{
  if (c < 0x80) return c;
  if (c <= 0x7ff) return ((c>>6)&0xff)|0xc0;
  if (c <= 0xffff) return ((c>>12)&0xff)|0xe0;
  if (c <= 0x1fffff) return ((c>>18)&0xff)|0xf0;
  if (c <= 0x3ffffff) return ((c>>24)&0xff)|0xf8;
  if (c <= 0x7fffffff) return ((c>>30)&0xff)|0xfc;
#if SIZEOF_INT > 4
  if (c <= 0xfffffffff) return 0xfe;
#else
  return 0xfe;
#endif
}

static void
print_mbc(c)
     unsigned int c;
{
  if (current_mbctype == MBCTYPE_UTF8) {
    if (c < 0x80)
      printf("%c", (int)c);
    else if (c <= 0x7ff)
      printf("%c%c", (int)utf8_firstbyte(c), (int)(c & 0x3f));
    else if (c <= 0xffff)
      printf("%c%c%c", (int)utf8_firstbyte(c), (int)((c >> 6) & 0x3f),
             (int)(c & 0x3f));
    else if (c <= 0x1fffff)
      printf("%c%c%c%c", (int)utf8_firstbyte(c), (int)((c >> 12) & 0x3f),
             (int)((c >> 6) & 0x3f), (int)(c & 0x3f));
    else if (c <= 0x3ffffff)
      printf("%c%c%c%c%c", (int)utf8_firstbyte(c), (int)((c >> 18) & 0x3f),
             (int)((c >> 12) & 0x3f), (int)((c >> 6) & 0x3f), (int)(c & 0x3f));
    else if (c <= 0x7fffffff)
      printf("%c%c%c%c%c%c", (int)utf8_firstbyte(c), (int)((c >> 24) & 0x3f),
             (int)((c >> 18) & 0x3f), (int)((c >> 12) & 0x3f),
             (int)((c >> 6) & 0x3f), (int)(c & 0x3f));
  }
  else if (c < 0xff) {
    printf("\\%o", (int)c);
  }
  else {
    printf("%c%c", (int)(c >> BYTEWIDTH), (int)(c &0xff));
  }
}

/* If the buffer isn't allocated when it comes in, use this.  */
#define INIT_BUF_SIZE  28

/* Make sure we have at least N more bytes of space in buffer.  */
#define GET_BUFFER_SPACE(n)                                             \
  do {                                                                  \
    while (b - bufp->buffer + (n) >= bufp->allocated)                   \
      EXTEND_BUFFER;                                                    \
  } while (0)

/* Make sure we have one more byte of buffer space and then add CH to it.  */
#define BUFPUSH(ch)                                                     \
  do {                                                                  \
    GET_BUFFER_SPACE(1);                                                \
    *b++ = (char)(ch);                                                  \
  } while (0)

/* Extend the buffer by twice its current size via reallociation and
   reset the pointers that pointed into the old allocation to point to
   the correct places in the new allocation.  If extending the buffer
   results in it being larger than 1 << 16, then flag memory exhausted.  */
#define EXTEND_BUFFER                                           \
  do { char *old_buffer = bufp->buffer;                                 \
    if (bufp->allocated == (1L<<16)) goto too_big;                      \
    bufp->allocated *= 2;                                               \
    if (bufp->allocated > (1L<<16)) bufp->allocated = (1L<<16);         \
    bufp->buffer = (char*)xrealloc(bufp->buffer, bufp->allocated);      \
    if (bufp->buffer == 0)                                              \
      goto memory_exhausted;                                            \
    b = (b - old_buffer) + bufp->buffer;                                \
    if (fixup_alt_jump)                                                 \
      fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer;    \
    if (laststart)                                                      \
      laststart = (laststart - old_buffer) + bufp->buffer;              \
    begalt = (begalt - old_buffer) + bufp->buffer;                      \
    if (pending_exact)                                                  \
      pending_exact = (pending_exact - old_buffer) + bufp->buffer;      \
  } while (0)

/* Set the bit for character C in a character set list.  */
#define SET_LIST_BIT(c)                                                 \
  (b[(unsigned char)(c) / BYTEWIDTH]                                    \
   |= 1 << ((unsigned char)(c) % BYTEWIDTH))

/* Get the next unsigned number in the uncompiled pattern.  */
#define GET_UNSIGNED_NUMBER(num)                                        \
  do { if (p != pend) {                                                 \
        PATFETCH(c);                                                    \
        while (ISDIGIT(c)) {                                            \
          if (num < 0)                                                  \
             num = 0;                                                   \
          num = num * 10 + c - '0';                                     \
          if (p == pend)                                                \
             break;                                                     \
          PATFETCH(c);                                                  \
        }                                                               \
     }                                                                  \
  } while (0)

#define STREQ(s1, s2) ((strcmp(s1, s2) == 0))

#define CHAR_CLASS_MAX_LENGTH  6 /* Namely, `xdigit'.  */

#define IS_CHAR_CLASS(string)                                           \
   (STREQ(string, "alpha") || STREQ(string, "upper")                    \
    || STREQ(string, "lower") || STREQ(string, "digit")                 \
    || STREQ(string, "alnum") || STREQ(string, "xdigit")                \
    || STREQ(string, "space") || STREQ(string, "print")                 \
    || STREQ(string, "punct") || STREQ(string, "graph")                 \
    || STREQ(string, "cntrl") || STREQ(string, "blank"))

#define STORE_MBC(p, c)                                                 \
  do {                                                                  \
    (p)[0] = (unsigned char)(((c) >>24) & 0xff);                        \
    (p)[1] = (unsigned char)(((c) >>16) & 0xff);                        \
    (p)[2] = (unsigned char)(((c) >> 8) & 0xff);                        \
    (p)[3] = (unsigned char)(((c) >> 0) & 0xff);                        \
  } while (0)

#define STORE_MBC_AND_INCR(p, c)                                        \
  do {                                                                  \
    *(p)++ = (unsigned char)(((c) >>24) & 0xff);                        \
    *(p)++ = (unsigned char)(((c) >>16) & 0xff);                        \
    *(p)++ = (unsigned char)(((c) >> 8) & 0xff);                        \
    *(p)++ = (unsigned char)(((c) >> 0) & 0xff);                        \
  } while (0)

#define EXTRACT_MBC(p)                                                  \
  ((unsigned int)((unsigned char)(p)[0] << 24 |                         \
                    (unsigned char)(p)[1] << 16 |                       \
                    (unsigned char)(p)[2] <<  8 |                       \
                    (unsigned char)(p)[3]))

#define EXTRACT_MBC_AND_INCR(p)                                         \
  ((unsigned int)((p) += 4,                                             \
                    (unsigned char)(p)[-4] << 24 |                      \
                    (unsigned char)(p)[-3] << 16 |                      \
                    (unsigned char)(p)[-2] <<  8 |                      \
                    (unsigned char)(p)[-1]))

#define EXTRACT_UNSIGNED(p) \
  ((unsigned char)(p)[0] | (unsigned char)(p)[1] << 8)
#define EXTRACT_UNSIGNED_AND_INCR(p) \
  ((p) += 2, (unsigned char)(p)[-2] | (unsigned char)(p)[-1] << 8)

/* Handle (mb)?charset(_not)?.

   Structure of mbcharset(_not)? in compiled pattern.

     struct {
       unsinged char id;                mbcharset(_not)?
       unsigned char sbc_size;
       unsigned char sbc_map[sbc_size]; same as charset(_not)? up to here.
       unsigned short mbc_size;         number of intervals.
       struct {
         unsigned long beg;             beginning of interval.
         unsigned long end;             end of interval.
       } intervals[mbc_size];
     }; */

static void
set_list_bits(c1, c2, b)
    unsigned long c1, c2;
    unsigned char *b;
{
  unsigned char sbc_size = b[-1];
  unsigned short mbc_size = EXTRACT_UNSIGNED(&b[sbc_size]);
  unsigned short beg, end, upb;

  if (c1 > c2)
    return;
  b = &b[sbc_size + 2];

  for (beg = 0, upb = mbc_size; beg < upb; ) {
    unsigned short mid = (unsigned short)(beg + upb) >> 1;

    if ((int)c1 - 1 > (int)EXTRACT_MBC(&b[mid*8+4]))
      beg = mid + 1;
    else
      upb = mid;
  }

  for (end = beg, upb = mbc_size; end < upb; ) {
    unsigned short mid = (unsigned short)(end + upb) >> 1;

    if ((int)c2 >= (int)EXTRACT_MBC(&b[mid*8]) - 1)
      end = mid + 1;
    else
      upb = mid;
  }

  if (beg != end) {
    if (c1 > EXTRACT_MBC(&b[beg*8]))
      c1 = EXTRACT_MBC(&b[beg*8]);
    if (c2 < EXTRACT_MBC(&b[(end - 1)*8+4]))
      c2 = EXTRACT_MBC(&b[(end - 1)*8+4]);
  }
  if (end < mbc_size && end != beg + 1)
    /* NOTE: memcpy() would not work here.  */
    memmove(&b[(beg + 1)*8], &b[end*8], (mbc_size - end)*8);
  STORE_MBC(&b[beg*8 + 0], c1);
  STORE_MBC(&b[beg*8 + 4], c2);
  mbc_size += beg - end + 1;
  STORE_NUMBER(&b[-2], mbc_size);
}

static int
is_in_list_sbc(c, b)
    unsigned long c;
    const unsigned char *b;
{
  unsigned short size;

  size = *b++;
  return ((int)c / BYTEWIDTH < (int)size && b[c / BYTEWIDTH] & 1 << c % BYTEWIDTH);
}

static int
is_in_list_mbc(c, b)
    unsigned long c;
    const unsigned char *b;
{
  unsigned short size;
  unsigned short i, j;

  size = *b++;
  b += size + 2;
  size = EXTRACT_UNSIGNED(&b[-2]);
  if (size == 0) return 0;

  for (i = 0, j = size; i < j; ) {
    unsigned short k = (unsigned short)(i + j) >> 1;

    if (c > EXTRACT_MBC(&b[k*8+4]))
      i = k + 1;
    else
      j = k;
  }
  if (i < size && EXTRACT_MBC(&b[i*8]) <= c)
    return 1;

  return 0;
}

static int
is_in_list(c, b)
    unsigned long c;
    const unsigned char *b;
{
  return is_in_list_sbc(c, b) || (current_mbctype ? is_in_list_mbc(c, b) : 0);
}

static void
print_partial_compiled_pattern(start, end)
    unsigned char *start;
    unsigned char *end;
{
  int mcnt, mcnt2;
  unsigned char *p = start;
  unsigned char *pend = end;

  if (start == NULL) {
    printf("(null)\n");
    return;
  }

  /* Loop over pattern commands.  */
  while (p < pend) {
    switch ((enum regexpcode)*p++) {
    case unused:
      printf("/unused");
      break;

    case exactn:
      mcnt = *p++;
      printf("/exactn/%d", mcnt);
      do {
        putchar('/');
        printf("%c", *p++);
      }
      while (--mcnt);
      break;

    case start_memory:
      mcnt = *p++;
      printf("/start_memory/%d/%d", mcnt, *p++);
      break;

    case stop_memory:
      mcnt = *p++;
      printf("/stop_memory/%d/%d", mcnt, *p++);
      break;

    case start_paren:
      printf("/start_paren");
      break;

    case stop_paren:
      printf("/stop_paren");
      break;

    case casefold_on:
      printf("/casefold_on");
      break;

    case casefold_off:
      printf("/casefold_off");
      break;

    case option_set:
      printf("/option_set/%d", *p++);
      break;

    case start_nowidth:
      EXTRACT_NUMBER_AND_INCR(mcnt, p);
      printf("/start_nowidth//%d", mcnt);
      break;

    case stop_nowidth:
      printf("/stop_nowidth//");
      p += 2;
      break;

    case pop_and_fail:
      printf("/pop_and_fail");
      break;

    case stop_backtrack:
      printf("/stop_backtrack//");
      p += 2;
      break;

    case duplicate:
      printf("/duplicate/%d", *p++);
      break;

    case anychar:
      printf("/anychar");
      break;

    case anychar_repeat:
      printf("/anychar_repeat");
      break;

    case charset:
    case charset_not:
      {
        register int c;

        printf("/charset%s",
               (enum regexpcode)*(p - 1) == charset_not ? "_not" : "");

        mcnt = *p++;
        printf("/%d", mcnt);
        for (c = 0; c < mcnt; c++) {
          unsigned bit;
          unsigned char map_byte = p[c];

          putchar('/');

          for (bit = 0; bit < BYTEWIDTH; bit++)
            if (map_byte & (1 << bit))
              printf("%c", c * BYTEWIDTH + bit);
        }
        p += mcnt;
        mcnt = EXTRACT_UNSIGNED_AND_INCR(p);
        putchar('/');
        while (mcnt--) {
          print_mbc(EXTRACT_MBC_AND_INCR(p));
          putchar('-');
          print_mbc(EXTRACT_MBC_AND_INCR(p));
        }
        break;
      }

    case begline:
      printf("/begline");
      break;

    case endline:
      printf("/endline");
      break;

    case on_failure_jump:
      EXTRACT_NUMBER_AND_INCR(mcnt, p);
      printf("/on_failure_jump//%d", mcnt);
      break;

    case dummy_failure_jump:
      EXTRACT_NUMBER_AND_INCR(mcnt, p);
      printf("/dummy_failure_jump//%d", mcnt);
      break;

    case push_dummy_failure:
      printf("/push_dummy_failure");
      break;

    case finalize_jump:
      EXTRACT_NUMBER_AND_INCR(mcnt, p);
      printf("/finalize_jump//%d", mcnt);
      break;

    case maybe_finalize_jump:
      EXTRACT_NUMBER_AND_INCR(mcnt, p);
      printf("/maybe_finalize_jump//%d", mcnt);
      break;

    case jump_past_alt:
      EXTRACT_NUMBER_AND_INCR(mcnt, p);
      printf("/jump_past_alt//%d", mcnt);
      break;

    case jump:
      EXTRACT_NUMBER_AND_INCR(mcnt, p);
      printf("/jump//%d", mcnt);
      break;

    case succeed_n:
      EXTRACT_NUMBER_AND_INCR(mcnt, p);
      EXTRACT_NUMBER_AND_INCR(mcnt2, p);
      printf("/succeed_n//%d//%d", mcnt, mcnt2);
      break;

    case jump_n:
      EXTRACT_NUMBER_AND_INCR(mcnt, p);
      EXTRACT_NUMBER_AND_INCR(mcnt2, p);
      printf("/jump_n//%d//%d", mcnt, mcnt2);
      break;

    case set_number_at:
      EXTRACT_NUMBER_AND_INCR(mcnt, p);
      EXTRACT_NUMBER_AND_INCR(mcnt2, p);
      printf("/set_number_at//%d//%d", mcnt, mcnt2);
      break;

    case try_next:
      EXTRACT_NUMBER_AND_INCR(mcnt, p);
      printf("/try_next//%d", mcnt);
      break;

    case finalize_push:
      EXTRACT_NUMBER_AND_INCR(mcnt, p);
      printf("/finalize_push//%d", mcnt);
      break;

    case finalize_push_n:
      EXTRACT_NUMBER_AND_INCR(mcnt, p);
      EXTRACT_NUMBER_AND_INCR(mcnt2, p);
      printf("/finalize_push_n//%d//%d", mcnt, mcnt2);
      break;

    case wordbound:
      printf("/wordbound");
      break;

    case notwordbound:
      printf("/notwordbound");
      break;

    case wordbeg:
      printf("/wordbeg");
      break;

    case wordend:
      printf("/wordend");

    case wordchar:
      printf("/wordchar");
      break;

    case notwordchar:
      printf("/notwordchar");
      break;

    case begbuf:
      printf("/begbuf");
      break;

    case endbuf:
      printf("/endbuf");
      break;

    case endbuf2:
      printf("/endbuf2");
      break;

    case begpos:
      printf("/begpos");
      break;

    default:
      printf("?%d", *(p-1));
    }
  }
  printf("/\n");
}

static void
print_compiled_pattern(bufp)
     struct re_pattern_buffer *bufp;
{
  unsigned char *buffer = (unsigned char*)bufp->buffer;

  print_partial_compiled_pattern(buffer, buffer + bufp->used);
}

static char*
calculate_must_string(start, end)
     char *start;
     char *end;
{
  int mcnt;
  int max = 0;
  unsigned char *p = start;
  unsigned char *pend = end;
  char *must = 0;

  if (start == NULL) return 0;

  /* Loop over pattern commands.  */
  while (p < pend) {
    switch ((enum regexpcode)*p++) {
    case unused:
      break;

    case exactn:
      mcnt = *p;
      if (mcnt > max) {
        must = p;
        max = mcnt;
      }
      p += mcnt+1;
      break;

    case start_memory:
    case stop_memory:
      p += 2;
      break;

    case duplicate:
    case option_set:
      p++;
      break;

    case casefold_on:
    case casefold_off:
      return 0;         /* should not check must_string */

    case pop_and_fail:
    case anychar:
    case anychar_repeat:
    case begline:
    case endline:
    case wordbound:
    case notwordbound:
    case wordbeg:
    case wordend:
    case wordchar:
    case notwordchar:
    case begbuf:
    case endbuf:
    case endbuf2:
    case begpos:
    case push_dummy_failure:
    case start_paren:
    case stop_paren:
      break;

    case charset:
    case charset_not:
      mcnt = *p++;
      p += mcnt;
      mcnt = EXTRACT_UNSIGNED_AND_INCR(p);
      while (mcnt--) {
        p += 8;
      }
      break;

    case on_failure_jump:
      EXTRACT_NUMBER_AND_INCR(mcnt, p);
      if (mcnt > 0) p += mcnt;
      if ((enum regexpcode)p[-3] == jump) {
        p -= 2;
        EXTRACT_NUMBER_AND_INCR(mcnt, p);
        if (mcnt > 0) p += mcnt;
      }
      break;

    case dummy_failure_jump:
    case succeed_n:
    case try_next:
    case jump:
      EXTRACT_NUMBER_AND_INCR(mcnt, p);
      if (mcnt > 0) p += mcnt;
      break;

    case start_nowidth:
    case stop_nowidth:
    case stop_backtrack:
    case finalize_jump:
    case maybe_finalize_jump:
    case finalize_push:
      p += 2;
      break;

    case jump_n:
    case set_number_at:
    case finalize_push_n:
      p += 4;
      break;

    default:
      break;
    }
  }
  return must;
}

static unsigned int
read_backslash(c)
     int c;
{
  switch (c) {
  case 'n':
    return '\n';

  case 't':
    return '\t';

  case 'r':
    return '\r';

  case 'f':
    return '\f';

  case 'v':
    return '\v';

  case 'a':
    return '\007';

  case 'b':
    return '\010';

  case 'e':
    return '\033';
  }
  return c;
}

static unsigned int
read_special(p, pend, pp)
     const char *p, *pend, **pp;
{
  int c;

  PATFETCH_RAW(c);
  switch (c) {
  case 'M':
    PATFETCH_RAW(c);
    if (c != '-') return -1;
    PATFETCH_RAW(c);
    *pp = p;
    if (c == '\\') {
      return read_special(--p, pend, pp) | 0x80;
    }
    else if (c == -1) return ~0;
    else {
      return ((c & 0xff) | 0x80);
    }

  case 'C':
    PATFETCH_RAW(c);
    if (c != '-') return ~0;
  case 'c':
    PATFETCH_RAW(c);
    *pp = p;
    if (c == '\\') {
      c = read_special(--p, pend, pp);
    }
    else if (c == '?') return 0177;
    else if (c == -1) return ~0;
    return c & 0x9f;
  default:
    *pp = p + 1;
    return read_backslash(c);
  }

 end_of_pattern:
  return ~0;
}

/* re_compile_pattern takes a regular-expression string
   and converts it into a buffer full of byte commands for matching.

   PATTERN   is the address of the pattern string
   SIZE      is the length of it.
   BUFP     is a  struct re_pattern_buffer *  which points to the info
             on where to store the byte commands.
             This structure contains a  char *  which points to the
             actual space, which should have been obtained with malloc.
             re_compile_pattern may use realloc to grow the buffer space.

   The number of bytes of commands can be found out by looking in
   the `struct re_pattern_buffer' that bufp pointed to, after
   re_compile_pattern returns. */

char *
re_compile_pattern(pattern, size, bufp)
     const char *pattern;
     int size;
     struct re_pattern_buffer *bufp;
{
  register char *b = bufp->buffer;
  register const char *p = pattern;
  const char *nextp;
  const char *pend = pattern + size;
  register unsigned int c, c1 = 0;
  const char *p0;
  int numlen;
#define ERROR_MSG_MAX_SIZE 200
  static char error_msg[ERROR_MSG_MAX_SIZE+1];

  /* Address of the count-byte of the most recently inserted `exactn'
     command.  This makes it possible to tell whether a new exact-match
     character can be added to that command or requires a new `exactn'
     command.  */

  char *pending_exact = 0;

  /* Address of the place where a forward-jump should go to the end of
     the containing expression.  Each alternative of an `or', except the
     last, ends with a forward-jump of this sort.  */

  char *fixup_alt_jump = 0;

  /* Address of start of the most recently finished expression.
     This tells postfix * where to find the start of its operand.  */

  char *laststart = 0;

  /* In processing a repeat, 1 means zero matches is allowed.  */

  char zero_times_ok;

  /* In processing a repeat, 1 means many matches is allowed.  */

  char many_times_ok;

  /* In processing a repeat, 1 means non-greedy matches.  */

  char greedy;

  /* Address of beginning of regexp, or inside of last (.  */

  char *begalt = b;

  /* Place in the uncompiled pattern (i.e., the {) to
     which to go back if the interval is invalid.  */
  const char *beg_interval;

  /* In processing an interval, at least this many matches must be made.  */
  int lower_bound;

  /* In processing an interval, at most this many matches can be made.  */
  int upper_bound;

  /* Stack of information saved by ( and restored by ).
     Five stack elements are pushed by each (:
     First, the value of b.
     Second, the value of fixup_alt_jump.
     Third, the value of begalt.
     Fourth, the value of regnum.
     Fifth, the type of the paren. */

  int stacka[40];
  int *stackb = stacka;
  int *stackp = stackb;
  int *stacke = stackb + 40;

  /* Counts ('s as they are encountered.  Remembered for the matching ),
     where it becomes the register number to put in the stop_memory
     command.  */

  int regnum = 1;

  int range = 0;
  int had_mbchar = 0;
  int had_num_literal = 0;
  int had_char_class = 0;

  int options = bufp->options;

  bufp->fastmap_accurate = 0;
  bufp->must = 0;
  bufp->must_skip = 0;

  /* Initialize the syntax table.  */
  init_syntax_once();

  if (bufp->allocated == 0) {
    bufp->allocated = INIT_BUF_SIZE;
    /* EXTEND_BUFFER loses when bufp->allocated is 0.  */
    bufp->buffer = (char*)xrealloc(bufp->buffer, INIT_BUF_SIZE);
    if (!bufp->buffer) goto memory_exhausted; /* this not happen */
    begalt = b = bufp->buffer;
  }

  while (p != pend) {
    PATFETCH(c);

    switch (c) {
    case '$':
      if (bufp->options & RE_OPTION_SINGLELINE) {
        BUFPUSH(endbuf);
      }
      else {
        p0 = p;
        /* When testing what follows the $,
           look past the \-constructs that don't consume anything.  */

        while (p0 != pend) {
          if (*p0 == '\\' && p0 + 1 != pend
              && (p0[1] == 'b' || p0[1] == 'B'))
            p0 += 2;
          else
            break;
        }
        BUFPUSH(endline);
      }
      break;

    case '^':
      if (bufp->options & RE_OPTION_SINGLELINE)
        BUFPUSH(begbuf);
      else
        BUFPUSH(begline);
      break;

    case '+':
    case '?':
    case '*':
      /* If there is no previous pattern, char not special. */
      if (!laststart) {
        snprintf(error_msg, ERROR_MSG_MAX_SIZE,
                 "invalid regular expression; there's no previous pattern, to which '%c' would define cardinality at %d",
                 c, p-pattern);
        FREE_AND_RETURN(stackb, error_msg);
      }
      /* If there is a sequence of repetition chars,
         collapse it down to just one.  */
      zero_times_ok = c != '+';
      many_times_ok = c != '?';
      greedy = 1;
      if (p != pend) {
        PATFETCH(c);
        switch (c) {
        case '?':
          greedy = 0;
          break;
        case '*':
        case '+':
          goto nested_meta;
        default:
          PATUNFETCH;
          break;
        }
      }

    repeat:
      /* Star, etc. applied to an empty pattern is equivalent
         to an empty pattern.  */
      if (!laststart)
        break;

      if (greedy && many_times_ok && *laststart == anychar && b - laststart <= 2) {
        if (b[-1] == stop_paren)
          b--;
        if (zero_times_ok)
          *laststart = anychar_repeat;
        else {
          BUFPUSH(anychar_repeat);
        }
        break;
      }
      /* Now we know whether or not zero matches is allowed
         and also whether or not two or more matches is allowed.  */
      if (many_times_ok) {
        /* If more than one repetition is allowed, put in at the
           end a backward relative jump from b to before the next
           jump we're going to put in below (which jumps from
           laststart to after this jump).  */
        GET_BUFFER_SPACE(3);
        store_jump(b,greedy?maybe_finalize_jump:finalize_push,laststart-3);
        b += 3;         /* Because store_jump put stuff here.  */
      }

      /* On failure, jump from laststart to next pattern, which will be the
         end of the buffer after this jump is inserted.  */
      GET_BUFFER_SPACE(3);
      insert_jump(on_failure_jump, laststart, b + 3, b);
      b += 3;

      if (zero_times_ok) {
        if (greedy == 0) {
          GET_BUFFER_SPACE(3);
          insert_jump(try_next, laststart, b + 3, b);
          b += 3;
        }
      }
      else {
        /* At least one repetition is required, so insert a
           `dummy_failure_jump' before the initial
           `on_failure_jump' instruction of the loop. This
           effects a skip over that instruction the first time
           we hit that loop.  */
        GET_BUFFER_SPACE(3);
        insert_jump(dummy_failure_jump, laststart, laststart + 6, b);
        b += 3;
      }
      break;

    case '.':
      laststart = b;
      BUFPUSH(anychar);
      break;

    case '[':
      if (p == pend)
        FREE_AND_RETURN(stackb, "invalid regular expression; '[' can't be the last character ie. can't start range at the end of pattern");
      while ((b - bufp->buffer + 9 + (1 << BYTEWIDTH) / BYTEWIDTH)
             > bufp->allocated)
        EXTEND_BUFFER;

      laststart = b;
      if (*p == '^') {
        BUFPUSH(charset_not);
        p++;
      }
      else
        BUFPUSH(charset);
      p0 = p;

      BUFPUSH((1 << BYTEWIDTH) / BYTEWIDTH);
      /* Clear the whole map */
      memset(b, 0, (1 << BYTEWIDTH) / BYTEWIDTH + 2);

      had_mbchar = 0;
      had_num_literal = 0;
      had_char_class = 0;

      /* Read in characters and ranges, setting map bits.  */
      for (;;) {
        int size;
        unsigned last = (unsigned)-1;

        if ((size = EXTRACT_UNSIGNED(&b[(1 << BYTEWIDTH) / BYTEWIDTH])) || current_mbctype) {
          /* Ensure the space is enough to hold another interval
             of multi-byte chars in charset(_not)?.  */
          size = (1 << BYTEWIDTH) / BYTEWIDTH + 2 + size*8 + 8;
          while (b + size + 1 > bufp->buffer + bufp->allocated)
            EXTEND_BUFFER;
        }
      range_retry:
        if (range && had_char_class) {
          FREE_AND_RETURN(stackb, "invalid regular expression; can't use character class as an end value of range");
        }
        PATFETCH_RAW(c);

        if (c == ']') {
          if (p == p0 + 1) {
            if (p == pend)
              FREE_AND_RETURN(stackb, "invalid regular expression; empty character class");
            re_warning("character class has `]' without escape");
          }
          else
            /* Stop if this isn't merely a ] inside a bracket
               expression, but rather the end of a bracket
               expression.  */
            break;
        }
        /* Look ahead to see if it's a range when the last thing
           was a character class.  */
        if (had_char_class && c == '-' && *p != ']')
          FREE_AND_RETURN(stackb, "invalid regular expression; can't use character class as a start value of range");
        if (ismbchar(c)) {
          PATFETCH_MBC(c);
          had_mbchar++;
        }
        had_char_class = 0;

        if (c == '-' && ((p != p0 + 1 && *p != ']') ||
                         (p[0] == '-' && p[1] != ']') ||
                         range))
          re_warning("character class has `-' without escape");
        if (c == '[' && *p != ':')
          re_warning("character class has `[' without escape");

        /* \ escapes characters when inside [...].  */
        if (c == '\\') {
          PATFETCH_RAW(c);
          switch (c) {
          case 'w':
            for (c = 0; c < (1 << BYTEWIDTH); c++) {
              if (SYNTAX(c) == Sword ||
                  (!current_mbctype && SYNTAX(c) == Sword2))
                SET_LIST_BIT(c);
            }
            if (current_mbctype) {
              set_list_bits(0x80, 0xffffffff, b);
            }
            had_char_class = 1;
            last = -1;
            continue;

          case 'W':
            for (c = 0; c < (1 << BYTEWIDTH); c++) {
              if (SYNTAX(c) != Sword &&
                  ((current_mbctype && !re_mbctab[c]) ||
                  (!current_mbctype && SYNTAX(c) != Sword2)))
                SET_LIST_BIT(c);
            }
            had_char_class = 1;
            last = -1;
            continue;

          case 's':
            for (c = 0; c < 256; c++)
              if (ISSPACE(c))
                SET_LIST_BIT(c);
            had_char_class = 1;
            last = -1;
            continue;

          case 'S':
            for (c = 0; c < 256; c++)
              if (!ISSPACE(c))
                SET_LIST_BIT(c);
            if (current_mbctype)
              set_list_bits(0x80, 0xffffffff, b);
            had_char_class = 1;
            last = -1;
            continue;

          case 'd':
            for (c = '0'; c <= '9'; c++)
              SET_LIST_BIT(c);
            had_char_class = 1;
            last = -1;
            continue;

          case 'D':
            for (c = 0; c < 256; c++)
              if (!ISDIGIT(c))
                SET_LIST_BIT(c);
            if (current_mbctype)
              set_list_bits(0x80, 0xffffffff, b);
            had_char_class = 1;
            last = -1;
            continue;

          case 'x':
            c = scan_hex(p, 2, &numlen);
            if (numlen == 0) goto invalid_escape;
            p += numlen;
            had_num_literal = 1;
            break;

          case '0': case '1': case '2': case '3': case '4':
          case '5': case '6': case '7': case '8': case '9':
            PATUNFETCH;
            c = scan_oct(p, 3, &numlen);
            p += numlen;
            had_num_literal = 1;
            break;

          case 'M':
          case 'C':
          case 'c':
            {
              const char *pp;

              --p;
              c = read_special(p, pend, &pp);
              if (c > 255) goto invalid_escape;
              p = pp;
              had_num_literal = 1;
            }
            break;

          default:
            c = read_backslash(c);
            if (ismbchar(c)) {
              PATFETCH_MBC(c);
              had_mbchar++;
            }
            break;
          }
        }
        else if (c == '[' && *p == ':') { /* [:...:] */
          /* Leave room for the null.  */
          char str[CHAR_CLASS_MAX_LENGTH + 1];

          PATFETCH_RAW(c);
          c1 = 0;

          /* If pattern is `[[:'.  */
          if (p == pend)
            FREE_AND_RETURN(stackb, "invalid regular expression; re can't end '[[:'");

          for (;;) {
            PATFETCH_RAW(c);
            if (c == ':' || c == ']' || p == pend
                || c1 == CHAR_CLASS_MAX_LENGTH)
              break;
            str[c1++] = c;
          }
          str[c1] = '\0';

          /* If isn't a word bracketed by `[:' and `:]':
             undo the ending character, the letters, and
             the leading `:' and `['.  */
          if (c == ':' && *p == ']') {
            int ch;
            char is_alnum = STREQ(str, "alnum");
            char is_alpha = STREQ(str, "alpha");
            char is_blank = STREQ(str, "blank");
            char is_cntrl = STREQ(str, "cntrl");
            char is_digit = STREQ(str, "digit");
            char is_graph = STREQ(str, "graph");
            char is_lower = STREQ(str, "lower");
            char is_print = STREQ(str, "print");
            char is_punct = STREQ(str, "punct");
            char is_space = STREQ(str, "space");
            char is_upper = STREQ(str, "upper");
            char is_xdigit = STREQ(str, "xdigit");

            if (!IS_CHAR_CLASS(str)){
              snprintf(error_msg, ERROR_MSG_MAX_SIZE,
                       "invalid regular expression; [:%s:] is not a character class", str);
              FREE_AND_RETURN(stackb, error_msg);
            }

            /* Throw away the ] at the end of the character class.  */
            PATFETCH(c);

            if (p == pend)
              FREE_AND_RETURN(stackb, "invalid regular expression; range doesn't have ending ']' after a character class");

            for (ch = 0; ch < 1 << BYTEWIDTH; ch++) {
              if (   (is_alnum  && ISALNUM(ch))
                  || (is_alpha  && ISALPHA(ch))
                  || (is_blank  && ISBLANK(ch))
                  || (is_cntrl  && ISCNTRL(ch))
                  || (is_digit  && ISDIGIT(ch))
                  || (is_graph  && ISGRAPH(ch))
                  || (is_lower  && ISLOWER(ch))
                  || (is_print  && ISPRINT(ch))
                  || (is_punct  && ISPUNCT(ch))
                  || (is_space  && ISSPACE(ch))
                  || (is_upper  && ISUPPER(ch))
                  || (is_xdigit && ISXDIGIT(ch)))
                SET_LIST_BIT(ch);
            }
            had_char_class = 1;
            continue;
          }
          else {
            c1 += 2;
            while (c1--)
              PATUNFETCH;
            re_warning("character class has `[' without escape");
            c = '[';
          }
        }

        /* Get a range.  */
        if (range) {
          if (last > c)
            goto invalid_pattern;

          range = 0;
          if (had_mbchar == 0) {
            if (TRANSLATE_P()) {
              for (;last<=c;last++)
                SET_LIST_BIT(translate[last]);
            }
            else {
              for (;last<=c;last++)
                SET_LIST_BIT(last);
            }
          }
          else if (had_mbchar == 2) {
            set_list_bits(last, c, b);
          }
          else {
            /* restriction: range between sbc and mbc */
            goto invalid_pattern;
          }
        }
        else if (p[0] == '-' && p[1] != ']') {
          last = c;
          PATFETCH_RAW(c1);
          range = 1;
          goto range_retry;
        }
        else {
          if (TRANSLATE_P()) c = (unsigned char)translate[c];
          if (had_mbchar == 0 && (!current_mbctype || !had_num_literal)) {
            SET_LIST_BIT(c);
            had_num_literal = 0;
          }
          else {
            set_list_bits(c, c, b);
          }
        }
        had_mbchar = 0;
      }

      /* Discard any character set/class bitmap bytes that are all
         0 at the end of the map. Decrement the map-length byte too.  */
      while ((int)b[-1] > 0 && b[b[-1] - 1] == 0)
        b[-1]--;
      if (b[-1] != (1 << BYTEWIDTH) / BYTEWIDTH)
        memmove(&b[(unsigned char)b[-1]], &b[(1 << BYTEWIDTH) / BYTEWIDTH],
                2 + EXTRACT_UNSIGNED(&b[(1 << BYTEWIDTH) / BYTEWIDTH])*8);
      b += b[-1] + 2 + EXTRACT_UNSIGNED(&b[(unsigned char)b[-1]])*8;
      had_num_literal = 0;
      break;

    case '(':
      {
        int old_options = options;
        int push_option = 0;
        int casefold = 0;

        PATFETCH(c);
        if (c == '?') {
          int negative = 0;

          PATFETCH_RAW(c);
          switch (c) {
          case 'x': case 'm': case 'i': case '-':
            for (;;) {
              switch (c) {
              case '-':
                negative = 1;
                break;

              case ':':
              case ')':
                break;

              case 'x':
                if (negative)
                  options &= ~RE_OPTION_EXTENDED;
                else
                  options |= RE_OPTION_EXTENDED;
                break;

              case 'm':
                if (negative) {
                  if (options&RE_OPTION_MULTILINE) {
                    options &= ~RE_OPTION_MULTILINE;
                  }
                }
                else if (!(options&RE_OPTION_MULTILINE)) {
                  options |= RE_OPTION_MULTILINE;
                }
                push_option = 1;
                break;

              case 'i':
                if (negative) {
                  if (options&RE_OPTION_IGNORECASE) {
                    options &= ~RE_OPTION_IGNORECASE;
                  }
                }
                else if (!(options&RE_OPTION_IGNORECASE)) {
                  options |= RE_OPTION_IGNORECASE;
                }
                casefold = 1;
                break;

              default:
                FREE_AND_RETURN(stackb, "undefined (?...) inline option");
              }
              if (c == ')') {
                c = '#';        /* read whole in-line options */
                break;
              }
              if (c == ':') break;
              PATFETCH_RAW(c);
            }
            break;

          case '#':
            for (;;) {
              PATFETCH(c);
              if (c == ')') break;
            }
            c = '#';
            break;

          case ':':
          case '=':
          case '!':
          case '>':
            break;

          default:
            FREE_AND_RETURN(stackb, "undefined (?...) sequence");
          }
        }
        else {
          PATUNFETCH;
          c = '(';
        }
        if (c == '#') {
          if (push_option) {
            BUFPUSH(option_set);
            BUFPUSH(options);
          }
          if (casefold) {
            if (options & RE_OPTION_IGNORECASE)
              BUFPUSH(casefold_on);
            else
              BUFPUSH(casefold_off);
          }
          break;
        }
        if (stackp+8 >= stacke) {
          DOUBLE_STACK(int);
        }

        /* Laststart should point to the start_memory that we are about
           to push (unless the pattern has RE_NREGS or more ('s).  */
        /* obsolete: now RE_NREGS is just a default register size. */
        *stackp++ = b - bufp->buffer;
        *stackp++ = fixup_alt_jump ? fixup_alt_jump - bufp->buffer + 1 : 0;
        *stackp++ = begalt - bufp->buffer;
        switch (c) {
        case '(':
          BUFPUSH(start_memory);
          BUFPUSH(regnum);
          *stackp++ = regnum++;
          *stackp++ = b - bufp->buffer;
          BUFPUSH(0);
          /* too many ()'s to fit in a byte. (max 254) */
          if (regnum >= RE_REG_MAX) goto too_big;
          break;

        case '=':
        case '!':
        case '>':
          BUFPUSH(start_nowidth);
          *stackp++ = b - bufp->buffer;
          BUFPUSH(0);   /* temporary value */
          BUFPUSH(0);
          if (c != '!') break;

          BUFPUSH(on_failure_jump);
          *stackp++ = b - bufp->buffer;
          BUFPUSH(0);   /* temporary value */
          BUFPUSH(0);
          break;

        case ':':
          BUFPUSH(start_paren);
          pending_exact = 0;
        default:
          break;
        }
        if (push_option) {
          BUFPUSH(option_set);
          BUFPUSH(options);
        }
        if (casefold) {
          if (options & RE_OPTION_IGNORECASE)
            BUFPUSH(casefold_on);
          else
            BUFPUSH(casefold_off);
        }
        *stackp++ = c;
        *stackp++ = old_options;
        fixup_alt_jump = 0;
        laststart = 0;
        begalt = b;
      }
      break;

    case ')':
      if (stackp == stackb)
        FREE_AND_RETURN(stackb, "unmatched )");

      pending_exact = 0;
      if (fixup_alt_jump) {
        /* Push a dummy failure point at the end of the
           alternative for a possible future
           `finalize_jump' to pop.  See comments at
           `push_dummy_failure' in `re_match'.  */
        BUFPUSH(push_dummy_failure);

        /* We allocated space for this jump when we assigned
           to `fixup_alt_jump', in the `handle_alt' case below.  */
        store_jump(fixup_alt_jump, jump, b);
      }
      if (options != stackp[-1]) {
        if ((options ^ stackp[-1]) & RE_OPTION_IGNORECASE) {
          BUFPUSH((options&RE_OPTION_IGNORECASE)?casefold_off:casefold_on);
        }
        if ((options ^ stackp[-1]) != RE_OPTION_IGNORECASE) {
          BUFPUSH(option_set);
          BUFPUSH(stackp[-1]);
        }
      }
      p0 = b;
      options = *--stackp;
      switch (c = *--stackp) {
      case '(':
        {
          char *loc = bufp->buffer + *--stackp;
          *loc = regnum - stackp[-1];
          BUFPUSH(stop_memory);
          BUFPUSH(stackp[-1]);
          BUFPUSH(regnum - stackp[-1]);
          stackp--;
        }
        break;

      case '!':
        BUFPUSH(pop_and_fail);
        /* back patch */
        STORE_NUMBER(bufp->buffer+stackp[-1], b - bufp->buffer - stackp[-1] - 2);
        stackp--;
        /* fall through */
      case '=':
        BUFPUSH(stop_nowidth);
        /* tell stack-pos place to start_nowidth */
        STORE_NUMBER(bufp->buffer+stackp[-1], b - bufp->buffer - stackp[-1] - 2);
        BUFPUSH(0);     /* space to hold stack pos */
        BUFPUSH(0);
        stackp--;
        break;

      case '>':
        BUFPUSH(stop_backtrack);
        /* tell stack-pos place to start_nowidth */
        STORE_NUMBER(bufp->buffer+stackp[-1], b - bufp->buffer - stackp[-1] - 2);
        BUFPUSH(0);     /* space to hold stack pos */
        BUFPUSH(0);
        stackp--;
        break;

      case ':':
        BUFPUSH(stop_paren);
        break;

      default:
        break;
      }
      begalt = *--stackp + bufp->buffer;
      stackp--;
      fixup_alt_jump = *stackp ? *stackp + bufp->buffer - 1 : 0;
      laststart = *--stackp + bufp->buffer;
      if (c == '!' || c == '=') laststart = b;
      break;

    case '|':
      /* Insert before the previous alternative a jump which
         jumps to this alternative if the former fails.  */
      GET_BUFFER_SPACE(3);
      insert_jump(on_failure_jump, begalt, b + 6, b);
      pending_exact = 0;
      b += 3;
      /* The alternative before this one has a jump after it
         which gets executed if it gets matched.  Adjust that
         jump so it will jump to this alternative's analogous
         jump (put in below, which in turn will jump to the next
         (if any) alternative's such jump, etc.).  The last such
         jump jumps to the correct final destination.  A picture:
         _____ _____
         |   | |   |
         |   v |   v
         a | b   | c

         If we are at `b', then fixup_alt_jump right now points to a
         three-byte space after `a'.  We'll put in the jump, set
         fixup_alt_jump to right after `b', and leave behind three
         bytes which we'll fill in when we get to after `c'.  */

      if (fixup_alt_jump)
        store_jump(fixup_alt_jump, jump_past_alt, b);

      /* Mark and leave space for a jump after this alternative,
         to be filled in later either by next alternative or
         when know we're at the end of a series of alternatives.  */
      fixup_alt_jump = b;
      GET_BUFFER_SPACE(3);
      b += 3;

      laststart = 0;
      begalt = b;
      break;

    case '{':
      /* If there is no previous pattern, this is an invalid pattern.  */
      if (!laststart) {
        snprintf(error_msg, ERROR_MSG_MAX_SIZE,
                 "invalid regular expression; there's no previous pattern, to which '{' would define cardinality at %d",
                 p-pattern);
        FREE_AND_RETURN(stackb, error_msg);
      }
      if( p == pend)
        FREE_AND_RETURN(stackb, "invalid regular expression; '{' can't be last character" );

      beg_interval = p - 1;

      lower_bound = -1;                 /* So can see if are set.  */
      upper_bound = -1;
      GET_UNSIGNED_NUMBER(lower_bound);
      if (c == ',') {
        GET_UNSIGNED_NUMBER(upper_bound);
      }
      else
        /* Interval such as `{1}' => match exactly once. */
        upper_bound = lower_bound;

      if (lower_bound < 0 || c != '}')
        goto unfetch_interval;

      if (lower_bound >= RE_DUP_MAX || upper_bound >= RE_DUP_MAX)
        FREE_AND_RETURN(stackb, "too big quantifier in {,}");
      if (upper_bound < 0) upper_bound = RE_DUP_MAX;
      if (lower_bound > upper_bound)
        FREE_AND_RETURN(stackb, "can't do {n,m} with n > m");

      beg_interval = 0;
      pending_exact = 0;

      greedy = 1;
      if (p != pend) {
        PATFETCH(c);
        if (c == '?') greedy = 0;
        else PATUNFETCH;
      }

      if (lower_bound == 0) {
        zero_times_ok = 1;
        if (upper_bound == RE_DUP_MAX) {
          many_times_ok = 1;
          goto repeat;
        }
        if (upper_bound == 1) {
          many_times_ok = 0;
          goto repeat;
        }
      }
      if (lower_bound == 1) {
        if (upper_bound == 1) {
          /* No need to repeat */
          break;
        }
        if (upper_bound == RE_DUP_MAX) {
          many_times_ok = 1;
          zero_times_ok = 0;
          goto repeat;
        }
      }

      /* If upper_bound is zero, don't want to succeed at all;
         jump from laststart to b + 3, which will be the end of
         the buffer after this jump is inserted.  */

      if (upper_bound == 0) {
        GET_BUFFER_SPACE(3);
        insert_jump(jump, laststart, b + 3, b);
        b += 3;
        break;
      }

      /* If lower_bound == upper_bound, repeat count can be removed */
      if (lower_bound == upper_bound) {
        int mcnt;
        int skip_stop_paren = 0;

        if (b[-1] == stop_paren) {
          skip_stop_paren = 1;
          b--;
        }

        if (*laststart == exactn && laststart[1]+2 == b - laststart
            && laststart[1]*lower_bound < 256) {
          mcnt = laststart[1];
          GET_BUFFER_SPACE((lower_bound-1)*mcnt);
          laststart[1] = lower_bound*mcnt;
          while (--lower_bound) {
            memcpy(b, laststart+2, mcnt);
            b += mcnt;
          }
          if (skip_stop_paren) BUFPUSH(stop_paren);
          break;
        }

        if (lower_bound < 5 && b - laststart < 10) {
          /* 5 and 10 are the magic numbers */

          mcnt = b - laststart;
          GET_BUFFER_SPACE((lower_bound-1)*mcnt);
          while (--lower_bound) {
            memcpy(b, laststart, mcnt);
            b += mcnt;
          }
          if (skip_stop_paren) BUFPUSH(stop_paren);
          break;
        }
        if (skip_stop_paren) b++; /* push back stop_paren */
      }

      /* Otherwise, we have a nontrivial interval.  When
         we're all done, the pattern will look like:
         set_number_at <jump count> <upper bound>
         set_number_at <succeed_n count> <lower bound>
         succeed_n <after jump addr> <succed_n count>
         <body of loop>
         jump_n <succeed_n addr> <jump count>
         (The upper bound and `jump_n' are omitted if
         `upper_bound' is 1, though.)  */
      { /* If the upper bound is > 1, we need to insert
           more at the end of the loop.  */
        unsigned nbytes = upper_bound == 1 ? 10 : 20;

        GET_BUFFER_SPACE(nbytes);
        /* Initialize lower bound of the `succeed_n', even
           though it will be set during matching by its
           attendant `set_number_at' (inserted next),
           because `re_compile_fastmap' needs to know.
           Jump to the `jump_n' we might insert below.  */
        insert_jump_n(succeed_n, laststart, b + (nbytes/2),
                      b, lower_bound);
        b += 5;         /* Just increment for the succeed_n here.  */

        /* Code to initialize the lower bound.  Insert
           before the `succeed_n'.  The `5' is the last two
           bytes of this `set_number_at', plus 3 bytes of
           the following `succeed_n'.  */
        insert_op_2(set_number_at, laststart, b, 5, lower_bound);
        b += 5;

        if (upper_bound > 1) {
          /* More than one repetition is allowed, so
             append a backward jump to the `succeed_n'
             that starts this interval.

             When we've reached this during matching,
             we'll have matched the interval once, so
             jump back only `upper_bound - 1' times.  */
          GET_BUFFER_SPACE(5);
          store_jump_n(b, greedy?jump_n:finalize_push_n, laststart + 5,
                       upper_bound - 1);
          b += 5;

          /* The location we want to set is the second
             parameter of the `jump_n'; that is `b-2' as
             an absolute address.  `laststart' will be
             the `set_number_at' we're about to insert;
             `laststart+3' the number to set, the source
             for the relative address.  But we are
             inserting into the middle of the pattern --
             so everything is getting moved up by 5.
             Conclusion: (b - 2) - (laststart + 3) + 5,
             i.e., b - laststart.

             We insert this at the beginning of the loop
             so that if we fail during matching, we'll
             reinitialize the bounds.  */
          insert_op_2(set_number_at, laststart, b, b - laststart,
                      upper_bound - 1);
          b += 5;
        }
      }
      break;

    unfetch_interval:
      /* If an invalid interval, match the characters as literals.  */
      re_warning("regexp has invalid interval");
      p = beg_interval;
      beg_interval = 0;

      /* normal_char and normal_backslash need `c'.  */
      PATFETCH(c);
      goto normal_char;

    case '\\':
      if (p == pend)
        FREE_AND_RETURN(stackb, "invalid regular expression; '\\' can't be last character");
      /* Do not translate the character after the \, so that we can
         distinguish, e.g., \B from \b, even if we normally would
         translate, e.g., B to b.  */
      PATFETCH_RAW(c);
      switch (c) {
      case 's':
      case 'S':
      case 'd':
      case 'D':
        while (b - bufp->buffer + 9 + (1 << BYTEWIDTH) / BYTEWIDTH
               > bufp->allocated)
          EXTEND_BUFFER;

        laststart = b;
        if (c == 's' || c == 'd') {
          BUFPUSH(charset);
        }
        else {
          BUFPUSH(charset_not);
        }

        BUFPUSH((1 << BYTEWIDTH) / BYTEWIDTH);
        memset(b, 0, (1 << BYTEWIDTH) / BYTEWIDTH + 2);
        if (c == 's' || c == 'S') {
          SET_LIST_BIT(' ');
          SET_LIST_BIT('\t');
          SET_LIST_BIT('\n');
          SET_LIST_BIT('\r');
          SET_LIST_BIT('\f');
        }
        else {
          char cc;

          for (cc = '0'; cc <= '9'; cc++) {
            SET_LIST_BIT(cc);
          }
        }

        while ((int)b[-1] > 0 && b[b[-1] - 1] == 0)
          b[-1]--;
        if (b[-1] != (1 << BYTEWIDTH) / BYTEWIDTH)
          memmove(&b[(unsigned char)b[-1]], &b[(1 << BYTEWIDTH) / BYTEWIDTH],
                  2 + EXTRACT_UNSIGNED(&b[(1 << BYTEWIDTH) / BYTEWIDTH])*8);
        b += b[-1] + 2 + EXTRACT_UNSIGNED(&b[(unsigned char)b[-1]])*8;
        break;

      case 'w':
        laststart = b;
        BUFPUSH(wordchar);
        break;

      case 'W':
        laststart = b;
        BUFPUSH(notwordchar);
        break;

#ifndef RUBY
      case '<':
        BUFPUSH(wordbeg);
        break;

      case '>':
        BUFPUSH(wordend);
        break;
#endif

      case 'b':
        BUFPUSH(wordbound);
        break;

      case 'B':
        BUFPUSH(notwordbound);
        break;

      case 'A':
        BUFPUSH(begbuf);
        break;

      case 'Z':
        if ((bufp->options & RE_OPTION_SINGLELINE) == 0) {
          BUFPUSH(endbuf2);
          break;
        }
        /* fall through */
      case 'z':
        BUFPUSH(endbuf);
        break;

      case 'G':
        BUFPUSH(begpos);
        break;

        /* hex */
      case 'x':
        had_mbchar = 0;
        c = scan_hex(p, 2, &numlen);
        if (numlen == 0) goto invalid_escape;
        p += numlen;
        had_num_literal = 1;
        goto numeric_char;

        /* octal */
      case '0':
        had_mbchar = 0;
        c = scan_oct(p, 2, &numlen);
        p += numlen;
        had_num_literal = 1;
        goto numeric_char;

        /* back-ref or octal */
      case '1': case '2': case '3':
      case '4': case '5': case '6':
      case '7': case '8': case '9':
        PATUNFETCH;
        p0 = p;

        had_mbchar = 0;
        c1 = 0;
        GET_UNSIGNED_NUMBER(c1);
        if (!ISDIGIT(c)) PATUNFETCH;

        if (9 < c1 && c1 >= regnum) {
          /* need to get octal */
          c = scan_oct(p0, 3, &numlen) & 0xff;
          p = p0 + numlen;
          c1 = 0;
          had_num_literal = 1;
          goto numeric_char;
        }

        laststart = b;
        BUFPUSH(duplicate);
        BUFPUSH(c1);
        break;

      case 'M':
      case 'C':
      case 'c':
        p0 = --p;
        c = read_special(p, pend, &p0);
        if (c > 255) goto invalid_escape;
        p = p0;
        had_num_literal = 1;
        goto numeric_char;

      default:
        c = read_backslash(c);
        goto normal_char;
      }
      break;

    case '#':
      if (options & RE_OPTION_EXTENDED) {
        while (p != pend) {
          PATFETCH(c);
          if (c == '\n') break;
        }
        break;
      }
      goto normal_char;

    case ' ':
    case '\t':
    case '\f':
    case '\r':
    case '\n':
      if (options & RE_OPTION_EXTENDED)
        break;

    default:
      if (c == ']')
        re_warning("regexp has `]' without escape");
      else if (c == '}')
        re_warning("regexp has `}' without escape");
    normal_char:                /* Expects the character in `c'.  */
      had_mbchar = 0;
      if (ismbchar(c)) {
        had_mbchar = 1;
        c1 = p - pattern;
      }
    numeric_char:
      nextp = p + mbclen(c) - 1;
      if (!pending_exact || pending_exact + *pending_exact + 1 != b
          || *pending_exact >= (c1 ? 0176 : 0177)
          || (nextp < pend &&
              (   *nextp == '+' || *nextp == '?'
               || *nextp == '*' || *nextp == '^'
               || *nextp == '{'))) {
        laststart = b;
        BUFPUSH(exactn);
        pending_exact = b;
        BUFPUSH(0);
      }
      if (had_num_literal || c == 0xff) {
        BUFPUSH(0xff);
        (*pending_exact)++;
        had_num_literal = 0;
      }
      BUFPUSH(c);
      (*pending_exact)++;
      if (had_mbchar) {
        int len = mbclen(c) - 1;
        while (len--) {
          PATFETCH_RAW(c);
          BUFPUSH(c);
          (*pending_exact)++;
        }
      }
    }
  }

  if (fixup_alt_jump)
    store_jump(fixup_alt_jump, jump, b);

  if (stackp != stackb)
    FREE_AND_RETURN(stackb, "unmatched (");

  /* set optimize flags */
  laststart = bufp->buffer;
  if (laststart != b) {
    if (*laststart == dummy_failure_jump) laststart += 3;
    else if (*laststart == try_next) laststart += 3;
    if (*laststart == anychar_repeat) {
      bufp->options |= RE_OPTIMIZE_ANCHOR;
    }
  }

  bufp->used = b - bufp->buffer;
  bufp->re_nsub = regnum;
  laststart = bufp->buffer;
  if (laststart != b) {
    if (*laststart == start_memory) laststart += 3;
    if (*laststart == exactn) {
      bufp->options |= RE_OPTIMIZE_EXACTN;
      bufp->must = laststart+1;
    }
  }
  if (!bufp->must) {
    bufp->must = calculate_must_string(bufp->buffer, b);
  }
  if (current_mbctype == MBCTYPE_SJIS) bufp->options |= RE_OPTIMIZE_NO_BM;
  else if (bufp->must) {
    int i;
    int len = (unsigned char)bufp->must[0];

    for (i=1; i<len; i++) {
      if ((unsigned char)bufp->must[i] == 0xff ||
          (current_mbctype && ismbchar(bufp->must[i]))) {
        bufp->options |= RE_OPTIMIZE_NO_BM;
        break;
      }
    }
    if (!(bufp->options & RE_OPTIMIZE_NO_BM)) {
      bufp->must_skip = (int *) xmalloc((1 << BYTEWIDTH)*sizeof(int));
      bm_init_skip(bufp->must_skip, (unsigned char*)bufp->must+1,
                   (unsigned char)bufp->must[0],
                   (unsigned char*)(MAY_TRANSLATE()?translate:0));
    }
  }

  bufp->regstart = TMALLOC(regnum, unsigned char*);
  bufp->regend = TMALLOC(regnum, unsigned char*);
  bufp->old_regstart = TMALLOC(regnum, unsigned char*);
  bufp->old_regend = TMALLOC(regnum, unsigned char*);
  bufp->reg_info = TMALLOC(regnum, register_info_type);
  bufp->best_regstart = TMALLOC(regnum, unsigned char*);
  bufp->best_regend = TMALLOC(regnum, unsigned char*);
  FREE_AND_RETURN(stackb, 0);

 invalid_pattern:
  FREE_AND_RETURN(stackb, "invalid regular expression");

 end_of_pattern:
  FREE_AND_RETURN(stackb, "premature end of regular expression");

 too_big:
  FREE_AND_RETURN(stackb, "regular expression too big");

 memory_exhausted:
  FREE_AND_RETURN(stackb, "memory exhausted");

 nested_meta:
  FREE_AND_RETURN(stackb, "nested *?+ in regexp");

 invalid_escape:
  FREE_AND_RETURN(stackb, "Invalid escape character syntax");
}

void
re_free_pattern(bufp)
     struct re_pattern_buffer *bufp;
{
  xfree(bufp->buffer);
  xfree(bufp->fastmap);
  if (bufp->must_skip) xfree(bufp->must_skip);

  xfree(bufp->regstart);
  xfree(bufp->regend);
  xfree(bufp->old_regstart);
  xfree(bufp->old_regend);
  xfree(bufp->best_regstart);
  xfree(bufp->best_regend);
  xfree(bufp->reg_info);
  xfree(bufp);
}

/* Store a jump of the form <OPCODE> <relative address>.
   Store in the location FROM a jump operation to jump to relative
   address FROM - TO.  OPCODE is the opcode to store.  */

static void
store_jump(from, opcode, to)
     char *from, *to;
     int opcode;
{
  from[0] = (char)opcode;
  STORE_NUMBER(from + 1, to - (from + 3));
}

/* Open up space before char FROM, and insert there a jump to TO.
   CURRENT_END gives the end of the storage not in use, so we know
   how much data to copy up. OP is the opcode of the jump to insert.

   If you call this function, you must zero out pending_exact.  */

static void
insert_jump(op, from, to, current_end)
     int op;
     char *from, *to, *current_end;
{
  register char *pfrom = current_end;           /* Copy from here...  */
  register char *pto = current_end + 3;         /* ...to here.  */

  while (pfrom != from)
    *--pto = *--pfrom;
  store_jump(from, op, to);
}

/* Store a jump of the form <opcode> <relative address> <n> .

   Store in the location FROM a jump operation to jump to relative
   address FROM - TO.  OPCODE is the opcode to store, N is a number the
   jump uses, say, to decide how many times to jump.

   If you call this function, you must zero out pending_exact.  */

static void
store_jump_n(from, opcode, to, n)
     char *from, *to;
     int opcode;
     unsigned n;
{
  from[0] = (char)opcode;
  STORE_NUMBER(from + 1, to - (from + 3));
  STORE_NUMBER(from + 3, n);
}

/* Similar to insert_jump, but handles a jump which needs an extra
   number to handle minimum and maximum cases.  Open up space at
   location FROM, and insert there a jump to TO.  CURRENT_END gives the
   end of the storage in use, so we know how much data to copy up. OP is
   the opcode of the jump to insert.

   If you call this function, you must zero out pending_exact.  */

static void
insert_jump_n(op, from, to, current_end, n)
     int op;
     char *from, *to, *current_end;
     unsigned n;
{
  register char *pfrom = current_end;           /* Copy from here...  */
  register char *pto = current_end + 5;         /* ...to here.  */

  while (pfrom != from)
    *--pto = *--pfrom;
  store_jump_n(from, op, to, n);
}

/* Open up space at location THERE, and insert operation OP.
   CURRENT_END gives the end of the storage in use, so
   we know how much data to copy up.

   If you call this function, you must zero out pending_exact.  */

static void
insert_op(op, there, current_end)
     int op;
     char *there, *current_end;
{
  register char *pfrom = current_end;           /* Copy from here...  */
  register char *pto = current_end + 1;         /* ...to here.  */

  while (pfrom != there)
    *--pto = *--pfrom;

  there[0] = (char)op;
}

/* Open up space at location THERE, and insert operation OP followed by
   NUM_1 and NUM_2.  CURRENT_END gives the end of the storage in use, so
   we know how much data to copy up.

   If you call this function, you must zero out pending_exact.  */

static void
insert_op_2(op, there, current_end, num_1, num_2)
     int op;
     char *there, *current_end;
     int num_1, num_2;
{
  register char *pfrom = current_end;           /* Copy from here...  */
  register char *pto = current_end + 5;         /* ...to here.  */

  while (pfrom != there)
    *--pto = *--pfrom;

  there[0] = (char)op;
  STORE_NUMBER(there + 1, num_1);
  STORE_NUMBER(there + 3, num_2);
}

#define trans_eq(c1, c2, translate) (translate?(translate[c1]==translate[c2]):((c1)==(c2)))
static int
slow_match(little, lend, big, bend, translate)
     const unsigned char *little, *lend;
     const unsigned char *big, *bend;
     const unsigned char *translate;
{
  int c;

  while (little < lend && big < bend) {
    c = *little++;
    if (c == 0xff)
      c = *little++;
    if (!trans_eq(*big++, c, translate)) break;
  }
  if (little == lend) return 1;
  return 0;
}

static int
slow_search(little, llen, big, blen, translate)
     const unsigned char *little;
     int llen;
     const unsigned char *big;
     int blen;
     const char *translate;
{
  const unsigned char *bsave = big;
  const unsigned char *bend = big + blen;
  register int c;
  int fescape = 0;

  c = *little;
  if (c == 0xff) {
    c = little[1];
    fescape = 1;
  }
  else if (translate && !ismbchar(c)) {
    c = translate[c];
  }

  while (big < bend) {
    /* look for first character */
    if (fescape) {
      while (big < bend) {
        if (*big == c) break;
        big++;
      }
    }
    else if (translate && !ismbchar(c)) {
      while (big < bend) {
        if (ismbchar(*big)) big+=mbclen(*big)-1;
        else if (translate[*big] == c) break;
        big++;
      }
    }
    else {
      while (big < bend) {
        if (*big == c) break;
        if (ismbchar(*big)) big+=mbclen(*big)-1;
        big++;
      }
    }

    if (slow_match(little, little+llen, big, bend, translate))
      return big - bsave;

    big+=mbclen(*big);
  }
  return -1;
}

static void
bm_init_skip(skip, pat, m, translate)
     int *skip;
     unsigned char *pat;
     int m;
     const unsigned char *translate;
{
  int j, c;

  for (c=0; c<256; c++) {
    skip[c] = m;
  }
  if (translate) {
    for (j=0; j<m-1; j++) {
      skip[translate[pat[j]]] = m-1-j;
    }
  }
  else {
    for (j=0; j<m-1; j++) {
      skip[pat[j]] = m-1-j;
    }
  }
}

static int
bm_search(little, llen, big, blen, skip, translate)
     const unsigned char *little;
     int llen;
     const unsigned char *big;
     int blen;
     int *skip;
     const unsigned char *translate;
{
  int i, j, k;

  i = llen-1;
  if (translate) {
    while (i < blen) {
      k = i;
      j = llen-1;
      while (j >= 0 && translate[big[k]] == translate[little[j]]) {
        k--;
        j--;
      }
      if (j < 0) return k+1;

      i += skip[translate[big[i]]];
    }
    return -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[big[i]];
  }
  return -1;
}

/* Given a pattern, compute a fastmap from it.  The fastmap records
   which of the (1 << BYTEWIDTH) possible characters can start a string
   that matches the pattern.  This fastmap is used by re_search to skip
   quickly over totally implausible text.

   The caller must supply the address of a (1 << BYTEWIDTH)-byte data
   area as bufp->fastmap.
   The other components of bufp describe the pattern to be used.  */
void
re_compile_fastmap(bufp)
     struct re_pattern_buffer *bufp;
{
  unsigned char *pattern = (unsigned char*)bufp->buffer;
  int size = bufp->used;
  register char *fastmap = bufp->fastmap;
  register unsigned char *p = pattern;
  register unsigned char *pend = pattern + size;
  register int j, k;
  unsigned is_a_succeed_n;

  unsigned char *stacka[NFAILURES];
  unsigned char **stackb = stacka;
  unsigned char **stackp = stackb;
  unsigned char **stacke = stackb + NFAILURES;
  int options = bufp->options;

  memset(fastmap, 0, (1 << BYTEWIDTH));
  bufp->fastmap_accurate = 1;
  bufp->can_be_null = 0;

  while (p) {
    is_a_succeed_n = 0;
    if (p == pend) {
      bufp->can_be_null = 1;
      break;
    }
#ifdef SWITCH_ENUM_BUG
    switch ((int)((enum regexpcode)*p++))
#else
    switch ((enum regexpcode)*p++)
#endif
      {
      case exactn:
        if (p[1] == 0xff) {
          if (TRANSLATE_P())
            fastmap[translate[p[2]]] = 2;
          else
            fastmap[p[2]] = 2;
          bufp->options |= RE_OPTIMIZE_BMATCH;
        }
        else if (TRANSLATE_P())
          fastmap[translate[p[1]]] = 1;
        else
          fastmap[p[1]] = 1;
        break;

      case begline:
      case begbuf:
      case begpos:
      case endbuf:
      case endbuf2:
      case wordbound:
      case notwordbound:
      case wordbeg:
      case wordend:
      case pop_and_fail:
      case push_dummy_failure:
      case start_paren:
      case stop_paren:
        continue;

      case casefold_on:
        bufp->options |= RE_MAY_IGNORECASE;
        options |= RE_OPTION_IGNORECASE;
        continue;

      case casefold_off:
        options &= ~RE_OPTION_IGNORECASE;
        continue;

      case option_set:
        options = *p++;
        continue;

      case endline:
        if (TRANSLATE_P())
          fastmap[translate['\n']] = 1;
        else
          fastmap['\n'] = 1;
        if ((options & RE_OPTION_SINGLELINE) == 0 && bufp->can_be_null == 0)
          bufp->can_be_null = 2;
        break;

      case jump_n:
      case finalize_jump:
      case maybe_finalize_jump:
      case jump:
      case jump_past_alt:
      case dummy_failure_jump:
      case finalize_push:
      case finalize_push_n:
        EXTRACT_NUMBER_AND_INCR(j, p);
        p += j;
        if (j > 0)
          continue;
        /* Jump backward reached implies we just went through
           the body of a loop and matched nothing.
           Opcode jumped to should be an on_failure_jump.
           Just treat it like an ordinary jump.
           For a * loop, it has pushed its failure point already;
           If so, discard that as redundant.  */

        if ((enum regexpcode)*p != on_failure_jump
            && (enum regexpcode)*p != try_next
            && (enum regexpcode)*p != succeed_n)
          continue;
        p++;
        EXTRACT_NUMBER_AND_INCR(j, p);
        p += j;
        if (stackp != stackb && *stackp == p)
          stackp--;             /* pop */
        continue;

      case try_next:
      case start_nowidth:
      case stop_nowidth:
      case stop_backtrack:
        p += 2;
        continue;

      case succeed_n:
        is_a_succeed_n = 1;
        /* Get to the number of times to succeed.  */
        EXTRACT_NUMBER(k, p + 2);
        /* Increment p past the n for when k != 0.  */
        if (k != 0) {
          p += 4;
          continue;
        }
        /* fall through */

      case on_failure_jump:
      EXTRACT_NUMBER_AND_INCR(j, p);
      if (p + j < pend) {
        if (stackp == stacke) {
          EXPAND_FAIL_STACK();
        }
        *++stackp = p + j;      /* push */
      }
      else {
        bufp->can_be_null = 1;
      }
      if (is_a_succeed_n)
        EXTRACT_NUMBER_AND_INCR(k, p);  /* Skip the n.  */
      continue;

      case set_number_at:
        p += 4;
        continue;

      case start_memory:
      case stop_memory:
        p += 2;
        continue;

      case duplicate:
        bufp->can_be_null = 1;
        if (*p >= bufp->re_nsub) break;
        fastmap['\n'] = 1;
      case anychar_repeat:
      case anychar:
        for (j = 0; j < (1 << BYTEWIDTH); j++) {
          if (j != '\n' || (options & RE_OPTION_MULTILINE))
            fastmap[j] = 1;
        }
        if (bufp->can_be_null) {
          FREE_AND_RETURN_VOID(stackb);
        }
        /* Don't return; check the alternative paths
           so we can set can_be_null if appropriate.  */
        if ((enum regexpcode)p[-1] == anychar_repeat) {
            continue;
        }
        break;

      case wordchar:
        for (j = 0; j < 0x80; j++) {
          if (SYNTAX(j) == Sword)
            fastmap[j] = 1;
        }
        switch (current_mbctype) {
        case MBCTYPE_ASCII:
          for (j = 0x80; j < (1 << BYTEWIDTH); j++) {
            if (SYNTAX(j) == Sword2)
              fastmap[j] = 1;
          }
          break;
        case MBCTYPE_EUC:
        case MBCTYPE_SJIS:
        case MBCTYPE_UTF8:
          for (j = 0x80; j < (1 << BYTEWIDTH); j++) {
            if (re_mbctab[j])
              fastmap[j] = 1;
          }
          break;
        }
        break;

      case notwordchar:
        for (j = 0; j < 0x80; j++)
          if (SYNTAX(j) != Sword)
            fastmap[j] = 1;
        switch (current_mbctype) {
        case MBCTYPE_ASCII:
          for (j = 0x80; j < (1 << BYTEWIDTH); j++) {
            if (SYNTAX(j) != Sword2)
              fastmap[j] = 1;
          }
          break;
        case MBCTYPE_EUC:
        case MBCTYPE_SJIS:
        case MBCTYPE_UTF8:
          for (j = 0x80; j < (1 << BYTEWIDTH); j++) {
            if (!re_mbctab[j])
              fastmap[j] = 1;
          }
          break;
        }
        break;

      case charset:
        /* NOTE: Charset for single-byte chars never contain
           multi-byte char.  See set_list_bits().  */
        for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--)
          if (p[j / BYTEWIDTH] & (1 << (j % BYTEWIDTH))) {
            int tmp = TRANSLATE_P()?translate[j]:j;
            fastmap[tmp] = 1;
          }
        {
          unsigned short size;
          unsigned long c, beg, end;

          p += p[-1] + 2;
          size = EXTRACT_UNSIGNED(&p[-2]);
          for (j = 0; j < (int)size; j++) {
            c = EXTRACT_MBC(&p[j*8]);
            beg = WC2MBC1ST(c);
            c = EXTRACT_MBC(&p[j*8+4]);
            end = WC2MBC1ST(c);
            /* set bits for 1st bytes of multi-byte chars.  */
            while (beg <= end) {
              /* NOTE: Charset for multi-byte chars might contain
                 single-byte chars.  We must reject them. */
              if (c < 0x100) {
                fastmap[beg] = 2;
                bufp->options |= RE_OPTIMIZE_BMATCH;
              }
              else if (ismbchar(beg))
                fastmap[beg] = 1;
              beg++;
            }
          }
        }
        break;

      case charset_not:
        /* S: set of all single-byte chars.
           M: set of all first bytes that can start multi-byte chars.
           s: any set of single-byte chars.
           m: any set of first bytes that can start multi-byte chars.

           We assume S+M = U.
           ___      _   _
           s+m = (S*s+M*m).  */
        /* Chars beyond end of map must be allowed */
        /* NOTE: Charset_not for single-byte chars might contain
           multi-byte chars.  See set_list_bits(). */
        for (j = *p * BYTEWIDTH; j < (1 << BYTEWIDTH); j++)
          if (!ismbchar(j))
            fastmap[j] = 1;

        for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--)
          if (!(p[j / BYTEWIDTH] & (1 << (j % BYTEWIDTH)))) {
            if (!ismbchar(j))
              fastmap[j] = 1;
          }
        {
          unsigned short size;
          unsigned long c, beg;
          int num_literal = 0;

          p += p[-1] + 2;
          size = EXTRACT_UNSIGNED(&p[-2]);
          if (size == 0) {
            for (j = 0x80; j < (1 << BYTEWIDTH); j++)
              if (ismbchar(j))
                fastmap[j] = 1;
            break;
          }
          for (j = 0,c = 0;j < (int)size; j++) {
            unsigned int cc = EXTRACT_MBC(&p[j*8]);
            beg = WC2MBC1ST(cc);
            while (c <= beg) {
              if (ismbchar(c))
                fastmap[c] = 1;
              c++;
            }

            cc = EXTRACT_MBC(&p[j*8+4]);
            if (cc < 0xff) {
              num_literal = 1;
              while (c <= cc) {
                if (ismbchar(c))
                  fastmap[c] = 1;
                c++;
              }
            }
            c = WC2MBC1ST(cc);
          }

          for (j = c; j < (1 << BYTEWIDTH); j++) {
            if (num_literal)
              fastmap[j] = 1;
            if (ismbchar(j))
              fastmap[j] = 1;
          }
        }
        break;

      case unused:      /* pacify gcc -Wall */
        break;
      }

    /* Get here means we have successfully found the possible starting
       characters of one path of the pattern.  We need not follow this
       path any farther.  Instead, look at the next alternative
       remembered in the stack.  */
    if (stackp != stackb)
      p = *stackp--;            /* pop */
    else
      break;
  }
  FREE_AND_RETURN_VOID(stackb);
}

/* adjust startpos value to the position between characters. */
int
re_adjust_startpos(bufp, string, size, startpos, range)
     struct re_pattern_buffer *bufp;
     const char *string;
     int size, startpos, range;
{
  /* Update the fastmap now if not correct already.  */
  if (!bufp->fastmap_accurate) {
    re_compile_fastmap(bufp);
  }

  /* Adjust startpos for mbc string */
  if (current_mbctype && startpos>0 && !(bufp->options&RE_OPTIMIZE_BMATCH)) {
    int i = mbc_startpos(string, startpos);

    if (i < startpos) {
      if (range > 0) {
        startpos = i + mbclen(string[i]);
      }
      else {
        int len = mbclen(string[i]);
        if (i + len <= startpos)
          startpos = i + len;
        else
          startpos = i;
      }
    }
  }
  return startpos;
}

static int re_match_exec _((struct re_pattern_buffer *, const char *, int, int, int,
                            struct re_registers *));

/* Using the compiled pattern in BUFP->buffer, first tries to match
   STRING, starting first at index STARTPOS, then at STARTPOS + 1, and
   so on.  RANGE is the number of places to try before giving up.  If
   RANGE is negative, it searches backwards, i.e., the starting
   positions tried are STARTPOS, STARTPOS - 1, etc.  STRING is of SIZE.
   In REGS, return the indices of STRING that matched the entire
   BUFP->buffer and its contained subexpressions.

   The value returned is the position in the strings at which the match
   was found, or -1 if no match was found, or -2 if error (such as
   failure stack overflow).  */

int
re_search(bufp, string, size, startpos, range, regs)
     struct re_pattern_buffer *bufp;
     const char *string;
     int size, startpos, range;
     struct re_registers *regs;
{
  register char *fastmap = bufp->fastmap;
  int val, anchor = 0, initpos = startpos;

  /* Check for out-of-range starting position.  */
  if (startpos < 0  ||  startpos > size)
    return -1;

  /* Update the fastmap now if not correct already.  */
  if (fastmap && !bufp->fastmap_accurate) {
    re_compile_fastmap(bufp);
  }

  /* If the search isn't to be a backwards one, don't waste time in a
     search for a pattern that must be anchored.  */
  if (bufp->used > 0) {
    switch ((enum regexpcode)bufp->buffer[0]) {
    case begbuf:
    begbuf_match:
      if (range > 0) {
        if (startpos > 0) return -1;
        else {
          val = re_match(bufp, string, size, 0, regs);
          if (val >= 0) return 0;
          return val;
        }
      }
      break;

    case begline:
      anchor = 1;
      break;

    case begpos:
      val = re_match(bufp, string, size, startpos, regs);
      if (val >= 0) return startpos;
      return val;

    default:
      break;
    }
  }
  if (bufp->options & RE_OPTIMIZE_ANCHOR) {
    if (bufp->options&RE_OPTION_MULTILINE && range > 0) {
      goto begbuf_match;
    }
    anchor = 1;
  }

  if (bufp->must) {
    int len = ((unsigned char*)bufp->must)[0];
    int pos, pbeg, pend;

    pbeg = startpos;
    pend = startpos + range;
    if (pbeg > pend) {          /* swap pbeg,pend */
      pos = pend; pend = pbeg; pbeg = pos;
    }
    pend = size;
    if (bufp->options & RE_OPTIMIZE_NO_BM) {
      pos = slow_search(bufp->must+1, len,
                        string+pbeg, pend-pbeg,
                        MAY_TRANSLATE()?translate:0);
    }
    else {
      pos = bm_search(bufp->must+1, len,
                      string+pbeg, pend-pbeg,
                      bufp->must_skip,
                      MAY_TRANSLATE()?translate:0);
    }
    if (pos == -1) return -1;
    if (range > 0 && (bufp->options & RE_OPTIMIZE_EXACTN)) {
      startpos += pos;
      range -= pos;
      if (range < 0) return -1;
    }
  }

  for (;;) {
    /* If a fastmap is supplied, skip quickly over characters that
       cannot possibly be the start of a match.  Note, however, that
       if the pattern can possibly match the null string, we must
       test it at each starting point so that we take the first null
       string we get.  */

    if (fastmap && startpos < size
        && bufp->can_be_null != 1 && !(anchor && startpos == 0)) {
      if (range > 0) {  /* Searching forwards.  */
        register unsigned char *p, c;
        int irange = range;

        p = (unsigned char*)string+startpos;

        while (range > 0) {
          c = *p++;
          if (ismbchar(c)) {
            int len;

            if (fastmap[c])
              break;
            len = mbclen(c) - 1;
            while (len--) {
              c = *p++;
              range--;
              if (fastmap[c] == 2)
                goto startpos_adjust;
            }
          }
          else {
            if (fastmap[MAY_TRANSLATE() ? translate[c] : c])
              break;
          }
          range--;
        }
      startpos_adjust:
        startpos += irange - range;
      }
      else {                    /* Searching backwards.  */
        register unsigned char c;

        c = string[startpos];
        c &= 0xff;
        if (MAY_TRANSLATE() ? !fastmap[translate[c]] : !fastmap[c])
          goto advance;
      }
    }

    if (startpos > size) return -1;
    if ((anchor || !bufp->can_be_null) && range > 0 && size > 0 && startpos == size)
      return -1;
    val = re_match_exec(bufp, string, size, startpos, initpos, regs);
    if (val >= 0) return startpos;
    if (val == -2) return -2;

#ifndef NO_ALLOCA
#ifdef C_ALLOCA
    alloca(0);
#endif /* C_ALLOCA */
#endif /* NO_ALLOCA */

    if (range > 0) {
      if (anchor && startpos < size &&
          (startpos < 1 || string[startpos-1] != '\n')) {
        while (range > 0 && string[startpos] != '\n') {
          range--;
          startpos++;
        }
      }
    }

  advance:
    if (!range)
      break;
    else if (range > 0) {
      const char *d = string + startpos;

      if (ismbchar(*d)) {
        int len = mbclen(*d) - 1;
        range-=len, startpos+=len;
        if (!range)
          break;
      }
      range--, startpos++;
    }
    else {
      range++, startpos--;
      {
        const char *s, *d, *p;

        s = string; d = string + startpos;
        for (p = d; p-- > s && ismbchar(*p); )
          /* --p >= s would not work on 80[12]?86.
             (when the offset of s equals 0 other than huge model.)  */
          ;
        if (!((d - p) & 1)) {
          if (!range)
            break;
          range++, startpos--;
        }
      }
    }
  }
  return -1;
}

/* The following are used for re_match, defined below:  */

/* Accessing macros used in re_match: */

#define IS_ACTIVE(R)  ((R).bits.is_active)
#define MATCHED_SOMETHING(R)  ((R).bits.matched_something)

/* Macros used by re_match:  */

/* I.e., regstart, regend, and reg_info.  */
#define NUM_REG_ITEMS  3

/* I.e., ptr and count.  */
#define NUM_COUNT_ITEMS 2

/* Individual items aside from the registers.  */
#define NUM_NONREG_ITEMS 4

/* We push at most this many things on the stack whenever we
   fail.  The `+ 2' refers to PATTERN_PLACE and STRING_PLACE, which are
   arguments to the PUSH_FAILURE_POINT macro.  */
#define MAX_NUM_FAILURE_ITEMS   (num_regs * NUM_REG_ITEMS + NUM_NONREG_ITEMS)

/* We push this many things on the stack whenever we fail.  */
#define NUM_FAILURE_ITEMS  (last_used_reg * NUM_REG_ITEMS + NUM_NONREG_ITEMS + 1)

/* This pushes counter information for succeed_n and jump_n */
#define PUSH_FAILURE_COUNT(ptr)                                         \
  do {                                                                  \
    int c;                                                              \
    EXTRACT_NUMBER(c, ptr);                                             \
    ENSURE_FAIL_STACK(NUM_COUNT_ITEMS);                                 \
    *stackp++ = (unsigned char*)(long)c;                                \
    *stackp++ = (ptr);                                                  \
    num_failure_counts++;                                               \
  } while (0)

/* This pushes most of the information about the current state we will want
   if we ever fail back to it.  */

#define PUSH_FAILURE_POINT(pattern_place, string_place)                 \
  do {                                                                  \
    long last_used_reg, this_reg;                                       \
                                                                        \
    /* Find out how many registers are active or have been matched.     \
       (Aside from register zero, which is only set at the end.) */     \
    for (last_used_reg = num_regs-1; last_used_reg > 0; last_used_reg--)\
      if (!REG_UNSET(regstart[last_used_reg]))                          \
        break;                                                          \
                                                                        \
    ENSURE_FAIL_STACK(NUM_FAILURE_ITEMS);                               \
    *stackp++ = (unsigned char*)(long)num_failure_counts;               \
    num_failure_counts = 0;                                             \
                                                                        \
    /* Now push the info for each of those registers.  */               \
    for (this_reg = 1; this_reg <= last_used_reg; this_reg++) {         \
      *stackp++ = regstart[this_reg];                                   \
      *stackp++ = regend[this_reg];                                     \
      *stackp++ = reg_info[this_reg].word;                              \
    }                                                                   \
                                                                        \
    /* Push how many registers we saved.  */                            \
    *stackp++ = (unsigned char*)last_used_reg;                          \
                                                                        \
    *stackp++ = pattern_place;                                          \
    *stackp++ = string_place;                                           \
    *stackp++ = (unsigned char*)(long)options; /* current option status */      \
    *stackp++ = (unsigned char*)0; /* non-greedy flag */                \
  } while(0)

#define NON_GREEDY ((unsigned char*)1)

#define POP_FAILURE_COUNT()                                             \
  do {                                                                  \
    unsigned char *ptr = *--stackp;                                     \
    int count = (long)*--stackp;                                        \
    STORE_NUMBER(ptr, count);                                           \
  } while (0)

/* This pops what PUSH_FAILURE_POINT pushes.  */

#define POP_FAILURE_POINT()                                             \
  do {                                                                  \
    long temp;                                                          \
    stackp -= NUM_NONREG_ITEMS; /* Remove failure points (and flag). */ \
    temp = (long)*--stackp;     /* How many regs pushed.  */            \
    temp *= NUM_REG_ITEMS;      /* How much to take off the stack.  */  \
    stackp -= temp;             /* Remove the register info.  */        \
    temp = (long)*--stackp;     /* How many counters pushed.  */        \
    while (temp--) {                                                    \
      POP_FAILURE_COUNT();      /* Remove the counter info.  */         \
    }                                                                   \
    num_failure_counts = 0;     /* Reset num_failure_counts.  */        \
  } while(0)

     /* Registers are set to a sentinel when they haven't yet matched.  */
#define REG_UNSET_VALUE ((unsigned char*)-1)
#define REG_UNSET(e) ((e) == REG_UNSET_VALUE)

#define PREFETCH if (d == dend) goto fail

     /* Call this when have matched something; it sets `matched' flags for the
   registers corresponding to the subexpressions of which we currently
   are inside.  */
#define SET_REGS_MATCHED                                                \
  do { unsigned this_reg;                                               \
    for (this_reg = 0; this_reg < num_regs; this_reg++) {               \
        if (IS_ACTIVE(reg_info[this_reg]))                              \
          MATCHED_SOMETHING(reg_info[this_reg]) = 1;                    \
        else                                                            \
          MATCHED_SOMETHING(reg_info[this_reg]) = 0;                    \
      }                                                                 \
  } while(0)

#define AT_STRINGS_BEG(d)  ((d) == string)
#define AT_STRINGS_END(d)  ((d) == dend)

#define IS_A_LETTER(d) (SYNTAX(*(d)) == Sword ||                        \
                        (current_mbctype ?                              \
                         (re_mbctab[*(d)] && ((d)+mbclen(*(d)))<=dend): \
                         SYNTAX(*(d)) == Sword2))

#define PREV_IS_A_LETTER(d) ((current_mbctype == MBCTYPE_SJIS)?         \
                             IS_A_LETTER((d)-(!AT_STRINGS_BEG((d)-1)&&  \
                                              ismbchar((d)[-2])?2:1)):  \
                             ((current_mbctype && ((d)[-1] >= 0x80)) || \
                              IS_A_LETTER((d)-1)))

static void
init_regs(regs, num_regs)
     struct re_registers *regs;
     unsigned int num_regs;
{
  int i;

  regs->num_regs = num_regs;
  if (num_regs < RE_NREGS)
    num_regs = RE_NREGS;

  if (regs->allocated == 0) {
    regs->beg = TMALLOC(num_regs, int);
    regs->end = TMALLOC(num_regs, int);
    regs->allocated = num_regs;
  }
  else if (regs->allocated < num_regs) {
    TREALLOC(regs->beg, num_regs, int);
    TREALLOC(regs->end, num_regs, int);
    regs->allocated = num_regs;
  }
  for (i=0; i<num_regs; i++) {
    regs->beg[i] = regs->end[i] = -1;
  }
}

/* Match the pattern described by BUFP against STRING, which is of
   SIZE.  Start the match at index POS in STRING.  In REGS, return the
   indices of STRING that matched the entire BUFP->buffer and its
   contained subexpressions.

   If bufp->fastmap is nonzero, then it had better be up to date.

   The reason that the data to match are specified as two components
   which are to be regarded as concatenated is so this function can be
   used directly on the contents of an Emacs buffer.

   -1 is returned if there is no match.  -2 is returned if there is an
   error (such as match stack overflow).  Otherwise the value is the
   length of the substring which was matched.  */

int
re_match(bufp, string_arg, size, pos, regs)
     struct re_pattern_buffer *bufp;
     const char *string_arg;
     int size, pos;
     struct re_registers *regs;
{
  return re_match_exec(bufp, string_arg, size, pos, pos, regs);
}

static int
re_match_exec(bufp, string_arg, size, pos, beg, regs)
     struct re_pattern_buffer *bufp;
     const char *string_arg;
     int size, pos, beg;
     struct re_registers *regs;
{
  register unsigned char *p = (unsigned char*)bufp->buffer;
  unsigned char *p1;

  /* Pointer to beyond end of buffer.  */
  register unsigned char *pend = p + bufp->used;

  unsigned num_regs = bufp->re_nsub;

  unsigned char *string = (unsigned char*)string_arg;

  register unsigned char *d, *dend;
  register int mcnt;                    /* Multipurpose.  */
  int options = bufp->options;

  /* Failure point stack.  Each place that can handle a failure further
     down the line pushes a failure point on this stack.  It consists of
     restart, regend, and reg_info for all registers corresponding to the
     subexpressions we're currently inside, plus the number of such
     registers, and, finally, two char *'s.  The first char * is where to
     resume scanning the pattern; the second one is where to resume
     scanning the strings.  If the latter is zero, the failure point is a
     ``dummy''; if a failure happens and the failure point is a dummy, it
     gets discarded and the next next one is tried.  */

  unsigned char **stacka;
  unsigned char **stackb;
  unsigned char **stackp;
  unsigned char **stacke;

  /* Information on the contents of registers. These are pointers into
     the input strings; they record just what was matched (on this
     attempt) by a subexpression part of the pattern, that is, the
     regnum-th regstart pointer points to where in the pattern we began
     matching and the regnum-th regend points to right after where we
     stopped matching the regnum-th subexpression.  (The zeroth register
     keeps track of what the whole pattern matches.)  */

  unsigned char **regstart = bufp->regstart;
  unsigned char **regend = bufp->regend;

  /* If a group that's operated upon by a repetition operator fails to
     match anything, then the register for its start will need to be
     restored because it will have been set to wherever in the string we
     are when we last see its open-group operator.  Similarly for a
     register's end.  */
  unsigned char **old_regstart = bufp->old_regstart;
  unsigned char **old_regend = bufp->old_regend;

  /* The is_active field of reg_info helps us keep track of which (possibly
     nested) subexpressions we are currently in. The matched_something
     field of reg_info[reg_num] helps us tell whether or not we have
     matched any of the pattern so far this time through the reg_num-th
     subexpression.  These two fields get reset each time through any
     loop their register is in.  */

  register_info_type *reg_info = bufp->reg_info;

  /* The following record the register info as found in the above
     variables when we find a match better than any we've seen before.
     This happens as we backtrack through the failure points, which in
     turn happens only if we have not yet matched the entire string.  */

  unsigned best_regs_set = 0;
  unsigned char **best_regstart = bufp->best_regstart;
  unsigned char **best_regend = bufp->best_regend;

  int num_failure_counts = 0;

  if (regs) {
    init_regs(regs, num_regs);
  }

  /* Initialize the stack. */
  stacka = RE_TALLOC(MAX_NUM_FAILURE_ITEMS * NFAILURES, unsigned char*);
  stackb = stacka;
  stackp = stackb;
  stacke = &stackb[MAX_NUM_FAILURE_ITEMS * NFAILURES];

#ifdef DEBUG_REGEX
  fprintf(stderr, "Entering re_match(%s)\n", string_arg);
#endif

  /* Initialize subexpression text positions to -1 to mark ones that no
     ( or ( and ) or ) has been seen for. Also set all registers to
     inactive and mark them as not having matched anything or ever
     failed. */
  for (mcnt = 0; mcnt < num_regs; mcnt++) {
    regstart[mcnt] = regend[mcnt]
      = old_regstart[mcnt] = old_regend[mcnt]
      = best_regstart[mcnt] = best_regend[mcnt] = REG_UNSET_VALUE;
#ifdef __CHECKER__
    reg_info[mcnt].word = 0;
#endif
    IS_ACTIVE (reg_info[mcnt]) = 0;
    MATCHED_SOMETHING (reg_info[mcnt]) = 0;
  }

  /* Set up pointers to ends of strings.
     Don't allow the second string to be empty unless both are empty.  */

  /* `p' scans through the pattern as `d' scans through the data. `dend'
     is the end of the input string that `d' points within. `d' is
     advanced into the following input string whenever necessary, but
     this happens before fetching; therefore, at the beginning of the
     loop, `d' can be pointing at the end of a string, but it cannot
     equal string2.  */

  d = string + pos, dend = string + size;

  /* This loops over pattern commands.  It exits by returning from the
     function if match is complete, or it drops through if match fails
     at this starting point in the input data.  */

  for (;;) {
#ifdef DEBUG_REGEX
    fprintf(stderr,
            "regex loop(%d):  matching 0x%02d\n",
            p - (unsigned char*)bufp->buffer,
            *p);
#endif
    /* End of pattern means we might have succeeded.  */
    if (p == pend) {
      /* If not end of string, try backtracking.  Otherwise done.  */
      if ((bufp->options & RE_OPTION_LONGEST) && d != dend) {
        if (best_regs_set) /* non-greedy, no need to backtrack */
          goto restore_best_regs;
        while (stackp != stackb && stackp[-1] == NON_GREEDY) {
          if (best_regs_set) /* non-greedy, no need to backtrack */
            goto restore_best_regs;
          POP_FAILURE_POINT();
        }
        if (stackp != stackb) {
          /* More failure points to try.  */

          /* If exceeds best match so far, save it.  */
          if (! best_regs_set || (d > best_regend[0])) {
            best_regs_set = 1;
            best_regend[0] = d; /* Never use regstart[0].  */

            for (mcnt = 1; mcnt < num_regs; mcnt++) {
              best_regstart[mcnt] = regstart[mcnt];
              best_regend[mcnt] = regend[mcnt];
            }
          }
          goto fail;
        }
        /* If no failure points, don't restore garbage.  */
        else if (best_regs_set) {
        restore_best_regs:
          /* Restore best match.  */
          d = best_regend[0];

          for (mcnt = 0; mcnt < num_regs; mcnt++) {
            regstart[mcnt] = best_regstart[mcnt];
            regend[mcnt] = best_regend[mcnt];
          }
        }
      }

      /* If caller wants register contents data back, convert it
         to indices.  */
      if (regs) {
        regs->beg[0] = pos;
        regs->end[0] = d - string;
        for (mcnt = 1; mcnt < num_regs; mcnt++) {
          if (REG_UNSET(regend[mcnt])) {
            regs->beg[mcnt] = -1;
            regs->end[mcnt] = -1;
            continue;
          }
          regs->beg[mcnt] = regstart[mcnt] - string;
          regs->end[mcnt] = regend[mcnt] - string;
        }
      }
      FREE_AND_RETURN(stackb, (d - pos - string));
    }

    /* Otherwise match next pattern command.  */
#ifdef SWITCH_ENUM_BUG
    switch ((int)((enum regexpcode)*p++))
#else
    switch ((enum regexpcode)*p++)
#endif
      {
        /* ( [or `(', as appropriate] is represented by start_memory,
           ) by stop_memory.  Both of those commands are followed by
           a register number in the next byte.  The text matched
           within the ( and ) is recorded under that number.  */
      case start_memory:
        old_regstart[*p] = regstart[*p];
        regstart[*p] = d;
        IS_ACTIVE(reg_info[*p]) = 1;
        MATCHED_SOMETHING(reg_info[*p]) = 0;
        p += 2;
        continue;

      case stop_memory:
        old_regend[*p] = regend[*p];
        regend[*p] = d;
        IS_ACTIVE(reg_info[*p]) = 0;
        p += 2;
        continue;

      case start_paren:
      case stop_paren:
        break;

        /* \<digit> has been turned into a `duplicate' command which is
           followed by the numeric value of <digit> as the register number.  */
      case duplicate:
        {
          int regno = *p++;   /* Get which register to match against */
          register unsigned char *d2, *dend2;

          /* Check if there's corresponding group */
          if (regno >= num_regs) goto fail;
          /* Check if corresponding group is still open */
          if (IS_ACTIVE(reg_info[regno])) goto fail;

          /* Where in input to try to start matching.  */
          d2 = regstart[regno];
          if (REG_UNSET(d2)) goto fail;

          /* Where to stop matching; if both the place to start and
             the place to stop matching are in the same string, then
             set to the place to stop, otherwise, for now have to use
             the end of the first string.  */

          dend2 = regend[regno];
          if (REG_UNSET(dend2)) goto fail;
          for (;;) {
            /* At end of register contents => success */
            if (d2 == dend2) break;

            /* If necessary, advance to next segment in data.  */
            PREFETCH;

            /* How many characters left in this segment to match.  */
            mcnt = dend - d;

            /* Want how many consecutive characters we can match in
               one shot, so, if necessary, adjust the count.  */
            if (mcnt > dend2 - d2)
              mcnt = dend2 - d2;

            /* Compare that many; failure if mismatch, else move
               past them.  */
            if ((options & RE_OPTION_IGNORECASE)
                ? memcmp_translate(d, d2, mcnt)
                : memcmp((char*)d, (char*)d2, mcnt))
              goto fail;
            d += mcnt, d2 += mcnt;
          }
        }
        break;

      case start_nowidth:
        PUSH_FAILURE_POINT(0, d);
        if (stackp - stackb > RE_DUP_MAX) {
           FREE_AND_RETURN(stackb,(-2));
        }
        EXTRACT_NUMBER_AND_INCR(mcnt, p);
        STORE_NUMBER(p+mcnt, stackp - stackb);
        continue;

      case stop_nowidth:
        EXTRACT_NUMBER_AND_INCR(mcnt, p);
        stackp = stackb + mcnt;
        d = stackp[-3];
        POP_FAILURE_POINT();
        continue;

      case stop_backtrack:
        EXTRACT_NUMBER_AND_INCR(mcnt, p);
        stackp = stackb + mcnt;
        POP_FAILURE_POINT();
        continue;

      case pop_and_fail:
        EXTRACT_NUMBER(mcnt, p+1);
        stackp = stackb + mcnt;
        POP_FAILURE_POINT();
        goto fail;

      case anychar:
        PREFETCH;
        if (ismbchar(*d)) {
          if (d + mbclen(*d) > dend)
            goto fail;
          SET_REGS_MATCHED;
          d += mbclen(*d);
          break;
        }
        if (!(options&RE_OPTION_MULTILINE)
            && (TRANSLATE_P() ? translate[*d] : *d) == '\n')
          goto fail;
        SET_REGS_MATCHED;
        d++;
        break;

      case anychar_repeat:
        for (;;) {
          PUSH_FAILURE_POINT(p, d);
          PREFETCH;
          if (ismbchar(*d)) {
            if (d + mbclen(*d) > dend)
              goto fail;
            SET_REGS_MATCHED;
            d += mbclen(*d);
            continue;
          }
          if (!(options&RE_OPTION_MULTILINE) &&
              (TRANSLATE_P() ? translate[*d] : *d) == '\n')
            goto fail;
          SET_REGS_MATCHED;
          d++;
        }
        break;

      case charset:
      case charset_not:
        {
          int not;          /* Nonzero for charset_not.  */
          int part = 0;     /* true if matched part of mbc */
          unsigned char *dsave = d + 1;
          int cc, c;

          PREFETCH;
          c = (unsigned char)*d++;
          if (ismbchar(c)) {
            if (d + mbclen(c) - 1 <= dend) {
              cc = c;
              MBC2WC(c, d);
              not = is_in_list_mbc(c, p);
              if (!not) {
                part = not = is_in_list_sbc(cc, p);
              }
            } else {
              not = is_in_list(c, p);
            }
          }
          else {
            if (TRANSLATE_P())
              c = (unsigned char)translate[c];
            not = is_in_list(c, p);
          }

          if (*(p - 1) == (unsigned char)charset_not) {
            not = !not;
          }
          if (!not) goto fail;

          p += 1 + *p + 2 + EXTRACT_UNSIGNED(&p[1 + *p])*8;
          SET_REGS_MATCHED;

          if (part) d = dsave;
          break;
        }

      case begline:
        if (size == 0 || AT_STRINGS_BEG(d))
          break;
        if (d[-1] == '\n' && !AT_STRINGS_END(d))
          break;
        goto fail;

      case endline:
        if (AT_STRINGS_END(d)) {
          break;
        }
        else if (*d == '\n')
          break;
        goto fail;

        /* Match at the very beginning of the string. */
      case begbuf:
        if (AT_STRINGS_BEG(d))
          break;
        goto fail;

        /* Match at the very end of the data. */
      case endbuf:
        if (AT_STRINGS_END(d))
          break;
        goto fail;

        /* Match at the very end of the data. */
      case endbuf2:
        if (AT_STRINGS_END(d)) {
          break;
        }
        /* .. or newline just before the end of the data. */
        if (*d == '\n' && AT_STRINGS_END(d+1))
          break;
        goto fail;

        /* `or' constructs are handled by starting each alternative with
           an on_failure_jump that points to the start of the next
           alternative.  Each alternative except the last ends with a
           jump to the joining point.  (Actually, each jump except for
           the last one really jumps to the following jump, because
           tensioning the jumps is a hassle.)  */

        /* The start of a stupid repeat has an on_failure_jump that points
           past the end of the repeat text. This makes a failure point so
           that on failure to match a repetition, matching restarts past
           as many repetitions have been found with no way to fail and
           look for another one.  */

        /* A smart repeat is similar but loops back to the on_failure_jump
           so that each repetition makes another failure point.  */

        /* Match at the starting position. */
      case begpos:
        if (d - string == beg)
          break;
        goto fail;

      case on_failure_jump:
      on_failure:
      EXTRACT_NUMBER_AND_INCR(mcnt, p);
      PUSH_FAILURE_POINT(p + mcnt, d);
      continue;

      /* The end of a smart repeat has a maybe_finalize_jump back.
         Change it either to a finalize_jump or an ordinary jump.  */
      case maybe_finalize_jump:
        EXTRACT_NUMBER_AND_INCR(mcnt, p);
        p1 = p;

        /* Compare the beginning of the repeat with what in the
           pattern follows its end. If we can establish that there
           is nothing that they would both match, i.e., that we
           would have to backtrack because of (as in, e.g., `a*a')
           then we can change to finalize_jump, because we'll
           never have to backtrack.

           This is not true in the case of alternatives: in
           `(a|ab)*' we do need to backtrack to the `ab' alternative
           (e.g., if the string was `ab').  But instead of trying to
           detect that here, the alternative has put on a dummy
           failure point which is what we will end up popping.  */

        /* Skip over open/close-group commands.  */
        while (p1 + 2 < pend) {
          if ((enum regexpcode)*p1 == stop_memory ||
              (enum regexpcode)*p1 == start_memory)
            p1 += 3;    /* Skip over args, too.  */
          else if (/*(enum regexpcode)*p1 == start_paren ||*/
                   (enum regexpcode)*p1 == stop_paren)
              p1 += 1;
          else
            break;
        }

        if (p1 == pend)
          p[-3] = (unsigned char)finalize_jump;
        else if (*p1 == (unsigned char)exactn ||
                 *p1 == (unsigned char)endline) {
          register int c = *p1 == (unsigned char)endline ? '\n' : p1[2];
          register unsigned char *p2 = p + mcnt;
            /* p2[0] ... p2[2] are an on_failure_jump.
               Examine what follows that.  */
          if (p2[3] == (unsigned char)exactn && p2[5] != c)
            p[-3] = (unsigned char)finalize_jump;
          else if (p2[3] == (unsigned char)charset ||
                   p2[3] == (unsigned char)charset_not) {
            int not;
            if (ismbchar(c)) {
              unsigned char *pp = p1+3;
              MBC2WC(c, pp);
            }
            /* `is_in_list()' is TRUE if c would match */
            /* That means it is not safe to finalize.  */
            not = is_in_list(c, p2 + 4);
            if (p2[3] == (unsigned char)charset_not)
              not = !not;
            if (!not)
              p[-3] = (unsigned char)finalize_jump;
          }
        }
        p -= 2;         /* Point at relative address again.  */
        if (p[-1] != (unsigned char)finalize_jump) {
          p[-1] = (unsigned char)jump;
          goto nofinalize;
        }
        /* Note fall through.  */

        /* The end of a stupid repeat has a finalize_jump back to the
           start, where another failure point will be made which will
           point to after all the repetitions found so far.  */

        /* Take off failure points put on by matching on_failure_jump
           because didn't fail.  Also remove the register information
           put on by the on_failure_jump.  */
      case finalize_jump:
        if (stackp > stackb && stackp[-3] == d) {
          p = stackp[-4];
          POP_FAILURE_POINT();
          continue;
        }
        POP_FAILURE_POINT();
        /* Note fall through.  */

      /* We need this opcode so we can detect where alternatives end
         in `group_match_null_string_p' et al.  */
      case jump_past_alt:
        /* fall through */

        /* Jump without taking off any failure points.  */
      case jump:
      nofinalize:
        EXTRACT_NUMBER_AND_INCR(mcnt, p);
        if (mcnt < 0 && stackp > stackb && stackp[-3] == d) /* avoid infinite loop */
           goto fail;
        p += mcnt;
        continue;

      case dummy_failure_jump:
        /* Normally, the on_failure_jump pushes a failure point, which
           then gets popped at finalize_jump.  We will end up at
           finalize_jump, also, and with a pattern of, say, `a+', we
           are skipping over the on_failure_jump, so we have to push
           something meaningless for finalize_jump to pop.  */
        PUSH_FAILURE_POINT(0, 0);
        goto nofinalize;

        /* At the end of an alternative, we need to push a dummy failure
           point in case we are followed by a `finalize_jump', because
           we don't want the failure point for the alternative to be
           popped.  For example, matching `(a|ab)*' against `aab'
           requires that we match the `ab' alternative.  */
      case push_dummy_failure:
        /* See comments just above at `dummy_failure_jump' about the
           two zeroes.  */
        p1 = p;
        /* Skip over open/close-group commands.  */
        while (p1 + 2 < pend) {
          if ((enum regexpcode)*p1 == stop_memory ||
              (enum regexpcode)*p1 == start_memory)
            p1 += 3;    /* Skip over args, too.  */
          else if (/*(enum regexpcode)*p1 == start_paren ||*/
                   (enum regexpcode)*p1 == stop_paren)
              p1 += 1;
          else
            break;
        }
        if (p1 < pend && (enum regexpcode)*p1 == jump)
          p[-1] = unused;
        else
          PUSH_FAILURE_POINT(0, 0);
        break;

        /* Have to succeed matching what follows at least n times.  Then
           just handle like an on_failure_jump.  */
      case succeed_n:
        EXTRACT_NUMBER(mcnt, p + 2);
        /* Originally, this is how many times we HAVE to succeed.  */
        if (mcnt != 0) {
          mcnt--;
          p += 2;
          PUSH_FAILURE_COUNT(p);
          STORE_NUMBER_AND_INCR(p, mcnt);
          PUSH_FAILURE_POINT(0, 0);
        }
        else  {
          goto on_failure;
        }
        continue;

      case jump_n:
        EXTRACT_NUMBER(mcnt, p + 2);
        /* Originally, this is how many times we CAN jump.  */
        if (mcnt) {
          mcnt--;
          PUSH_FAILURE_COUNT(p + 2);
          STORE_NUMBER(p + 2, mcnt);
          goto nofinalize;           /* Do the jump without taking off
                                        any failure points.  */
        }
        /* If don't have to jump any more, skip over the rest of command.  */
        else
          p += 4;
        continue;

      case set_number_at:
        EXTRACT_NUMBER_AND_INCR(mcnt, p);
        p1 = p + mcnt;
        EXTRACT_NUMBER_AND_INCR(mcnt, p);
        STORE_NUMBER(p1, mcnt);
        continue;

      case try_next:
        EXTRACT_NUMBER_AND_INCR(mcnt, p);
        if (p + mcnt < pend) {
          PUSH_FAILURE_POINT(p, d);
          stackp[-1] = NON_GREEDY;
        }
        p += mcnt;
        continue;

      case finalize_push:
        POP_FAILURE_POINT();
        EXTRACT_NUMBER_AND_INCR(mcnt, p);
        if (mcnt < 0 && stackp > stackb  && stackp[-3] == d) /* avoid infinite loop */
           goto fail;
        PUSH_FAILURE_POINT(p + mcnt, d);
        stackp[-1] = NON_GREEDY;
        continue;

      case finalize_push_n:
        EXTRACT_NUMBER(mcnt, p + 2);
        /* Originally, this is how many times we CAN jump.  */
        if (mcnt) {
          int pos, i;

          mcnt--;
          STORE_NUMBER(p + 2, mcnt);
          EXTRACT_NUMBER(pos, p);
          EXTRACT_NUMBER(i, p+pos+5);
          if (i > 0) goto nofinalize;
          POP_FAILURE_POINT();
          EXTRACT_NUMBER_AND_INCR(mcnt, p);
          PUSH_FAILURE_POINT(p + mcnt, d);
          stackp[-1] = NON_GREEDY;
          p += 2;               /* skip n */
        }
        /* If don't have to push any more, skip over the rest of command.  */
        else
          p += 4;
        continue;

        /* Ignore these.  Used to ignore the n of succeed_n's which
           currently have n == 0.  */
      case unused:
        continue;

      case casefold_on:
        options |= RE_OPTION_IGNORECASE;
        continue;

      case casefold_off:
        options &= ~RE_OPTION_IGNORECASE;
        continue;

      case option_set:
        options = *p++;
        continue;

      case wordbound:
        if (AT_STRINGS_BEG(d)) {
          if (AT_STRINGS_END(d)) goto fail;
          if (IS_A_LETTER(d)) break;
          else goto fail;
        }
        if (AT_STRINGS_END(d)) {
          if (PREV_IS_A_LETTER(d)) break;
          else goto fail;
        }
        if (PREV_IS_A_LETTER(d) != IS_A_LETTER(d))
          break;
        goto fail;

      case notwordbound:
        if (AT_STRINGS_BEG(d)) {
          if (IS_A_LETTER(d)) goto fail;
          else break;
        }
        if (AT_STRINGS_END(d)) {
          if (PREV_IS_A_LETTER(d)) goto fail;
          else break;
        }
        if (PREV_IS_A_LETTER(d) != IS_A_LETTER(d))
          goto fail;
        break;

      case wordbeg:
        if (IS_A_LETTER(d) && (AT_STRINGS_BEG(d) || !PREV_IS_A_LETTER(d)))
          break;
        goto fail;

      case wordend:
        if (!AT_STRINGS_BEG(d) && PREV_IS_A_LETTER(d)
            && (!IS_A_LETTER(d) || AT_STRINGS_END(d)))
          break;
        goto fail;

      case wordchar:
        PREFETCH;
        if (!IS_A_LETTER(d))
          goto fail;
        if (ismbchar(*d) && d + mbclen(*d) - 1 < dend)
          d += mbclen(*d) - 1;
        d++;
        SET_REGS_MATCHED;
        break;

      case notwordchar:
        PREFETCH;
        if (IS_A_LETTER(d))
          goto fail;
        if (ismbchar(*d) && d + mbclen(*d) - 1 < dend)
          d += mbclen(*d) - 1;
        d++;
        SET_REGS_MATCHED;
        break;

      case exactn:
        /* Match the next few pattern characters exactly.
           mcnt is how many characters to match.  */
        mcnt = *p++;
        /* This is written out as an if-else so we don't waste time
           testing `translate' inside the loop.  */
        if (TRANSLATE_P()) {
          do {
            unsigned char c;

            PREFETCH;
            if (*p == 0xff) {
              p++;
              if (!--mcnt
                  || AT_STRINGS_END(d)
                  || (unsigned char)*d++ != (unsigned char)*p++)
                goto fail;
              continue;
            }
            c = *d++;
            if (ismbchar(c)) {
              int n;

              if (c != (unsigned char)*p++)
                goto fail;
              for (n = mbclen(c) - 1; n > 0; n--)
                if (!--mcnt     /* redundant check if pattern was
                                   compiled properly. */
                    || AT_STRINGS_END(d)
                    || (unsigned char)*d++ != (unsigned char)*p++)
                  goto fail;
              continue;
            }
            /* compiled code translation needed for ruby */
            if ((unsigned char)translate[c] != (unsigned char)translate[*p++])
              goto fail;
          }
          while (--mcnt);
        }
        else {
          do {
            PREFETCH;
            if (*p == 0xff) {p++; mcnt--;}
            if (*d++ != *p++) goto fail;
          }
          while (--mcnt);
        }
        SET_REGS_MATCHED;
        break;
      }
#ifdef RUBY
    CHECK_INTS;
#endif
    continue;  /* Successfully executed one pattern command; keep going.  */

    /* Jump here if any matching operation fails. */
  fail:
    if (stackp != stackb) {
      /* A restart point is known.  Restart there and pop it. */
      short last_used_reg, this_reg;

      /* If this failure point is from a dummy_failure_point, just
         skip it.  */
      if (stackp[-4] == 0 || (best_regs_set && stackp[-1] == NON_GREEDY)) {
        POP_FAILURE_POINT();
        goto fail;
      }
      stackp--;         /* discard greedy flag */
      options = (long)*--stackp;
      d = *--stackp;
      p = *--stackp;
      /* Restore register info.  */
      last_used_reg = (long)*--stackp;

      /* Make the ones that weren't saved -1 or 0 again. */
      for (this_reg = num_regs - 1; this_reg > last_used_reg; this_reg--) {
        regend[this_reg] = REG_UNSET_VALUE;
        regstart[this_reg] = REG_UNSET_VALUE;
        IS_ACTIVE(reg_info[this_reg]) = 0;
        MATCHED_SOMETHING(reg_info[this_reg]) = 0;
      }

      /* And restore the rest from the stack.  */
      for ( ; this_reg > 0; this_reg--) {
        reg_info[this_reg].word = *--stackp;
        regend[this_reg] = *--stackp;
        regstart[this_reg] = *--stackp;
      }
      mcnt = (long)*--stackp;
      while (mcnt--) {
        POP_FAILURE_COUNT();
      }
      if (p < pend) {
        int is_a_jump_n = 0;
        int failed_paren = 0;

        p1 = p;
        /* If failed to a backwards jump that's part of a repetition
           loop, need to pop this failure point and use the next one.  */
        switch ((enum regexpcode)*p1) {
        case jump_n:
        case finalize_push_n:
          is_a_jump_n = 1;
        case maybe_finalize_jump:
        case finalize_jump:
        case finalize_push:
        case jump:
          p1++;
          EXTRACT_NUMBER_AND_INCR(mcnt, p1);

          if (mcnt >= 0) break; /* should be backward jump */
          p1 += mcnt;

          if (( is_a_jump_n && (enum regexpcode)*p1 == succeed_n) ||
              (!is_a_jump_n && (enum regexpcode)*p1 == on_failure_jump)) {
            if (failed_paren) {
              p1++;
              EXTRACT_NUMBER_AND_INCR(mcnt, p1);
              PUSH_FAILURE_POINT(p1 + mcnt, d);
            }
            goto fail;
          }
          break;
        default:
          /* do nothing */;
        }
      }
    }
    else
      break;   /* Matching at this starting point really fails.  */
  }

  if (best_regs_set)
    goto restore_best_regs;

  FREE_AND_RETURN(stackb,(-1));         /* Failure to match.  */
}

static int
memcmp_translate(s1, s2, len)
     unsigned char *s1, *s2;
     register int len;
{
  register unsigned char *p1 = s1, *p2 = s2, c;
  while (len) {
    c = *p1++;
    if (ismbchar(c)) {
      int n;

      if (c != *p2++) return 1;
      for (n = mbclen(c) - 1; n > 0; n--)
        if (!--len || *p1++ != *p2++)
          return 1;
    }
    else
      if (translate[c] != translate[*p2++])
        return 1;
    len--;
  }
  return 0;
}

void
re_copy_registers(regs1, regs2)
     struct re_registers *regs1, *regs2;
{
  int i;

  if (regs1 == regs2) return;
  if (regs1->allocated == 0) {
    regs1->beg = TMALLOC(regs2->num_regs, int);
    regs1->end = TMALLOC(regs2->num_regs, int);
    regs1->allocated = regs2->num_regs;
  }
  else if (regs1->allocated < regs2->num_regs) {
    TREALLOC(regs1->beg, regs2->num_regs, int);
    TREALLOC(regs1->end, regs2->num_regs, int);
    regs1->allocated = regs2->num_regs;
  }
  for (i=0; i<regs2->num_regs; i++) {
    regs1->beg[i] = regs2->beg[i];
    regs1->end[i] = regs2->end[i];
  }
  regs1->num_regs = regs2->num_regs;
}

void
re_free_registers(regs)
     struct re_registers *regs;
{
  if (regs->allocated == 0) return;
  if (regs->beg) xfree(regs->beg);
  if (regs->end) xfree(regs->end);
}

/* Functions for multi-byte support.
   Created for grep multi-byte extension Jul., 1993 by t^2 (Takahiro Tanimoto)
   Last change: Jul. 9, 1993 by t^2  */
static const unsigned char mbctab_ascii[] = {
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};

static const unsigned char mbctab_euc[] = { /* 0xA1-0xFE */
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 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, 2,
  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,
  1, 1, 1, 1, 1, 1, 1, 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,
};

static const unsigned char mbctab_sjis[] = { /* 0x81-0x9F,0xE0-0xFC */
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 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,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0
};

static const unsigned char mbctab_sjis_trail[] = { /* 0x40-0x7E,0x80-0xFC */
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 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
};

static const unsigned char mbctab_utf8[] = {
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 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,
  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 0, 0,
};

const unsigned char *re_mbctab = mbctab_ascii;

void
re_mbcinit(mbctype)
     int mbctype;
{
  switch (mbctype) {
  case MBCTYPE_ASCII:
    re_mbctab = mbctab_ascii;
    current_mbctype = MBCTYPE_ASCII;
    break;
  case MBCTYPE_EUC:
    re_mbctab = mbctab_euc;
    current_mbctype = MBCTYPE_EUC;
    break;
  case MBCTYPE_SJIS:
    re_mbctab = mbctab_sjis;
    current_mbctype = MBCTYPE_SJIS;
    break;
  case MBCTYPE_UTF8:
    re_mbctab = mbctab_utf8;
    current_mbctype = MBCTYPE_UTF8;
    break;
  }
}

#define mbc_isfirst(t, c) (t)[(unsigned char)(c)]
#define mbc_len(t, c)     ((t)[(unsigned char)(c)]+1)

static unsigned int
asc_startpos(string, pos)
     const char *string;
     unsigned int pos;
{
  return pos;
}

#define euc_islead(c)  ((unsigned char)((c) - 0xa1) > 0xfe - 0xa1)
#define euc_mbclen(c)  mbc_len(mbctab_euc, (c))
static unsigned int
euc_startpos(string, pos)
     const char *string;
     unsigned int pos;
{
  unsigned int i = pos, w;

  while (i > 0 && !euc_islead(string[i])) {
    --i;
  }
  if (i == pos || i + (w = euc_mbclen(string[i])) > pos) {
    return i;
  }
  i += w;
  return i + ((pos - i) & ~1);
}

#define sjis_isfirst(c) mbc_isfirst(mbctab_sjis, (c))
#define sjis_istrail(c) mbctab_sjis_trail[(unsigned char)(c)]
#define sjis_mbclen(c)  mbc_len(mbctab_sjis, (c))
static unsigned int
sjis_startpos(string, pos)
     const char *string;
     unsigned int pos;
{
  unsigned int i = pos, w;

  if (i > 0 && sjis_istrail(string[i])) {
    do {
      if (!sjis_isfirst(string[--i])) {
        ++i;
        break;
      }
    } while (i > 0);
  }
  if (i == pos || i + (w = sjis_mbclen(string[i])) > pos) {
    return i;
  }
  i += w;
  return i + ((pos - i) & ~1);
}

#define utf8_islead(c)  ((unsigned char)((c) & 0xc0) != 0x80)
#define utf8_mbclen(c)  mbc_len(mbctab_utf8, (c))
static unsigned int
utf8_startpos(string, pos)
     const char *string;
     unsigned int pos;
{
  unsigned int i = pos, w;

  while (i > 0 && !utf8_islead(string[i])) {
    --i;
  }
  if (i == pos || i + (w = utf8_mbclen(string[i])) > pos) {
    return i;
  }
  return i + w;
}

/*
  vi: sw=2 ts=8
  Local variables:
  mode           : C
  c-file-style   : "gnu"
  tab-width      : 8
  End            :
*/
/* [<][>][^] [v] [top][bottom][index] [help] */


regex.h

root/regex.h

/* [<][>][^] [v][top][bottom] [index] [help] */

INCLUDED FROM

DEFINITIONS

This source file includes following definitions.
  1. __declspec
  2. regmatch_t
/* Definitions for data structures and routines for the regular
   expression library, version 0.12.
   Copyright (C) 1985,89,90,91,92,93,95,96,97,98 Free Software Foundation, Inc.

   This file is part of the GNU C Library.  Its master source is NOT part of
   the C library, however.  The master source lives in /gd/gnu/lib.

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public License as
   published by the Free Software Foundation; either version 2 of the
   License, or (at your option) any later version.

   The GNU C Library 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
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public
   License along with the GNU C Library; see the file LGPL.  If not,
   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.  */
/* Multi-byte extension added May, 1993 by t^2 (Takahiro Tanimoto)
   Last change: May 21, 1993 by t^2  */
/* modified for Ruby by matz@netlab.co.jp */

#ifndef REGEX_H
#define REGEX_H

/* symbol mangling for ruby */
#ifdef RUBY
# define re_adjust_startpos ruby_re_adjust_startpos
# define re_compile_fastmap ruby_re_compile_fastmap
# define re_compile_pattern ruby_re_compile_pattern
# define re_copy_registers ruby_re_copy_registers
# define re_free_pattern ruby_re_free_pattern
# define re_free_registers ruby_re_free_registers
# define re_match ruby_re_match
# define re_mbcinit ruby_re_mbcinit
# define re_search ruby_re_search
# define re_set_casetable ruby_re_set_casetable
# define register_info_type ruby_register_info_type
#endif

#include <stddef.h>

/* Define number of parens for which we record the beginnings and ends.
   This affects how much space the `struct re_registers' type takes up.  */
#ifndef RE_NREGS
#define RE_NREGS 10
#endif

#define BYTEWIDTH 8

#define RE_REG_MAX ((1<<BYTEWIDTH)-1)

/* Maximum number of duplicates an interval can allow.  */
#ifndef RE_DUP_MAX
#define RE_DUP_MAX  ((1 << 15) - 1)
#endif

/* If this bit is set, then character classes are supported; they are:
     [:alpha:], [:upper:], [:lower:],  [:digit:], [:alnum:], [:xdigit:],
     [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:].
   If not set, then character classes are not supported.  */
#define RE_CHAR_CLASSES (1L << 9)

/* match will be done case insensetively */
#define RE_OPTION_IGNORECASE (1L)
/* perl-style extended pattern available */
#define RE_OPTION_EXTENDED   (RE_OPTION_IGNORECASE<<1)
/* newline will be included for . */
#define RE_OPTION_MULTILINE  (RE_OPTION_EXTENDED<<1)
/* ^ and $ ignore newline */
#define RE_OPTION_SINGLELINE (RE_OPTION_MULTILINE<<1)
/* search for longest match, in accord with POSIX regexp */
#define RE_OPTION_LONGEST    (RE_OPTION_SINGLELINE<<1)

#define RE_MAY_IGNORECASE    (RE_OPTION_LONGEST<<1)
#define RE_OPTIMIZE_ANCHOR   (RE_MAY_IGNORECASE<<1)
#define RE_OPTIMIZE_EXACTN   (RE_OPTIMIZE_ANCHOR<<1)
#define RE_OPTIMIZE_NO_BM    (RE_OPTIMIZE_EXACTN<<1)
#define RE_OPTIMIZE_BMATCH   (RE_OPTIMIZE_NO_BM<<1)

/* For multi-byte char support */
#define MBCTYPE_ASCII 0
#define MBCTYPE_EUC 1
#define MBCTYPE_SJIS 2
#define MBCTYPE_UTF8 3

extern
#if defined _WIN32 && !defined __GNUC__ && !defined RUBY_EXPORT
__declspec(dllimport)
# endif
const unsigned char *re_mbctab;
#if defined(__STDC__)
void re_mbcinit (int);
#else
void re_mbcinit ();
#endif

#undef ismbchar
#define ismbchar(c) re_mbctab[(unsigned char)(c)]
#define mbclen(c)   (re_mbctab[(unsigned char)(c)]+1)

/* Structure used in re_match() */

typedef union
{
  unsigned char *word;
  struct {
    unsigned is_active : 1;
    unsigned matched_something : 1;
  } bits;
} register_info_type;

/* This data structure is used to represent a compiled pattern.  */

struct re_pattern_buffer
  {
    char *buffer;       /* Space holding the compiled pattern commands.  */
    int allocated;      /* Size of space that `buffer' points to. */
    int used;           /* Length of portion of buffer actually occupied  */
    char *fastmap;      /* Pointer to fastmap, if any, or zero if none.  */
                        /* re_search uses the fastmap, if there is one,
                           to skip over totally implausible characters.  */
    char *must;         /* Pointer to exact pattern which strings should have
                           to be matched.  */
    int *must_skip;     /* Pointer to exact pattern skip table for bm_search */
    long options;       /* Flags for options such as extended_pattern. */
    long re_nsub;       /* Number of subexpressions found by the compiler. */
    char fastmap_accurate;
                        /* Set to zero when a new pattern is stored,
                           set to one when the fastmap is updated from it.  */
    char can_be_null;   /* Set to one by compiling fastmap
                           if this pattern might match the null string.
                           It does not necessarily match the null string
                           in that case, but if this is zero, it cannot.
                           2 as value means can match null string
                           but at end of range or before a character
                           listed in the fastmap.  */

    /* stack & working area for re_match() */
    unsigned char **regstart;
    unsigned char **regend;
    unsigned char **old_regstart;
    unsigned char **old_regend;
    register_info_type *reg_info;
    unsigned char **best_regstart;
    unsigned char **best_regend;
  };

typedef struct re_pattern_buffer regex_t;

/* Structure to store register contents data in.

   Pass the address of such a structure as an argument to re_match, etc.,
   if you want this information back.

   For i from 1 to RE_NREGS - 1, start[i] records the starting index in
   the string of where the ith subexpression matched, and end[i] records
   one after the ending index.  start[0] and end[0] are analogous, for
   the entire pattern.  */

struct re_registers
  {
    int allocated;
    int num_regs;
    int *beg;
    int *end;
  };

/* Type for byte offsets within the string.  POSIX mandates this.  */
typedef size_t regoff_t;

/* POSIX specification for registers.  Aside from the different names than
   `re_registers', POSIX uses an array of structures, instead of a
   structure of arrays.  */
typedef struct
{
  regoff_t rm_so;  /* Byte offset from string's start to substring's start.  */
  regoff_t rm_eo;  /* Byte offset from string's start to substring's end.  */
} regmatch_t;

#ifdef __STDC__

extern char *re_compile_pattern (const char *, int, struct re_pattern_buffer *);
void re_free_pattern (struct re_pattern_buffer *);
/* Is this really advertised?  */
extern int re_adjust_startpos (struct re_pattern_buffer *, const char*, int, int, int);
extern void re_compile_fastmap (struct re_pattern_buffer *);
extern int re_search (struct re_pattern_buffer *, const char*, int, int, int,
                      struct re_registers *);
extern int re_match (struct re_pattern_buffer *, const char *, int, int,
                     struct re_registers *);
extern void re_set_casetable (const char *table);
extern void re_copy_registers (struct re_registers*, struct re_registers*);
extern void re_free_registers (struct re_registers*);

#ifndef RUBY
/* 4.2 bsd compatibility.  */
extern char *re_comp (const char *);
extern int re_exec (const char *);
#endif

#else /* !__STDC__ */

extern char *re_compile_pattern ();
void re_free_regexp ();
/* Is this really advertised? */
extern int re_adjust_startpos ();
extern void re_compile_fastmap ();
extern int re_search ();
extern int re_match ();
extern void re_set_casetable ();
extern void re_copy_registers ();
extern void re_free_registers ();

#endif /* __STDC__ */

#endif /* !REGEX_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_incpush
  4. translate_char
  5. ruby_init_loadpath
  6. add_modules
  7. require_libraries
  8. process_sflag
  9. moreswitches
  10. proc_options
  11. load_file
  12. rb_load_file
  13. load_stdin
  14. set_arg0space
  15. set_arg0
  16. ruby_script
  17. init_ids
  18. forbid_setid
  19. verbose_setter
  20. ruby_prog_init
  21. ruby_set_argv
  22. ruby_process_options
/**********************************************************************

  ruby.c -

  $Author: matz $
  $Date: 2005/12/12 00:36:52 $
  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

**********************************************************************/

#if defined _WIN32 || defined __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

#ifndef HAVE_STRING_H
char *strchr _((const char*,const char));
char *strrchr _((const char*,const char));
char *strstr _((const char*,const char*));
#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(name)
    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(s, l)
    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_incpush(path)
    const char *path;
{
    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, rubylib_mangled_path(p, (int)(s-p)));
                p = s + 1;
            }
            else {
                rb_ary_push(ary, rubylib_mangled_path2(p));
                break;
            }
        }
        rb_ary_concat(rb_load_path, ary);
    }
    else {
        rb_ary_push(rb_load_path, rubylib_mangled_path2(path));
    }
}

#if defined DOSISH || defined __CYGWIN__
#define LOAD_RELATIVE 1
#endif

#if defined DOSISH || defined __CYGWIN__
static inline void translate_char _((char *, int, int));

static inline void
translate_char(p, from, to)
    char *p;
    int from, 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, MB_CUR_MAX);
#endif
    }
}
#endif

void
ruby_init_loadpath()
{
#if defined LOAD_RELATIVE
    char libpath[FILENAME_MAX+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, FILENAME_MAX);
#elif defined(__human68k__)
    extern char **_argv;
    strncpy(libpath, _argv[0], FILENAME_MAX);
#elif defined(__EMX__)
    _execname(libpath, FILENAME_MAX);
#endif

    libpath[FILENAME_MAX] = '\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 = FILENAME_MAX - (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(mod)
    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()
{
    extern NODE *ruby_eval_tree;
    extern NODE *ruby_eval_tree_begin;
    NODE *save[3];
    struct req_list *list = req_list_head.next;
    struct req_list *tmp;

    save[0] = ruby_eval_tree;
    save[1] = ruby_eval_tree_begin;
    save[2] = NEW_NEWLINE(0);
    ruby_eval_tree = ruby_eval_tree_begin = 0;
    ruby_current_node = 0;
    Init_ext();         /* should be called here for some reason :-( */
    ruby_current_node = save[2];
    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[2];
        ruby_set_current_source();
    }
    req_list_head.next = 0;
    ruby_eval_tree = save[0];
    ruby_eval_tree_begin = save[1];
    rb_gc_force_recycle((VALUE)save[2]);
    ruby_current_node = 0;
}

static void
process_sflag()
{
    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(s)
    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;
}

static void
proc_options(argc, argv)
    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(s);
            else if (argv[1]) {
                ruby_incpush(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_NEWLINE(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();
        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);
    }
}

extern int ruby__end__seen;

static void
load_file(fname, script)
    const char *fname;
    int script;
{
    extern VALUE rb_stdin;
    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('#')) {
            line = rb_io_gets(f);
            if (NIL_P(line)) return;
            line_start++;

            if (RSTRING(line)->len > 2 && RSTRING(line)->ptr[0] == '!') {
                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 + 1; /* 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);
                    }
                }
            }
        }
        else if (!NIL_P(c)) {
            rb_io_ungetc(f, c);
        }
        require_libraries();    /* Why here? unnatural */
        if (NIL_P(c)) return;
    }
    rb_compile_file(fname, f, line_start);
    if (script && ruby__end__seen) {
        rb_define_global_const("DATA", f);
    }
    else if (f != rb_stdin) {
        rb_io_close(f);
    }

    if (ruby_parser_stack_on_heap()) {
        rb_gc();
    }
}

void
rb_load_file(fname)
    const char *fname;
{
    load_file(fname, 0);
}

static void
load_stdin()
{
    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(val, id)
    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(name)
    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()
{
    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(s)
    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(val, id, variable)
    VALUE val;
    ID id;
    VALUE *variable;
{
    ruby_verbose = RTEST(val) ? Qtrue : val;
}

void
ruby_prog_init()
{
    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_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(argc, 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);
    }
}

void
ruby_process_options(argc, argv)
    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) {
        rb_parser_append_print();
    }
    if (do_loop) {
        rb_parser_while_loop(do_line, do_split);
    }
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ruby.h

root/ruby.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/**********************************************************************

  ruby.h -

  $Author: ocean $
  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"
#include "defines.h"

#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>

/* 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

#define NORETURN_STYLE_NEW 1
#ifndef NORETURN
# define NORETURN(x) x
#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
# error ---->> ruby requires sizeof(void*) == sizeof(long) to be compiled. <<----
#else
typedef unsigned long VALUE;
typedef unsigned long ID;
#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   0x20
#define T_FALSE  0x21
#define T_DATA   0x22
#define T_MATCH  0x23
#define T_SYMBOL 0x24

#define T_BLKTAG 0x3b
#define T_UNDEF  0x3c
#define T_VARMAP 0x3d
#define T_SCOPE  0x3e
#define T_NODE   0x3f

#define T_MASK   0x3f

#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))

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))
#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<<6)
#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 FL_UMASK  (0xff<<FL_USHIFT)

#define SPECIAL_CONST_P(x) (IMMEDIATE_P(x) || !RTEST(x))

#define FL_ABLE(x) (!SPECIAL_CONST_P(x))
#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*)xmalloc(sizeof(type)*(n))
#define ALLOC(type) (type*)xmalloc(sizeof(type))
#define REALLOC_N(var,type,n) (var)=(type*)xrealloc((char*)(var),sizeof(type)*(n))

#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));

void rb_glob _((const char*,void(*)(const char*,VALUE),VALUE));
void rb_globi _((const char*,void(*)(const char*,VALUE),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)));
int ruby_glob _((const char*,int,int(*)(const char*,VALUE),VALUE));
int ruby_globi _((const char*,int,int(*)(const char*,VALUE),VALUE));
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;

NORETURN(void rb_raise __((VALUE, const char*, ...)));
NORETURN(void rb_fatal __((const char*, ...)));
NORETURN(void rb_bug __((const char*, ...)));
NORETURN(void rb_sys_fail _((const char*)));
NORETURN(void rb_iter_break _((void)));
NORETURN(void rb_exit _((int)));
NORETURN(void rb_notimplement _((void)));

void rb_warning __((const char*, ...));         /* reports if `-w' specified */
void rb_sys_warning __((const char*, ...));     /* reports if `-w' specified */
void rb_warn __((const char*, ...));            /* reports always */

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*));

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_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_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
#if defined(HAVE_PROTOTYPES)
rb_class_of(VALUE obj)
#else
rb_class_of(obj)
    VALUE obj;
#endif
{
    if (FIXNUM_P(obj)) return rb_cFixnum;
    if (obj == Qnil) return rb_cNilClass;
    if (obj == Qfalse) return rb_cFalseClass;
    if (obj == Qtrue) return rb_cTrueClass;
    if (SYMBOL_P(obj)) return rb_cSymbol;

    return RBASIC(obj)->klass;
}

static inline int
#if defined(HAVE_PROTOTYPES)
rb_type(VALUE obj)
#else
rb_type(obj)
   VALUE obj;
#endif
{
    if (FIXNUM_P(obj)) return T_FIXNUM;
    if (obj == Qnil) return T_NIL;
    if (obj == Qfalse) return T_FALSE;
    if (obj == Qtrue) return T_TRUE;
    if (obj == Qundef) return T_UNDEF;
    if (SYMBOL_P(obj)) return T_SYMBOL;
    return BUILTIN_TYPE(obj);
}

static inline int
#if defined(HAVE_PROTOTYPES)
rb_special_const_p(VALUE obj)
#else
rb_special_const_p(obj)
    VALUE obj;
#endif
{
    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
#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
RUBY_EXTERN int is_ruby_native_thread();
#else
#define is_ruby_native_thread() (1)
#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: akr $
  $Date: 2005/07/18 01:00:23 $
  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 {
    FILE *f;                    /* stdio ptr for read/write */
    FILE *f2;                   /* additional ptr for rw pipes */
    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 */
} 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_WBUF     16
#define FMODE_RBUF     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->f = fp->f2 = NULL;\
    fp->mode = 0;\
    fp->pid = 0;\
    fp->lineno = 0;\
    fp->path = NULL;\
    fp->finalize = 0;\
} while (0)

#define GetReadFile(fptr) ((fptr)->f)
#define GetWriteFile(fptr) (((fptr)->f2) ? (fptr)->f2 : (fptr)->f)

FILE *rb_fopen _((const char*, const char*));
FILE *rb_fdopen _((int, const char*));
int rb_getc _((FILE*));
long rb_io_fread _((char *, long, FILE *));
long rb_io_fwrite _((const char *, long, FILE *));
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*));
void 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_read_check _((FILE*));
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:23:03 $
  created at: Wed Aug 16 01:15:38 JST 1995

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#ifndef SIG_H
#define SIG_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
/* [<][>][^][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. signal_exec
  9. sighandler
  10. sigbus
  11. sigsegv
  12. sigpipe
  13. rb_trap_exit
  14. rb_trap_exec
  15. sigexit
  16. trap
  17. trap_ensure
  18. rb_trap_restore_mask
  19. sig_trap
  20. sig_list
  21. install_sighandler
  22. init_sigchld
  23. Init_signal
/**********************************************************************

  signal.c -

  $Author: matz $
  $Date: 2005/12/15 15:57:05 $
  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 {
    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(nm)
    char *nm;
{
    struct signals *sigs;

    for (sigs = siglist; sigs->signm; sigs++)
        if (strcmp(sigs->signm, nm) == 0)
            return sigs->signo;
    return 0;
}

static char*
signo2signm(no)
    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(no)
    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(argc, argv)
    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];
rb_atomic_t rb_trap_pending;
rb_atomic_t rb_trap_immediate;
int rb_prohibit_interrupt = 1;

void
rb_gc_mark_trap_list()
{
#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(signum, handler)
    int signum;
    sighandler_t handler;
{
    struct sigaction sigact, old;

    sigact.sa_handler = handler;
    sigemptyset(&sigact.sa_mask);
    sigact.sa_flags = 0;
#if defined(SA_RESTART)
    /* All other signals but VTALRM shall restart restartable syscall
       VTALRM will cause EINTR to syscall if interrupted.
    */
    if (signum != SIGVTALRM) {
        sigact.sa_flags |= SA_RESTART; /* SVR4, 4.3+BSD */
    }
#endif
#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(signum, handler)
    int signum;
    sighandler_t handler;
{
    ruby_signal(signum, handler);
}
#else
#define ruby_signal(sig,handler) signal((sig),(handler))
#endif

static void signal_exec _((int sig));
static void
signal_exec(sig)
    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 {
        rb_thread_trap_eval(trap_list[sig].cmd, sig, trap_list[sig].safe);
    }
}

static RETSIGTYPE sighandler _((int));
static RETSIGTYPE
sighandler(sig)
    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(BSD_SIGNAL) && !defined(POSIX_SIGNAL)
    ruby_signal(sig, sighandler);
#endif

    if (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));
static RETSIGTYPE
sigbus(sig)
    int sig;
{
    rb_bug("Bus Error");
}
#endif

#ifdef SIGSEGV
static RETSIGTYPE sigsegv _((int));
static RETSIGTYPE
sigsegv(sig)
    int sig;
{
    rb_bug("Segmentation fault");
}
#endif

#ifdef SIGPIPE
static RETSIGTYPE sigpipe _((int));
static RETSIGTYPE
sigpipe(sig)
    int sig;
{
    /* do nothing */
}
#endif

void
rb_trap_exit()
{
#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()
{
#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 RETSIGTYPE sigexit _((int));
static RETSIGTYPE
sigexit(sig)
    int sig;
{
    rb_thread_signal_exit();
}

static VALUE
trap(arg)
    struct trap_arg *arg;
{
    sighandler_t func, oldfunc;
    VALUE command, oldcmd;
    int sig = -1;
    char *s;

    func = sighandler;
    command = arg->cmd;
    if (NIL_P(command)) {
        func = SIG_IGN;
    }
    else if (TYPE(command) == T_STRING) {
        SafeStringValue(command);       /* taint check */
        if (RSTRING(command)->len == 0) {
            func = SIG_IGN;
        }
        else if (RSTRING(command)->len == 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;
            }
        }
        else if (RSTRING(command)->len == 6) {
            if (strncmp(RSTRING(command)->ptr, "IGNORE", 6) == 0) {
                func = SIG_IGN;
            }
        }
        else if (RSTRING(command)->len == 4) {
            if (strncmp(RSTRING(command)->ptr, "EXIT", 4) == 0) {
                func = sigexit;
            }
        }
    }
    if (func == SIG_IGN || func == SIG_DFL) {
        command = 0;
    }

    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(arg)
    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()
{
#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(argc, argv)
    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()
{
    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(signum, handler)
    int signum;
    sighandler_t handler;
{
    sighandler_t old;

    old = ruby_signal(signum, handler);
    if (old != SIG_DFL) {
        ruby_signal(signum, old);
    }
}

static void
init_sigchld(sig)
    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()
{
#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
    install_sighandler(SIGBUS, sigbus);
#endif
#ifdef SIGSEGV
    install_sighandler(SIGSEGV, sigsegv);
#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] */


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. fmt_setup
/**********************************************************************

  sprintf.c -

  $Author: akr $
  $Date: 2005/12/12 15:09:50 $
  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>

#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(str, base)
    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(base, p)
    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 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(argc, argv)
    int argc;
    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;

    fmt = GETNTHARG(0);
    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 = 10 * n + (*p - '0');
            }
            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;

                if (!(flags & FMINUS))
                    while (--width > 0)
                        PUSH(" ", 1);
                c = NUM2INT(val) & 0xff;
                PUSH(&c, 1);
                while (--width > 0)
                    PUSH(" ", 1);
            }
            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;
                VALUE tmp;
                volatile VALUE tmp1;

                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);
                        s = nbuf;
                        goto format_integer;
                    }
                    s = nbuf;
                    if (v < 0) {
                        if (base == 10) {
                            rb_warning("negative number for %%u specifier");
                        }
                        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;
                    goto format_integer;
                }

                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--;
                    }
                    goto format_integer;
                }
                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");
                        s++;
                    }
                    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);
                        bignum = 2;
                    }
                }
                s = RSTRING(tmp)->ptr;

              format_integer:
                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 (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 defined(_WIN32) && !defined(__BORLANDC__)
                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;
                }
#endif  /* defined(_WIN32) && !defined(__BORLANDC__) */
                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(buf, c, flags, width, prec)
    char *buf;
    int c;
    int flags, width, 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';
}
/* [<][>][^] [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 "defines.h"
#include <stdio.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <string.h>
#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((unsigned)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(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 < 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(type, 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(type)
    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(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(size)
    int size;
{
    return st_init_table_with_size(&type_strhash, size);
}

void
st_free_table(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(table, key, value)
    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(table, key, value)
    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(table, key, value)
    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(table)
    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(old_table)
    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(table, key, value)
    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(table, key, value, never)
    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(key, value, never)
    st_data_t key, value, never;
{
    if (value == never) return ST_DELETE;
    return ST_CONTINUE;
}

void
st_cleanup_safe(table, never)
    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(table, func, arg)
    st_table *table;
    int (*func)();
    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(string)
    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(x, y)
    long x, y;
{
    return x != y;
}

static int
numhash(n)
    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

int st_strhash();

#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
  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. uscore_get
  84. rb_f_sub_bang
  85. rb_f_sub
  86. rb_f_gsub_bang
  87. rb_f_gsub
  88. rb_str_reverse_bang
  89. rb_str_reverse
  90. rb_str_include
  91. rb_str_to_i
  92. rb_str_to_f
  93. rb_str_to_s
  94. rb_str_inspect
  95. rb_str_dump
  96. rb_str_upcase_bang
  97. rb_str_upcase
  98. rb_str_downcase_bang
  99. rb_str_downcase
  100. rb_str_capitalize_bang
  101. rb_str_capitalize
  102. rb_str_swapcase_bang
  103. rb_str_swapcase
  104. trnext
  105. tr_trans
  106. rb_str_tr_bang
  107. rb_str_tr
  108. tr_setup_table
  109. rb_str_delete_bang
  110. rb_str_delete
  111. rb_str_squeeze_bang
  112. rb_str_squeeze
  113. rb_str_tr_s_bang
  114. rb_str_tr_s
  115. rb_str_count
  116. rb_str_split_m
  117. rb_str_split
  118. rb_f_split
  119. rb_str_each_line
  120. rb_str_each_byte
  121. rb_str_chop_bang
  122. rb_str_chop
  123. rb_f_chop_bang
  124. rb_f_chop
  125. rb_str_chomp_bang
  126. rb_str_chomp
  127. rb_f_chomp_bang
  128. rb_f_chomp
  129. rb_str_lstrip_bang
  130. rb_str_lstrip
  131. rb_str_rstrip_bang
  132. rb_str_rstrip
  133. rb_str_strip_bang
  134. rb_str_strip
  135. scan_once
  136. rb_str_scan
  137. rb_f_scan
  138. rb_str_hex
  139. rb_str_oct
  140. rb_str_crypt
  141. rb_str_intern
  142. rb_str_sum
  143. rb_str_justify
  144. rb_str_ljust
  145. rb_str_rjust
  146. rb_str_center
  147. rb_str_setter
  148. Init_String
/**********************************************************************

  string.c -

  $Author: matz $
  $Date: 2005/10/27 08:19:20 $
  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(s, p, len)
    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(s)
    VALUE s;
{
    if (OBJ_FROZEN(s)) {
        rb_raise(rb_eRuntimeError, "string frozen");
    }
}

static VALUE str_alloc _((VALUE));
static VALUE
str_alloc(klass)
    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(klass, ptr, len)
    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(ptr, len)
    const char *ptr;
    long len;
{
    return str_new(rb_cString, ptr, len);
}

VALUE
rb_str_new2(ptr)
    const char *ptr;
{
    if (!ptr) {
        rb_raise(rb_eArgError, "NULL pointer given");
    }
    return rb_str_new(ptr, strlen(ptr));
}

VALUE
rb_tainted_str_new(ptr, len)
    const char *ptr;
    long len;
{
    VALUE str = rb_str_new(ptr, len);

    OBJ_TAINT(str);
    return str;
}

VALUE
rb_tainted_str_new2(ptr)
    const char *ptr;
{
    VALUE str = rb_str_new2(ptr);

    OBJ_TAINT(str);
    return str;
}

static VALUE
str_new3(klass, str)
    VALUE klass, 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(str)
    VALUE str;
{
    return str_new3(rb_obj_class(str), str);
}

static VALUE
str_new4(klass, str)
    VALUE klass, 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(orig)
    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(obj, ptr, len)
    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(capa)
    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(ptr)
    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(str)
    VALUE str;
{
    return rb_convert_type(str, T_STRING, "String", "to_str");
}

static void
rb_str_shared_replace(str, str2)
    VALUE str, str2;
{
    if (str == str2) return;
    rb_str_modify(str);
    if (!FL_TEST(str, ELTS_SHARED)) free(RSTRING(str)->ptr);
    if (NIL_P(str2)) {
        RSTRING(str)->ptr = 0;
        RSTRING(str)->len = 0;
        RSTRING(str)->aux.capa = 0;
        FL_UNSET(str, STR_NOCAPA);
        return;
    }
    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(obj)
    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(str)
    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(argc, argv, str)
    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(str)
    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(str)
    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(str1, str2)
    VALUE str1, 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(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(str, arg)
    VALUE str, arg;
{
    VALUE *argv;

    if (TYPE(arg) == T_ARRAY) {
        argv = ALLOCA_N(VALUE, RARRAY(arg)->len + 1);
        argv[0] = str;
        MEMCPY(argv+1, RARRAY(arg)->ptr, VALUE, RARRAY(arg)->len);
        return rb_f_sprintf(RARRAY(arg)->len+1, argv);
    }

    argv = ALLOCA_N(VALUE, 2);
    argv[0] = str;
    argv[1] = arg;
    return rb_f_sprintf(2, argv);
}

static int
str_independent(str)
    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(str)
    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(str)
    VALUE str;
{
    if (!str_independent(str))
        str_make_independent(str);
}

void
rb_str_associate(str, add)
    VALUE str, 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(str)
    VALUE str;
{
    if (FL_TEST(str, STR_ASSOC)) {
        return RSTRING(str)->aux.shared;
    }
    return Qfalse;
}

static char *null_str = "";

VALUE
rb_string_value(ptr)
    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(ptr)
    volatile VALUE *ptr;
{
    return RSTRING(rb_string_value(ptr))->ptr;
}

char *
rb_string_value_cstr(ptr)
    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(str)
    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(str, beg, len)
    VALUE str;
    long beg, 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(str)
    VALUE str;
{
    return rb_obj_freeze(str);
}

VALUE
rb_str_dup_frozen(str)
    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(str)
    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(str)
    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(str, len)
    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(str, ptr, len)
    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(str, ptr)
    VALUE str;
    const char *ptr;
{
    return rb_str_buf_cat(str, ptr, strlen(ptr));
}

VALUE
rb_str_cat(str, ptr, len)
    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(str, ptr)
    VALUE str;
    const char *ptr;
{
    return rb_str_cat(str, ptr, strlen(ptr));
}

VALUE
rb_str_buf_append(str, str2)
    VALUE str, 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(str, str2)
    VALUE str, 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(str1, str2)
    VALUE str1, 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(str)
    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(str)
    VALUE str;
{
    int key = rb_str_hash(str);
    return INT2FIX(key);
}

#define lesser(a,b) (((a)>(b))?(b):(a))

int
rb_str_cmp(str1, str2)
    VALUE str1, 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(str1, str2)
    VALUE str1, 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;
}

#define IS_EVSTR(p,e) ((p) < (e) && (*(p) == '$' || *(p) == '@' || *(p) == '{'))

/*
 * 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(str1, str2)
    VALUE str1, 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(str1, str2)
    VALUE str1, 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(str1, str2)
    VALUE str1, 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(str, sub, offset)
    VALUE str, 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(argc, argv, str)
    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;
          unsigned char *p = RSTRING(str)->ptr;

          for (;pos<len;pos++) {
              if (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(str, sub, pos)
    VALUE str, 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(argc, argv, str)
    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);
          unsigned char *p = RSTRING(str)->ptr + pos;
          unsigned char *pbeg = RSTRING(str)->ptr;

          if (pos == RSTRING(str)->len) {
              if (pos == 0) return Qnil;
              --p;
          }
          while (pbeg <= p) {
              if (*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(x, y)
    VALUE x, 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>.
 *
 *     '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(str, re)
    VALUE str, re;
{
    return rb_funcall(get_pat(re, 0), rb_intern("match"), 1, str);
}

static char
succ_char(s)
    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(orig)
    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(str)
    VALUE str;
{
    rb_str_shared_replace(str, rb_str_succ(str));

    return str;
}

VALUE
rb_str_upto(beg, end, excl)
    VALUE beg, 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(beg, end)
    VALUE beg, end;
{
    return rb_str_upto(beg, end, Qfalse);
}

static VALUE
rb_str_subpat(str, re, nth)
    VALUE str, 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(str, indx)
    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(argc, argv, str)
    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(str, beg, len, val)
    VALUE str;
    long beg, 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(str, beg, len, val)
    VALUE str;
    long beg, len;
    VALUE val;
{
    rb_str_splice(str, beg, len, val);
}

static void
rb_str_subpat_set(str, re, nth, val)
    VALUE str, 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(str, indx, val)
    VALUE str;
    VALUE indx, 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(argc, argv, str)
    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(str, idx, str2)
    VALUE str, idx, 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(argc, argv, str)
    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(pat, quote)
    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(argc, argv, str)
    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(argc, argv, str)
    int argc;
    VALUE *argv;
    VALUE str;
{
    str = rb_str_dup(str);
    rb_str_sub_bang(argc, argv, str);
    return str;
}

static VALUE
str_gsub(argc, argv, str, bang)
    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;

    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);
    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(argc, argv, str)
    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(argc, argv, str)
    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(str, str2)
    VALUE str, 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;
}

static VALUE
uscore_get()
{
    VALUE line;

    line = rb_lastline_get();
    if (TYPE(line) != T_STRING) {
        rb_raise(rb_eTypeError, "$_ value need to be String (%s given)",
                 NIL_P(line) ? "nil" : rb_obj_classname(line));
    }
    return line;
}

/*
 *  call-seq:
 *     sub!(pattern, replacement)    => $_ or nil
 *     sub!(pattern) {|...| block }  => $_ or nil
 *
 *  Equivalent to <code>$_.sub!(<i>args</i>)</code>.
 */

static VALUE
rb_f_sub_bang(argc, argv)
    int argc;
    VALUE *argv;
{
    return rb_str_sub_bang(argc, argv, uscore_get());
}

/*
 *  call-seq:
 *     sub(pattern, replacement)   => $_
 *     sub(pattern) { block }      => $_
 *
 *  Equivalent to <code>$_.sub(<i>args</i>)</code>, except that
 *  <code>$_</code> will be updated if substitution occurs.
 */

static VALUE
rb_f_sub(argc, argv)
    int argc;
    VALUE *argv;
{
    VALUE str = rb_str_dup(uscore_get());

    if (NIL_P(rb_str_sub_bang(argc, argv, str)))
        return str;
    rb_lastline_set(str);
    return str;
}

/*
 *  call-seq:
 *     gsub!(pattern, replacement)    => string or nil
 *     gsub!(pattern) {|...| block }  => string or nil
 *
 *  Equivalent to <code>Kernel::gsub</code>, except <code>nil</code> is
 *  returned if <code>$_</code> is not modified.
 *
 *     $_ = "quick brown fox"
 *     gsub! /cat/, '*'   #=> nil
 *     $_                 #=> "quick brown fox"
 */

static VALUE
rb_f_gsub_bang(argc, argv)
    int argc;
    VALUE *argv;
{
    return rb_str_gsub_bang(argc, argv, uscore_get());
}

/*
 *  call-seq:
 *     gsub(pattern, replacement)    => string
 *     gsub(pattern) {|...| block }  => string
 *
 *  Equivalent to <code>$_.gsub...</code>, except that <code>$_</code>
 *  receives the modified result.
 *
 *     $_ = "quick brown fox"
 *     gsub /[aeiou]/, '*'   #=> "q**ck br*wn f*x"
 *     $_                    #=> "q**ck br*wn f*x"
 */

static VALUE
rb_f_gsub(argc, argv)
    int argc;
    VALUE *argv;
{
    VALUE str = rb_str_dup(uscore_get());

    if (NIL_P(rb_str_gsub_bang(argc, argv, str)))
        return str;
    rb_lastline_set(str);
    return str;
}

/*
 *  call-seq:
 *     str.reverse!   => str
 *
 *  Reverses <i>str</i> in place.
 */

static VALUE
rb_str_reverse_bang(str)
    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(str)
    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(str, arg)
    VALUE str, 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(argc, argv, str)
    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(str)
    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(str)
    VALUE str;
{
    if (rb_obj_class(str) != rb_cString) {
        VALUE dup = str_alloc(rb_cString);
        rb_str_replace(dup, str);
        return dup;
    }
    return str;
}

/*
 * 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(str)
    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(str)
    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(str)
    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(str)
    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(str)
    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(str)
    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(str)
    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(str)
    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(str)
    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(str)
    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(t)
    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(str, src, repl, sflag)
    VALUE str, src, 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(str, src, repl)
    VALUE str, src, 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(str, src, repl)
    VALUE str, src, repl;
{
    str = rb_str_dup(str);
    tr_trans(str, src, repl, 0);
    return str;
}

static void
tr_setup_table(str, table, init)
    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(argc, argv, str)
    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(argc, argv, str)
    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(argc, argv, str)
    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(argc, argv, str)
    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(str, src, repl)
    VALUE str, src, 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(str, src, repl)
    VALUE str, src, 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(argc, argv, str)
    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(argc, argv, str)
    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(str, sep0)
    VALUE str;
    const char *sep0;
{
    VALUE sep;

    StringValue(str);
    sep = rb_str_new2(sep0);
    return rb_str_split_m(1, &sep, str);
}

/*
 *  call-seq:
 *     split([pattern [, limit]])    => array
 *
 *  Equivalent to <code>$_.split(<i>pattern</i>, <i>limit</i>)</code>.
 *  See <code>String#split</code>.
 */

static VALUE
rb_f_split(argc, argv)
    int argc;
    VALUE *argv;
{
    return rb_str_split_m(argc, argv, uscore_get());
}

/*
 *  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(argc, argv, str)
    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;
    }

    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(str)
    VALUE str;
{
    long i;

    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(str)
    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(str)
    VALUE str;
{
    str = rb_str_dup(str);
    rb_str_chop_bang(str);
    return str;
}

/*
 *  call-seq:
 *     chop!    => $_ or nil
 *
 *  Equivalent to <code>$_.chop!</code>.
 *
 *     a  = "now\r\n"
 *     $_ = a
 *     chop!   #=> "now"
 *     chop!   #=> "no"
 *     chop!   #=> "n"
 *     chop!   #=> ""
 *     chop!   #=> nil
 *     $_      #=> ""
 *     a       #=> ""
 */

static VALUE
rb_f_chop_bang(str)
    VALUE str;
{
    return rb_str_chop_bang(uscore_get());
}

/*
 *  call-seq:
 *     chop   => string
 *
 *  Equivalent to <code>($_.dup).chop!</code>, except <code>nil</code>
 *  is never returned. See <code>String#chop!</code>.
 *
 *     a  =  "now\r\n"
 *     $_ = a
 *     chop   #=> "now"
 *     $_     #=> "now"
 *     chop   #=> "no"
 *     chop   #=> "n"
 *     chop   #=> ""
 *     chop   #=> ""
 *     a      #=> "now\r\n"
 */

static VALUE
rb_f_chop()
{
    VALUE str = uscore_get();

    if (RSTRING(str)->len > 0) {
        str = rb_str_dup(str);
        rb_str_chop_bang(str);
        rb_lastline_set(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(argc, argv, str)
    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(argc, argv, str)
    int argc;
    VALUE *argv;
    VALUE str;
{
    str = rb_str_dup(str);
    rb_str_chomp_bang(argc, argv, str);
    return str;
}

/*
 *  call-seq:
 *     chomp!             => $_ or nil
 *     chomp!(string)     => $_ or nil
 *
 *  Equivalent to <code>$_.chomp!(<em>string</em>)</code>. See
 *  <code>String#chomp!</code>
 *
 *     $_ = "now\n"
 *     chomp!       #=> "now"
 *     $_           #=> "now"
 *     chomp! "x"   #=> nil
 *     $_           #=> "now"
 */

static VALUE
rb_f_chomp_bang(argc, argv)
    int argc;
    VALUE *argv;
{
    return rb_str_chomp_bang(argc, argv, uscore_get());
}

/*
 *  call-seq:
 *     chomp            => $_
 *     chomp(string)    => $_
 *
 *  Equivalent to <code>$_ = $_.chomp(<em>string</em>)</code>. See
 *  <code>String#chomp</code>.
 *
 *     $_ = "now\n"
 *     chomp         #=> "now"
 *     $_            #=> "now"
 *     chomp "ow"    #=> "n"
 *     $_            #=> "n"
 *     chomp "xxx"   #=> "n"
 *     $_            #=> "n"
 */

static VALUE
rb_f_chomp(argc, argv)
    int argc;
    VALUE *argv;
{
    VALUE str = uscore_get();
    VALUE dup = rb_str_dup(str);

    if (NIL_P(rb_str_chomp_bang(argc, argv, dup)))
        return str;
    rb_lastline_set(dup);
    return dup;
}

/*
 *  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(str)
    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(str)
    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(str)
    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(str)
    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(str)
    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(str)
    VALUE str;
{
    str = rb_str_dup(str);
    rb_str_strip_bang(str);
    return str;
}

static VALUE
scan_once(str, pat, start)
    VALUE str, 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(str, pat)
    VALUE str, 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:
 *     scan(pattern)                   => array
 *     scan(pattern) {|///| block }    => $_
 *
 *  Equivalent to calling <code>$_.scan</code>. See
 *  <code>String#scan</code>.
 */

static VALUE
rb_f_scan(self, pat)
    VALUE self, pat;
{
    return rb_str_scan(uscore_get(), pat);
}

/*
 *  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(str)
    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(str)
    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(str, salt)
    VALUE str, salt;
{
    extern char *crypt();
    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(s)
    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(argc, argv, str)
    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(argc, argv, str, jflag)
    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(argc, argv, str)
    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(argc, argv, str)
    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(argc, argv, str)
    int argc;
    VALUE *argv;
    VALUE str;
{
    return rb_str_justify(argc, argv, str, 'c');
}

void
rb_str_setter(val, id, var)
    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()
{
    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, 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, "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_global_function("sub", rb_f_sub, -1);
    rb_define_global_function("gsub", rb_f_gsub, -1);

    rb_define_global_function("sub!", rb_f_sub_bang, -1);
    rb_define_global_function("gsub!", rb_f_gsub_bang, -1);

    rb_define_global_function("chop", rb_f_chop, 0);
    rb_define_global_function("chop!", rb_f_chop_bang, 0);

    rb_define_global_function("chomp", rb_f_chomp, -1);
    rb_define_global_function("chomp!", rb_f_chomp_bang, -1);

    rb_define_global_function("split", rb_f_split, -1);
    rb_define_global_function("scan", rb_f_scan, 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: matz $
  $Date: 2005/07/19 14:58:59 $
  created at: Tue Mar 22 18:44:30 JST 1995

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#include "ruby.h"
#include "env.h"

VALUE rb_cStruct;

static VALUE struct_alloc _((VALUE));

VALUE
rb_struct_iv_get(c, name)
    VALUE c;
    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(klass)
    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(s)
    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 (%d required %d given)",
                 RARRAY(members)->len, RSTRUCT(s)->len);
    }
    return members;
}

static VALUE
rb_struct_s_members_m(klass)
    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(obj)
    VALUE obj;
{
    return rb_struct_s_members_m(rb_obj_class(obj));
}

VALUE
rb_struct_getmember(obj, id)
    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(obj)
    VALUE obj;
{
    return rb_struct_getmember(obj, ruby_frame->orig_func);
}

static VALUE rb_struct_ref0(obj) VALUE obj; {return RSTRUCT(obj)->ptr[0];}
static VALUE rb_struct_ref1(obj) VALUE obj; {return RSTRUCT(obj)->ptr[1];}
static VALUE rb_struct_ref2(obj) VALUE obj; {return RSTRUCT(obj)->ptr[2];}
static VALUE rb_struct_ref3(obj) VALUE obj; {return RSTRUCT(obj)->ptr[3];}
static VALUE rb_struct_ref4(obj) VALUE obj; {return RSTRUCT(obj)->ptr[4];}
static VALUE rb_struct_ref5(obj) VALUE obj; {return RSTRUCT(obj)->ptr[5];}
static VALUE rb_struct_ref6(obj) VALUE obj; {return RSTRUCT(obj)->ptr[6];}
static VALUE rb_struct_ref7(obj) VALUE obj; {return RSTRUCT(obj)->ptr[7];}
static VALUE rb_struct_ref8(obj) VALUE obj; {return RSTRUCT(obj)->ptr[8];}
static VALUE rb_struct_ref9(obj) VALUE obj; {return RSTRUCT(obj)->ptr[9];}

static VALUE (*ref_func[10])() = {
    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(s)
    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(obj, val)
    VALUE obj, val;
{
    VALUE members, slot;
    ID id;
    long i;

    members = rb_struct_members(obj);
    rb_struct_modify(obj);
    id = ruby_frame->orig_func;
    for (i=0; i<RARRAY(members)->len; i++) {
        slot = RARRAY(members)->ptr[i];
        if (rb_id_attrset(SYM2ID(slot)) == id) {
            return RSTRUCT(obj)->ptr[i] = val;
        }
    }
    rb_name_error(ruby_frame->last_func, "`%s' is not a struct member",
                  rb_id2name(id));
    return Qnil;                /* not reached */
}

static VALUE
make_struct(name, members, klass)
    VALUE name, members, 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<10) {
                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;
}

#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

VALUE
#ifdef HAVE_STDARG_PROTOTYPES
rb_struct_define(const char *name, ...)
#else
rb_struct_define(name, va_alist)
    const char *name;
    va_dcl
#endif
{
    va_list ar;
    VALUE nm, ary;
    char *mem;

    if (!name) nm = Qnil;
    else nm = rb_str_new2(name);
    ary = rb_ary_new();

    va_init_list(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(argc, argv, klass)
    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(self, values)
    VALUE self, 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(klass)
    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(klass, values)
    VALUE klass, values;
{
    return rb_class_new_instance(RARRAY(values)->len, RARRAY(values)->ptr, klass);
}

VALUE
#ifdef HAVE_STDARG_PROTOTYPES
rb_struct_new(VALUE klass, ...)
#else
rb_struct_new(klass, va_alist)
    VALUE klass;
    va_dcl
#endif
{
    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_init_list(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(s)
    VALUE s;
{
    long i;

    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(s)
    VALUE s;
{
    VALUE members;
    long i;

    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(s)
    VALUE s;
{
    char *cname = rb_class2name(rb_obj_class(s));
    VALUE str, members;
    long i;

    members = rb_struct_members(s);
    str = rb_str_buf_new2("#<struct ");
    rb_str_cat2(str, cname);
    rb_str_cat2(str, " ");
    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(s)
    VALUE s;
{
    if (rb_inspecting_p(s)) {
        char *cname = rb_class2name(rb_obj_class(s));
        size_t len = strlen(cname) + 14;
        VALUE str = rb_str_new(0, len);

        snprintf(RSTRING(str)->ptr, len+1, "#<struct %s:...>", cname);
        RSTRING(str)->len = strlen(RSTRING(str)->ptr);
        return str;
    }
    return rb_protect_inspect(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(s)
    VALUE s;
{
    return rb_ary_new4(RSTRUCT(s)->len, RSTRUCT(s)->ptr);
}

/* :nodoc: */
static VALUE
rb_struct_init_copy(copy, s)
    VALUE copy, 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(s, 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(s, idx)
    VALUE s, 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(s, id, val)
    VALUE s, val;
    ID id;
{
    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 (%d required %d 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(s, idx, val)
    VALUE s, idx, 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, long));
static VALUE
struct_entry(s, n)
    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(argc, argv, s)
    int argc;
    VALUE *argv;
    VALUE s;
{
    return rb_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(argc, argv, s)
    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(s, s2)
    VALUE s, 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(s)
    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(s, s2)
    VALUE s, 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(s)
    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()
{
    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_yday
  50. time_isdst
  51. time_zone
  52. time_utc_offset
  53. time_to_a
  54. rb_strftime
  55. time_strftime
  56. time_s_times
  57. time_mdump
  58. time_dump
  59. time_mload
  60. time_load
  61. Init_Time
/**********************************************************************

  time.c -

  $Author: nobu $
  $Date: 2005/10/22 04:27:48 $
  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 *));

static void
time_free(tobj)
    void *tobj;
{
    if (tobj) free(tobj);
}

static VALUE time_s_alloc _((VALUE));
static VALUE
time_s_alloc(klass)
    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(time)
    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(time)
    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(secp, usecp)
    time_t *secp, *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(klass, sec, usec)
    VALUE klass;
    time_t sec, 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(sec, usec)
    time_t sec, usec;
{
    return time_new_internal(rb_cTime, sec, usec);
}

static struct timeval
time_timeval(time, interval)
    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(time)
    VALUE time;
{
    return time_timeval(time, Qtrue);
}

struct timeval
rb_time_timeval(time)
    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(argc, argv, klass)
    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(obj)
    VALUE obj;
{
    if (TYPE(obj) == T_STRING) {
        obj = rb_str_to_inum(obj, 10, Qfalse);
    }

    return NUM2LONG(obj);
}

static void
time_arg(argc, argv, tm, usec)
    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])) {
        if (argc == 8) {
            /* v[6] is timezone, but ignored */
        }
        else 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(y)
    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(tm)
    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(a, b)
    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(tptr, utc_p)
    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(tptr, utc_p)
    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(argc, argv, utc_p, klass)
    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(argc, argv, klass)
    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(argc, argv, klass)
    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(time)
    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(time)
    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(time)
    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(time1, time2)
    VALUE time1, 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(time1, time2)
    VALUE time1, 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(time)
    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(time)
    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(copy, time)
    VALUE copy, 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(time)
    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(time)
    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(time)
    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(time)
    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(time)
    VALUE time;
{
    return time_gmtime(time_dup(time));
}

static VALUE
time_get_tm(time, gmt)
    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(time)
    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(time)
    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(tobj, offset, sign)
    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(time1, time2)
    VALUE time1, 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(time1, time2)
    VALUE time1, 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(time)
    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(time)
    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(time)
    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(time)
    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(time)
    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(time)
    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(time)
    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(time)
    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);
}

/*
 *  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(time)
    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(time)
    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(time)
    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(time)
    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(time)
    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(buf, format, time)
    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(time, format)
    VALUE time, 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(obj)
    VALUE obj;
{
    rb_warn("obsolete method Time::times; use Process::times");
    return rb_proc_times(obj);
}

/*
 * undocumented
 */

static VALUE
time_mdump(time)
    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 */
        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(argc, argv, time)
    int argc;
    VALUE *argv;
    VALUE time;
{
    VALUE str;

    rb_scan_args(argc, argv, "01", 0);
    str = time_mdump(time);
    if (FL_TEST(time, FL_EXIVAR)) {
        rb_copy_generic_ivar(str, time);
        FL_SET(str, FL_EXIVAR);
    }

    return str;
}

/*
 * undocumented
 */

static VALUE
time_mload(time, str)
    VALUE time, str;
{
    struct time_object *tobj;
    unsigned long p, s;
    time_t sec, usec;
    unsigned char *buf;
    struct tm tm;
    int i;

    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) {
        sec = p;
        usec = s;
    }
    else {
        p &= ~(1<<31);
        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->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(klass, str)
    VALUE klass, str;
{
    VALUE time = time_s_alloc(klass);

    if (FL_TEST(str, FL_EXIVAR)) {
        rb_copy_generic_ivar(time, str);
        FL_SET(time, FL_EXIVAR);
    }
    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()
{
    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, "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] */


util.c

root/util.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. scan_oct
  2. 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: matz $
  $Date: 2004/09/21 09:35:28 $
  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"
#ifndef HAVE_STRING_H
char *strchr _((char*,char));
#endif

unsigned long
scan_oct(start, len, retlen)
    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
scan_hex(start, len, retlen)
    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(char *s);

static char suffix1[] = ".$$$";
static char suffix2[] = ".~~~";

#define ext (&buf[1000])

#define strEQ(s1,s2) (strcmp(s1,s2) == 0)

void
ruby_add_suffix(str, suffix)
    VALUE str;
    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(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, MB_CUR_MAX))
        if (*p == '\\')
            *p = '/';

    info.count = 0;
    info.head = 0;

    rb_globi(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 (base, nel, size, cmp, d)
     void* base;
     const int nel;
     const int size;
     int (*cmp)();
     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(str)
    const char *str;
{
    char *tmp;
    int len = strlen(str) + 1;

    tmp = xmalloc(len);
    memcpy(tmp, str, len);

    return tmp;
}

char *
ruby_getcwd()
{
#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(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, 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/10/30 18:20:53 $
  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 scan_oct _((const char*, int, int*));
#define scan_hex ruby_scan_hex
unsigned long scan_hex _((const char*, int, int*));

#if defined(MSDOS) || defined(__CYGWIN32__) || defined(_WIN32)
void ruby_add_suffix();
#endif

void ruby_qsort _((void*, const int, const int, int (*)(), void*));
#define qsort(b,n,s,c,d) ruby_qsort(b,n,s,c,d)

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. original_module
  94. cvar_override_check
  95. rb_cvar_set
  96. rb_cvar_get
  97. rb_cvar_defined
  98. rb_cv_set
  99. rb_cv_get
  100. rb_define_class_variable
  101. cv_i
  102. rb_mod_class_variables
  103. rb_mod_remove_cvar
  104. rb_iv_get
  105. rb_iv_set
/**********************************************************************

  variable.c -

  $Author: matz $
  $Date: 2005/12/12 00:36:52 $
  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()
{
    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(fc, name)
    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(key, value, res)
    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_safe(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(klass)
    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(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(klass)
    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(mod)
    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(klass)
    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";
        size_t len;

        if (TYPE(klass) == T_MODULE) {
            if (rb_obj_class(klass) == rb_cModule) {
                s = "Module";
            }
            else {
                s = rb_class2name(RBASIC(klass)->klass);
            }
        }
        len = 2 + strlen(s) + 3 + 2 * SIZEOF_LONG + 1;
        path = rb_str_new(0, len);
        snprintf(RSTRING(path)->ptr, len+1, "#<%s:0x%lx>", s, klass);
        RSTRING(path)->len = strlen(RSTRING(path)->ptr);
        rb_ivar_set(klass, tmp_classpath, path);

        return path;
    }
}

void
rb_set_class_path(klass, under, name)
    VALUE klass, 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(path)
    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(klass, id)
    VALUE klass;
    ID id;
{
    rb_iv_set(klass, "__classid__", ID2SYM(id));
}

VALUE
rb_class_name(klass)
    VALUE klass;
{
    return rb_class_path(rb_class_real(klass));
}

char *
rb_class2name(klass)
    VALUE klass;
{
    return RSTRING(rb_class_name(klass))->ptr;
}

char *
rb_obj_classname(obj)
    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();
static void  undef_setter();
static void  undef_marker();

static VALUE val_getter();
static void  val_setter();
static void  val_marker();

static VALUE var_getter();
static void  var_setter();
static void  var_marker();

struct global_entry*
rb_global_entry(id)
    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 id;
{
    rb_warning("global variable `%s' not initialized", rb_id2name(id));

    return Qnil;
}

static void
undef_setter(val, id, data, var)
    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()
{
}

static VALUE
val_getter(id, val)
    ID id;
    VALUE val;
{
    return val;
}

static void
val_setter(val, id, data, var)
    VALUE val;
    ID id;
    void *data;
    struct global_variable *var;
{
    var->data = (void*)val;
}

static void
val_marker(data)
    VALUE data;
{
    if (data) rb_gc_mark_maybe(data);
}

static VALUE
var_getter(id, var)
    ID id;
    VALUE *var;
{
    if (!var) return Qnil;
    return *var;
}

static void
var_setter(val, id, var)
    VALUE val;
    ID id;
    VALUE *var;
{
    *var = val;
}

static void
var_marker(var)
    VALUE *var;
{
    if (var) rb_gc_mark_maybe(*var);
}

static void
readonly_setter(val, id, var)
    VALUE val;
    ID id;
    void *var;
{
    rb_name_error(id, "%s is a read-only variable", rb_id2name(id));
}

static int
mark_global_entry(key, 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()
{
    if (rb_global_tbl) {
        st_foreach(rb_global_tbl, mark_global_entry, 0);
    }
}

static ID
global_id(name)
    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(name, var, getter, setter)
    const char  *name;
    VALUE *var;
    VALUE (*getter)();
    void  (*setter)();
{
    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(name, var)
    const char  *name;
    VALUE *var;
{
    rb_define_hooked_variable(name, var, 0, 0);
}

void
rb_define_readonly_variable(name, var)
    const char  *name;
    VALUE *var;
{
    rb_define_hooked_variable(name, var, 0, readonly_setter);
}

void
rb_define_virtual_variable(name, getter, setter)
    const char  *name;
    VALUE (*getter)();
    void  (*setter)();
{
    if (!getter) getter = val_getter;
    if (!setter) setter = readonly_setter;
    rb_define_hooked_variable(name, 0, getter, setter);
}

static void
rb_trace_eval(cmd, val)
    VALUE cmd, 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(argc, argv)
    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(var)
    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(argc, argv)
    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(entry)
    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(data)
    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(var)
    struct global_variable *var;
{
    var->block_trace = 0;
    remove_trace(var);
    return Qnil;                /* not reached */
}

VALUE
rb_gvar_set(entry, val)
    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(name, val)
    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(name)
    const char *name;
{
    struct global_entry *entry;

    entry = rb_global_entry(global_id(name));
    return rb_gvar_get(entry);
}

VALUE
rb_gvar_defined(entry)
    struct global_entry *entry;
{
    if (entry->var->getter == undef_getter) return Qfalse;
    return Qtrue;
}

static int
gvar_i(key, entry, ary)
    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()
{
    VALUE ary = rb_ary_new();
    char buf[4];
    char *s = "&`'+123456789";

    st_foreach(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(name1, name2)
    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(obj)
    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(obj, id, warn)
    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(obj, id, val)
    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(obj, id)
    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(obj, id, valp)
    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(obj)
    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(key, value)
    ID key;
    VALUE value;
{
    rb_gc_mark(value);
    return ST_CONTINUE;
}

static int
givar_i(obj, tbl)
    VALUE obj;
    st_table *tbl;
{
    if (rb_special_const_p(obj)) {
        st_foreach(tbl, givar_mark_i, 0);
    }
    return ST_CONTINUE;
}

void
rb_mark_generic_ivar_tbl()
{
    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(obj)
    VALUE obj;
{
    st_table *tbl;

    if (st_delete(generic_iv_tbl, &obj, (st_data_t *)&tbl))
        st_free_table(tbl);
}

void
rb_copy_generic_ivar(clone, obj)
    VALUE clone, obj;
{
    st_table *tbl;

    if (!generic_iv_tbl) 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));
        }
    }
}

static VALUE
ivar_get(obj, id, warn)
    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(obj, id)
    VALUE obj;
    ID id;
{
    return ivar_get(obj, id, Qtrue);
}

VALUE
rb_attr_get(obj, id)
    VALUE obj;
    ID id;
{
    return ivar_get(obj, id, Qfalse);
}

VALUE
rb_ivar_set(obj, id, val)
    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(obj, id)
    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(key, entry, ary)
    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(obj)
    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(obj, name)
    VALUE obj, 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(klass, id)
    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(klass, id)
    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(klass, name)
    VALUE klass, 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(av)
    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(mod, id, file)
    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", 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(mod, id)
    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(klass, id)
    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(mod, id)
    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 || !*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(mod, id)
    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(klass, id, exclude, recurse)
    VALUE klass;
    ID id;
    int exclude, 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(klass, id)
    VALUE klass;
    ID id;
{
    return rb_const_get_0(klass, id, Qtrue, Qtrue);
}

VALUE
rb_const_get(klass, id)
    VALUE klass;
    ID id;
{
    return rb_const_get_0(klass, id, Qfalse, Qtrue);
}

VALUE
rb_const_get_at(klass, id)
    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(mod, name)
    VALUE mod, 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(key, value, tbl)
    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(mod, data)
    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(mod, data)
    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(key, value, ary)
    ID key, value;
    VALUE ary;
{
    rb_ary_push(ary, rb_str_new2(rb_id2name(key)));
    return ST_CONTINUE;
}

VALUE
rb_const_list(data)
    void *data;
{
    st_table *tbl = data;
    VALUE ary;

    if (!tbl) return rb_ary_new2(0);
    ary = rb_ary_new2(tbl->num_entries);
    st_foreach(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(mod)
    VALUE mod;
{
    return rb_const_list(rb_mod_const_of(mod, 0));
}

static int
rb_const_defined_0(klass, id, exclude, recurse)
    VALUE klass;
    ID id;
    int exclude, 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(klass, id)
    VALUE klass;
    ID id;
{
    return rb_const_defined_0(klass, id, Qtrue, Qtrue);
}

int
rb_const_defined(klass, id)
    VALUE klass;
    ID id;
{
    return rb_const_defined_0(klass, id, Qfalse, Qtrue);
}

int
rb_const_defined_at(klass, id)
    VALUE klass;
    ID id;
{
    return rb_const_defined_0(klass, id, Qtrue, Qfalse);
}

static void
mod_av_set(klass, id, val, isconst)
    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(klass, id, val)
    VALUE klass;
    ID id;
    VALUE val;
{
    mod_av_set(klass, id, val, Qtrue);
}

void
rb_define_const(klass, name, val)
    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(name, val)
    const char *name;
    VALUE val;
{
    rb_define_const(rb_cObject, name, val);
}

static VALUE
original_module(c)
    VALUE c;
{
    if (TYPE(c) == T_ICLASS)
        return RBASIC(c)->klass;
    return c;
}

static void
cvar_override_check(id, a)
    ID id;
    VALUE a;
{
    VALUE base = original_module(a);

    a = RCLASS(a)->super;
    while (a) {
        if (RCLASS(a)->iv_tbl) {
            if (st_lookup(RCLASS(a)->iv_tbl,id,0)) {
                rb_warning("class variable %s of %s is overridden by %s",
                           rb_id2name(id), rb_class2name(original_module(a)),
                           rb_class2name(base));
            }
        }
        a = RCLASS(a)->super;
    }
}

void
rb_cvar_set(klass, id, val, warn)
    VALUE klass;
    ID id;
    VALUE val;
    int warn;
{
    VALUE tmp;

    tmp = klass;
    while (tmp) {
        if (RCLASS(tmp)->iv_tbl && st_lookup(RCLASS(tmp)->iv_tbl,id,0)) {
            if (OBJ_FROZEN(tmp)) rb_error_frozen("class/module");
            if (!OBJ_TAINTED(tmp) && rb_safe_level() >= 4)
                rb_raise(rb_eSecurityError, "Insecure: can't modify class variable");
            if (warn && RTEST(ruby_verbose) && klass != tmp) {
                rb_warning("already initialized class variable %s", rb_id2name(id));
            }
            st_insert(RCLASS(tmp)->iv_tbl,id,val);
            if (RTEST(ruby_verbose)) {
                cvar_override_check(id, tmp);
            }
            return;
        }
        tmp = RCLASS(tmp)->super;
    }

    mod_av_set(klass, id, val, Qfalse);
}

VALUE
rb_cvar_get(klass, id)
    VALUE klass;
    ID id;
{
    VALUE value;
    VALUE tmp;

    tmp = klass;
    while (tmp) {
        if (RCLASS(tmp)->iv_tbl) {
            if (st_lookup(RCLASS(tmp)->iv_tbl,id,&value)) {
                if (RTEST(ruby_verbose)) {
                    cvar_override_check(id, tmp);
                }
                return value;
            }
        }
        tmp = RCLASS(tmp)->super;
    }

    rb_name_error(id,"uninitialized class variable %s in %s",
                  rb_id2name(id), rb_class2name(klass));
    return Qnil;                /* not reached */
}

VALUE
rb_cvar_defined(klass, id)
    VALUE klass;
    ID id;
{
    VALUE tmp;

    tmp = klass;
    while (tmp) {
        if (RCLASS(tmp)->iv_tbl && st_lookup(RCLASS(tmp)->iv_tbl,id,0)) {
            return Qtrue;
        }
        tmp = RCLASS(tmp)->super;
    }

    return Qfalse;
}

void
rb_cv_set(klass, name, val)
    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(klass, name)
    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(klass, name, val)
    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(key, value, ary)
    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> and
 *  the ancestors of <i>mod</i>.
 *
 *     class One
 *       @@var1 = 1
 *     end
 *     class Two < One
 *       @@var2 = 2
 *     end
 *     One.class_variables   #=> ["@@var1"]
 *     Two.class_variables   #=> ["@@var2", "@@var1"]
 */

VALUE
rb_mod_class_variables(obj)
    VALUE obj;
{
    VALUE ary = rb_ary_new();

    for (;;) {
        if (RCLASS(obj)->iv_tbl) {
            st_foreach_safe(RCLASS(obj)->iv_tbl, cv_i, ary);
        }
        obj = RCLASS(obj)->super;
        if (!obj) break;
    }
    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(mod, name)
    VALUE mod, 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(obj, name)
    VALUE obj;
    const char *name;
{
    ID id = rb_intern(name);

    return rb_ivar_get(obj, id);
}

VALUE
rb_iv_set(obj, name, val)
    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: nobu $
  $Date: 2005/05/12 00:54:36 $
  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()
{
    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);

    /* obsolete constants */
    rb_define_global_const("VERSION", v);
    rb_define_global_const("RELEASE_DATE", d);
    rb_define_global_const("PLATFORM", p);
}

void
ruby_show_version()
{
    printf("ruby %s (%s) [%s]\n", RUBY_VERSION, RUBY_RELEASE_DATE, RUBY_PLATFORM);
    fflush(stdout);
}

void
ruby_show_copyright()
{
    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.8.4"
#define RUBY_RELEASE_DATE "2005-12-24"
#define RUBY_VERSION_CODE 184
#define RUBY_RELEASE_CODE 20051224

#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
#define RUBY_VERSION_TEENY 4
#define RUBY_RELEASE_YEAR 2005
#define RUBY_RELEASE_MONTH 12
#define RUBY_RELEASE_DAY 24

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.24.2.7 2005/08/27 11:21:30 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 /* USE_COLOR */

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_indexes
  13. fdbm_select
  14. fdbm_values_at
  15. fdbm_modify
  16. fdbm_delete
  17. fdbm_shift
  18. fdbm_delete_if
  19. fdbm_clear
  20. fdbm_invert
  21. each_pair
  22. update_i
  23. fdbm_update
  24. fdbm_replace
  25. fdbm_store
  26. fdbm_length
  27. fdbm_empty_p
  28. fdbm_each_value
  29. fdbm_each_key
  30. fdbm_each_pair
  31. fdbm_keys
  32. fdbm_values
  33. fdbm_has_key
  34. fdbm_has_value
  35. fdbm_to_a
  36. fdbm_to_hash
  37. fdbm_reject
  38. Init_dbm
/************************************************

  dbm.c -

  $Author: usa $
  $Date: 2005/06/20 07:53:19 $
  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_indexes(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    VALUE new;
    int i;

    new = rb_ary_new2(argc);
    for (i=0; i<argc; i++) {
        rb_ary_push(new, fdbm_fetch(obj, argv[i], Qnil));
    }

    return new;
}

static VALUE
fdbm_select(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    VALUE new = rb_ary_new2(argc);
    int i;

    if (rb_block_given_p()) {
        datum key, val;
        DBM *dbm;
        struct dbmdata *dbmp;

        if (argc > 0) {
            rb_raise(rb_eArgError, "wrong number arguments(%d for 0)", argc);
        }
        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);
        }
    }
    else {
        rb_warn("DBM#select(index..) is deprecated; use DBM#values_at");

        for (i=0; i<argc; i++) {
            rb_ary_push(new, fdbm_fetch(obj, argv[i], Qnil));
        }
    }

    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, "indexes",  fdbm_indexes, -1);
    rb_define_method(rb_cDBM, "indices",  fdbm_indexes, -1);
    rb_define_method(rb_cDBM, "select",  fdbm_select, -1);
    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));
#endif
}
/* [<][>][^] [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.1.2.1 2005/08/30 10:43:34 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/defs.h

root/ext/digest/defs.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/* -*- C -*-
 * $Id: defs.h,v 1.7 2003/06/01 15:39:52 eban 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 defined(__GNUC__)
  typedef unsigned long long uint64_t;
# elif defined(_MSC_VER)
  typedef unsigned _int64 uint64_t;
# elif defined(__BORLANDC__)
  typedef unsigned __int64 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: matz $
  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.14.2.2 2005/12/12 00:36:51 matz 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(klass)
    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));
static VALUE
rb_digest_base_alloc(klass)
    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(klass, str)
    VALUE klass;
    VALUE str;
{
    algo_t *algo;
    void *pctx;
    size_t len;
    unsigned char *digest;
    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);

    len = algo->digest_len;

    digest = xmalloc(len);
    algo->final_func(digest, pctx);

    obj = rb_str_new(digest, len);

    free(digest);

    return obj;
}

static VALUE
rb_digest_base_s_hexdigest(klass, str)
    VALUE klass;
    VALUE str;
{
    algo_t *algo;
    void *pctx;
    size_t len;
    unsigned char *hexdigest;
    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);

    len = algo->digest_len * 2;

    hexdigest = xmalloc(len + 1); /* +1 is for '\0' */
    algo->end_func(pctx, hexdigest);

    obj = rb_str_new(hexdigest, len);

    free(hexdigest);

    return obj;
}

static VALUE
rb_digest_base_copy(copy, obj)
    VALUE copy, 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(self, str)
    VALUE self, 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(argc, argv, self)
    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(self)
    VALUE self;
{
    algo_t *algo;
    void *pctx1, *pctx2;
    unsigned char *digest;
    size_t len;
    VALUE str;

    algo = get_digest_base_metadata(rb_obj_class(self));
    Data_Get_Struct(self, void, pctx1);

    len = algo->ctx_size;

    pctx2 = xmalloc(len);
    memcpy(pctx2, pctx1, len);

    len = algo->digest_len;

    digest = xmalloc(len);
    algo->final_func(digest, pctx2);

    str = rb_str_new(digest, len);

    free(digest);
    free(pctx2);

    return str;
}

static VALUE
rb_digest_base_hexdigest(self)
    VALUE self;
{
    algo_t *algo;
    void *pctx1, *pctx2;
    unsigned char *hexdigest;
    size_t len;
    VALUE str;

    algo = get_digest_base_metadata(rb_obj_class(self));
    Data_Get_Struct(self, void, pctx1);

    len = algo->ctx_size;

    pctx2 = xmalloc(len);
    memcpy(pctx2, pctx1, len);

    len = algo->digest_len * 2;

    hexdigest = xmalloc(len + 1); /* +1 is for '\0' */
    algo->end_func(pctx2, hexdigest);

    str = rb_str_new(hexdigest, len);

    free(hexdigest);
    free(pctx2);

    return str;
}

static VALUE
rb_digest_base_equal(self, other)
    VALUE self, 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: knu $
  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.1 2001/07/13 20:06:13 knu 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/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.1.2.1 2005/08/30 10:43:35 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.3 2002/09/26 17:44:33 knu 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;
    ID id_metadata;

    rb_require("digest.so");

    mDigest = rb_path2class("Digest");
    cDigest_Base = rb_path2class("Digest::Base");

    cDigest_SHA1 = rb_define_class_under(mDigest, "SHA1", cDigest_Base);

    id_metadata = rb_intern("metadata");

    rb_cvar_set(cDigest_SHA1, id_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.1.2.1 2005/08/30 10:43:36 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.4.2.1 2005/12/24 09:58:56 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/dl.c

root/ext/dl/dl.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. rb_dl_scan_callback_args
  2. init_dl_func_table
  3. dlmalloc
  4. dlrealloc
  5. dlfree
  6. dlstrdup
  7. dlsizeof
  8. c_farray
  9. c_darray
  10. c_larray
  11. c_iarray
  12. c_harray
  13. c_carray
  14. c_parray
  15. rb_ary2cary
  16. rb_str_to_ptr
  17. rb_ary_to_ptr
  18. rb_io_to_ptr
  19. rb_dl_dlopen
  20. rb_dl_malloc
  21. rb_dl_strdup
  22. rb_dl_sizeof
  23. rb_dl_callback
  24. rb_dl_remove_callback
  25. Init_dl
/*
 * $Id: dl.c,v 1.20.2.5 2005/12/16 13:32:06 ttate Exp $
 */

#include <ruby.h>
#include <rubyio.h>
#include <ctype.h>
#include "dl.h"

VALUE rb_mDL;
VALUE rb_eDLError;
VALUE rb_eDLTypeError;

static VALUE DLFuncTable;
static void *rb_dl_callback_table[CALLBACK_TYPES][MAX_CALLBACK];
static ID id_call;

static int
rb_dl_scan_callback_args(long stack[], const char *proto,
                         int *argc, VALUE argv[])
{
  int i;
  long *sp;
  VALUE val;

  sp = stack;
  for (i=1; proto[i]; i++) {
    switch (proto[i]) {
    case 'C':
      {
        char v;
        v = (char)(*sp);
        sp++;
        val = INT2NUM(v);
      }
      break;
    case 'H':
      {
        short v;
        v = (short)(*sp);
        sp++;
        val = INT2NUM(v);
      }
      break;
    case 'I':
      {
        int v;
        v = (int)(*sp);
        sp++;
        val = INT2NUM(v);
      }
      break;
    case 'L':
      {
        long v;
        v = (long)(*sp);
        sp++;
        val = INT2NUM(v);
      }
      break;
    case 'F':
      {
        float v;
        memcpy(&v, sp, sizeof(float));
        sp += sizeof(float)/sizeof(long);
        val = rb_float_new(v);
      }
      break;
    case 'D':
      {
        double v;
        memcpy(&v, sp, sizeof(double));
        sp += sizeof(double)/sizeof(long);
        val = rb_float_new(v);
      }
      break;
    case 'P':
      {
        void *v;
        memcpy(&v, sp, sizeof(void*));
        sp++;
        val = rb_dlptr_new(v, 0, 0);
      }
      break;
    case 'S':
      {
        char *v;
        memcpy(&v, sp, sizeof(void*));
        sp++;
        val = rb_tainted_str_new2(v);
      }
      break;
    default:
      rb_raise(rb_eDLTypeError, "unsupported type `%c'", proto[i]);
      break;
    }
    argv[i-1] = val;
  }
  *argc = (i - 1);

  return (*argc);
}

#include "callback.func"

static void
init_dl_func_table(){
#include "cbtable.func"
}

void *
dlmalloc(size_t size)
{
  DEBUG_CODE2({
    void *ptr;

    printf("dlmalloc(%d)",size);
    ptr = xmalloc(size);
    printf(":0x%x\n",ptr);
    return ptr;
  },
  {
    return xmalloc(size);
  });
}

void *
dlrealloc(void *ptr, size_t size)
{
  DEBUG_CODE({
    printf("dlrealloc(0x%x,%d)\n",ptr,size);
  });
  return xrealloc(ptr, size);
}

void
dlfree(void *ptr)
{
  DEBUG_CODE({
    printf("dlfree(0x%x)\n",ptr);
  });
  xfree(ptr);
}

char*
dlstrdup(const char *str)
{
  char *newstr;

  newstr = (char*)dlmalloc(strlen(str)+1);
  strcpy(newstr,str);

  return newstr;
}

size_t
dlsizeof(const char *cstr)
{
  size_t size;
  int i, len, n, dlen;
  char *d;

  len  = strlen(cstr);
  size = 0;
  for (i=0; i<len; i++) {
    n = 1;
    if (isdigit(cstr[i+1])) {
      dlen = 1;
      while (isdigit(cstr[i+dlen])) { dlen ++; };
      dlen --;
      d = ALLOCA_N(char, dlen + 1);
      strncpy(d, cstr + i + 1, dlen);
      d[dlen] = '\0';
      n = atoi(d);
    }
    else{
      dlen = 0;
    }

    switch (cstr[i]) {
    case 'I':
      DLALIGN(0,size,INT_ALIGN);
    case 'i':
      size += sizeof(int) * n;
      break;
    case 'L':
      DLALIGN(0,size,LONG_ALIGN);
    case 'l':
      size += sizeof(long) * n;
      break;
    case 'F':
      DLALIGN(0,size,FLOAT_ALIGN);
    case 'f':
      size += sizeof(float) * n;
      break;
    case 'D':
      DLALIGN(0,size,DOUBLE_ALIGN);
    case 'd':
      size += sizeof(double) * n;
      break;
    case 'C':
    case 'c':
      size += sizeof(char) * n;
      break;
    case 'H':
      DLALIGN(0,size,SHORT_ALIGN);
    case 'h':
      size += sizeof(short) * n;
      break;
    case 'P':
    case 'S':
      DLALIGN(0,size,VOIDP_ALIGN);
    case 'p':
    case 's':
      size += sizeof(void*) * n;
      break;
    default:
      rb_raise(rb_eDLTypeError, "unexpected type '%c'", cstr[i]);
      break;
    }
    i += dlen;
  }

  return size;
}

static float *
c_farray(VALUE v, long *size)
{
  int i, len;
  float *ary;
  VALUE e;

  len = RARRAY(v)->len;
  *size = sizeof(float) * len;
  ary = dlmalloc(*size);
  for (i=0; i < len; i++) {
    e = rb_ary_entry(v, i);
    switch (TYPE(e)) {
    case T_FLOAT:
      ary[i] = (float)(RFLOAT(e)->value);
      break;
    case T_NIL:
      ary[i] = 0.0;
      break;
    default:
      rb_raise(rb_eDLTypeError, "unexpected type of the element #%d", i);
      break;
    }
  }

  return ary;
}

static double *
c_darray(VALUE v, long *size)
{
  int i, len;
  double *ary;
  VALUE e;

  len = RARRAY(v)->len;
  *size = sizeof(double) * len;
  ary = dlmalloc(*size);
  for (i=0; i < len; i++) {
    e = rb_ary_entry(v, i);
    switch (TYPE(e)) {
    case T_FLOAT:
      ary[i] = (double)(RFLOAT(e)->value);
      break;
    case T_NIL:
      ary[i] = 0.0;
      break;
    default:
      rb_raise(rb_eDLTypeError, "unexpected type of the element #%d", i);
      break;
    }
  }

  return ary;
}

static long *
c_larray(VALUE v, long *size)
{
  int i, len;
  long *ary;
  VALUE e;

  len = RARRAY(v)->len;
  *size = sizeof(long) * len;
  ary = dlmalloc(*size);
  for (i=0; i < len; i++) {
    e = rb_ary_entry(v, i);
    switch (TYPE(e)) {
    case T_FIXNUM:
    case T_BIGNUM:
      ary[i] = (long)(NUM2INT(e));
      break;
    case T_NIL:
      ary[i] = 0;
      break;
    default:
      rb_raise(rb_eDLTypeError, "unexpected type of the element #%d", i);
      break;
    }
  }

  return ary;
}

static int *
c_iarray(VALUE v, long *size)
{
  int i, len;
  int *ary;
  VALUE e;

  len = RARRAY(v)->len;
  *size = sizeof(int) * len;
  ary = dlmalloc(*size);
  for (i=0; i < len; i++) {
    e = rb_ary_entry(v, i);
    switch (TYPE(e)) {
    case T_FIXNUM:
    case T_BIGNUM:
      ary[i] = (int)(NUM2INT(e));
      break;
    case T_NIL:
      ary[i] = 0;
      break;
    default:
      rb_raise(rb_eDLTypeError, "unexpected type of the element #%d", i);
      break;
    }
  }

  return ary;
}

static short *
c_harray(VALUE v, long *size)
{
  int i, len;
  short *ary;
  VALUE e;

  len = RARRAY(v)->len;
  *size = sizeof(short) * len;
  ary = dlmalloc(*size);
  for (i=0; i < len; i++) {
    e = rb_ary_entry(v, i);
    switch (TYPE(e)) {
    case T_FIXNUM:
    case T_BIGNUM:
      ary[i] = (short)(NUM2INT(e));
      break;
    case T_NIL:
      ary[i] = 0;
      break;
    default:
      rb_raise(rb_eDLTypeError, "unexpected type of the element #%d", i);
      break;
    }
  }

  return ary;
}

static char *
c_carray(VALUE v, long *size)
{
  int i, len;
  char *ary;
  VALUE e;

  len = RARRAY(v)->len;
  *size = sizeof(char) * len;
  ary = dlmalloc(*size);
  for (i=0; i < len; i++) {
    e = rb_ary_entry(v, i);
    switch (TYPE(e)) {
    case T_FIXNUM:
    case T_BIGNUM:
      ary[i] = (char)(NUM2INT(e));
      break;
    case T_NIL:
      ary[i] = 0;
      break;
    default:
      rb_raise(rb_eDLTypeError, "unexpected type of the element #%d", i);
      break;
    }
  }

  return ary;
}

static void *
c_parray(VALUE v, long *size)
{
  int i, len;
  void **ary;
  VALUE e, tmp;

  len = RARRAY(v)->len;
  *size = sizeof(void*) * len;
  ary = dlmalloc(*size);
  for (i=0; i < len; i++) {
    e = rb_ary_entry(v, i);
    switch (TYPE(e)) {
    default:
      tmp = rb_check_string_type(e);
      if (NIL_P(tmp)) {
          rb_raise(rb_eDLTypeError, "unexpected type of the element #%d", i);
      }
      e = tmp;
      /* fall through */
    case T_STRING:
      rb_check_safe_str(e);
      {
        char *str, *src;
        src = RSTRING(e)->ptr;
        str = dlstrdup(src);
        ary[i] = (void*)str;
      }
      break;
    case T_NIL:
      ary[i] = NULL;
      break;
    case T_DATA:
      if (rb_obj_is_kind_of(e, rb_cDLPtrData)) {
        struct ptr_data *pdata;
        Data_Get_Struct(e, struct ptr_data, pdata);
        ary[i] = (void*)(pdata->ptr);
      }
      else{
        e = rb_funcall(e, rb_intern("to_ptr"), 0);
        if (rb_obj_is_kind_of(e, rb_cDLPtrData)) {
          struct ptr_data *pdata;
          Data_Get_Struct(e, struct ptr_data, pdata);
          ary[i] = (void*)(pdata->ptr);
        }
        else{
          rb_raise(rb_eDLTypeError, "unexpected type of the element #%d", i);
        }
      }
      break;
    }
  }

  return ary;
}

void *
rb_ary2cary(char t, VALUE v, long *size)
{
  int len;
  VALUE val0;

  val0 = rb_check_array_type(v);
  if(NIL_P(TYPE(val0))) {
    rb_raise(rb_eDLTypeError, "an array is expected.");
  }
  v = val0;

  len = RARRAY(v)->len;
  if (len == 0) {
    return NULL;
  }

  if (!size) {
    size = ALLOCA_N(long,1);
  }

  val0 = rb_ary_entry(v,0);
  switch (TYPE(val0)) {
  case T_FIXNUM:
  case T_BIGNUM:
    switch (t) {
    case 'C': case 'c':
      return (void*)c_carray(v,size);
    case 'H': case 'h':
      return (void*)c_harray(v,size);
    case 'I': case 'i':
      return (void*)c_iarray(v,size);
    case 'L': case 'l': case 0:
      return (void*)c_larray(v,size);
    default:
      rb_raise(rb_eDLTypeError, "type mismatch");
    }
  case T_STRING:
    return (void*)c_parray(v,size);
  case T_FLOAT:
    switch (t) {
    case 'F': case 'f':
      return (void*)c_farray(v,size);
    case 'D': case 'd': case 0:
      return (void*)c_darray(v,size);
    }
    rb_raise(rb_eDLTypeError, "type mismatch");
  case T_DATA:
    if (rb_obj_is_kind_of(val0, rb_cDLPtrData)) {
      return (void*)c_parray(v,size);
    }
    else{
      val0 = rb_funcall(val0, rb_intern("to_ptr"), 0);
      if (rb_obj_is_kind_of(val0, rb_cDLPtrData)) {
        return (void*)c_parray(v,size);
      }
    }
    rb_raise(rb_eDLTypeError, "type mismatch");
  case T_NIL:
    return (void*)c_parray(v, size);
  default:
    rb_raise(rb_eDLTypeError, "unsupported type");
  }
}

VALUE
rb_str_to_ptr(VALUE self)
{
  char *ptr;
  int  len;

  len = RSTRING(self)->len;
  ptr = (char*)dlmalloc(len + 1);
  memcpy(ptr, RSTRING(self)->ptr, len);
  ptr[len] = '\0';
  return rb_dlptr_new((void*)ptr,len,dlfree);
}

VALUE
rb_ary_to_ptr(int argc, VALUE argv[], VALUE self)
{
  void *ptr;
  VALUE t;
  long size;

  switch (rb_scan_args(argc, argv, "01", &t)) {
  case 1:
    ptr = rb_ary2cary(StringValuePtr(t)[0], self, &size);
    break;
  case 0:
    ptr = rb_ary2cary(0, self, &size);
    break;
  }
  return ptr ? rb_dlptr_new(ptr, size, dlfree) : Qnil;
}

VALUE
rb_io_to_ptr(VALUE self)
{
  OpenFile *fptr;
  FILE     *fp;

  GetOpenFile(self, fptr);
  fp = fptr->f;

  return fp ? rb_dlptr_new(fp, 0, 0) : Qnil;
}

VALUE
rb_dl_dlopen(int argc, VALUE argv[], VALUE self)
{
  rb_secure(4);
  return rb_class_new_instance(argc, argv, rb_cDLHandle);
}

VALUE
rb_dl_malloc(VALUE self, VALUE size)
{
  rb_secure(4);
  return rb_dlptr_malloc(DLNUM2LONG(size), dlfree);
}

VALUE
rb_dl_strdup(VALUE self, VALUE str)
{
  SafeStringValue(str);
  return rb_dlptr_new(strdup(RSTRING(str)->ptr), RSTRING(str)->len, dlfree);
}

static VALUE
rb_dl_sizeof(VALUE self, VALUE str)
{
  return INT2NUM(dlsizeof(StringValuePtr(str)));
}

static VALUE
rb_dl_callback(int argc, VALUE argv[], VALUE self)
{
  VALUE type, proc;
  int rettype, entry, i;
  char fname[127];

  rb_secure(4);
  proc = Qnil;
  switch (rb_scan_args(argc, argv, "11", &type, &proc)) {
  case 1:
    if (rb_block_given_p()) {
      proc = rb_block_proc();
    }
    else{
      proc = Qnil;
    }
  default:
    break;
  }

  StringValue(type);
  switch (RSTRING(type)->ptr[0]) {
  case '0':
    rettype = 0x00;
    break;
  case 'C':
    rettype = 0x01;
    break;
  case 'H':
    rettype = 0x02;
    break;
  case 'I':
    rettype = 0x03;
    break;
  case 'L':
    rettype = 0x04;
    break;
  case 'F':
    rettype = 0x05;
    break;
  case 'D':
    rettype = 0x06;
    break;
  case 'P':
    rettype = 0x07;
    break;
  default:
    rb_raise(rb_eDLTypeError, "unsupported type `%c'", RSTRING(type)->ptr[0]);
  }

  entry = -1;
  for (i=0; i < MAX_CALLBACK; i++) {
    if (rb_hash_aref(DLFuncTable, rb_assoc_new(INT2NUM(rettype), INT2NUM(i))) == Qnil) {
      entry = i;
      break;
    }
  }
  if (entry < 0) {
    rb_raise(rb_eDLError, "too many callbacks are defined.");
  }

  rb_hash_aset(DLFuncTable,
               rb_assoc_new(INT2NUM(rettype),INT2NUM(entry)),
               rb_assoc_new(type,proc));
  sprintf(fname, "rb_dl_callback_func_%d_%d", rettype, entry);
  return rb_dlsym_new((void (*)())rb_dl_callback_table[rettype][entry],
                      fname, RSTRING(type)->ptr);
}

static VALUE
rb_dl_remove_callback(VALUE mod, VALUE sym)
{
  freefunc_t f;
  int i, j;

  rb_secure(4);
  f = rb_dlsym2csym(sym);
  for (i=0; i < CALLBACK_TYPES; i++) {
    for (j=0; j < MAX_CALLBACK; j++) {
      if (rb_dl_callback_table[i][j] == f) {
        rb_hash_aset(DLFuncTable, rb_assoc_new(INT2NUM(i),INT2NUM(j)),Qnil);
        break;
      }
    }
  }
  return Qnil;
}

void
Init_dl()
{
  void Init_dlptr();
  void Init_dlsym();
  void Init_dlhandle();

  id_call = rb_intern("call");

  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);

  DLFuncTable = rb_hash_new();
  init_dl_func_table();
  rb_define_const(rb_mDL, "FuncTable", DLFuncTable);

  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, "ALIGN_INT",   INT2NUM(ALIGN_INT));
  rb_define_const(rb_mDL, "ALIGN_LONG",  INT2NUM(ALIGN_LONG));
  rb_define_const(rb_mDL, "ALIGN_FLOAT", INT2NUM(ALIGN_FLOAT));
  rb_define_const(rb_mDL, "ALIGN_SHORT", INT2NUM(ALIGN_SHORT));
  rb_define_const(rb_mDL, "ALIGN_DOUBLE",INT2NUM(ALIGN_DOUBLE));
  rb_define_const(rb_mDL, "ALIGN_VOIDP", INT2NUM(ALIGN_VOIDP));

  rb_define_const(rb_mDL, "MAX_ARG", INT2NUM(MAX_ARG));
  rb_define_const(rb_mDL, "DLSTACK", rb_tainted_str_new2(DLSTACK_METHOD));

  rb_define_module_function(rb_mDL, "dlopen", rb_dl_dlopen, -1);
  rb_define_module_function(rb_mDL, "callback", rb_dl_callback, -1);
  rb_define_module_function(rb_mDL, "define_callback", rb_dl_callback, -1);
  rb_define_module_function(rb_mDL, "remove_callback", rb_dl_remove_callback, 1);
  rb_define_module_function(rb_mDL, "malloc", rb_dl_malloc, 1);
  rb_define_module_function(rb_mDL, "strdup", rb_dl_strdup, 1);
  rb_define_module_function(rb_mDL, "sizeof", rb_dl_sizeof, 1);

  Init_dlptr();
  Init_dlsym();
  Init_dlhandle();

  rb_define_const(rb_mDL, "FREE", rb_dlsym_new(dlfree, "free", "0P"));

  rb_define_method(rb_cString, "to_ptr", rb_str_to_ptr, 0);
  rb_define_method(rb_cArray, "to_ptr", rb_ary_to_ptr, -1);
  rb_define_method(rb_cIO, "to_ptr", rb_io_to_ptr, 0);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/dl/dl.h

root/ext/dl/dl.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

DEFINITIONS

This source file includes following definitions.
  1. ANY_TYPE
/* -*- C -*-
 * $Id: dl.h,v 1.9 2003/12/01 23:02:44 ttate Exp $
 */

#ifndef RUBY_DL_H
#define RUBY_DL_H

#include <ruby.h>
#include <dlconfig.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

#if !defined(StringValue)
# define StringValue(v) if(TYPE(v) != T_STRING) v = rb_str_to_str(v)
#endif
#if !defined(StringValuePtr)
# define StringValuePtr(v) RSTRING((TYPE(v) == T_STRING) ? (v) : rb_str_to_str(v))->ptr
#endif

#ifdef DEBUG
#define DEBUG_CODE(b) {printf("DEBUG:%d\n",__LINE__);b;}
#define DEBUG_CODE2(b1,b2) {printf("DEBUG:%d\n",__LINE__);b1;}
#else
#define DEBUG_CODE(b)
#define DEBUG_CODE2(b1,b2) b2
#endif

#define VOID_DLTYPE   0x00
#define CHAR_DLTYPE   0x01
#define SHORT_DLTYPE  0x02
#define INT_DLTYPE    0x03
#define LONG_DLTYPE   0x04
#define FLOAT_DLTYPE  0x05
#define DOUBLE_DLTYPE 0x06
#define VOIDP_DLTYPE  0x07

#define ARG_TYPE(x,i) (((x) & (0x07 << ((i)*3))) >> ((i)*3))
#define PUSH_ARG(x,t) do{x <<= 3; x |= t;}while(0)
#define PUSH_0(x) PUSH_ARG(x,VOID_DLTYPE)

#if SIZEOF_INT == SIZEOF_LONG
# define PUSH_I(x) PUSH_ARG(x,LONG_DLTYPE)
# define ANY2I(x)  x.l
# define DLINT(x)  (long)x
#else
# define PUSH_I(x) PUSH_ARG(x,INT_DLTYPE)
# define ANY2I(x)  x.i
# define DLINT(x)  (int)x
#endif
#define PUSH_L(x) PUSH_ARG(x,LONG_DLTYPE)
#define ANY2L(x)  x.l
#define DLLONG(x) (long)x

#if defined(WITH_TYPE_FLOAT)
# if SIZEOF_FLOAT == SIZEOF_DOUBLE
#   define PUSH_F(x) PUSH_ARG(x,DOUBLE_DLTYPE)
#   define ANY2F(x)  (x.d)
#   define DLFLOAT(x) ((double)x)
# else
#   define PUSH_F(x) PUSH_ARG(x,FLOAT_DLTYPE)
#   define ANY2F(x)  (x.f)
#   define DLFLOAT(x) ((float)x)
# endif
#else
# define PUSH_F(x) PUSH_ARG(x,DOUBLE_DLTYPE)
# define ANY2F(x)  (x.d)
# define DLFLOAT(x) ((double)x)
#endif
#define PUSH_D(x) PUSH_ARG(x,DOUBLE_DLTYPE)
#define ANY2D(x)  (x.d)
#define DLDOUBLE(x) ((double)x)

#if SIZEOF_INT == SIZEOF_VOIDP && SIZEOF_INT != SIZEOF_LONG
# define PUSH_P(x) PUSH_ARG(x,INT_DLTYPE)
# define ANY2P(x)  (x.i)
# define DLVOIDP(x) ((int)x)
#elif SIZEOF_LONG == SIZEOF_VOIDP
# define PUSH_P(x) PUSH_ARG(x,LONG_DLTYPE)
# define ANY2P(x)  (x.l)
# define DLVOIDP(x) ((long)x)
#else
# define PUSH_P(x) PUSH_ARG(x,VOIDP_DLTYPE)
# define ANY2P(x)  (x.p)
# define DLVOIDP(x) ((void*)p)
#endif

#if defined(WITH_TYPE_CHAR)
# define PUSH_C(x) PUSH_ARG(x,CHAR_DLTYPE)
# define ANY2C(x)  (x.c)
# define DLCHAR(x) ((char)x)
#else
# define PUSH_C(x) PUSH_I(x)
# define ANY2C(x)  ANY2I(x)
# define DLCHAR(x) DLINT(x)
#endif

#if defined(WITH_TYPE_SHORT)
# define PUSH_H(x) PUSH_ARG(x,SHORT_DLTYPE)
# define ANY2H(x)  (x.h)
# define DLSHORT(x) ((short)x)
#else
# define PUSH_H(x) PUSH_I(x)
# define ANY2H(x)  ANY2I(x)
# define DLSHORT(x) DLINT(x)
#endif

#define PUSH_S(x) PUSH_P(x)
#define ANY2S(x) ANY2P(x)
#define DLSTR(x) DLVOIDP(x)

#define CBPUSH_0(x) PUSH_0(x)
#define CBPUSH_C(x) PUSH_C(x)
#define CBPUSH_H(x) PUSH_H(x)
#define CBPUSH_I(x) PUSH_I(x)
#define CBPUSH_L(x) PUSH_L(x)
#define CBPUSH_F(x) PUSH_F(x)
#define CBPUSH_D(x) PUSH_D(x)
#if defined(WITH_CBTYPE_VOIDP)
# define CBPUSH_P(x) PUSH_ARG(x,VOIDP_DLTYPE)
#else
# define CBPUSH_P(x) PUSH_P(x)
#endif

#if defined(USE_INLINE_ASM)
# if defined(__i386__) && defined(__GNUC__)
#   define DLSTACK
#   define DLSTACK_METHOD "asm"
#   define DLSTACK_REVERSE
#   define DLSTACK_PROTO
#   define DLSTACK_ARGS
#   define DLSTACK_START(sym)
#   define DLSTACK_END(sym)
#   define DLSTACK_PUSH_C(x) asm volatile ("pushl %0" :: "g" (x));
#   define DLSTACK_PUSH_H(x) asm volatile ("pushl %0" :: "g" (x));
#   define DLSTACK_PUSH_I(x) asm volatile ("pushl %0" :: "g" (x));
#   define DLSTACK_PUSH_L(x) asm volatile ("pushl %0" :: "g" (x));
#   define DLSTACK_PUSH_P(x) asm volatile ("pushl %0" :: "g" (x));
#   define DLSTACK_PUSH_F(x) asm volatile ("flds %0"::"g"(x));\
                             asm volatile ("subl $4,%esp");\
                             asm volatile ("fstps (%esp)");
#   define DLSTACK_PUSH_D(x) asm volatile ("fldl %0"::"g"(x));\
                             asm volatile ("subl $8,%esp");\
                             asm volatile ("fstpl (%esp)")
# else
# error --with-asm is not supported on this machine
# endif
#elif defined(USE_DLSTACK)
# define DLSTACK
# define DLSTACK_GUARD
# define DLSTACK_METHOD "dl"
# define DLSTACK_PROTO long,long,long,long,long,\
                       long,long,long,long,long,\
                       long,long,long,long,long
# define DLSTACK_ARGS  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]
# define DLSTACK_SIZE  (sizeof(long)*15)
# define DLSTACK_START(sym)
# define DLSTACK_END(sym)
# define DLSTACK_PUSH_C(x)  {long v=(long)x; memcpy(sp,&v,sizeof(long)); sp++;}
# define DLSTACK_PUSH_H(x)  {long v=(long)x; memcpy(sp,&v,sizeof(long)); sp++;}
# define DLSTACK_PUSH_I(x)  {long v=(long)x; memcpy(sp,&v,sizeof(long)); sp++;}
# define DLSTACK_PUSH_L(x)  memcpy(sp,&x,sizeof(long)); sp++;
# define DLSTACK_PUSH_P(x)  memcpy(sp,&x,sizeof(void*)); sp++;
# define DLSTACK_PUSH_F(x)  memcpy(sp,&x,sizeof(float)); sp+=sizeof(float)/sizeof(long);
# define DLSTACK_PUSH_D(x)  memcpy(sp,&x,sizeof(double)); sp+=sizeof(double)/sizeof(long);
#else
# define DLSTACK_METHOD "none"
#endif

extern VALUE rb_mDL;
extern VALUE rb_mDLMemorySpace;
extern VALUE rb_cDLHandle;
extern VALUE rb_cDLSymbol;
extern VALUE rb_cDLPtrData;
extern VALUE rb_cDLStructData;

extern VALUE rb_eDLError;
extern VALUE rb_eDLTypeError;

#if defined(LONG2NUM) && (SIZEOF_LONG == SIZEOF_VOIDP)
# define DLLONG2NUM(x) LONG2NUM((long)x)
# define DLNUM2LONG(x) (long)(NUM2LONG(x))
#else
# define DLLONG2NUM(x) INT2NUM((long)x)
# define DLNUM2LONG(x) (long)(NUM2INT(x))
#endif

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;

#define ALIGN_VOIDP  (sizeof(s_voidp) - sizeof(void *))
#define ALIGN_SHORT  (sizeof(s_short) - sizeof(short))
#define ALIGN_INT    (sizeof(s_int) - sizeof(int))
#define ALIGN_LONG   (sizeof(s_long) - sizeof(long))
#define ALIGN_FLOAT  (sizeof(s_float) - sizeof(float))
#define ALIGN_DOUBLE (sizeof(s_double) - sizeof(double))

/* for compatibility */
#define VOIDP_ALIGN  ALIGN_VOIDP
#define SHORT_ALIGN  ALIGN_SHORT
#define INT_ALIGN    ALIGN_INT
#define LONG_ALIGN   ALIGN_LONG
#define FLOAT_ALIGN  ALIGN_FLOAT
#define DOUBLE_ALIGN ALIGN_DOUBLE

#define DLALIGN(ptr,offset,align) {\
  while( (((unsigned long)((char *)ptr + offset)) % align) != 0 ) offset++;\
}

typedef void (*freefunc_t)(void *);
#define DLFREEFUNC(func) ((freefunc_t)(func))

typedef union {
  void*  p;
  char   c;
  short  h;
  int    i;
  long   l;
  float  f;
  double d;
  char  *s;
} ANY_TYPE;

struct dl_handle {
  void *ptr;
  int  open;
  int  enable_close;
};

struct sym_data {
  void *func;
  char *name;
  char *type;
  int  len;
};

enum DLPTR_CTYPE {
  DLPTR_CTYPE_UNKNOWN,
  DLPTR_CTYPE_STRUCT,
  DLPTR_CTYPE_UNION
};

struct ptr_data {
  void *ptr;       /* a pointer to the data */
  freefunc_t free; /* free() */
  char *stype;      /* array of type specifiers */
  int  *ssize;      /* size[i] = sizeof(type[i]) > 0 */
  int  slen;   /* the number of type specifiers */
  ID   *ids;
  int  ids_num;
  int  ctype; /* DLPTR_CTYPE_UNKNOWN, DLPTR_CTYPE_STRUCT, DLPTR_CTYPE_UNION */
  long size;
};

#define RDLPTR(obj)  ((struct ptr_data *)(DATA_PTR(obj)))
#define RDLSYM(obj)  ((struct sym_data *)(DATA_PTR(obj)))

void dlfree(void*);
void *dlmalloc(size_t);
void *dlrealloc(void*,size_t);
char *dlstrdup(const char *);
size_t dlsizeof(const char *);

void *rb_ary2cary(char t, VALUE ary, long *size);

/*
void rb_dlmem_delete(void *ptr);
void rb_dlmem_aset(void *ptr, VALUE obj);
VALUE rb_dlmem_aref(void *ptr);
*/

void dlptr_free(struct ptr_data *data);
void dlptr_init(VALUE val);

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);
void *rb_dlptr2cptr(VALUE val);

VALUE rb_dlsym_new(void (*func)(), const char *name, const char *type);
freefunc_t rb_dlsym2csym(VALUE val);

#endif /* RUBY_DL_H */
/* [<][>][^][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_to_ptr
  9. rb_dlhandle_sym
  10. Init_dlhandle
/* -*- C -*-
 * $Id: handle.c,v 1.11.2.1 2005/02/28 02:45:17 matz 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, "11", &lib, &flag)) {
  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_eRuntimeError, err);
  }
#else
  if (!ptr) {
    err = dlerror();
    rb_raise(rb_eRuntimeError, 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 DLLONG2NUM(dlhandle);
}

VALUE
rb_dlhandle_to_ptr(VALUE self)
{
  struct dl_handle *dlhandle;

  Data_Get_Struct(self, struct dl_handle, dlhandle);
  return rb_dlptr_new(dlhandle, sizeof(dlhandle), 0);
}

VALUE
rb_dlhandle_sym(int argc, VALUE argv[], VALUE self)
{
  VALUE sym, type;
  void (*func)();
  VALUE val;
  struct dl_handle *dlhandle;
  void *handle;
  const char *name, *stype;
  const char *err;

  rb_secure(2);
  if (rb_scan_args(argc, argv, "11", &sym, &type) == 2) {
    SafeStringValue(type);
    stype = StringValuePtr(type);
  }
  else{
    stype = NULL;
  }

  if (sym == Qnil) {
#if defined(RTLD_NEXT)
    name = RTLD_NEXT;
#else
    name = NULL;
#endif
  }
  else{
    SafeStringValue(sym);
    name = StringValuePtr(sym);
  }

  Data_Get_Struct(self, struct dl_handle, dlhandle);
  if (!dlhandle->open) {
    rb_raise(rb_eRuntimeError, "closed handle");
  }
  handle = dlhandle->ptr;

  func = dlsym(handle, name);
#if defined(HAVE_DLERROR)
  if (!func && (err = dlerror()))
#else
  if (!func)
#endif
  {
#if defined(__CYGWIN__) || defined(WIN32) || defined(__MINGW32__)
    {
      int  len = strlen(name);
      char *name_a = (char*)dlmalloc(len+2);
      strcpy(name_a, name);
      name_a[len]   = 'A';
      name_a[len+1] = '\0';
      func = dlsym(handle, name_a);
      dlfree(name_a);
#if defined(HAVE_DLERROR)
      if (!func && (err = dlerror()))
#else
      if (!func)
#endif
      {
        rb_raise(rb_eRuntimeError, "unknown symbol \"%sA\"", name);
      }
    }
#else
    rb_raise(rb_eRuntimeError, "unknown symbol \"%s\"", name);
#endif
  }
  val = rb_dlsym_new(func, name, stype);

  return val;
}

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, "to_ptr", rb_dlhandle_to_ptr, 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/dl/ptr.c

root/ext/dl/ptr.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. rb_hash_delete
  2. rb_dlmem_delete
  3. rb_dlmem_aset
  4. rb_dlmem_aref
  5. dlptr_free
  6. dlptr_init
  7. rb_dlptr_new2
  8. rb_dlptr_new
  9. rb_dlptr_malloc
  10. rb_dlptr2cptr
  11. rb_dlptr_s_allocate
  12. rb_dlptr_initialize
  13. rb_dlptr_s_malloc
  14. rb_dlptr_to_i
  15. rb_dlptr_ptr
  16. rb_dlptr_ref
  17. rb_dlptr_null_p
  18. rb_dlptr_free_set
  19. rb_dlptr_free_get
  20. rb_dlptr_to_array
  21. rb_dlptr_to_s
  22. rb_dlptr_to_str
  23. rb_dlptr_inspect
  24. rb_dlptr_eql
  25. rb_dlptr_cmp
  26. rb_dlptr_plus
  27. rb_dlptr_minus
  28. rb_dlptr_define_data_type
  29. rb_dlptr_define_struct
  30. rb_dlptr_define_union
  31. rb_dlptr_get_data_type
  32. cary2ary
  33. rb_dlptr_aref
  34. ary2cary
  35. rb_dlptr_aset
  36. rb_dlptr_size
  37. dlmem_each_i
  38. rb_dlmem_each
  39. Init_dlptr
/* -*- C -*-
 * $Id: ptr.c,v 1.19 2003/10/22 14:29:20 ttate Exp $
 */

#include <ruby.h>
#include <ctype.h>
#include <version.h> /* for ruby version code */
#include "dl.h"

VALUE rb_cDLPtrData;
VALUE rb_mDLMemorySpace;
static VALUE DLMemoryTable;

#ifndef T_SYMBOL
# define T_SYMBOL T_FIXNUM
#endif

#if RUBY_VERSION_CODE < 171
static VALUE
rb_hash_delete(VALUE hash, VALUE key)
{
  return rb_funcall(hash, rb_intern("delete"), 1, key);
}
#endif

static void
rb_dlmem_delete(void *ptr)
{
  rb_secure(4);
  rb_hash_delete(DLMemoryTable, DLLONG2NUM(ptr));
}

static void
rb_dlmem_aset(void *ptr, VALUE obj)
{
  if (obj == Qnil) {
    rb_dlmem_delete(ptr);
  }
  else{
    rb_hash_aset(DLMemoryTable, DLLONG2NUM(ptr), DLLONG2NUM(obj));
  }
}

static VALUE
rb_dlmem_aref(void *ptr)
{
  VALUE val;

  val = rb_hash_aref(DLMemoryTable, DLLONG2NUM(ptr));
  return val == Qnil ? Qnil : (VALUE)DLNUM2LONG(val);
}

void
dlptr_free(struct ptr_data *data)
{
  if (data->ptr) {
    DEBUG_CODE({
      printf("dlptr_free(): removing the pointer `0x%x' from the MemorySpace\n",
             data->ptr);
    });
    rb_dlmem_delete(data->ptr);
    if (data->free) {
      DEBUG_CODE({
        printf("dlptr_free(): 0x%x(data->ptr:0x%x)\n",data->free,data->ptr);
      });
      (*(data->free))(data->ptr);
    }
  }
  if (data->stype) dlfree(data->stype);
  if (data->ssize) dlfree(data->ssize);
  if (data->ids) dlfree(data->ids);
}

void
dlptr_init(VALUE val)
{
  struct ptr_data *data;

  Data_Get_Struct(val, struct ptr_data, data);
  DEBUG_CODE({
    printf("dlptr_init(): add the pointer `0x%x' to the MemorySpace\n",
           data->ptr);
  });
  rb_dlmem_aset(data->ptr, val);
  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);
  if (ptr) {
    val = rb_dlmem_aref(ptr);
    if (val == Qnil) {
      val = Data_Make_Struct(klass, struct ptr_data,
                             0, dlptr_free, data);
      data->ptr = ptr;
      data->free = func;
      data->ctype = DLPTR_CTYPE_UNKNOWN;
      data->stype = NULL;
      data->ssize = NULL;
      data->slen = 0;
      data->size = size;
      data->ids = NULL;
      data->ids_num = 0;
      dlptr_init(val);
    }
    else{
      if (func) {
        Data_Get_Struct(val, struct ptr_data, data);
        data->free = func;
      }
    }
  }
  else{
    val = Qnil;
  }

  return val;
}

VALUE
rb_dlptr_new(void *ptr, long size, freefunc_t func)
{
  return rb_dlptr_new2(rb_cDLPtrData, ptr, size, func);
}

VALUE
rb_dlptr_malloc(long size, freefunc_t func)
{
  void *ptr;

  rb_secure(4);
  ptr = dlmalloc((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_cDLPtrData)) {
    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, 0, dlptr_free, data);
  data->ptr = 0;
  data->free = 0;
  data->ctype = DLPTR_CTYPE_UNKNOWN;
  data->stype = NULL;
  data->ssize = NULL;
  data->slen  = 0;
  data->size  = 0;
  data->ids   = NULL;
  data->ids_num = 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*)(DLNUM2LONG(rb_Integer(ptr)));
    break;
  case 2:
    p = (void*)(DLNUM2LONG(rb_Integer(ptr)));
    s = DLNUM2LONG(size);
    break;
  case 3:
    p = (void*)(DLNUM2LONG(rb_Integer(ptr)));
    s = DLNUM2LONG(size);
    f = rb_dlsym2csym(sym);
    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 = NULL;

  switch (rb_scan_args(argc, argv, "11", &size, &sym)) {
  case 1:
    s = NUM2INT(size);
    break;
  case 2:
    s = NUM2INT(size);
    f = rb_dlsym2csym(sym);
    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 DLLONG2NUM(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;

  Data_Get_Struct(self, struct ptr_data, data);

  data->free = DLFREEFUNC(rb_dlsym2csym(val));

  return Qnil;
}

VALUE
rb_dlptr_free_get(VALUE self)
{
  struct ptr_data *pdata;

  Data_Get_Struct(self, struct ptr_data, pdata);

  return rb_dlsym_new(pdata->free,"(free)","0P");
}

VALUE
rb_dlptr_to_array(int argc, VALUE argv[], VALUE self)
{
  struct ptr_data *data;
  int n;
  int i;
  int t;
  VALUE ary;
  VALUE type, size;

  Data_Get_Struct(self, struct ptr_data, data);

  switch (rb_scan_args(argc, argv, "11", &type, &size)) {
  case 2:
    t = StringValuePtr(type)[0];
    n = NUM2INT(size);
    break;
  case 1:
    t = StringValuePtr(type)[0];
    switch (t) {
    case 'C':
      n = data->size;
      break;
    case 'H':
      n = data->size / sizeof(short);
      break;
    case 'I':
      n = data->size / sizeof(int);
      break;
    case 'L':
      n = data->size / sizeof(long);
      break;
    case 'F':
      n = data->size / sizeof(float);
      break;
    case 'D':
      n = data->size / sizeof(double);
      break;
    case  'P': case 'p':
      n = data->size / sizeof(void*);
      break;
    case 'S': case 's':
      for (n=0; ((void**)(data->ptr))[n]; n++) {};
      break;
    default:
        n = 0;
    }
    break;
  default:
    rb_bug("rb_dlptr_to_array");
  }

  ary = rb_ary_new();

  for (i=0; i < n; i++) {
    switch (t) {
    case 'C':
      rb_ary_push(ary, INT2NUM(((char*)(data->ptr))[i]));
      break;
    case 'H':
      rb_ary_push(ary, INT2NUM(((short*)(data->ptr))[i]));
      break;
    case 'I':
      rb_ary_push(ary, INT2NUM(((int*)(data->ptr))[i]));
      break;
    case 'L':
      rb_ary_push(ary, DLLONG2NUM(((long*)(data->ptr))[i]));
      break;
    case 'D':
      rb_ary_push(ary, rb_float_new(((double*)(data->ptr))[i]));
      break;
    case 'F':
      rb_ary_push(ary, rb_float_new(((float*)(data->ptr))[i]));
      break;
    case 'S':
      {
        char *str = ((char**)(data->ptr))[i];
        if (str) {
          rb_ary_push(ary, rb_tainted_str_new2(str));
        }
        else{
          rb_ary_push(ary, Qnil);
        }
      }
      break;
    case 's':
      {
        char *str = ((char**)(data->ptr))[i];
        if (str) {
          rb_ary_push(ary, rb_tainted_str_new2(str));
          xfree(str);
        }
        else{
          rb_ary_push(ary, Qnil);
        }
      }
      break;
    case 'P':
      rb_ary_push(ary, rb_dlptr_new(((void**)(data->ptr))[i],0,0));
      break;
    case 'p':
      rb_ary_push(ary,
                  rb_dlptr_new(((void**)(data->ptr))[i],0,dlfree));
      break;
    }
  }

  return ary;
}

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:0x%p ptr=0x%p size=%ld free=0x%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 DLLONG2NUM((long)ptr1 - (long)ptr2);
}

VALUE
rb_dlptr_plus(VALUE self, VALUE other)
{
  void *ptr;
  long num, size;

  ptr = rb_dlptr2cptr(self);
  size = RDLPTR(self)->size;
  num = DLNUM2LONG(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 = RDLPTR(self)->size;
  num = DLNUM2LONG(other);
  return rb_dlptr_new((char *)ptr - num, size + num, 0);
}

VALUE
rb_dlptr_define_data_type(int argc, VALUE argv[], VALUE self)
{
  VALUE data_type, type, rest, vid;
  struct ptr_data *data;
  int i, t, num;
  char *ctype;

  rb_scan_args(argc, argv, "11*", &data_type, &type, &rest);
  Data_Get_Struct(self, struct ptr_data, data);

  if (argc == 1 || (argc == 2 && type == Qnil)) {
    if (NUM2INT(data_type) == DLPTR_CTYPE_UNKNOWN) {
      data->ctype = DLPTR_CTYPE_UNKNOWN;
      data->slen = 0;
      data->ids_num  = 0;
      if (data->stype) {
        dlfree(data->stype);
        data->stype = NULL;
      }
      if (data->ids) {
        dlfree(data->ids);
        data->ids = NULL;
      }
      return Qnil;
    }
    else{
      rb_raise(rb_eArgError, "wrong arguments");
    }
  }

  t = NUM2INT(data_type);
  StringValue(type);
  Check_Type(rest, T_ARRAY);
  num = RARRAY(rest)->len;
  for (i=0; i<num; i++) {
    rb_to_id(rb_ary_entry(rest,i));
  }

  data->ctype = t;
  data->slen = num;
  data->ids_num  = num;
  if (data->stype) dlfree(data->stype);
  data->stype = (char*)dlmalloc(sizeof(char) * num);
  if (data->ssize) dlfree(data->ssize);
  data->ssize = (int*)dlmalloc(sizeof(int) * num);
  if (data->ids) dlfree(data->ids);
  data->ids  = (ID*)dlmalloc(sizeof(ID) * data->ids_num);

  ctype = StringValuePtr(type);
  for (i=0; i<num; i++) {
    vid = rb_ary_entry(rest,i);
    data->ids[i] = rb_to_id(vid);
    data->stype[i] = *ctype;
    ctype ++;
    if (isdigit(*ctype)) {
      char *p, *d;
      for (p=ctype; isdigit(*p); p++) ;
      d = ALLOCA_N(char, p - ctype + 1);
      strncpy(d, ctype, p - ctype);
      d[p - ctype] = '\0';
      data->ssize[i] = atoi(d);
      ctype = p;
    }
    else{
      data->ssize[i] = 1;
    }
  }

  if (*ctype) {
    rb_raise(rb_eArgError, "too few/many arguments");
  }

  if (!data->size)
    data->size = dlsizeof(RSTRING(type)->ptr);

  return Qnil;
}

VALUE
rb_dlptr_define_struct(int argc, VALUE argv[], VALUE self)
{
  VALUE *pass_argv;
  int pass_argc, i;

  pass_argc = argc + 1;
  pass_argv = ALLOCA_N(VALUE, pass_argc);
  pass_argv[0] = INT2FIX(DLPTR_CTYPE_STRUCT);
  for (i=1; i<pass_argc; i++) {
    pass_argv[i] = argv[i-1];
  }
  return rb_dlptr_define_data_type(pass_argc, pass_argv, self);
}

VALUE
rb_dlptr_define_union(int argc, VALUE argv[], VALUE self)
{
  VALUE *pass_argv;
  int pass_argc, i;

  pass_argc = argc + 1;
  pass_argv = ALLOCA_N(VALUE, pass_argc);
  pass_argv[0] = INT2FIX(DLPTR_CTYPE_UNION);
  for (i=1; i<pass_argc; i++) {
    pass_argv[i] = argv[i-1];
  }
  return rb_dlptr_define_data_type(pass_argc, pass_argv, self);
}

VALUE
rb_dlptr_get_data_type(VALUE self)
{
  struct ptr_data *data;

  Data_Get_Struct(self, struct ptr_data, data);
  if (data->stype)
    return rb_assoc_new(INT2FIX(data->ctype),
                        rb_tainted_str_new(data->stype, data->slen));
  else
    return rb_assoc_new(INT2FIX(data->ctype), Qnil);
}

static VALUE
cary2ary(void *ptr, char t, int len)
{
  VALUE ary;
  VALUE elem;
  int i;

  if (len < 1)
    return Qnil;

  if (len == 1) {
    switch (t) {
    case 'I':
      elem = INT2NUM(*((int*)ptr));
      ptr = (char *)ptr + sizeof(int);
      break;
    case 'L':
      elem = DLLONG2NUM(*((long*)ptr));
      ptr = (char *)ptr + sizeof(long);
      break;
    case 'P':
    case 'S':
      elem = rb_dlptr_new(*((void**)ptr),0, 0);
      ptr = (char *)ptr + sizeof(void*);
      break;
    case 'F':
      elem = rb_float_new(*((float*)ptr));
      ptr = (char *)ptr + sizeof(float);
      break;
    case 'D':
      elem = rb_float_new(*((double*)ptr));
      ptr = (char *)ptr + sizeof(double);
      break;
    case 'C':
      elem = INT2NUM(*((char*)ptr));
      ptr = (char *)ptr + sizeof(char);
      break;
    case 'H':
      elem = INT2NUM(*((short*)ptr));
      ptr = (char *)ptr + sizeof(short);
      break;
    default:
      rb_raise(rb_eDLTypeError, "unsupported type '%c'", t);
    }
    return elem;
  }

  ary = rb_ary_new();
  for (i=0; i < len; i++) {
    switch (t) {
    case 'I':
      elem = INT2NUM(*((int*)ptr));
      ptr = (char *)ptr + sizeof(int);
      break;
    case 'L':
      elem = DLLONG2NUM(*((long*)ptr));
      ptr = (char *)ptr + sizeof(long);
      break;
    case 'P':
    case 'S':
      elem = rb_dlptr_new(*((void**)ptr), 0, 0);
      ptr = (char *)ptr + sizeof(void*);
      break;
    case 'F':
      elem = rb_float_new(*((float*)ptr));
      ptr = (char *)ptr + sizeof(float);
      break;
    case 'D':
      elem = rb_float_new(*((float*)ptr));
      ptr = (char *)ptr + sizeof(double);
      break;
    case 'C':
      elem = INT2NUM(*((char*)ptr));
      ptr = (char *)ptr + sizeof(char);
      break;
    case 'H':
      elem = INT2NUM(*((short*)ptr));
      ptr = (char *)ptr + sizeof(short);
      break;
    default:
      rb_raise(rb_eDLTypeError, "unsupported type '%c'", t);
    }
    rb_ary_push(ary, elem);
  }

  return ary;
}

VALUE
rb_dlptr_aref(int argc, VALUE argv[], VALUE self)
{
  VALUE key = Qnil, num = Qnil;
  ID id;
  struct ptr_data *data;
  int i;
  int offset;

  if (rb_scan_args(argc, argv, "11", &key, &num) == 1) {
    num = INT2NUM(0);
  }

  if (TYPE(key) == T_FIXNUM || TYPE(key) == T_BIGNUM) {
    VALUE pass[1];
    pass[0] = num;
    return rb_dlptr_to_str(1, pass, rb_dlptr_plus(self, key));
  }
  rb_to_id(key);
  if (! (TYPE(key) == T_STRING || TYPE(key) == T_SYMBOL)) {
    rb_raise(rb_eTypeError, "the key must be a string or symbol");
  }

  id = rb_to_id(key);
  Data_Get_Struct(self, struct ptr_data, data);
  offset = 0;
  switch (data->ctype) {
  case DLPTR_CTYPE_STRUCT:
    for (i=0; i < data->ids_num; i++) {
      if (data->ids[i] == id) {
        switch (data->stype[i]) {
        case 'I':
          DLALIGN(data->ptr,offset,INT_ALIGN);
          break;
        case 'L':
          DLALIGN(data->ptr,offset,LONG_ALIGN);
          break;
        case 'P':
        case 'S':
          DLALIGN(data->ptr,offset,VOIDP_ALIGN);
          break;
        case 'F':
          DLALIGN(data->ptr,offset,FLOAT_ALIGN);
          break;
        case 'D':
          DLALIGN(data->ptr,offset,DOUBLE_ALIGN);
          break;
        case 'C':
          break;
        case 'H':
          DLALIGN(data->ptr,offset,SHORT_ALIGN);
          break;
        default:
          rb_raise(rb_eDLTypeError, "unsupported type '%c'", data->stype[i]);
        }
        return cary2ary((char *)data->ptr + offset, data->stype[i], data->ssize[i]);
      }
      switch (data->stype[i]) {
      case 'I':
        offset += sizeof(int) * data->ssize[i];
        break;
      case 'L':
        offset += sizeof(long) * data->ssize[i];
        break;
      case 'P':
      case 'S':
        offset += sizeof(void*) * data->ssize[i];
        break;
      case 'F':
        offset += sizeof(float) * data->ssize[i];
        break;
      case 'D':
        offset += sizeof(double) * data->ssize[i];
        break;
      case 'C':
        offset += sizeof(char) * data->ssize[i];
        break;
      case 'H':
        offset += sizeof(short) * data->ssize[i];
        break;
      default:
        rb_raise(rb_eDLTypeError, "unsupported type '%c'", data->stype[i]);
      }
    }
    break;
  case DLPTR_CTYPE_UNION:
    for (i=0; i < data->ids_num; i++) {
      if (data->ids[i] == id) {
        return cary2ary((char *)data->ptr + offset, data->stype[i], data->ssize[i]);
      }
    }
    break;
  } /* end of switch */

  rb_raise(rb_eNameError, "undefined key `%s' for %s",
           rb_id2name(id), rb_class2name(CLASS_OF(self)));

  return Qnil;
}

static void *
ary2cary(char t, VALUE val, long *size)
{
  void *ptr;

  if (TYPE(val) == T_ARRAY) {
    ptr = rb_ary2cary(t, val, size);
  }
  else{
    ptr = rb_ary2cary(t, rb_ary_new3(1, val), size);
  }
  return ptr;
}

VALUE
rb_dlptr_aset(int argc, VALUE argv[], VALUE self)
{
  VALUE key = Qnil, num = Qnil, val = Qnil;
  ID id;
  struct ptr_data *data;
  int i;
  int offset;
  long memsize;
  void *memimg;

  rb_secure(4);
  switch (rb_scan_args(argc, argv, "21", &key, &num, &val)) {
  case 2:
    val = num;
    num = Qnil;
    break;
  }

  if (TYPE(key) == T_FIXNUM || TYPE(key) == T_BIGNUM) {
    void *dst, *src;
    long len;

    StringValue(val);
    Data_Get_Struct(self, struct ptr_data, data);
    dst = (void*)((long)(data->ptr) + DLNUM2LONG(key));
    src = RSTRING(val)->ptr;
    len = RSTRING(val)->len;
    if (num == Qnil) {
      memcpy(dst, src, len);
    }
    else{
      long n = NUM2INT(num);
      memcpy(dst, src, n < len ? n : len);
      if (n > len) MEMZERO((char*)dst + len, char, n - len);
    }
    return val;
  }

  id = rb_to_id(key);
  Data_Get_Struct(self, struct ptr_data, data);
  switch (data->ctype) {
  case DLPTR_CTYPE_STRUCT:
    offset = 0;
    for (i=0; i < data->ids_num; i++) {
      if (data->ids[i] == id) {
        switch (data->stype[i]) {
        case 'I':
          DLALIGN(data->ptr,offset,INT_ALIGN);
          break;
        case 'L':
          DLALIGN(data->ptr,offset,LONG_ALIGN);
          break;
        case 'P':
        case 'S':
          DLALIGN(data->ptr,offset,VOIDP_ALIGN);
          break;
        case 'D':
          DLALIGN(data->ptr,offset,DOUBLE_ALIGN);
          break;
        case 'F':
          DLALIGN(data->ptr,offset,FLOAT_ALIGN);
          break;
        case 'C':
          break;
        case 'H':
          DLALIGN(data->ptr,offset,SHORT_ALIGN);
          break;
        default:
          rb_raise(rb_eDLTypeError, "unsupported type '%c'", data->stype[i]);
        }
        memimg = ary2cary(data->stype[i], val, &memsize);
        memcpy((char *)data->ptr + offset, memimg, memsize);
        return val;
      }
      switch (data->stype[i]) {
      case 'I':
      case 'i':
        offset += sizeof(int) * data->ssize[i];
        break;
      case 'L':
      case 'l':
        offset += sizeof(long) * data->ssize[i];
        break;
      case 'P':
      case 'p':
      case 'S':
      case 's':
        offset += sizeof(void*) * data->ssize[i];
        break;
      case 'D':
      case 'd':
        offset += sizeof(double) * data->ssize[i];
        break;
      case 'F':
      case 'f':
        offset += sizeof(float) * data->ssize[i];
        break;
      case 'C':
      case 'c':
        offset += sizeof(char) * data->ssize[i];
        break;
      case 'H':
      case 'h':
        offset += sizeof(short) * data->ssize[i];
        break;
      default:
        rb_raise(rb_eDLTypeError, "unsupported type '%c'", data->stype[i]);
      }
    }
    return val;
    /* break; */
  case DLPTR_CTYPE_UNION:
    for (i=0; i < data->ids_num; i++) {
      if (data->ids[i] == id) {
        switch (data->stype[i]) {
        case 'I': case 'i':
          memsize = sizeof(int) * data->ssize[i];
          break;
        case 'L': case 'l':
          memsize = sizeof(long) * data->ssize[i];
          break;
        case 'P': case 'p':
        case 'S': case 's':
          memsize = sizeof(void*) * data->ssize[i];
          break;
        case 'F': case 'f':
          memsize = sizeof(float) * data->ssize[i];
          break;
        case 'D': case 'd':
          memsize = sizeof(double) * data->ssize[i];
          break;
        case 'C': case 'c':
          memsize = sizeof(char) * data->ssize[i];
          break;
        case 'H': case 'h':
          memsize = sizeof(short) * data->ssize[i];
          break;
        default:
          rb_raise(rb_eDLTypeError, "unsupported type '%c'", data->stype[i]);
        }
        memimg = ary2cary(data->stype[i], val, NULL);
        memcpy(data->ptr, memimg, memsize);
      }
    }
    return val;
    /* break; */
  }

  rb_raise(rb_eNameError, "undefined key `%s' for %s",
           rb_id2name(id), rb_class2name(CLASS_OF(self)));

  return Qnil;
}

VALUE
rb_dlptr_size(int argc, VALUE argv[], VALUE self)
{
  VALUE size;

  if (rb_scan_args(argc, argv, "01", &size) == 0){
    return DLLONG2NUM(RDLPTR(self)->size);
  }
  else{
    RDLPTR(self)->size = DLNUM2LONG(size);
    return size;
  }
}

static VALUE
dlmem_each_i(VALUE assoc, void *data)
{
  VALUE key, val;
  key = rb_ary_entry(assoc, 0);
  val = rb_ary_entry(assoc, 1);
  rb_yield(rb_assoc_new(key,(VALUE)DLNUM2LONG(val)));
  return Qnil;
}

VALUE
rb_dlmem_each(VALUE self)
{
  rb_iterate(rb_each, DLMemoryTable, dlmem_each_i, 0);
  return Qnil;
}

void
Init_dlptr()
{
  rb_cDLPtrData = rb_define_class_under(rb_mDL, "PtrData", rb_cObject);
  rb_define_alloc_func(rb_cDLPtrData, rb_dlptr_s_allocate);
  rb_define_singleton_method(rb_cDLPtrData, "malloc", rb_dlptr_s_malloc, -1);
  rb_define_method(rb_cDLPtrData, "initialize", rb_dlptr_initialize, -1);
  rb_define_method(rb_cDLPtrData, "free=", rb_dlptr_free_set, 1);
  rb_define_method(rb_cDLPtrData, "free",  rb_dlptr_free_get, 0);
  rb_define_method(rb_cDLPtrData, "to_i",  rb_dlptr_to_i, 0);
  rb_define_method(rb_cDLPtrData, "ptr",   rb_dlptr_ptr, 0);
  rb_define_method(rb_cDLPtrData, "+@", rb_dlptr_ptr, 0);
  rb_define_method(rb_cDLPtrData, "ref",   rb_dlptr_ref, 0);
  rb_define_method(rb_cDLPtrData, "-@", rb_dlptr_ref, 0);
  rb_define_method(rb_cDLPtrData, "null?", rb_dlptr_null_p, 0);
  rb_define_method(rb_cDLPtrData, "to_a", rb_dlptr_to_array, -1);
  rb_define_method(rb_cDLPtrData, "to_s", rb_dlptr_to_s, -1);
  rb_define_method(rb_cDLPtrData, "to_str", rb_dlptr_to_str, -1);
  rb_define_method(rb_cDLPtrData, "inspect", rb_dlptr_inspect, 0);
  rb_define_method(rb_cDLPtrData, "<=>", rb_dlptr_cmp, 1);
  rb_define_method(rb_cDLPtrData, "==", rb_dlptr_eql, 1);
  rb_define_method(rb_cDLPtrData, "eql?", rb_dlptr_eql, 1);
  rb_define_method(rb_cDLPtrData, "+", rb_dlptr_plus, 1);
  rb_define_method(rb_cDLPtrData, "-", rb_dlptr_minus, 1);
  rb_define_method(rb_cDLPtrData, "define_data_type",
                   rb_dlptr_define_data_type, -1);
  rb_define_method(rb_cDLPtrData, "struct!", rb_dlptr_define_struct, -1);
  rb_define_method(rb_cDLPtrData, "union!",  rb_dlptr_define_union,  -1);
  rb_define_method(rb_cDLPtrData, "data_type", rb_dlptr_get_data_type, 0);
  rb_define_method(rb_cDLPtrData, "[]", rb_dlptr_aref, -1);
  rb_define_method(rb_cDLPtrData, "[]=", rb_dlptr_aset, -1);
  rb_define_method(rb_cDLPtrData, "size", rb_dlptr_size, -1);
  rb_define_method(rb_cDLPtrData, "size=", rb_dlptr_size, -1);

  rb_mDLMemorySpace = rb_define_module_under(rb_mDL, "MemorySpace");
  DLMemoryTable = rb_hash_new();
  rb_define_const(rb_mDLMemorySpace, "MemoryTable", DLMemoryTable);
  rb_define_module_function(rb_mDLMemorySpace, "each", rb_dlmem_each, 0);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/dl/sym.c

root/ext/dl/sym.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. char2type
  2. dlsym_free
  3. rb_dlsym_new
  4. rb_dlsym2csym
  5. rb_dlsym_s_allocate
  6. rb_dlsym_initialize
  7. rb_s_dlsym_char2type
  8. rb_dlsym_name
  9. rb_dlsym_proto
  10. rb_dlsym_cproto
  11. rb_dlsym_inspect
  12. stack_size
  13. rb_dl_get_last_error
  14. rb_dl_set_last_error
  15. rb_dl_win32_get_last_error
  16. rb_dl_win32_set_last_error
  17. __declspec
  18. rb_dlsym_call
  19. rb_dlsym_to_i
  20. rb_dlsym_to_ptr
  21. Init_dlsym
/* -*- C -*-
 * $Id: sym.c,v 1.24.2.3 2005/06/15 23:39:27 ocean Exp $
 */

#include <ruby.h>
#include <errno.h>
#include "dl.h"

VALUE rb_cDLSymbol;

static const char *
char2type(int ch)
{
  switch (ch) {
  case '0':
    return "void";
  case 'P':
    return "void *";
  case 'p':
    return "void *";
  case 'C':
    return "char";
  case 'c':
    return "char *";
  case 'H':
    return "short";
  case 'h':
    return "short *";
  case 'I':
    return "int";
  case 'i':
    return "int *";
  case 'L':
    return "long";
  case 'l':
    return "long *";
  case 'F':
    return "double";
  case 'f':
    return "double *";
  case 'D':
    return "double";
  case 'd':
    return "double *";
  case 'S':
    return "const char *";
  case 's':
    return "char *";
  case 'A':
    return "[]";
  case 'a':
    return "[]"; /* ?? */
  }
  return NULL;
}

void
dlsym_free(struct sym_data *data)
{
  if( data->name ){
    DEBUG_CODE({
      printf("dlsym_free(): free(data->name:%s)\n",data->name);
    });
    free(data->name);
  }
  if( data->type ){
    DEBUG_CODE({
      printf("dlsym_free(): free(data->type:%s)\n",data->type);
    });
    free(data->type);
  }
}

VALUE
rb_dlsym_new(void (*func)(), const char *name, const char *type)
{
  VALUE val;
  struct sym_data *data;
  const char *ptype;

  rb_secure(4);
  if( !type || !type[0] ){
    return rb_dlptr_new((void*)func, 0, 0);
  }

  for( ptype = type; *ptype; ptype ++ ){
    if( ! char2type(*ptype) ){
      rb_raise(rb_eDLTypeError, "unknown type specifier '%c'", *ptype);
    }
  }

  if( func ){
    val = Data_Make_Struct(rb_cDLSymbol, struct sym_data, 0, dlsym_free, data);
    data->func = func;
    data->name = name ? strdup(name) : NULL;
    data->type = type ? strdup(type) : NULL;
    data->len  = type ? strlen(type) : 0;
#if !(defined(DLSTACK))
    if( data->len - 1 > MAX_ARG ){
      rb_raise(rb_eDLError, "maximum number of arguments is %d.", MAX_ARG);
    }
#endif
  }
  else{
    val = Qnil;
  }

  return val;
}

freefunc_t
rb_dlsym2csym(VALUE val)
{
  struct sym_data *data;
  freefunc_t func;

  if( rb_obj_is_kind_of(val, rb_cDLSymbol) ){
    Data_Get_Struct(val, struct sym_data, data);
    func = data->func;
  }
  else if( val == Qnil ){
    func = NULL;
  }
  else{
    rb_raise(rb_eTypeError, "DL::Symbol was expected");
  }

  return func;
}

VALUE
rb_dlsym_s_allocate(VALUE klass)
{
  VALUE obj;
  struct sym_data *data;

  obj = Data_Make_Struct(klass, struct sym_data, 0, dlsym_free, data);
  data->func = 0;
  data->name = 0;
  data->type = 0;
  data->len  = 0;

  return obj;
}

VALUE
rb_dlsym_initialize(int argc, VALUE argv[], VALUE self)
{
  VALUE addr, name, type;
  struct sym_data *data;
  void *saddr;
  const char *sname, *stype;

  rb_scan_args(argc, argv, "12", &addr, &name, &type);

  saddr = (void*)(DLNUM2LONG(rb_Integer(addr)));
  if (!NIL_P(name)) StringValue(name);
  stype = NIL_P(type) ? NULL : StringValuePtr(type);
  sname = NIL_P(name) ? NULL : RSTRING(name)->ptr;

  if( saddr ){
    Data_Get_Struct(self, struct sym_data, data);
    if( data->name ) free(data->name);
    if( data->type ) free(data->type);
    data->func = saddr;
    data->name = sname ? strdup(sname) : 0;
    data->type = stype ? strdup(stype) : 0;
    data->len  = stype ? strlen(stype) : 0;
  }

  return Qnil;
}

VALUE
rb_s_dlsym_char2type(VALUE self, VALUE ch)
{
  const char *type;

  type = char2type(StringValuePtr(ch)[0]);

  if (type == NULL)
    return Qnil;
  else
    return rb_str_new2(type);
}

VALUE
rb_dlsym_name(VALUE self)
{
  struct sym_data *sym;

  Data_Get_Struct(self, struct sym_data, sym);
  return sym->name ? rb_tainted_str_new2(sym->name) : Qnil;
}

VALUE
rb_dlsym_proto(VALUE self)
{
  struct sym_data *sym;

  Data_Get_Struct(self, struct sym_data, sym);
  return sym->type ? rb_tainted_str_new2(sym->type) : Qnil;
}

VALUE
rb_dlsym_cproto(VALUE self)
{
  struct sym_data *sym;
  const char *ptype, *typestr;
  size_t len;
  VALUE val;

  Data_Get_Struct(self, struct sym_data, sym);

  ptype = sym->type;

  if( ptype ){
    typestr = char2type(*ptype++);
    len = strlen(typestr);

    val = rb_tainted_str_new(typestr, len);
    if (typestr[len - 1] != '*')
      rb_str_cat(val, " ", 1);

    if( sym->name ){
      rb_str_cat2(val, sym->name);
    }
    else{
      rb_str_cat2(val, "(null)");
    }
    rb_str_cat(val, "(", 1);

    while (*ptype) {
      const char *ty = char2type(*ptype++);
      rb_str_cat2(val, ty);
      if (*ptype)
        rb_str_cat(val, ", ", 2);
    }

    rb_str_cat(val, ");", 2);
  }
  else{
    val = rb_tainted_str_new2("void (");
    if( sym->name ){
      rb_str_cat2(val, sym->name);
    }
    else{
      rb_str_cat2(val, "(null)");
    }
    rb_str_cat2(val, ")()");
  }

  return val;
}

VALUE
rb_dlsym_inspect(VALUE self)
{
  VALUE proto;
  VALUE val;
  char  *str;
  int str_size;
  struct sym_data *sym;

  Data_Get_Struct(self, struct sym_data, sym);
  proto = rb_dlsym_cproto(self);

  str_size = RSTRING(proto)->len + 100;
  str = dlmalloc(str_size);
  snprintf(str, str_size - 1,
           "#<DL::Symbol:0x%p func=0x%p '%s'>",
           sym, sym->func, RSTRING(proto)->ptr);
  val = rb_tainted_str_new2(str);
  dlfree(str);

  return val;
}

static int
stack_size(struct sym_data *sym)
{
  int i;
  int size;

  size = 0;
  for( i=1; i < sym->len; i++ ){
    switch(sym->type[i]){
    case 'C':
    case 'H':
    case 'I':
    case 'L':
      size += sizeof(long);
      break;
    case 'F':
      size += sizeof(float);
      break;
    case 'D':
      size += sizeof(double);
      break;
    case 'c':
    case 'h':
    case 'i':
    case 'l':
    case 'f':
    case 'd':
    case 'p':
    case 'P':
    case 's':
    case 'S':
    case 'a':
    case 'A':
      size += sizeof(void*);
      break;
    default:
      return -(sym->type[i]);
    }
  }
  return size;
}

static ID rb_dl_id_DLErrno;

static VALUE
rb_dl_get_last_error(VALUE self)
{
  return rb_thread_local_aref(rb_thread_current(), rb_dl_id_DLErrno);
}

static VALUE
rb_dl_set_last_error(VALUE self, VALUE val)
{
  errno = NUM2INT(val);
  rb_thread_local_aset(rb_thread_current(), rb_dl_id_DLErrno, val);
  return Qnil;
}

#ifdef HAVE_WINDOWS_H
#include <windows.h>
static ID rb_dl_id_DLW32Error;

static VALUE
rb_dl_win32_get_last_error(VALUE self)
{
  return rb_thread_local_aref(rb_thread_current(), rb_dl_id_DLW32Error);
}

static VALUE
rb_dl_win32_set_last_error(VALUE self, VALUE val)
{
    SetLastError(NUM2INT(val));
    rb_thread_local_aset(rb_thread_current(), rb_dl_id_DLW32Error, val);
    return Qnil;
}
#endif

#ifdef DLSTACK_GUARD
# ifdef __MSVC_RUNTIME_CHECKS
#  pragma runtime_checks("s", off)
# endif
# if _MSC_VER >= 1300
__declspec(noinline)
# endif
static int
rb_dlsym_guardcall(char type, ANY_TYPE *ret, long *stack, void *func)
{
  char *volatile guard = ALLOCA_N(char, 1); /* guard stack pointer */
  switch(type){
  case '0':
    {
      void (*f)(DLSTACK_PROTO) = func;
      f(DLSTACK_ARGS);
    }
    break;
  case 'P':
  case 'p':
    {
      void * (*f)(DLSTACK_PROTO) = func;
      ret->p = f(DLSTACK_ARGS);
    }
    break;
  case 'C':
  case 'c':
    {
      char (*f)(DLSTACK_PROTO) = func;
      ret->c = f(DLSTACK_ARGS);
    }
    break;
  case 'H':
  case 'h':
    {
      short (*f)(DLSTACK_PROTO) = func;
      ret->h = f(DLSTACK_ARGS);
    }
    break;
  case 'I':
  case 'i':
    {
      int (*f)(DLSTACK_PROTO) = func;
      ret->i = f(DLSTACK_ARGS);
    }
    break;
  case 'L':
  case 'l':
    {
      long (*f)(DLSTACK_PROTO) = func;
      ret->l = f(DLSTACK_ARGS);
    }
    break;
  case 'F':
  case 'f':
    {
      float (*f)(DLSTACK_PROTO) = func;
      ret->f = f(DLSTACK_ARGS);
    }
    break;
  case 'D':
  case 'd':
    {
      double (*f)(DLSTACK_PROTO) = func;
      ret->d = f(DLSTACK_ARGS);
    }
    break;
  case 'S':
  case 's':
    {
      char * (*f)(DLSTACK_PROTO) = func;
      ret->s = f(DLSTACK_ARGS);
    }
    break;
  default:
    return 0;
  }
  return 1;
}
# ifdef __MSVC_RUNTIME_CHECKS
#  pragma runtime_checks("s", restore)
# endif
#endif /* defined(DLSTACK_GUARD) */

VALUE
rb_dlsym_call(int argc, VALUE argv[], VALUE self)
{
  struct sym_data *sym;
  ANY_TYPE *args;
  ANY_TYPE *dargs;
  ANY_TYPE ret;
  int   *dtypes;
  VALUE val;
  VALUE dvals;
  int i;
  long ftype;
  void *func;

  rb_secure_update(self);
  Data_Get_Struct(self, struct sym_data, sym);
  DEBUG_CODE({
    printf("rb_dlsym_call(): type = '%s', func = 0x%x\n", sym->type, sym->func);
  });
  if( (sym->len - 1) != argc ){
    rb_raise(rb_eArgError, "%d arguments are needed", sym->len - 1);
  }

  ftype = 0;
  dvals = Qnil;

  args = ALLOC_N(ANY_TYPE, sym->len - 1);
  dargs = ALLOC_N(ANY_TYPE, sym->len - 1);
  dtypes = ALLOC_N(int, sym->len - 1);
#define FREE_ARGS {xfree(args); xfree(dargs); xfree(dtypes);}

  for( i = sym->len - 2; i >= 0; i-- ){
    dtypes[i] = 0;

    switch( sym->type[i+1] ){
    case 'p':
      dtypes[i] = 'p';
    case 'P':
      {
        struct ptr_data *data;
        VALUE pval;

        if( argv[i] == Qnil ){
          ANY2P(args[i]) = DLVOIDP(0);
        }
        else{
          if( rb_obj_is_kind_of(argv[i], rb_cDLPtrData) ){
            pval = argv[i];
          }
          else{
            pval = rb_funcall(argv[i], rb_intern("to_ptr"), 0);
            if( !rb_obj_is_kind_of(pval, rb_cDLPtrData) ){
              rb_raise(rb_eDLTypeError, "unexpected type of argument #%d", i);
            }
          }
          Data_Get_Struct(pval, struct ptr_data, data);
          ANY2P(args[i]) = DLVOIDP(data->ptr);
        }
      }
      PUSH_P(ftype);
      break;
    case 'a':
      dtypes[i] = 'a';
    case 'A':
      if( argv[i] == Qnil ){
        ANY2P(args[i]) = DLVOIDP(0);
      }
      else{
        ANY2P(args[i]) = DLVOIDP(rb_ary2cary(0, argv[i], NULL));
      }
      PUSH_P(ftype);
      break;
    case 'C':
      ANY2C(args[i]) = DLCHAR(NUM2CHR(argv[i]));
      PUSH_C(ftype);
      break;
    case 'c':
      ANY2C(dargs[i]) = DLCHAR(NUM2CHR(argv[i]));
      ANY2P(args[i]) = DLVOIDP(&(ANY2C(dargs[i])));
      dtypes[i] = 'c';
      PUSH_P(ftype);
      break;
    case 'H':
      ANY2H(args[i]) = DLSHORT(NUM2INT(argv[i]));
      PUSH_C(ftype);
      break;
    case 'h':
      ANY2H(dargs[i]) = DLSHORT(NUM2INT(argv[i]));
      ANY2P(args[i]) = DLVOIDP(&(ANY2H(dargs[i])));
      dtypes[i] = 'h';
      PUSH_P(ftype);
      break;
    case 'I':
      ANY2I(args[i]) = DLINT(NUM2INT(argv[i]));
      PUSH_I(ftype);
      break;
    case 'i':
      ANY2I(dargs[i]) = DLINT(NUM2INT(argv[i]));
      ANY2P(args[i]) = DLVOIDP(&(ANY2I(dargs[i])));
      dtypes[i] = 'i';
      PUSH_P(ftype);
      break;
    case 'L':
      ANY2L(args[i]) = DLNUM2LONG(argv[i]);
      PUSH_L(ftype);
      break;
    case 'l':
      ANY2L(dargs[i]) = DLNUM2LONG(argv[i]);
      ANY2P(args[i]) = DLVOIDP(&(ANY2L(dargs[i])));
      dtypes[i] = 'l';
      PUSH_P(ftype);
      break;
    case 'F':
      Check_Type(argv[i], T_FLOAT);
      ANY2F(args[i]) = DLFLOAT(RFLOAT(argv[i])->value);
      PUSH_F(ftype);
      break;
    case 'f':
      Check_Type(argv[i], T_FLOAT);
      ANY2F(dargs[i]) = DLFLOAT(RFLOAT(argv[i])->value);
      ANY2P(args[i]) = DLVOIDP(&(ANY2F(dargs[i])));
      dtypes[i] = 'f';
      PUSH_P(ftype);
      break;
    case 'D':
      Check_Type(argv[i], T_FLOAT);
      ANY2D(args[i]) = RFLOAT(argv[i])->value;
      PUSH_D(ftype);
      break;
    case 'd':
      Check_Type(argv[i], T_FLOAT);
      ANY2D(dargs[i]) = RFLOAT(argv[i])->value;
      ANY2P(args[i]) = DLVOIDP(&(ANY2D(dargs[i])));
      dtypes[i] = 'd';
      PUSH_P(ftype);
      break;
    case 'S':
      if( argv[i] == Qnil ){
        ANY2S(args[i]) = DLSTR(0);
      }
      else{
        VALUE str = argv[i];
        SafeStringValue(str);
        ANY2S(args[i]) = DLSTR(RSTRING(str)->ptr);
      }
      PUSH_P(ftype);
      break;
    case 's':
      {
        VALUE str = argv[i];
        SafeStringValue(str);
        ANY2S(args[i]) = DLSTR(dlmalloc(RSTRING(str)->len + 1));
        memcpy((char*)(ANY2S(args[i])), RSTRING(str)->ptr, RSTRING(str)->len + 1);
        dtypes[i] = 's';
      }
      PUSH_P(ftype);
      break;
    default:
      FREE_ARGS;
      rb_raise(rb_eDLTypeError,
               "unknown type '%c' of the return value.",
               sym->type[i+1]);
    }
  }

  switch( sym->type[0] ){
  case '0':
    PUSH_0(ftype);
    break;
  case 'P':
  case 'p':
  case 'S':
  case 's':
  case 'A':
  case 'a':
    PUSH_P(ftype);
    break;
  case 'C':
  case 'c':
    PUSH_C(ftype);
    break;
  case 'H':
  case 'h':
    PUSH_H(ftype);
    break;
  case 'I':
  case 'i':
    PUSH_I(ftype);
    break;
  case 'L':
  case 'l':
    PUSH_L(ftype);
    break;
  case 'F':
  case 'f':
    PUSH_F(ftype);
    break;
  case 'D':
  case 'd':
    PUSH_D(ftype);
    break;
  default:
    FREE_ARGS;
    rb_raise(rb_eDLTypeError,
             "unknown type `%c' of the return value.",
             sym->type[0]);
  }

  func = sym->func;

#if defined(DLSTACK)
  {
#if defined(DLSTACK_SIZE)
  int  stk_size;
  long stack[DLSTACK_SIZE];
  long *sp;

  sp = stack;
  stk_size = stack_size(sym);
  if( stk_size < 0 ){
    FREE_ARGS;
    rb_raise(rb_eDLTypeError, "unknown type '%c'.", -stk_size);
  }
  else if( stk_size > (int)(DLSTACK_SIZE) ){
    FREE_ARGS;
    rb_raise(rb_eArgError, "too many arguments.");
  }
#endif

  DLSTACK_START(sym);

#if defined(DLSTACK_REVERSE)
  for( i = sym->len - 2; i >= 0; i-- )
#else
  for( i = 0; i <= sym->len -2; i++ )
#endif
  {
    switch( sym->type[i+1] ){
    case 'p':
    case 'P':
      DLSTACK_PUSH_P(ANY2P(args[i]));
      break;
    case 'a':
    case 'A':
      DLSTACK_PUSH_P(ANY2P(args[i]));
      break;
    case 'C':
      DLSTACK_PUSH_C(ANY2C(args[i]));
      break;
    case 'c':
      DLSTACK_PUSH_P(ANY2P(args[i]));
      break;
    case 'H':
      DLSTACK_PUSH_H(ANY2H(args[i]));
      break;
    case 'h':
      DLSTACK_PUSH_P(ANY2P(args[i]));
      break;
    case 'I':
      DLSTACK_PUSH_I(ANY2I(args[i]));
      break;
    case 'i':
      DLSTACK_PUSH_P(ANY2P(args[i]));
      break;
    case 'L':
      DLSTACK_PUSH_L(ANY2L(args[i]));
      break;
    case 'l':
      DLSTACK_PUSH_P(ANY2P(args[i]));
      break;
    case 'F':
      DLSTACK_PUSH_F(ANY2F(args[i]));
      break;
    case 'f':
      DLSTACK_PUSH_P(ANY2P(args[i]));
      break;
    case 'D':
      DLSTACK_PUSH_D(ANY2D(args[i]));
      break;
    case 'd':
      DLSTACK_PUSH_P(ANY2P(args[i]));
      break;
    case 'S':
    case 's':
      DLSTACK_PUSH_P(ANY2S(args[i]));
      break;
    }
  }
  DLSTACK_END(sym->type);

#ifdef DLSTACK_GUARD
  if(!rb_dlsym_guardcall(sym->type[0], &ret, stack, func)) {
    FREE_ARGS;
    rb_raise(rb_eDLTypeError, "unknown type `%c'", sym->type[0]);
  }
#else /* defined(DLSTACK_GUARD) */
  {
    switch( sym->type[0] ){
    case '0':
      {
        void (*f)(DLSTACK_PROTO) = func;
        f(DLSTACK_ARGS);
      }
      break;
    case 'P':
    case 'p':
      {
        void * (*f)(DLSTACK_PROTO) = func;
        ret.p = f(DLSTACK_ARGS);
      }
      break;
    case 'C':
    case 'c':
      {
        char (*f)(DLSTACK_PROTO) = func;
        ret.c = f(DLSTACK_ARGS);
      }
      break;
    case 'H':
    case 'h':
      {
        short (*f)(DLSTACK_PROTO) = func;
        ret.h = f(DLSTACK_ARGS);
      }
      break;
    case 'I':
    case 'i':
      {
        int (*f)(DLSTACK_PROTO) = func;
        ret.i = f(DLSTACK_ARGS);
      }
      break;
    case 'L':
    case 'l':
      {
        long (*f)(DLSTACK_PROTO) = func;
        ret.l = f(DLSTACK_ARGS);
      }
      break;
    case 'F':
    case 'f':
      {
        float (*f)(DLSTACK_PROTO) = func;
        ret.f = f(DLSTACK_ARGS);
      }
      break;
    case 'D':
    case 'd':
      {
        double (*f)(DLSTACK_PROTO) = func;
        ret.d = f(DLSTACK_ARGS);
      }
      break;
    case 'S':
    case 's':
      {
        char * (*f)(DLSTACK_PROTO) = func;
        ret.s = f(DLSTACK_ARGS);
      }
      break;
    default:
      FREE_ARGS;
      rb_raise(rb_eDLTypeError, "unknown type `%c'", sym->type[0]);
    }
  }
#endif /* defubed(DLSTACK_GUARD) */

  {
    /*
     * We should get the value of errno/GetLastError() before calling another functions.
     */
    int last_errno = errno;
#ifdef _WIN32
    DWORD win32_last_err = GetLastError();
#endif

    rb_thread_local_aset(rb_thread_current(), rb_dl_id_DLErrno, INT2NUM(last_errno));
#ifdef _WIN32
    rb_thread_local_aset(rb_thread_current(), rb_dl_id_DLW32Error, INT2NUM(win32_last_err));
#endif
  }

  }
#else /* defined(DLSTACK) */
  switch(ftype){
#include "call.func"
  default:
    FREE_ARGS;
    rb_raise(rb_eDLTypeError, "unsupported function type `%s'", sym->type);
  }
#endif /* defined(DLSTACK) */

  switch( sym->type[0] ){
  case '0':
    val = Qnil;
    break;
  case 'P':
    val = rb_dlptr_new((void*)(ANY2P(ret)), 0, 0);
    break;
  case 'p':
    val = rb_dlptr_new((void*)(ANY2P(ret)), 0, dlfree);
    break;
  case 'C':
  case 'c':
    val = CHR2FIX((char)(ANY2C(ret)));
    break;
  case 'H':
  case 'h':
    val = INT2NUM((short)(ANY2H(ret)));
    break;
  case 'I':
  case 'i':
    val = INT2NUM((int)(ANY2I(ret)));
    break;
  case 'L':
  case 'l':
    val = DLLONG2NUM((long)(ANY2L(ret)));
    break;
  case 'F':
  case 'f':
    val = rb_float_new((double)(ANY2F(ret)));
    break;
  case 'D':
  case 'd':
    val = rb_float_new((double)(ANY2D(ret)));
    break;
  case 'S':
    if( ANY2S(ret) ){
      val = rb_tainted_str_new2((char*)(ANY2S(ret)));
    }
    else{
      val = Qnil;
    }
    break;
  case 's':
    if( ANY2S(ret) ){
      val = rb_tainted_str_new2((char*)(ANY2S(ret)));
      DEBUG_CODE({
        printf("dlfree(%s)\n",(char*)(ANY2S(ret)));
      });
      dlfree((void*)(ANY2S(ret)));
    }
    else{
      val = Qnil;
    }
    break;
  default:
    FREE_ARGS;
    rb_raise(rb_eDLTypeError, "unknown type `%c'", sym->type[0]);
  }

  dvals = rb_ary_new();
  for( i = 0; i <= sym->len - 2; i++ ){
    if( dtypes[i] ){
      switch( dtypes[i] ){
      case 'c':
        rb_ary_push(dvals, CHR2FIX(*((char*)(ANY2P(args[i])))));
        break;
      case 'h':
        rb_ary_push(dvals, INT2NUM(*((short*)(ANY2P(args[i])))));
        break;
      case 'i':
        rb_ary_push(dvals, INT2NUM(*((int*)(ANY2P(args[i])))));
        break;
      case 'l':
        rb_ary_push(dvals, DLLONG2NUM(*((long*)(ANY2P(args[i])))));
        break;
      case 'f':
        rb_ary_push(dvals, rb_float_new(*((float*)(ANY2P(args[i])))));
        break;
      case 'd':
        rb_ary_push(dvals, rb_float_new(*((double*)(ANY2P(args[i])))));
        break;
      case 'p':
        rb_ary_push(dvals, rb_dlptr_new((void*)(ANY2P(args[i])), 0, 0));
        break;
      case 'a':
        rb_ary_push(dvals, rb_dlptr_new((void*)ANY2P(args[i]), 0, 0));
        break;
      case 's':
        rb_ary_push(dvals, rb_tainted_str_new2((char*)ANY2S(args[i])));
        DEBUG_CODE({
          printf("dlfree(%s)\n",(char*)ANY2S(args[i]));
        });
        dlfree((void*)ANY2S(args[i]));
        break;
      default:
        {
          char c = dtypes[i];
          FREE_ARGS;
          rb_raise(rb_eRuntimeError, "unknown argument type '%c'", i, c);
        }
      }
    }
    else{
      switch( sym->type[i+1] ){
      case 'A':
        dlfree((void*)ANY2P(args[i]));
        break;
      }
      rb_ary_push(dvals, argv[i]);
    }
  }

  FREE_ARGS;
#undef FREE_ARGS
  return rb_assoc_new(val,dvals);
}

VALUE
rb_dlsym_to_i(VALUE self)
{
  struct sym_data *sym;

  Data_Get_Struct(self, struct sym_data, sym);
  return DLLONG2NUM(sym);
}

VALUE
rb_dlsym_to_ptr(VALUE self)
{
  struct sym_data *sym;

  Data_Get_Struct(self, struct sym_data, sym);
  return rb_dlptr_new(sym->func, sizeof(freefunc_t), 0);
}

void
Init_dlsym()
{
  rb_cDLSymbol = rb_define_class_under(rb_mDL, "Symbol", rb_cObject);
  rb_define_alloc_func(rb_cDLSymbol, rb_dlsym_s_allocate);
  rb_define_singleton_method(rb_cDLSymbol, "char2type", rb_s_dlsym_char2type, 1);
  rb_define_method(rb_cDLSymbol, "initialize", rb_dlsym_initialize, -1);
  rb_define_method(rb_cDLSymbol, "call", rb_dlsym_call, -1);
  rb_define_method(rb_cDLSymbol, "[]",   rb_dlsym_call, -1);
  rb_define_method(rb_cDLSymbol, "name", rb_dlsym_name, 0);
  rb_define_method(rb_cDLSymbol, "proto", rb_dlsym_proto, 0);
  rb_define_method(rb_cDLSymbol, "cproto", rb_dlsym_cproto, 0);
  rb_define_method(rb_cDLSymbol, "inspect", rb_dlsym_inspect, 0);
  rb_define_method(rb_cDLSymbol, "to_s", rb_dlsym_cproto, 0);
  rb_define_method(rb_cDLSymbol, "to_ptr", rb_dlsym_to_ptr, 0);
  rb_define_method(rb_cDLSymbol, "to_i", rb_dlsym_to_i, 0);

  rb_dl_id_DLErrno = rb_intern("DLErrno");
  rb_define_singleton_method(rb_mDL, "last_error", rb_dl_get_last_error, 0);
  rb_define_singleton_method(rb_mDL, "last_error=", rb_dl_set_last_error, 1);
#ifdef _WIN32
  rb_dl_id_DLW32Error = rb_intern("DLW32Error");
  rb_define_singleton_method(rb_mDL, "win32_last_error", rb_dl_win32_get_last_error, 0);
  rb_define_singleton_method(rb_mDL, "win32_last_error=", rb_dl_win32_set_last_error, 1);
#endif
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/dl/sample/c++sample.C

root/ext/dl/sample/c++sample.C

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. Person
  2. get_name
  3. get_age
  4. set_age
#include <stdio.h>

class Person {
private:
  const char *name;
  int age;

public:
  Person(const char *name, int age);
  const char * get_name();
  int get_age();
  void set_age(int i);
};

Person::Person(const char *name, int age)
  : name(name), age(age)
{
  /* empty */
}

const char *
Person::get_name()
{
  return name;
}

int
Person::get_age(){
  return age;
}

void
Person::set_age(int i){
  age = i;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/dl/test/test.c

root/ext/dl/test/test.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. test_get_long_value
  2. test_set_long_value
  3. test_fill_test_struct
  4. test_fill_test_union
  5. test_alloc_test_struct
  6. test_c2i
  7. test_i2c
  8. test_lcc
  9. test_f2d
  10. test_d2f
  11. test_strlen
  12. test_isucc
  13. test_lsucc
  14. test_succ
  15. test_strcat
  16. test_arylen
  17. test_append
  18. test_init
  19. test_open
  20. test_close
  21. test_gets
  22. test_callback1
  23. test_call_func1
  24. test_data_init
  25. test_data_add
  26. test_data_aref
#include <stdio.h>
#include <string.h>

static char internal_string[] = "internal_string";
long internal_long_value = 100;

struct test_struct {
  char c;
  long l;
};

union test_union {
  char c;
  int  i;
  long l;
  void *p;
};

struct test_data {
  char name[1024];
  struct test_data *next;
};

long
test_get_long_value()
{
  return internal_long_value;
};

void
test_set_long_value(long l)
{
  internal_long_value = l;
};

void
test_fill_test_struct(struct test_struct *ptr, char c, long l)
{
  ptr->c = c;
  ptr->l = l;
};

void
test_fill_test_union(union test_union *ptr, long l)
{
  ptr->l = l;
};

struct test_struct *
test_alloc_test_struct(char c, long l)
{
  struct test_struct *data;

  data = (struct test_struct *)malloc(sizeof(struct test_struct));
  data->c = c;
  data->l = l;

  return data;
};

int
test_c2i(char c)
{
  return (int)c;
};

char
test_i2c(int i)
{
  return (char)i;
};

long
test_lcc(char c1, char c2)
{
  return (long)(c1 + c2);
};

double
test_f2d(float f)
{
  double d;
  d = f;
  return d;
};

float
test_d2f(double d)
{
  float f;
  f = d;
  return f;
};

int
test_strlen(const char *str)
{
  return strlen(str);
};

int
test_isucc(int i)
{
  return (i+1);
};

long
test_lsucc(long l)
{
  return (l+1);
};

void
test_succ(long *l)
{
  (*l)++;
};

char *
test_strcat(char *str1, const char *str2)
{
  return strcat(str1, str2);
};

int
test_arylen(char *ary[])
{
  int i;
  for( i=0; ary[i]; i++ ){};
  return i;
};

void
test_append(char *ary[], int len, char *astr)
{
  int i;
  int size1,size2;
  char *str;

  size2 = strlen(astr);

  for( i=0; i <= len - 1; i++ ){
    size1 = strlen(ary[i]);
    str = (char*)malloc(size1 + size2 + 1);
    strcpy(str, ary[i]);
    strcat(str, astr);
    ary[i] = str;
  };
};

int
test_init(int *argc, char **argv[])
{
  int i;
  char s[256];

  for( i=0; i < (*argc); i++ ){
    sprintf(s, "arg%d", i);
    if( strcmp((*argv)[i], s) != 0 ){
      return 1;
    }
  }
  return 0;
}

FILE *
test_open(const char *filename, const char *mode)
{
  FILE *file;
  file = fopen(filename,mode);
  return file;
};

void
test_close(FILE *file)
{
  fclose(file);
};

char *
test_gets(char *s, int size, FILE *f)
{
  return fgets(s,size,f);
};

typedef int callback1_t(int, char *);
#define CALLBACK_MSG "callback message"

int
test_callback1(int err, const char *msg)
{
  if( strcmp(msg, CALLBACK_MSG) == 0 ){
    return 1;
  }
  else{
    return 0;
  }
}

int
test_call_func1(callback1_t *func)
{
  if( func ){
    return (*func)(0, CALLBACK_MSG);
  }
  else{
    return 0;
  }
}

struct test_data *
test_data_init()
{
  struct test_data *data;

  data = (struct test_data *)malloc(sizeof(struct test_data));
  data->next = NULL;
  memset(data->name, 0, 1024);

  return data;
};

void
test_data_add(struct test_data *list, const char *name)
{
  struct test_data *data;

  data = (struct test_data *)malloc(sizeof(struct test_data));
  memset(data->name, 0, 1024);
  strncpy(data->name, name, 1024);
  data->next = list->next;
  list->next = data;
};

struct test_data *
test_data_aref(struct test_data *list, int i)
{
  struct test_data *data;
  int j;

  for( data = list->next, j=0; data; data = data->next, j++ ){
    if( i == j ){
      return data;
    };
  };
  return NULL;
};
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/enumerator/enumerator.c

root/ext/enumerator/enumerator.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. obj_to_enum
  2. enumerator_enum_with_index
  3. each_slice_i
  4. enum_each_slice
  5. enumerator_enum_slice
  6. each_cons_i
  7. enum_each_cons
  8. enumerator_enum_cons
  9. enumerator_initialize
  10. enumerator_iter
  11. enumerator_each
  12. Init_enumerator
/************************************************

  enumerator.c - provides Enumerator class

  $Author: matz $

  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.3.2.3 2005/10/24 00:07:00 matz Exp $

************************************************/

#include "ruby.h"
#include "node.h"

/*
 * Document-class: Enumerable::Enumerator
 *
 * A class which provides a method `each' to be used as an Enumerable
 * object.
 */
static VALUE rb_cEnumerator;
static ID sym_each, sym_each_with_index, sym_each_slice, sym_each_cons;
static ID id_new, id_enum_obj, id_enum_method, id_enum_args;

/*
 *  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(obj, enum_args)
    VALUE obj, enum_args;
{
    rb_ary_unshift(enum_args, obj);

    return rb_apply(rb_cEnumerator, id_new, enum_args);
}

/*
 *  call-seq:
 *    enum_with_index
 *
 *  Returns Enumerable::Enumerator.new(self, :each_with_index).
 *
 */
static VALUE
enumerator_enum_with_index(obj)
    VALUE obj;
{
    return rb_funcall(rb_cEnumerator, id_new, 2, obj, sym_each_with_index);
}

static VALUE
each_slice_i(val, memo)
    VALUE val;
    NODE *memo;
{
    VALUE ary = memo->u1.value;
    long size = memo->u3.cnt;

    rb_ary_push(ary, val);

    if (RARRAY(ary)->len == size) {
        rb_yield(ary);
        memo->u1.value = 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(obj, n)
    VALUE obj, n;
{
    long size = NUM2LONG(n);
    NODE *memo;
    VALUE ary;

    if (size <= 0) rb_raise(rb_eArgError, "invalid slice size");

    memo = rb_node_newnode(NODE_MEMO, rb_ary_new2(size), 0, size);

    rb_iterate(rb_each, obj, each_slice_i, (VALUE)memo);

    ary = memo->u1.value;
    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(obj, n)
    VALUE obj, n;
{
    return rb_funcall(rb_cEnumerator, id_new, 3, obj, sym_each_slice, n);
}

static VALUE
each_cons_i(val, memo)
    VALUE val;
    NODE *memo;
{
    VALUE ary = memo->u1.value;
    long size = memo->u3.cnt;

    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(obj, n)
    VALUE obj, n;
{
    long size = NUM2LONG(n);
    NODE *memo;

    if (size <= 0) rb_raise(rb_eArgError, "invalid size");
    memo = rb_node_newnode(NODE_MEMO, rb_ary_new2(size), 0, size);

    rb_iterate(rb_each, obj, each_cons_i, (VALUE)memo);

    return Qnil;
}

/*
 *  call-seq:
 *    e.enum_cons(n)
 *
 *  Returns Enumerable::Enumerator.new(self, :each_cons, n).
 *
 */
static VALUE
enumerator_enum_cons(obj, n)
    VALUE obj, n;
{
    return rb_funcall(rb_cEnumerator, id_new, 3, obj, sym_each_cons, n);
}

/*
 *  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(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    VALUE enum_obj, enum_method, enum_args;

    rb_scan_args(argc, argv, "11*", &enum_obj, &enum_method, &enum_args);

    if (enum_method == Qnil)
        enum_method = sym_each;

    rb_ivar_set(obj, id_enum_obj, enum_obj);
    rb_ivar_set(obj, id_enum_method, enum_method);
    rb_ivar_set(obj, id_enum_args, enum_args);

    return Qnil;
}

static VALUE
enumerator_iter(memo)
    NODE *memo;
{
    return rb_apply(memo->u1.value, memo->u2.id, memo->u3.value);
}

/*
 *  call-seq:
 *    enum.each {...}
 *
 *  Iterates the given block using the object and the method specified
 *  in the first place.
 *
 */
static VALUE
enumerator_each(obj)
    VALUE obj;
{
    VALUE val;

    obj = (VALUE)rb_node_newnode(NODE_MEMO,
                                 rb_ivar_get(obj, id_enum_obj),
                                 rb_to_id(rb_ivar_get(obj, id_enum_method)),
                                 rb_ivar_get(obj, id_enum_args));
    val = rb_iterate((VALUE (*)_((VALUE)))enumerator_iter, obj, rb_yield, 0);
    return val;
}

void
Init_enumerator()
{
    VALUE rb_mEnumerable;

    rb_define_method(rb_mKernel, "to_enum", obj_to_enum, -2);
    rb_define_method(rb_mKernel, "enum_for", obj_to_enum, -2);

    rb_mEnumerable = rb_path2class("Enumerable");

    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_method(rb_cEnumerator, "initialize", enumerator_initialize, -1);
    rb_define_method(rb_cEnumerator, "each", enumerator_each, 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"));

    id_new              = rb_intern("new");
    id_enum_obj         = rb_intern("enum_obj");
    id_enum_method      = rb_intern("enum_method");
    id_enum_args        = rb_intern("enum_args");
}
/* [<][>][^] [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:36:51 $
  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_indexes
  19. fgdbm_select
  20. fgdbm_values_at
  21. rb_gdbm_modify
  22. rb_gdbm_delete
  23. fgdbm_delete
  24. fgdbm_shift
  25. fgdbm_delete_if
  26. fgdbm_clear
  27. fgdbm_invert
  28. each_pair
  29. update_i
  30. fgdbm_update
  31. fgdbm_replace
  32. fgdbm_store
  33. fgdbm_length
  34. fgdbm_empty_p
  35. fgdbm_each_value
  36. fgdbm_each_key
  37. fgdbm_each_pair
  38. fgdbm_keys
  39. fgdbm_values
  40. fgdbm_has_key
  41. fgdbm_has_value
  42. fgdbm_to_a
  43. fgdbm_reorganize
  44. fgdbm_sync
  45. fgdbm_set_cachesize
  46. fgdbm_set_fastmode
  47. fgdbm_set_syncmode
  48. fgdbm_to_hash
  49. fgdbm_reject
  50. Init_gdbm
/************************************************

  gdbm.c -

  $Author: usa $
  $Date: 2005/06/20 07:53:20 $
  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_indexes(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    VALUE new;
    int i;

    new = rb_ary_new2(argc);
    for (i=0; i<argc; i++) {
        rb_ary_push(new, rb_gdbm_fetch3(obj, argv[i]));
    }

    return new;
}

static VALUE
fgdbm_select(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    VALUE new = rb_ary_new2(argc);
    int i;

    if (rb_block_given_p()) {
        GDBM_FILE dbm;
        struct dbmdata *dbmp;
        VALUE keystr;

        if (argc > 0) {
            rb_raise(rb_eArgError, "wrong number arguments(%d for 0)", argc);
        }
        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);
        }
    }
    else {
        rb_warn("GDBM#select(index..) is deprecated; use GDBM#values_at");

        for (i=0; i<argc; i++) {
            rb_ary_push(new, rb_gdbm_fetch3(obj, argv[i]));
        }
    }

    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, "indexes",  fgdbm_indexes, -1);
    rb_define_method(rb_cGDBM, "indices",  fgdbm_indexes, -1);
    rb_define_method(rb_cGDBM, "select",  fgdbm_select, -1);
    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. _
  2. _
/* -*- mode:c; c-file-style:"ruby" -*- */
/**********************************************************************

  iconv.c -

  $Author: matz $
  $Date: 2005/12/12 00:36:51 $
  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));
};

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));
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 _((VALUE self, VALUE to, VALUE from));
static VALUE iconv_s_open _((VALUE self, VALUE to, VALUE from));
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 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
#ifdef HAVE_PROTOTYPES
    (VALUE *code)
#else /* HAVE_PROTOTYPES */
    (code)
    VALUE *code;
#endif /* HAVE_PROTOTYPES */
{
    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
#ifdef HAVE_PROTOTYPES
    (VALUE to, VALUE from)
#else /* HAVE_PROTOTYPES */
    (to, from)
    VALUE to;
    VALUE from;
#endif /* HAVE_PROTOTYPES */
{
    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);
        }
    }

    return cd;
}

static void
iconv_dfree
#ifdef HAVE_PROTOTYPES
    (void *cd)
#else /* HAVE_PROTOTYPES */
    (cd)
    void *cd;
#endif /* HAVE_PROTOTYPES */
{
    iconv_close(VALUE2ICONV(cd));
}

#define ICONV_FREE iconv_dfree

static VALUE
iconv_free
#ifdef HAVE_PROTOTYPES
    (VALUE cd)
#else /* HAVE_PROTOTYPES */
    (cd)
    VALUE cd;
#endif /* HAVE_PROTOTYPES */
{
    if (cd && iconv_close(VALUE2ICONV(cd)) == -1)
        rb_sys_fail("iconv_close");
    return Qnil;
}

static VALUE
check_iconv
#ifdef HAVE_PROTOTYPES
    (VALUE obj)
#else /* HAVE_PROTOTYPES */
    (obj)
    VALUE obj;
#endif /* HAVE_PROTOTYPES */
{
    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
#ifdef HAVE_PROTOTYPES
    (iconv_t cd, const char **inptr, size_t *inlen, char **outptr, size_t *outlen)
#else /* HAVE_PROTOTYPES */
    (cd, inptr, inlen, outptr, outlen)
    iconv_t cd;
    const char **inptr;
    size_t *inlen;
    char **outptr;
    size_t *outlen;
#endif /* HAVE_PROTOTYPES */
{
#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
#ifdef HAVE_PROTOTYPES
    (VALUE error, VALUE mesg, VALUE success, VALUE failed)
#else /* HAVE_PROTOTYPES */
    (error, mesg, success, failed)
    VALUE error, mesg, success, failed;
#endif /* HAVE_PROTOTYPES */
{
    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
#ifdef HAVE_PROTOTYPES
    (VALUE error, VALUE success, VALUE failed, struct iconv_env_t* env, const char *mesg)
#else /* HAVE_PROTOTYPES */
    (error, success, failed, env, mesg)
    VALUE error, success, failed;
    struct iconv_env_t *env;
    const char *mesg;
#endif /* HAVE_PROTOTYPES */
{
    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
#ifdef HAVE_PROTOTYPES
    (VALUE str, const char* ptr, int len)
#else /* HAVE_PROTOTYPES */
    (str, ptr, len)
    VALUE str;
    const char *ptr;
    int len;
#endif /* HAVE_PROTOTYPES */
{
    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
#ifdef HAVE_PROTOTYPES
    (iconv_t cd, VALUE str, int start, int length, struct iconv_env_t* env)
#else /* HAVE_PROTOTYPES */
    (cd, str, start, length, env)
    iconv_t cd;
    VALUE str;
    int start;
    int length;
    struct iconv_env_t *env;
#endif /* HAVE_PROTOTYPES */
{
    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
#ifdef HAVE_PROTOTYPES
    (VALUE klass)
#else /* HAVE_PROTOTYPES */
    (klass)
    VALUE klass;
#endif /* HAVE_PROTOTYPES */
{
    return Data_Wrap_Struct(klass, 0, ICONV_FREE, 0);
}

/*
 * Document-method: new
 * call-seq: Iconv.new(to, from)
 *
 * 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
 *
 * === 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
#ifdef HAVE_PROTOTYPES
    (VALUE self, VALUE to, VALUE from)
#else /* HAVE_PROTOTYPES */
    (self, to, from)
    VALUE self;
    VALUE to;
    VALUE from;
#endif /* HAVE_PROTOTYPES */
{
    iconv_free(check_iconv(self));
    DATA_PTR(self) = NULL;
    DATA_PTR(self) = (void *)ICONV2VALUE(iconv_create(to, from));
    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
#ifdef HAVE_PROTOTYPES
    (VALUE self, VALUE to, VALUE from)
#else /* HAVE_PROTOTYPES */
    (self, to, from)
    VALUE self;
    VALUE to;
    VALUE from;
#endif /* HAVE_PROTOTYPES */
{
    VALUE cd = ICONV2VALUE(iconv_create(to, from));

    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
#ifdef HAVE_PROTOTYPES
    (struct iconv_env_t* env)
#else /* HAVE_PROTOTYPES */
    (env)
    struct iconv_env_t *env;
#endif /* HAVE_PROTOTYPES */
{
    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
#ifdef HAVE_PROTOTYPES
    (int argc, VALUE *argv, VALUE self)
#else /* HAVE_PROTOTYPES */
    (argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
#endif /* HAVE_PROTOTYPES */
{
    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]);
    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
#ifdef HAVE_PROTOTYPES
    (VALUE self, VALUE to, VALUE from, VALUE str)
#else /* HAVE_PROTOTYPES */
    (self, to, from, str)
    VALUE self, to, from, str;
#endif /* HAVE_PROTOTYPES */
{
    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);
    return rb_ensure(iconv_s_convert, (VALUE)&arg, iconv_free, ICONV2VALUE(arg.cd));
}

/*
 * 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
#ifdef HAVE_PROTOTYPES
    (VALUE cd)
#else /* HAVE_PROTOTYPES */
    (cd)
    VALUE cd;
#endif /* HAVE_PROTOTYPES */
{
    return iconv_convert(VALUE2ICONV(cd), Qnil, 0, 0, NULL);
}

static VALUE
iconv_finish
#ifdef HAVE_PROTOTYPES
    (VALUE self)
#else /* HAVE_PROTOTYPES */
    (self)
    VALUE self;
#endif /* HAVE_PROTOTYPES */
{
    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
#ifdef HAVE_PROTOTYPES
    (int argc, VALUE *argv, VALUE self)
#else /* HAVE_PROTOTYPES */
    (argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
#endif /* HAVE_PROTOTYPES */
{
    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-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
#ifdef HAVE_PROTOTYPES
(VALUE self)
#else /* HAVE_PROTOTYPES */
    (self)
    VALUE self;
#endif /* HAVE_PROTOTYPES */
{
    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
#ifdef HAVE_PROTOTYPES
(VALUE self)
#else /* HAVE_PROTOTYPES */
    (self)
    VALUE self;
#endif /* HAVE_PROTOTYPES */
{
    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
#ifdef HAVE_PROTOTYPES
    (VALUE self)
#else /* HAVE_PROTOTYPES */
    (self)
    VALUE self;
#endif /* HAVE_PROTOTYPES */
{
    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, 2);
    rb_define_singleton_method(rb_cIconv, "iconv", iconv_s_iconv, -1);
    rb_define_singleton_method(rb_cIconv, "conv", iconv_s_conv, 3);
    rb_define_method(rb_cIconv, "initialize", iconv_initialize, 2);
    rb_define_method(rb_cIconv, "close", iconv_finish, 0);
    rb_define_method(rb_cIconv, "iconv", iconv_iconv, -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");

    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. io_wait
  3. Init_wait
/**********************************************************************

  io/wait.c -

  $Author: nobu $
  $Date: 2005/07/18 03:24:04 $
  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;
    FILE *fp;
    ioctl_arg n;

    GetOpenFile(io, fptr);
    rb_io_check_readable(fptr);
    if (!FIONREAD_POSSIBLE_P(fileno(fptr->f))) return Qfalse;
    fp = fptr->f;
    if (feof(fp)) return Qfalse;
    if (rb_read_pending(fp)) return Qtrue;
    if (ioctl(fileno(fp), FIONREAD, &n)) rb_sys_fail(0);
    if (n > 0) return ioctl_arg2num(n);
    return Qnil;
}

/*
=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;
    fd_set rd;
    FILE *fp;
    int fd;
    ioctl_arg n;
    VALUE timeout;
    struct timeval *tp, timerec;

    GetOpenFile(io, fptr);
    rb_io_check_readable(fptr);
    rb_scan_args(argc, argv, "01", &timeout);
    if (NIL_P(timeout)) {
        tp = 0;
    }
    else {
        timerec = rb_time_interval(timeout);
        tp = &timerec;
    }

    fp = fptr->f;
    if (feof(fp)) return Qfalse;
    if (rb_read_pending(fp)) return Qtrue;
    fd = fileno(fp);
    FD_ZERO(&rd);
    FD_SET(fd, &rd);
    if (rb_thread_select(fd + 1, &rd, NULL, NULL, tp) < 0)
        rb_sys_fail(0);
    rb_io_check_closed(fptr);
    if (!FIONREAD_POSSIBLE_P(fileno(fptr->f))) return Qfalse;
    if (ioctl(fileno(fp), 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.9.2.2 2004/12/03 17:59:23 naruse Exp $
 *
 */

#define RUBY_NKF_REVISION "$Revision: 1.9.2.2 $"
#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

/* --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 */

/******************************/
/* $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 */
/******************************/

#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. mime_getc
  74. mime_ungetc
  75. mime_integrity
  76. base64decode
  77. open_mime
  78. close_mime
  79. eof_mime
  80. mimeout_addchar
  81. mime_prechar
  82. mime_putc
  83. reinit
  84. no_connection
  85. no_connection2
  86. usage
  87. 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.2.2.8 2005/05/12 07:39:34 naruse Exp $ */
#define NKF_VERSION "2.0.5"
#define NKF_RELEASE_DATE "2005-04-10"
#include "config.h"

static char *CopyRight =
      "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>

#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 <string.h>
#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
#else
#define PROTO(x)  ()
#define STATIC
#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 = "";

STATIC  int     noconvert PROTO((FILE *f));
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,unsigned short **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,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(());
STATIC  void    usage PROTO(());
STATIC  void    version PROTO(());
STATIC  void    options PROTO((unsigned char *c));
#if defined(PERL_XS) || defined(WIN32DLL)
STATIC  void    reinit PROTO(());
#endif

/* buffers */

static unsigned char   stdibuf[IOBUF_SIZE];
static unsigned char   stdobuf[IOBUF_SIZE];
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 */

/* 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 */
#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 NUMCHAR_OPTION

#define CLASS_MASK  0x0f000000
#define CLASS_UTF16 0x01000000
#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));

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((char *str));
#endif

static int guess_f = FALSE;
STATIC  void    print_guessed_code PROTO((char *filename));
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},
    {"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},
    {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
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
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
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
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 = "";
          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
struct {
    char *name;
    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
#ifdef UTF8_OUTPUT_ENABLE
    {"utf8", "w"},
    {"utf16", "w16"},
    {"ms-ucs-map", ""},
#endif
#ifdef UTF8_INPUT_ENABLE
    {"utf8-input", "W"},
    {"utf16-input", "W16"},
#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;
    if (*cp++ != '-')
        return;
    while (*cp) {
        if (p && !*cp) {
            cp = p;
            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]){
                    p = &cp[j];
                    break;
                }
                p = 0;
            }
            if (p == 0) return;
            cp = (unsigned char *)long_option[i].alias;
            if (!*cp){
#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
#ifdef UTF8_OUTPUT_ENABLE
                if (strcmp(long_option[i].name, "ms-ucs-map") == 0){
                    ms_ucs_map_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   hira -> kata
                bit:2   kata -> hira
            */
            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!='-') cp++;
            if(*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 CHECK_OPTION
static int (*iconv_for_check)() = 0;
#endif

#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)

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,
};

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];
    int c1 = ptr->buf[1];
    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*/

int
noconvert(f)
    FILE  *f;
{
    int    c;

    while ((c = (*i_getc)(f)) != EOF)
      (*o_putc)(c);
    return 1;
}

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
    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");
                        debug(input_codename);
                        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;
{
    int val;
#ifdef SHIFTJIS_CP932
    if (cp932_f && CP932_TABLE_BEGIN <= c2 && c2 <= CP932_TABLE_END){
        extern 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 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 unsigned short * utf8_to_euc_2bytes[];
    extern unsigned short ** utf8_to_euc_3bytes[];
    int ret = 0;

    if (0xc0 <= c2 && c2 <= 0xef) {
        unsigned short **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 = 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 unsigned short * utf8_to_euc_2bytes[];
    extern unsigned short ** utf8_to_euc_3bytes[];
    int c2, c1, c0;
    unsigned short **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;

    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;
    }
    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;
    unsigned short **pp;
    int psize;
    int *p2, *p1;
{
    int c2;
    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 unsigned short euc_to_utf8_1byte[];
    extern unsigned short * euc_to_utf8_2bytes[];
    extern unsigned short * euc_to_utf8_2bytes_ms[];
    unsigned short *p;

    if (c2 == X0201) {
        p = euc_to_utf8_1byte;
#ifdef X0212_ENABLE
    } else if (c2 >> 8 == 0x8f){
        extern unsigned short * 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;
    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 {
        unsigned short val;
        output_mode = UTF8;
        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 (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;
{
    int val = 0;
    unsigned short *ptr;
    int ndx;
    extern unsigned short *x0212_shiftjis[];
#ifdef X0212_ENABLE
    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 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 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?= */

unsigned char *mime_pattern[] = {
   (unsigned char *)"\075?EUC-JP?B?",
   (unsigned char *)"\075?SHIFT_JIS?B?",
   (unsigned char *)"\075?ISO-8859-1?Q?",
   (unsigned char *)"\075?ISO-8859-1?B?",
   (unsigned char *)"\075?ISO-2022-JP?B?",
   (unsigned char *)"\075?ISO-2022-JP?Q?",
#if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
   (unsigned char *)"\075?UTF-8?B?",
   (unsigned char *)"\075?UTF-8?Q?",
#endif
   (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,
};

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
};

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;
}

int
mime_begin_strict(f)
FILE *f;
{
    int c1 = 0;
    int i,j,k;
    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];

    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)
     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;
}

#ifndef 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

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!='=' && c1!='?') {
            return c1;
        }

        mime_decode_mode = exit_mode; /* prepare for quit */
        if (c1<=' ') return c1;
        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;
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 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;
{
    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;
#ifdef UTF8_OUTPUT_ENABLE
    unicode_bom_f = 0;
    w_oconv16_LE = 0;
    ms_ucs_map_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-8\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-8\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-8\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-8 (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 hirakana->katakana, 2 katakana->hirakana,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");
#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 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
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 */
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,
};

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 */
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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, 0xFFE4, 0xFF07, 0xFF02,
};
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,
};
unsigned short * 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 */
unsigned short * 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,              0,              0,
};
#endif /* UTF8_OUTPUT_ENABLE */

#ifdef UTF8_INPUT_ENABLE
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,      0, 0x2171, 0x2172,      0,      0,      0, 0x2178,
 0x212F, 0x0E7D,      0,      0, 0x224C,      0,      0,      0,
 0x216B, 0x215E,      0,      0, 0x212D,      0, 0x2279,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_C3[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x215F,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x2160,
      0,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_CE[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 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,      0,      0,      0,      0,      0,      0,
      0, 0x2641, 0x2642, 0x2643, 0x2644, 0x2645, 0x2646, 0x2647,
 0x2648, 0x2649, 0x264A, 0x264B, 0x264C, 0x264D, 0x264E, 0x264F,
};
unsigned short utf8_to_euc_CF[] = {
 0x2650, 0x2651,      0, 0x2652, 0x2653, 0x2654, 0x2655, 0x2656,
 0x2657, 0x2658,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_D0[] = {
      0, 0x2727,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 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,
};
unsigned short utf8_to_euc_D1[] = {
 0x2762, 0x2763, 0x2764, 0x2765, 0x2766, 0x2767, 0x2768, 0x2769,
 0x276A, 0x276B, 0x276C, 0x276D, 0x276E, 0x276F, 0x2770, 0x2771,
      0, 0x2757,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
unsigned short utf8_to_euc_E4B8[] = {
 0x306C, 0x437A,      0, 0x3C37,      0,      0,      0, 0x4B7C,
 0x3E66, 0x3B30, 0x3E65, 0x323C,      0, 0x4954, 0x4D3F,      0,
 0x5022, 0x312F,      0,      0, 0x336E, 0x5023, 0x4024, 0x5242,
 0x3556, 0x4A3A,      0,      0,      0,      0, 0x3E67,      0,
      0, 0x4E3E,      0,      0,      0,      0, 0x4A42,      0,
 0x792D,      0, 0x5024,      0,      0, 0x4366,      0,      0,
      0, 0x5025, 0x367A,      0,      0,      0, 0x5026,      0,
 0x345D, 0x4330,      0, 0x3C67, 0x5027,      0,      0, 0x5028,
};
unsigned short utf8_to_euc_E4B9[] = {
      0,      0, 0x5029, 0x4735,      0, 0x3557,      0,      0,
      0,      0,      0, 0x4737,      0, 0x4663, 0x3843, 0x4B33,
      0,      0,      0,      0,      0, 0x6949, 0x502A, 0x3E68,
 0x502B, 0x3235,      0,      0,      0, 0x3665, 0x3870, 0x4C69,
      0,      0, 0x5626,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x4D70,      0, 0x467D,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x3425,      0,
};
unsigned short utf8_to_euc_E4BA[] = {
 0x3535,      0, 0x502C,      0,      0, 0x502D, 0x4E3B,      0,
 0x4D3D, 0x4168, 0x502F, 0x3B76, 0x4673,      0, 0x5032,      0,
      0, 0x313E, 0x385F,      0, 0x385E, 0x3066,      0,      0,
 0x4F4B, 0x4F4A,      0, 0x3A33, 0x3021,      0, 0x5033, 0x5034,
 0x5035, 0x4B34, 0x5036,      0, 0x3872, 0x3067, 0x4B72,      0,
 0x357C,      0,      0, 0x357D, 0x357E, 0x4462, 0x4E3C,      0,
 0x5037,      0,      0, 0x5038,      0,      0, 0x5039,      0,
      0,      0, 0x3F4D,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E4BB[] = {
 0x3D3A, 0x3F4E, 0x503E,      0, 0x503C,      0, 0x503D, 0x3558,
      0,      0, 0x3A23, 0x3270,      0, 0x503B, 0x503A, 0x4A29,
      0,      0,      0,      0, 0x3B46, 0x3B45, 0x423E, 0x503F,
 0x4955, 0x4067,      0,      0,      0, 0x2138, 0x5040, 0x5042,
      0, 0x792E,      0, 0x4265, 0x4E61, 0x304A,      0,      0,
      0,      0,      0,      0,      0, 0x5041, 0x323E,      0,
 0x3644,      0, 0x4367,      0,      0,      0, 0x376F, 0x5043,
      0,      0,      0, 0x4724, 0x792F,      0,      0,      0,
};
unsigned short utf8_to_euc_E4BC[] = {
 0x7930, 0x346B,      0, 0x7931,      0,      0,      0,      0,
      0, 0x5044, 0x304B,      0,      0, 0x3860, 0x346C, 0x497A,
 0x4832, 0x3559,      0,      0,      0,      0,      0,      0,
      0,      0, 0x3271,      0, 0x5067, 0x4541,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x476C,
 0x5046,      0,      0,      0, 0x483C,      0, 0x4E62,      0,
 0x3F2D, 0x7932, 0x3B47,      0, 0x3B77, 0x3240,      0,      0,
};
unsigned short utf8_to_euc_E4BD[] = {
      0,      0,      0, 0x4451,      0,      0, 0x4322, 0x504A,
      0,      0,      0,      0,      0, 0x304C, 0x4463, 0x3D3B,
 0x3A34, 0x4D24,      0, 0x424E,      0, 0x323F, 0x7933, 0x5049,
      0, 0x4D3E, 0x5045, 0x5047, 0x3A6E, 0x5048, 0x5524,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x5050,      0,      0,      0,      0,      0, 0x5053,
 0x5051,      0,      0, 0x3242,      0, 0x4A3B, 0x504B,      0,
      0,      0,      0, 0x504F, 0x3873,      0,      0, 0x3B48,
};
unsigned short utf8_to_euc_E4BE[] = {
      0,      0,      0, 0x3426,      0,      0, 0x5054,      0,
 0x504C,      0, 0x7935, 0x4E63,      0, 0x3B78,      0, 0x504D,
      0, 0x5052, 0x7934,      0, 0x7937,      0, 0x5055,      0,
 0x504E,      0, 0x7936, 0x3621,      0, 0x304D,      0,      0,
 0x3622, 0x3241,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x5525,      0, 0x4B79, 0x496E, 0x3874,
      0,      0,      0,      0,      0, 0x3F2F, 0x4E37,      0,
      0,      0,      0,      0,      0,      0,      0, 0x4A58,
};
unsigned short utf8_to_euc_E4BF[] = {
      0,      0, 0x3738, 0x4225, 0x3264,      0,      0,      0,
      0, 0x7926, 0x3D53,      0,      0, 0x7938, 0x5059,      0,
 0x505E, 0x505C,      0,      0, 0x5057,      0,      0, 0x422F,
 0x505A,      0, 0x505D, 0x505B,      0, 0x4A5D,      0, 0x5058,
      0, 0x3F2E,      0, 0x4B73, 0x505F, 0x5060,      0,      0,
      0,      0,      0,      0,      0,      0, 0x3D24, 0x506D,
      0,      0,      0, 0x4750,      0, 0x4936, 0x5068,      0,
 0x4A70,      0, 0x3236,      0,      0,      0, 0x506C, 0x793B,
};
unsigned short utf8_to_euc_E580[] = {
      0,      0,      0,      0,      0, 0x5066, 0x506F,      0,
      0, 0x4152,      0, 0x3844,      0, 0x475C,      0, 0x6047,
      0, 0x506E, 0x455D,      0, 0x5063,      0, 0x3876,      0,
      0, 0x3875, 0x5061,      0,      0,      0, 0x793C, 0x3C5A,
      0, 0x5069, 0x793A, 0x4A6F, 0x434D, 0x5065, 0x3771,      0,
 0x5062, 0x506A, 0x5064, 0x4E51, 0x506B, 0x4F41,      0,      0,
      0,      0,      0,      0,      0,      0, 0x3666,      0,
      0, 0x3770,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E581[] = {
 0x7939,      0, 0x793F, 0x5070,      0,      0, 0x793D, 0x5071,
 0x5075, 0x304E,      0,      0,      0,      0,      0, 0x4A50,
 0x5074,      0,      0,      0,      0, 0x5073, 0x5077,      0,
      0,      0, 0x5076,      0, 0x4464,      0,      0,      0,
      0,      0,      0,      0,      0, 0x3772,      0,      0,
      0,      0,      0,      0, 0x5078,      0,      0,      0,
 0x793E,      0, 0x3C45,      0, 0x4226, 0x4465, 0x3676,      0,
 0x5079,      0,      0,      0,      0, 0x3536,      0,      0,
};
unsigned short utf8_to_euc_E582[] = {
 0x507A,      0,      0,      0,      0, 0x507C,      0,      0,
      0,      0,      0,      0,      0, 0x4B35,      0,      0,
      0, 0x3766,      0,      0, 0x7940,      0,      0,      0,
 0x3B31, 0x4877, 0x507B,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x3A45, 0x4D43,      0,      0,
      0,      0, 0x507E, 0x5123, 0x507D, 0x3A44,      0, 0x3D7D,
      0,      0,      0,      0,      0,      0, 0x3739,      0,
};
unsigned short utf8_to_euc_E583[] = {
      0,      0, 0x5124,      0,      0, 0x364F,      0,      0,
      0, 0x5121, 0x5122,      0,      0, 0x462F,      0, 0x417C,
      0, 0x3623,      0,      0,      0, 0x4B4D, 0x5125,      0,
 0x7942,      0, 0x4E3D,      0,      0,      0, 0x5126,      0,
      0,      0,      0, 0x5129,      0, 0x5127,      0, 0x414E,
      0,      0,      0,      0,      0, 0x5128, 0x512A,      0,
      0,      0,      0,      0, 0x7941, 0x512C,      0,      0,
      0, 0x512B,      0, 0x4A48,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E584[] = {
 0x3537, 0x512E, 0x512F,      0, 0x322F,      0,      0,      0,
      0, 0x512D,      0,      0,      0,      0,      0,      0,
      0,      0, 0x3C74,      0, 0x5132, 0x5131, 0x5130,      0,
 0x5056,      0, 0x5133,      0,      0,      0,      0, 0x3D7E,
      0, 0x5134,      0,      0,      0,      0,      0,      0,
      0,      0, 0x4D25,      0,      0,      0,      0,      0,
      0,      0, 0x4C59,      0,      0,      0,      0, 0x5136,
      0,      0, 0x5135, 0x5138, 0x5137,      0,      0, 0x5139,
};
unsigned short utf8_to_euc_E585[] = {
 0x513A, 0x3074,      0, 0x3835, 0x373B, 0x3D3C, 0x437B, 0x3624,
 0x4068, 0x3877, 0x7943, 0x396E, 0x513C, 0x4C48, 0x4546,      0,
 0x3B79,      0, 0x513B,      0, 0x513D,      0,      0,      0,
      0,      0, 0x455E,      0, 0x3375,      0,      0,      0,
      0,      0, 0x513E,      0, 0x7944, 0x467E,      0,      0,
 0x4134, 0x5140, 0x5141, 0x482C, 0x3878, 0x4F3B, 0x5142,      0,
      0, 0x3626,      0,      0,      0, 0x4A3C, 0x4236, 0x3671,
 0x4535,      0,      0,      0, 0x3773,      0,      0,      0,
};
unsigned short utf8_to_euc_E586[] = {
 0x5143,      0, 0x5144,      0,      0, 0x4662, 0x315F,      0,
      0, 0x5147, 0x3A7D,      0, 0x5146, 0x3A46,      0, 0x5148,
 0x666E, 0x5149, 0x4B41, 0x514A,      0, 0x514B, 0x514C, 0x3E69,
      0, 0x3C4C,      0,      0,      0, 0x7945,      0,      0,
 0x3427,      0, 0x514F,      0, 0x514D, 0x4C3D, 0x514E,      0,
 0x495A, 0x5150, 0x5151, 0x5152, 0x455F,      0,      0,      0,
 0x5156, 0x5154, 0x5155, 0x5153, 0x3A63, 0x5157, 0x4C6A, 0x4E64,
      0,      0,      0,      0,      0, 0x5158, 0x7946,      0,
};
unsigned short utf8_to_euc_E587[] = {
      0,      0,      0,      0, 0x4028, 0x5159, 0x3D5A,      0,
      0, 0x515A,      0, 0x437C, 0x4E3F, 0x4560,      0,      0,
      0,      0,      0,      0,      0,      0, 0x5245,      0,
      0,      0,      0, 0x515B, 0x7425, 0x3645,      0,      0,
 0x515C, 0x4B5E,      0,      0,      0,      0, 0x3D68, 0x427C,
      0, 0x515E, 0x4664,      0, 0x7947, 0x515F,      0,      0,
 0x5160, 0x332E,      0,      0,      0, 0x5161, 0x3627,      0,
 0x464C, 0x317A, 0x3D50,      0,      0, 0x4821, 0x5162,      0,
};
unsigned short utf8_to_euc_E588[] = {
 0x4561,      0,      0, 0x3F4F, 0x5163,      0, 0x4A2C, 0x405A,
 0x3422,      0, 0x3429, 0x5164,      0,      0, 0x5166,      0,
      0, 0x373A,      0,      0, 0x5165, 0x7948,      0, 0x4E73,
      0,      0,      0,      0,      0, 0x3D69,      0,      0,
      0,      0,      0,      0, 0x483D, 0x4A4C,      0, 0x5167,
      0, 0x4D78, 0x5168,      0,      0,      0, 0x5169,      0,
 0x457E,      0,      0, 0x516A,      0,      0, 0x4029, 0x3A7E,
 0x3774, 0x516B, 0x3B49, 0x396F,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E589[] = {
      0,      0,      0, 0x4466, 0x516D,      0,      0, 0x4227,
      0,      0, 0x3A6F, 0x516E, 0x516F, 0x4130,      0, 0x516C,
      0,      0,      0,      0, 0x5171,      0, 0x4B36,      0,
      0,      0,      0, 0x3964,      0,      0, 0x5170,      0,
      0,      0,      0, 0x3775, 0x3A5E, 0x476D,      0,      0,
      0, 0x5174, 0x5172,      0,      0,      0,      0, 0x497B,
 0x3E6A, 0x517B, 0x3364, 0x5175, 0x5173, 0x414F,      0,      0,
      0,      0,      0,      0,      0, 0x5177,      0, 0x5176,
};
unsigned short utf8_to_euc_E58A[] = {
      0,      0,      0, 0x3344,      0,      0,      0, 0x3760,
 0x517C, 0x4E2D,      0,      0,      0, 0x5178,      0,      0,
      0, 0x517D, 0x517A,      0, 0x5179,      0,      0,      0,
      0,      0,      0, 0x4E4F, 0x7949,      0,      0, 0x3879,
 0x3243,      0,      0, 0x4E74,      0,      0, 0x794A,      0,
      0, 0x3D75, 0x4558, 0x3965, 0x5222, 0x5223,      0, 0x7B3C,
      0, 0x4E65,      0,      0, 0x4F2B, 0x5225,      0,      0,
      0, 0x387A,      0,      0, 0x5224,      0, 0x332F,      0,
};
unsigned short utf8_to_euc_E58B[] = {
 0x794B, 0x5226,      0, 0x4B56,      0, 0x443C,      0, 0x4D26,
      0, 0x4A59,      0,      0,      0, 0x5227,      0,      0,
      0,      0, 0x7055,      0,      0, 0x4630,      0, 0x5228,
 0x342A, 0x4C33,      0, 0x794C,      0, 0x3E21, 0x5229, 0x4A67,
 0x522D,      0, 0x402A, 0x522A, 0x3650,      0, 0x522B, 0x342B,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x372E, 0x522E,      0, 0x522F,      0,      0,
 0x5230, 0x5231, 0x3C5B,      0,      0,      0, 0x387B, 0x4C5E,
};
unsigned short utf8_to_euc_E58C[] = {
 0x794D, 0x4C68, 0x4677,      0,      0, 0x4A71, 0x5232, 0x794E,
 0x5233,      0,      0,      0,      0, 0x5235,      0, 0x5237,
 0x5236,      0,      0,      0,      0, 0x5238, 0x323D, 0x4B4C,
      0, 0x3A7C, 0x5239,      0,      0, 0x4159,      0,      0,
 0x3E22, 0x3629,      0, 0x523A, 0x794F,      0,      0,      0,
      0,      0, 0x485B,      0,      0,      0,      0, 0x523B,
      0, 0x523C,      0, 0x523D,      0,      0,      0,      0,
 0x523E, 0x4924, 0x3668, 0x3065,      0,      0,      0, 0x463F,
};
unsigned short utf8_to_euc_E58D[] = {
 0x523F, 0x3D3D,      0, 0x4069,      0, 0x5241, 0x5240, 0x3E23,
 0x3861, 0x5243, 0x483E,      0,      0, 0x5244,      0,      0,
      0, 0x485C, 0x4234, 0x426E, 0x3628,      0,      0, 0x466E,
 0x4331,      0, 0x476E,      0, 0x4B4E,      0, 0x5246,      0,
 0x406A,      0,      0,      0,      0,      0, 0x3735,      0,
      0, 0x5247,      0,      0,      0,      0, 0x5248, 0x312C,
 0x3075, 0x346D, 0x7950, 0x4228, 0x3551, 0x4D71,      0, 0x524B,
 0x3237,      0,      0, 0x524A,      0,      0,      0, 0x362A,
};
unsigned short utf8_to_euc_E58E[] = {
      0,      0, 0x524C,      0, 0x4C71,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x7951,      0,      0, 0x524D,      0,
 0x4E52,      0, 0x387C,      0,      0,      0,      0, 0x3836,
 0x524E,      0,      0,      0,      0, 0x5250, 0x524F,      0,
 0x3F5F, 0x3139,      0,      0,      0, 0x315E, 0x5251,      0,
 0x5252,      0, 0x7952, 0x3837,      0,      0, 0x5253,      0,
      0,      0,      0, 0x356E,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E58F[] = {
      0,      0, 0x3B32, 0x5254,      0,      0,      0,      0,
 0x4B74, 0x3A35, 0x355A, 0x4D27, 0x4150, 0x483F, 0x3C7D,      0,
      0,      0,      0,      0, 0x3D47,      0, 0x3C68, 0x3C75,
      0, 0x3D76,      0, 0x4840,      0, 0x7953,      0, 0x5257,
      0, 0x3143, 0x4151, 0x387D, 0x3845, 0x3667,      0,      0,
 0x525B, 0x4321, 0x427E, 0x362B, 0x3E24, 0x525C, 0x525A, 0x3244,
 0x4266, 0x3C38, 0x3B4B, 0x3126,      0,      0, 0x3370, 0x3966,
 0x3B4A,      0, 0x525D,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E590[] = {
      0, 0x525E,      0, 0x3549, 0x3346,      0,      0,      0,
 0x3967, 0x3548, 0x445F, 0x3125, 0x4631, 0x4C3E, 0x3921, 0x4D79,
 0x4547, 0x387E,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x372F,      0, 0x5267,      0, 0x3663,
 0x4B4A,      0,      0,      0,      0,      0, 0x485D,      0,
      0, 0x5266,      0, 0x345E, 0x5261, 0x5262, 0x5264,      0,
      0,      0,      0,      0,      0,      0, 0x5265,      0,
 0x355B, 0x3F61,      0, 0x4A2D, 0x5263, 0x525F, 0x3863,      0,
};
unsigned short utf8_to_euc_E591[] = {
 0x5260,      0, 0x4F24,      0,      0,      0, 0x4A72,      0,
 0x4468, 0x3862, 0x3970,      0,      0,      0, 0x5268,      0,
      0, 0x465D,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x526C,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x3C7E,      0, 0x3C76,      0,      0,      0,      0,      0,
 0x526F, 0x526D,      0, 0x4C23,      0, 0x526A, 0x5273, 0x526E,
      0,      0,      0, 0x5271, 0x3846, 0x4C3F,      0,      0,
};
unsigned short utf8_to_euc_E592[] = {
 0x5272,      0,      0,      0, 0x5274,      0, 0x5276,      0,
      0,      0, 0x7956, 0x3A70, 0x4F42,      0, 0x526B, 0x5269,
 0x5275,      0, 0x5270,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x7955,      0,      0,      0,
      0,      0, 0x5278,      0, 0x5323, 0x527A,      0,      0,
 0x527E, 0x7957,      0, 0x5321, 0x527B,      0,      0, 0x533E,
      0,      0, 0x3A69, 0x3331,      0,      0,      0,      0,
 0x5279,      0,      0,      0, 0x5325, 0x3076, 0x5324,      0,
};
unsigned short utf8_to_euc_E593[] = {
 0x3025, 0x494A, 0x5322,      0, 0x527C,      0,      0, 0x5277,
 0x527D, 0x3A48,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x5326,      0,      0,      0,      0,      0,      0,      0,
      0, 0x3077, 0x532F,      0,      0, 0x5327, 0x5328,      0,
 0x3E25, 0x4B69,      0,      0,      0, 0x532D, 0x532C,      0,
      0,      0, 0x452F,      0,      0,      0,      0,      0,
      0,      0, 0x532E,      0,      0, 0x532B,      0, 0x7958,
};
unsigned short utf8_to_euc_E594[] = {
      0,      0,      0,      0, 0x3134,      0, 0x3A36, 0x3F30,
      0,      0,      0,      0,      0,      0,      0, 0x5329,
 0x4562,      0,      0,      0, 0x532A,      0, 0x3022,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x5334, 0x4D23,
      0, 0x3E27,      0, 0x533A,      0,      0,      0,      0,
 0x5339, 0x5330,      0,      0,      0,      0, 0x4243,      0,
};
unsigned short utf8_to_euc_E595[] = {
 0x5331,      0,      0,      0, 0x426F, 0x5336, 0x3E26,      0,
      0,      0,      0,      0, 0x5333,      0,      0, 0x4C64,
      0,      0,      0, 0x373C,      0,      0, 0x5337, 0x5338,
      0,      0,      0,      0, 0x5335, 0x533B,      0,      0,
      0,      0,      0, 0x5332,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x5341, 0x5346,      0, 0x5342,      0,
};
unsigned short utf8_to_euc_E596[] = {
 0x533D,      0,      0, 0x5347, 0x4131,      0, 0x7959, 0x5349,
      0, 0x3922, 0x533F, 0x437D,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x5343, 0x533C, 0x342D,      0, 0x346E, 0x3365, 0x5344, 0x5340,
      0,      0,      0,      0,      0,      0,      0, 0x3776,
 0x534A, 0x5348, 0x4153, 0x354A, 0x362C,      0, 0x5345,      0,
 0x3674,      0,      0,      0,      0,      0, 0x3144,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E597[] = {
      0,      0,      0,      0, 0x534E, 0x534C,      0, 0x5427,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x5351,      0,      0,      0,
      0,      0, 0x534B,      0, 0x534F,      0,      0, 0x534D,
      0,      0,      0, 0x3B4C, 0x5350,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x5353,
      0, 0x5358,      0,      0,      0, 0x5356, 0x5355,      0,
};
unsigned short utf8_to_euc_E598[] = {
      0,      0,      0,      0,      0,      0, 0x4332,      0,
      0, 0x3245,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x5352,      0, 0x5354, 0x3E28,
 0x3133,      0,      0, 0x5357,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x325E,      0,      0,      0,      0,      0, 0x5362,
      0, 0x3E7C, 0x535E,      0, 0x535C,      0, 0x535D,      0,
 0x535F,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E599[] = {
      0,      0, 0x313D,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x4139,      0, 0x5359,      0,
 0x535A,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x337A,      0,      0,      0,      0,
      0,      0,      0,      0, 0x5361,      0,      0,      0,
 0x346F,      0, 0x5364, 0x5360, 0x5363,      0,      0,      0,
      0,      0,      0,      0, 0x4A2E,      0,      0,      0,
 0x4655,      0, 0x4838,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E59A[] = {
 0x5366,      0,      0,      0,      0,      0, 0x5365, 0x3345,
      0,      0, 0x5367,      0,      0,      0,      0, 0x536A,
      0,      0,      0,      0, 0x5369,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x5368,      0, 0x4739,      0,      0, 0x536B,      0,      0,
      0,      0,      0,      0,      0,      0, 0x536C,      0,
      0,      0,      0,      0, 0x536E,      0, 0x536D,      0,
      0,      0,      0,      0, 0x5370,      0,      0,      0,
};
unsigned short utf8_to_euc_E59B[] = {
 0x5373, 0x5371, 0x536F, 0x5372,      0,      0,      0,      0,
 0x5374,      0,      0,      0,      0,      0, 0x5375,      0,
      0, 0x5376,      0, 0x5377,      0,      0,      0, 0x5378,
 0x5145,      0, 0x3C7C, 0x3B4D,      0,      0, 0x3273,      0,
 0x3078,      0,      0, 0x4344,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x5379,      0,
 0x3A24,      0, 0x304F, 0x3F5E,      0,      0,      0,      0,
      0, 0x537A, 0x3847,      0,      0, 0x3971,      0, 0x537C,
};
unsigned short utf8_to_euc_E59C[] = {
 0x537B,      0,      0, 0x4A60, 0x537D,      0,      0,      0,
 0x5421, 0x537E,      0, 0x5422,      0, 0x5423,      0, 0x3777,
      0,      0, 0x3160, 0x5424,      0,      0, 0x5426,      0,
 0x5425,      0,      0,      0, 0x5428,      0,      0, 0x455A,
      0,      0,      0,      0,      0,      0, 0x5429, 0x3035,
 0x3A5F,      0,      0,      0,      0, 0x373D,      0,      0,
 0x434F,      0,      0,      0,      0,      0,      0, 0x542A,
 0x542B,      0,      0, 0x542D,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E59D[] = {
 0x542E,      0, 0x3A64,      0,      0,      0,      0, 0x3651,
      0,      0, 0x4B37,      0,      0,      0, 0x542C, 0x542F,
 0x3A41, 0x3923,      0,      0,      0,      0,      0,      0,
      0, 0x795A,      0,      0,      0,      0,      0,      0,
      0, 0x5433,      0,      0, 0x3A25, 0x795B, 0x4333,      0,
      0, 0x5430, 0x445A,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x5434,
};
unsigned short utf8_to_euc_E59E[] = {
      0,      0, 0x3F62,      0,      0,      0,      0,      0,
 0x5432, 0x5435,      0, 0x373F,      0,      0,      0,      0,
      0,      0,      0, 0x5436,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x5437,      0, 0x3924, 0x3340, 0x5439,      0,      0,      0,
      0,      0, 0x543A,      0, 0x795C,      0,      0,      0,
 0x543B,      0,      0, 0x5438,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E59F[] = {
 0x5431,      0,      0, 0x543C,      0,      0, 0x543D, 0x795E,
 0x795D,      0,      0, 0x4B64,      0,      0, 0x3E6B,      0,
      0,      0, 0x543F, 0x5440, 0x543E,      0, 0x5442,      0,
      0,      0,      0,      0, 0x4738,      0,      0, 0x3068,
 0x4956,      0,      0, 0x5443,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x3E7D,      0,      0, 0x3C39,
      0, 0x475D, 0x3470,      0, 0x3A6B,      0,      0,      0,
};
unsigned short utf8_to_euc_E5A0[] = {
 0x4B59,      0, 0x4632,      0,      0, 0x3778, 0x424F,      0,
      0,      0, 0x5441, 0x5444,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0x4244,      0,      0,
      0, 0x5445,      0,      0,      0, 0x5446,      0,      0,
      0, 0x5448,      0,      0, 0x4469,      0,      0,      0,
      0,      0, 0x342E,      0,      0,      0,      0, 0x7421,
 0x3161, 0x4A73,      0,      0, 0x3E6C, 0x4548,      0,      0,
      0,      0, 0x3A66,      0,      0, 0x544E,      0,      0,
};
unsigned short utf8_to_euc_E5A1[] = {
 0x4A3D, 0x4E5D,      0,      0,      0,      0,      0,      0,
      0,      0, 0x3274, 0x544A,      0,      0,      0,      0,
      0, 0x413A, 0x544D,      0, 0x4563,      0,      0, 0x4549,
 0x4564, 0x4839, 0x444D,      0,      0,      0, 0x3A49,      0,
      0,      0, 0x5449,      0,      0,      0,      0,      0,
      0, 0x3176,      0, 0x4536,      0,      0,      0,      0,
 0x544B,      0, 0x5447,      0,      0, 0x3F50,      0,      0,
      0, 0x544F,      0,      0,      0,      0, 0x3D4E,      0,
};
unsigned short utf8_to_euc_E5A2[] = {
      0,      0,      0, 0x362D,      0, 0x5450,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x4A68,      0,      0,      0, 0x417D,
      0,      0,      0,      0, 0x4446,      0, 0x7961, 0x5452,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x4B4F,      0,      0, 0x5453,      0,      0, 0x5458,      0,
      0,      0, 0x7962, 0x4A2F,      0,      0,      0,      0,
 0x5457, 0x5451, 0x5454, 0x5456,      0,      0, 0x3A26,      0,
};
unsigned short utf8_to_euc_E5A3[] = {
      0, 0x4A49,      0,      0,      0, 0x5459,      0, 0x4345,
      0,      0, 0x3275,      0, 0x3E6D,      0,      0,      0,
      0, 0x545B,      0, 0x545A,      0, 0x3968,      0, 0x545C,
 0x545E, 0x545D,      0,      0, 0x5460,      0, 0x5455, 0x5462,
      0,      0,      0,      0, 0x5461, 0x545F,      0,      0,
      0,      0,      0, 0x3B4E, 0x3F51,      0, 0x4154, 0x5463,
 0x403C, 0x306D, 0x4764,      0,      0,      0,      0, 0x445B,
      0, 0x5465, 0x5464, 0x5466, 0x5467, 0x5468,      0,      0,
};
unsigned short utf8_to_euc_E5A4[] = {
      0,      0, 0x5469,      0,      0,      0,      0,      0,
      0, 0x4A51, 0x546A, 0x7963,      0,      0,      0, 0x3246,
 0x546B,      0,      0,      0,      0, 0x4D3C, 0x3330,      0,
 0x5249, 0x3D48, 0x423F, 0x546C, 0x4C6B,      0,      0,      0,
      0,      0, 0x4C34,      0,      0, 0x546E,      0, 0x4267,
      0, 0x4537, 0x4240, 0x4957, 0x546F, 0x5470, 0x317B,      0,
      0, 0x3C3A, 0x5471,      0,      0,      0,      0, 0x3050,
 0x5472,      0,      0,      0,      0,      0, 0x5473,      0,
};
unsigned short utf8_to_euc_E5A5[] = {
      0,      0,      0,      0, 0x3162,      0,      0, 0x3471,
 0x4660, 0x4A74,      0,      0,      0,      0, 0x5477, 0x4155,
 0x5476, 0x3740,      0, 0x7964, 0x4B5B, 0x5475,      0, 0x4565,
 0x5479,      0, 0x5478, 0x7965,      0, 0x7966,      0,      0,
 0x547B,      0, 0x547A, 0x7967,      0, 0x317C,      0, 0x547C,
 0x3E29, 0x547E, 0x4325,      0, 0x547D,      0, 0x4A33,      0,
      0,      0,      0, 0x3D77, 0x455B,      0,      0,      0,
 0x5521,      0,      0,      0,      0, 0x3925,      0,      0,
};
unsigned short utf8_to_euc_E5A6[] = {
      0, 0x5522, 0x4721, 0x485E, 0x4C51,      0,      0,      0,
      0,      0, 0x4725,      0,      0, 0x552B,      0,      0,
      0,      0,      0, 0x3538,      0,      0, 0x4D45,      0,
      0, 0x4C2F,      0, 0x562C,      0, 0x5523,      0,      0,
      0,      0,      0, 0x5526, 0x7968, 0x4245,      0,      0,
 0x4B38,      0,      0,      0, 0x454A,      0,      0,      0,
      0,      0, 0x5527,      0,      0,      0,      0,      0,
      0, 0x4B65, 0x7969, 0x3A4A,      0,      0, 0x3E2A,      0,
};
unsigned short utf8_to_euc_E5A7[] = {
      0,      0,      0,      0,      0,      0, 0x5528,      0,
      0, 0x3B50,      0, 0x3B4F,      0,      0,      0,      0,
 0x3039, 0x3848,      0, 0x402B, 0x3051,      0,      0,      0,
      0, 0x552C, 0x552D,      0, 0x552A,      0,      0,      0,
      0,      0,      0,      0,      0, 0x3138, 0x342F,      0,
 0x5529,      0, 0x4C45, 0x4931,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x3028,      0,
      0,      0,      0, 0x3079,      0,      0,      0, 0x3B51,
};
unsigned short utf8_to_euc_E5A8[] = {
      0, 0x3052,      0, 0x3023,      0,      0,      0,      0,
      0, 0x5532,      0,      0,      0,      0,      0,      0,
      0, 0x5530,      0,      0,      0,      0,      0,      0,
 0x4C3C,      0, 0x5533,      0, 0x5531,      0,      0, 0x552F,
 0x3F31,      0,      0,      0,      0, 0x552E,      0,      0,
      0, 0x4A5A,      0,      0,      0,      0,      0, 0x3864,
      0,      0,      0,      0,      0, 0x5537, 0x5538,      0,
      0,      0,      0,      0, 0x3E2B,      0,      0,      0,
};
unsigned short utf8_to_euc_E5A9[] = {
 0x5534, 0x4F2C,      0,      0,      0,      0, 0x474C,      0,
      0, 0x5536,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x3A27,      0,      0,      0,      0,      0,
      0,      0, 0x5539,      0,      0,      0, 0x4958,      0,
      0,      0, 0x553A,      0, 0x5535,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x4C3B,
};
unsigned short utf8_to_euc_E5AA[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x475E,      0,      0,      0,      0,      0,
      0,      0, 0x553B, 0x4932,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x553C, 0x5540, 0x553D,      0,
};
unsigned short utf8_to_euc_E5AB[] = {
      0, 0x3247, 0x553F,      0,      0,      0,      0,      0,
      0, 0x3C3B,      0, 0x553E, 0x3779,      0,      0,      0,
 0x554C,      0,      0,      0,      0,      0, 0x5545, 0x5542,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x4364,      0, 0x5541,      0,      0, 0x5543,      0,
      0, 0x5544,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x5546, 0x5547,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E5AC[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x3472,      0, 0x5549, 0x5548,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x554A,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x3E6E,      0,      0,      0,      0,      0,
      0,      0, 0x554D,      0, 0x445C,      0,      0,      0,
 0x3145,      0, 0x554B,      0,      0,      0, 0x554E,      0,
      0,      0,      0,      0,      0,      0, 0x554F,      0,
};
unsigned short utf8_to_euc_E5AD[] = {
 0x5552,      0,      0, 0x5550,      0, 0x5551,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x3B52, 0x5553,      0,      0, 0x3926, 0x5554, 0x796A, 0x3B7A,
 0x4238,      0, 0x5555, 0x5556, 0x3B5A, 0x3927,      0, 0x4C52,
      0,      0,      0, 0x3528, 0x3849, 0x5557, 0x3358,      0,
      0, 0x5558,      0, 0x4239,      0,      0,      0,      0,
 0x5559, 0x5623,      0, 0x555A,      0, 0x555B,      0,      0,
 0x555C,      0, 0x555E,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E5AE[] = {
 0x555F,      0,      0, 0x5560,      0, 0x4270,      0, 0x3127,
 0x3C69, 0x3042,      0, 0x4157, 0x3430, 0x3C35,      0, 0x3928,
      0,      0,      0,      0,      0, 0x4566,      0, 0x3D21,
 0x3431, 0x4368, 0x446A, 0x3038, 0x3539, 0x4A75,      0, 0x3C42,
      0,      0, 0x3552, 0x406B, 0x3C3C, 0x4D28, 0x5561,      0,
      0,      0,      0,      0,      0,      0, 0x355C,      0,
 0x3A4B,      0,      0, 0x3332, 0x3163, 0x3E2C, 0x3248,      0,
 0x5562, 0x4D46,      0,      0,      0,      0,      0, 0x3D49,
};
unsigned short utf8_to_euc_E5AF[] = {
 0x796B,      0, 0x3C64, 0x5563, 0x3473, 0x4652, 0x4C29, 0x5564,
      0, 0x5565,      0,      0, 0x4959,      0,      0,      0,
 0x5567,      0, 0x3428, 0x3677, 0x5566,      0,      0,      0,
 0x796D,      0,      0, 0x3432,      0, 0x3F32, 0x556B, 0x3B21,
      0, 0x3249, 0x556A,      0, 0x5568, 0x556C, 0x5569, 0x472B,
 0x5C4D, 0x3F33,      0, 0x556D, 0x796E,      0, 0x4E40,      0,
 0x556E,      0,      0, 0x5570,      0, 0x437E, 0x556F,      0,
 0x4023,      0, 0x3B7B,      0,      0,      0, 0x4250, 0x3C77,
};
unsigned short utf8_to_euc_E5B0[] = {
      0, 0x4975, 0x406C,      0, 0x3C4D, 0x5571, 0x3E2D, 0x5572,
 0x5573, 0x3053, 0x423A, 0x3F52,      0, 0x5574, 0x4633, 0x3E2E,
      0, 0x3E2F,      0, 0x5575,      0,      0, 0x406D,      0,
      0,      0, 0x3E30,      0,      0,      0, 0x796F,      0,
 0x5576,      0, 0x5577,      0, 0x4C60,      0,      0,      0,
 0x5578,      0,      0,      0,      0, 0x3646,      0,      0,
      0, 0x3D22,      0,      0,      0,      0,      0,      0,
 0x5579, 0x557A, 0x3C5C, 0x3F2C, 0x4674, 0x3F54, 0x4878, 0x4722,
};
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,      0,      0,      0,      0,      0, 0x4230,      0,
 0x454B, 0x3C48,      0,      0, 0x4158, 0x4D7A,      0,      0,
      0,      0,      0,      0, 0x5624,      0, 0x5625, 0x4656,
      0, 0x3B33,      0,      0,      0,      0, 0x5627,      0,
      0, 0x5628,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E5B2[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x5629,      0,      0,      0,
 0x3474, 0x562A,      0,      0, 0x562B,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x322C,      0,      0,      0,      0, 0x7970,      0,
 0x413B, 0x3464,      0, 0x562D, 0x4C28,      0,      0,      0,
      0, 0x4252,      0, 0x3359,      0,      0, 0x562F, 0x5631,
 0x345F,      0, 0x7971, 0x562E, 0x5630,      0, 0x5633,      0,
};
unsigned short utf8_to_euc_E5B3[] = {
      0,      0,      0,      0,      0, 0x5632,      0, 0x5634,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x5635,      0,      0,      0,      0,      0,      0,
 0x463D, 0x362E,      0,      0,      0,      0,      0,      0,
 0x3265, 0x5636, 0x563B,      0,      0, 0x5639,      0, 0x4A77,
 0x4A76,      0,      0,      0,      0, 0x7972, 0x4567,      0,
      0,      0, 0x5638, 0x3D54,      0, 0x5637,      0,      0,
};
unsigned short utf8_to_euc_E5B4[] = {
      0,      0,      0,      0,      0,      0,      0, 0x3F72,
      0,      0,      0, 0x563C,      0,      0, 0x3A6A,      0,
      0, 0x5642,      0,      0, 0x5643, 0x563D, 0x3333, 0x563E,
 0x5647, 0x5646, 0x5645, 0x5641,      0,      0,      0, 0x5640,
      0,      0, 0x5644,      0,      0,      0,      0, 0x7973,
      0, 0x4A78,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E5B5[] = {
      0,      0, 0x7976,      0,      0,      0,      0,      0,
      0,      0,      0, 0x564B, 0x5648,      0, 0x564A,      0,
 0x4D72,      0, 0x5649, 0x7974,      0,      0,      0,      0,
      0,      0,      0,      0, 0x563F,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x3F73,      0,      0, 0x564C, 0x7977,      0, 0x3A37,
      0,      0,      0, 0x564D,      0,      0, 0x564E,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E5B6[] = {
      0,      0, 0x5651,      0, 0x5650,      0,      0, 0x564F,
      0,      0,      0, 0x4568, 0x563A,      0,      0,      0,
 0x5657,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0x5653,      0,      0,
      0,      0, 0x5652,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x5654,      0, 0x5655,      0,
      0,      0,      0,      0,      0,      0,      0, 0x5658,
 0x7978, 0x7979, 0x4E66,      0, 0x5659, 0x5656,      0,      0,
};
unsigned short utf8_to_euc_E5B7[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x565A,      0,      0, 0x3460, 0x565B,      0,      0,
 0x797A,      0, 0x565D, 0x565C,      0,      0, 0x565E,      0,
      0,      0,      0, 0x565F,      0, 0x406E, 0x3D23,      0,
      0, 0x3D64,      0, 0x4163,      0, 0x3929, 0x3A38, 0x392A,
 0x3570,      0,      0, 0x5660,      0,      0, 0x3A39,      0,
      0, 0x384A, 0x5661, 0x4C26, 0x4743, 0x5662,      0, 0x392B,
      0,      0,      0, 0x342C,      0, 0x4327, 0x3652,      0,
};
unsigned short utf8_to_euc_E5B8[] = {
      0,      0, 0x3B54, 0x495B,      0,      0, 0x4841,      0,
      0,      0,      0, 0x5663, 0x3475,      0,      0,      0,
      0, 0x5666,      0,      0,      0,      0, 0x4421,      0,
      0, 0x5665, 0x5664, 0x5667,      0, 0x446B,      0,      0,
      0,      0,      0,      0,      0, 0x3F63,      0,      0,
      0,      0,      0, 0x3B55,      0, 0x404A,      0, 0x4253,
 0x3522,      0,      0, 0x4422,      0,      0, 0x5668, 0x5669,
 0x3E6F,      0,      0,      0,      0, 0x4B39,      0,      0,
};
unsigned short utf8_to_euc_E5B9[] = {
 0x566C,      0,      0, 0x566B, 0x566A, 0x497D,      0, 0x5673,
      0,      0,      0,      0, 0x4B5A,      0, 0x566D,      0,
      0,      0,      0,      0, 0x566F, 0x4B6B,      0, 0x566E,
      0,      0,      0,      0,      0,      0,      0, 0x5670,
      0, 0x4828, 0x5671, 0x4A3E, 0x5672,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x3433, 0x4A3F, 0x472F, 0x5674, 0x5675,      0,
 0x392C, 0x3434, 0x5676, 0x3838, 0x4D44, 0x4D29, 0x3476, 0x5678,
};
unsigned short utf8_to_euc_E5BA[] = {
      0, 0x4423,      0, 0x392D, 0x3E31,      0,      0, 0x485F,
      0,      0, 0x3E32,      0,      0,      0,      0, 0x3D78,
      0,      0,      0,      0,      0, 0x446C, 0x4A79, 0x4539,
      0,      0, 0x392E,      0, 0x495C,      0,      0,      0,
 0x5679,      0,      0,      0,      0,      0, 0x4559, 0x3A42,
      0,      0,      0, 0x384B,      0, 0x446D,      0,      0,
      0,      0,      0,      0,      0, 0x3043, 0x3D6E, 0x392F,
 0x4D47,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E5BB[] = {
      0, 0x567A, 0x567B, 0x4751,      0,      0,      0,      0,
 0x567C, 0x4E77, 0x4F2D,      0,      0,      0,      0, 0x567E,
 0x567D,      0,      0, 0x3347,      0,      0, 0x5721,      0,
      0,      0, 0x5724, 0x5725,      0, 0x5723,      0, 0x4940,
 0x3E33, 0x5727, 0x5726, 0x5722,      0,      0,      0,      0,
 0x5728, 0x5729,      0,      0, 0x572A,      0,      0,      0,
 0x572D, 0x572B,      0, 0x572C, 0x572E,      0, 0x3164, 0x446E,
 0x572F,      0, 0x377A, 0x3276, 0x4736,      0, 0x5730, 0x467B,
};
unsigned short utf8_to_euc_E5BC[] = {
      0, 0x4A5B,      0, 0x5731, 0x4F2E,      0,      0,      0,
      0, 0x5732, 0x4A40, 0x5735, 0x5021, 0x5031,      0, 0x3C30,
 0x4675, 0x5736,      0, 0x355D, 0x4424, 0x307A, 0x5737, 0x4A26,
 0x3930,      0,      0, 0x4350,      0,      0,      0, 0x446F,
      0, 0x797B,      0,      0,      0, 0x4C6F, 0x3839, 0x384C,
      0, 0x5738,      0,      0,      0, 0x5739,      0, 0x573F,
      0, 0x3C65,      0,      0, 0x797C, 0x4425,      0, 0x362F,
 0x573A,      0,      0,      0, 0x492B,      0, 0x4346,      0,
};
unsigned short utf8_to_euc_E5BD[] = {
      0, 0x573B,      0,      0,      0, 0x792C,      0,      0,
 0x573C,      0, 0x3630,      0, 0x573D,      0, 0x573E,      0,
      0, 0x5740,      0, 0x4576,      0,      0, 0x5741, 0x5742,
      0, 0x5743,      0,      0, 0x5734, 0x5733,      0,      0,
      0, 0x5744, 0x3741,      0,      0,      0, 0x4927, 0x797D,
      0, 0x3A4C, 0x4937, 0x4426, 0x494B, 0x5745,      0,      0,
 0x3E34, 0x3146,      0, 0x5746,      0,      0,      0, 0x5747,
      0, 0x4C72,      0,      0, 0x4860,      0,      0, 0x574A,
};
unsigned short utf8_to_euc_E5BE[] = {
 0x317D, 0x402C, 0x5749, 0x5748, 0x3742, 0x4254,      0, 0x574E,
 0x574C,      0, 0x574B, 0x4E27, 0x3865,      0,      0,      0,
 0x3D79, 0x574D, 0x454C, 0x3D3E,      0,      0,      0, 0x4640,
 0x5751, 0x5750,      0,      0,      0,      0, 0x574F,      0,
 0x5752, 0x3866,      0,      0,      0,      0,      0,      0,
 0x5753, 0x497C, 0x3D5B,      0,      0, 0x5754, 0x4879,      0,
      0,      0,      0, 0x4641, 0x4427,      0,      0, 0x797E,
      0, 0x4530,      0,      0, 0x5755, 0x352B,      0,      0,
};
unsigned short utf8_to_euc_E5BF[] = {
      0,      0,      0, 0x3F34,      0, 0x492C,      0,      0,
      0,      0,      0,      0, 0x3477, 0x4726,      0,      0,
      0,      0,      0,      0,      0,      0, 0x5756, 0x3B56,
 0x4B3A, 0x4B3B,      0,      0, 0x317E, 0x575B, 0x7A21,      0,
 0x4369,      0,      0,      0, 0x5758,      0,      0,      0,
      0,      0,      0, 0x3277,      0,      0,      0,      0,
 0x582D, 0x575A,      0,      0,      0, 0x4730,      0,      0,
 0x5759,      0,      0, 0x5757,      0, 0x397A,      0, 0x575D,
};
unsigned short utf8_to_euc_E680[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x5763, 0x5769,
 0x5761,      0, 0x455C,      0,      0, 0x5766, 0x495D,      0,
      0, 0x5760,      0, 0x5765, 0x4E67, 0x3B57,      0,      0,
 0x4255, 0x575E,      0,      0,      0, 0x355E, 0x5768, 0x402D,
 0x3165, 0x5762, 0x3278, 0x5767,      0,      0,      0, 0x3631,
      0, 0x5764,      0,      0,      0,      0,      0,      0,
      0,      0, 0x576A,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E681[] = {
      0, 0x576C, 0x5776, 0x5774,      0,      0, 0x5771,      0,
      0,      0, 0x5770, 0x4E78,      0, 0x5772,      0,      0,
 0x3632,      0, 0x3931,      0,      0, 0x3D7A,      0,      0,
      0, 0x5779, 0x576B,      0,      0, 0x7A22,      0, 0x576F,
 0x575F,      0, 0x327A, 0x5773, 0x5775, 0x4351,      0,      0,
 0x3A28, 0x3238, 0x576D, 0x5778, 0x5777, 0x3633,      0, 0x4229,
 0x3366,      0,      0,      0,      0, 0x3743,      0, 0x576E,
      0,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E682[] = {
      0, 0x577A,      0, 0x577D, 0x5821, 0x7A23,      0,      0,
      0, 0x3C3D, 0x7A24, 0x5827, 0x4470, 0x577B,      0,      0,
      0,      0, 0x5825,      0, 0x3279,      0, 0x5823, 0x5824,
      0,      0, 0x577E, 0x5822,      0,      0,      0, 0x3867,
 0x4D2A,      0,      0, 0x3435,      0,      0, 0x3159, 0x5826,
      0, 0x473A, 0x302D,      0,      0,      0,      0,      0,
      0,      0, 0x4861, 0x575C, 0x582C, 0x5830, 0x4C65,      0,
 0x5829,      0,      0,      0, 0x4569, 0x582E,      0,      0,
};
unsigned short utf8_to_euc_E683[] = {
      0,      0,      0,      0,      0, 0x3E70, 0x582F, 0x4657,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x4F47,      0, 0x582B,      0, 0x7A26,      0,      0,
 0x5831,      0, 0x397B,      0, 0x404B,      0, 0x7A25, 0x3054,
 0x582A, 0x5828,      0, 0x415A,      0,      0,      0, 0x577C,
 0x3B34,      0,      0,      0,      0,      0,      0,      0,
 0x4246, 0x583D, 0x7A28, 0x415B, 0x5838,      0, 0x5835, 0x5836,
      0, 0x3C66, 0x5839, 0x583C,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E684[] = {
 0x5837, 0x3D25,      0, 0x583A,      0,      0, 0x5834,      0,
 0x4C7C, 0x4C7B,      0,      0,      0, 0x583E, 0x583F, 0x3055,
      0, 0x7A29,      0,      0,      0, 0x5833,      0,      0,
      0,      0, 0x3672, 0x3026,      0,      0,      0, 0x3436,
 0x7A27, 0x583B,      0,      0,      0,      0,      0, 0x5843,
 0x5842,      0,      0,      0, 0x5847,      0,      0,      0,
 0x7A2B,      0,      0,      0, 0x5848,      0,      0, 0x7A2A,
      0,      0,      0,      0, 0x5846, 0x5849, 0x5841, 0x5845,
};
unsigned short utf8_to_euc_E685[] = {
      0,      0, 0x584A,      0, 0x584B,      0,      0, 0x5840,
 0x3B7C,      0, 0x5844, 0x4256, 0x3932, 0x5832, 0x3F35,      0,
      0,      0,      0, 0x5858,      0, 0x4A69,      0,      0,
 0x584E, 0x584F, 0x5850,      0,      0, 0x5857,      0, 0x5856,
      0,      0, 0x4B7D, 0x3437,      0, 0x5854,      0, 0x3745,
 0x3334,      0,      0, 0x5851,      0,      0, 0x4E38, 0x5853,
 0x3056, 0x5855,      0, 0x584C, 0x5852, 0x5859, 0x3744, 0x584D,
      0,      0,      0,      0,      0,      0, 0x4D5D,      0,
};
unsigned short utf8_to_euc_E686[] = {
      0,      0, 0x4D2B,      0,      0,      0,      0, 0x585C,
      0,      0, 0x5860,      0,      0,      0, 0x417E,      0,
 0x4E79, 0x5861,      0,      0, 0x585E,      0, 0x585B,      0,
 0x7A2C, 0x585A, 0x585F,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x4A30,      0,      0, 0x4634,
      0, 0x3746,      0, 0x5862, 0x585D,      0, 0x5863,      0,
      0,      0, 0x377B,      0,      0,      0, 0x3231,      0,
      0,      0, 0x586B,      0,      0,      0, 0x3438,      0,
};
unsigned short utf8_to_euc_E687[] = {
      0,      0,      0, 0x5869,      0,      0, 0x586A, 0x3A29,
 0x5868, 0x5866, 0x5865, 0x586C, 0x5864, 0x586E,      0,      0,
 0x327B,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x5870,      0,      0, 0x586F,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x4428,      0, 0x5873,      0, 0x5871, 0x5867,
 0x377C,      0, 0x5872,      0, 0x5876, 0x5875, 0x5877, 0x5874,
};
unsigned short utf8_to_euc_E688[] = {
 0x5878,      0,      0,      0,      0,      0,      0,      0,
 0x5879, 0x587A, 0x4A6A,      0, 0x587C, 0x587B, 0x3D3F,      0,
 0x402E, 0x3266, 0x327C, 0x7A2D, 0x587D,      0, 0x303F,      0,
      0,      0, 0x404C, 0x587E,      0, 0x6C43, 0x5921, 0x3761,
      0, 0x5922,      0,      0,      0,      0, 0x406F,      0,
      0,      0, 0x5923,      0,      0,      0, 0x5924, 0x353A,
 0x5925,      0, 0x5926, 0x5927, 0x4257,      0,      0,      0,
 0x384D,      0,      0, 0x4C61,      0,      0,      0, 0x4B3C,
};
unsigned short utf8_to_euc_E689[] = {
 0x3D6A, 0x5928,      0,      0,      0,      0,      0, 0x4070,
 0x6E3D, 0x4862,      0, 0x3C6A,      0, 0x3A4D, 0x5929,      0,
      0,      0,      0, 0x4247,      0, 0x4A27,      0,      0,
 0x4271,      0,      0, 0x592C,      0,      0, 0x592A,      0,
 0x592D,      0,      0, 0x592B,      0,      0,      0,      0,
 0x592E,      0,      0,      0,      0,      0, 0x4A31,      0,
      0, 0x3037,      0,      0,      0,      0, 0x495E,      0,
      0, 0x4863,      0,      0, 0x592F,      0, 0x5932, 0x3E35,
};
unsigned short utf8_to_euc_E68A[] = {
 0x353B,      0, 0x5930, 0x5937, 0x3E36,      0,      0,      0,
      0, 0x5931, 0x4744,      0,      0,      0,      0,      0,
      0, 0x4D5E, 0x5933, 0x5934, 0x5938, 0x456A, 0x5935, 0x3933,
 0x405E,      0,      0, 0x5946, 0x4834,      0, 0x4272,      0,
      0,      0,      0,      0,      0,      0, 0x7A2E,      0,
      0,      0,      0, 0x4864, 0x5A2D,      0,      0,      0,
      0, 0x4A7A,      0,      0,      0, 0x4471,      0,      0,
      0, 0x4B75,      0, 0x593B, 0x3221, 0x436A,      0,      0,
};
unsigned short utf8_to_euc_E68B[] = {
      0,      0, 0x5944,      0,      0, 0x4334, 0x593E, 0x5945,
 0x5940, 0x5947, 0x5943,      0, 0x5942, 0x476F,      0, 0x593C,
 0x327D, 0x593A, 0x3571, 0x4273, 0x5936,      0,      0, 0x5939,
 0x3934, 0x405B,      0, 0x3E37, 0x5941, 0x4752,      0,      0,
 0x3572, 0x3348,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x3367, 0x3F21, 0x5949, 0x594E,
      0, 0x594A,      0, 0x377D,      0, 0x594F, 0x3B22, 0x3969,
      0,      0,      0,      0,      0,      0, 0x3D26, 0x593D,
};
unsigned short utf8_to_euc_E68C[] = {
      0, 0x3B7D, 0x594C,      0,      0,      0,      0, 0x3B58,
 0x594D, 0x3044,      0,      0, 0x5948,      0,      0,      0,
      0, 0x4429,      0,      0,      0,      0,      0,      0,
      0, 0x3573,      0,      0,      0,      0,      0, 0x3634,
      0,      0,      0,      0,      0,      0,      0, 0x594B,
 0x3027,      0,      0, 0x3A43,      0,      0,      0, 0x3F36,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x4472,      0,      0, 0x4854, 0x5951, 0x415E,
};
unsigned short utf8_to_euc_E68D[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x422A,      0,      0, 0x3B2B, 0x5952,      0, 0x5954,
 0x5950,      0,      0,      0,      0, 0x4A61,      0, 0x443D,
      0,      0,      0,      0, 0x415C,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x4A7B,
 0x3C4E, 0x5960,      0, 0x595F,      0,      0, 0x3F78,      0,
      0,      0, 0x377E,      0,      0,      0, 0x5959, 0x3E39,
      0,      0, 0x4668, 0x4731,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E68E[] = {
 0x5957,      0,      0, 0x415D,      0,      0,      0,      0,
 0x3C78, 0x595C,      0,      0, 0x3E38,      0, 0x5956, 0x595B,
      0,      0, 0x4753,      0,      0,      0, 0x5955,      0,
 0x3721,      0,      0, 0x335D,      0,      0,      0, 0x595D,
 0x4E2B, 0x3A4E, 0x4335, 0x595A,      0, 0x405C,      0, 0x3935,
 0x3F64, 0x3166, 0x413C, 0x5958, 0x3545,      0,      0,      0,
      0,      0, 0x3747,      0, 0x444F, 0x595E,      0,      0,
      0,      0,      0, 0x415F,      0,      0, 0x5961,      0,
};
unsigned short utf8_to_euc_E68F[] = {
 0x5963,      0,      0, 0x4237, 0x5969,      0, 0x5964,      0,
      0, 0x5966,      0,      0,      0,      0,      0, 0x4941,
 0x4473,      0, 0x5967,      0,      0,      0, 0x4D2C,      0,
      0,      0, 0x4D48, 0x3439,      0,      0,      0,      0,
      0, 0x302E,      0, 0x5965,      0,      0,      0,      0,
      0, 0x5962,      0,      0,      0,      0, 0x3478,      0,
      0,      0,      0,      0, 0x3167, 0x7A2F, 0x5968,      0,
      0,      0, 0x4D49,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E690[] = {
      0,      0,      0,      0,      0,      0, 0x596C,      0,
      0,      0,      0,      0,      0, 0x423B,      0, 0x5973,
      0,      0,      0, 0x596D,      0,      0, 0x596A, 0x5971,
      0,      0,      0,      0, 0x5953,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x596E,      0,
 0x5972,      0,      0,      0, 0x4842, 0x456B,      0,      0,
      0,      0,      0,      0, 0x596B,      0, 0x596F,      0,
      0,      0, 0x3748,      0,      0,      0, 0x3A71,      0,
};
unsigned short utf8_to_euc_E691[] = {
      0,      0, 0x405D,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x5977,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x4526,      0,      0,      0,      0,      0,      0,      0,
 0x7A30,      0,      0,      0,      0,      0,      0, 0x5974,
      0, 0x4B60,      0,      0,      0,      0,      0, 0x5975,
      0,      0,      0,      0,      0,      0, 0x5976,      0,
 0x4C4E,      0, 0x4022,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E692[] = {
      0,      0,      0, 0x3762,      0,      0,      0,      0,
 0x597D,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x3B35, 0x597A,      0, 0x5979,      0,      0,
      0,      0, 0x4732,      0,      0, 0x7A31, 0x4635,      0,
      0,      0,      0,      0, 0x4531, 0x597B,      0,      0,
      0, 0x597C,      0, 0x496F,      0, 0x4745, 0x3B23,      0,
 0x4071,      0, 0x4B50,      0,      0,      0,      0,      0,
      0, 0x3349,      0, 0x5A25, 0x597E,      0,      0,      0,
};
unsigned short utf8_to_euc_E693[] = {
      0, 0x4D4A, 0x5A27,      0,      0, 0x5A23,      0, 0x5A24,
      0,      0,      0,      0,      0, 0x4160, 0x7A32,      0,
      0,      0, 0x5A22,      0, 0x593F,      0,      0,      0,
 0x5A26,      0, 0x5A21,      0,      0,      0,      0,      0,
 0x5A2B, 0x5A2C, 0x4527, 0x5A2E,      0,      0, 0x3B24, 0x5A29,
      0,      0,      0,      0, 0x353C,      0,      0, 0x5A2F,
      0, 0x5A28, 0x5A33,      0, 0x5A32,      0, 0x5A31,      0,
      0,      0, 0x5A34,      0,      0, 0x5A36, 0x3E71,      0,
};
unsigned short utf8_to_euc_E694[] = {
 0x5A35,      0,      0,      0,      0, 0x5A39,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x5A37,      0,      0,      0, 0x5A38, 0x5970,      0,      0,
      0,      0,      0, 0x5A3B, 0x5A3A,      0,      0,      0,
      0,      0, 0x5978, 0x5A3C, 0x5A30,      0,      0, 0x3B59,
      0,      0,      0,      0, 0x5A3D, 0x5A3E, 0x5A40, 0x5A3F,
 0x5A41, 0x327E,      0, 0x3936,      0,      0, 0x4A7C, 0x402F,
};
unsigned short utf8_to_euc_E695[] = {
      0,      0,      0,      0,      0, 0x384E,      0,      0,
 0x5A43,      0,      0,      0,      0, 0x5A46, 0x7A33, 0x4952,
      0, 0x355F,      0,      0,      0, 0x5A45, 0x5A44, 0x4754,
 0x5A47, 0x3635,      0,      0,      0, 0x5A49, 0x5A48,      0,
      0,      0, 0x343A, 0x3B36,      0,      0, 0x4658,      0,
      0,      0,      0,      0, 0x3749,      0,      0,      0,
 0x3F74,      0, 0x5A4A,      0, 0x4030, 0x4528,      0, 0x495F,
 0x5A4B,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E696[] = {
      0,      0, 0x5A4C, 0x5A4D,      0,      0,      0, 0x4A38,
 0x555D, 0x4046,      0,      0, 0x494C,      0, 0x3A58,      0,
 0x4865, 0x4843,      0,      0,      0,      0,      0, 0x454D,
      0, 0x4E41,      0, 0x5A4F, 0x3C50,      0,      0, 0x5A50,
      0, 0x3036,      0,      0, 0x3654, 0x404D,      0, 0x4960,
      0,      0,      0, 0x5A51, 0x3B42, 0x4347,      0, 0x3B5B,
 0x3F37,      0,      0,      0,      0,      0,      0, 0x5A52,
      0, 0x4A7D,      0,      0, 0x3177, 0x3B5C,      0,      0,
};
unsigned short utf8_to_euc_E697[] = {
      0, 0x5A55,      0, 0x5A53, 0x5A56, 0x4E39, 0x5A54,      0,
      0,      0,      0, 0x407B, 0x5A57,      0,      0, 0x4232,
      0,      0, 0x5A58,      0,      0,      0,      0, 0x347A,
      0, 0x5A5A,      0, 0x5A59,      0,      0,      0,      0,
 0x5A5B, 0x5A5C, 0x347B,      0,      0, 0x467C, 0x4336, 0x356C,
 0x3B5D, 0x4161,      0,      0, 0x3D5C, 0x3030,      0,      0,
      0, 0x5A5D,      0,      0,      0,      0,      0,      0,
      0,      0, 0x3222, 0x5A61,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E698[] = {
 0x7A34,      0, 0x3937, 0x5A60,      0,      0, 0x3A2B, 0x3E3A,
      0, 0x7A37, 0x5A5F,      0, 0x3E3B,      0, 0x4C40, 0x3A2A,
      0,      0,      0, 0x3057, 0x404E, 0x7A35,      0,      0,
      0,      0,      0,      0, 0x5A66,      0, 0x7A39, 0x4031,
 0x3147,      0,      0,      0, 0x7A3A, 0x3D55,      0, 0x4B66,
 0x3A72,      0,      0,      0,      0, 0x3E3C, 0x7A38, 0x4027,
      0, 0x7928,      0,      0, 0x5A65, 0x5A63, 0x5A64,      0,
      0,      0,      0, 0x7A36, 0x436B,      0,      0, 0x5B26,
};
unsigned short utf8_to_euc_E699[] = {
      0, 0x5A6A, 0x3B7E, 0x3938, 0x5A68,      0,      0,      0,
      0, 0x5A69,      0, 0x3F38,      0,      0,      0, 0x5A67,
      0,      0, 0x3B2F,      0,      0,      0,      0, 0x7A3C,
      0, 0x7A3D,      0,      0,      0, 0x5A6C, 0x5A6B, 0x5A70,
      0,      0, 0x5A71,      0, 0x5A6D, 0x7A3B, 0x3322, 0x5A6E,
 0x5A6F, 0x4855,      0,      0,      0,      0, 0x4961, 0x374A,
 0x5A72,      0,      0, 0x7A3F, 0x4032,      0, 0x3E3D,      0,
      0,      0, 0x4352,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E69A[] = {
      0, 0x3647,      0, 0x5A73, 0x5A77,      0,      0, 0x324B,
 0x5A74, 0x5A76,      0,      0,      0,      0, 0x5A75,      0,
      0, 0x3D6B,      0,      0,      0,      0, 0x4348, 0x3045,
 0x5A78, 0x7A40,      0,      0,      0, 0x5A79,      0,      0,
 0x7A41,      0, 0x442A,      0,      0,      0, 0x4E71,      0,
      0,      0,      0, 0x3B43,      0,      0, 0x4A6B,      0,
      0,      0, 0x7A42,      0, 0x4B3D,      0,      0,      0,
 0x5B22, 0x5A7B,      0,      0, 0x5A7E,      0, 0x5A7D, 0x7A43,
};
unsigned short utf8_to_euc_E69B[] = {
      0, 0x5A7A,      0,      0, 0x5B21,      0,      0, 0x465E,
      0, 0x5A7C,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x5B23,      0,
      0, 0x3D6C, 0x5B24,      0, 0x4D4B, 0x4778,      0,      0,
 0x5B25,      0,      0,      0,      0,      0, 0x5B27,      0,
      0, 0x5B28,      0,      0,      0,      0,      0,      0,
 0x5B29,      0, 0x364A, 0x3148, 0x3939, 0x5B2A,      0, 0x5B2B,
 0x3D71, 0x4162, 0x7A44, 0x792B, 0x5258, 0x413E, 0x413D, 0x4258,
};
unsigned short utf8_to_euc_E69C[] = {
 0x3A47,      0,      0, 0x5072,      0,      0,      0,      0,
 0x376E, 0x4D2D,      0, 0x4A7E,      0, 0x497E, 0x7A45, 0x5B2C,
      0,      0,      0,      0, 0x3A73, 0x443F, 0x5B2D, 0x4F2F,
      0,      0,      0, 0x4B3E,      0, 0x442B, 0x5B2E, 0x347C,
      0,      0,      0,      0,      0,      0, 0x5B2F, 0x5B30,
 0x4C5A,      0, 0x4C24, 0x4B76, 0x4B5C, 0x3B25, 0x5B32,      0,
      0, 0x3C6B,      0,      0, 0x4B51,      0, 0x5B34, 0x5B37,
 0x5B36,      0, 0x3479,      0,      0, 0x3560,      0, 0x5B33,
};
unsigned short utf8_to_euc_E69D[] = {
      0, 0x5B35,      0,      0,      0,      0, 0x5B38,      0,
      0, 0x3F79,      0,      0,      0,      0, 0x4D7B, 0x3049,
 0x3A60, 0x423C,      0, 0x3C5D,      0,      0, 0x3E73,      0,
      0, 0x5B3B,      0,      0, 0x454E,      0, 0x5B39, 0x422B,
 0x5B3A, 0x3E72, 0x4C5D, 0x5B3C, 0x5B3D, 0x4D68, 0x7A47,      0,
      0,      0, 0x5B42,      0,      0, 0x393A,      0, 0x4755,
 0x5B3F, 0x456C, 0x5A5E, 0x5A62,      0, 0x354F,      0, 0x4747,
      0,      0,      0,      0, 0x5B41,      0, 0x3E3E, 0x4844,
};
unsigned short utf8_to_euc_E69E[] = {
      0,      0,      0,      0,      0, 0x5B47,      0, 0x487A,
      0, 0x5B3E,      0, 0x5B44, 0x5B43,      0,      0,      0,
 0x404F,      0,      0,      0,      0, 0x4B6D,      0, 0x4E53,
      0,      0, 0x4B67,      0, 0x324C, 0x3B5E,      0,      0,
 0x4F48, 0x5B46, 0x3F75,      0,      0,      0, 0x5B45,      0,
      0, 0x5B40,      0,      0,      0,      0,      0, 0x384F,
      0,      0,      0, 0x5B4C, 0x5B4A,      0, 0x324D, 0x5B48,
 0x5B4E, 0x5B54,      0, 0x7A48,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E69F[] = {
 0x7A4A, 0x4248,      0,      0, 0x4A41,      0, 0x5B56,      0,
      0,      0, 0x4922,      0,      0,      0, 0x5B55, 0x4770,
 0x4B3F, 0x343B,      0, 0x4077, 0x3D40,      0,      0,      0,
 0x4453,      0, 0x4D2E,      0,      0, 0x5B51, 0x5B50,      0,
      0,      0, 0x5B52,      0, 0x5B4F,      0,      0, 0x5B57,
      0, 0x5B4D,      0,      0, 0x5B4B,      0, 0x5B53, 0x5B49,
      0, 0x436C,      0, 0x4C78, 0x3C46, 0x3A74,      0,      0,
      0,      0,      0, 0x3A3A,      0,      0, 0x4B6F, 0x3341,
};
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,      0,      0, 0x4034, 0x372A,
      0,      0,      0,      0,      0,      0, 0x5B59,      0,
      0, 0x393B, 0x337C,      0,      0,      0,      0,      0,
      0, 0x5B5B, 0x3374, 0x5B61,      0,      0,      0,      0,
      0,      0, 0x5B5E,      0, 0x4073,      0,      0,      0,
 0x334B, 0x3A2C,      0,      0, 0x334A, 0x3A4F,      0,      0,
};
unsigned short utf8_to_euc_E6A1[] = {
 0x5B5C, 0x3765, 0x374B, 0x456D, 0x7A4C,      0, 0x5B5A,      0,
 0x3046,      0,      0,      0,      0, 0x5B5D, 0x5B5F,      0,
 0x364D, 0x372C, 0x7A49, 0x343C, 0x354B,      0,      0,      0,
      0, 0x5B62,      0,      0, 0x3A79, 0x4B71,      0, 0x3B37,
      0,      0,      0, 0x5B63,      0,      0,      0, 0x4930,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x5B6F,      0, 0x3233, 0x5B64,
      0,      0,      0,      0,      0,      0, 0x5B75, 0x5B65,
};
unsigned short utf8_to_euc_E6A2[] = {
      0, 0x4E42,      0, 0x5B6C,      0, 0x475F,      0,      0,
      0,      0,      0,      0,      0, 0x5B74,      0, 0x5B67,
      0,      0,      0, 0x3034, 0x5B69,      0,      0, 0x393C,
      0,      0,      0, 0x5B6B,      0, 0x5B6A,      0, 0x5B66,
 0x5B71,      0, 0x3E3F,      0,      0,      0, 0x546D, 0x3868,
 0x4D7C,      0,      0,      0,      0, 0x5B68,      0, 0x4474,
 0x3323, 0x3A2D,      0, 0x5B60,      0, 0x5B70, 0x3361,      0,
      0, 0x5B6E, 0x5B72,      0, 0x456E,      0,      0,      0,
};
unsigned short utf8_to_euc_E6A3[] = {
      0,      0,      0,      0, 0x347E,      0, 0x5C32,      0,
 0x7929, 0x4C49, 0x5B77, 0x347D,      0, 0x5B7E,      0, 0x7A4D,
      0,      0, 0x4B40,      0, 0x5C21, 0x5C23,      0, 0x5C27,
 0x5B79,      0, 0x432A,      0,      0,      0,      0, 0x456F,
 0x5C2B, 0x5B7C,      0, 0x5C28,      0,      0,      0, 0x5C22,
      0,      0,      0,      0,      0,      0, 0x3F39, 0x5C2C,
      0,      0, 0x4033,      0,      0,      0,      0,      0,
      0, 0x5C2A, 0x343D,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E6A4[] = {
 0x4F50, 0x5B76,      0,      0, 0x5C26, 0x3058,      0,      0,
 0x5B78,      0,      0, 0x4C3A, 0x5B7D, 0x3F22, 0x4447, 0x5B73,
      0,      0, 0x5C25,      0,      0,      0,      0,      0,
      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,      0,      0,      0, 0x464E,      0, 0x5C24,      0,
      0, 0x5C3B,      0,      0,      0, 0x5C3D,      0, 0x4458,
};
unsigned short utf8_to_euc_E6A5[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x4D4C,      0,      0,      0,      0,      0,
      0,      0,      0, 0x4976, 0x5C38, 0x424A,      0,      0,
      0, 0x5C3E, 0x413F,      0, 0x5C35, 0x5C42, 0x5C41,      0,
 0x466F, 0x5C40, 0x466A,      0,      0,      0,      0,      0,
 0x7A4F,      0, 0x5C44, 0x5C37,      0, 0x3648, 0x5C3A, 0x3D5D,
      0,      0,      0, 0x4760, 0x5C3C, 0x364B,      0, 0x5C34,
 0x5C36, 0x5C33,      0,      0, 0x4F30, 0x335A, 0x5C39,      0,
};
unsigned short utf8_to_euc_E6A6[] = {
      0, 0x5C43, 0x3335,      0,      0,      0,      0,      0,
      0,      0, 0x3A67,      0,      0,      0, 0x315D,      0,
      0, 0x5C54,      0,      0, 0x4F31, 0x5C57,      0,      0,
 0x7A51,      0,      0, 0x3F3A, 0x5C56,      0,      0,      0,
 0x5C55,      0,      0,      0,      0,      0,      0, 0x5C52,
      0,      0,      0,      0,      0,      0, 0x5C46,      0,
      0, 0x5C63, 0x5C45,      0, 0x5C58,      0,      0,      0,
      0,      0,      0, 0x5C50,      0,      0, 0x5C4B, 0x5C48,
};
unsigned short utf8_to_euc_E6A7[] = {
      0, 0x5C49,      0, 0x5C51,      0,      0,      0, 0x7422,
      0,      0, 0x5C4E, 0x393D, 0x4448, 0x4164, 0x5C4C,      0,
 0x5C47,      0,      0, 0x5C4A,      0,      0,      0,      0,
 0x4D4D, 0x4B6A,      0,      0,      0, 0x5C4F, 0x5C59,      0,
      0,      0, 0x7A52,      0,      0,      0,      0, 0x5C61,
 0x5C5A,      0,      0, 0x5C67,      0, 0x5C65,      0,      0,
      0,      0, 0x5C60,      0,      0,      0,      0,      0,
      0, 0x5C5F,      0, 0x4450,      0, 0x4165,      0, 0x5C5D,
};
unsigned short utf8_to_euc_E6A8[] = {
      0,      0, 0x5C5B,      0,      0, 0x5C62,      0,      0,
      0,      0, 0x5C68, 0x4875, 0x5C6E,      0,      0,      0,
      0,      0, 0x5C69, 0x5C6C, 0x5C66,      0,      0, 0x4374,
      0, 0x4938,      0, 0x5C5C,      0,      0, 0x5C64, 0x3E40,
      0, 0x4C4F, 0x5C78, 0x5C6B,      0,      0,      0,      0,
      0, 0x3822, 0x3223, 0x335F,      0,      0, 0x5C53,      0,
 0x7A53,      0,      0,      0,      0, 0x3E41, 0x5C70,      0,
 0x5C77, 0x3C79, 0x3372,      0,      0, 0x432E,      0,      0,
};
unsigned short utf8_to_euc_E6A9[] = {
      0,      0,      0,      0, 0x5C6D,      0, 0x7A55, 0x5C72,
 0x5C76,      0,      0, 0x3636,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x354C, 0x5C74,      0,      0,      0,      0,      0, 0x3521,
      0, 0x464B, 0x5C73,      0,      0,      0, 0x5C75,      0,
      0,      0,      0, 0x7A54,      0,      0,      0,      0,
      0,      0, 0x5C6F, 0x7A56,      0,      0,      0,      0,
 0x5C71,      0,      0,      0,      0,      0, 0x7A57, 0x3360,
};
unsigned short utf8_to_euc_E6AA[] = {
 0x4349,      0,      0,      0, 0x5C7C,      0,      0,      0,
      0,      0,      0,      0,      0, 0x5C7A, 0x3869,      0,
 0x5C79,      0,      0,      0,      0,      0,      0, 0x5D21,
      0,      0,      0,      0, 0x5B58,      0,      0,      0,
 0x5C7B,      0, 0x5C7D, 0x5C7E,      0,      0,      0,      0,
      0,      0, 0x5D2C,      0, 0x5D28,      0, 0x5B6D,      0,
      0,      0,      0, 0x5D27,      0,      0,      0,      0,
 0x5D26,      0,      0, 0x5D23,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E6AB[] = {
      0, 0x5C6A, 0x5D25, 0x5D24,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x5D2A,      0, 0x4F26,      0,      0,      0,      0,
      0,      0, 0x5D2D, 0x367B,      0,      0, 0x5D29, 0x5D2B,
      0,      0, 0x7A58,      0, 0x7A59,      0,      0,      0,
 0x4827,      0, 0x5D2E,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x5D32, 0x5D2F,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E6AC[] = {
      0,      0,      0,      0, 0x4D73, 0x5D30,      0,      0,
      0,      0, 0x5C5E,      0,      0,      0,      0,      0,
      0,      0, 0x5D33,      0,      0,      0, 0x5D34,      0,
      0,      0,      0,      0,      0, 0x3135,      0, 0x5D36,
 0x3767, 0x3C21,      0, 0x3655,      0,      0,      0, 0x3224,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x4D5F,      0,      0,      0,      0, 0x5D38,
 0x5D37, 0x5D3A, 0x353D,      0,      0, 0x3656, 0x343E,      0,
};
unsigned short utf8_to_euc_E6AD[] = {
      0,      0,      0, 0x5D3D,      0,      0,      0, 0x5D3C,
      0, 0x5D3E,      0,      0, 0x324E,      0, 0x4337,      0,
 0x5D3F,      0,      0, 0x343F, 0x5D41,      0,      0,      0,
      0, 0x5D40,      0, 0x5D42,      0,      0,      0, 0x5D43,
      0, 0x5D44, 0x3B5F, 0x4035, 0x3A21,      0, 0x4970,      0,
      0, 0x4A62, 0x4F44,      0,      0,      0,      0, 0x3B75,
      0,      0,      0, 0x3A50, 0x4E72,      0,      0,      0,
 0x5D45, 0x5D46,      0, 0x3B60,      0,      0,      0, 0x5D47,
};
unsigned short utf8_to_euc_E6AE[] = {
 0x5D48,      0,      0, 0x5D4A, 0x5D49,      0, 0x4B58,      0,
      0, 0x3D5E, 0x3C6C, 0x3B44,      0, 0x5D4B,      0,      0,
      0,      0,      0,      0,      0, 0x5D4D, 0x3F23,      0,
 0x5D4C,      0,      0,      0,      0,      0, 0x5D4E,      0,
      0,      0,      0,      0, 0x5D4F,      0,      0,      0,
      0,      0, 0x5D50, 0x5D51,      0,      0,      0, 0x5D52,
      0, 0x5D54, 0x5D53, 0x5D55, 0x3225, 0x434A,      0, 0x5D56,
      0,      0, 0x3B26, 0x334C, 0x5D57,      0,      0, 0x4542,
};
unsigned short utf8_to_euc_E6AF[] = {
 0x544C,      0,      0,      0,      0, 0x3523, 0x5D58,      0,
      0,      0,      0, 0x5D59,      0, 0x4A6C, 0x4B68,      0,
      0,      0, 0x4647, 0x5D5A, 0x4866,      0, 0x7A5A,      0,
 0x487B,      0,      0, 0x4C53,      0,      0,      0, 0x5D5B,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x5D5D, 0x5D5C,      0,      0, 0x5D5F,
      0,      0,      0, 0x5D5E,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E6B0[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
 0x5D61,      0,      0,      0,      0,      0,      0, 0x3B61,
      0, 0x4C31,      0, 0x5D62, 0x5D63,      0,      0, 0x3524,
      0,      0,      0, 0x5D64,      0,      0,      0,      0,
      0,      0,      0, 0x5D66, 0x5D65,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x3F65,      0,      0, 0x4939,
 0x314A,      0,      0,      0,      0,      0, 0x4845, 0x7A5B,
};
unsigned short utf8_to_euc_E6B1[] = {
 0x4475, 0x3D41, 0x3561,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x4846,      0,
 0x3C2E,      0,      0,      0,      0, 0x5D68,      0, 0x3440,
      0,      0, 0x3178,      0, 0x7A5C, 0x4672, 0x5D67, 0x393E,
 0x4353,      0, 0x5D69,      0,      0,      0,      0,      0,
 0x5D71,      0, 0x5D6A,      0,      0,      0,      0, 0x7A5E,
 0x4241,      0, 0x3562, 0x5D72,      0,      0,      0,      0,
      0,      0, 0x3768,      0,      0, 0x3525, 0x5D70,      0,
};
unsigned short utf8_to_euc_E6B2[] = {
      0, 0x5D6E, 0x5D6B, 0x4D60,      0,      0, 0x7A5D,      0,
 0x4440,      0,      0,      0, 0x4659, 0x5D6C,      0,      0,
 0x5D74,      0, 0x5D73, 0x3723,      0,      0, 0x322D,      0,
      0, 0x3A3B, 0x5D6D, 0x5D6F,      0,      0,      0,      0,
      0, 0x4B57, 0x4274,      0,      0,      0,      0,      0,
      0,      0,      0, 0x4B77,      0,      0, 0x5D7C,      0,
      0, 0x5D7D,      0, 0x324F,      0,      0,      0,      0,
 0x4A28, 0x4C7D, 0x5E21, 0x3C23, 0x3E42, 0x5D78, 0x5D7E, 0x3168,
};
unsigned short utf8_to_euc_E6B3[] = {
      0, 0x3637,      0,      0, 0x5D75, 0x5D7A,      0,      0,
      0, 0x4074, 0x4771,      0, 0x4867,      0,      0,      0,
      0,      0,      0, 0x5D77,      0, 0x4B21,      0, 0x5D79,
      0, 0x5E24, 0x7A5F, 0x5E22,      0, 0x5D7B,      0,      0,
      0, 0x4B22, 0x4748, 0x3563,      0, 0x4525,      0,      0,
 0x436D,      0, 0x5E25,      0,      0,      0,      0, 0x5E23,
 0x4259, 0x5D76,      0, 0x314B,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E6B4[] = {
      0,      0,      0,      0, 0x7A60,      0,      0,      0,
      0,      0,      0, 0x4D4E, 0x5E30,      0,      0,      0,
      0,      0, 0x5E2F,      0,      0,      0,      0, 0x4076,
      0, 0x5E2C,      0, 0x4D6C,      0,      0, 0x4636, 0x5E26,
      0,      0,      0,      0,      0, 0x4445,      0,      0,
      0, 0x314C, 0x393F, 0x5E29,      0,      0,      0,      0,
      0,      0, 0x3D27, 0x5E2E,      0, 0x5E2D, 0x5E28,      0,
 0x5E2B,      0,      0, 0x3368,      0, 0x5E2A, 0x4749,      0,
};
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,      0,
      0, 0x5E36, 0x5E34,      0, 0x494D,      0,      0,      0,
      0,      0,      0, 0x5E31, 0x5E33,      0, 0x313A,      0,
      0, 0x3940, 0x4F32,      0, 0x333D,      0, 0x4962, 0x7A62,
      0,      0,      0,      0, 0x4D61,      0,      0, 0x3324,
 0x3F3B, 0x5E35,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E6B6[] = {
      0,      0,      0,      0,      0, 0x5E3A,      0, 0x7A61,
 0x3E43,      0,      0,      0, 0x4D30,      0, 0x5E37,      0,
      0,      0,      0, 0x5E32,      0, 0x5E38, 0x7A63,      0,
      0, 0x4E5E,      0, 0x4573, 0x4642,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x7A64,      0,      0, 0x3336,
      0,      0, 0x3155,      0,      0, 0x5E3E,      0,      0,
 0x5E41,      0,      0,      0, 0x4E43,      0,      0,      0,
};
unsigned short utf8_to_euc_E6B7[] = {
 0x4D64,      0,      0,      0,      0, 0x5E48, 0x5E42, 0x5E3F,
      0,      0,      0, 0x4E54, 0x5E45,      0,      0, 0x7A65,
      0, 0x3D4A, 0x5E47,      0,      0, 0x5E4C,      0,      0,
 0x4571, 0x5E4A,      0,      0,      0,      0, 0x5E44,      0,
      0, 0x4338,      0,      0, 0x5E4B,      0, 0x5E40,      0,
 0x5E46,      0, 0x5E4D, 0x307C, 0x5E43,      0, 0x5E4E,      0,
      0, 0x3F3C, 0x7A67, 0x3D5F,      0, 0x4A25,      0, 0x3A2E,
 0x7A66, 0x5E3B, 0x5E49, 0x453A, 0x7A68,      0,      0,      0,
};
unsigned short utf8_to_euc_E6B8[] = {
      0,      0,      0,      0,      0, 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,      0, 0x5E5B,
 0x3574, 0x454F,      0, 0x5E56, 0x5E5F, 0x302F, 0x3132, 0x7A6B,
      0, 0x3239,      0, 0x5E58, 0x422C, 0x5E4F, 0x5E51, 0x3941,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x5E62, 0x7A69, 0x5E5D,      0, 0x7A6C,      0, 0x5E55,      0,
};
unsigned short utf8_to_euc_E6B9[] = {
      0,      0,      0, 0x5E5C,      0,      0,      0,      0,
      0,      0, 0x4C2B,      0,      0, 0x5E5A, 0x5E5E,      0,
      0,      0,      0,      0,      0,      0, 0x3850,      0,
 0x3E45,      0,      0, 0x4339, 0x7A6A,      0,      0, 0x5E54,
      0,      0,      0,      0,      0,      0,      0, 0x4D2F,
      0,      0,      0, 0x5E57,      0,      0, 0x5E50, 0x4572,
      0,      0, 0x5E53,      0,      0,      0, 0x5E59,      0,
      0,      0,      0,      0,      0,      0, 0x4F51, 0x3C3E,
};
unsigned short utf8_to_euc_E6BA[] = {
 0x4B7E,      0, 0x5E63,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x482E,      0,      0, 0x5E6F,
 0x383B,      0,      0,      0,      0,      0, 0x3D60,      0,
 0x5E65,      0,      0,      0, 0x4E2F, 0x3942,      0, 0x5E72,
      0,      0, 0x306E,      0,      0, 0x5E70,      0,      0,
      0,      0, 0x5E64,      0,      0,      0,      0, 0x5E6A,
      0,      0, 0x5E6C,      0,      0,      0, 0x4D4F, 0x5E67,
      0,      0, 0x452E,      0,      0, 0x5E69,      0, 0x7A6D,
};
unsigned short utf8_to_euc_E6BB[] = {
      0,      0, 0x5E71,      0, 0x5E6B, 0x4C47,      0,      0,
      0, 0x5E66,      0, 0x3C22, 0x5E7E,      0,      0,      0,
      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,      0, 0x5E76,      0,      0, 0x5E7C,
      0,      0, 0x5E7A,      0, 0x4529,      0,      0, 0x5F23,
 0x5E77,      0,      0,      0,      0,      0, 0x5E78, 0x5E60,
};
unsigned short utf8_to_euc_E6BC[] = {
      0, 0x3579, 0x493A,      0,      0,      0, 0x3C3F,      0,
      0, 0x3977,      0,      0,      0,      0,      0, 0x4F33,
      0, 0x5E74,      0, 0x5F22, 0x3169, 0x4166,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x4779,      0, 0x3441, 0x4E7A,      0,      0,      0,      0,
      0,      0,      0, 0x4C21, 0x4452,      0,      0,      0,
      0, 0x5E7B, 0x5E7D,      0,      0,      0,      0,      0,
 0x4132,      0,      0,      0,      0,      0, 0x5F21, 0x5E79,
};
unsigned short utf8_to_euc_E6BD[] = {
      0, 0x5E73,      0,      0,      0, 0x3443,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x3769,      0,      0,      0,
 0x5F2F,      0,      0, 0x5F2A, 0x4078,      0,      0, 0x3363,
      0,      0,      0,      0, 0x3D61,      0, 0x5F33,      0,
      0,      0,      0,      0,      0, 0x5F2C, 0x442C, 0x5F29,
 0x4459,      0,      0,      0, 0x5F4C,      0,      0,      0,
 0x5F26,      0, 0x5F25,      0, 0x5F2E,      0,      0,      0,
};
unsigned short utf8_to_euc_E6BE[] = {
 0x5F28, 0x5F27, 0x5F2D,      0, 0x4021,      0, 0x5F24,      0,
 0x7A6E,      0,      0,      0,      0,      0, 0x5F30,      0,
      0, 0x5F31,      0,      0,      0,      0,      0, 0x3442,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x5F36,      0, 0x5F35, 0x5F37,      0,      0,      0,
      0,      0, 0x5F3A,      0,      0,      0,      0,      0,
      0, 0x4543,      0, 0x5F34,      0, 0x7A6F,      0,      0,
      0, 0x5F38,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E6BF[] = {
 0x3763, 0x4279, 0x5F32, 0x473B,      0,      0, 0x5F39,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x5F3E, 0x5F3C,      0,      0,
 0x5F3F,      0,      0, 0x5F42,      0,      0,      0, 0x5F3B,
 0x396A, 0x4728,      0,      0, 0x5E39,      0,      0,      0,
      0,      0,      0, 0x4D74, 0x5F3D,      0, 0x5F41, 0x4275,
      0, 0x5F40,      0, 0x5F2B,      0, 0x7A70, 0x6F69,      0,
      0,      0, 0x5F45,      0,      0,      0, 0x5F49,      0,
};
unsigned short utf8_to_euc_E780[] = {
      0, 0x5F47,      0,      0,      0, 0x7A71,      0, 0x7A72,
      0, 0x5F43,      0, 0x5F44,      0,      0,      0, 0x5F48,
      0, 0x5F46,      0,      0,      0, 0x494E,      0,      0,
 0x5F4E,      0, 0x5F4B, 0x5F4A,      0, 0x5F4D, 0x4654, 0x5F4F,
      0,      0,      0,      0,      0,      0, 0x4375, 0x426D,
 0x7A73,      0,      0,      0, 0x4025,      0,      0,      0,
 0x5F50,      0, 0x5F52,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x5F51,      0,
};
unsigned short utf8_to_euc_E781[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x5E75,      0,      0,      0,
      0, 0x5F53,      0,      0,      0,      0,      0,      0,
 0x4667,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x5F54,      0,      0,      0,      0,
      0,      0,      0, 0x3250,      0,      0,      0, 0x4574,
 0x3325,      0,      0,      0,      0,      0,      0,      0,
 0x3564,      0,      0,      0, 0x3C5E, 0x3A52,      0,      0,
};
unsigned short utf8_to_euc_E782[] = {
      0,      0,      0,      0,      0, 0x7A74,      0,      0,
      0, 0x4F27, 0x3F66,      0,      0,      0, 0x316A,      0,
      0,      0, 0x5F56,      0,      0,      0,      0,      0,
      0, 0x5F55,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x7A75, 0x5F59, 0x433A, 0x5F5C, 0x5F57,
      0,      0,      0, 0x5F5B,      0,      0,      0,      0,
 0x5F5A, 0x4540, 0x3059, 0x7927,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E783[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
 0x4E75,      0,      0, 0x5F5E,      0,      0,      0, 0x3128,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x5F60,      0,      0,      0, 0x5F5F,      0, 0x5F5D,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x5F58,      0,      0,      0,      0,      0,      0,
      0, 0x4B23,      0,      0,      0, 0x5F62,      0,      0,
};
unsigned short utf8_to_euc_E784[] = {
      0,      0,      0,      0, 0x7A77,      0,      0,      0,
      0, 0x5F61,      0,      0,      0,      0,      0, 0x7A76,
      0,      0,      0,      0, 0x316B,      0,      0,      0,
      0, 0x5F64, 0x4A32,      0, 0x5F63,      0,      0,      0,
      0, 0x4C35,      0,      0,      0,      0, 0x3E47,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x4133,      0,
      0,      0,      0,      0, 0x3E46,      0,      0,      0,
};
unsigned short utf8_to_euc_E785[] = {
      0,      0,      0,      0,      0,      0, 0x7A79, 0x7A7A,
      0, 0x4E7B,      0,      0, 0x5F6A,      0, 0x4079,      0,
      0,      0,      0,      0,      0, 0x5F66, 0x5F6B,      0,
      0, 0x316C,      0,      0, 0x7A78,      0,      0,      0,
      0,      0, 0x5F69,      0, 0x4761, 0x5F65, 0x5F68, 0x3E48,
      0, 0x4851,      0,      0, 0x5F6C,      0, 0x3C51,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0x407A,      0,      0,
};
unsigned short utf8_to_euc_E786[] = {
      0,      0,      0,      0, 0x5F6F,      0,      0,      0,
 0x5F67,      0, 0x3727,      0,      0,      0,      0, 0x5F6D,
      0,      0,      0,      0, 0x4D50, 0x5F70,      0,      0,
      0, 0x7426,      0,      0,      0,      0,      0, 0x3D4F,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x5F71,      0,      0,      0, 0x5F72,      0,      0,      0,
      0, 0x472E,      0,      0,      0,      0,      0,      0,
      0, 0x5F74,      0,      0,      0,      0, 0x5F75,      0,
};
unsigned short utf8_to_euc_E787[] = {
      0, 0x7A7C,      0, 0x4733,      0,      0,      0,      0,
 0x4575, 0x5F77,      0,      0,      0,      0, 0x5F79,      0,
 0x4E55,      0, 0x5F76,      0, 0x5F78, 0x316D,      0, 0x5F73,
      0,      0,      0,      0,      0,      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,
      0, 0x6021,      0, 0x5F6E, 0x5F7E,      0, 0x7A7D, 0x6022,
};
unsigned short utf8_to_euc_E788[] = {
      0,      0,      0,      0,      0,      0, 0x477A,      0,
      0,      0,      0,      0,      0, 0x6023,      0,      0,
 0x6024,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x6025,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x6026,      0, 0x445E,      0, 0x6028, 0x6027,      0,      0,
 0x6029,      0, 0x602A,      0,      0, 0x3C5F, 0x4963,      0,
      0,      0, 0x4C6C, 0x602B, 0x602C, 0x4156, 0x3C24, 0x602D,
};
unsigned short utf8_to_euc_E789[] = {
 0x602E,      0,      0,      0,      0,      0, 0x602F, 0x4A52,
 0x4847,      0,      0, 0x6030, 0x4757,      0,      0,      0,
      0,      0, 0x442D,      0,      0,      0,      0,      0,
 0x6031, 0x3267,      0, 0x356D,      0, 0x4C46,      0, 0x4C36,
      0, 0x3234, 0x4F34,      0,      0,      0,      0, 0x4B52,
      0, 0x4A2A,      0,      0,      0,      0,      0,      0,
      0,      0, 0x4037,      0, 0x6032,      0,      0,      0,
      0, 0x4643,      0,      0,      0, 0x3823, 0x6033,      0,
};
unsigned short utf8_to_euc_E78A[] = {
 0x3A54, 0x6035, 0x6034,      0,      0,      0,      0, 0x6036,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x6037,      0,      0,      0, 0x6038,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x353E,      0, 0x6039,      0,      0,      0,      0, 0x603A,
      0,      0,      0,      0, 0x3824,      0,      0, 0x4848,
      0, 0x7A7E, 0x603C,      0,      0,      0, 0x3E75,      0,
      0, 0x603B,      0,      0,      0,      0, 0x7B21,      0,
};
unsigned short utf8_to_euc_E78B[] = {
      0,      0, 0x3638, 0x603D, 0x603F,      0, 0x603E,      0,
      0,      0,      0,      0,      0,      0, 0x6040,      0,
 0x3851,      0, 0x6041,      0,      0,      0,      0, 0x3669,
      0, 0x4140,      0, 0x397D,      0,      0,      0,      0,
 0x6043, 0x6044, 0x6042,      0,      0,      0,      0,      0,
      0, 0x3C6D,      0,      0, 0x4648, 0x3639,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x6046,
 0x432C, 0x6045,      0,      0, 0x4F35, 0x4762,      0,      0,
};
unsigned short utf8_to_euc_E78C[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x6049,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x604B, 0x6048,
      0,      0,      0, 0x4C54, 0x604A, 0x604C,      0, 0x4E44,
      0,      0,      0,      0, 0x7B22, 0x6050,      0,      0,
      0, 0x604F, 0x4376, 0x472D,      0,      0, 0x3825, 0x604E,
      0,      0,      0,      0, 0x604D,      0, 0x4D31, 0x4D32,
      0,      0,      0,      0,      0,      0, 0x6051, 0x316E,
};
unsigned short utf8_to_euc_E78D[] = {
      0,      0,      0,      0, 0x3976, 0x3B62,      0,      0,
      0,      0,      0,      0,      0,      0, 0x6052, 0x6053,
      0,      0,      0,      0,      0,      0,      0, 0x6055,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x3D43,      0,      0,      0,      0,
 0x6057,      0, 0x6056,      0,      0,      0,      0,      0,
 0x6058,      0, 0x334D,      0,      0, 0x605A,      0, 0x7B24,
 0x6059,      0, 0x605C, 0x605B,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E78E[] = {
      0,      0,      0,      0, 0x383C,      0,      0, 0x4E28,
      0, 0x364C,      0, 0x3226,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x366A,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x3461,      0,      0,      0,      0,      0,      0,
      0,      0, 0x4E68, 0x605E,      0,      0,      0,      0,
      0,      0,      0, 0x6060,      0, 0x7B25,      0,      0,
};
unsigned short utf8_to_euc_E78F[] = {
 0x6061,      0, 0x3251,      0,      0,      0,      0,      0,
 0x605D, 0x7B26, 0x3B39,      0,      0, 0x4441, 0x605F,      0,
      0,      0, 0x7B29,      0,      0,      0, 0x7B27,      0,
      0,      0,      0,      0,      0,      0, 0x6064,      0,
 0x3C6E,      0,      0, 0x7B28,      0, 0x6062,      0,      0,
      0,      0, 0x373E,      0,      0, 0x4849, 0x6063,      0,
      0, 0x607E,      0,      0,      0, 0x7B2B,      0,      0,
 0x6069,      0,      0,      0,      0,      0, 0x383D,      0,
};
unsigned short utf8_to_euc_E790[] = {
      0,      0,      0, 0x3565,      0, 0x6066, 0x4D7D, 0x7B2A,
      0, 0x4E30,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x4276,      0,      0, 0x6068, 0x7B2C,      0,
      0, 0x7B2E, 0x7B2D,      0,      0,      0, 0x7B2F,      0,
      0,      0, 0x606A, 0x4E56, 0x3657, 0x487C, 0x474A,      0,
      0,      0, 0x606B,      0,      0,      0,      0, 0x606D,
};
unsigned short utf8_to_euc_E791[] = {
      0, 0x6070,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0x606C,      0,      0,
      0, 0x606F, 0x386A, 0x314D, 0x6071,      0, 0x3F70, 0x606E,
 0x4E5C,      0, 0x7B30, 0x6074, 0x7424,      0,      0,      0,
      0, 0x6072, 0x6075,      0,      0,      0,      0, 0x6067,
 0x6073,      0,      0, 0x3A3C,      0,      0, 0x6076,      0,
      0,      0,      0,      0,      0,      0, 0x6077,      0,
};
unsigned short utf8_to_euc_E792[] = {
      0,      0,      0, 0x4D7E,      0,      0,      0,      0,
      0, 0x7B31,      0, 0x6078,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x6079, 0x7B32,
      0,      0, 0x6065,      0,      0,      0,      0, 0x607A,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x3444,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0x3C25,      0,      0,
};
unsigned short utf8_to_euc_E793[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x607B,      0,      0,      0,      0, 0x607C,
      0,      0,      0,      0, 0x607D,      0,      0,      0,
      0,      0,      0,      0, 0x313B,      0,      0,      0,
 0x6121,      0, 0x493B, 0x6122,      0,      0, 0x3424, 0x6123,
      0, 0x6124,      0,      0,      0,      0, 0x6125,      0,
 0x6127, 0x6128, 0x6126,      0,      0,      0, 0x4953, 0x612A,
 0x6129,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E794[] = {
      0, 0x7B33,      0, 0x612C, 0x612B, 0x612D,      0,      0,
      0,      0,      0,      0, 0x612E, 0x6130, 0x612F,      0,
      0, 0x3979,      0, 0x6132,      0, 0x6131,      0,      0,
 0x3445,      0, 0x3F53,      0, 0x453C,      0, 0x6133, 0x4038,
      0,      0,      0, 0x3B3A,      0, 0x3179, 0x6134,      0,
 0x4D51,      0,      0, 0x4A63, 0x6135,      0,      0, 0x796C,
 0x4544, 0x4D33, 0x3943, 0x3F3D,      0,      0,      0, 0x434B,
 0x5234,      0, 0x442E, 0x3268, 0x6136,      0,      0,      0,
};
unsigned short utf8_to_euc_E795[] = {
      0,      0,      0,      0, 0x6137,      0, 0x613C,      0,
      0, 0x613A, 0x6139, 0x5A42, 0x3326, 0x6138,      0, 0x305A,
      0, 0x482A,      0,      0, 0x484A,      0,      0,      0,
      0, 0x4E31, 0x613D, 0x613B, 0x435C, 0x4026,      0,      0,
 0x482B,      0, 0x492D,      0, 0x613F, 0x4E2C, 0x374D, 0x6140,
      0, 0x613E, 0x4856, 0x6141,      0, 0x6142,      0, 0x7B34,
 0x305B,      0,      0, 0x3E76, 0x6147,      0, 0x6144, 0x466D,
 0x6143,      0,      0,      0,      0,      0,      0, 0x3526,
};
unsigned short utf8_to_euc_E796[] = {
      0,      0, 0x614A,      0,      0,      0, 0x6145, 0x6146,
      0, 0x6149, 0x6148, 0x4925,      0,      0, 0x4142, 0x4141,
      0, 0x353F,      0,      0, 0x614B,      0,      0,      0,
      0,      0, 0x614C,      0,      0, 0x614D,      0,      0,
      0,      0,      0, 0x614F,      0, 0x614E,      0,      0,
      0,      0,      0, 0x3156,      0,      0,      0,      0,
      0, 0x6157, 0x4868, 0x6151,      0, 0x6153,      0,      0,
 0x6155, 0x3F3E,      0,      0, 0x6156, 0x6154, 0x3C40,      0,
};
unsigned short utf8_to_euc_E797[] = {
      0,      0, 0x6150, 0x6152,      0, 0x4942,      0, 0x3E49,
      0,      0, 0x6159,      0,      0, 0x6158,      0,      0,
      0,      0, 0x615A,      0, 0x3C26, 0x3A2F,      0,      0,
 0x4577, 0x615B,      0, 0x444B,      0,      0, 0x615D,      0,
      0,      0, 0x4E21, 0x615C,      0,      0,      0,      0,
      0, 0x4169,      0,      0,      0,      0,      0,      0,
 0x6162,      0, 0x6164, 0x6165, 0x4354,      0,      0,      0,
      0,      0, 0x6163,      0, 0x6160,      0, 0x615E, 0x615F,
};
unsigned short utf8_to_euc_E798[] = {
      0, 0x6161,      0,      0,      0,      0,      0,      0,
      0, 0x6168,      0, 0x6166,      0, 0x6167,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x6169,
 0x616B, 0x616C, 0x616D,      0, 0x616E,      0,      0, 0x616A,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x6170,      0,      0,      0, 0x616F,      0,      0,      0,
      0,      0,      0, 0x6171,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E799[] = {
      0,      0, 0x4E45,      0,      0,      0, 0x6174, 0x6172,
 0x6173,      0,      0,      0, 0x3462,      0,      0,      0,
      0,      0, 0x4C7E,      0,      0,      0, 0x4A4A,      0,
 0x6176,      0,      0,      0, 0x6175,      0,      0,      0,
      0, 0x6177, 0x6178,      0,      0,      0,      0, 0x617C,
 0x6179, 0x617A, 0x617B,      0, 0x617D,      0,      0,      0,
 0x617E,      0, 0x6221,      0,      0,      0, 0x6222,      0,
 0x6223,      0, 0x482F, 0x4550, 0x6224, 0x4772, 0x4934,      0,
};
unsigned short utf8_to_euc_E79A[] = {
 0x6225,      0, 0x7B35, 0x6226, 0x452A,      0, 0x3327, 0x3944,
 0x6227,      0,      0, 0x6228,      0,      0, 0x6229,      0,
 0x3B29,      0,      0, 0x622B,      0,      0, 0x622A,      0,
      0, 0x622C, 0x622D, 0x7B38, 0x7B36,      0, 0x7B37,      0,
      0,      0,      0,      0,      0,      0, 0x7B39,      0,
      0,      0,      0,      0,      0,      0, 0x4869,      0,
 0x622E,      0,      0,      0, 0x622F,      0,      0, 0x7369,
 0x6230, 0x6231, 0x6232,      0,      0,      0,      0, 0x3B2E,
};
unsigned short utf8_to_euc_E79B[] = {
      0,      0, 0x6233, 0x4756,      0,      0, 0x4B5F,      0,
 0x314E,      0, 0x3157,      0,      0, 0x6234,      0,      0,
      0,      0, 0x6236,      0,      0,      0, 0x6235, 0x4570,
      0,      0,      0, 0x4039, 0x5D39,      0, 0x6237, 0x4C41,
      0, 0x6238,      0, 0x3446, 0x4857, 0x6239,      0, 0x623A,
      0,      0, 0x623B,      0,      0,      0, 0x4C5C,      0,
      0,      0, 0x4C55,      0, 0x443E,      0,      0,      0,
 0x416A,      0,      0, 0x623D,      0,      0, 0x3D62,      0,
};
unsigned short utf8_to_euc_E79C[] = {
      0, 0x3E4A,      0,      0, 0x6240,      0,      0, 0x623F,
 0x623E, 0x487D,      0, 0x3447, 0x3829,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x6246,      0,      0, 0x6243, 0x3F3F,
 0x4C32,      0,      0,      0, 0x6242, 0x6244, 0x6245,      0,
      0, 0x6241,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x6247,
 0x6248,      0, 0x442F,      0, 0x3463,      0,      0,      0,
};
unsigned short utf8_to_euc_E79D[] = {
 0x4365,      0,      0,      0,      0,      0, 0x7B3B, 0x6249,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x624A, 0x624D,      0,      0,      0,      0,
      0, 0x3F67,      0, 0x4644,      0, 0x624E, 0x4B53,      0,
 0x624B,      0,      0, 0x624C,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x6251,      0,      0,      0,      0, 0x6250, 0x624F,
};
unsigned short utf8_to_euc_E79E[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x6253,      0,      0, 0x6252,      0,
      0, 0x6254,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x6256,      0,
 0x6255,      0,      0,      0,      0, 0x4A4D,      0,      0,
      0,      0,      0,      0, 0x3D56, 0x4E46,      0,      0,
 0x6257,      0,      0, 0x4637,      0,      0, 0x6258,      0,
      0, 0x6259,      0, 0x625D, 0x625B, 0x625C,      0, 0x625A,
};
unsigned short utf8_to_euc_E79F[] = {
      0,      0,      0,      0,      0,      0,      0, 0x625E,
      0,      0,      0,      0,      0, 0x625F,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x6260,
      0,      0, 0x6261, 0x4C37, 0x6262,      0,      0,      0,
      0,      0, 0x4C70, 0x6263,      0, 0x434E,      0, 0x476A,
      0, 0x366B,      0,      0,      0, 0x433B, 0x6264, 0x363A,
      0,      0,      0, 0x4050,      0,      0,      0,      0,
      0,      0,      0,      0, 0x6265,      0,      0,      0,
};
unsigned short utf8_to_euc_E7A0[] = {
      0,      0, 0x3A3D,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x6266,      0,      0,      0,
      0,      0, 0x6267,      0, 0x3826, 0x3A55,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x6269, 0x7B3D,      0,      0,      0, 0x4556, 0x3A56, 0x354E,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x4B24,      0, 0x474B,      0,      0,      0,
      0,      0, 0x4557,      0,      0,      0,      0, 0x395C,
};
unsigned short utf8_to_euc_E7A1[] = {
      0,      0,      0,      0,      0, 0x626B,      0,      0,
      0,      0,      0,      0,      0,      0, 0x7B3E,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0x3E4B,      0,      0,
      0,      0,      0,      0, 0x7B3F,      0,      0,      0,
      0,      0,      0, 0x4E32, 0x3945,      0,      0, 0x3827,
      0,      0, 0x4823,      0, 0x626D,      0,      0,      0,
      0,      0, 0x7B40,      0, 0x626F,      0,      0,      0,
};
unsigned short utf8_to_euc_E7A2[] = {
      0, 0x386B,      0,      0,      0,      0, 0x626E, 0x4476,
      0,      0,      0,      0, 0x6271, 0x3337, 0x626C,      0,
      0, 0x486A,      0, 0x3130,      0, 0x3A6C,      0, 0x4F52,
      0,      0, 0x6270,      0,      0,      0,      0,      0,
      0,      0,      0, 0x6272,      0,      0,      0, 0x4A4B,
      0, 0x4059, 0x6274,      0,      0,      0,      0, 0x6275,
      0,      0,      0,      0,      0, 0x6273,      0,      0,
      0,      0, 0x334E,      0, 0x627B,      0, 0x627A,      0,
};
unsigned short utf8_to_euc_E7A3[] = {
      0, 0x3C27,      0,      0,      0, 0x627C, 0x6277,      0,
      0,      0, 0x627D, 0x6278,      0,      0,      0,      0,
 0x4858, 0x6276,      0,      0, 0x6279,      0,      0,      0,
      0,      0, 0x6322,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x6321,
 0x4B61,      0,      0,      0, 0x627E,      0,      0, 0x306B,
      0,      0,      0,      0, 0x6324,      0,      0,      0,
      0,      0,      0,      0,      0, 0x6323,      0,      0,
};
unsigned short utf8_to_euc_E7A4[] = {
      0, 0x3E4C,      0,      0,      0,      0,      0, 0x6325,
      0,      0,      0,      0,      0,      0, 0x4143,      0,
      0, 0x6327, 0x6326,      0,      0,      0,      0,      0,
      0, 0x6328,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x6268,      0,
      0,      0, 0x626A, 0x632A, 0x6329,      0,      0,      0,
 0x7B41,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x3C28,      0, 0x4E69,      0, 0x3C52,      0,
};
unsigned short utf8_to_euc_E7A5[] = {
 0x632B, 0x3737,      0,      0,      0,      0,      0, 0x3540,
 0x3527, 0x3B63,      0,      0,      0,      0,      0,      0,
 0x4D34,      0,      0, 0x6331,      0, 0x6330, 0x4144, 0x632D,
      0,      0, 0x632F,      0,      0, 0x3D4B, 0x3F40, 0x632E,
 0x632C,      0, 0x472A,      0,      0, 0x3E4D,      0,      0,
 0x493C,      0,      0,      0,      0, 0x3A57,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x4578,
      0,      0, 0x6332,      0,      0,      0,      0, 0x6333,
};
unsigned short utf8_to_euc_E7A6[] = {
 0x6349, 0x3658,      0,      0, 0x4F3D, 0x4135,      0,      0,
      0,      0, 0x6334,      0,      0, 0x3252, 0x4477, 0x4A21,
      0,      0,      0,      0, 0x7B45,      0,      0,      0,
      0,      0,      0, 0x7B47,      0, 0x6335,      0,      0,
      0,      0,      0,      0,      0,      0, 0x357A, 0x6336,
      0,      0, 0x6338,      0,      0,      0, 0x6339,      0,
 0x4729,      0,      0, 0x633A,      0,      0,      0,      0,
      0, 0x633B, 0x633C,      0,      0, 0x3659, 0x3253, 0x4645,
};
unsigned short utf8_to_euc_E7A7[] = {
 0x3D28, 0x3B64,      0,      0,      0,      0,      0,      0,
      0, 0x633D,      0, 0x3D29,      0,      0,      0,      0,
      0, 0x324A, 0x4943,      0,      0, 0x633E,      0,      0,
 0x486B,      0,      0,      0,      0,      0,      0, 0x4145,
      0, 0x6341,      0, 0x6342, 0x4769,      0, 0x3F41, 0x633F,
      0, 0x4361,      0,      0, 0x6340,      0,      0,      0,
 0x3E4E,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x305C,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E7A8[] = {
 0x3529,      0,      0,      0,      0,      0,      0,      0,
 0x6343,      0,      0, 0x4478,      0, 0x6344, 0x4047,      0,
      0,      0,      0,      0, 0x4C2D,      0,      0, 0x4923,
 0x6345, 0x6346, 0x4355,      0, 0x4E47,      0,      0, 0x6348,
 0x6347,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x3C6F,      0,
      0, 0x634A, 0x3070,      0,      0,      0,      0, 0x634D,
      0,      0,      0, 0x634B, 0x3254, 0x374E, 0x634C, 0x3946,
};
unsigned short utf8_to_euc_E7A9[] = {
 0x3972,      0, 0x4A66, 0x634E,      0,      0, 0x4B54,      0,
      0, 0x6350,      0,      0,      0, 0x4051, 0x314F, 0x323A,
 0x302C,      0,      0,      0,      0,      0,      0, 0x634F,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x6351, 0x6352, 0x3E77,      0,      0,      0,      0,
      0, 0x6353,      0, 0x334F,      0,      0,      0,      0,
 0x6355,      0,      0,      0, 0x376A,      0, 0x3566,      0,
      0, 0x6356, 0x3675,      0,      0, 0x6357,      0, 0x407C,
};
unsigned short utf8_to_euc_E7AA[] = {
      0, 0x464D,      0, 0x4060, 0x3A75,      0,      0,      0,
 0x6358,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x4362, 0x416B,      0, 0x635A, 0x635C, 0x6359,
 0x635B,      0,      0,      0,      0,      0,      0, 0x3722,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x635D, 0x3726,      0,      0,      0, 0x3567, 0x4D52,
 0x635F,      0,      0,      0,      0,      0, 0x6360,      0,
      0,      0, 0x312E,      0,      0,      0,      0, 0x6363,
};
unsigned short utf8_to_euc_E7AB[] = {
      0,      0,      0, 0x3376, 0x6362, 0x6361,      0, 0x6365,
 0x635E,      0, 0x6366, 0x4E29,      0, 0x6367,      0, 0x6368,
      0, 0x7B48, 0x5474, 0x636A,      0, 0x6369,      0,      0,
      0, 0x636B, 0x636C,      0, 0x4E35, 0x636D,      0, 0x706F,
 0x3E4F, 0x636E, 0x636F, 0x3D57,      0, 0x4638, 0x6370, 0x7B49,
      0,      0, 0x4328, 0x7B4B,      0, 0x6371,      0, 0x433C,
 0x6372,      0,      0,      0,      0,      0, 0x3625,      0,
 0x513F, 0x435D, 0x3C33,      0,      0,      0,      0, 0x3448,
};
unsigned short utf8_to_euc_E7AC[] = {
      0,      0, 0x6373,      0, 0x6422,      0, 0x6376,      0,
 0x3568,      0, 0x6375, 0x6424,      0,      0,      0, 0x6374,
      0, 0x3E50,      0,      0,      0,      0,      0,      0,
 0x6378, 0x6379,      0, 0x452B,      0,      0, 0x637A,      0,
 0x335E,      0,      0,      0,      0, 0x3F5A, 0x4964,      0,
 0x637C,      0,      0,      0, 0x4268,      0,      0,      0,
      0,      0,      0, 0x6377,      0, 0x637B, 0x637D,      0,
      0, 0x3A7B,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E7AD[] = {
      0,      0,      0,      0,      0, 0x6426, 0x492E,      0,
 0x4826, 0x4579,      0, 0x365A, 0x6425, 0x6423,      0, 0x4835,
 0x637E, 0x435E, 0x457B,      0, 0x457A,      0, 0x3A76,      0,
      0,      0,      0,      0,      0, 0x6438,      0,      0,
      0,      0,      0,      0,      0, 0x6428,      0, 0x642A,
      0,      0,      0,      0, 0x642D,      0, 0x642E,      0,
 0x642B, 0x642C,      0,      0, 0x6429, 0x6427,      0,      0,
      0,      0, 0x6421,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E7AE[] = {
      0,      0,      0,      0,      0,      0, 0x4A4F, 0x3255,
      0,      0,      0, 0x6435,      0, 0x6432,      0, 0x6437,
      0,      0, 0x6436,      0, 0x4773, 0x4C27,      0, 0x3B3B,
 0x6430, 0x6439, 0x6434,      0, 0x6433, 0x642F, 0x7B4C, 0x6431,
      0, 0x3449,      0,      0,      0,      0,      0,      0,
      0,      0, 0x433D,      0,      0, 0x407D,      0,      0,
      0, 0x4822,      0,      0, 0x643E,      0,      0,      0,
 0x4824,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E7AF[] = {
 0x4061, 0x643B,      0,      0, 0x484F,      0, 0x643F, 0x4A53,
      0, 0x435B,      0, 0x643A, 0x643C,      0,      0, 0x643D,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0x6440,      0,      0,
 0x3C44,      0,      0,      0, 0x4646, 0x6445, 0x6444,      0,
      0, 0x6441,      0,      0,      0, 0x4F36,      0,      0,
      0,      0,      0, 0x644A,      0,      0, 0x644E, 0x644B,
      0,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E7B0[] = {
 0x6447,      0,      0,      0,      0,      0,      0, 0x6448,
      0,      0,      0,      0,      0, 0x644D,      0,      0,
      0, 0x6442, 0x5255, 0x6449, 0x6443,      0,      0, 0x644C,
      0,      0,      0,      0,      0,      0,      0, 0x6452,
      0, 0x344A,      0, 0x644F,      0,      0,      0, 0x6450,
      0,      0, 0x6451, 0x6454,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x6453,
 0x4876,      0,      0,      0,      0, 0x6455, 0x4E7C, 0x4A6D,
};
unsigned short utf8_to_euc_E7B1[] = {
 0x645A,      0,      0, 0x6457,      0,      0,      0,      0,
      0,      0,      0,      0, 0x6456, 0x4052,      0, 0x6459,
 0x645B,      0,      0,      0, 0x6458,      0, 0x645F,      0,
 0x645C,      0,      0,      0,      0,      0,      0, 0x645D,
 0x6446,      0,      0,      0, 0x645E, 0x6460,      0,      0,
      0,      0,      0,      0, 0x6461,      0,      0,      0,
      0,      0,      0, 0x4A46,      0, 0x6462,      0,      0,
      0,      0,      0,      0,      0,      0, 0x4C62,      0,
};
unsigned short utf8_to_euc_E7B2[] = {
      0, 0x364E, 0x3729, 0x6463,      0,      0,      0,      0,
      0, 0x4A34,      0, 0x3F68,      0, 0x4C30,      0,      0,
 0x6464,      0, 0x4E33,      0,      0, 0x4774,      0, 0x4146,
 0x4734,      0,      0, 0x3D4D,      0,      0,      0, 0x3040,
      0, 0x6469, 0x6467,      0, 0x6465, 0x3421,      0, 0x3E51,
 0x646A,      0,      0, 0x6468,      0, 0x6466, 0x646E,      0,
      0, 0x646D, 0x646C, 0x646B,      0,      0,      0,      0,
      0, 0x646F,      0,      0,      0, 0x6470, 0x403A,      0,
};
unsigned short utf8_to_euc_E7B3[] = {
 0x6471,      0, 0x6473,      0,      0, 0x6472,      0,      0,
      0,      0, 0x3852,      0,      0,      0, 0x4138,      0,
      0,      0, 0x6475,      0,      0,      0, 0x457C,      0,
 0x6474,      0,      0,      0, 0x6476,      0, 0x4A35, 0x416C,
 0x3947,      0, 0x6477,      0,      0,      0,      0, 0x4E48,
      0,      0,      0,      0,      0,      0,      0, 0x6479,
      0,      0, 0x647A,      0, 0x647B,      0, 0x647C,      0,
 0x3B65,      0, 0x647D, 0x374F,      0,      0, 0x356A,      0,
};
unsigned short utf8_to_euc_E7B4[] = {
 0x352A,      0, 0x6521,      0, 0x4C73, 0x3948, 0x647E,      0,
      0,      0, 0x6524, 0x4C66,      0, 0x473C,      0,      0,
 0x4933,      0,      0,      0, 0x3D63, 0x6523,      0, 0x3C53,
 0x3949, 0x3B66, 0x3569, 0x4A36, 0x6522,      0,      0,      0,
 0x4147, 0x4B42, 0x3A77,      0,      0,      0,      0,      0,
      0,      0,      0, 0x3B67, 0x445D,      0, 0x6527, 0x4E5F,
 0x3A59,      0, 0x6528, 0x3F42,      0, 0x652A,      0,      0,
      0, 0x3E52, 0x3A30,      0,      0,      0,      0, 0x6529,
};
unsigned short utf8_to_euc_E7B5[] = {
      0,      0, 0x3D2A, 0x383E, 0x4148, 0x6525, 0x652B,      0,
 0x7B4E,      0,      0, 0x6526, 0x3750,      0, 0x652E, 0x6532,
 0x376B,      0,      0,      0,      0,      0, 0x652D,      0,
      0,      0,      0, 0x6536, 0x7B4F,      0, 0x394A,      0,
      0, 0x4D6D, 0x303C, 0x6533,      0,      0, 0x356B,      0,
 0x6530,      0,      0,      0,      0,      0, 0x6531,      0,
      0, 0x457D, 0x652F, 0x652C,      0, 0x3328, 0x4064,      0,
      0, 0x3828,      0,      0,      0, 0x6538,      0,      0,
};
unsigned short utf8_to_euc_E7B6[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x6535,      0,      0,      0,      0,      0, 0x6537,
      0,      0,      0, 0x6534,      0,      0,      0,      0,
      0, 0x3751, 0x4233, 0x6539, 0x416E,      0,      0, 0x6546,
 0x7B51,      0, 0x6542, 0x653C,      0,      0,      0,      0,
      0,      0,      0, 0x6540, 0x3C7A, 0x305D, 0x653B, 0x6543,
 0x6547, 0x394B, 0x4C56,      0, 0x4456, 0x653D,      0, 0x7B50,
 0x6545,      0, 0x653A, 0x433E,      0, 0x653F, 0x303D, 0x4C4A,
};
unsigned short utf8_to_euc_E7B7[] = {
      0,      0,      0,      0,      0,      0,      0, 0x653E,
      0,      0, 0x365B, 0x486C,      0,      0,      0, 0x416D,
      0, 0x4E50, 0x3D6F,      0,      0, 0x656E, 0x7B52,      0,
 0x6548,      0, 0x407E,      0, 0x6544, 0x6549, 0x654B,      0,
 0x4479, 0x654E,      0,      0, 0x654A,      0,      0,      0,
 0x4A54, 0x344B,      0,      0, 0x4C4B,      0,      0, 0x305E,
      0,      0, 0x654D,      0, 0x4E7D,      0,      0,      0,
      0,      0,      0, 0x654C,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E7B8[] = {
      0, 0x316F,      0,      0, 0x466C, 0x654F,      0,      0,
      0, 0x6556, 0x6550, 0x6557,      0,      0,      0,      0,
      0,      0, 0x6553,      0,      0,      0,      0,      0,
      0,      0,      0, 0x477B,      0,      0, 0x3C4A, 0x6555,
      0, 0x6552, 0x6558, 0x6551,      0,      0, 0x3D44,      0,
      0,      0,      0, 0x4B25,      0,      0, 0x3D4C,      0,
      0, 0x6554, 0x6560,      0,      0, 0x655C,      0, 0x655F,
      0, 0x655D, 0x6561, 0x655B,      0, 0x6541, 0x4053,      0,
};
unsigned short utf8_to_euc_E7B9[] = {
      0, 0x484B,      0, 0x655E,      0,      0, 0x6559,      0,
      0,      0, 0x4121, 0x3752,      0, 0x3D2B,      0,      0,
      0,      0, 0x7B53,      0, 0x3F25, 0x4136, 0x6564,      0,
      0, 0x6566, 0x6567,      0,      0, 0x6563, 0x6565,      0,
      0,      0,      0,      0,      0,      0, 0x655A, 0x6562,
      0, 0x656A, 0x6569,      0,      0, 0x4B7A,      0,      0,
 0x372B,      0,      0,      0,      0,      0,      0,      0,
      0, 0x6568,      0, 0x656C, 0x656B, 0x656F,      0, 0x6571,
};
unsigned short utf8_to_euc_E7BA[] = {
      0,      0, 0x3B3C, 0x656D,      0,      0,      0,      0,
 0x6572, 0x6573, 0x7921,      0, 0x6574,      0, 0x657A, 0x453B,
 0x6576,      0, 0x6575, 0x6577, 0x6578,      0, 0x6579,      0,
      0,      0,      0, 0x657B, 0x657C,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
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,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E7BD[] = {
      0,      0,      0,      0,      0, 0x6621,      0, 0x7B54,
      0,      0,      0,      0, 0x6622, 0x6623, 0x6624,      0,
 0x6625, 0x6626,      0,      0, 0x6628, 0x6627,      0,      0,
 0x6629,      0,      0,      0,      0,      0,      0, 0x662A,
 0x662B,      0,      0,      0,      0,      0,      0, 0x662E,
 0x662C, 0x662D, 0x3A61, 0x3753,      0,      0, 0x4356,      0,
 0x4833,      0, 0x3D70,      0,      0, 0x474D,      0, 0x486D,
 0x662F, 0x586D,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E7BE[] = {
      0,      0, 0x6630, 0x6632,      0, 0x4D65, 0x6631, 0x6634,
 0x6633,      0, 0x4D53,      0, 0x6635,      0, 0x487E,      0,
      0,      0,      0,      0, 0x6636,      0,      0,      0,
      0,      0, 0x6639,      0,      0, 0x6638, 0x6637,      0,
      0, 0x7B55,      0, 0x663A, 0x3732,      0,      0,      0,
 0x4122, 0x3541,      0,      0,      0,      0, 0x663E, 0x663B,
      0,      0, 0x663C,      0,      0,      0, 0x663F,      0,
 0x6640, 0x663D,      0,      0,      0, 0x3129,      0,      0,
};
unsigned short utf8_to_euc_E7BF[] = {
      0, 0x3227,      0,      0,      0, 0x6642, 0x6643,      0,
      0,      0, 0x6644,      0, 0x4D62,      0,      0,      0,
      0,      0, 0x3D2C,      0, 0x6646, 0x6645,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x3F69, 0x6647,      0,      0,      0,      0, 0x6648,      0,
      0, 0x6649,      0, 0x3465,      0,      0,      0,      0,
 0x344D,      0,      0, 0x664A,      0,      0,      0,      0,
      0, 0x664B,      0, 0x4B5D, 0x4D63,      0,      0,      0,
};
unsigned short utf8_to_euc_E880[] = {
 0x4D54, 0x4F37,      0, 0x394D, 0x664E, 0x3C54, 0x664D,      0,
      0,      0,      0, 0x664F, 0x3C29,      0,      0,      0,
 0x4251,      0, 0x6650,      0,      0, 0x394C,      0, 0x4C57,
 0x6651, 0x6652,      0,      0, 0x6653,      0,      0,      0,
      0, 0x6654,      0,      0,      0,      0,      0,      0,
 0x6655,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x3C2A,      0,      0, 0x4C6D,      0,
      0,      0,      0, 0x6657,      0, 0x433F,      0, 0x6656,
};
unsigned short utf8_to_euc_E881[] = {
      0,      0,      0,      0,      0,      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,
      0, 0x416F, 0x665E,      0,      0,      0,      0,      0,
 0x665F,      0,      0,      0,      0,      0,      0, 0x4E7E,
 0x6662,      0, 0x6661, 0x6660, 0x4430,      0, 0x6663, 0x3F26,
      0, 0x6664,      0,      0,      0, 0x6665, 0x4F38, 0x6666,
};
unsigned short utf8_to_euc_E882[] = {
      0,      0,      0,      0, 0x6667, 0x6669, 0x6668, 0x4825,
      0, 0x4679,      0, 0x4F3E, 0x4829,      0,      0,      0,
      0,      0,      0, 0x666B,      0,      0, 0x3E53,      0,
 0x492A,      0, 0x666C, 0x666A,      0, 0x344E,      0,      0,
      0, 0x3854, 0x3B68,      0,      0, 0x486E,      0,      0,
      0, 0x382A, 0x4B43,      0, 0x666F, 0x666D,      0, 0x394E,
      0, 0x394F, 0x3069,      0, 0x3A68,      0,      0,      0,
      0,      0, 0x4759,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E883[] = {
      0,      0,      0, 0x305F, 0x6674,      0, 0x4340,      0,
      0,      0,      0,      0, 0x4758,      0, 0x425B,      0,
      0,      0,      0,      0,      0,      0, 0x6676,      0,
      0, 0x6672, 0x6675, 0x6670,      0, 0x6673, 0x4B26,      0,
      0, 0x3855,      0,      0, 0x307D, 0x6671,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x6678,
      0, 0x6679,      0,      0, 0x4639,      0,      0,      0,
 0x363B,      0,      0,      0, 0x6726, 0x473D,      0,      0,
};
unsigned short utf8_to_euc_E884[] = {
      0,      0, 0x3B69,      0,      0, 0x363C, 0x4048, 0x4F46,
 0x4C2E, 0x6677, 0x4054,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x3553, 0x667A,      0,      0,      0,      0,
      0,      0,      0, 0x667C,      0,      0,      0,      0,
      0, 0x667B,      0,      0,      0,      0,      0, 0x667D,
      0, 0x4326,      0, 0x473E,      0,      0,      0,      0,
      0, 0x4431,      0,      0,      0,      0, 0x6723,      0,
};
unsigned short utf8_to_euc_E885[] = {
      0,      0,      0,      0,      0,      0, 0x6722,      0,
      0,      0,      0, 0x667E,      0,      0, 0x3F55,      0,
 0x4965, 0x6725,      0, 0x6724, 0x3950, 0x4F53,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x6735,
      0,      0,      0,      0,      0, 0x6729, 0x672A,      0,
      0,      0,      0, 0x3C70,      0,      0, 0x6728,      0,
 0x3978, 0x6727,      0,      0, 0x672B,      0,      0,      0,
 0x4432, 0x4A22, 0x4123,      0,      0,      0,      0, 0x425C,
};
unsigned short utf8_to_euc_E886[] = {
 0x672F,      0, 0x6730, 0x672C,      0,      0,      0,      0,
 0x672D,      0, 0x672E,      0,      0,      0,      0, 0x3951,
      0,      0,      0, 0x6736,      0, 0x6732,      0,      0,
      0,      0, 0x4966,      0, 0x4B6C, 0x4928,      0,      0,
 0x6731,      0,      0, 0x6734, 0x6733,      0,      0,      0,
 0x4B44, 0x6737,      0,      0,      0,      0,      0,      0,
 0x6738,      0,      0, 0x4137,      0, 0x6739,      0,      0,
 0x673B,      0, 0x673F,      0,      0, 0x673C, 0x673A, 0x473F,
};
unsigned short utf8_to_euc_E887[] = {
 0x673D,      0, 0x673E,      0,      0,      0, 0x3232,      0,
 0x6745, 0x6740,      0,      0,      0, 0x6741,      0,      0,
      0, 0x6742,      0, 0x4221,      0,      0,      0,      0,
 0x6744, 0x6743, 0x6746,      0,      0,      0,      0, 0x6747,
 0x6748,      0,      0, 0x3F43,      0, 0x3269,      0, 0x6749,
 0x4E57,      0, 0x3C2B,      0,      0, 0x3D2D,      0,      0,
      0,      0,      0, 0x3B6A, 0x4357,      0,      0,      0,
      0,      0, 0x674A, 0x674B, 0x3131,      0, 0x674C,      0,
};
unsigned short utf8_to_euc_E888[] = {
      0, 0x674D, 0x674E,      0,      0, 0x674F,      0, 0x6750,
 0x363D, 0x5A2A, 0x6751,      0, 0x4065, 0x6752, 0x3C4B,      0,
 0x6753,      0, 0x5030,      0,      0,      0, 0x6754, 0x4A5E,
 0x345C,      0,      0, 0x4124, 0x3D58,      0, 0x4971, 0x3D2E,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x6755, 0x3952, 0x6756, 0x484C,      0, 0x6764,      0,
      0,      0,      0, 0x6758,      0, 0x4249, 0x4775, 0x383F,
 0x6757, 0x4125,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E889[] = {
 0x6759,      0,      0,      0,      0,      0,      0, 0x447A,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x675B, 0x675A, 0x675D,      0,      0, 0x675C,      0, 0x675E,
      0,      0, 0x6760,      0, 0x675F,      0, 0x344F,      0,
 0x6761,      0, 0x6762, 0x6763,      0,      0, 0x3A31, 0x4E49,
      0, 0x6765, 0x3F27,      0,      0,      0, 0x3170, 0x6766,
 0x6767,      0,      0,      0,      0,      0, 0x6768,      0,
};
unsigned short utf8_to_euc_E88A[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x3072,      0, 0x6769,      0,      0,
      0,      0, 0x676A,      0,      0,      0,      0,      0,
      0, 0x4967,      0,      0,      0, 0x3C47,      0, 0x676C,
      0,      0,      0,      0,      0, 0x3329, 0x3032,      0,
      0,      0,      0, 0x676B, 0x676E, 0x474E,      0, 0x3F44,
      0, 0x3256,      0, 0x4B27,      0,      0,      0,      0,
 0x375D, 0x365C,      0, 0x676D,      0, 0x326A,      0,      0,
};
unsigned short utf8_to_euc_E88B[] = {
      0,      0,      0,      0,      0, 0x3423,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x3171, 0x6772, 0x4E6A, 0x425D,      0,      0, 0x4944,
      0, 0x677E,      0, 0x3257, 0x677C,      0, 0x677A, 0x6771,
      0, 0x676F,      0, 0x6770,      0, 0x3C63, 0x366C, 0x4377,
      0,      0,      0, 0x4651,      0,      0,      0,      0,
      0, 0x3151,      0, 0x6774, 0x6773,      0,      0,      0,
      0, 0x6779, 0x6775, 0x6778,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E88C[] = {
      0, 0x7B57, 0x4C50, 0x6777, 0x3258, 0x337D, 0x677B,      0,
      0, 0x677D,      0,      0,      0,      0, 0x3754,      0,
      0,      0,      0,      0,      0,      0, 0x6823, 0x682C,
 0x682D,      0,      0,      0, 0x302B,      0,      0,      0,
      0,      0,      0, 0x6834,      0,      0,      0,      0,
 0x3071,      0,      0, 0x682B,      0,      0,      0, 0x682A,
      0, 0x6825, 0x6824,      0, 0x6822, 0x6821, 0x4363,      0,
 0x427B, 0x6827,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E88D[] = {
 0x6826,      0,      0,      0,      0, 0x6829,      0,      0,
      0, 0x4170, 0x3755,      0,      0,      0,      0, 0x3141,
 0x6828,      0, 0x3953,      0,      0,      0,      0,      0,
 0x4171,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x7B58,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x683A,      0, 0x683B,      0, 0x3259,
      0,      0,      0, 0x322E, 0x6838,      0,      0, 0x7B59,
};
unsigned short utf8_to_euc_E88E[] = {
      0,      0,      0,      0,      0, 0x682E,      0, 0x6836,
      0, 0x683D, 0x6837,      0,      0,      0, 0x6835,      0,
      0,      0,      0, 0x6776,      0,      0, 0x6833,      0,
      0,      0, 0x682F,      0,      0,      0, 0x3450, 0x6831,
 0x683C,      0, 0x6832,      0,      0,      0,      0,      0,
 0x683E,      0, 0x6830, 0x477C,      0,      0,      0,      0,
      0, 0x4D69,      0,      0,      0, 0x6839,      0,      0,
      0,      0,      0,      0,      0, 0x684F,      0,      0,
};
unsigned short utf8_to_euc_E88F[] = {
      0, 0x6847,      0,      0,      0, 0x3F7B,      0, 0x7B5A,
      0,      0, 0x3546,      0, 0x365D,      0, 0x6842,      0,
      0,      0,      0, 0x325B,      0,      0, 0x3E54,      0,
 0x6845,      0,      0,      0, 0x3A5A,      0,      0, 0x4551,
 0x684A,      0,      0,      0,      0,      0,      0,      0,
      0, 0x4A6E,      0, 0x6841,      0,      0,      0, 0x325A,
 0x3856, 0x4929, 0x684B,      0, 0x683F,      0, 0x7B5B, 0x6848,
      0,      0,      0, 0x6852,      0, 0x6843,      0,      0,
};
unsigned short utf8_to_euc_E890[] = {
      0,      0,      0, 0x6844, 0x463A,      0,      0, 0x6849,
      0,      0,      0, 0x6846, 0x4B28, 0x684C, 0x3060,      0,
      0,      0,      0, 0x6840,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x684E,      0, 0x684D,      0,      0,      0,      0,      0,
      0, 0x476B, 0x6854,      0, 0x685F,      0,      0,      0,
      0, 0x337E,      0,      0,      0, 0x6862,      0,      0,
 0x6850,      0,      0,      0, 0x6855, 0x4D6E,      0,      0,
};
unsigned short utf8_to_euc_E891[] = {
      0,      0,      0,      0,      0,      0, 0x685E,      0,
 0x7B5C, 0x4D55,      0,      0,      0,      0, 0x4E2A,      0,
      0,      0,      0,      0,      0,      0,      0, 0x4378,
      0,      0,      0, 0x336B,      0,      0,      0,      0,
      0, 0x4972, 0x6864, 0x4621,      0,      0, 0x3031,      0,
      0, 0x685D,      0, 0x6859, 0x4172, 0x6853, 0x685B, 0x6860,
      0, 0x472C,      0,      0,      0, 0x302A,      0, 0x6858,
      0, 0x6861, 0x4978,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E892[] = {
      0,      0, 0x685C,      0, 0x6857,      0,      0,      0,
      0,      0,      0, 0x3E55,      0,      0,      0,      0,
 0x3D2F,      0,      0,      0, 0x3C2C,      0,      0,      0,
      0, 0x4C58,      0,      0, 0x4947,      0,      0, 0x6867,
      0, 0x6870,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0x685A,      0,      0,
      0,      0, 0x3377,      0, 0x7B5D,      0,      0,      0,
 0x3E78, 0x6865,      0, 0x686A, 0x4173,      0,      0, 0x6866,
};
unsigned short utf8_to_euc_E893[] = {
      0, 0x686D,      0,      0, 0x435F,      0, 0x686E,      0,
      0, 0x4D56, 0x6863, 0x3338,      0, 0x6869,      0,      0,
 0x686C, 0x4C2C,      0,      0,      0,      0, 0x686F,      0,
      0, 0x6868, 0x686B,      0, 0x7925,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x4B29,      0, 0x4F21,      0,
      0,      0,      0,      0, 0x6873,      0,      0,      0,
      0,      0,      0,      0, 0x687A,      0,      0, 0x6872,
};
unsigned short utf8_to_euc_E894[] = {
 0x3C43,      0,      0,      0,      0,      0, 0x6851,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x4A4E,      0, 0x4C22, 0x6879, 0x6878,      0, 0x6874,
 0x6875,      0, 0x3136,      0,      0,      0,      0, 0x6877,
      0, 0x6871,      0,      0,      0,      0, 0x4455,      0,
      0,      0,      0,      0, 0x6876, 0x307E,      0,      0,
      0,      0,      0,      0,      0, 0x4222,      0,      0,
      0,      0,      0,      0,      0, 0x4A43,      0,      0,
};
unsigned short utf8_to_euc_E895[] = {
 0x687B, 0x6921,      0, 0x4859,      0,      0,      0,      0,
 0x687E, 0x3E56, 0x3C49, 0x6923,      0,      0, 0x363E,      0,
      0,      0,      0, 0x7B5E,      0, 0x6924,      0, 0x4979,
 0x687D, 0x7B5F, 0x6856,      0,      0,      0,      0,      0,
      0,      0,      0, 0x687C,      0,      0,      0,      0,
 0x4F4F, 0x4622, 0x4973, 0x7B60,      0, 0x692B,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x6931,
      0,      0,      0,      0,      0,      0, 0x6932,      0,
};
unsigned short utf8_to_euc_E896[] = {
 0x6925,      0,      0,      0, 0x4776,      0,      0, 0x692F,
 0x6927,      0, 0x6929,      0,      0,      0,      0,      0,
 0x6933, 0x6928,      0,      0, 0x692C,      0,      0, 0x3172,
      0, 0x4665,      0, 0x692D, 0x6930,      0,      0,      0,
      0,      0,      0,      0, 0x6926,      0, 0x4126,      0,
 0x692A, 0x3B27, 0x3F45, 0x3730, 0x4C74,      0, 0x4C79, 0x3D72,
 0x7B62,      0,      0,      0,      0,      0,      0,      0,
      0, 0x6937, 0x6935,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E897[] = {
      0, 0x4F4E,      0,      0,      0,      0,      0,      0,
      0, 0x6934,      0,      0,      0, 0x4D75,      0, 0x6936,
 0x6938,      0,      0,      0,      0, 0x6939,      0,      0,
      0,      0,      0,      0, 0x693C, 0x693A,      0,      0,
      0,      0,      0,      0, 0x4623, 0x693B,      0,      0,
      0, 0x484D, 0x692E,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x3D73,
      0, 0x693D, 0x6942, 0x4174,      0,      0, 0x6941,      0,
};
unsigned short utf8_to_euc_E898[] = {
      0,      0, 0x6922,      0,      0,      0, 0x6943, 0x4149,
      0,      0, 0x693E, 0x6940,      0,      0,      0,      0,
      0,      0,      0, 0x693F,      0,      0, 0x5D31, 0x5D22,
      0,      0, 0x6945,      0,      0,      0,      0,      0,
      0,      0, 0x6944,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0x4D76,      0, 0x623C,
 0x6946,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x6947,
};
unsigned short utf8_to_euc_E899[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0x6948, 0x3857,      0,
 0x3554,      0,      0,      0, 0x694A, 0x515D,      0,      0,
      0,      0, 0x3575,      0, 0x4E3A,      0, 0x3673, 0x694B,
      0,      0,      0,      0,      0,      0,      0, 0x694C,
      0,      0,      0, 0x436E,      0,      0,      0,      0,
      0, 0x694D,      0,      0,      0,      0,      0,      0,
      0, 0x467A,      0, 0x303A,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E89A[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x3263, 0x6952, 0x6953,      0,      0,      0,
      0,      0,      0, 0x694E,      0, 0x3B3D,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x694F, 0x4742,      0,      0,      0,
      0, 0x6950, 0x6951, 0x695B,      0,      0,      0, 0x6955,
 0x6958,      0,      0,      0,      0,      0, 0x6954,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E89B[] = {
      0,      0,      0,      0, 0x6956,      0, 0x6957, 0x3C58,
      0, 0x6959,      0, 0x4341,      0, 0x3756, 0x3342,      0,
      0,      0,      0,      0, 0x695C,      0,      0,      0,
      0, 0x333F,      0, 0x6961,      0,      0, 0x695D, 0x6960,
      0,      0,      0,      0, 0x483A,      0,      0,      0,
      0, 0x695E,      0,      0, 0x695F, 0x4948, 0x485A, 0x6962,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x427D, 0x696C,      0, 0x6968,      0,      0, 0x326B,      0,
};
unsigned short utf8_to_euc_E89C[] = {
 0x6966,      0, 0x4B2A, 0x6967,      0,      0, 0x6964,      0,
 0x6965, 0x696A, 0x696D,      0,      0, 0x696B,      0,      0,
      0, 0x6969, 0x6963,      0,      0,      0,      0,      0,
 0x4358,      0, 0x6974,      0, 0x4C2A,      0,      0,      0,
      0,      0,      0,      0,      0, 0x6972,      0,      0,
      0, 0x6973,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x696E,      0,      0, 0x6970,
      0,      0,      0, 0x6971,      0,      0,      0, 0x696F,
};
unsigned short utf8_to_euc_E89D[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x4066,      0, 0x4F39, 0x6978,      0, 0x6979,      0,
      0,      0,      0, 0x6A21,      0, 0x3F2A,      0, 0x697B,
      0, 0x697E,      0,      0,      0,      0,      0, 0x6976,
 0x6975,      0,      0, 0x6A22,      0,      0, 0x325C,      0,
 0x697C,      0, 0x6A23,      0,      0,      0, 0x697D,      0,
      0,      0,      0,      0, 0x697A,      0, 0x4433,      0,
 0x6977,      0,      0,      0,      0,      0,      0, 0x4768,
};
unsigned short utf8_to_euc_E89E[] = {
      0,      0, 0x6A27,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0x4D3B,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x6A26,
      0,      0, 0x6A25,      0,      0,      0,      0,      0,
      0,      0,      0, 0x6A2E,      0,      0,      0, 0x6A28,
      0,      0,      0, 0x6A30,      0,      0,      0,      0,
      0,      0, 0x4D66, 0x6A33,      0, 0x6A2A,      0,      0,
};
unsigned short utf8_to_euc_E89F[] = {
 0x6A2B,      0,      0,      0, 0x6A2F,      0, 0x6A32, 0x6A31,
      0,      0,      0, 0x6A29,      0,      0,      0,      0,
 0x6A2C,      0, 0x6A3D,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x6A36,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x6A34,
      0,      0, 0x6A35,      0,      0,      0, 0x6A3A, 0x6A3B,
      0, 0x332A,      0, 0x3542,      0,      0, 0x6A39,      0,
};
unsigned short utf8_to_euc_E8A0[] = {
      0,      0,      0,      0,      0, 0x6A24,      0, 0x7B65,
      0,      0,      0,      0,      0, 0x6A38, 0x6A3C, 0x6A37,
      0, 0x6A3E,      0,      0,      0, 0x6A40, 0x6A3F,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x6A42, 0x6A41, 0x695A,      0,      0,      0, 0x6A46,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x6A43,      0,      0,      0,      0, 0x6A44,      0,
      0, 0x6A45,      0, 0x6A47,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E8A1[] = {
 0x376C,      0, 0x6A49,      0, 0x6A48,      0, 0x3D30,      0,
      0,      0,      0,      0, 0x3954, 0x5E27,      0,      0,
      0,      0, 0x6A4A, 0x3D51,      0,      0,      0, 0x3339,
      0, 0x6A4B,      0, 0x3152,      0, 0x3E57, 0x6A4C,      0,
      0, 0x3955, 0x6A4D, 0x3061,      0,      0,      0,      0,
 0x493D,      0,      0, 0x6A4E,      0,      0,      0,      0,
 0x3F6A,      0, 0x6A55,      0,      0, 0x6A52,      0, 0x436F,
      0,      0,      0,      0,      0, 0x6A53, 0x6A50, 0x365E,
};
unsigned short utf8_to_euc_E8A2[] = {
      0, 0x6A4F, 0x6A56,      0,      0,      0,      0,      0,
 0x3736,      0,      0, 0x425E,      0, 0x6A5C,      0,      0,
      0,      0, 0x6A58,      0,      0,      0, 0x4235, 0x6A57,
      0, 0x6A5A,      0,      0,      0,      0, 0x6A51,      0,
      0,      0, 0x6A5B,      0, 0x6A5D,      0,      0,      0,
      0,      0,      0, 0x486F,      0,      0, 0x6A59,      0,
 0x6A5E, 0x6A60,      0,      0, 0x3853, 0x6A54,      0, 0x3041,
      0,      0,      0,      0,      0,      0,      0, 0x6A5F,
};
unsigned short utf8_to_euc_E8A3[] = {
      0, 0x3A5B, 0x4E76, 0x6A61, 0x6A62, 0x4175,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x4E22,
      0,      0,      0,      0, 0x6A63, 0x4D35,      0,      0,
 0x6A64, 0x6A65,      0,      0, 0x4A64, 0x6A66,      0, 0x3A40,
      0, 0x4E23,      0,      0,      0,      0,      0,      0,
 0x6A6B,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x6A6C, 0x3E58, 0x6A6A, 0x7B66,      0,      0,
 0x4D67, 0x6A67,      0,      0, 0x6A69, 0x403D, 0x3F7E,      0,
};
unsigned short utf8_to_euc_E8A4[] = {
      0,      0, 0x6A68,      0, 0x6A6D,      0,      0, 0x4A23,
      0,      0, 0x6A6F,      0, 0x6A6E,      0,      0,      0,
 0x336C,      0, 0x4B2B, 0x6A70,      0,      0,      0,      0,
      0,      0,      0,      0, 0x7922, 0x6A7C, 0x6A72,      0,
      0,      0,      0,      0,      0, 0x6A73,      0,      0,
      0,      0, 0x6A74, 0x6A75,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x6A79,      0,
 0x6A7A,      0,      0, 0x6A78,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E8A5[] = {
      0, 0x6A76,      0, 0x6A71, 0x6A77,      0,      0,      0,
      0,      0,      0,      0, 0x6A7B, 0x7037,      0,      0,
      0,      0,      0,      0,      0,      0, 0x3228,      0,
      0,      0,      0,      0,      0,      0, 0x6A7E, 0x365F,
 0x6A7D,      0,      0,      0, 0x6B22,      0, 0x6B21,      0,
      0,      0, 0x6B24,      0,      0, 0x6B23,      0, 0x6B25,
      0,      0, 0x3D31,      0, 0x6B26,      0,      0, 0x6B27,
      0,      0,      0,      0,      0,      0, 0x6B28, 0x403E,
};
unsigned short utf8_to_euc_E8A6[] = {
      0, 0x4D57,      0, 0x6B29,      0,      0, 0x4A24, 0x4746,
 0x6B2A,      0, 0x6B2B, 0x382B,      0,      0,      0, 0x352C,
      0,      0,      0, 0x6B2C,      0,      0, 0x3B6B, 0x4741,
 0x6B2D,      0, 0x3350,      0,      0,      0,      0,      0,
      0, 0x6B2E,      0,      0,      0,      0, 0x6B30, 0x4D77,
      0, 0x6B2F, 0x3F46,      0, 0x6B31,      0,      0, 0x6B32,
      0,      0, 0x6B33, 0x3451,      0,      0,      0,      0,
      0,      0, 0x6B34,      0,      0, 0x6B35,      0, 0x6B36,
};
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,      0,      0,      0,      0,
      0,      0, 0x6B38,      0, 0x6B39, 0x6B3A,      0,      0,
      0,      0,      0, 0x3272,      0,      0, 0x3F28, 0x6B3B,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x6B3C,      0,      0,      0,
 0x6B3D,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E8A8[] = {
 0x3840,      0, 0x447B, 0x6B3E,      0,      0,      0,      0,
 0x3757,      0, 0x3F56,      0, 0x6B41,      0, 0x4624,      0,
 0x6B40,      0, 0x7B67, 0x3731,      0,      0, 0x6B3F, 0x4277,
 0x352D,      0,      0, 0x6B42,      0, 0x6B43,      0, 0x3E59,
      0,      0,      0, 0x376D,      0, 0x6B44,      0,      0,
      0,      0, 0x4B2C,      0,      0, 0x405F,      0,      0,
      0, 0x3576,      0, 0x4C75, 0x414A,      0, 0x6B45, 0x7B68,
      0,      0, 0x3F47, 0x4370, 0x3E5A,      0,      0,      0,
};
unsigned short utf8_to_euc_E8A9[] = {
      0, 0x6B46,      0,      0,      0,      0, 0x6B49,      0,
 0x6B4A,      0,      0,      0,      0,      0,      0,      0,
 0x3A3E, 0x4242, 0x6B48,      0, 0x3E5B, 0x493E,      0,      0,
      0,      0,      0, 0x6B47,      0,      0, 0x3B6C,      0,
 0x3153,      0, 0x6B4E, 0x3758,      0,      0, 0x3B6E,      0,
      0, 0x3B6D,      0, 0x4F4D, 0x6B4D, 0x6B4C, 0x4127,      0,
 0x354D, 0x4F43, 0x333A, 0x3E5C,      0,      0,      0,      0,
      0, 0x7B69,      0,      0, 0x6B4B,      0,      0,      0,
};
unsigned short utf8_to_euc_E8AA[] = {
      0,      0, 0x6B50,      0, 0x6B51, 0x6B4F,      0, 0x3858,
      0, 0x4D40,      0,      0, 0x3B6F, 0x4727,      0,      0,
      0, 0x6B54,      0, 0x4040,      0, 0x4342,      0,      0,
 0x4D36,      0, 0x6B57,      0,      0,      0, 0x386C,      0,
 0x403F, 0x6B53,      0, 0x6B58, 0x386D, 0x6B55, 0x6B56, 0x7B6A,
 0x6B52,      0,      0,      0, 0x4062, 0x4649,      0,      0,
 0x432F,      0, 0x325D,      0,      0,      0,      0,      0,
      0, 0x4870,      0,      0, 0x3543,      0, 0x7B6B, 0x4434,
};
unsigned short utf8_to_euc_E8AB[] = {
      0,      0, 0x6B5B,      0, 0x6B59,      0,      0, 0x434C,
      0,      0,      0, 0x4041, 0x3452, 0x6B5A,      0, 0x3F5B,
      0,      0, 0x4E4A,      0,      0,      0, 0x4F40,      0,
      0,      0, 0x6B5C, 0x6B67, 0x4435,      0, 0x6B66, 0x7B6C,
 0x6B63, 0x6B6B, 0x6B64,      0, 0x6B60,      0, 0x447C, 0x6B5F,
      0,      0,      0, 0x6B5D,      0, 0x4D21, 0x3B70,      0,
      0, 0x6B61,      0, 0x6B5E,      0,      0, 0x7B6E, 0x6B65,
 0x3D74,      0, 0x3841,      0,      0,      0, 0x427A,      0,
};
unsigned short utf8_to_euc_E8AC[] = {
 0x4B45, 0x315A, 0x3062,      0, 0x4625,      0,      0, 0x6B69,
      0,      0,      0,      0, 0x6B68,      0, 0x4666,      0,
 0x6B6D,      0,      0,      0, 0x6B62,      0, 0x6B6C, 0x6B6E,
      0, 0x382C, 0x6B6A, 0x3956,      0, 0x3C55,      0,      0,
 0x6B6F, 0x4D58,      0,      0,      0,      0, 0x6B72,      0,
 0x6B75,      0,      0, 0x6B73, 0x4935,      0,      0,      0,
      0,      0,      0, 0x6B70,      0,      0,      0,      0,
      0, 0x3660,      0,      0,      0,      0, 0x6B74,      0,
};
unsigned short utf8_to_euc_E8AD[] = {
      0, 0x6B76,      0,      0,      0,      0,      0,      0,
      0, 0x6B7A,      0,      0, 0x6B77,      0, 0x6B79, 0x6B78,
      0,      0,      0, 0x7B6F,      0,      0, 0x6B7B,      0,
 0x3C31,      0, 0x6B7D, 0x6B7C, 0x4968,      0,      0, 0x6C21,
      0,      0,      0,      0,      0,      0, 0x3759,      0,
      0,      0,      0, 0x6B7E, 0x6C22,      0,      0, 0x6C23,
 0x3544, 0x6641, 0x3E79,      0, 0x6C24,      0,      0, 0x386E,
      0,      0,      0,      0,      0, 0x6C25,      0, 0x7B70,
};
unsigned short utf8_to_euc_E8AE[] = {
 0x6C26,      0,      0, 0x3B3E,      0,      0,      0,      0,
      0,      0, 0x5A4E,      0, 0x6C27,      0, 0x6C28,      0,
 0x3D32,      0, 0x6C29, 0x6C2A,      0,      0, 0x6C2B,      0,
      0, 0x6C2C, 0x6C2D,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
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,
      0,      0, 0x6C2E,      0,      0,      0,      0, 0x6C30,
};
unsigned short utf8_to_euc_E8B1[] = {
      0, 0x6C2F,      0,      0,      0,      0, 0x4626,      0,
 0x6C31,      0, 0x4B2D,      0, 0x6C32,      0, 0x6C33,      0,
 0x6C34,      0,      0,      0,      0, 0x6C35,      0,      0,
      0,      0, 0x465A,      0,      0,      0,      0,      0,
      0, 0x3E5D, 0x6C36,      0,      0,      0,      0,      0,
      0,      0, 0x396B, 0x502E, 0x6C37,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x6C38, 0x493F, 0x6C39,      0, 0x6C41,      0,      0,      0,
};
unsigned short utf8_to_euc_E8B2[] = {
      0,      0, 0x6C3A,      0,      0, 0x6C3C,      0,      0,
      0, 0x6C3B, 0x6C3D,      0, 0x4B46, 0x6C3E, 0x6C3F,      0,
      0,      0,      0,      0, 0x6C40,      0,      0,      0,
 0x6C42,      0,      0,      0,      0, 0x332D, 0x4467,      0,
 0x4969, 0x3A62, 0x3957,      0,      0,      0,      0, 0x494F,
 0x325F, 0x484E, 0x6C45, 0x3453, 0x4055, 0x6C44, 0x6C49, 0x4379,
 0x4C63,      0, 0x6C47, 0x6C48, 0x352E,      0, 0x6C4A, 0x4763,
 0x425F,      0,      0, 0x4871, 0x453D, 0x6C46,      0, 0x4B47,
};
unsigned short utf8_to_euc_E8B3[] = {
 0x326C, 0x6C4C, 0x4F28, 0x4442, 0x4F45,      0,      0, 0x3B71,
 0x6C4B,      0, 0x4231,      0,      0, 0x6C5C, 0x4128,      0,
      0, 0x4678,      0, 0x4950,      0,      0,      0,      0,
      0,      0, 0x6C4F, 0x3B3F, 0x3B72,      0, 0x3E5E,      0,
 0x4765,      0, 0x382D, 0x6C4E, 0x6C4D,      0, 0x496A,      0,
      0,      0, 0x3C41,      0,      0, 0x4552,      0,      0,
 0x7B71,      0,      0,      0, 0x7B72,      0,      0,      0,
      0,      0, 0x6C51, 0x6C52, 0x3958, 0x6C50,      0,      0,
};
unsigned short utf8_to_euc_E8B4[] = {
      0,      0,      0,      0, 0x6C53, 0x6C54,      0, 0x6C56,
 0x4223,      0, 0x6C55, 0x3466,      0, 0x6C58,      0, 0x6C57,
 0x6C59,      0, 0x7B73, 0x6C5B, 0x6C5D,      0, 0x6C5E,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
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,      0, 0x3C4F, 0x6C5F,
      0,      0,      0, 0x3352,      0, 0x6C60,      0,      0,
 0x4176, 0x6C61,      0, 0x6C62, 0x496B,      0, 0x7B74, 0x352F,
      0,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E8B6[] = {
      0, 0x6C63,      0,      0,      0, 0x4436,      0,      0,
      0,      0, 0x315B,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x6C64,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x3C71,      0,      0,      0,      0,
 0x3F76,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x422D,      0,      0,      0,      0,
      0,      0, 0x6C67,      0,      0,      0, 0x6C66,      0,
};
unsigned short utf8_to_euc_E8B7[] = {
      0,      0, 0x6C65,      0,      0,      0,      0,      0,
      0,      0,      0, 0x6C6D, 0x6C6B,      0,      0, 0x6C68,
      0,      0,      0,      0,      0,      0, 0x6C6A,      0,
      0,      0, 0x6C69, 0x6C6C,      0, 0x3577,      0, 0x6C70,
      0, 0x4057,      0, 0x6C71,      0,      0,      0,      0,
 0x3859,      0, 0x6C6E, 0x6C6F,      0,      0,      0, 0x4F29,
      0,      0,      0, 0x4437,      0, 0x4129,      0,      0,
      0,      0,      0,      0, 0x6C72,      0,      0, 0x6C75,
};
unsigned short utf8_to_euc_E8B8[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
 0x6C73, 0x6C74, 0x4D59,      0,      0,      0,      0, 0x4627,
 0x6C78,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0x6C76, 0x6C77, 0x6C79,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x6D29,      0,      0,      0,      0,      0,
 0x6C7C,      0,      0,      0, 0x6C7D, 0x6C7B,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E8B9[] = {
      0,      0, 0x6C7A,      0, 0x447D,      0,      0, 0x6D21,
 0x6D25, 0x6D22, 0x6C7E,      0, 0x6D23,      0,      0,      0,
 0x6D24,      0,      0,      0,      0, 0x6D2B,      0,      0,
      0, 0x6D26,      0,      0,      0,      0,      0, 0x4058,
 0x6D28,      0,      0, 0x6D2A, 0x6D27,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x6D2D,      0, 0x3D33,      0, 0x6D2C,      0,
      0,      0,      0,      0, 0x6D2E,      0,      0,      0,
};
unsigned short utf8_to_euc_E8BA[] = {
      0, 0x6D2F,      0,      0, 0x6D32, 0x6D31,      0, 0x6D30,
      0,      0, 0x6D34, 0x6D33,      0, 0x4C76,      0,      0,
      0, 0x6D36,      0, 0x6D35, 0x6D37,      0,      0,      0,
      0, 0x6D38,      0,      0,      0,      0,      0,      0,
      0, 0x6D3A,      0,      0,      0,      0,      0,      0,
      0,      0, 0x6D39, 0x3F48, 0x6D3B,      0,      0, 0x366D,
 0x6D3C, 0x6D3E,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x6D3F,      0,
};
unsigned short utf8_to_euc_E8BB[] = {
      0,      0,      0,      0,      0, 0x6D40, 0x6D3D,      0,
 0x6D41,      0, 0x3C56, 0x6D42, 0x3530, 0x3733,      0, 0x7B76,
      0,      0, 0x382E,      0,      0,      0,      0,      0,
      0,      0,      0, 0x6D43,      0,      0,      0, 0x4670,
      0,      0, 0x453E, 0x6D44,      0,      0,      0,      0,
      0,      0,      0, 0x6D47,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x3C34,      0,      0, 0x6D46, 0x6D45, 0x375A, 0x6D48,      0,
};
unsigned short utf8_to_euc_E8BC[] = {
      0,      0,      0, 0x3353,      0, 0x6D4A,      0,      0,
      0, 0x3A5C, 0x6D49,      0, 0x6D52,      0,      0,      0,
      0,      0, 0x6D4C, 0x6D4E, 0x4A65, 0x6D4B,      0,      0,
      0, 0x6D4D,      0, 0x6D51, 0x6D4F, 0x3531,      0, 0x6D50,
      0,      0,      0,      0,      0,      0, 0x6D53,      0,
      0, 0x475A, 0x4E58,      0,      0,      0,      0, 0x3D34,
      0,      0,      0, 0x6D54,      0,      0,      0,      0,
 0x4D22, 0x6D56,      0, 0x6D55,      0,      0, 0x6D59, 0x4D41,
};
unsigned short utf8_to_euc_E8BD[] = {
      0,      0, 0x6D58,      0, 0x336D, 0x6D57, 0x6D5C,      0,
      0, 0x6D5B,      0,      0, 0x6D5A, 0x4532, 0x6D5D,      0,
      0,      0,      0,      0,      0,      0,      0, 0x6D5E,
      0,      0,      0,      0, 0x6D5F,      0,      0, 0x396C,
      0, 0x3725, 0x6D60, 0x6D61, 0x6D62,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
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,      0, 0x3C2D, 0x6D64,
      0,      0,      0, 0x6D65,      0,      0,      0, 0x5221,
 0x517E,      0,      0,      0,      0, 0x6D66, 0x6570, 0x6D67,
 0x4324, 0x3F2B, 0x4740,      0,      0,      0,      0, 0x6D68,
      0,      0, 0x4A55, 0x4454, 0x397E,      0,      0, 0x4329,
};
unsigned short utf8_to_euc_E8BF[] = {
      0,      0, 0x312A,      0, 0x4B78, 0x3F57,      0,      0,
      0,      0,      0,      0,      0,      0, 0x375E,      0,
      0, 0x3661,      0,      0, 0x4A56,      0,      0,      0,
      0,      0, 0x6D69,      0,      0,      0,      0,      0,
      0,      0, 0x6D6B,      0,      0, 0x6D6A, 0x3260,      0,
      0, 0x4676, 0x6D6C, 0x4777,      0, 0x4533,      0, 0x6D6D,
 0x3D52,      0,      0,      0, 0x6D6F,      0,      0, 0x4C42,
 0x6D7E, 0x6D71, 0x6D72,      0,      0, 0x4449,      0,      0,
};
unsigned short utf8_to_euc_E980[] = {
 0x4260, 0x4177,      0, 0x4628,      0, 0x6D70, 0x3555,      0,
      0,      0,      0, 0x6D79,      0, 0x6D76, 0x6E25, 0x4629,
 0x4360, 0x6D73,      0, 0x447E, 0x4553, 0x6D74, 0x6D78, 0x3F60,
      0, 0x4767, 0x444C,      0,      0, 0x4042, 0x6D77, 0x422E,
 0x4224, 0x6D75, 0x3029, 0x4F22,      0,      0,      0, 0x6D7A,
      0,      0,      0,      0,      0,      0, 0x4261,      0,
      0, 0x3D35, 0x3F4A,      0,      0, 0x6D7C, 0x6D7B,      0,
 0x306F, 0x6D7D,      0,      0, 0x492F,      0, 0x6E27,      0,
};
unsigned short utf8_to_euc_E981[] = {
      0, 0x465B, 0x3F6B,      0,      0, 0x4359,      0, 0x3678,
      0, 0x6E26, 0x4D37, 0x313F,      0, 0x4A57, 0x3261, 0x6E21,
 0x6E22, 0x6E23, 0x6E24, 0x463B, 0x4323, 0x3063, 0x6E28,      0,
 0x6E29, 0x7423,      0,      0, 0x423D,      0, 0x6E2A,      0,
 0x3173, 0x414C,      0, 0x382F,      0, 0x4D5A,      0, 0x7B79,
 0x6E2B, 0x452C,      0,      0,      0, 0x4178, 0x3C57, 0x6E2C,
      0,      0, 0x6E2F,      0,      0, 0x3D65, 0x6E2D, 0x412B,
 0x412A,      0, 0x3064,      0, 0x4E4B, 0x6E31,      0, 0x4872,
};
unsigned short utf8_to_euc_E982[] = {
 0x6E33, 0x6E32, 0x6E30, 0x6364, 0x3454,      0,      0, 0x6D6E,
      0, 0x6E35, 0x6E34,      0,      0,      0,      0, 0x6E36,
      0, 0x4D38,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x4661,      0,      0, 0x4B2E,      0,
 0x6E37,      0, 0x3C59,      0,      0,      0,      0, 0x6E38,
      0, 0x6E39,      0,      0,      0, 0x6E3A,      0,      0,
 0x4521,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E983[] = {
      0, 0x306A,      0,      0,      0,      0,      0,      0,
      0,      0, 0x3959,      0,      0,      0, 0x4F3A,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x6E3E,      0,      0, 0x7B7A,      0,
      0, 0x3734, 0x6E3B,      0, 0x6E3C,      0,      0,      0,
 0x4974,      0,      0,      0,      0, 0x3354,      0,      0,
      0,      0,      0,      0,      0, 0x4D39,      0, 0x363F,
      0,      0,      0,      0,      0, 0x4554,      0,      0,
};
unsigned short utf8_to_euc_E984[] = {
      0,      0, 0x6E3F,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x6E40,      0,      0, 0x7B7C,      0,      0,
      0, 0x6E41,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x7B7D,
      0,      0,      0,      0,      0, 0x4522,      0,      0,
 0x6E43,      0, 0x6E42,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E985[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x4653, 0x6E44, 0x3D36, 0x3C60, 0x475B, 0x4371,      0,
      0,      0, 0x3C72,      0, 0x3F6C,      0, 0x6E45,      0,
 0x6E46,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x3F5D, 0x6E47,      0, 0x6E48,      0,      0,
      0, 0x6E49, 0x4D6F,      0, 0x3D37,      0,      0,      0,
      0,      0, 0x6E4B, 0x6E4A,      0, 0x395A,      0, 0x3973,
 0x3B40,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E986[] = {
      0,      0, 0x6E4E,      0,      0,      0,      0, 0x3D66,
      0, 0x6E4D,      0, 0x6E4C,      0, 0x4269,      0,      0,
 0x386F,      0, 0x4043,      0,      0,      0,      0, 0x4830,
      0,      0,      0,      0, 0x3D39,      0,      0,      0,
      0,      0, 0x6E4F,      0, 0x3E5F,      0,      0,      0,
      0,      0, 0x6E52, 0x6E50,      0,      0,      0, 0x6E51,
      0,      0,      0,      0, 0x6E54, 0x6E53,      0,      0,
 0x3E7A,      0, 0x6E55,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E987[] = {
 0x6E56, 0x6E57,      0,      0,      0,      0, 0x4850, 0x3A53,
 0x3C61, 0x6E58,      0, 0x6E59, 0x4E24, 0x3D45, 0x4C6E, 0x4E4C,
 0x6E5A, 0x3662,      0,      0,      0,      0, 0x6E5B, 0x7C21,
 0x4523,      0, 0x7B7E, 0x6E5E, 0x3378, 0x3F4B, 0x7C22, 0x6E5C,
      0, 0x6E5D,      0, 0x4460, 0x7C25, 0x7C26, 0x4B55, 0x367C,
      0,      0,      0,      0,      0, 0x7C23, 0x7C24,      0,
      0,      0,      0,      0,      0, 0x6E60, 0x6E61,      0,
      0,      0,      0,      0, 0x6E5F,      0,      0, 0x6E63,
};
unsigned short utf8_to_euc_E988[] = {
      0,      0,      0,      0,      0,      0, 0x7C27,      0,
      0,      0, 0x7C29,      0,      0, 0x465F, 0x3343,      0,
 0x7C28, 0x6E67,      0,      0, 0x6E64, 0x6E66,      0,      0,
      0,      0,      0,      0,      0,      0, 0x6E62,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x6F4F,      0,      0, 0x6E65,      0,      0,      0,
      0,      0,      0,      0, 0x4E6B,      0,      0, 0x385A,
      0, 0x7C30, 0x7C2A,      0, 0x7C2C,      0,      0, 0x6E6F,
};
unsigned short utf8_to_euc_E989[] = {
 0x7C2B,      0,      0,      0, 0x4534, 0x6E6A,      0,      0,
 0x6E6D, 0x6E6B,      0, 0x6E70,      0,      0, 0x7C2D,      0,
 0x6E71, 0x7C2F,      0,      0,      0,      0,      0, 0x6E69,
      0, 0x7C2E, 0x6E76, 0x3174,      0,      0, 0x6E68,      0,
      0,      0, 0x482D,      0, 0x6E6C,      0, 0x3E60, 0x7C31,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x395B,      0,      0,      0,      0,      0, 0x7C33,
 0x7C34,      0,      0,      0,      0,      0, 0x4B48,      0,
};
unsigned short utf8_to_euc_E98A[] = {
 0x3664,      0,      0, 0x3D46,      0, 0x463C,      0,      0,
 0x7924,      0,      0,      0,      0,      0,      0,      0,
      0, 0x412D,      0, 0x6E74,      0, 0x6E6E, 0x6E73,      0,
 0x4C43,      0, 0x4438, 0x6E75, 0x6E72,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x7C32,
      0,      0,      0,      0,      0, 0x412C,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x6E79,
      0, 0x6E78,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E98B[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x6E77,
 0x7C38,      0, 0x4B2F, 0x7C3C,      0, 0x7C3A,      0, 0x7C36,
      0, 0x7C37,      0,      0,      0,      0,      0,      0,
 0x7C3B,      0,      0,      0, 0x3D7B,      0,      0, 0x7C35,
      0, 0x6E7A, 0x4A5F,      0,      0, 0x3154,      0,      0,
      0,      0, 0x4946, 0x4372,      0,      0,      0,      0,
 0x3578, 0x792A, 0x6E7C, 0x7C3F, 0x395D,      0,      0, 0x7C42,
};
unsigned short utf8_to_euc_E98C[] = {
      0,      0, 0x7C44,      0,      0,      0, 0x3B2C,      0,
      0,      0,      0,      0,      0,      0,      0, 0x6E7B,
 0x3F6D,      0,      0,      0,      0,      0,      0,      0,
 0x3F6E, 0x6F21, 0x6F23,      0,      0, 0x7C43, 0x7C41,      0,
 0x3E7B, 0x7C3E, 0x6F22, 0x6F24,      0, 0x7C3D, 0x3653,      0,
 0x4945,      0,      0, 0x3C62, 0x4F23,      0, 0x6E7E, 0x3A78,
      0,      0, 0x4F3F,      0,      0, 0x6F26,      0,      0,
      0,      0, 0x6F25, 0x6F27,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E98D[] = {
      0,      0,      0,      0, 0x6E7D,      0,      0,      0,
 0x7923,      0,      0, 0x4669,      0, 0x4555,      0,      0,
      0,      0,      0,      0, 0x4457,      0, 0x6F2C, 0x7C46,
      0,      0,      0, 0x4343, 0x6F28,      0,      0,      0,
 0x6F29,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x372D,      0, 0x6F2B,      0,
 0x7C45,      0,      0,      0,      0, 0x3830,      0,      0,
      0,      0,      0,      0, 0x6F2A,      0, 0x3E61,      0,
};
unsigned short utf8_to_euc_E98E[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x3379,      0,      0,      0,
      0,      0,      0,      0, 0x6F30,      0, 0x3A3F, 0x4179,
      0,      0, 0x444A,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x7C47,      0,      0, 0x333B,
      0,      0,      0,      0, 0x6F2E, 0x6F2F, 0x4443,      0,
 0x6F2D,      0,      0,      0,      0,      0,      0,      0,
      0, 0x6F31,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E98F[] = {
      0,      0,      0, 0x6F37,      0,      0, 0x7C48,      0,
 0x6F3A,      0,      0,      0,      0,      0,      0,      0,
 0x6F39, 0x452D,      0,      0,      0,      0, 0x6F32, 0x6F33,
 0x6F36,      0,      0,      0,      0, 0x6F38, 0x7C49,      0,
      0, 0x3640,      0,      0, 0x6F3B, 0x6F35,      0,      0,
 0x6F34,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x7C4A,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E990[] = {
      0,      0,      0, 0x6F3F,      0,      0,      0, 0x6F40,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x6F41,      0,      0, 0x6F3E, 0x6F3D,      0,      0,      0,
 0x3E62, 0x462A, 0x6F3C,      0,      0,      0,      0,      0,
      0, 0x6F45,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x6F43,      0,      0,      0,      0,
      0, 0x7C4B,      0,      0,      0, 0x6F44, 0x6F42,      0,
 0x4278,      0, 0x6F46,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E991[] = {
      0, 0x6F47,      0,      0, 0x6F49, 0x7C4C,      0,      0,
 0x7C4D,      0,      0,      0,      0,      0,      0,      0,
      0, 0x3455, 0x6F48, 0x4C7A,      0,      0,      0,      0,
      0,      0, 0x6F54, 0x6F4A,      0,      0, 0x6F4D,      0,
 0x6F4B,      0, 0x6F4C,      0,      0,      0,      0,      0,
      0,      0, 0x6F4E,      0,      0,      0,      0,      0,
 0x6F50,      0,      0,      0,      0, 0x6F51,      0, 0x6F52,
      0,      0,      0,      0, 0x6F55, 0x6F53, 0x6F56, 0x6F58,
};
unsigned short utf8_to_euc_E992[] = {
      0, 0x6F57,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
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,
      0,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E996[] = {
 0x4C67,      0, 0x6F59, 0x412E,      0,      0,      0, 0x6F5A,
      0, 0x4A44, 0x6F5B, 0x332B,      0,      0,      0, 0x313C,
      0, 0x3457, 0x7C4E, 0x3456, 0x6F5C,      0, 0x6F5D,      0,
 0x6F5E, 0x6F5F,      0,      0,      0,      0,      0,      0,
 0x6F60,      0, 0x3458, 0x3355, 0x395E, 0x4836,      0, 0x6F62,
 0x6F61,      0,      0,      0,      0, 0x6F63,      0,      0,
      0,      0, 0x315C,      0,      0,      0,      0,      0,
      0, 0x6F66,      0, 0x6F65, 0x6F64,      0, 0x6F67,      0,
};
unsigned short utf8_to_euc_E997[] = {
      0,      0,      0, 0x6F6A,      0,      0,      0, 0x3047,
      0,      0, 0x6F68,      0, 0x6F6C, 0x6F6B,      0,      0,
      0,      0,      0,      0, 0x6F6E, 0x6F6D, 0x6F6F,      0,
 0x462E,      0,      0,      0, 0x6F70,      0,      0,      0,
      0, 0x6F71, 0x6F73,      0,      0, 0x6F72,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
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,      0,      0,      0,
      0, 0x6F74,      0,      0,      0,      0,      0,      0,
 0x6F75,      0, 0x3A65,      0,      0,      0, 0x6F76, 0x6F77,
      0,      0, 0x4B49,      0,      0,      0,      0,      0,
      0,      0,      0, 0x414B,      0,      0,      0, 0x3024,
};
unsigned short utf8_to_euc_E999[] = {
 0x424B,      0, 0x6F78,      0, 0x496D,      0,      0,      0,
      0,      0,      0, 0x6F7B, 0x6F79, 0x395F,      0, 0x6F7A,
 0x3842,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x4A45, 0x6F7D, 0x7021, 0x6F7E, 0x7022,
      0,      0, 0x3121, 0x3F58, 0x3D7C, 0x3459, 0x7023,      0,
      0,      0, 0x4766,      0, 0x7025,      0,      0,      0,
 0x3122,      0, 0x7024, 0x4444,      0, 0x4E4D, 0x462B, 0x6F7C,
 0x4E26,      0, 0x3831,      0,      0, 0x4D5B,      0,      0,
};
unsigned short utf8_to_euc_E99A[] = {
      0,      0,      0,      0,      0, 0x3679, 0x4E34,      0,
 0x3728,      0, 0x4262, 0x6721,      0, 0x7026, 0x332C, 0x3F6F,
      0,      0,      0,      0, 0x3356, 0x7028,      0, 0x7029,
 0x7027, 0x3764,      0, 0x3A5D, 0x3E63, 0x7C51,      0,      0,
 0x3123,      0,      0, 0x4E59,      0,      0,      0, 0x702B,
 0x6E2E,      0, 0x702A,      0,      0,      0,      0, 0x7C52,
 0x702E, 0x702C, 0x702D,      0, 0x702F,      0, 0x7030, 0x4E6C,
 0x7031, 0x7032,      0, 0x4049, 0x483B,      0,      0,      0,
};
unsigned short utf8_to_euc_E99B[] = {
 0x3F7D, 0x3467,      0,      0, 0x4D3A, 0x326D, 0x3D38, 0x385B,
      0, 0x7035,      0, 0x7034, 0x3B73, 0x7036, 0x7033,      0,
      0, 0x3B28,      0,      0,      0, 0x703A, 0x6A2D,      0,
      0, 0x5256,      0, 0x3F77, 0x7038,      0,      0,      0,
      0,      0, 0x4E25, 0x4671,      0,      0,      0,      0,
 0x312B,      0, 0x4063, 0x3C36,      0,      0,      0,      0,
 0x4A37,      0, 0x3140,      0,      0,      0, 0x4E6D, 0x4D6B,
      0, 0x703B,      0, 0x4545,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E99C[] = {
 0x3C7B,      0,      0,      0, 0x703C,      0, 0x703D, 0x3F4C,
 0x703E,      0, 0x4E6E,      0,      0, 0x7039, 0x7040, 0x7042,
      0, 0x7041,      0, 0x703F,      0,      0, 0x7043,      0,
      0, 0x7044,      0,      0, 0x417A,      0, 0x3262,      0,
      0,      0,      0,      0, 0x7045,      0,      0, 0x4C38,
      0,      0, 0x7046,      0,      0,      0,      0,      0,
 0x7047,      0, 0x4F2A, 0x7C53,      0,      0,      0,      0,
 0x5B31, 0x7048,      0, 0x7C54,      0, 0x7049, 0x704A,      0,
};
unsigned short utf8_to_euc_E99D[] = {
      0,      0, 0x704E, 0x7C55, 0x704B,      0, 0x704C,      0,
 0x704D, 0x704F,      0,      0,      0, 0x7C56,      0, 0x7C57,
      0, 0x7C58, 0x4044,      0,      0, 0x7C59, 0x4C77,      0,
      0, 0x4045,      0,      0, 0x7050,      0, 0x4873,      0,
 0x7051, 0x7353, 0x4C4C,      0, 0x7052,      0, 0x7053,      0,
 0x7054, 0x3357,      0, 0x7056,      0, 0x3F59,      0,      0,
      0, 0x7057,      0,      0, 0x3724,      0,      0,      0,
      0, 0x7058, 0x705C,      0, 0x705A,      0,      0,      0,
};
unsigned short utf8_to_euc_E99E[] = {
      0, 0x705B,      0,      0, 0x3373, 0x7059, 0x705D,      0,
      0,      0,      0, 0x705E,      0, 0x3048,      0, 0x705F,
 0x7060,      0,      0,      0,      0,      0,      0,      0,
 0x3E64,      0,      0,      0, 0x7061,      0,      0,      0,
 0x3547,      0,      0, 0x7064,      0,      0, 0x7063,      0,
 0x7062,      0,      0, 0x6B71,      0, 0x4A5C,      0,      0,
      0,      0,      0, 0x7065, 0x7066,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E99F[] = {
      0,      0,      0, 0x7067,      0,      0, 0x7068,      0,
 0x7069,      0,      0, 0x706A,      0,      0,      0,      0,
      0,      0,      0, 0x345A,      0,      0,      0,      0,
      0,      0,      0,      0, 0x706B,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0x706C, 0x4723,      0,
      0,      0, 0x706E, 0x323B,      0, 0x7071, 0x7070,      0,
      0,      0,      0, 0x3124,      0,      0,      0, 0x3641,
};
unsigned short utf8_to_euc_E9A0[] = {
      0, 0x4A47, 0x443A, 0x3A22,      0, 0x3960, 0x3D67,      0,
 0x3F5C,      0,      0,      0, 0x7073,      0,      0, 0x7072,
 0x4D42, 0x3468, 0x4852, 0x465C,      0,      0,      0, 0x3F7C,
 0x4E4E,      0, 0x375B,      0,      0,      0,      0,      0,
      0, 0x7076,      0,      0, 0x7075,      0,      0,      0,
      0,      0,      0,      0, 0x4B4B, 0x462C,      0,      0,
      0,      0,      0,      0, 0x3150,      0,      0, 0x7077,
 0x7074,      0,      0, 0x4951, 0x4D6A, 0x7078,      0,      0,
};
unsigned short utf8_to_euc_E9A1[] = {
      0,      0,      0,      0,      0,      0, 0x7079,      0,
      0,      0,      0, 0x707B, 0x426A, 0x335B, 0x335C, 0x707A,
      0,      0,      0,      0, 0x3469, 0x3832,      0, 0x7C5A,
 0x346A,      0,      0, 0x453F,      0,      0, 0x4E60,      0,
      0,      0,      0,      0,      0, 0x7C5B,      0, 0x385C,
      0,      0,      0, 0x707C,      0,      0,      0, 0x707D,
 0x707E, 0x7121,      0, 0x7123, 0x7122,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
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,      0,      0,      0,      0, 0x7125,
      0, 0x7126,      0,      0,      0,      0, 0x7127,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E9A3[] = {
      0,      0,      0, 0x7129, 0x7128,      0, 0x712A,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x4874, 0x664C,      0,      0, 0x3F29,
      0,      0, 0x3532,      0,      0,      0,      0,      0,
      0, 0x712B,      0, 0x712C,      0, 0x522C, 0x5D3B, 0x4853,
      0,      0, 0x307B,      0, 0x303B,      0,      0,      0,
      0,      0,      0,      0, 0x3B74, 0x4B30, 0x3E7E,      0,
};
unsigned short utf8_to_euc_E9A4[] = {
      0,      0,      0, 0x712D,      0, 0x4C5F,      0,      0,
      0, 0x712E, 0x4D5C,      0, 0x3142,      0,      0,      0,
 0x3B41,      0, 0x712F, 0x326E, 0x7130,      0,      0,      0,
 0x7131,      0,      0,      0,      0, 0x7133, 0x7134,      0,
 0x7136, 0x7132,      0,      0, 0x7135,      0,      0, 0x7C5E,
 0x345B,      0,      0,      0, 0x7137,      0, 0x7138,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0x7139, 0x713A,      0,
};
unsigned short utf8_to_euc_E9A5[] = {
      0,      0, 0x713B,      0,      0, 0x713D,      0,      0,
      0, 0x713C,      0, 0x713F, 0x7142,      0,      0,      0,
 0x713E, 0x7140, 0x7141,      0,      0, 0x7143,      0, 0x3642,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
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,      0,      0,      0, 0x7C60,      0,
      0,      0,      0,      0,      0, 0x7146,      0,      0,
 0x333E,      0,      0,      0, 0x474F, 0x7147, 0x7148,      0,
      0,      0,      0, 0x435A, 0x466B,      0,      0,      0,
      0,      0,      0,      0, 0x7149,      0,      0,      0,
};
unsigned short utf8_to_euc_E9A7[] = {
      0, 0x477D,      0,      0, 0x424C, 0x3158, 0x366E,      0,
 0x366F,      0,      0,      0,      0,      0,      0,      0,
 0x4373, 0x714E, 0x3670,      0,      0, 0x326F,      0,      0,
 0x714D,      0,      0, 0x714B,      0, 0x714C,      0, 0x714A,
      0,      0, 0x7158,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0x714F, 0x7150,      0,
      0, 0x7151, 0x7152,      0,      0,      0,      0,      0,
 0x7154,      0,      0, 0x7153,      0,      0,      0, 0x3D59,
};
unsigned short utf8_to_euc_E9A8[] = {
      0, 0x7155,      0,      0,      0, 0x7157,      0,      0,
      0,      0,      0,      0,      0,      0, 0x3533, 0x7156,
      0,      0, 0x417B, 0x3833,      0,      0,      0,      0,
      0, 0x7159,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x424D,      0,      0, 0x715A,      0,      0,      0,      0,
 0x462D,      0,      0,      0,      0,      0,      0, 0x715B,
      0,      0,      0,      0,      0,      0, 0x7160,      0,
};
unsigned short utf8_to_euc_E9A9[] = {
 0x715E,      0, 0x715D, 0x715F,      0, 0x715C,      0,      0,
      0,      0,      0,      0,      0, 0x7162, 0x7C61,      0,
      0,      0,      0,      0,      0, 0x7161,      0, 0x7164,
      0,      0, 0x3643, 0x7163,      0,      0,      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,
};
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,      0,      0,      0, 0x716C,      0,      0,
 0x716D,      0,      0,      0,      0,      0,      0,      0,
 0x333C,      0,      0,      0, 0x716E,      0,      0,      0,
};
unsigned short utf8_to_euc_E9AB[] = {
 0x716F,      0,      0,      0, 0x3F71,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x7170,
      0, 0x7171,      0, 0x7172, 0x7173,      0,      0,      0,
 0x3962, 0x7C62,      0,      0, 0x7C63,      0, 0x7174, 0x7175,
      0,      0, 0x7176, 0x7177,      0,      0, 0x7178,      0,
      0,      0, 0x4831, 0x717A,      0, 0x4926, 0x717B, 0x7179,
      0, 0x717D,      0,      0, 0x717C,      0,      0, 0x717E,
      0,      0,      0, 0x7221,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E9AC[] = {
      0,      0,      0,      0,      0,      0, 0x7222,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x7223,      0, 0x7224,      0,      0,      0,      0, 0x7225,
      0,      0, 0x7226, 0x7227,      0, 0x7228,      0, 0x7229,
 0x722A, 0x722B, 0x722C,      0,      0,      0, 0x722D, 0x722E,
      0, 0x5D35, 0x722F,      0,      0,      0,      0,      0,
      0,      0,      0, 0x6478, 0x3534,      0,      0,      0,
};
unsigned short utf8_to_euc_E9AD[] = {
      0, 0x3321, 0x3A32, 0x7231, 0x7230, 0x4C25,      0,      0,
      0,      0,      0,      0,      0, 0x7233, 0x7234, 0x7232,
      0, 0x7235,      0,      0, 0x4B62,      0,      0,      0,
 0x7236,      0, 0x357B,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x4F25,
      0,      0, 0x7C65,      0, 0x7237, 0x7C64,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E9AE[] = {
      0,      0,      0, 0x7239,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x303E, 0x7C66,
      0, 0x723A, 0x4A2B, 0x7238,      0,      0, 0x723B, 0x723C,
      0,      0,      0,      0,      0,      0,      0, 0x723D,
 0x723E,      0,      0,      0,      0,      0,      0,      0,
 0x723F,      0, 0x4B6E, 0x3B2D,      0, 0x3A7A, 0x412F,      0,
      0, 0x7C67,      0,      0, 0x7240,      0,      0,      0,
      0, 0x7243,      0, 0x7C68,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E9AF[] = {
 0x7241,      0,      0,      0,      0,      0, 0x7244,      0,
      0, 0x3871, 0x7242,      0,      0,      0,      0, 0x7245,
      0, 0x7246, 0x7247,      0, 0x724B,      0, 0x3B2A,      0,
      0,      0,      0, 0x4264,      0,      0,      0,      0,
      0, 0x724C, 0x7249, 0x7248, 0x724A,      0,      0,      0,
 0x375F,      0,      0,      0,      0,      0,      0,      0,
 0x7250, 0x724F, 0x724E,      0,      0, 0x3033,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E9B0[] = {
 0x7C69,      0,      0,      0, 0x725A,      0, 0x7256,      0,
 0x7257, 0x7253, 0x7259,      0, 0x7255, 0x3362,      0,      0,
 0x4F4C,      0, 0x7258, 0x7254, 0x7252, 0x7251,      0,      0,
      0,      0,      0, 0x725C,      0,      0,      0,      0,
      0, 0x725F,      0,      0, 0x725E, 0x725D,      0,      0,
      0,      0,      0,      0,      0, 0x4949, 0x725B, 0x3073,
 0x7260,      0, 0x7262,      0,      0,      0,      0,      0,
      0, 0x336F, 0x724D, 0x3137,      0,      0, 0x7264,      0,
};
unsigned short utf8_to_euc_E9B1[] = {
      0,      0,      0,      0,      0,      0, 0x7263, 0x7261,
 0x432D,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x4B70,      0,      0,      0,      0, 0x4E5A,
      0,      0, 0x7265,      0,      0,      0,      0,      0,
 0x7266,      0,      0,      0,      0,      0,      0, 0x7267,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x7268,      0,
 0x7269,      0,      0,      0,      0,      0,      0,      0,
};
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,      0, 0x726A,
      0, 0x4837,      0, 0x726F, 0x726B,      0,      0,      0,
 0x726C,      0,      0, 0x4B31, 0x4C44,      0, 0x4650,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E9B4[] = {
      0,      0,      0, 0x7270,      0,      0, 0x7271, 0x463E,
 0x726E, 0x726D,      0,      0,      0,      0, 0x322A,      0,
      0,      0, 0x7279,      0,      0, 0x7278,      0,      0,
      0,      0,      0, 0x3175,      0,      0,      0, 0x7276,
      0,      0,      0, 0x7275,      0,      0, 0x7273,      0,
 0x337B,      0, 0x7272, 0x3C32, 0x3229,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x3963,      0,      0, 0x727C, 0x727B,
};
unsigned short utf8_to_euc_E9B5[] = {
      0, 0x727A,      0,      0, 0x7277,      0, 0x727D,      0,
 0x727E,      0,      0,      0,      0,      0,      0,      0,
 0x7325, 0x7324,      0,      0,      0,      0,      0,      0,
      0, 0x7326,      0,      0, 0x312D, 0x7321, 0x7322,      0,
 0x3974, 0x4C39,      0,      0, 0x7323,      0,      0,      0,
      0,      0,      0, 0x7C6B, 0x4B32,      0,      0, 0x732B,
 0x7C6A,      0, 0x7327,      0,      0,      0,      0,      0,
      0,      0, 0x732C,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E9B6[] = {
      0,      0,      0,      0,      0,      0,      0, 0x7329,
      0, 0x7328,      0,      0,      0,      0,      0, 0x375C,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x732D,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x732E,      0,      0,      0,
      0, 0x732F,      0, 0x732A,      0,      0,      0, 0x7274,
      0,      0, 0x7330,      0, 0x4461,      0,      0,      0,
 0x7334,      0, 0x7335, 0x7333,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E9B7[] = {
      0, 0x7332, 0x7338,      0, 0x7331,      0, 0x7336,      0,
      0,      0,      0,      0,      0,      0,      0, 0x7337,
      0,      0,      0, 0x733A,      0,      0,      0,      0,
      0, 0x7339,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x733C,      0,
      0,      0,      0,      0,      0, 0x733D,      0, 0x733E,
      0,      0, 0x4F49,      0,      0,      0,      0,      0,
 0x733B, 0x426B, 0x3A6D,      0,      0, 0x733F,      0,      0,
};
unsigned short utf8_to_euc_E9B8[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x7C6D, 0x7340, 0x7341,      0,      0, 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,
};
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,      0,      0,      0, 0x7345,      0, 0x3C2F,
};
unsigned short utf8_to_euc_E9BA[] = {
      0, 0x7346,      0,      0,      0,      0,      0,      0,
 0x7347,      0,      0, 0x7348, 0x7349,      0,      0,      0,
      0, 0x734C, 0x734A, 0x4F3C,      0, 0x734B,      0, 0x4E6F,
      0,      0,      0,      0,      0, 0x734D,      0, 0x4E5B,
      0,      0,      0,      0,      0, 0x734E, 0x477E,      0,
      0, 0x734F, 0x7351,      0,      0, 0x7352,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x7350, 0x396D, 0x4C4D, 0x4B63, 0x5677,      0, 0x5D60, 0x4B7B,
};
unsigned short utf8_to_euc_E9BB[] = {
      0,      0,      0,      0, 0x322B,      0,      0,      0,
      0,      0,      0,      0, 0x7354, 0x3550, 0x7355, 0x7356,
 0x7357, 0x7C6E, 0x3975,      0, 0x7358,      0,      0,      0,
 0x6054, 0x4C5B,      0, 0x4263, 0x7359, 0x735B, 0x735A,      0,
 0x735C,      0,      0,      0,      0, 0x735D,      0,      0,
 0x735E,      0,      0,      0,      0,      0,      0, 0x735F,
      0,      0,      0,      0, 0x7360,      0, 0x7361, 0x7362,
      0, 0x7363,      0, 0x7364, 0x7365, 0x7366,      0,      0,
};
unsigned short utf8_to_euc_E9BC[] = {
      0,      0,      0,      0,      0,      0,      0, 0x7367,
 0x7368,      0,      0,      0,      0,      0, 0x4524,      0,
      0,      0,      0, 0x385D,      0, 0x736A,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x414D, 0x736B,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x736C,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x4921,      0,      0, 0x736D,      0,
};
unsigned short utf8_to_euc_E9BD[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x736E, 0x6337,      0,      0, 0x6C5A, 0x706D,
      0,      0, 0x736F,      0, 0x7370,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x7372,
 0x7373, 0x7374, 0x4E70, 0x7371,      0,      0, 0x7375, 0x7376,
      0,      0, 0x7378,      0, 0x7377,      0,      0,      0,
      0,      0, 0x737A,      0,      0,      0, 0x737B, 0x7379,
      0,      0,      0,      0,      0,      0,      0,      0,
};
unsigned short utf8_to_euc_E9BE[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0x4E36,      0,      0,
      0,      0,      0,      0,      0, 0x737C,      0,      0,
      0,      0,      0,      0, 0x737D, 0x6354,      0,      0,
 0x737E,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
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,
};
unsigned short * 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,
};
unsigned short * 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,
};
unsigned short * 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,
};
unsigned short * 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,
};
unsigned short * 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,
};
unsigned short * 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,
};
unsigned short * 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,
};
unsigned short * 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,
};
unsigned short * 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,
};
unsigned short * 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,
              0,              0,              0,              0,
              0,              0,              0,              0,
              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,
};
unsigned short ** 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,
};
#endif /* UTF8_INPUT_ENABLE */

#ifdef SHIFTJIS_CP932
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,
 },
};
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_TRANS */
;
/* [<][>][^][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.2.2.3 2005/07/26 03:58:47 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.2.2.2 2005/04/15 19:16:18 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.11.2.6 2005/11/01 01:52: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"
#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.14.2.1 2005/06/19 16:29:17 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_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
#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.5.2.8 2005/09/10 01:11:15 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.3.2.1 2005/09/10 01:17:00 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.2.2.1 2005/06/19 16:29:17 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;
        GetOpenFile(obj, fptr);
        rb_io_check_readable(fptr);
        bio = BIO_new_fp(fptr->f, BIO_NOCLOSE);
    }
    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.5.2.1 2004/12/15 01:54:39 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_update_deprecated
  14. ossl_cipher_final
  15. ossl_cipher_name
  16. ossl_cipher_set_key
  17. ossl_cipher_set_iv
  18. ossl_cipher_set_key_length
  19. ossl_cipher_set_padding
  20. CIPHER_0ARG_INT
/*
 * $Id: ossl_cipher.c,v 1.4.2.5 2005/10/30 20:50:48 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_update_deprecated(VALUE self, VALUE data)
{
    char *cname;

    cname = rb_class2name(rb_obj_class(self));
    rb_warning("%s#<< is deprecated; use %s#update instead", cname, cname);
    return ossl_cipher_update(self, data);
}

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)
{
    EVP_CIPHER_CTX *ctx;
    int len = NUM2INT(key_length);

    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, "<<", ossl_cipher_update_deprecated, 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.8.2.3 2004/12/15 01:54:39 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.4.2.2 2004/12/15 01:54:39 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.4.2.6 2005/09/18 22:56:11 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.4.2.2 2004/12/15 01:54:39 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.3.2.3 2005/09/10 01:06:50 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.4.2.2 2005/01/22 20:28:02 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.1.2.1 2005/06/19 16:29:17 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.5.2.3 2005/09/10 01:11:15 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.1.2.1 2005/09/10 01:17:00 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.4.2.2 2005/04/08 09:26: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'.)
 */
#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.2.2.2 2005/09/18 22:56:11 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.4.2.3 2005/04/08 09:26: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(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.5.2.3 2005/09/18 22:56:11 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.5.2.4 2005/09/18 22:56:11 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.13.2.9 2005/09/24 00:33:17 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;

/*
 * SSLContext class
 */
#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(fileno(fptr->f)));
        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(fileno(fptr->f));
            continue;
        case SSL_ERROR_WANT_READ:
            rb_io_wait_readable(fileno(fptr->f));
            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(fileno(fptr->f));
        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(fileno(fptr->f));
                continue;
            case SSL_ERROR_WANT_READ:
                rb_io_wait_readable(fileno(fptr->f));
                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(fileno(fptr->f));
                continue;
            case SSL_ERROR_WANT_READ:
                rb_io_wait_readable(fileno(fptr->f));
                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.4.2.2 2004/12/15 01:54:38 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.3.2.1 2004/12/15 01:54:38 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.3.2.1 2004/12/15 01:54:38 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.8.2.3 2005/11/22 22:28:51 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.4.2.8 2004/12/27 07:55:56 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.5.2.2 2005/09/10 00:54: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'.)
 */
#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.2.2.1 2004/12/15 01:54:38 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.2.2.5 2005/09/10 00:54: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'.)
 */
#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->f = fdopen(info.fd, "r");
    rfptr->path = strdup(SlaveName);

    wfptr->mode = rb_io_mode_flags("w") | FMODE_SYNC;
    wfptr->f = fdopen(dup(info.fd), "w");
    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_completion_proc
  4. readline_s_get_completion_proc
  5. readline_s_set_completion_case_fold
  6. readline_s_get_completion_case_fold
  7. readline_attempted_completion_function
  8. readline_s_vi_editing_mode
  9. readline_s_emacs_editing_mode
  10. readline_s_set_completion_append_character
  11. readline_s_get_completion_append_character
  12. readline_s_set_basic_word_break_characters
  13. readline_s_get_basic_word_break_characters
  14. readline_s_set_completer_word_break_characters
  15. readline_s_get_completer_word_break_characters
  16. readline_s_set_basic_quote_characters
  17. readline_s_get_basic_quote_characters
  18. readline_s_set_completer_quote_characters
  19. readline_s_get_completer_quote_characters
  20. readline_s_set_filename_quote_characters
  21. readline_s_get_filename_quote_characters
  22. hist_to_s
  23. hist_get
  24. hist_set
  25. hist_push
  26. hist_push_method
  27. rb_remove_history
  28. hist_pop
  29. hist_shift
  30. hist_each
  31. hist_length
  32. hist_empty_p
  33. hist_delete_at
  34. filename_completion_proc_call
  35. username_completion_proc_call
  36. 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;
    OpenFile *ofp, *ifp;

    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");

    Check_Type(rb_stdout, T_FILE);
    GetOpenFile(rb_stdout, ofp);
    rl_outstream = GetWriteFile(ofp);
    Check_Type(rb_stdin, T_FILE);
    GetOpenFile(rb_stdin, ifp);
    rl_instream = GetReadFile(ifp);
    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_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, "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 before 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/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.5.2.1 2005/09/08 05:59:41 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.5.2.1 2005/09/08 05:59:41 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_indexes
  13. fsdbm_select
  14. fsdbm_values_at
  15. fdbm_modify
  16. fsdbm_delete
  17. fsdbm_shift
  18. fsdbm_delete_if
  19. fsdbm_clear
  20. fsdbm_invert
  21. each_pair
  22. update_i
  23. fsdbm_update
  24. fsdbm_replace
  25. fsdbm_store
  26. fsdbm_length
  27. fsdbm_empty_p
  28. fsdbm_each_value
  29. fsdbm_each_key
  30. fsdbm_each_pair
  31. fsdbm_keys
  32. fsdbm_values
  33. fsdbm_has_key
  34. fsdbm_has_value
  35. fsdbm_to_a
  36. fsdbm_to_hash
  37. fsdbm_reject
  38. Init_sdbm
/************************************************

  sdbminit.c -

  $Author: ocean $
  $Date: 2005/06/25 05:42:41 $
  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_indexes(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    VALUE new;
    int i;

    new = rb_ary_new2(argc);
    for (i=0; i<argc; i++) {
        rb_ary_push(new, fsdbm_fetch(obj, argv[i], Qnil));
    }

    return new;
}

static VALUE
fsdbm_select(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    VALUE new = rb_ary_new2(argc);
    int i;

    if (rb_block_given_p()) {
        datum key, val;
        DBM *dbm;
        struct dbmdata *dbmp;

        if (argc > 0) {
            rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc);
        }
        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);
        }
    }
    else {
        rb_warn("SDBM#select(index..) is deprecated; use SDBM#values_at");

        for (i=0; i<argc; i++) {
            rb_ary_push(new, fsdbm_fetch(obj, argv[i], Qnil));
        }
    }

    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, "indexes",  fsdbm_indexes, -1);
    rb_define_method(rb_cDBM, "indices",  fsdbm_indexes, -1);
    rb_define_method(rb_cDBM, "select",  fsdbm_select, -1);
    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>
#if !defined(_WIN32) && !defined(__VMS)
#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>
#elif defined(__VMS )
#include <socket.h>
#include <inet.h>
#include <in.h>
#include <netdb.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(HAVE_CLOSESOCKET)
                        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. s_recvfrom
  14. bsock_recv
  15. bsock_do_not_rev_lookup
  16. bsock_do_not_rev_lookup_set
  17. make_ipaddr0
  18. make_ipaddr
  19. make_inetaddr
  20. str_isnumber
  21. host_str
  22. port_str
  23. sock_addrinfo
  24. ipaddr
  25. ruby_socket
  26. wait_connectable
  27. ruby_connect
  28. inetsock_cleanup
  29. init_inetsock_internal
  30. init_inetsock
  31. tcp_init
  32. socks_init
  33. socks_s_close
  34. make_hostent_internal
  35. make_hostent
  36. tcp_sockaddr
  37. tcp_s_gethostbyname
  38. tcp_svr_init
  39. s_accept
  40. tcp_accept
  41. tcp_sysaccept
  42. unixsock_connect_internal
  43. init_unixsock
  44. ip_addr
  45. ip_peeraddr
  46. ip_recvfrom
  47. ip_s_getaddress
  48. udp_init
  49. udp_connect_internal
  50. udp_connect
  51. udp_bind
  52. udp_send
  53. unix_init
  54. unix_path
  55. unix_svr_init
  56. unix_recvfrom
  57. unix_send_io
  58. thread_read_select
  59. unix_recv_io
  60. unix_accept
  61. unix_sysaccept
  62. unixaddr
  63. unix_addr
  64. unix_peeraddr
  65. setup_domain_and_type
  66. sock_initialize
  67. sock_s_socketpair
  68. unix_s_socketpair
  69. sock_connect
  70. sock_bind
  71. sock_listen
  72. sock_recvfrom
  73. sock_accept
  74. sock_sysaccept
  75. sock_gethostname
  76. sock_gethostname
  77. sock_gethostname
  78. make_addrinfo
  79. sock_sockaddr
  80. sock_s_gethostbyname
  81. sock_s_gethostbyaddr
  82. sock_s_getservbyaname
  83. sock_s_getaddrinfo
  84. sock_s_getnameinfo
  85. sock_s_pack_sockaddr_in
  86. sock_s_unpack_sockaddr_in
  87. sock_s_pack_sockaddr_un
  88. sock_s_unpack_sockaddr_un
  89. sock_define_const
  90. Init_socket
/************************************************

  socket.c -

  $Author: usa $
  $Date: 2005/11/28 09:56:45 $
  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>
# define pseudo_AF_FTIP pseudo_AF_RTIP  /* workaround for NetBSD and etc. */
#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"

#if defined(__vms)
#include <tcp.h>
#endif

static int do_not_reverse_lookup = 0;

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 HAVE_CLOSESOCKET
#undef close
#define close closesocket
#endif

static VALUE
init_sock(sock, fd)
    VALUE sock;
    int fd;
{
    OpenFile *fp;

    MakeOpenFile(sock, fp);
    fp->f = rb_fdopen(fd, "r");
    fp->f2 = rb_fdopen(fd, "w");
    fp->mode = FMODE_READWRITE;
    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(fileno(fptr->f), 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(fileno(fptr->f), 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(fileno(fptr->f2), 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(fileno(fptr->f), 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);

    GetOpenFile(sock, fptr);
    if (getsockopt(fileno(fptr->f), 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(fileno(fptr->f), (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(fileno(fptr->f), (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;
    FILE *f;
    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);
    f = GetWriteFile(fptr);
    fd = fileno(f);
    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 ipaddr _((struct sockaddr*));
#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_read_pending(fptr->f)) {
        rb_raise(rb_eIOError, "recv for buffered IO");
    }
    fd = fileno(fptr->f);

    str = rb_tainted_str_new(0, buflen);

  retry:
    rb_str_locktmp(str);
    rb_thread_wait_fd(fd);
    TRAP_BEG;
    slen = recvfrom(fd, RSTRING(str)->ptr, buflen, flags, (struct sockaddr*)buf, &alen);
    TRAP_END;
    rb_str_unlocktmp(str);

    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 from recvfrom for connection-oriented sockets */
          return rb_assoc_new(str, ipaddr((struct sockaddr*)buf));
        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;
}

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) {
        rb_raise(rb_eSocket, "getnameinfo: %s", gai_strerror(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");
        }
        rb_raise(rb_eSocket, "getaddrinfo: %s", gai_strerror(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)
    struct sockaddr *sockaddr;
{
    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 (!do_not_reverse_lookup) {
        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) {
        rb_raise(rb_eSocket, "getnameinfo: %s", gai_strerror(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_connectable(fd)
    int fd;
{
    int sockerr;
    socklen_t sockerrlen;
    fd_set fds_w;
    fd_set fds_e;

    for (;;) {
        FD_ZERO(&fds_w);
        FD_ZERO(&fds_e);

        FD_SET(fd, &fds_w);
        FD_SET(fd, &fds_e);

        rb_thread_select(fd+1, 0, &fds_w, &fds_e, 0);

        if (FD_ISSET(fd, &fds_w)) {
            return 0;
        }
        else if (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;
}

#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(fileno(fptr->f), 2);
    shutdown(fileno(fptr->f2), 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, fileno(fptr->f),
                    (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, fileno(fptr->f), (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(fileno(fptr->f), (struct sockaddr*)&addr, &len) < 0)
        rb_sys_fail("getsockname(2)");
    return ipaddr((struct sockaddr*)&addr);
}

static VALUE
ip_peeraddr(sock)
    VALUE sock;
{
    OpenFile *fptr;
    struct sockaddr_storage addr;
    socklen_t len = sizeof addr;

    GetOpenFile(sock, fptr);

    if (getpeername(fileno(fptr->f), (struct sockaddr*)&addr, &len) < 0)
        rb_sys_fail("getpeername(2)");
    return ipaddr((struct sockaddr*)&addr);
}

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 = fileno(fptr->f);
    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(fileno(fptr->f), 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;
    FILE *f;
    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);
    f = GetWriteFile(fptr);
    for (res = res0; res; res = res->ai_next) {
      retry:
        n = sendto(fileno(f), 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(fileno(f))) {
            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(fileno(fptr->f), (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 = fileno(valfptr->f);
    }
    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(fileno(fptr->f), &msg, 0) == -1)
        rb_sys_fail("sendmsg(2)");

    return Qnil;
#else
    rb_notimplement();
    return Qnil;                /* not reached */
#endif
}

#if defined(HAVE_RECVMSG) && (FD_PASSING_BY_MSG_CONTROL || FD_PASSING_BY_MSG_ACCRIGHTS)
static void
thread_read_select(fd)
    int fd;
{
    fd_set fds;

    FD_ZERO(&fds);
    FD_SET(fd, &fds);
    rb_thread_select(fd+1, &fds, 0, 0, 0);
}
#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);

    thread_read_select(fileno(fptr->f));

    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(fileno(fptr->f), &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, fileno(fptr->f),
                    (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, fileno(fptr->f), (struct sockaddr*)&from, &fromlen);
}

static VALUE
unixaddr(sockaddr)
    struct sockaddr_un *sockaddr;
{
    return rb_assoc_new(rb_str_new2("AF_UNIX"),
                        rb_str_new2(sockaddr->sun_path));
}

static VALUE
unix_addr(sock)
    VALUE sock;
{
    OpenFile *fptr;
    struct sockaddr_un addr;
    socklen_t len = sizeof addr;

    GetOpenFile(sock, fptr);

    if (getsockname(fileno(fptr->f), (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(fileno(fptr->f), (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__) && !defined(__VMS)
    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;

    StringValue(addr);
    addr = rb_str_new4(addr);
    GetOpenFile(sock, fptr);
    fd = fileno(fptr->f);
    if (ruby_connect(fd, (struct sockaddr*)RSTRING(addr)->ptr, RSTRING(addr)->len, 0) < 0) {
        rb_sys_fail("connect(2)");
    }

    return INT2FIX(0);
}

/*
 * 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(fileno(fptr->f), (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(fileno(fptr->f), 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);
}

/*
 * call-seq:
 *      socket.accept => [ socket, string ]
 *
 * Accepts an incoming connection returning an array containing a new
 * Socket object and a string holding 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, client_sockaddr = socket.accept
 *      puts "The client said, '#{socket.readline.chomp}'"
 *      client.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
 *
 * === Unix-based Exceptions
 * On unix-based based systems the following system exceptions may be raised if the
 * call to _accept_ fails:
 * * Errno::EAGAIN - O_NONBLOCK is set for the +socket+ file descriptor and no
 *   connections are parent to be accepted
 * * Errno::EWOULDBLOCK - same as Errno::EAGAIN
 * * Errno::EBADF - the +socket+ is not a valid file descriptor
 * * Errno::ECONNABORTED - a connection has been aborted
 * * Errno::EFAULT - the socket's internal address or address length parameter
 *   cannot be access or written
 * * Errno::EINTR - the _accept_ method was interrupted by a signal that was
 *   caught before a valid connection arrived
 * * Errno::EINVAL - the +socket+ is not accepting connections
 * * Errno::EMFILE - OPEN_MAX file descriptors are currently open in the calling
 *   process
 * * Errno::ENOBUFS - no buffer space is available
 * * Errno::ENOMEM - there was insufficient memory available to complete the
 *   operation
 * * Errno::ENOSR - there was insufficient STREAMS resources available to
 *   complete the operation
 * * Errno::ENFILE - the maximum number of file descriptors in the system are
 *   already open
 * * Errno::ENOTSOCK - the +socket+ does not refer to a socket
 * * Errno::EOPNOTSUPP - the socket type for the calling +socket+ does not
 *   support accept connections
 * * Errno::EPROTO - a protocol error has occurred
 *
 * === Windows Exceptions
 * On Windows systems the following system exceptions may be raised if
 * the call to _accept_ fails:
 * * Errno::ECONNRESET - an incoming connection was indicated, but was
 *   terminated by the remote peer prior to accepting the connection
 * * 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 _listen_ method was not invoked prior to calling _accept_
 * * Errno::EINPROGRESS - a blocking Windows Sockets 1.1 call is in progress or
 *   the service provider is still processing a callback function
 * * Errno::EMFILE - the queue is not empty, upong etry to _accept_ and there are
 *   no socket descriptors available
 * * Errno::ENETDOWN - the network is down
 * * Errno::ENOBUFS - no buffer space is available
 * * Errno::ENOTSOCK - +socket+ is not a socket
 * * Errno::EOPNOTSUPP - +socket+ is not a type that supports connection-oriented
 *   service.
 * * Errno::EWOULDBLOCK - +socket+ is marked as nonblocking and no connections are
 *   present to be accepted
 *
 * === See
 * * accept manual pages on unix-based systems
 * * accept function in Microsoft's Winsock functions reference
 */
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,fileno(fptr->f),(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,fileno(fptr->f),(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);
        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_getservbyaname(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_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) {
        rb_raise(rb_eSocket, "getaddrinfo: %s", gai_strerror(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);
    rb_raise(rb_eSocket, "getaddrinfo: %s", gai_strerror(error));

  error_exit_name:
    if (res) freeaddrinfo(res);
    rb_raise(rb_eSocket, "getnameinfo: %s", gai_strerror(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_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_getservbyaname, -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");
    sock_define_const("SOCK_STREAM", SOCK_STREAM);
    sock_define_const("SOCK_DGRAM", SOCK_DGRAM);
#ifdef SOCK_RAW
    sock_define_const("SOCK_RAW", SOCK_RAW);
#endif
#ifdef SOCK_RDM
    sock_define_const("SOCK_RDM", SOCK_RDM);
#endif
#ifdef SOCK_SEQPACKET
    sock_define_const("SOCK_SEQPACKET", SOCK_SEQPACKET);
#endif
#ifdef SOCK_PACKET
    sock_define_const("SOCK_PACKET", SOCK_PACKET);
#endif

    sock_define_const("AF_INET", AF_INET);
#ifdef PF_INET
    sock_define_const("PF_INET", PF_INET);
#endif
#ifdef AF_UNIX
    sock_define_const("AF_UNIX", AF_UNIX);
    sock_define_const("PF_UNIX", PF_UNIX);
#endif
#ifdef AF_AX25
    sock_define_const("AF_AX25", AF_AX25);
    sock_define_const("PF_AX25", PF_AX25);
#endif
#ifdef AF_IPX
    sock_define_const("AF_IPX", AF_IPX);
    sock_define_const("PF_IPX", PF_IPX);
#endif
#ifdef AF_APPLETALK
    sock_define_const("AF_APPLETALK", AF_APPLETALK);
    sock_define_const("PF_APPLETALK", PF_APPLETALK);
#endif
#ifdef AF_UNSPEC
    sock_define_const("AF_UNSPEC", AF_UNSPEC);
    sock_define_const("PF_UNSPEC", PF_UNSPEC);
#endif
#ifdef INET6
    sock_define_const("AF_INET6", AF_INET6);
#endif
#ifdef INET6
    sock_define_const("PF_INET6", PF_INET6);
#endif
#ifdef AF_LOCAL
    sock_define_const("AF_LOCAL", AF_LOCAL);
#endif
#ifdef PF_LOCAL
    sock_define_const("PF_LOCAL", PF_LOCAL);
#endif
#ifdef AF_IMPLINK
    sock_define_const("AF_IMPLINK", AF_IMPLINK);
#endif
#ifdef PF_IMPLINK
    sock_define_const("PF_IMPLINK", PF_IMPLINK);
#endif
#ifdef AF_PUP
    sock_define_const("AF_PUP", AF_PUP);
#endif
#ifdef PF_PUP
    sock_define_const("PF_PUP", PF_PUP);
#endif
#ifdef AF_CHAOS
    sock_define_const("AF_CHAOS", AF_CHAOS);
#endif
#ifdef PF_CHAOS
    sock_define_const("PF_CHAOS", PF_CHAOS);
#endif
#ifdef AF_NS
    sock_define_const("AF_NS", AF_NS);
#endif
#ifdef PF_NS
    sock_define_const("PF_NS", PF_NS);
#endif
#ifdef AF_ISO
    sock_define_const("AF_ISO", AF_ISO);
#endif
#ifdef PF_ISO
    sock_define_const("PF_ISO", PF_ISO);
#endif
#ifdef AF_OSI
    sock_define_const("AF_OSI", AF_OSI);
#endif
#ifdef PF_OSI
    sock_define_const("PF_OSI", PF_OSI);
#endif
#ifdef AF_ECMA
    sock_define_const("AF_ECMA", AF_ECMA);
#endif
#ifdef PF_ECMA
    sock_define_const("PF_ECMA", PF_ECMA);
#endif
#ifdef AF_DATAKIT
    sock_define_const("AF_DATAKIT", AF_DATAKIT);
#endif
#ifdef PF_DATAKIT
    sock_define_const("PF_DATAKIT", PF_DATAKIT);
#endif
#ifdef AF_CCITT
    sock_define_const("AF_CCITT", AF_CCITT);
#endif
#ifdef PF_CCITT
    sock_define_const("PF_CCITT", PF_CCITT);
#endif
#ifdef AF_SNA
    sock_define_const("AF_SNA", AF_SNA);
#endif
#ifdef PF_SNA
    sock_define_const("PF_SNA", PF_SNA);
#endif
#ifdef AF_DEC
    sock_define_const("AF_DEC", AF_DEC);
#endif
#ifdef PF_DEC
    sock_define_const("PF_DEC", PF_DEC);
#endif
#ifdef AF_DLI
    sock_define_const("AF_DLI", AF_DLI);
#endif
#ifdef PF_DLI
    sock_define_const("PF_DLI", PF_DLI);
#endif
#ifdef AF_LAT
    sock_define_const("AF_LAT", AF_LAT);
#endif
#ifdef PF_LAT
    sock_define_const("PF_LAT", PF_LAT);
#endif
#ifdef AF_HYLINK
    sock_define_const("AF_HYLINK", AF_HYLINK);
#endif
#ifdef PF_HYLINK
    sock_define_const("PF_HYLINK", PF_HYLINK);
#endif
#ifdef AF_ROUTE
    sock_define_const("AF_ROUTE", AF_ROUTE);
#endif
#ifdef PF_ROUTE
    sock_define_const("PF_ROUTE", PF_ROUTE);
#endif
#ifdef AF_LINK
    sock_define_const("AF_LINK", AF_LINK);
#endif
#ifdef PF_LINK
    sock_define_const("PF_LINK", PF_LINK);
#endif
#ifdef AF_COIP
    sock_define_const("AF_COIP", AF_COIP);
#endif
#ifdef PF_COIP
    sock_define_const("PF_COIP", PF_COIP);
#endif
#ifdef AF_CNT
    sock_define_const("AF_CNT", AF_CNT);
#endif
#ifdef PF_CNT
    sock_define_const("PF_CNT", PF_CNT);
#endif
#ifdef AF_SIP
    sock_define_const("AF_SIP", AF_SIP);
#endif
#ifdef PF_SIP
    sock_define_const("PF_SIP", PF_SIP);
#endif
#ifdef AF_NDRV
    sock_define_const("AF_NDRV", AF_NDRV);
#endif
#ifdef PF_NDRV
    sock_define_const("PF_NDRV", PF_NDRV);
#endif
#ifdef AF_ISDN
    sock_define_const("AF_ISDN", AF_ISDN);
#endif
#ifdef PF_ISDN
    sock_define_const("PF_ISDN", PF_ISDN);
#endif
#ifdef AF_NATM
    sock_define_const("AF_NATM", AF_NATM);
#endif
#ifdef PF_NATM
    sock_define_const("PF_NATM", PF_NATM);
#endif
#ifdef AF_SYSTEM
    sock_define_const("AF_SYSTEM", AF_SYSTEM);
#endif
#ifdef PF_SYSTEM
    sock_define_const("PF_SYSTEM", PF_SYSTEM);
#endif
#ifdef AF_NETBIOS
    sock_define_const("AF_NETBIOS", AF_NETBIOS);
#endif
#ifdef PF_NETBIOS
    sock_define_const("PF_NETBIOS", PF_NETBIOS);
#endif
#ifdef AF_PPP
    sock_define_const("AF_PPP", AF_PPP);
#endif
#ifdef PF_PPP
    sock_define_const("PF_PPP", PF_PPP);
#endif
#ifdef AF_ATM
    sock_define_const("AF_ATM", AF_ATM);
#endif
#ifdef PF_ATM
    sock_define_const("PF_ATM", PF_ATM);
#endif
#ifdef AF_NETGRAPH
    sock_define_const("AF_NETGRAPH", AF_NETGRAPH);
#endif
#ifdef PF_NETGRAPH
    sock_define_const("PF_NETGRAPH", PF_NETGRAPH);
#endif
#ifdef AF_MAX
    sock_define_const("AF_MAX", AF_MAX);
#endif
#ifdef PF_MAX
    sock_define_const("PF_MAX", PF_MAX);
#endif
#ifdef AF_E164
    sock_define_const("AF_E164", AF_E164);
#endif
#ifdef PF_XTP
    sock_define_const("PF_XTP", PF_XTP);
#endif
#ifdef PF_RTIP
    sock_define_const("PF_RTIP", PF_RTIP);
#endif
#ifdef PF_PIP
    sock_define_const("PF_PIP", PF_PIP);
#endif
#ifdef PF_KEY
    sock_define_const("PF_KEY", PF_KEY);
#endif

    sock_define_const("MSG_OOB", MSG_OOB);
#ifdef MSG_PEEK
    sock_define_const("MSG_PEEK", MSG_PEEK);
#endif
#ifdef MSG_DONTROUTE
    sock_define_const("MSG_DONTROUTE", MSG_DONTROUTE);
#endif
#ifdef MSG_EOR
    sock_define_const("MSG_EOR", MSG_EOR);
#endif
#ifdef MSG_TRUNC
    sock_define_const("MSG_TRUNC", MSG_TRUNC);
#endif
#ifdef MSG_CTRUNC
    sock_define_const("MSG_CTRUNC", MSG_CTRUNC);
#endif
#ifdef MSG_WAITALL
    sock_define_const("MSG_WAITALL", MSG_WAITALL);
#endif
#ifdef MSG_DONTWAIT
    sock_define_const("MSG_DONTWAIT", MSG_DONTWAIT);
#endif
#ifdef MSG_EOF
    sock_define_const("MSG_EOF", MSG_EOF);
#endif
#ifdef MSG_FLUSH
    sock_define_const("MSG_FLUSH", MSG_FLUSH);
#endif
#ifdef MSG_HOLD
    sock_define_const("MSG_HOLD", MSG_HOLD);
#endif
#ifdef MSG_SEND
    sock_define_const("MSG_SEND", MSG_SEND);
#endif
#ifdef MSG_HAVEMORE
    sock_define_const("MSG_HAVEMORE", MSG_HAVEMORE);
#endif
#ifdef MSG_RCVMORE
    sock_define_const("MSG_RCVMORE", MSG_RCVMORE);
#endif
#ifdef MSG_COMPAT
    sock_define_const("MSG_COMPAT", MSG_COMPAT);
#endif

    sock_define_const("SOL_SOCKET", SOL_SOCKET);
#ifdef SOL_IP
    sock_define_const("SOL_IP", SOL_IP);
#endif
#ifdef SOL_IPX
    sock_define_const("SOL_IPX", SOL_IPX);
#endif
#ifdef SOL_AX25
    sock_define_const("SOL_AX25", SOL_AX25);
#endif
#ifdef SOL_ATALK
    sock_define_const("SOL_ATALK", SOL_ATALK);
#endif
#ifdef SOL_TCP
    sock_define_const("SOL_TCP", SOL_TCP);
#endif
#ifdef SOL_UDP
    sock_define_const("SOL_UDP", SOL_UDP);
#endif

#ifdef  IPPROTO_IP
    sock_define_const("IPPROTO_IP", IPPROTO_IP);
#else
    sock_define_const("IPPROTO_IP", 0);
#endif
#ifdef  IPPROTO_ICMP
    sock_define_const("IPPROTO_ICMP", IPPROTO_ICMP);
#else
    sock_define_const("IPPROTO_ICMP", 1);
#endif
#ifdef  IPPROTO_IGMP
    sock_define_const("IPPROTO_IGMP", IPPROTO_IGMP);
#endif
#ifdef  IPPROTO_GGP
    sock_define_const("IPPROTO_GGP", IPPROTO_GGP);
#endif
#ifdef  IPPROTO_TCP
    sock_define_const("IPPROTO_TCP", IPPROTO_TCP);
#else
    sock_define_const("IPPROTO_TCP", 6);
#endif
#ifdef  IPPROTO_EGP
    sock_define_const("IPPROTO_EGP", IPPROTO_EGP);
#endif
#ifdef  IPPROTO_PUP
    sock_define_const("IPPROTO_PUP", IPPROTO_PUP);
#endif
#ifdef  IPPROTO_UDP
    sock_define_const("IPPROTO_UDP", IPPROTO_UDP);
#else
    sock_define_const("IPPROTO_UDP", 17);
#endif
#ifdef  IPPROTO_IDP
    sock_define_const("IPPROTO_IDP", IPPROTO_IDP);
#endif
#ifdef  IPPROTO_HELLO
    sock_define_const("IPPROTO_HELLO", IPPROTO_HELLO);
#endif
#ifdef  IPPROTO_ND
    sock_define_const("IPPROTO_ND", IPPROTO_ND);
#endif
#ifdef  IPPROTO_TP
    sock_define_const("IPPROTO_TP", IPPROTO_TP);
#endif
#ifdef  IPPROTO_XTP
    sock_define_const("IPPROTO_XTP", IPPROTO_XTP);
#endif
#ifdef  IPPROTO_EON
    sock_define_const("IPPROTO_EON", IPPROTO_EON);
#endif
#ifdef  IPPROTO_BIP
    sock_define_const("IPPROTO_BIP", IPPROTO_BIP);
#endif
/**/
#ifdef  IPPROTO_RAW
    sock_define_const("IPPROTO_RAW", IPPROTO_RAW);
#else
    sock_define_const("IPPROTO_RAW", 255);
#endif
#ifdef  IPPROTO_MAX
    sock_define_const("IPPROTO_MAX", IPPROTO_MAX);
#endif

        /* Some port configuration */
#ifdef  IPPORT_RESERVED
    sock_define_const("IPPORT_RESERVED", IPPORT_RESERVED);
#else
    sock_define_const("IPPORT_RESERVED", 1024);
#endif
#ifdef  IPPORT_USERRESERVED
    sock_define_const("IPPORT_USERRESERVED", IPPORT_USERRESERVED);
#else
    sock_define_const("IPPORT_USERRESERVED", 5000);
#endif
        /* Some reserved IP v.4 addresses */
#ifdef  INADDR_ANY
    sock_define_const("INADDR_ANY", INADDR_ANY);
#else
    sock_define_const("INADDR_ANY", 0x00000000);
#endif
#ifdef  INADDR_BROADCAST
    sock_define_const("INADDR_BROADCAST", INADDR_BROADCAST);
#else
    sock_define_const("INADDR_BROADCAST", 0xffffffff);
#endif
#ifdef  INADDR_LOOPBACK
    sock_define_const("INADDR_LOOPBACK", INADDR_LOOPBACK);
#else
    sock_define_const("INADDR_LOOPBACK", 0x7F000001);
#endif
#ifdef  INADDR_UNSPEC_GROUP
    sock_define_const("INADDR_UNSPEC_GROUP", INADDR_UNSPEC_GROUP);
#else
    sock_define_const("INADDR_UNSPEC_GROUP", 0xe0000000);
#endif
#ifdef  INADDR_ALLHOSTS_GROUP
    sock_define_const("INADDR_ALLHOSTS_GROUP", INADDR_ALLHOSTS_GROUP);
#else
    sock_define_const("INADDR_ALLHOSTS_GROUP", 0xe0000001);
#endif
#ifdef  INADDR_MAX_LOCAL_GROUP
    sock_define_const("INADDR_MAX_LOCAL_GROUP", INADDR_MAX_LOCAL_GROUP);
#else
    sock_define_const("INADDR_MAX_LOCAL_GROUP", 0xe00000ff);
#endif
#ifdef  INADDR_NONE
    sock_define_const("INADDR_NONE", INADDR_NONE);
#else
    sock_define_const("INADDR_NONE", 0xffffffff);
#endif
        /* IP [gs]etsockopt options */
#ifdef  IP_OPTIONS
    sock_define_const("IP_OPTIONS", IP_OPTIONS);
#endif
#ifdef  IP_HDRINCL
    sock_define_const("IP_HDRINCL", IP_HDRINCL);
#endif
#ifdef  IP_TOS
    sock_define_const("IP_TOS", IP_TOS);
#endif
#ifdef  IP_TTL
    sock_define_const("IP_TTL", IP_TTL);
#endif
#ifdef  IP_RECVOPTS
    sock_define_const("IP_RECVOPTS", IP_RECVOPTS);
#endif
#ifdef  IP_RECVRETOPTS
    sock_define_const("IP_RECVRETOPTS", IP_RECVRETOPTS);
#endif
#ifdef  IP_RECVDSTADDR
    sock_define_const("IP_RECVDSTADDR", IP_RECVDSTADDR);
#endif
#ifdef  IP_RETOPTS
    sock_define_const("IP_RETOPTS", IP_RETOPTS);
#endif
#ifdef  IP_MULTICAST_IF
    sock_define_const("IP_MULTICAST_IF", IP_MULTICAST_IF);
#endif
#ifdef  IP_MULTICAST_TTL
    sock_define_const("IP_MULTICAST_TTL", IP_MULTICAST_TTL);
#endif
#ifdef  IP_MULTICAST_LOOP
    sock_define_const("IP_MULTICAST_LOOP", IP_MULTICAST_LOOP);
#endif
#ifdef  IP_ADD_MEMBERSHIP
    sock_define_const("IP_ADD_MEMBERSHIP", IP_ADD_MEMBERSHIP);
#endif
#ifdef  IP_DROP_MEMBERSHIP
    sock_define_const("IP_DROP_MEMBERSHIP", IP_DROP_MEMBERSHIP);
#endif
#ifdef  IP_DEFAULT_MULTICAST_TTL
    sock_define_const("IP_DEFAULT_MULTICAST_TTL", IP_DEFAULT_MULTICAST_TTL);
#endif
#ifdef  IP_DEFAULT_MULTICAST_LOOP
    sock_define_const("IP_DEFAULT_MULTICAST_LOOP", IP_DEFAULT_MULTICAST_LOOP);
#endif
#ifdef  IP_MAX_MEMBERSHIPS
    sock_define_const("IP_MAX_MEMBERSHIPS", IP_MAX_MEMBERSHIPS);
#endif
#ifdef SO_DEBUG
    sock_define_const("SO_DEBUG", SO_DEBUG);
#endif
    sock_define_const("SO_REUSEADDR", SO_REUSEADDR);
#ifdef SO_REUSEPORT
    sock_define_const("SO_REUSEPORT", SO_REUSEPORT);
#endif
#ifdef SO_TYPE
    sock_define_const("SO_TYPE", SO_TYPE);
#endif
#ifdef SO_ERROR
    sock_define_const("SO_ERROR", SO_ERROR);
#endif
#ifdef SO_DONTROUTE
    sock_define_const("SO_DONTROUTE", SO_DONTROUTE);
#endif
#ifdef SO_BROADCAST
    sock_define_const("SO_BROADCAST", SO_BROADCAST);
#endif
#ifdef SO_SNDBUF
    sock_define_const("SO_SNDBUF", SO_SNDBUF);
#endif
#ifdef SO_RCVBUF
    sock_define_const("SO_RCVBUF", SO_RCVBUF);
#endif
#ifdef SO_KEEPALIVE
    sock_define_const("SO_KEEPALIVE", SO_KEEPALIVE);
#endif
#ifdef SO_OOBINLINE
    sock_define_const("SO_OOBINLINE", SO_OOBINLINE);
#endif
#ifdef SO_NO_CHECK
    sock_define_const("SO_NO_CHECK", SO_NO_CHECK);
#endif
#ifdef SO_PRIORITY
    sock_define_const("SO_PRIORITY", SO_PRIORITY);
#endif
#ifdef SO_LINGER
    sock_define_const("SO_LINGER", SO_LINGER);
#endif
#ifdef SO_PASSCRED
    sock_define_const("SO_PASSCRED", SO_PASSCRED);
#endif
#ifdef SO_PEERCRED
    sock_define_const("SO_PEERCRED", SO_PEERCRED);
#endif
#ifdef SO_RCVLOWAT
    sock_define_const("SO_RCVLOWAT", SO_RCVLOWAT);
#endif
#ifdef SO_SNDLOWAT
    sock_define_const("SO_SNDLOWAT", SO_SNDLOWAT);
#endif
#ifdef SO_RCVTIMEO
    sock_define_const("SO_RCVTIMEO", SO_RCVTIMEO);
#endif
#ifdef SO_SNDTIMEO
    sock_define_const("SO_SNDTIMEO", SO_SNDTIMEO);
#endif
#ifdef SO_ACCEPTCONN
    sock_define_const("SO_ACCEPTCONN", SO_ACCEPTCONN);
#endif
#ifdef SO_USELOOPBACK
    sock_define_const("SO_USELOOPBACK", SO_USELOOPBACK);
#endif
#ifdef SO_ACCEPTFILTER
    sock_define_const("SO_ACCEPTFILTER", SO_ACCEPTFILTER);
#endif
#ifdef SO_DONTTRUNC
    sock_define_const("SO_DONTTRUNC", SO_DONTTRUNC);
#endif
#ifdef SO_WANTMORE
    sock_define_const("SO_WANTMORE", SO_WANTMORE);
#endif
#ifdef SO_WANTOOBFLAG
    sock_define_const("SO_WANTOOBFLAG", SO_WANTOOBFLAG);
#endif
#ifdef SO_NREAD
    sock_define_const("SO_NREAD", SO_NREAD);
#endif
#ifdef SO_NKE
    sock_define_const("SO_NKE", SO_NKE);
#endif
#ifdef SO_NOSIGPIPE
    sock_define_const("SO_NOSIGPIPE", SO_NOSIGPIPE);
#endif

#ifdef SO_SECURITY_AUTHENTICATION
    sock_define_const("SO_SECURITY_AUTHENTICATION", SO_SECURITY_AUTHENTICATION);
#endif
#ifdef SO_SECURITY_ENCRYPTION_TRANSPORT
    sock_define_const("SO_SECURITY_ENCRYPTION_TRANSPORT", SO_SECURITY_ENCRYPTION_TRANSPORT);
#endif
#ifdef SO_SECURITY_ENCRYPTION_NETWORK
    sock_define_const("SO_SECURITY_ENCRYPTION_NETWORK", SO_SECURITY_ENCRYPTION_NETWORK);
#endif

#ifdef SO_BINDTODEVICE
    sock_define_const("SO_BINDTODEVICE", SO_BINDTODEVICE);
#endif
#ifdef SO_ATTACH_FILTER
    sock_define_const("SO_ATTACH_FILTER", SO_ATTACH_FILTER);
#endif
#ifdef SO_DETACH_FILTER
    sock_define_const("SO_DETACH_FILTER", SO_DETACH_FILTER);
#endif
#ifdef SO_PEERNAME
    sock_define_const("SO_PEERNAME", SO_PEERNAME);
#endif
#ifdef SO_TIMESTAMP
    sock_define_const("SO_TIMESTAMP", SO_TIMESTAMP);
#endif

#ifdef SOPRI_INTERACTIVE
    sock_define_const("SOPRI_INTERACTIVE", SOPRI_INTERACTIVE);
#endif
#ifdef SOPRI_NORMAL
    sock_define_const("SOPRI_NORMAL", SOPRI_NORMAL);
#endif
#ifdef SOPRI_BACKGROUND
    sock_define_const("SOPRI_BACKGROUND", SOPRI_BACKGROUND);
#endif

#ifdef IPX_TYPE
    sock_define_const("IPX_TYPE", IPX_TYPE);
#endif

#ifdef TCP_NODELAY
    sock_define_const("TCP_NODELAY", TCP_NODELAY);
#endif
#ifdef TCP_MAXSEG
    sock_define_const("TCP_MAXSEG", TCP_MAXSEG);
#endif

#ifdef EAI_ADDRFAMILY
    sock_define_const("EAI_ADDRFAMILY", EAI_ADDRFAMILY);
#endif
#ifdef EAI_AGAIN
    sock_define_const("EAI_AGAIN", EAI_AGAIN);
#endif
#ifdef EAI_BADFLAGS
    sock_define_const("EAI_BADFLAGS", EAI_BADFLAGS);
#endif
#ifdef EAI_FAIL
    sock_define_const("EAI_FAIL", EAI_FAIL);
#endif
#ifdef EAI_FAMILY
    sock_define_const("EAI_FAMILY", EAI_FAMILY);
#endif
#ifdef EAI_MEMORY
    sock_define_const("EAI_MEMORY", EAI_MEMORY);
#endif
#ifdef EAI_NODATA
    sock_define_const("EAI_NODATA", EAI_NODATA);
#endif
#ifdef EAI_NONAME
    sock_define_const("EAI_NONAME", EAI_NONAME);
#endif
#ifdef EAI_SERVICE
    sock_define_const("EAI_SERVICE", EAI_SERVICE);
#endif
#ifdef EAI_SOCKTYPE
    sock_define_const("EAI_SOCKTYPE", EAI_SOCKTYPE);
#endif
#ifdef EAI_SYSTEM
    sock_define_const("EAI_SYSTEM", EAI_SYSTEM);
#endif
#ifdef EAI_BADHINTS
    sock_define_const("EAI_BADHINTS", EAI_BADHINTS);
#endif
#ifdef EAI_PROTOCOL
    sock_define_const("EAI_PROTOCOL", EAI_PROTOCOL);
#endif
#ifdef EAI_MAX
    sock_define_const("EAI_MAX", EAI_MAX);
#endif
#ifdef AI_PASSIVE
    sock_define_const("AI_PASSIVE", AI_PASSIVE);
#endif
#ifdef AI_CANONNAME
    sock_define_const("AI_CANONNAME", AI_CANONNAME);
#endif
#ifdef AI_NUMERICHOST
    sock_define_const("AI_NUMERICHOST", AI_NUMERICHOST);
#endif
#ifdef AI_MASK
    sock_define_const("AI_MASK", AI_MASK);
#endif
#ifdef AI_ALL
    sock_define_const("AI_ALL", AI_ALL);
#endif
#ifdef AI_V4MAPPED_CFG
    sock_define_const("AI_V4MAPPED_CFG", AI_V4MAPPED_CFG);
#endif
#ifdef AI_ADDRCONFIG
    sock_define_const("AI_ADDRCONFIG", AI_ADDRCONFIG);
#endif
#ifdef AI_V4MAPPED
    sock_define_const("AI_V4MAPPED", AI_V4MAPPED);
#endif
#ifdef AI_DEFAULT
    sock_define_const("AI_DEFAULT", AI_DEFAULT);
#endif
#ifdef NI_MAXHOST
    sock_define_const("NI_MAXHOST", NI_MAXHOST);
#endif
#ifdef NI_MAXSERV
    sock_define_const("NI_MAXSERV", NI_MAXSERV);
#endif
#ifdef NI_NOFQDN
    sock_define_const("NI_NOFQDN", NI_NOFQDN);
#endif
#ifdef NI_NUMERICHOST
    sock_define_const("NI_NUMERICHOST", NI_NUMERICHOST);
#endif
#ifdef NI_NAMEREQD
    sock_define_const("NI_NAMEREQD", NI_NAMEREQD);
#endif
#ifdef NI_NUMERICSERV
    sock_define_const("NI_NUMERICSERV", NI_NUMERICSERV);
#endif
#ifdef NI_DGRAM
    sock_define_const("NI_DGRAM", NI_DGRAM);
#endif
#ifdef SHUT_RD
    sock_define_const("SHUT_RD", SHUT_RD);
#else
    sock_define_const("SHUT_RD", 0);
#endif
#ifdef SHUT_WR
    sock_define_const("SHUT_WR", SHUT_WR);
#else
    sock_define_const("SHUT_WR", 1);
#endif
#ifdef SHUT_RDWR
    sock_define_const("SHUT_RDWR", SHUT_RDWR);
#else
    sock_define_const("SHUT_RDWR", 2);
#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:36:12 $
  $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

#define STRIO_EOF FMODE_SYNC

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;
    ptr->flags &= ~STRIO_EOF;
    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;
    ptr->flags &= ~STRIO_EOF;
    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;
    ptr->flags &= ~STRIO_EOF;
    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) {
        ptr->flags |= STRIO_EOF;
        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;
        ptr->flags &= ~STRIO_EOF;
    }
    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)) {
        ptr->flags |= STRIO_EOF;
        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) {
                ptr->flags |= STRIO_EOF;
                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) {
                ptr->flags |= STRIO_EOF;
                if (!NIL_P(str)) rb_str_resize(str, 0);
                return Qnil;
            }
            else if (ptr->flags & STRIO_EOF) {
                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) {
            ptr->flags |= STRIO_EOF;
            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)) {
        if (!(ptr->flags & STRIO_EOF)) str = rb_str_new(0, 0);
        len = 0;
    }
    else {
        ptr->pos += len = RSTRING(str)->len;
    }
    if (olen < 0 || olen > len) ptr->flags |= STRIO_EOF;
    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, "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. strscan_s_mustc
  9. strscan_reset
  10. strscan_terminate
  11. strscan_clear
  12. strscan_get_string
  13. strscan_set_string
  14. strscan_concat
  15. strscan_get_pos
  16. strscan_set_pos
  17. strscan_do_scan
  18. strscan_scan
  19. strscan_match_p
  20. strscan_skip
  21. strscan_check
  22. strscan_scan_full
  23. strscan_scan_until
  24. strscan_exist_p
  25. strscan_skip_until
  26. strscan_check_until
  27. strscan_search_full
  28. adjust_registers_to_matched
  29. strscan_getch
  30. strscan_get_byte
  31. strscan_getbyte
  32. strscan_peek
  33. strscan_peep
  34. strscan_unscan
  35. strscan_bol_p
  36. strscan_eos_p
  37. strscan_empty_p
  38. strscan_rest_p
  39. strscan_matched_p
  40. strscan_matched
  41. strscan_matched_size
  42. strscan_matchedsize
  43. strscan_aref
  44. strscan_pre_match
  45. strscan_post_match
  46. strscan_rest
  47. strscan_rest_size
  48. strscan_restsize
  49. strscan_inspect
  50. inspect1
  51. inspect2
  52. Init_strscan
/*

    strscan.c

    Copyright (c) 1999-2004 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.

    $Id: strscan.c,v 1.7.2.7 2005/10/06 11:13:36 aamine Exp $

*/

#include "ruby.h"
#include "re.h"
#include "version.h"

#if (RUBY_VERSION_CODE < 150)
#  define rb_eRangeError rb_eArgError
#  define rb_obj_freeze(obj) rb_str_freeze(obj)
#endif

#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));

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_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;
{
    re_free_registers(&(p->regs));
    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);
    MEMZERO(&(p->regs), struct re_registers, 1);
    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;
}

/* =======================================================================
                          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 1-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 = re_match(RREGEXP(regex)->ptr,
                       CURPTR(p), S_RESTLEN(p),
                       0,
                       &(p->regs));
    }
    else {
        ret = re_search(RREGEXP(regex)->ptr,
                        CURPTR(p), S_RESTLEN(p),
                        0,
                        S_RESTLEN(p),
                        &(p->regs));
    }

    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:
 *   scanner.scan(pattern) => String
 *
 */

/*
 * call-seq: scan(pattern)
 *
 * 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);
}

/* DANGEROUS; need to synchronize with regex.c */
static void
adjust_registers_to_matched(p)
    struct strscanner *p;
{
    if (p->regs.allocated == 0) {
        p->regs.beg = ALLOC_N(int, RE_NREGS);
        p->regs.end = ALLOC_N(int, RE_NREGS);
        p->regs.allocated = RE_NREGS;
    }
    p->regs.num_regs = 1;
    p->regs.beg[0] = 0;
    p->regs.end[0] = p->curr - p->prev;
}

/*
 * Scans one character and returns it.
 *
 *   s = StringScanner.new('ab')
 *   s.getch           # => "a"
 *   s.getch           # => "b"
 *   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.  Similar to, but not the same as, #getch.
 *
 *  s = StringScanner.new('ab')
 *  s.get_byte         # => "a"
 *  s.get_byte         # => "b"
 *  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: can't unscan: prev match had failed
 */
static VALUE
strscan_unscan(self)
    VALUE self;
{
    struct strscanner *p;

    GET_SCANNER(self, p);
    if (! MATCHED_P(p))
        rb_raise(ScanError, "can't unscan: prev match had failed");

    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);
    if (EOS_P(p))
        return Qtrue;
    else
        return 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);
    if (EOS_P(p))
        return Qfalse;
    else
        return 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);
    if (MATCHED_P(p))
        return Qtrue;
    else
        return 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
 * - #getbyte
 * - #scan
 * - #scan_until
 * - #skip
 * - #skip_until
 *
 * === Looking Ahead
 *
 * - #check
 * - #check_until
 * - #exist?
 * - #match?
 * - #peek
 *
 * === Finding Where we Are
 *
 * - #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.7.2.7 2005/10/06 11:13:36 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_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_define_method(StringScanner, "bol?",        strscan_bol_p,       0);
    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:46:43 $
 *
 * 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:46:43 $
 *
 * 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:46:43 $
 *
 * 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:28:39 $
 *
 * 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:35:23 $
 *
 * 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/20 04:13:26 $
 *
 * 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_ALLOC_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 );  S_FREE( 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_ALLOC_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 ) );
    S_FREE( ivn );
    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:58:32 $
 *
 * 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/20 04:13:26 $
 *
 * 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:56:24 $
 *
 * 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:46:44 $
 *
 * 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.8.2.1 2004/04/05 07:45:24 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:47:08 $
  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. PIEVENTSINKOBJ
  4. IEVENTSINKOBJ
  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_val2variant2
  34. ole_set_member
  35. fole_s_allocate
  36. create_win32ole_object
  37. ole_variant2val
  38. reg_open_key
  39. reg_open_vkey
  40. reg_enum_key
  41. reg_get_val
  42. typelib_file_from_clsid
  43. typelib_file_from_typelib
  44. typelib_file
  45. ole_const_load
  46. clsid_from_remote
  47. ole_create_dcom
  48. ole_bind_obj
  49. fole_s_connect
  50. fole_s_const_load
  51. ole_classes_from_typelib
  52. reference_count
  53. fole_s_reference_count
  54. fole_s_free
  55. ole_show_help
  56. fole_s_show_help
  57. fole_s_get_code_page
  58. fole_s_set_code_page
  59. fole_initialize
  60. hash2named_arg
  61. set_argv
  62. ole_invoke
  63. fole_invoke
  64. ole_invoke2
  65. fole_invoke2
  66. fole_getproperty2
  67. fole_setproperty2
  68. fole_setproperty
  69. fole_getproperty
  70. ole_propertyput
  71. fole_free
  72. ole_each_sub
  73. ole_ienum_free
  74. fole_each
  75. fole_missing
  76. ole_method_sub
  77. olemethod_from_typeinfo
  78. ole_methods_sub
  79. ole_methods_from_typeinfo
  80. typeinfo_from_ole
  81. ole_methods
  82. fole_methods
  83. fole_get_methods
  84. fole_put_methods
  85. fole_func_methods
  86. fole_obj_help
  87. ole_docinfo_from_type
  88. ole_usertype2val
  89. ole_ptrtype2val
  90. ole_typedesc2val
  91. fole_method_help
  92. foletype_s_ole_classes
  93. foletype_s_typelibs
  94. foletype_s_progids
  95. foletype_s_allocate
  96. oletype_set_member
  97. oleclass_from_typelib
  98. foletype_initialize
  99. foletype_name
  100. ole_ole_type
  101. foletype_ole_type
  102. ole_type_guid
  103. foletype_guid
  104. ole_type_progid
  105. foletype_progid
  106. ole_type_visible
  107. foletype_visible
  108. ole_type_major_version
  109. foletype_major_version
  110. ole_type_minor_version
  111. foletype_minor_version
  112. ole_type_typekind
  113. foletype_typekind
  114. ole_type_helpstring
  115. foletype_helpstring
  116. ole_type_src_type
  117. foletype_src_type
  118. ole_type_helpfile
  119. foletype_helpfile
  120. ole_type_helpcontext
  121. foletype_helpcontext
  122. ole_variables
  123. foletype_variables
  124. foletype_methods
  125. folevariable_name
  126. ole_variable_ole_type
  127. folevariable_ole_type
  128. ole_variable_ole_type_detail
  129. folevariable_ole_type_detail
  130. ole_variable_value
  131. folevariable_value
  132. ole_variable_visible
  133. folevariable_visible
  134. ole_variable_kind
  135. folevariable_variable_kind
  136. ole_variable_varkind
  137. folevariable_varkind
  138. olemethod_set_member
  139. folemethod_s_allocate
  140. folemethod_initialize
  141. folemethod_name
  142. ole_method_return_type
  143. folemethod_return_type
  144. ole_method_return_vtype
  145. folemethod_return_vtype
  146. ole_method_return_type_detail
  147. folemethod_return_type_detail
  148. ole_method_invkind
  149. ole_method_invoke_kind
  150. folemethod_invkind
  151. folemethod_invoke_kind
  152. ole_method_visible
  153. folemethod_visible
  154. ole_method_event
  155. folemethod_event
  156. folemethod_event_interface
  157. ole_method_docinfo_from_type
  158. ole_method_helpstring
  159. folemethod_helpstring
  160. ole_method_helpfile
  161. folemethod_helpfile
  162. ole_method_helpcontext
  163. folemethod_helpcontext
  164. ole_method_dispid
  165. folemethod_dispid
  166. ole_method_offset_vtbl
  167. folemethod_offset_vtbl
  168. ole_method_size_params
  169. folemethod_size_params
  170. ole_method_size_opt_params
  171. folemethod_size_opt_params
  172. ole_method_params
  173. folemethod_params
  174. foleparam_name
  175. ole_param_ole_type
  176. foleparam_ole_type
  177. ole_param_ole_type_detail
  178. foleparam_ole_type_detail
  179. ole_param_flag_mask
  180. foleparam_input
  181. foleparam_output
  182. foleparam_optional
  183. foleparam_retval
  184. ole_param_default
  185. foleparam_default
  186. EVENTSINK_QueryInterface
  187. STDMETHODIMP_
  188. STDMETHODIMP_
  189. EVENTSINK_GetTypeInfoCount
  190. EVENTSINK_GetTypeInfo
  191. EVENTSINK_GetIDsOfNames
  192. ole_search_event_at
  193. ole_search_event
  194. val2ptr_variant
  195. ary2ptr_dispparams
  196. EVENTSINK_Invoke
  197. EVENTSINK_Constructor
  198. EVENTSINK_Destructor
  199. find_iid
  200. find_default_source
  201. ole_event_free
  202. fev_s_allocate
  203. fev_initialize
  204. fev_s_msg_loop
  205. add_event_call_back
  206. ev_on_event
  207. fev_on_event
  208. fev_on_event_with_outargs
  209. 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:36:50 $
  modified for win32ole (ruby) by Masaki.Suketa <masaki.suketa@nifty.ne.jp>
 */

#include "ruby.h"
#include "st.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.5"

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_TYPE;
VALUE cWIN32OLE_VARIABLE;
VALUE cWIN32OLE_METHOD;
VALUE cWIN32OLE_PARAM;
VALUE cWIN32OLE_EVENT;
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;
};

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,
            "%4.4d/%02.2d/%02.2d %02.2d:%02.2d:%02.2d",
            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      ", 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_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;

        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
typelib_file_from_clsid(ole)
    VALUE ole;
{
    OLECHAR *pbuf;
    CLSID clsid;
    HRESULT hr;
    HKEY hroot, hclsid;
    LONG err;
    VALUE typelib;
    VALUE vclsid;
    char *pclsid = NULL;

    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_val(hlang, "win32")) != 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;
    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);

             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) {
            memset(&excepinfo, 0, sizeof(EXCEPINFO));
            VariantInit(&result);
            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 functional method 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);
}

/*
 *   call-seq:
 *      WIN32OLE#ole_obj_help
 *
 *   Returns WIN32OLE_TYPE object.
 *
 *      excel = WIN32OLE.new('Excel.Application')
 *      tobj = excel.ole_obj_help
 */
static VALUE
fole_obj_help( self )
    VALUE self;
{
    unsigned int index;
    ITypeInfo *pTypeInfo;
    ITypeLib *pTypeLib;
    HRESULT hr;
    struct oledata *pole;
    BSTR bstr;
    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");
    }
    hr = pTypeInfo->lpVtbl->GetContainingTypeLib( pTypeInfo, &pTypeLib, &index );
    if(FAILED(hr)) {
        OLE_RELEASE(pTypeInfo);
        ole_raise(hr, rb_eRuntimeError, "failed to GetContainingTypeLib");
    }
    hr = pTypeLib->lpVtbl->GetDocumentation( pTypeLib, index,
                                             &bstr, NULL, NULL, NULL);
    if (SUCCEEDED(hr)) {
        type = foletype_s_allocate(cWIN32OLE_TYPE);
        oletype_set_member(type, pTypeInfo, WC2VSTR(bstr));
    }
    OLE_RELEASE(pTypeLib);
    OLE_RELEASE(pTypeInfo);

    return type;
}

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");
    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;
    LCID    lcid = LOCALE_SYSTEM_DEFAULT;

    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.
 */
static VALUE
foletype_s_ole_classes(self, typelib)
    VALUE self;
    VALUE typelib;
{
    VALUE file, classes;
    OLECHAR * pbuf;
    ITypeLib *pTypeLib;
    HRESULT hr;

    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.
 *
 */
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();

    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_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);
}

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 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 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 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 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 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;
    long 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
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
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];
        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 = 0;
    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);
}

void
Init_win32ole()
{
    rb_global_variable(&ary_ole_event);
    ary_ole_event = rb_ary_new();
    id_events = rb_intern("events");

    rb_global_variable(&com_hash);
    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;
    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_obj_help", fole_obj_help, 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_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);

    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);
    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
  71. gzfile_read_raw_ensure
  72. gzfile_read_raw_until_zero
  73. gzfile_get16
  74. gzfile_get32
  75. gzfile_set32
  76. gzfile_make_header
  77. gzfile_make_footer
  78. gzfile_read_header
  79. gzfile_check_footer
  80. gzfile_write
  81. gzfile_read_more
  82. gzfile_calc_crc
  83. gzfile_read
  84. gzfile_read_all
  85. gzfile_ungetc
  86. gzfile_finalize
  87. gzfile_writer_end
  88. gzfile_reader_end
  89. gzfile_reader_rewind
  90. gzfile_reader_get_unused
  91. get_gzfile
  92. gzfile_ensure_close
  93. rb_gzfile_s_wrap
  94. gzfile_s_open
  95. rb_gzfile_to_io
  96. rb_gzfile_crc
  97. rb_gzfile_mtime
  98. rb_gzfile_level
  99. rb_gzfile_os_code
  100. rb_gzfile_orig_name
  101. rb_gzfile_comment
  102. rb_gzfile_lineno
  103. rb_gzfile_set_lineno
  104. rb_gzfile_set_mtime
  105. rb_gzfile_set_orig_name
  106. rb_gzfile_set_comment
  107. rb_gzfile_close
  108. rb_gzfile_finish
  109. rb_gzfile_closed_p
  110. rb_gzfile_eof_p
  111. rb_gzfile_sync
  112. rb_gzfile_set_sync
  113. rb_gzfile_total_in
  114. rb_gzfile_total_out
  115. rb_gzwriter_s_allocate
  116. rb_gzwriter_s_open
  117. rb_gzwriter_initialize
  118. rb_gzwriter_flush
  119. rb_gzwriter_write
  120. rb_gzwriter_putc
  121. rb_gzreader_s_allocate
  122. rb_gzreader_s_open
  123. rb_gzreader_initialize
  124. rb_gzreader_rewind
  125. rb_gzreader_unused
  126. rb_gzreader_read
  127. rb_gzreader_getc
  128. rb_gzreader_readchar
  129. rb_gzreader_each_byte
  130. rb_gzreader_ungetc
  131. gzreader_skip_linebreaks
  132. rscheck
  133. gzreader_gets
  134. rb_gzreader_gets
  135. rb_gzreader_readline
  136. rb_gzreader_each
  137. rb_gzreader_readlines
  138. Init_zlib
/*
 * zlib.c - An interface for zlib.
 *
 *   Copyright (C) UENO Katsuhiro 2000-2003
 *
 * $Id: zlib.c,v 1.7.2.17 2005/12/14 16:37:56 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 _((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;
    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_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(gz)
    struct gzfile *gz;
{
    VALUE str;

    str = rb_funcall(gz->io, id_read, 1, INT2FIX(GZFILE_READ_SIZE));
    if (!NIL_P(str)) {
        Check_Type(str, T_STRING);
    }
    return str;
}

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_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);
}

/*
 * 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_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, "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/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/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: eban $
  $Date: 2003/10/18 14:04:18 $
  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(x)
    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(x)
    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(x)
    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/fileblocks.c

root/missing/fileblocks.c

/* [<][>][^][v][top][bottom] [index] [help] */
/* dummy for autoconf */
/* [<][>][^][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(fd1, fd2)
int fd1, 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(a, x, loggamma_a)
    double a, x, 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(a, x, loggamma_a)
    double a, x, 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(x)
    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(x)
    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/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(n)
    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(fd, operation)
    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(fd, operation)
    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(fd, operation)
    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(x,y)
    double x, 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(n)
    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(n)
    double n;
{
    return (!finite(n) && !isnan(n));
}

#else

#ifdef HAVE_STRING_H
# include <string.h>
#else
# include <strings.h>
#endif

static double zero()    { return 0.0; }
static double one()     { return 1.0; }
static double inf()     { return one() / zero(); }

int
isinf(n)
    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();

int
isnan(n)
    double n;
{
    return double_ne(n, n);
}

static int
double_ne(n1, n2)
    double n1, 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) */

int
memcmp(s1,s2,len)
    char *s1;
    char *s2;
    register int len;
{
    register unsigned char *a = (unsigned char*)s1;
    register unsigned char *b = (unsigned char*)s2;
    register int tmp;

    while (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) */

void *
memmove (d, s, n)
    void *d, *s;
    int n;
{
    char *dst = d;
    char *src = s;
    void *ret = dst;

    if (src < dst) {
        src += n;
        dst += n;
        while (n--)
            *--dst = *--src;
    }
    else if (dst < src)
        while (n--)
            *dst++ = *src++;
    return ret;
}
/* [<][>][^][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. 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;
}

int
link(char *from, char *to)
{
        return -1;
}

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(p1, p2)
    char *p1, *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(s, c)
    char *s;
    int c;
{
    if (c == 0) return s + strlen(s);
    while (*s) {
        if (*s == c)
            return s;
        s++;
    }
    return 0;
}

char *
strrchr(s, c)
    char *s;
    int c;
{
    char *save;

    if (c == 0) return s + strlen(s);
    save = 0;
    while (*s) {
        if (*s == c)
            save = s;
        s++;
    }
    return 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(error)
    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>

int
strncasecmp(p1, p2, len)
    char *p1;
    char *p2;
    int 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(haystack, needle)
    char *haystack, *needle;
{
    char *hend;
    char *a, *b;

    if (*needle == 0) return haystack;
    hend = haystack + strlen(haystack) - strlen(needle) + 1;
    while (haystack < hend) {
        if (*haystack == *needle) {
            a = haystack;
            b = needle;
            for (;;) {
                if (*b == 0) return 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(nptr, endptr, base)
    char *nptr;
    char **endptr;
    int base;
{
    long result;
    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 = 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 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(string, endPtr, base)
    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 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 = 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

#undef __P
#if defined(__STDC__)
# 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>

#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 */
        int     _r;             /* read space left for getc() */
        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 */
} 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)

#define feof(p)         __sfeof(p)
#define ferror(p)       __sferror(p)
#define clearerr(p)     __sclearerr(p)

#ifndef _ANSI_SOURCE
#define fileno(p)       __sfileno(p)
#endif

#if defined(__hpux) && !defined(__GNUC__) || defined(__DECC)
#include <string.h>
#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;
};

/*
 * 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 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);

err:
        fp->_flags |= __SERR;
        return (EOF);
}

/*
 * Actual printf innards.
 *
 * This code is large and complicated...
 */

#if !defined(__CYGWIN32__) && defined(__hpux) && !defined(__GNUC__)
#include <stdlib.h>
#endif

/*
 * 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 = BSD__sfvwrite(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 {
#else /* _HAVE_SANE_QUAD_ */
                        {
#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
                         */
#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 */

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;
        ret = BSD_vfprintf(&f, fmt, ap);
        *f._p = 0;
        return (ret);
}

#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)snprintf.c  8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */

#if defined(__STDC__)
# include <stdarg.h>
#else
# include <varargs.h>
#endif

int
#if defined(__STDC__)
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(__STDC__)
        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;
        ret = BSD_vfprintf(&f, fmt, ap);
        *f._p = 0;
        va_end(ap);
        return (ret);
}
/* [<][>][^] [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

/* config.h for OpenVMS */

#ifndef VMS_RUBY_STREAM
#define VMS_RUBY_STREAM "018"
#endif

/* #define HAVE_PROTOTYPES 1 */
#define HAVE_STDARG_PROTOTYPES 1
/* #define HAVE_ATTR_NORETURN 1 */
/* #define inline __inline */
#define HAVE_DIRENT_H 1
#define HAVE_UNISTD_H 1
#define HAVE_STDLIB_H 1
#define HAVE_LIMITS_H 1

#define HAVE_SYS_FILE_H 1
#define HAVE_FCNTL_H 1
/* #define HAVE_PWD_H 1 */
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_TIMES_H 1
/* #define HAVE_SYS_PARAM_H 1 */
#define HAVE_SYS_WAIT_H 1
#define HAVE_STRING_H 1
#define HAVE_UTIME_H 1
#define HAVE_MEMORY_H 1
#define HAVE_PID_T 1
#define HAVE_GID_T 1
#define HAVE_UID_T 1
/* #define HAVE_ST_BLKSIZE 1  */
#define HAVE_ST_RDEV 1
/* #define GETGROUPS_T gid_t */
#define GETGROUPS_T int
#define RETSIGTYPE void
/* #define HAVE_ALLOCA 1 */
/* #define vfork fork */
#define HAVE_FMOD 1
#define HAVE_RANDOM 1
#define HAVE_WAITPID 1
#define HAVE_GETCWD 1
#define HAVE_TRUNCATE 1
/* #define HAVE_CHSIZE 1 */
#define HAVE_TIMES 1
/* #define HAVE_UTIMES 1 */
#define HAVE_FCNTL 1
/* #define HAVE_SETITIMER 1 */
/* #define HAVE_GETGROUPS 1 */
#define HAVE_SIGPROCMASK 1
#define HAVE_GETLOGIN 1
#define HAVE_TELLDIR 1
#define HAVE_SEEKDIR 1

#define RSHIFT(x,y) ((x)>>y)
#define DEFAULT_KCODE KCODE_EUC
#define DLEXT ".exe"
/* #define DLEXT2 "" */

#define HAVE_STRERROR 1

#if defined(__vax)
#define RUBY_PLATFORM     "vax-vms"     /* OpenVMS VAX */
#elif defined(__alpha)
#define RUBY_PLATFORM     "alpha-vms"   /* OpenVMS Alpha */
#elif defined(__ia64)
#define RUBY_PLATFORM     "ia64-vms"    /* OpenVMS Industry Standard 64 */
#else
#define RUBY_PLATFORM     "unknown-vms" /* unknown processor */
#endif

#define RUBY_SITE_LIB2    "/RUBY_LIBROOT/site_ruby/" RUBY_PLATFORM
#define RUBY_SITE_ARCHLIB "/RUBY_LIBROOT/site_ruby/" VMS_RUBY_STREAM "/" RUBY_PLATFORM
#define RUBY_SITE_LIB     "/RUBY_LIBROOT/site_ruby"
#define RUBY_LIB          "/RUBY_LIBROOT/" VMS_RUBY_STREAM
#define RUBY_ARCHLIB      "/RUBY_LIBROOT/" VMS_RUBY_STREAM "/" RUBY_PLATFORM

#define SIZEOF_INT   4
#define SIZEOF_SHORT 2
#define SIZEOF_LONG  4
#define SIZEOF_VOIDP 4
#define SIZEOF_FLOAT 4
#define SIZEOF_DOUBLE 8

#define HAVE_MKDIR      1 /* Dango */
#define HAVE_SINH       1 /* Dango */
#define HAVE_COSH       1 /* Dango */
#define HAVE_TANH       1 /* Dango */

/* function flags for socket ---------------------- */

#define HAVE_GETHOSTNAME 1
#define HAVE_SENDMSG 1
#define HAVE_RECVMSG 1
#define HAVE_GETNAMEINFO 1
#define HAVE_INET_NTOP 1
#define HAVE_INET_NTOA 1
#define HAVE_INET_PTON 1
#define HAVE_INET_ATON 1
#define HAVE_GETSERVBYPORT 1
#define HAVE_UNAME 1
/*
#define HAVE_GETHOSTBYNAME2 1
#define HAVE_GETADDRINFO 1
*/
/* [<][>][^][v][top][bottom][index] [help] */


vms/vms.h

root/vms/vms.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

#ifndef VMSRUBY_VMS_H_INCLUDED
#define VMSRUBY_VMS_H_INCLUDED

extern int isinf(double);
extern int isnan(double);
extern int flock(int fd, int oper);

extern int vsnprintf();

#endif
/* [<][>][^][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
#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];
};
typedef struct {
    char *start;
    char *curr;
    long size;
    long nfiles;
    struct direct dirstr;
} 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
/* [<][>][^][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. NtInitialize
  8. getlogin
  9. FindFirstChildSlot
  10. FindChildSlot
  11. CloseChildHandle
  12. FindFreeChildSlot
  13. SafeFree
  14. internal_match
  15. isInternalCmd
  16. rb_w32_get_osfhandle
  17. pipe_exec
  18. do_spawn
  19. do_aspawn
  20. CreateChild
  21. NtCmdLineElement
  22. insert
  23. cmdglob
  24. has_redirection
  25. skipspace
  26. rb_w32_cmdvector
  27. rb_w32_opendir
  28. rb_w32_readdir
  29. rb_w32_telldir
  30. rb_w32_seekdir
  31. rb_w32_rewinddir
  32. rb_w32_closedir
  33. ioinfo
  34. rb_w32_open_osfhandle
  35. rb_w32_open_osfhandle
  36. is_socket
  37. rb_w32_strerror
  38. getuid
  39. geteuid
  40. getgid
  41. getegid
  42. setuid
  43. setgid
  44. ioctl
  45. rb_w32_fdset
  46. rb_w32_fdclr
  47. rb_w32_fdisset
  48. extract_file_fd
  49. rb_w32_select
  50. StartSockets
  51. rb_w32_accept
  52. rb_w32_bind
  53. rb_w32_connect
  54. rb_w32_getpeername
  55. rb_w32_getsockname
  56. rb_w32_getsockopt
  57. rb_w32_ioctlsocket
  58. rb_w32_listen
  59. rb_w32_recv
  60. rb_w32_recvfrom
  61. rb_w32_send
  62. rb_w32_sendto
  63. rb_w32_setsockopt
  64. rb_w32_shutdown
  65. rb_w32_socket
  66. rb_w32_gethostbyaddr
  67. rb_w32_gethostbyname
  68. rb_w32_gethostname
  69. rb_w32_getprotobyname
  70. rb_w32_getprotobynumber
  71. rb_w32_getservbyname
  72. rb_w32_getservbyport
  73. endhostent
  74. endnetent
  75. endprotoent
  76. endservent
  77. getnetent
  78. getnetbyaddr
  79. getnetbyname
  80. getprotoent
  81. getservent
  82. sethostent
  83. setnetent
  84. setprotoent
  85. setservent
  86. fcntl
  87. poll_child_status
  88. waitpid
  89. gettimeofday
  90. rb_w32_getcwd
  91. chown
  92. kill
  93. link
  94. wait
  95. rb_w32_getenv
  96. rb_w32_rename
  97. isUNCRoot
  98. filetime_to_unixtime
  99. fileattr_to_unixmode
  100. winnt_stat
  101. rb_w32_stat
  102. filetime_to_clock
  103. rb_w32_times
  104. wait_events
  105. system_state
  106. rb_w32_enter_critical
  107. rb_w32_leave_critical
  108. rb_w32_call_handler
  109. setup_handler
  110. setup_call
  111. rb_w32_main_context
  112. rb_w32_sleep
  113. catch_interrupt
  114. rb_w32_getc
  115. rb_w32_putc
  116. call_asynchronous
  117. rb_w32_asynchronize
  118. rb_w32_get_environ
  119. rb_w32_free_environ
  120. rb_w32_getpid
  121. rb_w32_fclose
  122. rb_w32_close
  123. unixtime_to_filetime
  124. rb_w32_utime
  125. rb_w32_vsnprintf
  126. rb_w32_snprintf
  127. rb_w32_mkdir
  128. rb_w32_rmdir
  129. rb_w32_unlink
  130. rb_w32_isatty
  131. too_many_files
  132. rb_w32_fopen
  133. rb_w32_fdopen
  134. 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>
#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

#ifndef bool
#define bool int
#endif

#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
#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)

bool NtSyncProcess = TRUE;

static struct ChildRecord *CreateChild(const char *, const char *, SECURITY_ATTRIBUTES *, HANDLE, HANDLE, HANDLE);
static bool has_redirection(const char *);
static void StartSockets ();
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);
}

//
// 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();

    // Initialize Winsock
    StartSockets();

#ifdef _WIN32_WCE
    // free commandline buffer
    wce_FreeCommandLine();
#endif
}

char *
getlogin()
{
    char buffer[200];
    DWORD len = 200;
    extern char *NTLoginName;

    if (NTLoginName == NULL) {
        if (GetUserName(buffer, &len)) {
            NTLoginName = ALLOC_N(char, len+1);
            strncpy(NTLoginName, buffer, len);
            NTLoginName[len] = '\0';
        }
        else {
            NTLoginName = "<Unknown>";
        }
    }
    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;
}

int
SafeFree(char **vec, int vecc)
{
    //   vec
    //   |
    //   V       ^---------------------V
    //   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
    //   |   |       | ....  |  NULL |   | ..... |\0 |   | ..... |\0 |...
    //   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
    //   |-  elements+1             -| ^ 1st element   ^ 2nd element

        char *p;

        p = (char *)vec;
        free(p);

        return 0;
}

/*
  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);
}

rb_pid_t
pipe_exec(char *cmd, int mode, FILE **fpr, FILE **fpw)
{
    struct ChildRecord* child;
    HANDLE hReadIn, hReadOut;
    HANDLE hWriteIn, hWriteOut;
    HANDLE hDupInFile, hDupOutFile;
    HANDLE hCurProc;
    SECURITY_ATTRIBUTES sa;
    BOOL fRet;
    BOOL reading, writing;
    int fd;
    int pipemode;
    char modes[3];
    int ret;

    /* Figure out what we're doing... */
    writing = (mode & (O_WRONLY | O_RDWR)) ? TRUE : FALSE;
    reading = ((mode & O_RDWR) || !writing) ? TRUE : FALSE;
    if (mode & O_BINARY) {
        pipemode = O_BINARY;
        modes[1] = 'b';
        modes[2] = '\0';
    }
    else {
        pipemode = O_TEXT;
        modes[1] = '\0';
    }

    sa.nLength              = sizeof (SECURITY_ATTRIBUTES);
    sa.lpSecurityDescriptor = NULL;
    sa.bInheritHandle       = TRUE;
    ret = -1;
    hWriteIn = hReadOut = NULL;

    RUBY_CRITICAL(do {
        /* create pipe */
        hCurProc = GetCurrentProcess();
        if (reading) {
            fRet = CreatePipe(&hReadIn, &hReadOut, &sa, 2048L);
            if (!fRet) {
                errno = map_errno(GetLastError());
                break;
            }
            if (!DuplicateHandle(hCurProc, hReadIn, hCurProc, &hDupInFile, 0,
                                 FALSE, DUPLICATE_SAME_ACCESS)) {
                errno = map_errno(GetLastError());
                CloseHandle(hReadIn);
                CloseHandle(hReadOut);
                CloseHandle(hCurProc);
                break;
            }
            CloseHandle(hReadIn);
        }
        if (writing) {
            fRet = CreatePipe(&hWriteIn, &hWriteOut, &sa, 2048L);
            if (!fRet) {
                errno = map_errno(GetLastError());
              write_pipe_failed:
                if (reading) {
                    CloseHandle(hDupInFile);
                    CloseHandle(hReadOut);
                }
                break;
            }
            if (!DuplicateHandle(hCurProc, hWriteOut, hCurProc, &hDupOutFile, 0,
                                 FALSE, DUPLICATE_SAME_ACCESS)) {
                errno = map_errno(GetLastError());
                CloseHandle(hWriteIn);
                CloseHandle(hWriteOut);
                CloseHandle(hCurProc);
                goto write_pipe_failed;
            }
            CloseHandle(hWriteOut);
        }
        CloseHandle(hCurProc);

        /* create child process */
        child = CreateChild(cmd, NULL, &sa, hWriteIn, hReadOut, NULL);
        if (!child) {
            if (reading) {
                CloseHandle(hReadOut);
                CloseHandle(hDupInFile);
            }
            if (writing) {
                CloseHandle(hWriteIn);
                CloseHandle(hDupOutFile);
            }
            break;
        }

        /* associate handle to fp */
        if (reading) {
            fd = rb_w32_open_osfhandle((long)hDupInFile,
                                       (_O_RDONLY | pipemode));
            CloseHandle(hReadOut);
            if (fd == -1) {
                CloseHandle(hDupInFile);
              read_open_failed:
                if (writing) {
                    CloseHandle(hWriteIn);
                    CloseHandle(hDupOutFile);
                }
                CloseChildHandle(child);
                break;
            }
            modes[0] = 'r';
            if ((*fpr = (FILE *)fdopen(fd, modes)) == NULL) {
                _close(fd);
                goto read_open_failed;
            }
        }
        if (writing) {
            fd = rb_w32_open_osfhandle((long)hDupOutFile,
                                       (_O_WRONLY | pipemode));
            CloseHandle(hWriteIn);
            if (fd == -1) {
                CloseHandle(hDupOutFile);
              write_open_failed:
                if (reading) {
                    fclose(*fpr);
                }
                CloseChildHandle(child);
                break;
            }
            modes[0] = 'w';
            if ((*fpw = (FILE *)fdopen(fd, modes)) == NULL) {
                _close(fd);
                goto write_open_failed;
            }
        }
        ret = child->pid;
    } while (0));

    return ret;
}

extern VALUE rb_last_status;

int
do_spawn(int mode, char *cmd)
{
    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, NULL, 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
do_aspawn(int mode, char *prog, char **argv)
{
    char *cmd, *p, *q, *s, **t;
    int len, n, bs, quote;
    struct ChildRecord *child;
    DWORD exitcode;

    switch (mode) {
      case P_WAIT:
      case P_NOWAIT:
      case P_OVERLAY:
        break;
      default:
        errno = EINVAL;
        return -1;
    }

    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;
    }
    cmd = ALLOCA_N(char, len);
    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';

    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 */
    }
}

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_globi(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 bool
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)
                        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;
            slashes = quote = 0;
            while (p < base + len) {
                switch (*p) {
                  case '\\':
                    p++;
                    slashes++;
                    break;

                  case '\'':
                  case '"':
                    if (!(slashes & 1)) {
                        if (!quote)
                            quote = *p;
                        else if (quote == *p)
                            quote = '\0';
                        else {
                            p++;
                            slashes = 0;
                            break;
                        }
                    }
                    if (base + slashes == p) {
                        base += slashes >> 1;
                        len -= slashes >> 1;
                        slashes &= 1;
                    }
                    if (base == p) {
                        base = ++p;
                        --len;
                    }
                    else {
                        memcpy(p - ((slashes + 1) >> 1), p + (~slashes & 1), base + len - p);
                        slashes >>= 1;
                        p -= slashes;
                        len -= slashes + 1;
                        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.
//

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->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);
        p->nfiles++;
        idx += len+1;
    }
    FindClose(fh);
    p->size = idx;
    p->curr = p->start;
    return p;
}

//
// Readdir just returns the current string pointer and bumps the
// string pointer to the next entry.
//

struct direct  *
rb_w32_readdir(DIR *dirp)
{
    int         len;
    static int  dummy = 0;

    if (dirp->curr) {

        //
        // first set up the structure to return
        //

        len = strlen(dirp->curr);
        strcpy(dirp->dirstr.d_name, dirp->curr);
        dirp->dirstr.d_namlen = len;

        //
        // Fake inode
        //
        dirp->dirstr.d_ino = dummy++;

        //
        // Now set up for the next call to readdir
        //

        dirp->curr += len + 1;
        if (dirp->curr >= (dirp->start + dirp->size)) {
            dirp->curr = NULL;
        }

        return &(dirp->dirstr);

    } else
        return NULL;
}

//
// Telldir returns the current string pointer position
//

long
rb_w32_telldir(DIR *dirp)
{
        return (long) dirp->curr;       /* ouch! pointer to long cast */
}

//
// Seekdir moves the string pointer to a previously saved position
// (Saved by telldir).

void
rb_w32_seekdir(DIR *dirp, long loc)
{
        dirp->curr = (char *) loc;      /* ouch! long to pointer cast */
}

//
// Rewinddir resets the string pointer to the start
//

void
rb_w32_rewinddir(DIR *dirp)
{
        dirp->curr = dirp->start;
}

//
// This just free's the memory allocated by opendir
//

void
rb_w32_closedir(DIR *dirp)
{
        free(dirp->start);
        free(dirp);
}

EXTERN_C void __cdecl _lock_fhandle(int);
EXTERN_C void __cdecl _unlock_fhandle(int);
EXTERN_C void __cdecl _unlock(int);

#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
}       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 */
}
#else

#define _set_osfhnd(fh, osfh) (void)((fh), (osfh))
#define _set_osflags(fh, flags) (void)((fh), (flags))

#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 fd)
{
    char sockbuf[80];
    int optlen;
    int retval;
    int result = TRUE;

    optlen = sizeof(sockbuf);
    RUBY_CRITICAL({
        retval = getsockopt(fd, 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 fd is actually a socket.
    //

    return result;
}

//
// 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, unsigned int u, char *data) */
#ifdef __BORLANDC__
  ioctl(int i, int u, ...)
#else
  ioctl(int i, unsigned int u, long data)
#endif
{
    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_file_fd(fd_set *set, fd_set *fileset)
{
    int idx;

    fileset->fd_count = 0;
    if (!set)
        return 0;
    for (idx = 0; idx < set->fd_count; idx++) {
        SOCKET fd = set->fd_array[idx];

        if (!is_socket(fd)) {
            int i;

            for (i = 0; i < fileset->fd_count; i++) {
                if (fileset->fd_array[i] == fd) {
                    break;
                }
            }
            if (i == fileset->fd_count) {
                if (fileset->fd_count < FD_SETSIZE) {
                    fileset->fd_array[i] = fd;
                    fileset->fd_count++;
                }
            }
        }
    }
    return fileset->fd_count;
}

long
rb_w32_select (int nfds, fd_set *rd, fd_set *wr, fd_set *ex,
               struct timeval *timeout)
{
    long r;
    fd_set file_rd;
    fd_set file_wr;
#ifdef USE_INTERRUPT_WINSOCK
    fd_set trap;
#endif /* USE_INTERRUPT_WINSOCK */
    int file_nfds;

    if (!NtSocketsInitialized) {
        StartSockets();
    }
    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 (nfds == 0 && timeout) {
        Sleep(timeout->tv_sec * 1000 + timeout->tv_usec / 1000);
        return 0;
    }
    file_nfds = extract_file_fd(rd, &file_rd);
    file_nfds += extract_file_fd(wr, &file_wr);
    if (file_nfds)
    {
        // assume normal files are always readable/writable
        // fake read/write fd_set and return value
        if (rd) *rd = file_rd;
        if (wr) *wr = file_wr;
        return file_nfds;
    }

#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 */

    RUBY_CRITICAL({
        r = select(nfds, rd, wr, ex, timeout);
        if (r == SOCKET_ERROR) {
            errno = map_errno(WSAGetLastError());
        }
    });
    return r;
}

static void
StartSockets ()
{
    WORD version;
    WSADATA retdata;
    int ret;
    int iSockOpt;

    //
    // initalize the winsock interface and insure that it's
    // cleaned up at exit.
    //
    version = MAKEWORD(1, 1);
    if (ret = WSAStartup(version, &retdata))
        rb_fatal ("Unable to locate winsock library!\n");
    if (LOBYTE(retdata.wVersion) != 1)
        rb_fatal("could not find version 1 of winsock dll\n");

    if (HIBYTE(retdata.wVersion) != 1)
        rb_fatal("could not find version 1 of winsock dll\n");

    atexit((void (*)(void)) WSACleanup);

#ifndef SO_SYNCHRONOUS_NONALERT
#define SO_SYNCHRONOUS_NONALERT 0x20
#endif

    iSockOpt = SO_SYNCHRONOUS_NONALERT;
    /*
     * Enable the use of sockets as filehandles
     */
#ifndef SO_OPENTYPE
#define SO_OPENTYPE     0x7008
#endif

    setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE,
               (char *)&iSockOpt, sizeof(iSockOpt));

    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
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
rb_w32_bind(int s, 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
rb_w32_connect(int s, 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
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
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
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
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
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
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
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
rb_w32_send(int s, 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
rb_w32_sendto(int s, char *buf, int len, int flags,
              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
rb_w32_setsockopt(int s, int level, int optname, 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
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;
}

#undef socket

int
rb_w32_socket(int af, int type, int protocol)
{
    SOCKET s;
    int fd;

    if (!NtSocketsInitialized) {
        StartSockets();
    }
    RUBY_CRITICAL({
        s = 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 *
rb_w32_gethostbyaddr (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 *
rb_w32_gethostbyname (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
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 *
rb_w32_getprotobyname (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 *
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 *
rb_w32_getservbyname (char *name, 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 *
rb_w32_getservbyport (int port, char *proto)
{
    struct servent *r;
    if (!NtSocketsInitialized) {
        StartSockets();
    }
    RUBY_CRITICAL({
        r = getservbyport(port, proto);
        if (r == NULL)
            errno = map_errno(WSAGetLastError());
    });
    return r;
}

//
// Networking stubs
//

void endhostent() {}
void endnetent() {}
void endprotoent() {}
void endservent() {}

struct netent *getnetent (void) {return (struct netent *) NULL;}

struct netent *getnetbyaddr(long net, int type) {return (struct netent *)NULL;}

struct netent *getnetbyname(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
    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(char *from, 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) {
                myerrno = map_errno(GetLastError());
            }
            CloseHandle(hKernel);
        }
        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()
{
        return 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;
}

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)
{
    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;
}

#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, 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()
{
    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(IN) && !defined(FLOAT)
#define OpenFile  WINAPI_OpenFile
#ifdef __BORLANDC__
#include <winsock2.h>
#include <windows.h>
#else
#include <windows.h>
#include <winsock.h>
#endif
#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>
#if !defined(__BORLANDC__)
# 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 putc(_c, _stream)       rb_w32_putc(_c, _stream)
#define fgetc(_stream)          getc(_stream)
#define fputc(_c, _stream)      putc(_c, _stream)
#define getchar()               rb_w32_getc(stdin)
#define putchar(_c)             rb_w32_putc(_c, stdout)
#define fgetchar()              getchar()
#define fputchar(_c)            putchar(_c)
#define utime(_p, _t)           rb_w32_utime(_p, _t)

#define strcasecmp(s1, s2)      stricmp(s1, s2)
#define strncasecmp(s1, s2, n)  strnicmp(s1, s2, n)

#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)
#ifdef __BORLANDC__
#define creat(p, m)             _creat(p, m)
#define eof()                   _eof()
#define filelength(h)           _filelength(h)
#define mktemp(t)               _mktemp(t)
#define read(h, b, l)           _read(h, b, l)
#define tell(h)                 _tell(h)
#define unlink(p)               _unlink(p)
#define write(h, b, l)          _write(h, b, l)
#define _open                   _sopen
#define sopen                   _sopen
#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
#define fsync(h)                _commit(h)
#undef stat
#define stat(path,st)           rb_w32_stat(path,st)
#undef execv
#define execv(path,argv)        do_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)

#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 pipe_exec(char *, int, FILE **, FILE **);
extern int    flock(int fd, int oper);
extern int    rb_w32_accept(int, struct sockaddr *, int *);
extern int    rb_w32_bind(int, struct sockaddr *, int);
extern int    rb_w32_connect(int, 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 long   rb_w32_select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
extern int    rb_w32_getpeername(int, struct sockaddr *, int *);
extern int    rb_w32_getsockname(int, struct sockaddr *, int *);
extern int    rb_w32_getsockopt(int, int, int, char *, int *);
extern int    rb_w32_ioctlsocket(int, long, u_long *);
extern int    rb_w32_listen(int, int);
extern int    rb_w32_recv(int, char *, int, int);
extern int    rb_w32_recvfrom(int, char *, int, int, struct sockaddr *, int *);
extern int    rb_w32_send(int, char *, int, int);
extern int    rb_w32_sendto(int, char *, int, int, struct sockaddr *, int);
extern int    rb_w32_setsockopt(int, int, int, char *, int);
extern int    rb_w32_shutdown(int, int);
extern int    rb_w32_socket(int, int, int);
extern SOCKET rb_w32_get_osfhandle(int);
extern struct hostent * rb_w32_gethostbyaddr(char *, int, int);
extern struct hostent * rb_w32_gethostbyname(char *);
extern int    rb_w32_gethostname(char *, int);
extern struct protoent * rb_w32_getprotobyname(char *);
extern struct protoent * rb_w32_getprotobynumber(int);
extern struct servent  * rb_w32_getservbyname(char *, char *);
extern struct servent  * rb_w32_getservbyport(int, char *);
extern char * rb_w32_getenv(const char *);
extern int    rb_w32_rename(const char *, const char *);
extern int    rb_w32_stat(const char *, struct stat *);
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(char *, char *);
extern int gettimeofday(struct timeval *, struct timezone *);
extern rb_pid_t waitpid (rb_pid_t, int *, int);
extern int do_spawn(int, char *);
extern int do_aspawn(int, char *, char **);
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*);

#ifdef __BORLANDC__
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

#ifdef __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
//
#if !defined(__BORLANDC__)
extern int       ioctl (int, unsigned int, long);
#endif
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);

#define strerror(e) rb_w32_strerror(e)

#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

#ifdef accept
#undef accept
#endif
#define accept(s, a, l)         rb_w32_accept(s, a, l)

#ifdef bind
#undef bind
#endif
#define bind(s, a, l)           rb_w32_bind(s, a, l)

#ifdef connect
#undef connect
#endif
#define connect(s, a, l)        rb_w32_connect(s, a, l)

#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)

#undef select
#define select(n, r, w, e, t)   rb_w32_select(n, r, w, e, t)

#ifdef getpeername
#undef getpeername
#endif
#define getpeername(s, a, l)    rb_w32_getpeername(s, a, l)

#ifdef getsockname
#undef getsockname
#endif
#define getsockname(s, a, l)    rb_w32_getsockname(s, a, l)

#ifdef getsockopt
#undef getsockopt
#endif
#define getsockopt(s, v, n, o, l) rb_w32_getsockopt(s, v, n, o, l)

#ifdef ioctlsocket
#undef ioctlsocket
#endif
#define ioctlsocket(s, c, a)    rb_w32_ioctlsocket(s, c, a)

#ifdef listen
#undef listen
#endif
#define listen(s, b)            rb_w32_listen(s, b)

#ifdef recv
#undef recv
#endif
#define recv(s, b, l, f)        rb_w32_recv(s, b, l, f)

#ifdef recvfrom
#undef recvfrom
#endif
#define recvfrom(s, b, l, f, fr, frl) rb_w32_recvfrom(s, b, l, f, fr, frl)

#ifdef send
#undef send
#endif
#define send(s, b, l, f)        rb_w32_send(s, b, l, f)

#ifdef sendto
#undef sendto
#endif
#define sendto(s, b, l, f, t, tl) rb_w32_sendto(s, b, l, f, t, tl)

#ifdef setsockopt
#undef setsockopt
#endif
#define setsockopt(s, v, n, o, l) rb_w32_setsockopt(s, v, n, o, l)

#ifdef shutdown
#undef shutdown
#endif
#define shutdown(s, h)          rb_w32_shutdown(s, h)

#ifdef socket
#undef socket
#endif
#define socket(s, t, p)         rb_w32_socket(s, t, p)

#ifdef gethostbyaddr
#undef gethostbyaddr
#endif
#define gethostbyaddr(a, l, t)  rb_w32_gethostbyaddr(a, l, t)

#ifdef gethostbyname
#undef gethostbyname
#endif
#define gethostbyname(n)        rb_w32_gethostbyname(n)

#ifdef gethostname
#undef gethostname
#endif
#define gethostname(n, l)       rb_w32_gethostname(n, l)

#ifdef getprotobyname
#undef getprotobyname
#endif
#define getprotobyname(n)       rb_w32_getprotobyname(n)

#ifdef getprotobynumber
#undef getprotobynumber
#endif
#define getprotobynumber(n)     rb_w32_getprotobynumber(n)

#ifdef getservbyname
#undef getservbyname
#endif
#define getservbyname(n, p)     rb_w32_getservbyname(n, p)

#ifdef getservbyport
#undef getservbyport
#endif
#define getservbyport(p, pr)    rb_w32_getservbyport(p, pr)

#ifdef get_osfhandle
#undef get_osfhandle
#endif
#define get_osfhandle(h)        rb_w32_get_osfhandle(h)

#ifdef getcwd
#undef getcwd
#endif
#define getcwd(b, s)            rb_w32_getcwd(b, s)

#ifdef getenv
#undef getenv
#endif
#define getenv(n)               rb_w32_getenv(n)

#ifdef rename
#undef rename
#endif
#define rename(o, n)            rb_w32_rename(o, n)

struct tms {
        long    tms_utime;
        long    tms_stime;
        long    tms_cutime;
        long    tms_cstime;
};

#ifdef times
#undef times
#endif
#define times(t) rb_w32_times(t)
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 *, struct utimbuf *);
#define Sleep(msec) (void)rb_w32_sleep(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/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] */


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] */


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] */


parse.c

root/parse.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. yystype
  2. yystrlen
  3. yystpcpy
  4. yyparse
  5. yyerror
  6. yycompile
  7. lex_get_str
  8. lex_getline
  9. rb_compile_string
  10. rb_compile_cstr
  11. rb_compile_file
  12. nextc
  13. pushback
  14. newtok
  15. tokadd
  16. read_escape
  17. tokadd_escape
  18. regx_options
  19. dispose_string
  20. tokadd_string
  21. parse_string
  22. heredoc_identifier
  23. heredoc_restore
  24. whole_match_p
  25. here_document
  26. arg_ambiguous
  27. yylex
  28. rb_node_newnode
  29. nodetype
  30. nodeline
  31. newline_node
  32. fixpos
  33. parser_warning
  34. parser_warn
  35. block_append
  36. list_append
  37. list_concat
  38. literal_concat
  39. evstr2dstr
  40. new_evstr
  41. call_op
  42. match_gen
  43. gettable
  44. assignable
  45. aryset
  46. rb_id_attrset
  47. attrset
  48. rb_backref_error
  49. arg_concat
  50. arg_add
  51. node_assign
  52. value_expr0
  53. void_expr0
  54. void_stmts
  55. remove_begin
  56. assign_in_cond
  57. e_option_supplied
  58. warn_unless_e_option
  59. warning_unless_e_option
  60. range_op
  61. literal_node
  62. cond0
  63. cond
  64. logop
  65. cond_negative
  66. no_blockarg
  67. ret_args
  68. new_yield
  69. negate_lit
  70. arg_blk_pass
  71. arg_prepend
  72. new_call
  73. new_fcall
  74. new_super
  75. local_push
  76. local_pop
  77. local_tbl
  78. local_append
  79. local_cnt
  80. local_id
  81. top_local_init
  82. top_local_setup
  83. dyna_push
  84. dyna_pop
  85. dyna_in_block
  86. dyna_init
  87. ruby_parser_stack_on_heap
  88. rb_gc_mark_parser
  89. rb_parser_append_print
  90. rb_parser_while_loop
  91. Init_sym
  92. internal_id
  93. is_special_global_name
  94. rb_symname_p
  95. rb_intern
  96. rb_id2name
  97. symbols_i
  98. rb_sym_all_symbols
  99. rb_is_const_id
  100. rb_is_class_id
  101. rb_is_instance_id
  102. rb_is_local_id
  103. rb_is_junk_id
  104. special_local_set
  105. rb_backref_get
  106. rb_backref_set
  107. rb_lastline_get
  108. rb_lastline_set
  109. rb_parser_malloc
  110. rb_parser_calloc
  111. rb_parser_realloc
  112. rb_parser_free
/* A Bison parser, made from parse.y
   by GNU bison 1.35.  */

#define YYBISON 1  /* Identify Bison output.  */

# define        kCLASS  257
# define        kMODULE 258
# define        kDEF    259
# define        kUNDEF  260
# define        kBEGIN  261
# define        kRESCUE 262
# define        kENSURE 263
# define        kEND    264
# define        kIF     265
# define        kUNLESS 266
# define        kTHEN   267
# define        kELSIF  268
# define        kELSE   269
# define        kCASE   270
# define        kWHEN   271
# define        kWHILE  272
# define        kUNTIL  273
# define        kFOR    274
# define        kBREAK  275
# define        kNEXT   276
# define        kREDO   277
# define        kRETRY  278
# define        kIN     279
# define        kDO     280
# define        kDO_COND        281
# define        kDO_BLOCK       282
# define        kRETURN 283
# define        kYIELD  284
# define        kSUPER  285
# define        kSELF   286
# define        kNIL    287
# define        kTRUE   288
# define        kFALSE  289
# define        kAND    290
# define        kOR     291
# define        kNOT    292
# define        kIF_MOD 293
# define        kUNLESS_MOD     294
# define        kWHILE_MOD      295
# define        kUNTIL_MOD      296
# define        kRESCUE_MOD     297
# define        kALIAS  298
# define        kDEFINED        299
# define        klBEGIN 300
# define        klEND   301
# define        k__LINE__       302
# define        k__FILE__       303
# define        tIDENTIFIER     304
# define        tFID    305
# define        tGVAR   306
# define        tIVAR   307
# define        tCONSTANT       308
# define        tCVAR   309
# define        tINTEGER        310
# define        tFLOAT  311
# define        tSTRING_CONTENT 312
# define        tNTH_REF        313
# define        tBACK_REF       314
# define        tREGEXP_END     315
# define        tUPLUS  316
# define        tUMINUS 317
# define        tPOW    318
# define        tCMP    319
# define        tEQ     320
# define        tEQQ    321
# define        tNEQ    322
# define        tGEQ    323
# define        tLEQ    324
# define        tANDOP  325
# define        tOROP   326
# define        tMATCH  327
# define        tNMATCH 328
# define        tDOT2   329
# define        tDOT3   330
# define        tAREF   331
# define        tASET   332
# define        tLSHFT  333
# define        tRSHFT  334
# define        tCOLON2 335
# define        tCOLON3 336
# define        tOP_ASGN        337
# define        tASSOC  338
# define        tLPAREN 339
# define        tLPAREN_ARG     340
# define        tRPAREN 341
# define        tLBRACK 342
# define        tLBRACE 343
# define        tLBRACE_ARG     344
# define        tSTAR   345
# define        tAMPER  346
# define        tSYMBEG 347
# define        tSTRING_BEG     348
# define        tXSTRING_BEG    349
# define        tREGEXP_BEG     350
# define        tWORDS_BEG      351
# define        tQWORDS_BEG     352
# define        tSTRING_DBEG    353
# define        tSTRING_DVAR    354
# define        tSTRING_END     355
# define        tLOWEST 356
# define        tUMINUS_NUM     357
# define        tLAST_TOKEN     358

#line 13 "parse.y"

#define YYDEBUG 1
#define YYERROR_VERBOSE 1
#ifndef YYSTACK_USE_ALLOCA
#define YYSTACK_USE_ALLOCA 0
#endif

#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        rb_parser_malloc
#define YYREALLOC       rb_parser_realloc
#define YYCALLOC        rb_parser_calloc
#define YYFREE  rb_parser_free
#define malloc  YYMALLOC
#define realloc YYREALLOC
#define calloc  YYCALLOC
#define free    YYFREE
static void *rb_parser_malloc _((size_t));
static void *rb_parser_realloc _((void *, size_t));
static void *rb_parser_calloc _((size_t, size_t));
static void rb_parser_free _((void *));

#define yyparse ruby_yyparse
#define yylex ruby_yylex
#define yyerror ruby_yyerror
#define yylval ruby_yylval
#define yychar ruby_yychar
#define yydebug ruby_yydebug

#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))

NODE *ruby_eval_tree_begin = 0;
NODE *ruby_eval_tree = 0;

char *ruby_sourcefile;          /* current source file */
int   ruby_sourceline;          /* current line no. */

static int yylex();
static int yyerror();

static enum lex_state {
    EXPR_BEG,                   /* ignore newline, +/- is a sign. */
    EXPR_END,                   /* 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. */
} lex_state;
static NODE *lex_strterm;

#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 >>= 1)
#define BITSTACK_LEXPOP(stack)  (stack = (stack >> 1) | (stack & 1))
#define BITSTACK_SET_P(stack)   (stack&1)

static stack_type cond_stack = 0;
#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)

static stack_type cmdarg_stack = 0;
#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)

static int class_nest = 0;
static int in_single = 0;
static int in_def = 0;
static int compile_for_eval = 0;
static ID cur_mid = 0;

static NODE *cond();
static NODE *logop();
static int cond_negative();

static NODE *newline_node();
static void fixpos();

static int value_expr0();
static void void_expr0();
static void void_stmts();
static NODE *remove_begin();
#define value_expr(node) value_expr0((node) = remove_begin(node))
#define void_expr(node) void_expr0((node) = remove_begin(node))

static NODE *block_append();
static NODE *list_append();
static NODE *list_concat();
static NODE *arg_concat();
static NODE *arg_prepend();
static NODE *literal_concat();
static NODE *new_evstr();
static NODE *evstr2dstr();
static NODE *call_op();
static int in_defined = 0;

static NODE *negate_lit();
static NODE *ret_args();
static NODE *arg_blk_pass();
static NODE *new_call();
static NODE *new_fcall();
static NODE *new_super();
static NODE *new_yield();

static NODE *gettable();
static NODE *assignable();
static NODE *aryset();
static NODE *attrset();
static void rb_backref_error();
static NODE *node_assign();

static NODE *match_gen();
static void local_push();
static void local_pop();
static int  local_append();
static int  local_cnt();
static int  local_id();
static ID  *local_tbl();
static ID   internal_id();

static struct RVarmap *dyna_push();
static void dyna_pop();
static int dyna_in_block();
static NODE *dyna_init();

static void top_local_init();
static void top_local_setup();

#define RE_OPTION_ONCE 0x80

#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.id

/* 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

#line 208 "parse.y"
#ifndef YYSTYPE
typedef union {
    NODE *node;
    ID id;
    int num;
    struct RVarmap *vars;
} yystype;
# define YYSTYPE yystype
# define YYSTYPE_IS_TRIVIAL 1
#endif
#ifndef YYDEBUG
# define YYDEBUG 0
#endif

#define YYFINAL         895
#define YYFLAG          -32768
#define YYNTBASE        132

/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
#define YYTRANSLATE(x) ((unsigned)(x) <= 358 ? yytranslate[x] : 274)

/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
static const short yytranslate[] =
{
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     130,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,   129,   117,     2,     2,     2,   115,   110,     2,
     128,   125,   113,   111,   126,   112,   124,   114,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,   105,   131,
     107,   103,   106,   104,     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,   122,     2,   123,   109,     2,   127,     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,   120,   108,   121,   118,     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,     3,     4,     5,
       6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
      26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
      36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
      46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
      56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
      66,    67,    68,    69,    70,    71,    72,    73,    74,    75,
      76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
      86,    87,    88,    89,    90,    91,    92,    93,    94,    95,
      96,    97,    98,    99,   100,   101,   102,   116,   119
};

#if YYDEBUG
static const short yyprhs[] =
{
       0,     0,     1,     4,     9,    12,    14,    16,    20,    23,
      24,    29,    33,    37,    41,    44,    48,    52,    56,    60,
      64,    65,    71,    76,    80,    84,    88,    95,   101,   107,
     113,   117,   121,   125,   129,   131,   133,   137,   141,   144,
     147,   149,   151,   153,   155,   158,   161,   164,   166,   171,
     176,   177,   178,   185,   188,   192,   197,   203,   208,   214,
     217,   220,   222,   226,   228,   232,   234,   237,   241,   244,
     247,   249,   251,   255,   258,   262,   264,   269,   273,   277,
     281,   285,   288,   290,   292,   297,   301,   305,   309,   313,
     316,   318,   320,   322,   325,   327,   331,   333,   335,   337,
     339,   341,   343,   345,   347,   348,   353,   355,   357,   359,
     361,   363,   365,   367,   369,   371,   373,   375,   377,   379,
     381,   383,   385,   387,   389,   391,   393,   395,   397,   399,
     401,   403,   405,   407,   409,   411,   413,   415,   417,   419,
     421,   423,   425,   427,   429,   431,   433,   435,   437,   439,
     441,   443,   445,   447,   449,   451,   453,   455,   457,   459,
     461,   463,   465,   467,   469,   471,   473,   475,   477,   479,
     481,   483,   485,   487,   491,   497,   501,   508,   514,   520,
     526,   532,   537,   541,   545,   549,   553,   557,   561,   565,
     569,   573,   578,   583,   586,   589,   593,   597,   601,   605,
     609,   613,   617,   621,   625,   629,   633,   637,   641,   644,
     647,   651,   655,   659,   663,   664,   669,   675,   677,   679,
     681,   684,   687,   693,   696,   700,   704,   709,   714,   721,
     723,   725,   727,   730,   736,   739,   745,   750,   758,   762,
     764,   769,   773,   779,   787,   790,   796,   801,   808,   816,
     826,   830,   832,   833,   836,   838,   839,   843,   844,   849,
     852,   855,   857,   859,   863,   867,   872,   875,   877,   879,
     881,   883,   885,   887,   889,   891,   893,   894,   899,   900,
     906,   910,   914,   917,   922,   926,   930,   932,   937,   941,
     943,   944,   951,   954,   956,   959,   966,   973,   974,   975,
     983,   984,   985,   993,   999,  1004,  1010,  1011,  1012,  1022,
    1023,  1030,  1031,  1032,  1041,  1042,  1048,  1049,  1056,  1057,
    1058,  1068,  1070,  1072,  1074,  1076,  1078,  1080,  1082,  1084,
    1087,  1089,  1091,  1093,  1095,  1101,  1103,  1106,  1108,  1110,
    1112,  1115,  1117,  1121,  1122,  1123,  1130,  1133,  1138,  1143,
    1146,  1151,  1156,  1160,  1163,  1165,  1166,  1167,  1174,  1175,
    1176,  1183,  1189,  1191,  1196,  1199,  1201,  1203,  1210,  1212,
    1214,  1216,  1218,  1221,  1223,  1226,  1228,  1230,  1232,  1234,
    1236,  1238,  1241,  1245,  1249,  1253,  1257,  1261,  1262,  1266,
    1268,  1271,  1275,  1279,  1280,  1284,  1285,  1288,  1289,  1292,
    1294,  1295,  1299,  1300,  1305,  1307,  1309,  1311,  1313,  1316,
    1318,  1320,  1322,  1324,  1328,  1330,  1332,  1335,  1338,  1340,
    1342,  1344,  1346,  1348,  1350,  1352,  1354,  1356,  1358,  1360,
    1362,  1364,  1366,  1368,  1370,  1371,  1376,  1379,  1384,  1387,
    1394,  1399,  1404,  1407,  1412,  1415,  1418,  1420,  1421,  1423,
    1425,  1427,  1429,  1431,  1433,  1437,  1441,  1443,  1447,  1449,
    1451,  1454,  1456,  1458,  1460,  1463,  1466,  1468,  1470,  1471,
    1477,  1479,  1482,  1485,  1487,  1491,  1495,  1497,  1499,  1501,
    1503,  1505,  1507,  1509,  1511,  1513,  1515,  1517,  1519,  1520,
    1522,  1523,  1525,  1526,  1528,  1530,  1532,  1534,  1536,  1539
};
static const short yyrhs[] =
{
      -1,   133,   135,     0,   135,   217,   201,   220,     0,   136,
     268,     0,   273,     0,   137,     0,   136,   272,   137,     0,
       1,   137,     0,     0,    44,   158,   138,   158,     0,    44,
      52,    52,     0,    44,    52,    60,     0,    44,    52,    59,
       0,     6,   159,     0,   137,    39,   141,     0,   137,    40,
     141,     0,   137,    41,   141,     0,   137,    42,   141,     0,
     137,    43,   137,     0,     0,    46,   139,   120,   135,   121,
       0,    47,   120,   135,   121,     0,   154,   103,   142,     0,
     148,   103,   142,     0,   244,    83,   142,     0,   197,   122,
     166,   123,    83,   142,     0,   197,   124,    50,    83,   142,
       0,   197,   124,    54,    83,   142,     0,   197,    81,    50,
      83,   142,     0,   245,    83,   142,     0,   154,   103,   179,
       0,   148,   103,   165,     0,   148,   103,   179,     0,   140,
       0,   142,     0,   140,    36,   140,     0,   140,    37,   140,
       0,    38,   140,     0,   117,   142,     0,   163,     0,   140,
       0,   147,     0,   143,     0,    29,   169,     0,    21,   169,
       0,    22,   169,     0,   207,     0,   207,   124,   265,   171,
       0,   207,    81,   265,   171,     0,     0,     0,    90,   145,
     203,   146,   135,   121,     0,   264,   171,     0,   264,   171,
     144,     0,   197,   124,   265,   171,     0,   197,   124,   265,
     171,   144,     0,   197,    81,   265,   171,     0,   197,    81,
     265,   171,   144,     0,    31,   171,     0,    30,   171,     0,
     150,     0,    85,   149,   125,     0,   150,     0,    85,   149,
     125,     0,   152,     0,   152,   151,     0,   152,    91,   153,
       0,   152,    91,     0,    91,   153,     0,    91,     0,   153,
       0,    85,   149,   125,     0,   151,   126,     0,   152,   151,
     126,     0,   242,     0,   197,   122,   166,   123,     0,   197,
     124,    50,     0,   197,    81,    50,     0,   197,   124,    54,
       0,   197,    81,    54,     0,    82,    54,     0,   245,     0,
     242,     0,   197,   122,   166,   123,     0,   197,   124,    50,
       0,   197,    81,    50,     0,   197,   124,    54,     0,   197,
      81,    54,     0,    82,    54,     0,   245,     0,    50,     0,
      54,     0,    82,   155,     0,   155,     0,   197,    81,   155,
       0,    50,     0,    54,     0,    51,     0,   161,     0,   162,
       0,   157,     0,   238,     0,   158,     0,     0,   159,   126,
     160,   158,     0,   108,     0,   109,     0,   110,     0,    65,
       0,    66,     0,    67,     0,    73,     0,   106,     0,    69,
       0,   107,     0,    70,     0,    79,     0,    80,     0,   111,
       0,   112,     0,   113,     0,    91,     0,   114,     0,   115,
       0,    64,     0,   118,     0,    62,     0,    63,     0,    77,
       0,    78,     0,   127,     0,    48,     0,    49,     0,    46,
       0,    47,     0,    44,     0,    36,     0,     7,     0,    21,
       0,    16,     0,     3,     0,     5,     0,    45,     0,    26,
       0,    15,     0,    14,     0,    10,     0,     9,     0,    35,
       0,    20,     0,    25,     0,     4,     0,    22,     0,    33,
       0,    38,     0,    37,     0,    23,     0,     8,     0,    24,
       0,    29,     0,    32,     0,    31,     0,    13,     0,    34,
       0,     6,     0,    17,     0,    30,     0,    39,     0,    40,
       0,    41,     0,    42,     0,    43,     0,   154,   103,   163,
       0,   154,   103,   163,    43,   163,     0,   244,    83,   163,
       0,   197,   122,   166,   123,    83,   163,     0,   197,   124,
      50,    83,   163,     0,   197,   124,    54,    83,   163,     0,
     197,    81,    50,    83,   163,     0,   197,    81,    54,    83,
     163,     0,    82,    54,    83,   163,     0,   245,    83,   163,
       0,   163,    75,   163,     0,   163,    76,   163,     0,   163,
     111,   163,     0,   163,   112,   163,     0,   163,   113,   163,
       0,   163,   114,   163,     0,   163,   115,   163,     0,   163,
      64,   163,     0,   116,    56,    64,   163,     0,   116,    57,
      64,   163,     0,    62,   163,     0,    63,   163,     0,   163,
     108,   163,     0,   163,   109,   163,     0,   163,   110,   163,
       0,   163,    65,   163,     0,   163,   106,   163,     0,   163,
      69,   163,     0,   163,   107,   163,     0,   163,    70,   163,
       0,   163,    66,   163,     0,   163,    67,   163,     0,   163,
      68,   163,     0,   163,    73,   163,     0,   163,    74,   163,
       0,   117,   163,     0,   118,   163,     0,   163,    79,   163,
       0,   163,    80,   163,     0,   163,    71,   163,     0,   163,
      72,   163,     0,     0,    45,   269,   164,   163,     0,   163,
     104,   163,   105,   163,     0,   180,     0,   163,     0,   273,
       0,   147,   269,     0,   178,   270,     0,   178,   126,    91,
     163,   269,     0,   262,   270,     0,    91,   163,   269,     0,
     128,   273,   125,     0,   128,   169,   269,   125,     0,   128,
     207,   269,   125,     0,   128,   178,   126,   207,   269,   125,
       0,   273,     0,   167,     0,   147,     0,   178,   177,     0,
     178,   126,    91,   165,   177,     0,   262,   177,     0,   262,
     126,    91,   165,   177,     0,   178,   126,   262,   177,     0,
     178,   126,   262,   126,    91,   163,   177,     0,    91,   165,
     177,     0,   176,     0,   165,   126,   178,   177,     0,   165,
     126,   176,     0,   165,   126,    91,   165,   177,     0,   165,
     126,   178,   126,    91,   165,   177,     0,   262,   177,     0,
     262,   126,    91,   165,   177,     0,   165,   126,   262,   177,
       0,   165,   126,   178,   126,   262,   177,     0,   165,   126,
     262,   126,    91,   165,   177,     0,   165,   126,   178,   126,
     262,   126,    91,   165,   177,     0,    91,   165,   177,     0,
     176,     0,     0,   172,   173,     0,   169,     0,     0,    86,
     174,   125,     0,     0,    86,   170,   175,   125,     0,    92,
     165,     0,   126,   176,     0,   273,     0,   165,     0,   178,
     126,   165,     0,   178,   126,   165,     0,   178,   126,    91,
     165,     0,    91,   165,     0,   221,     0,   222,     0,   225,
       0,   226,     0,   227,     0,   230,     0,   243,     0,   245,
       0,    51,     0,     0,     7,   181,   134,    10,     0,     0,
      86,   140,   182,   269,   125,     0,    85,   135,   125,     0,
     197,    81,    54,     0,    82,    54,     0,   197,   122,   166,
     123,     0,    88,   166,   123,     0,    89,   261,   121,     0,
      29,     0,    30,   128,   169,   125,     0,    30,   128,   125,
       0,    30,     0,     0,    45,   269,   128,   183,   140,   125,
       0,   264,   209,     0,   208,     0,   208,   209,     0,    11,
     141,   198,   135,   200,    10,     0,    12,   141,   198,   135,
     201,    10,     0,     0,     0,    18,   184,   141,   199,   185,
     135,    10,     0,     0,     0,    19,   186,   141,   199,   187,
     135,    10,     0,    16,   141,   268,   214,    10,     0,    16,
     268,   214,    10,     0,    16,   268,    15,   135,    10,     0,
       0,     0,    20,   202,    25,   188,   141,   199,   189,   135,
      10,     0,     0,     3,   156,   246,   190,   134,    10,     0,
       0,     0,     3,    79,   140,   191,   271,   192,   134,    10,
       0,     0,     4,   156,   193,   134,    10,     0,     0,     5,
     157,   194,   248,   134,    10,     0,     0,     0,     5,   259,
     267,   195,   157,   196,   248,   134,    10,     0,    21,     0,
      22,     0,    23,     0,    24,     0,   180,     0,   271,     0,
     105,     0,    13,     0,   271,    13,     0,   271,     0,   105,
       0,    27,     0,   201,     0,    14,   141,   198,   135,   200,
       0,   273,     0,    15,   135,     0,   154,     0,   148,     0,
     273,     0,   108,   108,     0,    72,     0,   108,   202,   108,
       0,     0,     0,    28,   205,   203,   206,   135,    10,     0,
     147,   204,     0,   207,   124,   265,   168,     0,   207,    81,
     265,   168,     0,   264,   167,     0,   197,   124,   265,   168,
       0,   197,    81,   265,   167,     0,   197,    81,   266,     0,
      31,   167,     0,    31,     0,     0,     0,   120,   210,   203,
     211,   135,   121,     0,     0,     0,    26,   212,   203,   213,
     135,    10,     0,    17,   215,   198,   135,   216,     0,   178,
       0,   178,   126,    91,   165,     0,    91,   165,     0,   201,
       0,   214,     0,     8,   218,   219,   198,   135,   217,     0,
     273,     0,   165,     0,   179,     0,   273,     0,    84,   154,
       0,   273,     0,     9,   135,     0,   273,     0,   241,     0,
     238,     0,   240,     0,   223,     0,   224,     0,   223,   224,
       0,    94,   232,   101,     0,    95,   233,   101,     0,    96,
     233,    61,     0,    97,   129,   101,     0,    97,   228,   101,
       0,     0,   228,   229,   129,     0,   234,     0,   229,   234,
       0,    98,   129,   101,     0,    98,   231,   101,     0,     0,
     231,    58,   129,     0,     0,   232,   234,     0,     0,   233,
     234,     0,    58,     0,     0,   100,   235,   237,     0,     0,
      99,   236,   135,   121,     0,    52,     0,    53,     0,    55,
       0,   245,     0,    93,   239,     0,   157,     0,    53,     0,
      52,     0,    55,     0,    93,   233,   101,     0,    56,     0,
      57,     0,   116,    56,     0,   116,    57,     0,    50,     0,
      53,     0,    52,     0,    54,     0,    55,     0,    33,     0,
      32,     0,    34,     0,    35,     0,    49,     0,    48,     0,
     242,     0,   242,     0,    59,     0,    60,     0,   271,     0,
       0,   107,   247,   141,   271,     0,     1,   271,     0,   128,
     249,   269,   125,     0,   249,   271,     0,   251,   126,   253,
     126,   255,   258,     0,   251,   126,   253,   258,     0,   251,
     126,   255,   258,     0,   251,   258,     0,   253,   126,   255,
     258,     0,   253,   258,     0,   255,   258,     0,   257,     0,
       0,    54,     0,    53,     0,    52,     0,    55,     0,    50,
       0,   250,     0,   251,   126,   250,     0,    50,   103,   165,
       0,   252,     0,   253,   126,   252,     0,   113,     0,    91,
       0,   254,    50,     0,   254,     0,   110,     0,    92,     0,
     256,    50,     0,   126,   257,     0,   273,     0,   243,     0,
       0,   128,   260,   140,   269,   125,     0,   273,     0,   262,
     270,     0,   178,   270,     0,   263,     0,   262,   126,   263,
       0,   165,    84,   165,     0,    50,     0,    54,     0,    51,
       0,    50,     0,    54,     0,    51,     0,   161,     0,    50,
       0,    51,     0,   161,     0,   124,     0,    81,     0,     0,
     272,     0,     0,   130,     0,     0,   130,     0,   126,     0,
     131,     0,   130,     0,   271,     0,   272,   131,     0,     0
};

#endif

#if YYDEBUG
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const short yyrline[] =
{
       0,   345,   345,   370,   390,   397,   398,   402,   406,   412,
     412,   416,   420,   427,   432,   436,   445,   454,   466,   478,
     482,   482,   496,   504,   508,   514,   539,   558,   570,   582,
     594,   599,   603,   608,   613,   616,   617,   621,   625,   629,
     633,   636,   643,   644,   645,   649,   653,   659,   660,   664,
     670,   670,   670,   685,   690,   702,   707,   719,   724,   736,
     741,   748,   749,   755,   756,   762,   766,   770,   774,   778,
     782,   788,   789,   795,   799,   805,   809,   813,   817,   821,
     825,   831,   837,   844,   848,   852,   856,   860,   864,   870,
     876,   883,   887,   890,   894,   898,   904,   905,   906,   907,
     912,   919,   920,   923,   927,   927,   933,   934,   935,   936,
     937,   938,   939,   940,   941,   942,   943,   944,   945,   946,
     947,   948,   949,   950,   951,   952,   953,   954,   955,   956,
     957,   958,   961,   961,   961,   961,   962,   962,   962,   962,
     962,   962,   962,   963,   963,   963,   963,   963,   963,   963,
     964,   964,   964,   964,   964,   964,   965,   965,   965,   965,
     965,   965,   965,   966,   966,   966,   966,   966,   967,   967,
     967,   967,   967,   970,   974,   978,  1003,  1022,  1034,  1046,
    1058,  1063,  1068,  1073,  1086,  1099,  1103,  1107,  1111,  1115,
    1119,  1123,  1127,  1131,  1140,  1144,  1148,  1152,  1156,  1160,
    1164,  1168,  1172,  1176,  1180,  1184,  1188,  1192,  1196,  1200,
    1204,  1208,  1212,  1216,  1220,  1220,  1225,  1230,  1236,  1243,
    1244,  1249,  1253,  1258,  1262,  1269,  1273,  1277,  1282,  1289,
    1290,  1293,  1298,  1302,  1307,  1312,  1317,  1322,  1328,  1332,
    1335,  1339,  1343,  1348,  1353,  1358,  1363,  1368,  1373,  1378,
    1383,  1387,  1390,  1390,  1402,  1403,  1403,  1408,  1408,  1415,
    1421,  1425,  1428,  1432,  1438,  1442,  1446,  1452,  1453,  1454,
    1455,  1456,  1457,  1458,  1459,  1460,  1464,  1464,  1477,  1477,
    1482,  1486,  1490,  1494,  1502,  1511,  1515,  1519,  1523,  1527,
    1531,  1531,  1536,  1542,  1543,  1552,  1565,  1578,  1578,  1578,
    1588,  1588,  1588,  1598,  1605,  1609,  1613,  1613,  1613,  1620,
    1620,  1636,  1636,  1636,  1658,  1658,  1674,  1674,  1692,  1692,
    1692,  1707,  1711,  1715,  1719,  1725,  1732,  1733,  1734,  1735,
    1738,  1739,  1740,  1743,  1744,  1753,  1754,  1760,  1761,  1764,
    1765,  1769,  1773,  1779,  1779,  1779,  1794,  1803,  1807,  1813,
    1818,  1823,  1828,  1832,  1836,  1842,  1842,  1842,  1854,  1854,
    1854,  1868,  1875,  1876,  1880,  1886,  1887,  1890,  1901,  1904,
    1908,  1909,  1912,  1916,  1919,  1927,  1930,  1931,  1935,  1938,
    1951,  1952,  1958,  1964,  1987,  2020,  2024,  2030,  2034,  2040,
    2041,  2047,  2051,  2057,  2061,  2067,  2071,  2077,  2081,  2087,
    2088,  2088,  2099,  2099,  2120,  2121,  2122,  2123,  2126,  2133,
    2134,  2135,  2136,  2139,  2172,  2173,  2174,  2178,  2184,  2185,
    2186,  2187,  2188,  2189,  2190,  2191,  2192,  2193,  2194,  2197,
    2203,  2209,  2210,  2213,  2217,  2217,  2225,  2228,  2233,  2239,
    2243,  2247,  2251,  2255,  2259,  2263,  2267,  2271,  2277,  2281,
    2285,  2289,  2293,  2304,  2305,  2311,  2321,  2326,  2332,  2333,
    2336,  2344,  2350,  2351,  2354,  2364,  2368,  2371,  2381,  2381,
    2406,  2407,  2411,  2420,  2421,  2427,  2433,  2434,  2435,  2438,
    2439,  2440,  2441,  2444,  2445,  2446,  2449,  2450,  2453,  2454,
    2457,  2458,  2461,  2462,  2463,  2466,  2467,  2470,  2471,  2474
};
#endif

#if (YYDEBUG) || defined YYERROR_VERBOSE

/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
static const char *const yytname[] =
{
  "$", "error", "$undefined.", "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", "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__", "tIDENTIFIER", "tFID", "tGVAR", "tIVAR",
  "tCONSTANT", "tCVAR", "tINTEGER", "tFLOAT", "tSTRING_CONTENT",
  "tNTH_REF", "tBACK_REF", "tREGEXP_END", "tUPLUS", "tUMINUS", "tPOW",
  "tCMP", "tEQ", "tEQQ", "tNEQ", "tGEQ", "tLEQ", "tANDOP", "tOROP",
  "tMATCH", "tNMATCH", "tDOT2", "tDOT3", "tAREF", "tASET", "tLSHFT",
  "tRSHFT", "tCOLON2", "tCOLON3", "tOP_ASGN", "tASSOC", "tLPAREN",
  "tLPAREN_ARG", "tRPAREN", "tLBRACK", "tLBRACE", "tLBRACE_ARG", "tSTAR",
  "tAMPER", "tSYMBEG", "tSTRING_BEG", "tXSTRING_BEG", "tREGEXP_BEG",
  "tWORDS_BEG", "tQWORDS_BEG", "tSTRING_DBEG", "tSTRING_DVAR",
  "tSTRING_END", "tLOWEST", "'='", "'?'", "':'", "'>'", "'<'", "'|'",
  "'^'", "'&'", "'+'", "'-'", "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'",
  "'~'", "tLAST_TOKEN", "'{'", "'}'", "'['", "']'", "'.'", "')'", "','",
  "'`'", "'('", "' '", "'\\n'", "';'", "program", "@1", "bodystmt",
  "compstmt", "stmts", "stmt", "@2", "@3", "expr", "expr_value",
  "command_call", "block_command", "cmd_brace_block", "@4", "@5",
  "command", "mlhs", "mlhs_entry", "mlhs_basic", "mlhs_item", "mlhs_head",
  "mlhs_node", "lhs", "cname", "cpath", "fname", "fitem", "undef_list",
  "@6", "op", "reswords", "arg", "@7", "arg_value", "aref_args",
  "paren_args", "opt_paren_args", "call_args", "call_args2",
  "command_args", "@8", "open_args", "@9", "@10", "block_arg",
  "opt_block_arg", "args", "mrhs", "primary", "@11", "@12", "@13", "@14",
  "@15", "@16", "@17", "@18", "@19", "@20", "@21", "@22", "@23", "@24",
  "@25", "@26", "primary_value", "then", "do", "if_tail", "opt_else",
  "block_var", "opt_block_var", "do_block", "@27", "@28", "block_call",
  "method_call", "brace_block", "@29", "@30", "@31", "@32", "case_body",
  "when_args", "cases", "opt_rescue", "exc_list", "exc_var", "opt_ensure",
  "literal", "strings", "string", "string1", "xstring", "regexp", "words",
  "word_list", "word", "qwords", "qword_list", "string_contents",
  "xstring_contents", "string_content", "@33", "@34", "string_dvar",
  "symbol", "sym", "dsym", "numeric", "variable", "var_ref", "var_lhs",
  "backref", "superclass", "@35", "f_arglist", "f_args", "f_norm_arg",
  "f_arg", "f_opt", "f_optarg", "restarg_mark", "f_rest_arg",
  "blkarg_mark", "f_block_arg", "opt_f_block_arg", "singleton", "@36",
  "assoc_list", "assocs", "assoc", "operation", "operation2",
  "operation3", "dot_or_colon", "opt_terms", "opt_nl", "trailer", "term",
  "terms", "none", 0
};
#endif

/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const short yyr1[] =
{
       0,   133,   132,   134,   135,   136,   136,   136,   136,   138,
     137,   137,   137,   137,   137,   137,   137,   137,   137,   137,
     139,   137,   137,   137,   137,   137,   137,   137,   137,   137,
     137,   137,   137,   137,   137,   140,   140,   140,   140,   140,
     140,   141,   142,   142,   142,   142,   142,   143,   143,   143,
     145,   146,   144,   147,   147,   147,   147,   147,   147,   147,
     147,   148,   148,   149,   149,   150,   150,   150,   150,   150,
     150,   151,   151,   152,   152,   153,   153,   153,   153,   153,
     153,   153,   153,   154,   154,   154,   154,   154,   154,   154,
     154,   155,   155,   156,   156,   156,   157,   157,   157,   157,
     157,   158,   158,   159,   160,   159,   161,   161,   161,   161,
     161,   161,   161,   161,   161,   161,   161,   161,   161,   161,
     161,   161,   161,   161,   161,   161,   161,   161,   161,   161,
     161,   161,   162,   162,   162,   162,   162,   162,   162,   162,
     162,   162,   162,   162,   162,   162,   162,   162,   162,   162,
     162,   162,   162,   162,   162,   162,   162,   162,   162,   162,
     162,   162,   162,   162,   162,   162,   162,   162,   162,   162,
     162,   162,   162,   163,   163,   163,   163,   163,   163,   163,
     163,   163,   163,   163,   163,   163,   163,   163,   163,   163,
     163,   163,   163,   163,   163,   163,   163,   163,   163,   163,
     163,   163,   163,   163,   163,   163,   163,   163,   163,   163,
     163,   163,   163,   163,   164,   163,   163,   163,   165,   166,
     166,   166,   166,   166,   166,   167,   167,   167,   167,   168,
     168,   169,   169,   169,   169,   169,   169,   169,   169,   169,
     170,   170,   170,   170,   170,   170,   170,   170,   170,   170,
     170,   170,   172,   171,   173,   174,   173,   175,   173,   176,
     177,   177,   178,   178,   179,   179,   179,   180,   180,   180,
     180,   180,   180,   180,   180,   180,   181,   180,   182,   180,
     180,   180,   180,   180,   180,   180,   180,   180,   180,   180,
     183,   180,   180,   180,   180,   180,   180,   184,   185,   180,
     186,   187,   180,   180,   180,   180,   188,   189,   180,   190,
     180,   191,   192,   180,   193,   180,   194,   180,   195,   196,
     180,   180,   180,   180,   180,   197,   198,   198,   198,   198,
     199,   199,   199,   200,   200,   201,   201,   202,   202,   203,
     203,   203,   203,   205,   206,   204,   207,   207,   207,   208,
     208,   208,   208,   208,   208,   210,   211,   209,   212,   213,
     209,   214,   215,   215,   215,   216,   216,   217,   217,   218,
     218,   218,   219,   219,   220,   220,   221,   221,   221,   222,
     223,   223,   224,   225,   226,   227,   227,   228,   228,   229,
     229,   230,   230,   231,   231,   232,   232,   233,   233,   234,
     235,   234,   236,   234,   237,   237,   237,   237,   238,   239,
     239,   239,   239,   240,   241,   241,   241,   241,   242,   242,
     242,   242,   242,   242,   242,   242,   242,   242,   242,   243,
     244,   245,   245,   246,   247,   246,   246,   248,   248,   249,
     249,   249,   249,   249,   249,   249,   249,   249,   250,   250,
     250,   250,   250,   251,   251,   252,   253,   253,   254,   254,
     255,   255,   256,   256,   257,   258,   258,   259,   260,   259,
     261,   261,   261,   262,   262,   263,   264,   264,   264,   265,
     265,   265,   265,   266,   266,   266,   267,   267,   268,   268,
     269,   269,   270,   270,   270,   271,   271,   272,   272,   273
};

/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
static const short yyr2[] =
{
       0,     0,     2,     4,     2,     1,     1,     3,     2,     0,
       4,     3,     3,     3,     2,     3,     3,     3,     3,     3,
       0,     5,     4,     3,     3,     3,     6,     5,     5,     5,
       3,     3,     3,     3,     1,     1,     3,     3,     2,     2,
       1,     1,     1,     1,     2,     2,     2,     1,     4,     4,
       0,     0,     6,     2,     3,     4,     5,     4,     5,     2,
       2,     1,     3,     1,     3,     1,     2,     3,     2,     2,
       1,     1,     3,     2,     3,     1,     4,     3,     3,     3,
       3,     2,     1,     1,     4,     3,     3,     3,     3,     2,
       1,     1,     1,     2,     1,     3,     1,     1,     1,     1,
       1,     1,     1,     1,     0,     4,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     3,     5,     3,     6,     5,     5,     5,
       5,     4,     3,     3,     3,     3,     3,     3,     3,     3,
       3,     4,     4,     2,     2,     3,     3,     3,     3,     3,
       3,     3,     3,     3,     3,     3,     3,     3,     2,     2,
       3,     3,     3,     3,     0,     4,     5,     1,     1,     1,
       2,     2,     5,     2,     3,     3,     4,     4,     6,     1,
       1,     1,     2,     5,     2,     5,     4,     7,     3,     1,
       4,     3,     5,     7,     2,     5,     4,     6,     7,     9,
       3,     1,     0,     2,     1,     0,     3,     0,     4,     2,
       2,     1,     1,     3,     3,     4,     2,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     0,     4,     0,     5,
       3,     3,     2,     4,     3,     3,     1,     4,     3,     1,
       0,     6,     2,     1,     2,     6,     6,     0,     0,     7,
       0,     0,     7,     5,     4,     5,     0,     0,     9,     0,
       6,     0,     0,     8,     0,     5,     0,     6,     0,     0,
       9,     1,     1,     1,     1,     1,     1,     1,     1,     2,
       1,     1,     1,     1,     5,     1,     2,     1,     1,     1,
       2,     1,     3,     0,     0,     6,     2,     4,     4,     2,
       4,     4,     3,     2,     1,     0,     0,     6,     0,     0,
       6,     5,     1,     4,     2,     1,     1,     6,     1,     1,
       1,     1,     2,     1,     2,     1,     1,     1,     1,     1,
       1,     2,     3,     3,     3,     3,     3,     0,     3,     1,
       2,     3,     3,     0,     3,     0,     2,     0,     2,     1,
       0,     3,     0,     4,     1,     1,     1,     1,     2,     1,
       1,     1,     1,     3,     1,     1,     2,     2,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     0,     4,     2,     4,     2,     6,
       4,     4,     2,     4,     2,     2,     1,     0,     1,     1,
       1,     1,     1,     1,     3,     3,     1,     3,     1,     1,
       2,     1,     1,     1,     2,     2,     1,     1,     0,     5,
       1,     2,     2,     1,     3,     3,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     0,     1,
       0,     1,     0,     1,     1,     1,     1,     1,     2,     0
};

/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
   doesn't specify something else to do.  Zero means the default is an
   error. */
static const short yydefact[] =
{
       1,     0,     0,     0,     0,     0,     0,   276,     0,     0,
     488,   297,   300,     0,   321,   322,   323,   324,   286,   289,
     354,   424,   423,   425,   426,     0,     0,   490,    20,     0,
     428,   427,   418,   275,   420,   419,   421,   422,   414,   415,
     431,   432,     0,     0,     0,     0,     0,   499,   499,    70,
     397,   395,   397,   397,   387,   393,     0,     0,     0,     2,
     488,     6,    34,    35,    43,    42,     0,    61,     0,    65,
      71,     0,    40,   217,     0,    47,   293,   267,   268,   379,
     380,   269,   270,   271,   272,   377,   378,   376,   429,   273,
       0,   274,   252,     5,     8,   321,   322,   286,   289,   354,
     490,    91,    92,     0,     0,     0,     0,    94,     0,   325,
       0,   429,   274,     0,   314,   141,   152,   142,   165,   138,
     158,   148,   147,   163,   146,   145,   140,   166,   150,   139,
     153,   157,   159,   151,   144,   160,   167,   162,   161,   154,
     164,   149,   137,   156,   155,   168,   169,   170,   171,   172,
     136,   143,   134,   135,   132,   133,    96,    98,    97,   127,
     128,   125,   109,   110,   111,   114,   116,   112,   129,   130,
     117,   118,   122,   113,   115,   106,   107,   108,   119,   120,
     121,   123,   124,   126,   131,   468,   316,    99,   100,   467,
       0,   161,   154,   164,   149,   132,   133,    96,    97,     0,
     101,   103,    14,   102,     0,     0,    41,     0,     0,     0,
     429,     0,   274,     0,   496,   495,   488,     0,   497,   489,
       0,     0,     0,   338,   337,     0,     0,   429,   274,     0,
       0,     0,   231,   218,   262,    45,   239,   499,   499,   473,
      46,    44,     0,    60,     0,   499,   353,    59,    38,     0,
       9,   491,   214,     0,     0,   193,     0,   194,   282,     0,
       0,     0,    61,   278,     0,   490,     0,   492,   492,   219,
     492,     0,   492,   470,     0,    69,     0,    75,    82,   411,
     410,   412,   409,     0,   408,     0,     0,     0,     0,     0,
       0,     0,   416,   417,    39,   208,   209,     4,   489,     0,
       0,     0,     0,     0,     0,     0,   343,   346,     0,    73,
       0,    68,    66,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,   499,     0,     0,     0,   358,   355,   294,   381,     0,
       0,   349,    53,   292,     0,   311,    91,    92,    93,   416,
     417,     0,   434,   309,   433,     0,   499,     0,     0,     0,
     447,   487,   486,   318,   104,     0,   499,   282,   328,   327,
       0,   326,     0,     0,   499,     0,     0,     0,     0,     0,
       0,     0,     0,   498,     0,     0,   282,     0,   499,     0,
     306,   499,   259,     0,     0,   232,   261,     0,   234,   288,
       0,   255,   254,   253,   231,   490,   499,   490,     0,    11,
      13,    12,     0,   290,     0,     0,     0,     0,     0,     0,
       0,   280,    62,   490,   490,   220,   284,   494,   493,   221,
     494,   223,   494,   472,   285,   471,    81,     0,   499,     0,
     399,   402,   400,   413,   398,   382,   396,   383,   384,   385,
     386,     0,   389,   391,     0,   392,     0,     0,     7,    15,
      16,    17,    18,    19,    36,    37,   499,     0,    24,    32,
       0,    33,     0,    67,    74,    23,   173,   262,    31,   190,
     198,   203,   204,   205,   200,   202,   212,   213,   206,   207,
     183,   184,   210,   211,     0,   199,   201,   195,   196,   197,
     185,   186,   187,   188,   189,   479,   484,   480,   485,   252,
     352,     0,   479,   481,   480,   482,   499,   479,   480,   252,
     252,   499,   499,    25,   175,    30,   182,    50,    54,     0,
     436,     0,     0,    91,    92,    95,     0,     0,   499,     0,
     490,   452,   450,   449,   448,   451,   459,   463,   462,   458,
     447,     0,     0,   453,   499,   456,   499,   461,   499,     0,
     446,     0,     0,   277,   499,   499,   368,   499,   329,   173,
     483,   281,     0,   479,   480,   499,     0,     0,     0,   362,
       0,   304,   332,   331,   298,   330,   301,   483,   281,     0,
     479,   480,     0,     0,   238,   475,     0,   263,   260,   499,
       0,     0,   474,   287,     0,    40,     0,   257,     0,   251,
     499,     0,     0,     0,     0,     0,   225,    10,     0,   215,
       0,    22,   181,    62,     0,   224,     0,   263,    78,    80,
       0,   479,   480,     0,     0,   388,   390,   394,   191,   192,
     341,     0,   344,   339,   266,     0,    72,     0,     0,     0,
       0,   351,    57,   283,     0,     0,   230,   350,    55,   229,
     348,    49,   347,    48,   359,   356,   499,   312,     0,     0,
     283,   315,     0,     0,   490,     0,   438,     0,   442,   466,
       0,   444,   460,     0,   445,   464,   319,   105,   369,   370,
     499,   371,     0,   499,   335,     0,     0,   333,     0,   283,
       0,     0,     0,   303,   305,   364,     0,     0,     0,     0,
     283,     0,   499,     0,   236,   499,   499,     0,     0,   256,
       0,   244,   226,     0,   490,   499,   499,   227,     0,    21,
     279,   490,    76,     0,   404,   405,   406,   401,   407,   340,
       0,     0,     0,   264,   174,   216,    29,   179,   180,    58,
       0,    27,   177,    28,   178,    56,     0,     0,    51,     0,
     435,   310,   469,   455,     0,   317,   454,   499,   499,   465,
       0,   457,   499,   447,     0,     0,   373,   336,     0,     3,
     375,     0,   295,     0,   296,     0,   499,     0,     0,   307,
     233,     0,   235,   250,     0,   241,   499,   499,   258,     0,
       0,   291,   222,   403,   342,     0,   265,    26,   176,     0,
       0,     0,     0,   437,     0,   440,   441,   443,     0,     0,
     372,     0,    83,    90,     0,   374,     0,   363,   365,   366,
     361,   299,   302,     0,   499,   499,     0,   240,     0,   246,
     499,   228,   345,   360,   357,     0,   313,   499,     0,    89,
       0,   499,     0,   499,   499,     0,   237,   242,     0,   499,
       0,   245,    52,   439,   320,   483,    88,     0,   479,   480,
     367,   334,   308,   499,     0,   247,   499,    84,   243,     0,
     248,   499,   249,     0,     0,     0
};

static const short yydefgoto[] =
{
     893,     1,   375,   376,    60,    61,   422,   253,    62,   207,
      63,    64,   538,   676,   821,    65,    66,   261,    67,    68,
      69,    70,   208,   107,   108,   200,   201,   202,   572,   525,
     188,    72,   424,   234,   266,   666,   667,   235,   617,   243,
     244,   413,   618,   728,   608,   405,   267,   481,    73,   204,
     433,   628,   220,   718,   221,   719,   602,   843,   542,   539,
     769,   368,   370,   571,   783,   256,   380,   594,   706,   707,
     226,   652,   307,   476,   751,    75,    76,   353,   532,   767,
     531,   766,   392,   590,   840,   575,   700,   785,   789,    77,
      78,    79,    80,    81,    82,    83,   289,   461,    84,   291,
     285,   283,   454,   644,   643,   747,    85,   284,    86,    87,
     210,    89,   211,   212,   363,   541,   561,   562,   563,   564,
     565,   566,   567,   568,   569,   779,   688,   190,   369,   271,
     268,   239,   113,   546,   520,   373,   217,   252,   439,   381,
     219,    93
};

static const short yypact[] =
{
  -32768,  2226,  5380,  7848,  8145,  3749,  5039,-32768,  6719,  6719,
    3630,-32768,-32768,  7947,  5586,  5586,-32768,-32768,  5586,  4382,
    4485,-32768,-32768,-32768,-32768,  6719,  4923,   -34,-32768,   -12,
  -32768,-32768,  3867,  3970,-32768,-32768,  4073,-32768,-32768,-32768,
  -32768,-32768,  7543,  7543,    52,  3040,  6719,  6822,  7543,  8244,
    4807,-32768,-32768,-32768,    -9,     2,   226,  7646,  7543,-32768,
     329,   725,   430,-32768,-32768,    87,    42,-32768,    36,  8046,
  -32768,   110,  9349,    14,    41,    96,    62,-32768,-32768,   127,
  -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,    29,-32768,
     160,   277,    19,-32768,   725,-32768,-32768,-32768,   129,   131,
     -34,   355,   383,  6719,   117,  3171,   415,-32768,    30,-32768,
     167,-32768,-32768,    19,-32768,-32768,-32768,-32768,-32768,-32768,
  -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   138,   157,
     333,   462,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  -32768,-32768,-32768,-32768,   473,   477,   478,-32768,   513,-32768,
  -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
     523,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,  4807,
  -32768,-32768,   121,-32768,  2468,   215,   430,    63,   169,   346,
      43,   204,    73,    63,-32768,-32768,   329,   106,-32768,   166,
    6719,  6719,   275,-32768,-32768,   439,   322,   103,   115,  7543,
    7543,  7543,-32768,  9349,   285,-32768,-32768,   316,   324,-32768,
  -32768,-32768,  5272,-32768,  5689,  5586,-32768,-32768,-32768,   326,
  -32768,-32768,   320,   334,  3302,-32768,   459,   397,   319,  3040,
     348,   353,   357,   430,  7543,   -34,   390,   158,   224,-32768,
     321,   359,   224,-32768,   463,-32768,   512,   539,   571,-32768,
  -32768,-32768,-32768,   299,-32768,   423,   510,   650,   418,   532,
     425,   584,   465,   468,-32768,-32768,-32768,-32768,  3527,  6719,
    6719,  6719,  6719,  5380,  6719,  6719,-32768,-32768,  6925,-32768,
    3040,  8244,   426,  6925,  7543,  7543,  7543,  7543,  7543,  7543,
    7543,  7543,  7543,  7543,  7543,  7543,  7543,  7543,  7543,  7543,
    7543,  7543,  7543,  7543,  7543,  7543,  7543,  7543,  7543,  7543,
    8406,  6822,  8472,  8538,  8538,-32768,-32768,-32768,-32768,  7646,
    7646,-32768,   454,-32768,   320,   430,-32768,   576,-32768,-32768,
  -32768,   329,-32768,-32768,-32768,  8604,  6822,  8538,  2468,  6719,
     573,-32768,-32768,-32768,-32768,   554,   557,   100,-32768,-32768,
    2590,   563,  7543,  8670,  6822,  8736,  7543,  7543,  2834,   553,
    3424,  7028,   569,-32768,    11,    11,   119,  8802,  6822,  8868,
  -32768,   498,-32768,  7543,  5792,-32768,-32768,  5895,-32768,-32768,
     505,  5483,-32768,-32768,    87,   -34,   522,     3,   530,-32768,
  -32768,-32768,  5039,-32768,  7543,  3302,   537,  8670,  8736,  7543,
     534,-32768,   540,   -34,  9196,-32768,-32768,  7131,-32768,-32768,
    7543,-32768,  7543,-32768,-32768,-32768,   576,  8934,  6822,  9000,
  -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  -32768,    35,-32768,-32768,   531,-32768,  7543,  7543,   725,-32768,
  -32768,-32768,-32768,-32768,-32768,-32768,    22,  7543,-32768,   542,
     544,-32768,   547,-32768,-32768,-32768,  8340,-32768,-32768,   397,
    1935,  1935,  1935,  1935,   870,   870,  9470,  9418,  1935,  1935,
    9401,  9401,   502,   502,  9332,   870,   870,   879,   879,   888,
      38,    38,   397,   397,   397,  2337,  4588,  2056,  4691,   131,
  -32768,   552,   401,-32768,   413,-32768,  4485,-32768,-32768,  1955,
    1955,    22,    22,-32768,  9349,-32768,  9349,-32768,-32768,   329,
  -32768,  6719,  2468,   467,   315,-32768,   131,   559,   131,   578,
      88,   574,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
     626,  2468,   329,-32768,   561,-32768,   565,   642,   580,   649,
  -32768,  5155,  5039,-32768,  7234,   692,-32768,   520,-32768,  2317,
    4176,  4279,   587,   273,   279,   692,   705,   709,  7543,   597,
      63,-32768,-32768,-32768,-32768,-32768,-32768,    46,    58,   601,
     145,   150,  6719,   635,-32768,-32768,  7543,   285,-32768,   604,
    7543,   285,-32768,-32768,  7543,  9248,    17,-32768,   607,-32768,
     609,   608,  5998,  8538,  8538,   612,-32768,-32768,  6719,  9349,
     619,-32768,  9349,   528,   616,-32768,  7543,-32768,   467,   315,
     620,    84,   330,  3302,   703,-32768,-32768,-32768,   397,   397,
  -32768,  7749,-32768,-32768,-32768,  7337,-32768,  7543,  7543,  7646,
    7543,-32768,   454,   447,  7646,  7646,-32768,-32768,   454,-32768,
  -32768,-32768,-32768,-32768,-32768,-32768,    22,-32768,   329,   737,
  -32768,-32768,   627,  7543,   -34,   741,-32768,   626,-32768,-32768,
     303,-32768,-32768,   163,-32768,-32768,-32768,-32768,   542,-32768,
     669,-32768,  2937,   748,-32768,  6719,   751,-32768,  7543,   337,
    7543,  7543,   759,-32768,-32768,-32768,  7440,  2712,  3424,  3424,
     153,    11,   498,  6101,-32768,   498,   498,  6204,   646,-32768,
    6307,-32768,-32768,    87,     3,   131,   131,-32768,    54,-32768,
  -32768,  9196,   581,   651,-32768,-32768,-32768,-32768,-32768,-32768,
     665,  3424,  7543,   648,  9349,  9349,-32768,  9349,  9349,-32768,
    7646,-32768,  9349,-32768,  9349,-32768,  3424,  3302,-32768,  2468,
  -32768,-32768,-32768,-32768,   652,-32768,-32768,   654,   580,-32768,
     574,-32768,   580,   573,  8343,    63,-32768,-32768,  3424,-32768,
  -32768,    63,-32768,  7543,-32768,  7543,   142,   765,   766,-32768,
  -32768,  7543,-32768,-32768,  7543,-32768,   656,   657,-32768,  7543,
     653,-32768,-32768,-32768,-32768,   774,-32768,-32768,  9349,   776,
     667,  3302,   781,-32768,   303,-32768,-32768,-32768,  2468,   738,
  -32768,   590,   539,   571,  2468,-32768,  2590,-32768,-32768,-32768,
  -32768,-32768,-32768,  3424,  9269,   498,  6410,-32768,  6513,-32768,
     498,-32768,-32768,-32768,-32768,   672,-32768,   580,   784,   576,
    9066,  6822,  9132,   557,   520,   786,-32768,-32768,  7543,   671,
    7543,-32768,-32768,-32768,-32768,    76,   315,   683,    94,   137,
  -32768,-32768,-32768,   498,  6616,-32768,   498,   581,-32768,  7543,
  -32768,   498,-32768,   811,   812,-32768
};

static const short yypgoto[] =
{
  -32768,-32768,  -307,   890,-32768,    28,-32768,-32768,   814,    65,
      25,-32768,  -551,-32768,-32768,    51,   -11,  -181,    69,   745,
  -32768,   -37,  1085,   -67,   813,     9,   -21,-32768,-32768,    47,
  -32768,   -14,-32768,  1352,  -299,   -13,  -472,    95,-32768,    12,
  -32768,-32768,-32768,-32768,    -5,   220,    33,  -294,    23,-32768,
  -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  -32768,-32768,-32768,-32768,-32768,   187,  -207,  -379,   -48,  -536,
     168,  -491,-32768,-32768,-32768,  -234,-32768,   742,-32768,-32768,
  -32768,-32768,  -371,-32768,-32768,   -42,-32768,-32768,-32768,-32768,
  -32768,-32768,   746,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  -32768,   586,  -239,-32768,-32768,-32768,    -3,-32768,-32768,-32768,
     917,   815,  1185,  1055,-32768,-32768,    44,   266,   141,-32768,
    -666,   144,-32768,  -610,-32768,  -362,  -512,-32768,-32768,-32768,
       7,  -372,   500,  -280,-32768,-32768,   -43,   -85,    91,    10,
     773,   678
};

#define YYLAST          9585

static const short yytable[] =
{
     233,   233,   223,   203,   233,   250,   388,   246,   570,   236,
     236,   417,   275,   236,   186,   354,   596,   297,   586,   488,
     218,   238,   238,   203,   781,   238,   109,   109,   255,   257,
      94,   361,   247,   233,   233,   612,   109,   358,   592,   703,
     674,   675,   521,   295,   296,   345,   456,   237,   237,   712,
     462,   237,   187,   187,   691,   272,   694,   670,   672,   282,
     519,   549,   526,   529,   530,   232,   232,   547,   612,   232,
     218,   -86,   109,   187,   213,   216,   378,   778,   430,   351,
     782,   270,   294,   -88,   623,   582,   246,   548,   345,   -86,
     304,   305,   109,   450,   650,  -325,   251,   187,   265,   599,
     351,   403,   314,   519,   352,   526,   258,   -85,   254,   -77,
     240,   759,  -430,   241,   262,   306,   593,   765,   364,   548,
     288,   390,   340,   391,   304,   305,  -430,   624,   -83,   482,
     651,   290,   -83,   251,   451,   452,  -325,   362,  -325,   346,
     -90,   214,   215,   727,   -89,   308,   -83,   245,   548,   640,
     -87,   337,   338,   339,   -86,   -75,   387,   702,   781,   391,
     214,   215,   309,   341,   645,   342,   -88,   356,   379,   548,
     -85,   357,   -78,   389,  -479,   -87,   -90,   343,   -84,   811,
     435,   -86,   346,   429,   -80,   768,  -480,   -77,    74,    74,
     110,   110,   -77,   214,   215,   209,   209,   209,   570,   -85,
     225,   209,   209,   -89,  -479,   209,   -86,   -86,   282,   -77,
     -77,   -83,   209,   313,   857,   233,   233,   295,   251,  -424,
     344,    51,   646,   -90,   -85,   -85,   218,   -89,   233,   -75,
     233,   233,    74,   209,   209,   679,   276,   236,  -423,   236,
     236,   -82,   -87,   349,   209,   -81,   187,   374,   365,   238,
     434,   238,   238,   -85,   685,   557,   276,   242,   -87,   245,
     838,   -84,  -424,   670,   672,   825,   826,   -87,   -87,   377,
     827,   -77,   382,   558,   483,   237,   -79,   237,   416,   -76,
     699,  -423,   292,   293,   437,   394,   395,   386,   438,   366,
     209,   367,    74,   232,   233,   232,   414,   393,   545,   486,
     489,   490,   491,   492,   493,   494,   495,   496,   497,   498,
     499,   500,   501,   502,   503,   504,   505,   506,   507,   508,
     509,   510,   511,   512,   513,   514,   468,   233,   262,   396,
     621,   473,   625,   478,   109,   534,   536,   410,   485,   412,
     415,   480,   799,   735,   736,   873,   480,   400,   634,   635,
     440,   612,   233,   780,   438,   -79,   710,   450,   612,   441,
     350,   443,   711,   445,   469,   470,   471,   472,   579,   403,
     233,   540,   534,   536,   533,   535,   -85,   233,   419,   262,
     -90,  -476,   -87,   717,   233,   420,   421,   518,   734,   233,
     233,    74,   265,   233,   556,   557,  -281,   615,   451,   452,
     453,   627,   429,   -82,   595,   595,   619,   209,   209,  -477,
     629,   609,   518,   558,  -425,   632,   559,   265,   620,   203,
     793,   570,   -89,   233,   589,   839,   233,   383,   233,   209,
     518,   209,   209,   -79,   233,   265,  -418,  -281,   -79,  -281,
     -84,    74,   404,  -480,   518,   -81,    74,   442,   423,   265,
     407,   438,   648,   649,   425,   -79,   -79,  -425,   408,   214,
     215,   314,   822,   233,  -421,   682,   304,   305,   384,   187,
     385,   359,   360,   431,   518,  -476,   612,  -418,   432,  -418,
     444,   450,   -63,  -476,   664,    74,   209,   209,   209,   209,
      74,   209,   209,  -483,   518,   209,   665,    74,   276,   265,
     209,    92,    92,  -477,   -85,  -421,   661,  -421,    92,    92,
      92,  -477,   612,   436,    92,    92,   -87,   446,    92,   459,
     397,   858,   451,   452,   455,    92,   463,   -77,   209,   466,
     760,   662,   467,   661,   705,   702,   209,   209,   668,   -79,
     427,   671,   673,  -426,   537,    92,    92,    92,  -483,   677,
     -84,   697,   484,   209,  -428,    74,   209,    92,  -427,  -418,
     233,   398,   877,   399,   573,   574,   314,    74,   450,   203,
     391,   209,   686,   -76,   233,    74,   578,    74,   834,   591,
     696,   384,   548,   428,   836,   209,  -426,  -483,   681,  -483,
     450,  -483,   233,   447,  -421,  -479,   233,  -428,   209,   774,
     233,  -427,  -418,    92,   371,    92,   678,   480,   233,   451,
     452,   457,    74,   335,   336,   337,   338,   339,   187,   187,
    -429,   604,   741,   551,   603,   552,   553,   554,   555,   609,
     613,   451,   452,   460,   448,   209,   449,  -421,   286,   287,
     223,   233,   464,   754,   755,   757,   758,   372,   622,   810,
     762,   764,  -274,   -64,   -72,   626,   812,  -282,   631,   633,
     647,  -429,  -283,  -429,   556,   557,   -72,   721,  -262,   233,
     655,   860,   656,   733,   109,   663,   551,   683,   552,   553,
     554,   555,   680,   558,   756,   465,   559,   687,   770,   761,
     763,   690,   692,  -274,   757,  -274,   762,   764,  -282,   695,
    -282,   560,   233,  -283,    92,  -283,   693,   702,   450,   233,
     709,   458,   861,   233,   862,   713,   233,   556,   557,   714,
      92,    92,   805,   716,   720,   269,   273,   230,   209,    74,
     723,   595,   729,   732,   807,   730,   558,   737,   233,   559,
     739,   740,    92,   742,    92,    92,   818,   771,    74,   451,
     452,   775,   772,   784,    92,   744,   745,   788,   746,    92,
     806,   792,    40,    41,   299,   300,   301,   302,   303,   794,
     791,   808,   813,   814,  -263,   841,   842,   823,   851,   818,
     824,   233,   846,   848,   852,   817,   853,   844,   854,   209,
     233,   856,   859,   872,   874,   233,   882,   884,    92,    92,
      92,    92,    92,    92,    92,    92,   887,   109,    92,   209,
      92,   894,   895,    92,   312,   209,   881,   114,   347,   750,
     189,   880,   206,   206,   206,   348,   684,   828,   776,   724,
      74,   777,   233,   298,   233,     0,     0,     0,   225,   248,
     731,    92,     0,     0,     0,     0,   209,   233,     0,    92,
      92,   209,   209,   869,   233,     0,   233,     0,     0,     0,
     263,     0,     0,     0,     0,     0,    92,     0,    92,    92,
     233,     0,     0,     0,     0,   233,     0,     0,     0,     0,
      92,     0,     0,     0,    92,     0,     0,     0,    92,    74,
      92,    59,   209,     0,     0,     0,     0,     0,    92,     0,
       0,     0,     0,     0,    74,    74,    74,   518,     0,     0,
       0,    92,   265,     0,     0,   406,   406,   355,    88,    88,
     111,   111,   111,   418,     0,    92,     0,     0,     0,     0,
     227,     0,     0,     0,   314,   260,     0,     0,    74,     0,
       0,     0,   800,   314,     0,   802,   803,   209,    92,   327,
     328,     0,   314,    74,    74,     0,    74,     0,   327,   328,
       0,     0,    88,     0,     0,     0,   277,   327,   328,     0,
       0,   831,     0,     0,     0,    74,     0,     0,   332,   333,
     334,   335,   336,   337,   338,   339,   277,     0,     0,   334,
     335,   336,   337,   338,   339,   260,     0,     0,     0,   335,
     336,   337,   338,   339,     0,     0,     0,     0,    74,     0,
       0,     0,     0,     0,     0,    74,     0,     0,     0,   269,
       0,    74,    88,    74,     0,     0,   847,   849,     0,     0,
      74,     0,     0,     0,   206,   206,     0,     0,     0,     0,
       0,    92,    92,     0,   269,     0,     0,     0,   209,     0,
       0,     0,     0,     0,   576,     0,    91,    91,   112,   112,
       0,    92,   269,     0,   866,   867,     0,     0,   228,     0,
     871,     0,     0,     0,     0,     0,   269,     0,     0,   406,
       0,     0,     0,     0,     0,     0,    71,    71,     0,   885,
       0,     0,     0,     0,   406,     0,     0,     0,   224,     0,
      91,     0,    92,   888,   278,     0,   890,     0,     0,     0,
       0,   892,     0,   206,   206,   206,   206,     0,   474,   475,
       0,    88,    92,     0,   278,     0,   269,     0,    92,     0,
      71,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,    92,   426,     0,     0,     0,     0,   260,
       0,     0,     0,     0,   653,     0,     0,     0,     0,    92,
      91,     0,     0,     0,    92,    92,     0,     0,     0,     0,
       0,    88,     0,     0,     0,     0,    88,     0,     0,     0,
       0,     0,     0,   550,     0,     0,    90,    90,     0,     0,
      71,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     260,     0,    92,     0,   669,    92,     0,   669,   669,   653,
     653,     0,     0,     0,     0,    88,     0,    92,    92,    92,
      88,     0,     0,     0,     0,   263,   669,    88,   277,     0,
      90,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,   689,     0,   689,     0,   689,     0,     0,     0,
       0,    92,   701,   704,     0,   704,     0,     0,     0,    91,
      92,     0,     0,   704,     0,     0,    92,    92,     0,    92,
     577,     0,     0,     0,     0,     0,     0,     0,   585,     0,
     587,     0,     0,     0,     0,    88,     0,   406,    92,    71,
      90,     0,     0,     0,     0,     0,     0,    88,   406,     0,
       0,     0,     0,     0,     0,    88,     0,    88,     0,    91,
       0,     0,     0,     0,    91,   630,     0,     0,     0,     0,
       0,    92,     0,     0,     0,     0,     0,     0,    92,     0,
       0,     0,     0,     0,    92,     0,    92,     0,     0,    71,
       0,     0,    88,    92,    71,     0,     0,     0,     0,     0,
       0,     0,     0,    91,   653,   206,     0,     0,    91,     0,
       0,    92,     0,     0,     0,    91,   278,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,   786,     0,
       0,   790,     0,    71,     0,     0,     0,     0,    71,    90,
       0,     0,     0,     0,     0,    71,     0,     0,     0,     0,
     406,     0,     0,   406,   406,     0,     0,     0,     0,     0,
       0,     0,     0,   669,   669,     0,   206,     0,     0,     0,
       0,     0,     0,    91,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,    91,     0,     0,     0,    90,
       0,     0,   738,    91,    90,    91,     0,     0,     0,     0,
       0,     0,     0,    71,     0,   689,   689,     0,     0,    88,
     689,     0,     0,     0,     0,    71,     0,     0,     0,     0,
       0,     0,     0,    71,   704,    71,     0,     0,    88,     0,
      91,     0,     0,    90,   406,   406,     0,     0,    90,     0,
       0,     0,     0,     0,     0,    90,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      71,     0,     0,     0,     0,     0,     0,     0,     0,   206,
       0,     0,   406,   406,     0,     0,     0,     0,   406,     0,
       0,     0,     0,   743,     0,   689,     0,     0,     0,   269,
       0,   576,   704,     0,     0,     0,     0,   406,     0,     0,
       0,     0,     0,    90,     0,     0,     0,     0,     0,     0,
      88,   406,     0,     0,   406,    90,     0,     0,   227,   406,
       0,     0,     0,    90,     0,    90,     0,     0,     0,     0,
       0,   401,   402,     0,     0,     0,     0,     0,     0,     0,
       0,     0,   787,     0,     0,     0,     0,    91,     0,     0,
       0,     0,     0,     0,     0,     0,     0,   796,   797,   798,
      90,     0,     0,     0,     0,     0,    91,     0,     0,    88,
       0,     0,     0,     0,     0,     0,     0,    71,     0,     0,
       0,     0,     0,     0,    88,    88,    88,     0,     0,     0,
       0,   815,     0,     0,     0,     0,    71,     0,     0,     0,
       0,     0,     0,     0,     0,     0,   819,   820,     0,     0,
     479,     0,     0,     0,     0,   487,     0,     0,    88,     0,
       0,     0,     0,     0,     0,     0,     0,     0,   835,     0,
       0,     0,     0,    88,    88,     0,    88,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,    91,   748,
       0,   832,     0,     0,     0,    88,   228,     0,     0,     0,
       0,   855,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,   863,     0,   864,    90,    71,     0,
       0,     0,     0,   865,     0,     0,   224,     0,    88,     0,
       0,     0,     0,   487,     0,    88,    90,     0,     0,     0,
       0,    88,     0,    88,     0,   605,   607,    91,     0,   611,
      88,     0,     0,   616,     0,     0,     0,     0,     0,     0,
       0,     0,    91,    91,    91,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,    71,     0,   637,
       0,     0,   611,     0,   637,     0,     0,     0,     0,     0,
       0,     0,    71,    71,    71,     0,    91,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,    91,    91,     0,    91,     0,     0,     0,    90,   654,
       0,     0,     0,     0,     0,     0,    71,     0,     0,   833,
       0,     0,     0,    91,     0,     0,     0,     0,     0,     0,
       0,    71,    71,     0,    71,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,   830,
       0,     0,     0,    71,     0,     0,    91,     0,     0,     0,
       0,     0,     0,    91,     0,     0,     0,    90,     0,    91,
       0,    91,     0,     0,     0,     0,     0,     0,    91,     0,
       0,     0,    90,    90,    90,     0,    71,     0,     0,     0,
       0,     0,     0,    71,     0,     0,     0,     0,     0,    71,
       0,    71,     0,     0,     0,     0,   698,     0,    71,     0,
       0,     0,     0,     0,     0,     0,    90,     0,     0,     0,
     715,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,    90,    90,     0,    90,  -499,     0,     0,   722,     0,
       0,     0,   725,  -499,  -499,  -499,   726,     0,  -499,  -499,
    -499,     0,  -499,    90,   607,     0,     0,     0,     0,     0,
       0,     0,  -499,     0,     0,     0,     0,     0,     0,     0,
       0,  -499,  -499,     0,  -499,  -499,  -499,  -499,  -499,   314,
  -32768,-32768,-32768,-32768,   319,   320,    90,   753,-32768,-32768,
       0,     0,     0,    90,   327,   328,     0,     0,     0,    90,
       0,    90,     0,     0,     0,     0,     0,     0,    90,     0,
       0,     0,     0,     0,     0,   773,  -499,     0,     0,     0,
       0,   330,   331,   332,   333,   334,   335,   336,   337,   338,
     339,     0,     0,     0,     0,     0,  -281,     0,     0,     0,
    -499,     0,     0,     0,  -281,  -281,  -281,     0,   637,     0,
    -281,  -281,     0,  -281,     0,   611,  -499,     0,     0,  -499,
    -499,     0,   611,   245,     0,  -499,  -499,     0,     0,     0,
       0,     0,  -281,  -281,     0,  -281,  -281,  -281,  -281,  -281,
       0,     0,     0,     0,   816,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
    -281,  -281,  -281,  -281,  -281,  -281,  -281,  -281,  -281,  -281,
    -281,  -281,  -281,     0,     0,  -281,  -281,  -281,     0,   660,
       0,     0,     0,     0,     0,     0,     0,   837,     0,     0,
       0,     0,     0,     0,     0,     0,   845,     0,     0,   -88,
    -281,   850,  -281,  -281,  -281,  -281,  -281,  -281,  -281,  -281,
    -281,  -281,     0,     0,     0,     0,     0,  -281,  -281,     0,
    -281,  -281,   -80,     0,     0,     0,  -281,  -281,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,   607,     0,
     611,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     883,     0,   886,     0,     0,     0,  -499,     2,     0,     3,
       4,     5,     6,     7,     0,     0,   611,     8,     9,     0,
       0,   891,    10,     0,    11,    12,    13,    14,    15,    16,
      17,     0,     0,     0,     0,    18,    19,    20,    21,    22,
      23,    24,     0,     0,    25,     0,     0,     0,     0,     0,
      26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
      36,    37,    38,    39,     0,    40,    41,     0,    42,    43,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,    44,     0,
       0,    45,    46,     0,    47,    48,     0,    49,     0,    50,
      51,    52,    53,    54,    55,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,  -483,     0,     0,
       0,     0,    56,    57,    58,  -483,  -483,  -483,     0,     0,
       0,  -483,  -483,     0,  -483,     0,  -499,  -499,     0,     0,
     657,     0,     0,  -483,     0,     0,     0,     0,     0,     0,
       0,     0,     0,  -483,  -483,     0,  -483,  -483,  -483,  -483,
    -483,   314,   315,   316,   317,   318,   319,   320,   321,   322,
     323,   324,   325,   326,     0,     0,   327,   328,     0,     0,
       0,  -483,  -483,  -483,  -483,  -483,  -483,  -483,  -483,  -483,
    -483,  -483,  -483,  -483,     0,     0,  -483,  -483,  -483,     0,
     659,   329,     0,   330,   331,   332,   333,   334,   335,   336,
     337,   338,   339,     0,     0,     0,     0,     0,     0,     0,
     -86,  -483,     0,  -483,  -483,  -483,  -483,  -483,  -483,  -483,
    -483,  -483,  -483,     0,     0,     0,     0,  -483,  -483,  -483,
       0,  -483,  -483,   -78,     0,     0,     0,  -483,  -483,     2,
       0,     3,     4,     5,     6,     7,  -499,  -499,  -499,     8,
       9,     0,     0,  -499,    10,     0,    11,    12,    13,    14,
      15,    16,    17,     0,     0,     0,     0,    18,    19,    20,
      21,    22,    23,    24,     0,     0,    25,     0,     0,     0,
       0,     0,    26,    27,    28,    29,    30,    31,    32,    33,
      34,    35,    36,    37,    38,    39,     0,    40,    41,     0,
      42,    43,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      44,     0,     0,    45,    46,     0,    47,    48,     0,    49,
       0,    50,    51,    52,    53,    54,    55,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,    56,    57,    58,     0,     0,     0,
       0,     2,     0,     3,     4,     5,     6,     7,  -499,  -499,
    -499,     8,     9,     0,  -499,  -499,    10,     0,    11,    12,
      13,    14,    15,    16,    17,     0,     0,     0,     0,    18,
      19,    20,    21,    22,    23,    24,     0,     0,    25,     0,
       0,     0,     0,     0,    26,    27,    28,    29,    30,    31,
      32,    33,    34,    35,    36,    37,    38,    39,     0,    40,
      41,     0,    42,    43,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,    44,     0,     0,    45,    46,     0,    47,    48,
       0,    49,     0,    50,    51,    52,    53,    54,    55,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,    56,    57,    58,     0,
       0,     0,     0,     2,     0,     3,     4,     5,     6,     7,
    -499,  -499,  -499,     8,     9,     0,     0,  -499,    10,  -499,
      11,    12,    13,    14,    15,    16,    17,     0,     0,     0,
       0,    18,    19,    20,    21,    22,    23,    24,     0,     0,
      25,     0,     0,     0,     0,     0,    26,    27,    28,    29,
      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
       0,    40,    41,     0,    42,    43,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,    44,     0,     0,    45,    46,     0,
      47,    48,     0,    49,     0,    50,    51,    52,    53,    54,
      55,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,    56,    57,
      58,     0,     0,     0,     0,     2,     0,     3,     4,     5,
       6,     7,  -499,  -499,  -499,     8,     9,     0,     0,  -499,
      10,     0,    11,    12,    13,    14,    15,    16,    17,     0,
       0,     0,     0,    18,    19,    20,    21,    22,    23,    24,
       0,     0,    25,     0,     0,     0,     0,     0,    26,    27,
      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
      38,    39,     0,    40,    41,     0,    42,    43,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,    44,     0,     0,    45,
      46,     0,    47,    48,     0,    49,     0,    50,    51,    52,
      53,    54,    55,     0,     0,     0,     0,     0,     2,     0,
       3,     4,     5,     6,     7,     0,  -499,  -499,     8,     9,
      56,    57,    58,    10,     0,    11,    12,    13,    14,    15,
      16,    17,     0,     0,  -499,  -499,    18,    19,    20,    21,
      22,    23,    24,     0,     0,    25,     0,     0,     0,     0,
       0,    26,    27,    28,    29,    30,    31,    32,    33,    34,
      35,    36,    37,    38,    39,     0,    40,    41,     0,    42,
      43,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,    44,
       0,     0,    45,    46,     0,    47,    48,     0,    49,     0,
      50,    51,    52,    53,    54,    55,     0,     0,     0,     0,
       0,     2,     0,     3,     4,     5,     6,     7,     0,     0,
       0,     8,     9,    56,    57,    58,    10,     0,    11,    12,
      13,    14,    15,    16,    17,     0,     0,  -499,  -499,    18,
      19,    20,    21,    22,    23,    24,     0,     0,    25,     0,
       0,     0,     0,     0,    26,    27,    28,    29,    30,    31,
      32,    33,    34,    35,    36,    37,    38,    39,     0,    40,
      41,     0,    42,    43,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,    44,     0,     0,   259,    46,     0,    47,    48,
       0,    49,     0,    50,    51,    52,    53,    54,    55,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,    56,    57,    58,     0,
       0,     0,     0,     0,     0,  -499,     0,     0,     0,     0,
    -499,  -499,     2,     0,     3,     4,     5,     6,     7,     0,
       0,     0,     8,     9,     0,     0,     0,    10,     0,    11,
      12,    13,    14,    15,    16,    17,     0,     0,     0,     0,
      18,    19,    20,    21,    22,    23,    24,     0,     0,    25,
       0,     0,     0,     0,     0,    26,    27,    28,    29,    30,
      31,    32,    33,    34,    35,    36,    37,    38,    39,     0,
      40,    41,     0,    42,    43,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,    44,     0,     0,    45,    46,     0,    47,
      48,     0,    49,     0,    50,    51,    52,    53,    54,    55,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,    56,    57,    58,
       0,     0,     0,     0,     0,     0,  -499,     0,     0,     0,
       0,  -499,  -499,     2,     0,     3,     4,     5,     6,     7,
       0,     0,     0,     8,     9,     0,     0,     0,    10,     0,
      11,    12,    13,    14,    15,    16,    17,     0,     0,     0,
       0,    18,    19,    20,    21,    22,    23,    24,     0,     0,
      25,     0,     0,     0,     0,     0,    26,    27,    28,    29,
      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
       0,    40,    41,     0,    42,    43,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,    44,     0,     0,    45,    46,     0,
      47,    48,     0,    49,     0,    50,    51,    52,    53,    54,
      55,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,    56,    57,
      58,     0,     0,  -499,     0,     2,     0,     3,     4,     5,
       6,     7,  -499,  -499,  -499,     8,     9,     0,     0,     0,
      10,     0,    11,    12,    13,    14,    15,    16,    17,     0,
       0,     0,     0,    18,    19,    20,    21,    22,    23,    24,
       0,     0,    25,     0,     0,     0,     0,     0,    26,    27,
      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
      38,    39,     0,    40,    41,     0,    42,    43,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,    44,     0,     0,    45,
      46,     0,    47,    48,     0,    49,     0,    50,    51,    52,
      53,    54,    55,     0,     0,     0,     0,     0,     0,     0,
       3,     4,     5,     6,     7,     0,     0,     0,     8,     9,
      56,    57,    58,    10,     0,    11,    12,    13,    14,    15,
      16,    17,     0,     0,  -499,  -499,    18,    19,    20,    21,
      22,    23,    24,     0,     0,    25,     0,     0,     0,     0,
       0,    26,    27,    28,    29,    30,    31,    32,    33,    34,
      35,    36,    37,    38,    39,     0,    40,    41,     0,    42,
      43,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,    44,
       0,     0,    45,    46,     0,    47,    48,     0,    49,     0,
      50,    51,    52,    53,    54,    55,     0,     0,     0,     0,
       0,     0,     0,     3,     4,     5,     0,     7,     0,     0,
       0,     8,     9,    56,    57,    58,    10,     0,    11,    12,
      13,    14,    15,    16,    17,     0,     0,     0,   393,    18,
      19,    20,    21,    22,    23,    24,     0,     0,    25,     0,
       0,     0,     0,     0,     0,    27,     0,     0,    30,    31,
      32,    33,    34,    35,    36,    37,    38,    39,     0,    40,
      41,     0,    42,    43,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,   205,     0,     0,   105,    46,     0,    47,    48,
       0,     0,     0,    50,    51,    52,    53,    54,    55,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,    56,    57,    58,     0,
       0,     0,   115,   116,   117,   118,   119,   120,   121,   122,
     214,   215,   123,   124,   125,   126,   127,     0,     0,   128,
     129,   130,   131,   132,   133,   134,     0,     0,   135,   136,
     137,   138,   139,   140,   141,   142,   143,   144,   145,   146,
     147,   148,   149,   150,   151,   152,   153,   154,   155,   156,
     157,    34,    35,   158,    37,     0,     0,     0,     0,     0,
       0,   159,   160,   161,   162,   163,   164,     0,   165,   166,
       0,     0,   167,     0,     0,     0,   168,   169,   170,   171,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     172,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,   173,   174,   175,   176,   177,
     178,   179,   180,   181,   182,     0,     0,   183,     0,     0,
    -476,  -476,  -476,     0,  -476,     0,   184,   185,  -476,  -476,
       0,     0,     0,  -476,     0,  -476,  -476,  -476,  -476,  -476,
    -476,  -476,     0,  -476,     0,     0,  -476,  -476,  -476,  -476,
    -476,  -476,  -476,     0,     0,     0,     0,     0,     0,     0,
       0,     0,  -476,     0,     0,  -476,  -476,  -476,  -476,  -476,
    -476,  -476,  -476,  -476,  -476,     0,  -476,  -476,     0,  -476,
    -476,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,  -476,
       0,     0,  -476,  -476,     0,  -476,  -476,     0,  -476,  -476,
    -476,  -476,  -476,  -476,  -476,  -476,     0,     0,     0,     0,
       0,     0,     0,  -478,  -478,  -478,     0,  -478,     0,     0,
       0,  -478,  -478,  -476,  -476,  -476,  -478,  -476,  -478,  -478,
    -478,  -478,  -478,  -478,  -478,  -476,  -478,     0,     0,  -478,
    -478,  -478,  -478,  -478,  -478,  -478,     0,     0,     0,     0,
       0,     0,     0,     0,     0,  -478,     0,     0,  -478,  -478,
    -478,  -478,  -478,  -478,  -478,  -478,  -478,  -478,     0,  -478,
    -478,     0,  -478,  -478,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,  -478,     0,     0,  -478,  -478,     0,  -478,  -478,
       0,  -478,  -478,  -478,  -478,  -478,  -478,  -478,  -478,     0,
       0,     0,     0,     0,     0,     0,  -477,  -477,  -477,     0,
    -477,     0,     0,     0,  -477,  -477,  -478,  -478,  -478,  -477,
    -478,  -477,  -477,  -477,  -477,  -477,  -477,  -477,  -478,  -477,
       0,     0,  -477,  -477,  -477,  -477,  -477,  -477,  -477,     0,
       0,     0,     0,     0,     0,     0,     0,     0,  -477,     0,
       0,  -477,  -477,  -477,  -477,  -477,  -477,  -477,  -477,  -477,
    -477,     0,  -477,  -477,     0,  -477,  -477,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,  -477,     0,     0,  -477,  -477,
       0,  -477,  -477,     0,  -477,  -477,  -477,  -477,  -477,  -477,
    -477,  -477,     0,     0,     0,     0,     0,     0,     0,  -479,
    -479,  -479,     0,  -479,     0,     0,     0,  -479,  -479,  -477,
    -477,  -477,  -479,  -477,  -479,  -479,  -479,  -479,  -479,  -479,
    -479,  -477,     0,     0,     0,  -479,  -479,  -479,  -479,  -479,
    -479,  -479,     0,     0,     0,     0,     0,     0,     0,     0,
       0,  -479,     0,     0,  -479,  -479,  -479,  -479,  -479,  -479,
    -479,  -479,  -479,  -479,     0,  -479,  -479,     0,  -479,  -479,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,  -479,   708,
       0,  -479,  -479,     0,  -479,  -479,     0,  -479,  -479,  -479,
    -479,  -479,  -479,  -479,  -479,     0,     0,     0,     0,   -86,
       0,     0,  -480,  -480,  -480,     0,  -480,     0,     0,     0,
    -480,  -480,  -479,  -479,  -479,  -480,     0,  -480,  -480,  -480,
    -480,  -480,  -480,  -480,  -479,     0,     0,     0,  -480,  -480,
    -480,  -480,  -480,  -480,  -480,     0,     0,     0,     0,     0,
       0,     0,     0,     0,  -480,     0,     0,  -480,  -480,  -480,
    -480,  -480,  -480,  -480,  -480,  -480,  -480,     0,  -480,  -480,
       0,  -480,  -480,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,  -480,   660,     0,  -480,  -480,     0,  -480,  -480,     0,
    -480,  -480,  -480,  -480,  -480,  -480,  -480,  -480,     0,     0,
       0,     0,   -88,     0,     0,  -252,  -252,  -252,     0,  -252,
       0,     0,     0,  -252,  -252,  -480,  -480,  -480,  -252,     0,
    -252,  -252,  -252,  -252,  -252,  -252,  -252,  -480,     0,     0,
       0,  -252,  -252,  -252,  -252,  -252,  -252,  -252,     0,     0,
       0,     0,     0,     0,     0,     0,     0,  -252,     0,     0,
    -252,  -252,  -252,  -252,  -252,  -252,  -252,  -252,  -252,  -252,
       0,  -252,  -252,     0,  -252,  -252,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,  -252,     0,     0,  -252,  -252,     0,
    -252,  -252,     0,  -252,  -252,  -252,  -252,  -252,  -252,  -252,
    -252,     0,     0,     0,     0,     0,     0,     0,  -252,  -252,
    -252,     0,  -252,     0,     0,     0,  -252,  -252,  -252,  -252,
    -252,  -252,     0,  -252,  -252,  -252,  -252,  -252,  -252,  -252,
     242,     0,     0,     0,  -252,  -252,  -252,  -252,  -252,  -252,
    -252,     0,     0,     0,     0,     0,     0,     0,     0,     0,
    -252,     0,     0,  -252,  -252,  -252,  -252,  -252,  -252,  -252,
    -252,  -252,  -252,     0,  -252,  -252,     0,  -252,  -252,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,  -252,     0,     0,
    -252,  -252,     0,  -252,  -252,     0,  -252,  -252,  -252,  -252,
    -252,  -252,  -252,  -252,     0,     0,     0,     0,     0,     0,
       0,  -481,  -481,  -481,     0,  -481,     0,     0,     0,  -481,
    -481,  -252,  -252,  -252,  -481,     0,  -481,  -481,  -481,  -481,
    -481,  -481,  -481,   245,     0,     0,     0,  -481,  -481,  -481,
    -481,  -481,  -481,  -481,     0,     0,     0,     0,     0,     0,
       0,     0,     0,  -481,     0,     0,  -481,  -481,  -481,  -481,
    -481,  -481,  -481,  -481,  -481,  -481,     0,  -481,  -481,     0,
    -481,  -481,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
    -481,     0,     0,  -481,  -481,     0,  -481,  -481,     0,  -481,
    -481,  -481,  -481,  -481,  -481,  -481,  -481,     0,     0,     0,
       0,     0,     0,     0,  -482,  -482,  -482,     0,  -482,     0,
       0,     0,  -482,  -482,  -481,  -481,  -481,  -482,     0,  -482,
    -482,  -482,  -482,  -482,  -482,  -482,  -481,     0,     0,     0,
    -482,  -482,  -482,  -482,  -482,  -482,  -482,     0,     0,     0,
       0,     0,     0,     0,     0,     0,  -482,     0,     0,  -482,
    -482,  -482,  -482,  -482,  -482,  -482,  -482,  -482,  -482,     0,
    -482,  -482,     0,  -482,  -482,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,  -482,     0,     0,  -482,  -482,     0,  -482,
    -482,     0,  -482,  -482,  -482,  -482,  -482,  -482,  -482,  -482,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,  -482,  -482,  -482,
     115,   116,   117,   118,   119,   120,   121,   122,     0,  -482,
     123,   124,   125,   126,   127,     0,     0,   128,   129,   130,
     131,   132,   133,   134,     0,     0,   135,   136,   137,   191,
     192,   193,   194,   142,   143,   144,   145,   146,   147,   148,
     149,   150,   151,   152,   153,   195,   196,   197,   157,   279,
     280,   198,   281,     0,     0,     0,     0,     0,     0,   159,
     160,   161,   162,   163,   164,     0,   165,   166,     0,     0,
     167,     0,     0,     0,   168,   169,   170,   171,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,   172,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,   173,   174,   175,   176,   177,   178,   179,
     180,   181,   182,     0,     0,   183,   115,   116,   117,   118,
     119,   120,   121,   122,   184,     0,   123,   124,   125,   126,
     127,     0,     0,   128,   129,   130,   131,   132,   133,   134,
       0,     0,   135,   136,   137,   191,   192,   193,   194,   142,
     143,   144,   145,   146,   147,   148,   149,   150,   151,   152,
     153,   195,   196,   197,   157,   249,     0,   198,     0,     0,
       0,     0,     0,     0,     0,   159,   160,   161,   162,   163,
     164,     0,   165,   166,     0,     0,   167,     0,     0,     0,
     168,   169,   170,   171,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,   172,     0,   199,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,   173,
     174,   175,   176,   177,   178,   179,   180,   181,   182,     0,
       0,   183,   115,   116,   117,   118,   119,   120,   121,   122,
     184,     0,   123,   124,   125,   126,   127,     0,     0,   128,
     129,   130,   131,   132,   133,   134,     0,     0,   135,   136,
     137,   191,   192,   193,   194,   142,   143,   144,   145,   146,
     147,   148,   149,   150,   151,   152,   153,   195,   196,   197,
     157,     0,     0,   198,     0,     0,     0,     0,     0,     0,
       0,   159,   160,   161,   162,   163,   164,     0,   165,   166,
       0,     0,   167,     0,     0,     0,   168,   169,   170,   171,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     172,     0,   199,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,   173,   174,   175,   176,   177,
     178,   179,   180,   181,   182,     0,     0,   183,   115,   116,
     117,   118,   119,   120,   121,   122,   184,     0,   123,   124,
     125,   126,   127,     0,     0,   128,   129,   130,   131,   132,
     133,   134,     0,     0,   135,   136,   137,   191,   192,   193,
     194,   142,   143,   144,   145,   146,   147,   148,   149,   150,
     151,   152,   153,   195,   196,   197,   157,     0,     0,   198,
       0,     0,     0,     0,     0,     0,     0,   159,   160,   161,
     162,   163,   164,     0,   165,   166,     0,     0,   167,     0,
       0,     0,   168,   169,   170,   171,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,   172,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,   173,   174,   175,   176,   177,   178,   179,   180,   181,
     182,     0,     0,   183,     0,     3,     4,     5,     0,     7,
       0,     0,   184,     8,     9,     0,     0,     0,    10,     0,
      11,    12,    13,    95,    96,    16,    17,     0,     0,     0,
       0,    97,    19,    20,    21,    22,    23,    24,     0,     0,
       0,     0,     0,     0,     0,     0,     0,    27,     0,     0,
      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
       0,    40,    41,     0,    42,    43,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,   205,     0,     0,   105,    46,     0,
      47,    48,     0,   229,   230,    50,    51,    52,    53,    54,
      55,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     3,     4,     5,     6,     7,    56,   231,
      58,     8,     9,     0,     0,     0,    10,   409,    11,    12,
      13,    14,    15,    16,    17,     0,     0,     0,     0,    18,
      19,    20,    21,    22,    23,    24,     0,     0,    25,     0,
       0,     0,     0,     0,    26,    27,    28,    29,    30,    31,
      32,    33,    34,    35,    36,    37,    38,    39,     0,    40,
      41,     0,    42,    43,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,    44,     0,     0,    45,    46,     0,    47,    48,
       0,    49,     0,    50,    51,    52,    53,    54,    55,     0,
       0,     0,     0,     0,     0,     0,     3,     4,     5,     0,
       7,     0,     0,     0,     8,     9,    56,    57,    58,    10,
       0,    11,    12,    13,    14,    15,    16,    17,     0,     0,
       0,     0,    18,    19,    20,    21,    22,    23,    24,     0,
       0,    25,     0,     0,     0,     0,     0,     0,    27,     0,
       0,    30,    31,    32,    33,    34,    35,    36,    37,    38,
      39,     0,    40,    41,     0,    42,    43,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,   205,     0,     0,   105,    46,
       0,    47,    48,     0,   614,   230,    50,    51,    52,    53,
      54,    55,     0,     0,     0,     0,     0,     0,     0,     3,
       4,     5,     0,     7,     0,     0,     0,     8,     9,    56,
      57,    58,    10,     0,    11,    12,    13,    95,    96,    16,
      17,     0,     0,     0,     0,    97,    19,    20,    21,    22,
      23,    24,     0,     0,     0,     0,     0,     0,     0,     0,
       0,    27,     0,     0,    30,    31,    32,    33,    34,    35,
      36,    37,    38,    39,     0,    40,    41,     0,    42,    43,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,   205,     0,
       0,   105,    46,     0,    47,    48,     0,   229,   230,    50,
      51,    52,    53,    54,    55,     0,     0,     0,     0,     0,
       0,     0,     3,     4,     5,     0,     7,     0,     0,     0,
       8,     9,    56,   231,    58,    10,     0,    11,    12,    13,
      95,    96,    16,    17,     0,     0,     0,     0,    97,    19,
      20,    21,    22,    23,    24,     0,     0,     0,     0,     0,
       0,     0,     0,     0,    27,     0,     0,    30,    31,    32,
      33,    34,    35,    36,    37,    38,    39,     0,    40,    41,
       0,    42,    43,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,   205,     0,     0,   105,   411,     0,    47,    48,     0,
     229,   230,    50,    51,    52,    53,    54,    55,     0,     0,
       0,     0,     0,     0,     0,     3,     4,     5,     0,     7,
       0,     0,     0,     8,     9,    56,   231,    58,    10,     0,
      11,    12,    13,    95,    96,    16,    17,     0,     0,     0,
       0,    97,    98,    99,    21,    22,    23,    24,     0,     0,
       0,     0,     0,     0,     0,     0,     0,    27,     0,     0,
      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
       0,    40,    41,     0,    42,    43,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,   205,     0,     0,   105,    46,     0,
      47,    48,     0,   606,   230,    50,    51,    52,    53,    54,
      55,     0,     0,     0,     0,     0,     0,     0,     3,     4,
       5,     0,     7,     0,     0,     0,     8,     9,    56,   231,
      58,    10,     0,    11,    12,    13,    95,    96,    16,    17,
       0,     0,     0,     0,    97,    98,    99,    21,    22,    23,
      24,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      27,     0,     0,    30,    31,    32,    33,    34,    35,    36,
      37,    38,    39,     0,    40,    41,     0,    42,    43,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,   205,     0,     0,
     105,    46,     0,    47,    48,     0,   610,   230,    50,    51,
      52,    53,    54,    55,     0,     0,     0,     0,     0,     0,
       0,     3,     4,     5,     0,     7,     0,     0,     0,     8,
       9,    56,   231,    58,    10,     0,    11,    12,    13,    95,
      96,    16,    17,     0,     0,     0,     0,    97,    19,    20,
      21,    22,    23,    24,     0,     0,     0,     0,     0,     0,
       0,     0,     0,    27,     0,     0,    30,    31,    32,    33,
      34,    35,    36,    37,    38,    39,     0,    40,    41,     0,
      42,    43,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     205,     0,     0,   105,    46,     0,    47,    48,     0,   606,
     230,    50,    51,    52,    53,    54,    55,     0,     0,     0,
       0,     0,     0,     0,     3,     4,     5,     0,     7,     0,
       0,     0,     8,     9,    56,   231,    58,    10,     0,    11,
      12,    13,    95,    96,    16,    17,     0,     0,     0,     0,
      97,    98,    99,    21,    22,    23,    24,     0,     0,     0,
       0,     0,     0,     0,     0,     0,    27,     0,     0,    30,
      31,    32,    33,    34,    35,    36,    37,    38,    39,     0,
      40,    41,     0,    42,    43,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,   205,     0,     0,   105,    46,     0,    47,
      48,     0,   801,   230,    50,    51,    52,    53,    54,    55,
       0,     0,     0,     0,     0,     0,     0,     3,     4,     5,
       0,     7,     0,     0,     0,     8,     9,    56,   231,    58,
      10,     0,    11,    12,    13,    95,    96,    16,    17,     0,
       0,     0,     0,    97,    98,    99,    21,    22,    23,    24,
       0,     0,     0,     0,     0,     0,     0,     0,     0,    27,
       0,     0,    30,    31,    32,    33,    34,    35,    36,    37,
      38,    39,     0,    40,    41,     0,    42,    43,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,   205,     0,     0,   105,
      46,     0,    47,    48,     0,   804,   230,    50,    51,    52,
      53,    54,    55,     0,     0,     0,     0,     0,     0,     0,
       3,     4,     5,     0,     7,     0,     0,     0,     8,     9,
      56,   231,    58,    10,     0,    11,    12,    13,    95,    96,
      16,    17,     0,     0,     0,     0,    97,    98,    99,    21,
      22,    23,    24,     0,     0,     0,     0,     0,     0,     0,
       0,     0,    27,     0,     0,    30,    31,    32,    33,    34,
      35,    36,    37,    38,    39,     0,    40,    41,     0,    42,
      43,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,   205,
       0,     0,   105,    46,     0,    47,    48,     0,   809,   230,
      50,    51,    52,    53,    54,    55,     0,     0,     0,     0,
       0,     0,     0,     3,     4,     5,     0,     7,     0,     0,
       0,     8,     9,    56,   231,    58,    10,     0,    11,    12,
      13,    95,    96,    16,    17,     0,     0,     0,     0,    97,
      98,    99,    21,    22,    23,    24,     0,     0,     0,     0,
       0,     0,     0,     0,     0,    27,     0,     0,    30,    31,
      32,    33,    34,    35,    36,    37,    38,    39,     0,    40,
      41,     0,    42,    43,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,   205,     0,     0,   105,    46,     0,    47,    48,
       0,   868,   230,    50,    51,    52,    53,    54,    55,     0,
       0,     0,     0,     0,     0,     0,     3,     4,     5,     0,
       7,     0,     0,     0,     8,     9,    56,   231,    58,    10,
       0,    11,    12,    13,    95,    96,    16,    17,     0,     0,
       0,     0,    97,    98,    99,    21,    22,    23,    24,     0,
       0,     0,     0,     0,     0,     0,     0,     0,    27,     0,
       0,    30,    31,    32,    33,    34,    35,    36,    37,    38,
      39,     0,    40,    41,     0,    42,    43,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,   205,     0,     0,   105,    46,
       0,    47,    48,     0,   870,   230,    50,    51,    52,    53,
      54,    55,     0,     0,     0,     0,     0,     0,     0,     3,
       4,     5,     0,     7,     0,     0,     0,     8,     9,    56,
     231,    58,    10,     0,    11,    12,    13,    95,    96,    16,
      17,     0,     0,     0,     0,    97,    98,    99,    21,    22,
      23,    24,     0,     0,     0,     0,     0,     0,     0,     0,
       0,    27,     0,     0,    30,    31,    32,    33,    34,    35,
      36,    37,    38,    39,     0,    40,    41,     0,    42,    43,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,   205,     0,
       0,   105,    46,     0,    47,    48,     0,   889,   230,    50,
      51,    52,    53,    54,    55,     0,     0,     0,     0,     0,
       0,     0,     3,     4,     5,     0,     7,     0,     0,     0,
       8,     9,    56,   231,    58,    10,     0,    11,    12,    13,
      14,    15,    16,    17,     0,     0,     0,     0,    18,    19,
      20,    21,    22,    23,    24,     0,     0,    25,     0,     0,
       0,     0,     0,     0,    27,     0,     0,    30,    31,    32,
      33,    34,    35,    36,    37,    38,    39,     0,    40,    41,
       0,    42,    43,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,   205,     0,     0,   105,    46,     0,    47,    48,     0,
       0,     0,    50,    51,    52,    53,    54,    55,     0,     0,
       0,     0,     0,     0,     0,     3,     4,     5,     0,     7,
       0,     0,     0,     8,     9,    56,    57,    58,    10,     0,
      11,    12,    13,    95,    96,    16,    17,     0,     0,     0,
       0,    97,    19,    20,    21,    22,    23,    24,     0,     0,
       0,     0,     0,     0,     0,     0,     0,    27,     0,     0,
      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
       0,    40,    41,     0,    42,    43,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,   205,     0,     0,   105,    46,     0,
      47,    48,     0,   264,     0,    50,    51,    52,    53,    54,
      55,     0,     0,     0,     0,     0,     0,     0,     3,     4,
       5,     0,     7,     0,     0,     0,     8,     9,    56,   231,
      58,    10,     0,    11,    12,    13,    14,    15,    16,    17,
       0,     0,     0,     0,    18,    19,    20,    21,    22,    23,
      24,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      27,     0,     0,    30,    31,    32,    33,    34,    35,    36,
      37,    38,    39,     0,    40,    41,     0,    42,    43,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,   205,     0,     0,
     105,    46,     0,    47,    48,     0,   477,     0,    50,    51,
      52,    53,    54,    55,     0,     0,     0,     0,     0,     0,
       0,     3,     4,     5,     0,     7,     0,     0,     0,     8,
       9,    56,   231,    58,    10,     0,    11,    12,    13,    95,
      96,    16,    17,     0,     0,     0,     0,    97,    98,    99,
      21,    22,    23,    24,     0,     0,     0,     0,     0,     0,
       0,     0,     0,    27,     0,     0,    30,    31,    32,    33,
      34,    35,    36,    37,    38,    39,     0,    40,    41,     0,
      42,    43,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     205,     0,     0,   105,    46,     0,    47,    48,     0,   588,
       0,    50,    51,    52,    53,    54,    55,     0,     0,     0,
       0,     0,     0,     0,     3,     4,     5,     0,     7,     0,
       0,     0,     8,     9,    56,   231,    58,    10,     0,    11,
      12,    13,    95,    96,    16,    17,     0,     0,     0,     0,
      97,    98,    99,    21,    22,    23,    24,     0,     0,     0,
       0,     0,     0,     0,     0,     0,    27,     0,     0,    30,
      31,    32,    33,    34,    35,    36,    37,    38,    39,     0,
      40,    41,     0,    42,    43,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,   205,     0,     0,   105,    46,     0,    47,
      48,     0,   636,     0,    50,    51,    52,    53,    54,    55,
       0,     0,     0,     0,     0,     0,     0,     3,     4,     5,
       0,     7,     0,     0,     0,     8,     9,    56,   231,    58,
      10,     0,    11,    12,    13,    95,    96,    16,    17,     0,
       0,     0,     0,    97,    98,    99,    21,    22,    23,    24,
       0,     0,     0,     0,     0,     0,     0,     0,     0,    27,
       0,     0,    30,    31,    32,    33,    34,    35,    36,    37,
      38,    39,     0,    40,    41,     0,    42,    43,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,   205,     0,     0,   105,
      46,     0,    47,    48,     0,   477,     0,    50,    51,    52,
      53,    54,    55,     0,     0,     0,     0,     0,     0,     0,
       3,     4,     5,     0,     7,     0,     0,     0,     8,     9,
      56,   231,    58,    10,     0,    11,    12,    13,    95,    96,
      16,    17,     0,     0,     0,     0,    97,    98,    99,    21,
      22,    23,    24,     0,     0,     0,     0,     0,     0,     0,
       0,     0,    27,     0,     0,    30,    31,    32,    33,    34,
      35,    36,    37,    38,    39,     0,    40,    41,     0,    42,
      43,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,   205,
       0,     0,   105,    46,     0,    47,    48,     0,   752,     0,
      50,    51,    52,    53,    54,    55,     0,     0,     0,     0,
       0,     0,     0,     3,     4,     5,     0,     7,     0,     0,
       0,     8,     9,    56,   231,    58,    10,     0,    11,    12,
      13,    95,    96,    16,    17,     0,     0,     0,     0,    97,
      98,    99,    21,    22,    23,    24,     0,     0,     0,     0,
       0,     0,     0,     0,     0,    27,     0,     0,    30,    31,
      32,    33,    34,    35,    36,    37,    38,    39,     0,    40,
      41,     0,    42,    43,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,   205,     0,     0,   105,    46,     0,    47,    48,
       0,   795,     0,    50,    51,    52,    53,    54,    55,     0,
       0,     0,     0,     0,     0,     0,     3,     4,     5,     0,
       7,     0,     0,     0,     8,     9,    56,   231,    58,    10,
       0,    11,    12,    13,    95,    96,    16,    17,     0,     0,
       0,     0,    97,    98,    99,    21,    22,    23,    24,     0,
       0,     0,     0,     0,     0,     0,     0,     0,    27,     0,
       0,    30,    31,    32,    33,    34,    35,    36,    37,    38,
      39,     0,    40,    41,     0,    42,    43,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,   205,     0,     0,   105,    46,
       0,    47,    48,     0,     0,     0,    50,    51,    52,    53,
      54,    55,     0,     0,     0,     0,     0,     0,     0,     3,
       4,     5,     0,     7,     0,     0,     0,     8,     9,    56,
     231,    58,    10,     0,    11,    12,    13,    14,    15,    16,
      17,     0,     0,     0,     0,    18,    19,    20,    21,    22,
      23,    24,     0,     0,     0,     0,     0,     0,     0,     0,
       0,    27,     0,     0,    30,    31,    32,    33,    34,    35,
      36,    37,    38,    39,     0,    40,    41,     0,    42,    43,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,   205,     0,
       0,   105,    46,     0,    47,    48,     0,     0,     0,    50,
      51,    52,    53,    54,    55,     0,     0,     0,     0,     0,
       0,     0,     3,     4,     5,     0,     7,     0,     0,     0,
       8,     9,    56,   231,    58,    10,     0,    11,    12,    13,
      95,    96,    16,    17,     0,     0,     0,     0,    97,    98,
      99,    21,    22,    23,    24,     0,     0,     0,     0,     0,
       0,     0,     0,     0,   100,     0,     0,    30,    31,    32,
      33,    34,    35,    36,    37,    38,    39,     0,    40,    41,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,   222,     0,     0,    45,    46,     0,    47,    48,     0,
      49,     0,    50,    51,    52,    53,    54,    55,     0,     0,
       0,     3,     4,     5,     0,     7,     0,   749,     0,     8,
       9,     0,     0,     0,    10,   106,    11,    12,    13,    95,
      96,    16,    17,     0,     0,     0,     0,    97,    98,    99,
      21,    22,    23,    24,     0,     0,     0,     0,     0,     0,
       0,     0,     0,   100,     0,     0,    30,    31,   101,    33,
      34,    35,   102,    37,    38,    39,     0,    40,    41,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,   103,     0,     0,
     104,     0,     0,   105,    46,     0,    47,    48,     0,     0,
       0,    50,    51,    52,    53,    54,    55,     0,     0,     0,
       3,     4,     5,     0,     7,     0,     0,     0,     8,     9,
       0,     0,     0,    10,   106,    11,    12,    13,    95,    96,
      16,    17,     0,     0,     0,     0,    97,    98,    99,    21,
      22,    23,    24,     0,     0,     0,     0,     0,     0,     0,
       0,     0,   100,     0,     0,    30,    31,    32,    33,    34,
      35,    36,    37,    38,    39,     0,    40,    41,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,   222,
       0,     0,    45,    46,     0,    47,    48,     0,    49,     0,
      50,    51,    52,    53,    54,    55,     0,     0,     0,     3,
       4,     5,     0,     7,     0,     0,     0,     8,     9,     0,
       0,     0,    10,   106,    11,    12,    13,    95,    96,    16,
      17,     0,     0,     0,     0,    97,    98,    99,    21,    22,
      23,    24,     0,     0,     0,     0,     0,     0,     0,     0,
       0,   100,     0,     0,    30,    31,    32,    33,    34,    35,
      36,    37,    38,    39,     0,    40,    41,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,   274,     0,
       0,   310,    46,     0,    47,    48,     0,   311,     0,    50,
      51,    52,    53,    54,    55,     0,     0,     0,     3,     4,
       5,     0,     7,     0,     0,     0,     8,     9,     0,     0,
       0,    10,   106,    11,    12,    13,    95,    96,    16,    17,
       0,     0,     0,     0,    97,    98,    99,    21,    22,    23,
      24,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     100,     0,     0,    30,    31,   101,    33,    34,    35,   102,
      37,    38,    39,     0,    40,    41,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,   104,     0,     0,
     105,    46,     0,    47,    48,     0,     0,     0,    50,    51,
      52,    53,    54,    55,     0,     0,     0,     3,     4,     5,
       0,     7,     0,     0,     0,     8,     9,     0,     0,     0,
      10,   106,    11,    12,    13,    95,    96,    16,    17,     0,
       0,     0,     0,    97,    98,    99,    21,    22,    23,    24,
       0,     0,     0,     0,     0,     0,     0,     0,     0,   100,
       0,     0,    30,    31,    32,    33,    34,    35,    36,    37,
      38,    39,     0,    40,    41,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,   274,     0,     0,   105,
      46,     0,    47,    48,     0,     0,     0,    50,    51,    52,
      53,    54,    55,     0,     0,     0,     3,     4,     5,     0,
       7,     0,     0,     0,     8,     9,     0,     0,     0,    10,
     106,    11,    12,    13,    95,    96,    16,    17,     0,     0,
       0,     0,    97,    98,    99,    21,    22,    23,    24,     0,
       0,     0,     0,   657,     0,     0,     0,     0,   100,     0,
       0,    30,    31,    32,    33,    34,    35,    36,    37,    38,
      39,     0,    40,    41,   314,   315,   316,   317,   318,   319,
     320,   321,   322,   323,   324,   325,   326,     0,     0,   327,
     328,     0,     0,     0,     0,   829,     0,     0,   105,    46,
       0,    47,    48,     0,     0,     0,    50,    51,    52,    53,
      54,    55,     0,     0,   329,     0,   330,   331,   332,   333,
     334,   335,   336,   337,   338,   339,   515,   516,     0,   106,
     517,     0,     0,     0,     0,     0,  -218,     0,   159,   160,
     161,   162,   163,   164,     0,   165,   166,     0,     0,   167,
       0,     0,     0,   168,   169,   170,   171,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,   172,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,   173,   174,   175,   176,   177,   178,   179,   180,
     181,   182,   522,   523,   183,     0,   524,     0,     0,     0,
       0,     0,     0,   184,   159,   160,   161,   162,   163,   164,
       0,   165,   166,     0,     0,   167,     0,     0,     0,   168,
     169,   170,   171,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,   172,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,   173,   174,
     175,   176,   177,   178,   179,   180,   181,   182,   527,   523,
     183,     0,   528,     0,     0,     0,     0,     0,     0,   184,
     159,   160,   161,   162,   163,   164,     0,   165,   166,     0,
       0,   167,     0,     0,     0,   168,   169,   170,   171,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,   172,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,   173,   174,   175,   176,   177,   178,
     179,   180,   181,   182,   543,   516,   183,     0,   544,     0,
       0,     0,     0,     0,     0,   184,   159,   160,   161,   162,
     163,   164,     0,   165,   166,     0,     0,   167,     0,     0,
       0,   168,   169,   170,   171,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,   172,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     173,   174,   175,   176,   177,   178,   179,   180,   181,   182,
     580,   516,   183,     0,   581,     0,     0,     0,     0,     0,
       0,   184,   159,   160,   161,   162,   163,   164,     0,   165,
     166,     0,     0,   167,     0,     0,     0,   168,   169,   170,
     171,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,   172,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,   173,   174,   175,   176,
     177,   178,   179,   180,   181,   182,   583,   523,   183,     0,
     584,     0,     0,     0,     0,     0,     0,   184,   159,   160,
     161,   162,   163,   164,     0,   165,   166,     0,     0,   167,
       0,     0,     0,   168,   169,   170,   171,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,   172,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,   173,   174,   175,   176,   177,   178,   179,   180,
     181,   182,   597,   516,   183,     0,   598,     0,     0,     0,
       0,     0,     0,   184,   159,   160,   161,   162,   163,   164,
       0,   165,   166,     0,     0,   167,     0,     0,     0,   168,
     169,   170,   171,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,   172,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,   173,   174,
     175,   176,   177,   178,   179,   180,   181,   182,   600,   523,
     183,     0,   601,     0,     0,     0,     0,     0,     0,   184,
     159,   160,   161,   162,   163,   164,     0,   165,   166,     0,
       0,   167,     0,     0,     0,   168,   169,   170,   171,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,   172,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,   173,   174,   175,   176,   177,   178,
     179,   180,   181,   182,   638,   516,   183,     0,   639,     0,
       0,     0,     0,     0,     0,   184,   159,   160,   161,   162,
     163,   164,     0,   165,   166,     0,     0,   167,     0,     0,
       0,   168,   169,   170,   171,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,   172,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     173,   174,   175,   176,   177,   178,   179,   180,   181,   182,
     641,   523,   183,     0,   642,     0,     0,     0,     0,     0,
       0,   184,   159,   160,   161,   162,   163,   164,     0,   165,
     166,     0,     0,   167,     0,     0,     0,   168,   169,   170,
     171,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,   172,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,   173,   174,   175,   176,
     177,   178,   179,   180,   181,   182,   875,   516,   183,     0,
     876,     0,     0,     0,     0,     0,     0,   184,   159,   160,
     161,   162,   163,   164,     0,   165,   166,     0,     0,   167,
       0,     0,     0,   168,   169,   170,   171,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,   172,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,   173,   174,   175,   176,   177,   178,   179,   180,
     181,   182,   878,   523,   183,     0,   879,     0,     0,     0,
       0,     0,     0,   184,   159,   160,   161,   162,   163,   164,
       0,   165,   166,     0,     0,   167,     0,     0,     0,   168,
     169,   170,   171,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,   172,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,   173,   174,
     175,   176,   177,   178,   179,   180,   181,   182,     0,     0,
     183,     0,     0,     0,     0,     0,     0,     0,     0,   184,
     314,   315,   316,   317,   318,   319,   320,   321,   322,   323,
     324,   325,   326,     0,     0,   327,   328,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     329,     0,   330,   331,   332,   333,   334,   335,   336,   337,
     338,   339,   314,   315,   316,   317,   318,   319,   320,   321,
     322,   323,   324,   325,   326,     0,   251,   327,   328,     0,
       0,     0,  -218,   314,   315,   316,   317,   318,   319,   320,
     321,   322,   323,   324,   325,   326,     0,     0,   327,   328,
       0,     0,   329,     0,   330,   331,   332,   333,   334,   335,
     336,   337,   338,   339,     0,     0,     0,     0,     0,     0,
       0,     0,     0,   329,  -218,   330,   331,   332,   333,   334,
     335,   336,   337,   338,   339,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,   603,   314,   315,   316,   317,
     318,   319,   320,   321,   322,   323,   324,   325,   326,     0,
       0,   327,   328,   314,   315,   316,   317,   318,   319,   320,
     321,   322,   323,   324,   325,   326,     0,     0,   327,   328,
       0,     0,     0,     0,     0,     0,   329,   658,   330,   331,
     332,   333,   334,   335,   336,   337,   338,   339,     0,     0,
       0,     0,     0,   329,     0,   330,   331,   332,   333,   334,
     335,   336,   337,   338,   339,   314,   315,   316,   317,   318,
     319,   320,   321,   322,   323,   324,-32768,-32768,     0,     0,
     327,   328,   314,   315,   316,   317,   318,   319,   320,   321,
       0,   323,   324,     0,     0,     0,     0,   327,   328,     0,
       0,     0,     0,     0,     0,     0,     0,   330,   331,   332,
     333,   334,   335,   336,   337,   338,   339,     0,     0,     0,
       0,     0,     0,     0,   330,   331,   332,   333,   334,   335,
     336,   337,   338,   339,   314,   315,   316,   317,   318,   319,
     320,     0,     0,   323,   324,     0,     0,     0,     0,   327,
     328,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,   330,   331,   332,   333,
     334,   335,   336,   337,   338,   339
};

static const short yycheck[] =
{
      14,    15,    13,     6,    18,    26,   213,    20,   370,    14,
      15,   245,    49,    18,     5,   100,   395,    60,   389,   313,
      10,    14,    15,    26,   690,    18,     3,     4,    42,    43,
       2,     1,    20,    47,    48,   407,    13,   104,    27,   575,
     531,   532,   341,    57,    58,    26,   285,    14,    15,   585,
     289,    18,     5,     6,   566,    48,   568,   529,   530,    50,
     340,   368,   342,   343,   344,    14,    15,   366,   440,    18,
      60,    25,    49,    26,     9,    10,    13,   687,   259,    92,
     690,    48,    57,    25,    81,   384,    99,   367,    26,    13,
      36,    37,    69,    58,    72,    81,   130,    50,    47,   398,
     113,    84,    64,   383,    92,   385,    54,    13,   120,    25,
      15,   662,    83,    18,    45,    28,   105,   668,   108,   399,
     129,    15,    81,    17,    36,    37,    83,   124,    25,   310,
     108,   129,   103,   130,    99,   100,   122,   107,   124,   120,
      25,   130,   131,   126,    25,   103,   103,   128,   428,   448,
      13,   113,   114,   115,   108,   126,    83,    15,   824,    17,
     130,   131,   126,   122,   129,   124,   108,    50,   105,   449,
      25,    54,   126,   216,   128,    25,   103,    81,    25,   125,
     265,   105,   120,    83,   126,   676,   128,   103,     1,     2,
       3,     4,   108,   130,   131,     8,     9,    10,   560,   105,
      13,    14,    15,   103,   128,    18,   130,   131,   199,   125,
     126,   108,    25,   103,   824,   229,   230,   231,   130,    81,
     124,    94,   461,   108,   130,   131,   216,   108,   242,   126,
     244,   245,    45,    46,    47,   542,    49,   242,    81,   244,
     245,   126,   105,    83,    57,   126,   199,   126,    81,   242,
     264,   244,   245,   108,   561,    92,    69,   128,   108,   128,
     796,   108,   124,   735,   736,   777,   778,   130,   131,    54,
     782,   126,   103,   110,   311,   242,   126,   244,   245,   126,
     574,   124,    56,    57,   126,   220,   221,    83,   130,   122,
     103,   124,   105,   242,   308,   244,   245,   131,   365,   313,
     314,   315,   316,   317,   318,   319,   320,   321,   322,   323,
     324,   325,   326,   327,   328,   329,   330,   331,   332,   333,
     334,   335,   336,   337,   338,   339,   298,   341,   259,    54,
     415,   303,   417,   308,   311,   349,   350,   242,   313,   244,
     245,   308,   721,   623,   624,   857,   313,    25,   433,   434,
     126,   723,   366,    50,   130,    25,    83,    58,   730,   268,
      83,   270,    83,   272,   299,   300,   301,   302,   382,    84,
     384,   361,   386,   387,   349,   350,   103,   391,    52,   310,
     103,    26,   103,   590,   398,    59,    60,   340,   622,   403,
     404,   204,   341,   407,    91,    92,    81,   411,    99,   100,
     101,   422,    83,   126,   394,   395,   411,   220,   221,    26,
     424,   404,   365,   110,    81,   429,   113,   366,   411,   422,
      83,   783,   103,   437,   391,   796,   440,    81,   442,   242,
     383,   244,   245,   103,   448,   384,    81,   122,   108,   124,
     103,   254,   126,   128,   397,   126,   259,   126,   128,   398,
     126,   130,   466,   467,   120,   125,   126,   124,   238,   130,
     131,    64,   769,   477,    81,   550,    36,    37,   122,   422,
     124,    56,    57,   125,   427,   120,   848,   122,   125,   124,
     121,    58,   125,   128,    83,   298,   299,   300,   301,   302,
     303,   304,   305,    26,   447,   308,    83,   310,   311,   448,
     313,     1,     2,   120,   103,   122,   519,   124,     8,     9,
      10,   128,   884,   123,    14,    15,   103,    54,    18,   101,
      81,   828,    99,   100,   101,    25,   101,   126,   341,    64,
      83,   519,    64,   546,    14,    15,   349,   350,   526,   126,
      81,   529,   530,    81,    90,    45,    46,    47,    81,   539,
     103,   572,   126,   366,    81,   368,   369,    57,    81,    81,
     574,   122,   861,   124,    10,     8,    64,   380,    58,   572,
      17,   384,   562,   126,   588,   388,    13,   390,   785,    10,
     571,   122,   862,   124,   791,   398,   124,   120,    10,   122,
      58,   124,   606,    81,    81,   128,   610,   124,   411,   684,
     614,   124,   124,   103,    81,   105,   541,   574,   622,    99,
     100,   101,   425,   111,   112,   113,   114,   115,   571,   572,
      81,   401,   636,    50,   126,    52,    53,    54,    55,   622,
     125,    99,   100,   101,   122,   448,   124,   124,    52,    53,
     651,   655,    58,   657,   658,   659,   660,   124,   126,   734,
     664,   665,    81,   125,   126,   125,   741,    81,   121,   125,
     129,   122,    81,   124,    91,    92,   126,   602,   126,   683,
     126,    81,   125,   622,   651,   123,    50,   103,    52,    53,
      54,    55,   123,   110,   659,   101,   113,   126,   678,   664,
     665,   126,    50,   122,   708,   124,   710,   711,   122,    50,
     124,   128,   716,   122,   204,   124,   126,    15,    58,   723,
     123,    61,   122,   727,   124,    10,   730,    91,    92,    10,
     220,   221,   727,   126,   123,    47,    48,    92,   541,   542,
     126,   721,   125,   125,   727,   126,   110,   125,   752,   113,
     121,   125,   242,   123,   244,   245,   760,    10,   561,    99,
     100,    10,   125,    84,   254,    52,    53,     9,    55,   259,
     727,    10,    59,    60,    39,    40,    41,    42,    43,    10,
     705,   125,   121,   108,   126,    10,    10,   125,   125,   793,
     126,   795,   126,   126,    10,   760,    10,   801,   121,   602,
     804,    10,    54,   121,    10,   809,    10,   126,   298,   299,
     300,   301,   302,   303,   304,   305,   123,   784,   308,   622,
     310,     0,     0,   313,    69,   628,   864,     4,    76,   651,
       5,   863,     8,     9,    10,    79,   560,   783,   687,   609,
     643,   687,   846,    60,   848,    -1,    -1,    -1,   651,    25,
     620,   341,    -1,    -1,    -1,    -1,   659,   861,    -1,   349,
     350,   664,   665,   846,   868,    -1,   870,    -1,    -1,    -1,
      46,    -1,    -1,    -1,    -1,    -1,   366,    -1,   368,   369,
     884,    -1,    -1,    -1,    -1,   889,    -1,    -1,    -1,    -1,
     380,    -1,    -1,    -1,   384,    -1,    -1,    -1,   388,   702,
     390,     1,   705,    -1,    -1,    -1,    -1,    -1,   398,    -1,
      -1,    -1,    -1,    -1,   717,   718,   719,   860,    -1,    -1,
      -1,   411,   861,    -1,    -1,   237,   238,   103,     1,     2,
       3,     4,     5,   245,    -1,   425,    -1,    -1,    -1,    -1,
      13,    -1,    -1,    -1,    64,    45,    -1,    -1,   751,    -1,
      -1,    -1,   722,    64,    -1,   725,   726,   760,   448,    79,
      80,    -1,    64,   766,   767,    -1,   769,    -1,    79,    80,
      -1,    -1,    45,    -1,    -1,    -1,    49,    79,    80,    -1,
      -1,   784,    -1,    -1,    -1,   788,    -1,    -1,   108,   109,
     110,   111,   112,   113,   114,   115,    69,    -1,    -1,   110,
     111,   112,   113,   114,   115,   105,    -1,    -1,    -1,   111,
     112,   113,   114,   115,    -1,    -1,    -1,    -1,   821,    -1,
      -1,    -1,    -1,    -1,    -1,   828,    -1,    -1,    -1,   341,
      -1,   834,   105,   836,    -1,    -1,   806,   807,    -1,    -1,
     843,    -1,    -1,    -1,   220,   221,    -1,    -1,    -1,    -1,
      -1,   541,   542,    -1,   366,    -1,    -1,    -1,   861,    -1,
      -1,    -1,    -1,    -1,   376,    -1,     1,     2,     3,     4,
      -1,   561,   384,    -1,   844,   845,    -1,    -1,    13,    -1,
     850,    -1,    -1,    -1,    -1,    -1,   398,    -1,    -1,   401,
      -1,    -1,    -1,    -1,    -1,    -1,     1,     2,    -1,   869,
      -1,    -1,    -1,    -1,   416,    -1,    -1,    -1,    13,    -1,
      45,    -1,   602,   883,    49,    -1,   886,    -1,    -1,    -1,
      -1,   891,    -1,   299,   300,   301,   302,    -1,   304,   305,
      -1,   204,   622,    -1,    69,    -1,   448,    -1,   628,    -1,
      45,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,   643,   254,    -1,    -1,    -1,    -1,   259,
      -1,    -1,    -1,    -1,   476,    -1,    -1,    -1,    -1,   659,
     105,    -1,    -1,    -1,   664,   665,    -1,    -1,    -1,    -1,
      -1,   254,    -1,    -1,    -1,    -1,   259,    -1,    -1,    -1,
      -1,    -1,    -1,   369,    -1,    -1,     1,     2,    -1,    -1,
     105,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     310,    -1,   702,    -1,   526,   705,    -1,   529,   530,   531,
     532,    -1,    -1,    -1,    -1,   298,    -1,   717,   718,   719,
     303,    -1,    -1,    -1,    -1,   411,   548,   310,   311,    -1,
      45,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,   564,    -1,   566,    -1,   568,    -1,    -1,    -1,
      -1,   751,   574,   575,    -1,   577,    -1,    -1,    -1,   204,
     760,    -1,    -1,   585,    -1,    -1,   766,   767,    -1,   769,
     380,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   388,    -1,
     390,    -1,    -1,    -1,    -1,   368,    -1,   609,   788,   204,
     105,    -1,    -1,    -1,    -1,    -1,    -1,   380,   620,    -1,
      -1,    -1,    -1,    -1,    -1,   388,    -1,   390,    -1,   254,
      -1,    -1,    -1,    -1,   259,   425,    -1,    -1,    -1,    -1,
      -1,   821,    -1,    -1,    -1,    -1,    -1,    -1,   828,    -1,
      -1,    -1,    -1,    -1,   834,    -1,   836,    -1,    -1,   254,
      -1,    -1,   425,   843,   259,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,   298,   676,   541,    -1,    -1,   303,    -1,
      -1,   861,    -1,    -1,    -1,   310,   311,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   700,    -1,
      -1,   703,    -1,   298,    -1,    -1,    -1,    -1,   303,   204,
      -1,    -1,    -1,    -1,    -1,   310,    -1,    -1,    -1,    -1,
     722,    -1,    -1,   725,   726,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,   735,   736,    -1,   602,    -1,    -1,    -1,
      -1,    -1,    -1,   368,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,   380,    -1,    -1,    -1,   254,
      -1,    -1,   628,   388,   259,   390,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,   368,    -1,   777,   778,    -1,    -1,   542,
     782,    -1,    -1,    -1,    -1,   380,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,   388,   796,   390,    -1,    -1,   561,    -1,
     425,    -1,    -1,   298,   806,   807,    -1,    -1,   303,    -1,
      -1,    -1,    -1,    -1,    -1,   310,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     425,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   705,
      -1,    -1,   844,   845,    -1,    -1,    -1,    -1,   850,    -1,
      -1,    -1,    -1,   643,    -1,   857,    -1,    -1,    -1,   861,
      -1,   863,   864,    -1,    -1,    -1,    -1,   869,    -1,    -1,
      -1,    -1,    -1,   368,    -1,    -1,    -1,    -1,    -1,    -1,
     643,   883,    -1,    -1,   886,   380,    -1,    -1,   651,   891,
      -1,    -1,    -1,   388,    -1,   390,    -1,    -1,    -1,    -1,
      -1,   229,   230,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,   702,    -1,    -1,    -1,    -1,   542,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,   717,   718,   719,
     425,    -1,    -1,    -1,    -1,    -1,   561,    -1,    -1,   702,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,   542,    -1,    -1,
      -1,    -1,    -1,    -1,   717,   718,   719,    -1,    -1,    -1,
      -1,   751,    -1,    -1,    -1,    -1,   561,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,   766,   767,    -1,    -1,
     308,    -1,    -1,    -1,    -1,   313,    -1,    -1,   751,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   788,    -1,
      -1,    -1,    -1,   766,   767,    -1,   769,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   643,   644,
      -1,   784,    -1,    -1,    -1,   788,   651,    -1,    -1,    -1,
      -1,   821,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,   834,    -1,   836,   542,   643,    -1,
      -1,    -1,    -1,   843,    -1,    -1,   651,    -1,   821,    -1,
      -1,    -1,    -1,   391,    -1,   828,   561,    -1,    -1,    -1,
      -1,   834,    -1,   836,    -1,   403,   404,   702,    -1,   407,
     843,    -1,    -1,   411,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,   717,   718,   719,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,   702,    -1,   437,
      -1,    -1,   440,    -1,   442,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,   717,   718,   719,    -1,   751,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,   766,   767,    -1,   769,    -1,    -1,    -1,   643,   477,
      -1,    -1,    -1,    -1,    -1,    -1,   751,    -1,    -1,   784,
      -1,    -1,    -1,   788,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,   766,   767,    -1,   769,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   784,
      -1,    -1,    -1,   788,    -1,    -1,   821,    -1,    -1,    -1,
      -1,    -1,    -1,   828,    -1,    -1,    -1,   702,    -1,   834,
      -1,   836,    -1,    -1,    -1,    -1,    -1,    -1,   843,    -1,
      -1,    -1,   717,   718,   719,    -1,   821,    -1,    -1,    -1,
      -1,    -1,    -1,   828,    -1,    -1,    -1,    -1,    -1,   834,
      -1,   836,    -1,    -1,    -1,    -1,   574,    -1,   843,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,   751,    -1,    -1,    -1,
     588,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,   766,   767,    -1,   769,     0,    -1,    -1,   606,    -1,
      -1,    -1,   610,     8,     9,    10,   614,    -1,    13,    14,
      15,    -1,    17,   788,   622,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    27,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    36,    37,    -1,    39,    40,    41,    42,    43,    64,
      65,    66,    67,    68,    69,    70,   821,   655,    73,    74,
      -1,    -1,    -1,   828,    79,    80,    -1,    -1,    -1,   834,
      -1,   836,    -1,    -1,    -1,    -1,    -1,    -1,   843,    -1,
      -1,    -1,    -1,    -1,    -1,   683,    81,    -1,    -1,    -1,
      -1,   106,   107,   108,   109,   110,   111,   112,   113,   114,
     115,    -1,    -1,    -1,    -1,    -1,     0,    -1,    -1,    -1,
     105,    -1,    -1,    -1,     8,     9,    10,    -1,   716,    -1,
      14,    15,    -1,    17,    -1,   723,   121,    -1,    -1,   124,
     125,    -1,   730,   128,    -1,   130,   131,    -1,    -1,    -1,
      -1,    -1,    36,    37,    -1,    39,    40,    41,    42,    43,
      -1,    -1,    -1,    -1,   752,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      64,    65,    66,    67,    68,    69,    70,    71,    72,    73,
      74,    75,    76,    -1,    -1,    79,    80,    81,    -1,    83,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,   795,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,   804,    -1,    -1,   103,
     104,   809,   106,   107,   108,   109,   110,   111,   112,   113,
     114,   115,    -1,    -1,    -1,    -1,    -1,   121,   122,    -1,
     124,   125,   126,    -1,    -1,    -1,   130,   131,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   846,    -1,
     848,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     868,    -1,   870,    -1,    -1,    -1,     0,     1,    -1,     3,
       4,     5,     6,     7,    -1,    -1,   884,    11,    12,    -1,
      -1,   889,    16,    -1,    18,    19,    20,    21,    22,    23,
      24,    -1,    -1,    -1,    -1,    29,    30,    31,    32,    33,
      34,    35,    -1,    -1,    38,    -1,    -1,    -1,    -1,    -1,
      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
      54,    55,    56,    57,    -1,    59,    60,    -1,    62,    63,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    82,    -1,
      -1,    85,    86,    -1,    88,    89,    -1,    91,    -1,    93,
      94,    95,    96,    97,    98,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,     0,    -1,    -1,
      -1,    -1,   116,   117,   118,     8,     9,    10,    -1,    -1,
      -1,    14,    15,    -1,    17,    -1,   130,   131,    -1,    -1,
      43,    -1,    -1,    26,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    36,    37,    -1,    39,    40,    41,    42,
      43,    64,    65,    66,    67,    68,    69,    70,    71,    72,
      73,    74,    75,    76,    -1,    -1,    79,    80,    -1,    -1,
      -1,    64,    65,    66,    67,    68,    69,    70,    71,    72,
      73,    74,    75,    76,    -1,    -1,    79,    80,    81,    -1,
      83,   104,    -1,   106,   107,   108,   109,   110,   111,   112,
     113,   114,   115,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     103,   104,    -1,   106,   107,   108,   109,   110,   111,   112,
     113,   114,   115,    -1,    -1,    -1,    -1,   120,   121,   122,
      -1,   124,   125,   126,    -1,    -1,    -1,   130,   131,     1,
      -1,     3,     4,     5,     6,     7,     8,     9,    10,    11,
      12,    -1,    -1,    15,    16,    -1,    18,    19,    20,    21,
      22,    23,    24,    -1,    -1,    -1,    -1,    29,    30,    31,
      32,    33,    34,    35,    -1,    -1,    38,    -1,    -1,    -1,
      -1,    -1,    44,    45,    46,    47,    48,    49,    50,    51,
      52,    53,    54,    55,    56,    57,    -1,    59,    60,    -1,
      62,    63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      82,    -1,    -1,    85,    86,    -1,    88,    89,    -1,    91,
      -1,    93,    94,    95,    96,    97,    98,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,   116,   117,   118,    -1,    -1,    -1,
      -1,     1,    -1,     3,     4,     5,     6,     7,   130,   131,
      10,    11,    12,    -1,    14,    15,    16,    -1,    18,    19,
      20,    21,    22,    23,    24,    -1,    -1,    -1,    -1,    29,
      30,    31,    32,    33,    34,    35,    -1,    -1,    38,    -1,
      -1,    -1,    -1,    -1,    44,    45,    46,    47,    48,    49,
      50,    51,    52,    53,    54,    55,    56,    57,    -1,    59,
      60,    -1,    62,    63,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    82,    -1,    -1,    85,    86,    -1,    88,    89,
      -1,    91,    -1,    93,    94,    95,    96,    97,    98,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,   116,   117,   118,    -1,
      -1,    -1,    -1,     1,    -1,     3,     4,     5,     6,     7,
     130,   131,    10,    11,    12,    -1,    -1,    15,    16,    17,
      18,    19,    20,    21,    22,    23,    24,    -1,    -1,    -1,
      -1,    29,    30,    31,    32,    33,    34,    35,    -1,    -1,
      38,    -1,    -1,    -1,    -1,    -1,    44,    45,    46,    47,
      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
      -1,    59,    60,    -1,    62,    63,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    82,    -1,    -1,    85,    86,    -1,
      88,    89,    -1,    91,    -1,    93,    94,    95,    96,    97,
      98,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   116,   117,
     118,    -1,    -1,    -1,    -1,     1,    -1,     3,     4,     5,
       6,     7,   130,   131,    10,    11,    12,    -1,    -1,    15,
      16,    -1,    18,    19,    20,    21,    22,    23,    24,    -1,
      -1,    -1,    -1,    29,    30,    31,    32,    33,    34,    35,
      -1,    -1,    38,    -1,    -1,    -1,    -1,    -1,    44,    45,
      46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
      56,    57,    -1,    59,    60,    -1,    62,    63,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    82,    -1,    -1,    85,
      86,    -1,    88,    89,    -1,    91,    -1,    93,    94,    95,
      96,    97,    98,    -1,    -1,    -1,    -1,    -1,     1,    -1,
       3,     4,     5,     6,     7,    -1,     9,    10,    11,    12,
     116,   117,   118,    16,    -1,    18,    19,    20,    21,    22,
      23,    24,    -1,    -1,   130,   131,    29,    30,    31,    32,
      33,    34,    35,    -1,    -1,    38,    -1,    -1,    -1,    -1,
      -1,    44,    45,    46,    47,    48,    49,    50,    51,    52,
      53,    54,    55,    56,    57,    -1,    59,    60,    -1,    62,
      63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    82,
      -1,    -1,    85,    86,    -1,    88,    89,    -1,    91,    -1,
      93,    94,    95,    96,    97,    98,    -1,    -1,    -1,    -1,
      -1,     1,    -1,     3,     4,     5,     6,     7,    -1,    -1,
      -1,    11,    12,   116,   117,   118,    16,    -1,    18,    19,
      20,    21,    22,    23,    24,    -1,    -1,   130,   131,    29,
      30,    31,    32,    33,    34,    35,    -1,    -1,    38,    -1,
      -1,    -1,    -1,    -1,    44,    45,    46,    47,    48,    49,
      50,    51,    52,    53,    54,    55,    56,    57,    -1,    59,
      60,    -1,    62,    63,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    82,    -1,    -1,    85,    86,    -1,    88,    89,
      -1,    91,    -1,    93,    94,    95,    96,    97,    98,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,   116,   117,   118,    -1,
      -1,    -1,    -1,    -1,    -1,   125,    -1,    -1,    -1,    -1,
     130,   131,     1,    -1,     3,     4,     5,     6,     7,    -1,
      -1,    -1,    11,    12,    -1,    -1,    -1,    16,    -1,    18,
      19,    20,    21,    22,    23,    24,    -1,    -1,    -1,    -1,
      29,    30,    31,    32,    33,    34,    35,    -1,    -1,    38,
      -1,    -1,    -1,    -1,    -1,    44,    45,    46,    47,    48,
      49,    50,    51,    52,    53,    54,    55,    56,    57,    -1,
      59,    60,    -1,    62,    63,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    82,    -1,    -1,    85,    86,    -1,    88,
      89,    -1,    91,    -1,    93,    94,    95,    96,    97,    98,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,   116,   117,   118,
      -1,    -1,    -1,    -1,    -1,    -1,   125,    -1,    -1,    -1,
      -1,   130,   131,     1,    -1,     3,     4,     5,     6,     7,
      -1,    -1,    -1,    11,    12,    -1,    -1,    -1,    16,    -1,
      18,    19,    20,    21,    22,    23,    24,    -1,    -1,    -1,
      -1,    29,    30,    31,    32,    33,    34,    35,    -1,    -1,
      38,    -1,    -1,    -1,    -1,    -1,    44,    45,    46,    47,
      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
      -1,    59,    60,    -1,    62,    63,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    82,    -1,    -1,    85,    86,    -1,
      88,    89,    -1,    91,    -1,    93,    94,    95,    96,    97,
      98,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   116,   117,
     118,    -1,    -1,   121,    -1,     1,    -1,     3,     4,     5,
       6,     7,   130,   131,    10,    11,    12,    -1,    -1,    -1,
      16,    -1,    18,    19,    20,    21,    22,    23,    24,    -1,
      -1,    -1,    -1,    29,    30,    31,    32,    33,    34,    35,
      -1,    -1,    38,    -1,    -1,    -1,    -1,    -1,    44,    45,
      46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
      56,    57,    -1,    59,    60,    -1,    62,    63,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    82,    -1,    -1,    85,
      86,    -1,    88,    89,    -1,    91,    -1,    93,    94,    95,
      96,    97,    98,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       3,     4,     5,     6,     7,    -1,    -1,    -1,    11,    12,
     116,   117,   118,    16,    -1,    18,    19,    20,    21,    22,
      23,    24,    -1,    -1,   130,   131,    29,    30,    31,    32,
      33,    34,    35,    -1,    -1,    38,    -1,    -1,    -1,    -1,
      -1,    44,    45,    46,    47,    48,    49,    50,    51,    52,
      53,    54,    55,    56,    57,    -1,    59,    60,    -1,    62,
      63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    82,
      -1,    -1,    85,    86,    -1,    88,    89,    -1,    91,    -1,
      93,    94,    95,    96,    97,    98,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,     3,     4,     5,    -1,     7,    -1,    -1,
      -1,    11,    12,   116,   117,   118,    16,    -1,    18,    19,
      20,    21,    22,    23,    24,    -1,    -1,    -1,   131,    29,
      30,    31,    32,    33,    34,    35,    -1,    -1,    38,    -1,
      -1,    -1,    -1,    -1,    -1,    45,    -1,    -1,    48,    49,
      50,    51,    52,    53,    54,    55,    56,    57,    -1,    59,
      60,    -1,    62,    63,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    82,    -1,    -1,    85,    86,    -1,    88,    89,
      -1,    -1,    -1,    93,    94,    95,    96,    97,    98,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,   116,   117,   118,    -1,
      -1,    -1,     3,     4,     5,     6,     7,     8,     9,    10,
     130,   131,    13,    14,    15,    16,    17,    -1,    -1,    20,
      21,    22,    23,    24,    25,    26,    -1,    -1,    29,    30,
      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
      51,    52,    53,    54,    55,    -1,    -1,    -1,    -1,    -1,
      -1,    62,    63,    64,    65,    66,    67,    -1,    69,    70,
      -1,    -1,    73,    -1,    -1,    -1,    77,    78,    79,    80,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      91,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,   106,   107,   108,   109,   110,
     111,   112,   113,   114,   115,    -1,    -1,   118,    -1,    -1,
       3,     4,     5,    -1,     7,    -1,   127,   128,    11,    12,
      -1,    -1,    -1,    16,    -1,    18,    19,    20,    21,    22,
      23,    24,    -1,    26,    -1,    -1,    29,    30,    31,    32,
      33,    34,    35,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    45,    -1,    -1,    48,    49,    50,    51,    52,
      53,    54,    55,    56,    57,    -1,    59,    60,    -1,    62,
      63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    82,
      -1,    -1,    85,    86,    -1,    88,    89,    -1,    91,    92,
      93,    94,    95,    96,    97,    98,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,     3,     4,     5,    -1,     7,    -1,    -1,
      -1,    11,    12,   116,   117,   118,    16,   120,    18,    19,
      20,    21,    22,    23,    24,   128,    26,    -1,    -1,    29,
      30,    31,    32,    33,    34,    35,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    45,    -1,    -1,    48,    49,
      50,    51,    52,    53,    54,    55,    56,    57,    -1,    59,
      60,    -1,    62,    63,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    82,    -1,    -1,    85,    86,    -1,    88,    89,
      -1,    91,    92,    93,    94,    95,    96,    97,    98,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,     3,     4,     5,    -1,
       7,    -1,    -1,    -1,    11,    12,   116,   117,   118,    16,
     120,    18,    19,    20,    21,    22,    23,    24,   128,    26,
      -1,    -1,    29,    30,    31,    32,    33,    34,    35,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    45,    -1,
      -1,    48,    49,    50,    51,    52,    53,    54,    55,    56,
      57,    -1,    59,    60,    -1,    62,    63,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    82,    -1,    -1,    85,    86,
      -1,    88,    89,    -1,    91,    92,    93,    94,    95,    96,
      97,    98,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,
       4,     5,    -1,     7,    -1,    -1,    -1,    11,    12,   116,
     117,   118,    16,   120,    18,    19,    20,    21,    22,    23,
      24,   128,    -1,    -1,    -1,    29,    30,    31,    32,    33,
      34,    35,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    45,    -1,    -1,    48,    49,    50,    51,    52,    53,
      54,    55,    56,    57,    -1,    59,    60,    -1,    62,    63,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    82,    83,
      -1,    85,    86,    -1,    88,    89,    -1,    91,    92,    93,
      94,    95,    96,    97,    98,    -1,    -1,    -1,    -1,   103,
      -1,    -1,     3,     4,     5,    -1,     7,    -1,    -1,    -1,
      11,    12,   116,   117,   118,    16,    -1,    18,    19,    20,
      21,    22,    23,    24,   128,    -1,    -1,    -1,    29,    30,
      31,    32,    33,    34,    35,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    45,    -1,    -1,    48,    49,    50,
      51,    52,    53,    54,    55,    56,    57,    -1,    59,    60,
      -1,    62,    63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    82,    83,    -1,    85,    86,    -1,    88,    89,    -1,
      91,    92,    93,    94,    95,    96,    97,    98,    -1,    -1,
      -1,    -1,   103,    -1,    -1,     3,     4,     5,    -1,     7,
      -1,    -1,    -1,    11,    12,   116,   117,   118,    16,    -1,
      18,    19,    20,    21,    22,    23,    24,   128,    -1,    -1,
      -1,    29,    30,    31,    32,    33,    34,    35,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    45,    -1,    -1,
      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
      -1,    59,    60,    -1,    62,    63,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    82,    -1,    -1,    85,    86,    -1,
      88,    89,    -1,    91,    92,    93,    94,    95,    96,    97,
      98,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,
       5,    -1,     7,    -1,    -1,    -1,    11,    12,   116,   117,
     118,    16,    -1,    18,    19,    20,    21,    22,    23,    24,
     128,    -1,    -1,    -1,    29,    30,    31,    32,    33,    34,
      35,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      45,    -1,    -1,    48,    49,    50,    51,    52,    53,    54,
      55,    56,    57,    -1,    59,    60,    -1,    62,    63,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    82,    -1,    -1,
      85,    86,    -1,    88,    89,    -1,    91,    92,    93,    94,
      95,    96,    97,    98,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,     3,     4,     5,    -1,     7,    -1,    -1,    -1,    11,
      12,   116,   117,   118,    16,    -1,    18,    19,    20,    21,
      22,    23,    24,   128,    -1,    -1,    -1,    29,    30,    31,
      32,    33,    34,    35,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    45,    -1,    -1,    48,    49,    50,    51,
      52,    53,    54,    55,    56,    57,    -1,    59,    60,    -1,
      62,    63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      82,    -1,    -1,    85,    86,    -1,    88,    89,    -1,    91,
      92,    93,    94,    95,    96,    97,    98,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,     3,     4,     5,    -1,     7,    -1,
      -1,    -1,    11,    12,   116,   117,   118,    16,    -1,    18,
      19,    20,    21,    22,    23,    24,   128,    -1,    -1,    -1,
      29,    30,    31,    32,    33,    34,    35,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    45,    -1,    -1,    48,
      49,    50,    51,    52,    53,    54,    55,    56,    57,    -1,
      59,    60,    -1,    62,    63,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    82,    -1,    -1,    85,    86,    -1,    88,
      89,    -1,    91,    92,    93,    94,    95,    96,    97,    98,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,   116,   117,   118,
       3,     4,     5,     6,     7,     8,     9,    10,    -1,   128,
      13,    14,    15,    16,    17,    -1,    -1,    20,    21,    22,
      23,    24,    25,    26,    -1,    -1,    29,    30,    31,    32,
      33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
      53,    54,    55,    -1,    -1,    -1,    -1,    -1,    -1,    62,
      63,    64,    65,    66,    67,    -1,    69,    70,    -1,    -1,
      73,    -1,    -1,    -1,    77,    78,    79,    80,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    91,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,   106,   107,   108,   109,   110,   111,   112,
     113,   114,   115,    -1,    -1,   118,     3,     4,     5,     6,
       7,     8,     9,    10,   127,    -1,    13,    14,    15,    16,
      17,    -1,    -1,    20,    21,    22,    23,    24,    25,    26,
      -1,    -1,    29,    30,    31,    32,    33,    34,    35,    36,
      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
      47,    48,    49,    50,    51,    52,    -1,    54,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    62,    63,    64,    65,    66,
      67,    -1,    69,    70,    -1,    -1,    73,    -1,    -1,    -1,
      77,    78,    79,    80,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    91,    -1,    93,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   106,
     107,   108,   109,   110,   111,   112,   113,   114,   115,    -1,
      -1,   118,     3,     4,     5,     6,     7,     8,     9,    10,
     127,    -1,    13,    14,    15,    16,    17,    -1,    -1,    20,
      21,    22,    23,    24,    25,    26,    -1,    -1,    29,    30,
      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
      51,    -1,    -1,    54,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    62,    63,    64,    65,    66,    67,    -1,    69,    70,
      -1,    -1,    73,    -1,    -1,    -1,    77,    78,    79,    80,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      91,    -1,    93,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,   106,   107,   108,   109,   110,
     111,   112,   113,   114,   115,    -1,    -1,   118,     3,     4,
       5,     6,     7,     8,     9,    10,   127,    -1,    13,    14,
      15,    16,    17,    -1,    -1,    20,    21,    22,    23,    24,
      25,    26,    -1,    -1,    29,    30,    31,    32,    33,    34,
      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
      45,    46,    47,    48,    49,    50,    51,    -1,    -1,    54,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    62,    63,    64,
      65,    66,    67,    -1,    69,    70,    -1,    -1,    73,    -1,
      -1,    -1,    77,    78,    79,    80,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    91,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,   106,   107,   108,   109,   110,   111,   112,   113,   114,
     115,    -1,    -1,   118,    -1,     3,     4,     5,    -1,     7,
      -1,    -1,   127,    11,    12,    -1,    -1,    -1,    16,    -1,
      18,    19,    20,    21,    22,    23,    24,    -1,    -1,    -1,
      -1,    29,    30,    31,    32,    33,    34,    35,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    45,    -1,    -1,
      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
      -1,    59,    60,    -1,    62,    63,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    82,    -1,    -1,    85,    86,    -1,
      88,    89,    -1,    91,    92,    93,    94,    95,    96,    97,
      98,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,     3,     4,     5,     6,     7,   116,   117,
     118,    11,    12,    -1,    -1,    -1,    16,   125,    18,    19,
      20,    21,    22,    23,    24,    -1,    -1,    -1,    -1,    29,
      30,    31,    32,    33,    34,    35,    -1,    -1,    38,    -1,
      -1,    -1,    -1,    -1,    44,    45,    46,    47,    48,    49,
      50,    51,    52,    53,    54,    55,    56,    57,    -1,    59,
      60,    -1,    62,    63,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    82,    -1,    -1,    85,    86,    -1,    88,    89,
      -1,    91,    -1,    93,    94,    95,    96,    97,    98,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,     3,     4,     5,    -1,
       7,    -1,    -1,    -1,    11,    12,   116,   117,   118,    16,
      -1,    18,    19,    20,    21,    22,    23,    24,    -1,    -1,
      -1,    -1,    29,    30,    31,    32,    33,    34,    35,    -1,
      -1,    38,    -1,    -1,    -1,    -1,    -1,    -1,    45,    -1,
      -1,    48,    49,    50,    51,    52,    53,    54,    55,    56,
      57,    -1,    59,    60,    -1,    62,    63,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    82,    -1,    -1,    85,    86,
      -1,    88,    89,    -1,    91,    92,    93,    94,    95,    96,
      97,    98,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,
       4,     5,    -1,     7,    -1,    -1,    -1,    11,    12,   116,
     117,   118,    16,    -1,    18,    19,    20,    21,    22,    23,
      24,    -1,    -1,    -1,    -1,    29,    30,    31,    32,    33,
      34,    35,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    45,    -1,    -1,    48,    49,    50,    51,    52,    53,
      54,    55,    56,    57,    -1,    59,    60,    -1,    62,    63,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    82,    -1,
      -1,    85,    86,    -1,    88,    89,    -1,    91,    92,    93,
      94,    95,    96,    97,    98,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,     3,     4,     5,    -1,     7,    -1,    -1,    -1,
      11,    12,   116,   117,   118,    16,    -1,    18,    19,    20,
      21,    22,    23,    24,    -1,    -1,    -1,    -1,    29,    30,
      31,    32,    33,    34,    35,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    45,    -1,    -1,    48,    49,    50,
      51,    52,    53,    54,    55,    56,    57,    -1,    59,    60,
      -1,    62,    63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    82,    -1,    -1,    85,    86,    -1,    88,    89,    -1,
      91,    92,    93,    94,    95,    96,    97,    98,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,     3,     4,     5,    -1,     7,
      -1,    -1,    -1,    11,    12,   116,   117,   118,    16,    -1,
      18,    19,    20,    21,    22,    23,    24,    -1,    -1,    -1,
      -1,    29,    30,    31,    32,    33,    34,    35,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    45,    -1,    -1,
      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
      -1,    59,    60,    -1,    62,    63,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    82,    -1,    -1,    85,    86,    -1,
      88,    89,    -1,    91,    92,    93,    94,    95,    96,    97,
      98,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,
       5,    -1,     7,    -1,    -1,    -1,    11,    12,   116,   117,
     118,    16,    -1,    18,    19,    20,    21,    22,    23,    24,
      -1,    -1,    -1,    -1,    29,    30,    31,    32,    33,    34,
      35,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      45,    -1,    -1,    48,    49,    50,    51,    52,    53,    54,
      55,    56,    57,    -1,    59,    60,    -1,    62,    63,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    82,    -1,    -1,
      85,    86,    -1,    88,    89,    -1,    91,    92,    93,    94,
      95,    96,    97,    98,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,     3,     4,     5,    -1,     7,    -1,    -1,    -1,    11,
      12,   116,   117,   118,    16,    -1,    18,    19,    20,    21,
      22,    23,    24,    -1,    -1,    -1,    -1,    29,    30,    31,
      32,    33,    34,    35,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    45,    -1,    -1,    48,    49,    50,    51,
      52,    53,    54,    55,    56,    57,    -1,    59,    60,    -1,
      62,    63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      82,    -1,    -1,    85,    86,    -1,    88,    89,    -1,    91,
      92,    93,    94,    95,    96,    97,    98,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,     3,     4,     5,    -1,     7,    -1,
      -1,    -1,    11,    12,   116,   117,   118,    16,    -1,    18,
      19,    20,    21,    22,    23,    24,    -1,    -1,    -1,    -1,
      29,    30,    31,    32,    33,    34,    35,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    45,    -1,    -1,    48,
      49,    50,    51,    52,    53,    54,    55,    56,    57,    -1,
      59,    60,    -1,    62,    63,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    82,    -1,    -1,    85,    86,    -1,    88,
      89,    -1,    91,    92,    93,    94,    95,    96,    97,    98,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,     5,
      -1,     7,    -1,    -1,    -1,    11,    12,   116,   117,   118,
      16,    -1,    18,    19,    20,    21,    22,    23,    24,    -1,
      -1,    -1,    -1,    29,    30,    31,    32,    33,    34,    35,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    45,
      -1,    -1,    48,    49,    50,    51,    52,    53,    54,    55,
      56,    57,    -1,    59,    60,    -1,    62,    63,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    82,    -1,    -1,    85,
      86,    -1,    88,    89,    -1,    91,    92,    93,    94,    95,
      96,    97,    98,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       3,     4,     5,    -1,     7,    -1,    -1,    -1,    11,    12,
     116,   117,   118,    16,    -1,    18,    19,    20,    21,    22,
      23,    24,    -1,    -1,    -1,    -1,    29,    30,    31,    32,
      33,    34,    35,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    45,    -1,    -1,    48,    49,    50,    51,    52,
      53,    54,    55,    56,    57,    -1,    59,    60,    -1,    62,
      63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    82,
      -1,    -1,    85,    86,    -1,    88,    89,    -1,    91,    92,
      93,    94,    95,    96,    97,    98,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,     3,     4,     5,    -1,     7,    -1,    -1,
      -1,    11,    12,   116,   117,   118,    16,    -1,    18,    19,
      20,    21,    22,    23,    24,    -1,    -1,    -1,    -1,    29,
      30,    31,    32,    33,    34,    35,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    45,    -1,    -1,    48,    49,
      50,    51,    52,    53,    54,    55,    56,    57,    -1,    59,
      60,    -1,    62,    63,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    82,    -1,    -1,    85,    86,    -1,    88,    89,
      -1,    91,    92,    93,    94,    95,    96,    97,    98,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,     3,     4,     5,    -1,
       7,    -1,    -1,    -1,    11,    12,   116,   117,   118,    16,
      -1,    18,    19,    20,    21,    22,    23,    24,    -1,    -1,
      -1,    -1,    29,    30,    31,    32,    33,    34,    35,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    45,    -1,
      -1,    48,    49,    50,    51,    52,    53,    54,    55,    56,
      57,    -1,    59,    60,    -1,    62,    63,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    82,    -1,    -1,    85,    86,
      -1,    88,    89,    -1,    91,    92,    93,    94,    95,    96,
      97,    98,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,
       4,     5,    -1,     7,    -1,    -1,    -1,    11,    12,   116,
     117,   118,    16,    -1,    18,    19,    20,    21,    22,    23,
      24,    -1,    -1,    -1,    -1,    29,    30,    31,    32,    33,
      34,    35,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    45,    -1,    -1,    48,    49,    50,    51,    52,    53,
      54,    55,    56,    57,    -1,    59,    60,    -1,    62,    63,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    82,    -1,
      -1,    85,    86,    -1,    88,    89,    -1,    91,    92,    93,
      94,    95,    96,    97,    98,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,     3,     4,     5,    -1,     7,    -1,    -1,    -1,
      11,    12,   116,   117,   118,    16,    -1,    18,    19,    20,
      21,    22,    23,    24,    -1,    -1,    -1,    -1,    29,    30,
      31,    32,    33,    34,    35,    -1,    -1,    38,    -1,    -1,
      -1,    -1,    -1,    -1,    45,    -1,    -1,    48,    49,    50,
      51,    52,    53,    54,    55,    56,    57,    -1,    59,    60,
      -1,    62,    63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    82,    -1,    -1,    85,    86,    -1,    88,    89,    -1,
      -1,    -1,    93,    94,    95,    96,    97,    98,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,     3,     4,     5,    -1,     7,
      -1,    -1,    -1,    11,    12,   116,   117,   118,    16,    -1,
      18,    19,    20,    21,    22,    23,    24,    -1,    -1,    -1,
      -1,    29,    30,    31,    32,    33,    34,    35,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    45,    -1,    -1,
      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
      -1,    59,    60,    -1,    62,    63,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    82,    -1,    -1,    85,    86,    -1,
      88,    89,    -1,    91,    -1,    93,    94,    95,    96,    97,
      98,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,
       5,    -1,     7,    -1,    -1,    -1,    11,    12,   116,   117,
     118,    16,    -1,    18,    19,    20,    21,    22,    23,    24,
      -1,    -1,    -1,    -1,    29,    30,    31,    32,    33,    34,
      35,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      45,    -1,    -1,    48,    49,    50,    51,    52,    53,    54,
      55,    56,    57,    -1,    59,    60,    -1,    62,    63,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    82,    -1,    -1,
      85,    86,    -1,    88,    89,    -1,    91,    -1,    93,    94,
      95,    96,    97,    98,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,     3,     4,     5,    -1,     7,    -1,    -1,    -1,    11,
      12,   116,   117,   118,    16,    -1,    18,    19,    20,    21,
      22,    23,    24,    -1,    -1,    -1,    -1,    29,    30,    31,
      32,    33,    34,    35,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    45,    -1,    -1,    48,    49,    50,    51,
      52,    53,    54,    55,    56,    57,    -1,    59,    60,    -1,
      62,    63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      82,    -1,    -1,    85,    86,    -1,    88,    89,    -1,    91,
      -1,    93,    94,    95,    96,    97,    98,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,     3,     4,     5,    -1,     7,    -1,
      -1,    -1,    11,    12,   116,   117,   118,    16,    -1,    18,
      19,    20,    21,    22,    23,    24,    -1,    -1,    -1,    -1,
      29,    30,    31,    32,    33,    34,    35,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    45,    -1,    -1,    48,
      49,    50,    51,    52,    53,    54,    55,    56,    57,    -1,
      59,    60,    -1,    62,    63,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    82,    -1,    -1,    85,    86,    -1,    88,
      89,    -1,    91,    -1,    93,    94,    95,    96,    97,    98,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,     5,
      -1,     7,    -1,    -1,    -1,    11,    12,   116,   117,   118,
      16,    -1,    18,    19,    20,    21,    22,    23,    24,    -1,
      -1,    -1,    -1,    29,    30,    31,    32,    33,    34,    35,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    45,
      -1,    -1,    48,    49,    50,    51,    52,    53,    54,    55,
      56,    57,    -1,    59,    60,    -1,    62,    63,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    82,    -1,    -1,    85,
      86,    -1,    88,    89,    -1,    91,    -1,    93,    94,    95,
      96,    97,    98,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       3,     4,     5,    -1,     7,    -1,    -1,    -1,    11,    12,
     116,   117,   118,    16,    -1,    18,    19,    20,    21,    22,
      23,    24,    -1,    -1,    -1,    -1,    29,    30,    31,    32,
      33,    34,    35,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    45,    -1,    -1,    48,    49,    50,    51,    52,
      53,    54,    55,    56,    57,    -1,    59,    60,    -1,    62,
      63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    82,
      -1,    -1,    85,    86,    -1,    88,    89,    -1,    91,    -1,
      93,    94,    95,    96,    97,    98,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,     3,     4,     5,    -1,     7,    -1,    -1,
      -1,    11,    12,   116,   117,   118,    16,    -1,    18,    19,
      20,    21,    22,    23,    24,    -1,    -1,    -1,    -1,    29,
      30,    31,    32,    33,    34,    35,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    45,    -1,    -1,    48,    49,
      50,    51,    52,    53,    54,    55,    56,    57,    -1,    59,
      60,    -1,    62,    63,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    82,    -1,    -1,    85,    86,    -1,    88,    89,
      -1,    91,    -1,    93,    94,    95,    96,    97,    98,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,     3,     4,     5,    -1,
       7,    -1,    -1,    -1,    11,    12,   116,   117,   118,    16,
      -1,    18,    19,    20,    21,    22,    23,    24,    -1,    -1,
      -1,    -1,    29,    30,    31,    32,    33,    34,    35,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    45,    -1,
      -1,    48,    49,    50,    51,    52,    53,    54,    55,    56,
      57,    -1,    59,    60,    -1,    62,    63,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    82,    -1,    -1,    85,    86,
      -1,    88,    89,    -1,    -1,    -1,    93,    94,    95,    96,
      97,    98,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,
       4,     5,    -1,     7,    -1,    -1,    -1,    11,    12,   116,
     117,   118,    16,    -1,    18,    19,    20,    21,    22,    23,
      24,    -1,    -1,    -1,    -1,    29,    30,    31,    32,    33,
      34,    35,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    45,    -1,    -1,    48,    49,    50,    51,    52,    53,
      54,    55,    56,    57,    -1,    59,    60,    -1,    62,    63,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    82,    -1,
      -1,    85,    86,    -1,    88,    89,    -1,    -1,    -1,    93,
      94,    95,    96,    97,    98,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,     3,     4,     5,    -1,     7,    -1,    -1,    -1,
      11,    12,   116,   117,   118,    16,    -1,    18,    19,    20,
      21,    22,    23,    24,    -1,    -1,    -1,    -1,    29,    30,
      31,    32,    33,    34,    35,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    45,    -1,    -1,    48,    49,    50,
      51,    52,    53,    54,    55,    56,    57,    -1,    59,    60,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    82,    -1,    -1,    85,    86,    -1,    88,    89,    -1,
      91,    -1,    93,    94,    95,    96,    97,    98,    -1,    -1,
      -1,     3,     4,     5,    -1,     7,    -1,   108,    -1,    11,
      12,    -1,    -1,    -1,    16,   116,    18,    19,    20,    21,
      22,    23,    24,    -1,    -1,    -1,    -1,    29,    30,    31,
      32,    33,    34,    35,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    45,    -1,    -1,    48,    49,    50,    51,
      52,    53,    54,    55,    56,    57,    -1,    59,    60,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    79,    -1,    -1,
      82,    -1,    -1,    85,    86,    -1,    88,    89,    -1,    -1,
      -1,    93,    94,    95,    96,    97,    98,    -1,    -1,    -1,
       3,     4,     5,    -1,     7,    -1,    -1,    -1,    11,    12,
      -1,    -1,    -1,    16,   116,    18,    19,    20,    21,    22,
      23,    24,    -1,    -1,    -1,    -1,    29,    30,    31,    32,
      33,    34,    35,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    45,    -1,    -1,    48,    49,    50,    51,    52,
      53,    54,    55,    56,    57,    -1,    59,    60,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    82,
      -1,    -1,    85,    86,    -1,    88,    89,    -1,    91,    -1,
      93,    94,    95,    96,    97,    98,    -1,    -1,    -1,     3,
       4,     5,    -1,     7,    -1,    -1,    -1,    11,    12,    -1,
      -1,    -1,    16,   116,    18,    19,    20,    21,    22,    23,
      24,    -1,    -1,    -1,    -1,    29,    30,    31,    32,    33,
      34,    35,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    45,    -1,    -1,    48,    49,    50,    51,    52,    53,
      54,    55,    56,    57,    -1,    59,    60,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    82,    -1,
      -1,    85,    86,    -1,    88,    89,    -1,    91,    -1,    93,
      94,    95,    96,    97,    98,    -1,    -1,    -1,     3,     4,
       5,    -1,     7,    -1,    -1,    -1,    11,    12,    -1,    -1,
      -1,    16,   116,    18,    19,    20,    21,    22,    23,    24,
      -1,    -1,    -1,    -1,    29,    30,    31,    32,    33,    34,
      35,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      45,    -1,    -1,    48,    49,    50,    51,    52,    53,    54,
      55,    56,    57,    -1,    59,    60,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    82,    -1,    -1,
      85,    86,    -1,    88,    89,    -1,    -1,    -1,    93,    94,
      95,    96,    97,    98,    -1,    -1,    -1,     3,     4,     5,
      -1,     7,    -1,    -1,    -1,    11,    12,    -1,    -1,    -1,
      16,   116,    18,    19,    20,    21,    22,    23,    24,    -1,
      -1,    -1,    -1,    29,    30,    31,    32,    33,    34,    35,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    45,
      -1,    -1,    48,    49,    50,    51,    52,    53,    54,    55,
      56,    57,    -1,    59,    60,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    82,    -1,    -1,    85,
      86,    -1,    88,    89,    -1,    -1,    -1,    93,    94,    95,
      96,    97,    98,    -1,    -1,    -1,     3,     4,     5,    -1,
       7,    -1,    -1,    -1,    11,    12,    -1,    -1,    -1,    16,
     116,    18,    19,    20,    21,    22,    23,    24,    -1,    -1,
      -1,    -1,    29,    30,    31,    32,    33,    34,    35,    -1,
      -1,    -1,    -1,    43,    -1,    -1,    -1,    -1,    45,    -1,
      -1,    48,    49,    50,    51,    52,    53,    54,    55,    56,
      57,    -1,    59,    60,    64,    65,    66,    67,    68,    69,
      70,    71,    72,    73,    74,    75,    76,    -1,    -1,    79,
      80,    -1,    -1,    -1,    -1,    82,    -1,    -1,    85,    86,
      -1,    88,    89,    -1,    -1,    -1,    93,    94,    95,    96,
      97,    98,    -1,    -1,   104,    -1,   106,   107,   108,   109,
     110,   111,   112,   113,   114,   115,    50,    51,    -1,   116,
      54,    -1,    -1,    -1,    -1,    -1,   126,    -1,    62,    63,
      64,    65,    66,    67,    -1,    69,    70,    -1,    -1,    73,
      -1,    -1,    -1,    77,    78,    79,    80,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    91,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,   106,   107,   108,   109,   110,   111,   112,   113,
     114,   115,    50,    51,   118,    -1,    54,    -1,    -1,    -1,
      -1,    -1,    -1,   127,    62,    63,    64,    65,    66,    67,
      -1,    69,    70,    -1,    -1,    73,    -1,    -1,    -1,    77,
      78,    79,    80,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    91,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   106,   107,
     108,   109,   110,   111,   112,   113,   114,   115,    50,    51,
     118,    -1,    54,    -1,    -1,    -1,    -1,    -1,    -1,   127,
      62,    63,    64,    65,    66,    67,    -1,    69,    70,    -1,
      -1,    73,    -1,    -1,    -1,    77,    78,    79,    80,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    91,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,   106,   107,   108,   109,   110,   111,
     112,   113,   114,   115,    50,    51,   118,    -1,    54,    -1,
      -1,    -1,    -1,    -1,    -1,   127,    62,    63,    64,    65,
      66,    67,    -1,    69,    70,    -1,    -1,    73,    -1,    -1,
      -1,    77,    78,    79,    80,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    91,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
      50,    51,   118,    -1,    54,    -1,    -1,    -1,    -1,    -1,
      -1,   127,    62,    63,    64,    65,    66,    67,    -1,    69,
      70,    -1,    -1,    73,    -1,    -1,    -1,    77,    78,    79,
      80,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    91,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,   106,   107,   108,   109,
     110,   111,   112,   113,   114,   115,    50,    51,   118,    -1,
      54,    -1,    -1,    -1,    -1,    -1,    -1,   127,    62,    63,
      64,    65,    66,    67,    -1,    69,    70,    -1,    -1,    73,
      -1,    -1,    -1,    77,    78,    79,    80,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    91,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,   106,   107,   108,   109,   110,   111,   112,   113,
     114,   115,    50,    51,   118,    -1,    54,    -1,    -1,    -1,
      -1,    -1,    -1,   127,    62,    63,    64,    65,    66,    67,
      -1,    69,    70,    -1,    -1,    73,    -1,    -1,    -1,    77,
      78,    79,    80,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    91,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   106,   107,
     108,   109,   110,   111,   112,   113,   114,   115,    50,    51,
     118,    -1,    54,    -1,    -1,    -1,    -1,    -1,    -1,   127,
      62,    63,    64,    65,    66,    67,    -1,    69,    70,    -1,
      -1,    73,    -1,    -1,    -1,    77,    78,    79,    80,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    91,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,   106,   107,   108,   109,   110,   111,
     112,   113,   114,   115,    50,    51,   118,    -1,    54,    -1,
      -1,    -1,    -1,    -1,    -1,   127,    62,    63,    64,    65,
      66,    67,    -1,    69,    70,    -1,    -1,    73,    -1,    -1,
      -1,    77,    78,    79,    80,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    91,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
      50,    51,   118,    -1,    54,    -1,    -1,    -1,    -1,    -1,
      -1,   127,    62,    63,    64,    65,    66,    67,    -1,    69,
      70,    -1,    -1,    73,    -1,    -1,    -1,    77,    78,    79,
      80,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    91,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,   106,   107,   108,   109,
     110,   111,   112,   113,   114,   115,    50,    51,   118,    -1,
      54,    -1,    -1,    -1,    -1,    -1,    -1,   127,    62,    63,
      64,    65,    66,    67,    -1,    69,    70,    -1,    -1,    73,
      -1,    -1,    -1,    77,    78,    79,    80,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    91,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,   106,   107,   108,   109,   110,   111,   112,   113,
     114,   115,    50,    51,   118,    -1,    54,    -1,    -1,    -1,
      -1,    -1,    -1,   127,    62,    63,    64,    65,    66,    67,
      -1,    69,    70,    -1,    -1,    73,    -1,    -1,    -1,    77,
      78,    79,    80,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    91,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   106,   107,
     108,   109,   110,   111,   112,   113,   114,   115,    -1,    -1,
     118,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   127,
      64,    65,    66,    67,    68,    69,    70,    71,    72,    73,
      74,    75,    76,    -1,    -1,    79,    80,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     104,    -1,   106,   107,   108,   109,   110,   111,   112,   113,
     114,   115,    64,    65,    66,    67,    68,    69,    70,    71,
      72,    73,    74,    75,    76,    -1,   130,    79,    80,    -1,
      -1,    -1,    84,    64,    65,    66,    67,    68,    69,    70,
      71,    72,    73,    74,    75,    76,    -1,    -1,    79,    80,
      -1,    -1,   104,    -1,   106,   107,   108,   109,   110,   111,
     112,   113,   114,   115,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,   104,   126,   106,   107,   108,   109,   110,
     111,   112,   113,   114,   115,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,   126,    64,    65,    66,    67,
      68,    69,    70,    71,    72,    73,    74,    75,    76,    -1,
      -1,    79,    80,    64,    65,    66,    67,    68,    69,    70,
      71,    72,    73,    74,    75,    76,    -1,    -1,    79,    80,
      -1,    -1,    -1,    -1,    -1,    -1,   104,   105,   106,   107,
     108,   109,   110,   111,   112,   113,   114,   115,    -1,    -1,
      -1,    -1,    -1,   104,    -1,   106,   107,   108,   109,   110,
     111,   112,   113,   114,   115,    64,    65,    66,    67,    68,
      69,    70,    71,    72,    73,    74,    75,    76,    -1,    -1,
      79,    80,    64,    65,    66,    67,    68,    69,    70,    71,
      -1,    73,    74,    -1,    -1,    -1,    -1,    79,    80,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,   106,   107,   108,
     109,   110,   111,   112,   113,   114,   115,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,   106,   107,   108,   109,   110,   111,
     112,   113,   114,   115,    64,    65,    66,    67,    68,    69,
      70,    -1,    -1,    73,    74,    -1,    -1,    -1,    -1,    79,
      80,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,   106,   107,   108,   109,
     110,   111,   112,   113,   114,   115
};
/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
#line 3 "/usr/share/bison/bison.simple"

/* Skeleton output parser for bison,

   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 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.  */

/* This is the parser code that is written into each bison parser when
   the %semantic_parser declaration is not specified in the grammar.
   It was written by Richard Stallman by simplifying the hairy parser
   used when %semantic_parser is specified.  */

/* 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.  */

#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)

/* The parser invokes alloca or malloc; define the necessary symbols.  */

# if YYSTACK_USE_ALLOCA
#  define YYSTACK_ALLOC alloca
# else
#  ifndef YYSTACK_USE_ALLOCA
#   if defined (alloca) || defined (_ALLOCA_H)
#    define YYSTACK_ALLOC alloca
#   else
#    ifdef __GNUC__
#     define YYSTACK_ALLOC __builtin_alloca
#    endif
#   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 malloc
#  define YYSTACK_FREE free
# endif
#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */

#if (! defined (yyoverflow) \
     && (! defined (__cplusplus) \
         || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))

/* A type that is properly aligned for any stack member.  */
union yyalloc
{
  short yyss;
  YYSTYPE yyvs;
# if YYLSP_NEEDED
  YYLTYPE yyls;
# endif
};

/* The size of the maximum gap between one aligned stack and the next.  */
# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)

/* The size of an array large to enough to hold all stacks, each with
   N elements.  */
# if YYLSP_NEEDED
#  define YYSTACK_BYTES(N) \
     ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE))      \
      + 2 * YYSTACK_GAP_MAX)
# else
#  define YYSTACK_BYTES(N) \
     ((N) * (sizeof (short) + sizeof (YYSTYPE))                         \
      + YYSTACK_GAP_MAX)
# endif

/* Copy COUNT objects from FROM to TO.  The source and destination do
   not overlap.  */
# ifndef YYCOPY
#  if 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_MAX;   \
        yyptr += yynewbytes / sizeof (*yyptr);                          \
      }                                                                 \
    while (0)

#endif

#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 yyerrlab1
/* 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);                                         \
      yychar1 = 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).

   When YYLLOC_DEFAULT is run, CURRENT is set the location of the
   first token.  By default, to implement support for ranges, extend
   its range to the last symbol.  */

#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N)        \
   Current.last_line   = Rhs[N].last_line;      \
   Current.last_column = Rhs[N].last_column;
#endif

/* YYLEX -- calling `yylex' with the right arguments.  */

#if YYPURE
# if YYLSP_NEEDED
#  ifdef YYLEX_PARAM
#   define YYLEX                yylex (&yylval, &yylloc, YYLEX_PARAM)
#  else
#   define YYLEX                yylex (&yylval, &yylloc)
#  endif
# else /* !YYLSP_NEEDED */
#  ifdef YYLEX_PARAM
#   define YYLEX                yylex (&yylval, YYLEX_PARAM)
#  else
#   define YYLEX                yylex (&yylval)
#  endif
# endif /* !YYLSP_NEEDED */
#else /* !YYPURE */
# define YYLEX                  yylex ()
#endif /* !YYPURE */

/* 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)
/* Nonzero means print parse trace.  It is left uninitialized so that
   multiple parsers can coexist.  */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
#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 YYMAXDEPTH == 0
# undef YYMAXDEPTH
#endif

#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif

#ifdef 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)
#   include <string.h>
#   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

#line 316 "/usr/share/bison/bison.simple"

/* The user can define YYPARSE_PARAM as the name of an argument to be passed
   into yyparse.  The argument should have type void *.
   It should actually point to an object.
   Grammar actions can access the variable by casting it
   to the proper pointer type.  */

#ifdef YYPARSE_PARAM
# if defined (__STDC__) || defined (__cplusplus)
#  define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
#  define YYPARSE_PARAM_DECL
# else
#  define YYPARSE_PARAM_ARG YYPARSE_PARAM
#  define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
# endif
#else /* !YYPARSE_PARAM */
# define YYPARSE_PARAM_ARG
# define YYPARSE_PARAM_DECL
#endif /* !YYPARSE_PARAM */

/* Prevent warning if -Wstrict-prototypes.  */
#ifdef __GNUC__
# ifdef YYPARSE_PARAM
int yyparse (void *);
# else
int yyparse (void);
# endif
#endif

/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
   variables are global, or local to YYPARSE.  */

#define YY_DECL_NON_LSP_VARIABLES                       \
/* The lookahead symbol.  */                            \
int yychar;                                             \
                                                        \
/* The semantic value of the lookahead symbol. */       \
YYSTYPE yylval;                                         \
                                                        \
/* Number of parse errors so far.  */                   \
int yynerrs;

#if YYLSP_NEEDED
# define YY_DECL_VARIABLES                      \
YY_DECL_NON_LSP_VARIABLES                       \
                                                \
/* Location data for the lookahead symbol.  */  \
YYLTYPE yylloc;
#else
# define YY_DECL_VARIABLES                      \
YY_DECL_NON_LSP_VARIABLES
#endif

/* If nonreentrant, generate the variables here. */

#if !YYPURE
YY_DECL_VARIABLES
#endif  /* !YYPURE */

int
yyparse (YYPARSE_PARAM_ARG)
     YYPARSE_PARAM_DECL
{
  /* If reentrant, generate the variables here. */
#if YYPURE
  YY_DECL_VARIABLES
#endif  /* !YYPURE */

  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 yychar1 = 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 yyssa[YYINITDEPTH];
  short *yyss = yyssa;
  register short *yyssp;

  /* The semantic value stack.  */
  YYSTYPE yyvsa[YYINITDEPTH];
  YYSTYPE *yyvs = yyvsa;
  register YYSTYPE *yyvsp;

#if YYLSP_NEEDED
  /* The location stack.  */
  YYLTYPE yylsa[YYINITDEPTH];
  YYLTYPE *yyls = yylsa;
  YYLTYPE *yylsp;
#endif

#if YYLSP_NEEDED
# define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
#else
# define YYPOPSTACK   (yyvsp--, yyssp--)
#endif

  YYSIZE_T yystacksize = YYINITDEPTH;

  /* The variables used to return semantic value and location from the
     action routines.  */
  YYSTYPE yyval;
#if YYLSP_NEEDED
  YYLTYPE yyloc;
#endif

  /* 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;
#if YYLSP_NEEDED
  yylsp = yyls;
#endif
  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 (yyssp >= yyss + yystacksize - 1)
    {
      /* 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 *yyss1 = yyss;

        /* Each stack pointer address is followed by the size of the
           data in use in that stack, in bytes.  */
# if YYLSP_NEEDED
        YYLTYPE *yyls1 = yyls;
        /* 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),
                    &yyls1, yysize * sizeof (*yylsp),
                    &yystacksize);
        yyls = yyls1;
# else
        yyoverflow ("parser stack overflow",
                    &yyss1, yysize * sizeof (*yyssp),
                    &yyvs1, yysize * sizeof (*yyvsp),
                    &yystacksize);
# endif
        yyss = yyss1;
        yyvs = yyvs1;
      }
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
      goto yyoverflowlab;
# else
      /* Extend the stack our own way.  */
      if (yystacksize >= YYMAXDEPTH)
        goto yyoverflowlab;
      yystacksize *= 2;
      if (yystacksize > YYMAXDEPTH)
        yystacksize = YYMAXDEPTH;

      {
        short *yyss1 = yyss;
        union yyalloc *yyptr =
          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
        if (! yyptr)
          goto yyoverflowlab;
        YYSTACK_RELOCATE (yyss);
        YYSTACK_RELOCATE (yyvs);
# if YYLSP_NEEDED
        YYSTACK_RELOCATE (yyls);
# endif
# undef YYSTACK_RELOCATE
        if (yyss1 != yyssa)
          YYSTACK_FREE (yyss1);
      }
# endif
#endif /* no yyoverflow */

      yyssp = yyss + yysize - 1;
      yyvsp = yyvs + yysize - 1;
#if YYLSP_NEEDED
      yylsp = yyls + yysize - 1;
#endif

      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
                  (unsigned long int) yystacksize));

      if (yyssp >= yyss + yystacksize - 1)
        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 == YYFLAG)
    goto yydefault;

  /* Not known => get a lookahead token if don't already have one.  */

  /* yychar is either YYEMPTY or YYEOF
     or a valid token in external form.  */

  if (yychar == YYEMPTY)
    {
      YYDPRINTF ((stderr, "Reading a token: "));
      yychar = YYLEX;
    }

  /* Convert token to internal form (in yychar1) for indexing tables with */

  if (yychar <= 0)              /* This means end of input. */
    {
      yychar1 = 0;
      yychar = YYEOF;           /* Don't call YYLEX any more */

      YYDPRINTF ((stderr, "Now at end of input.\n"));
    }
  else
    {
      yychar1 = YYTRANSLATE (yychar);

#if YYDEBUG
     /* We have to keep this `#if YYDEBUG', since we use variables
        which are defined only if `YYDEBUG' is set.  */
      if (yydebug)
        {
          YYFPRINTF (stderr, "Next token is %d (%s",
                     yychar, yytname[yychar1]);
          /* Give the individual parser a way to print the precise
             meaning of a token, for further debugging info.  */
# ifdef YYPRINT
          YYPRINT (stderr, yychar, yylval);
# endif
          YYFPRINTF (stderr, ")\n");
        }
#endif
    }

  yyn += yychar1;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
    goto yydefault;

  yyn = yytable[yyn];

  /* yyn is what to do for this token type in this state.
     Negative => reduce, -yyn is rule number.
     Positive => shift, yyn is new state.
       New state is final state => don't bother to shift,
       just return success.
     0, or most negative number => error.  */

  if (yyn < 0)
    {
      if (yyn == YYFLAG)
        goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }
  else if (yyn == 0)
    goto yyerrlab;

  if (yyn == YYFINAL)
    YYACCEPT;

  /* Shift the lookahead token.  */
  YYDPRINTF ((stderr, "Shifting token %d (%s), ",
              yychar, yytname[yychar1]));

  /* Discard the token being shifted unless it is eof.  */
  if (yychar != YYEOF)
    yychar = YYEMPTY;

  *++yyvsp = yylval;
#if YYLSP_NEEDED
  *++yylsp = yylloc;
#endif

  /* 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 the semantic value of
     the lookahead token.  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];

#if YYLSP_NEEDED
  /* Similarly for the default location.  Let the user run additional
     commands if for instance locations are ranges.  */
  yyloc = yylsp[1-yylen];
  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
#endif

#if YYDEBUG
  /* We have to keep this `#if YYDEBUG', since we use variables which
     are defined only if `YYDEBUG' is set.  */
  if (yydebug)
    {
      int yyi;

      YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
                 yyn, yyrline[yyn]);

      /* Print the symbols being reduced, and their result.  */
      for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
        YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
      YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
    }
#endif

  switch (yyn) {

case 1:
#line 345 "parse.y"
{
                        lex_state = EXPR_BEG;
                        top_local_init();
                        if (ruby_class == rb_cObject) class_nest = 0;
                        else class_nest = 1;
                    }
    break;
case 2:
#line 352 "parse.y"
{
                        if (yyvsp[0].node && !compile_for_eval) {
                            /* last expression should not be void */
                            if (nd_type(yyvsp[0].node) != NODE_BLOCK) void_expr(yyvsp[0].node);
                            else {
                                NODE *node = yyvsp[0].node;
                                while (node->nd_next) {
                                    node = node->nd_next;
                                }
                                void_expr(node->nd_head);
                            }
                        }
                        ruby_eval_tree = block_append(ruby_eval_tree, yyvsp[0].node);
                        top_local_setup();
                        class_nest = 0;
                    }
    break;
case 3:
#line 374 "parse.y"
{
                        yyval.node = yyvsp[-3].node;
                        if (yyvsp[-2].node) {
                            yyval.node = NEW_RESCUE(yyvsp[-3].node, yyvsp[-2].node, yyvsp[-1].node);
                        }
                        else if (yyvsp[-1].node) {
                            rb_warn("else without rescue is useless");
                            yyval.node = block_append(yyval.node, yyvsp[-1].node);
                        }
                        if (yyvsp[0].node) {
                            yyval.node = NEW_ENSURE(yyval.node, yyvsp[0].node);
                        }
                        fixpos(yyval.node, yyvsp[-3].node);
                    }
    break;
case 4:
#line 391 "parse.y"
{
                        void_stmts(yyvsp[-1].node);
                        yyval.node = yyvsp[-1].node;
                    }
    break;
case 6:
#line 399 "parse.y"
{
                        yyval.node = newline_node(yyvsp[0].node);
                    }
    break;
case 7:
#line 403 "parse.y"
{
                        yyval.node = block_append(yyvsp[-2].node, newline_node(yyvsp[0].node));
                    }
    break;
case 8:
#line 407 "parse.y"
{
                        yyval.node = yyvsp[0].node;
                    }
    break;
case 9:
#line 412 "parse.y"
{lex_state = EXPR_FNAME;}
    break;
case 10:
#line 413 "parse.y"
{
                        yyval.node = NEW_ALIAS(yyvsp[-2].id, yyvsp[0].id);
                    }
    break;
case 11:
#line 417 "parse.y"
{
                        yyval.node = NEW_VALIAS(yyvsp[-1].id, yyvsp[0].id);
                    }
    break;
case 12:
#line 421 "parse.y"
{
                        char buf[3];

                        sprintf(buf, "$%c", (char)yyvsp[0].node->nd_nth);
                        yyval.node = NEW_VALIAS(yyvsp[-1].id, rb_intern(buf));
                    }
    break;
case 13:
#line 428 "parse.y"
{
                        yyerror("can't make alias for the number variables");
                        yyval.node = 0;
                    }
    break;
case 14:
#line 433 "parse.y"
{
                        yyval.node = yyvsp[0].node;
                    }
    break;
case 15:
#line 437 "parse.y"
{
                        yyval.node = NEW_IF(cond(yyvsp[0].node), yyvsp[-2].node, 0);
                        fixpos(yyval.node, yyvsp[0].node);
                        if (cond_negative(&yyval.node->nd_cond)) {
                            yyval.node->nd_else = yyval.node->nd_body;
                            yyval.node->nd_body = 0;
                        }
                    }
    break;
case 16:
#line 446 "parse.y"
{
                        yyval.node = NEW_UNLESS(cond(yyvsp[0].node), yyvsp[-2].node, 0);
                        fixpos(yyval.node, yyvsp[0].node);
                        if (cond_negative(&yyval.node->nd_cond)) {
                            yyval.node->nd_body = yyval.node->nd_else;
                            yyval.node->nd_else = 0;
                        }
                    }
    break;
case 17:
#line 455 "parse.y"
{
                        if (yyvsp[-2].node && nd_type(yyvsp[-2].node) == NODE_BEGIN) {
                            yyval.node = NEW_WHILE(cond(yyvsp[0].node), yyvsp[-2].node->nd_body, 0);
                        }
                        else {
                            yyval.node = NEW_WHILE(cond(yyvsp[0].node), yyvsp[-2].node, 1);
                        }
                        if (cond_negative(&yyval.node->nd_cond)) {
                            nd_set_type(yyval.node, NODE_UNTIL);
                        }
                    }
    break;
case 18:
#line 467 "parse.y"
{
                        if (yyvsp[-2].node && nd_type(yyvsp[-2].node) == NODE_BEGIN) {
                            yyval.node = NEW_UNTIL(cond(yyvsp[0].node), yyvsp[-2].node->nd_body, 0);
                        }
                        else {
                            yyval.node = NEW_UNTIL(cond(yyvsp[0].node), yyvsp[-2].node, 1);
                        }
                        if (cond_negative(&yyval.node->nd_cond)) {
                            nd_set_type(yyval.node, NODE_WHILE);
                        }
                    }
    break;
case 19:
#line 479 "parse.y"
{
                        yyval.node = NEW_RESCUE(yyvsp[-2].node, NEW_RESBODY(0,yyvsp[0].node,0), 0);
                    }
    break;
case 20:
#line 483 "parse.y"
{
                        if (in_def || in_single) {
                            yyerror("BEGIN in method");
                        }
                        local_push(0);
                    }
    break;
case 21:
#line 490 "parse.y"
{
                        ruby_eval_tree_begin = block_append(ruby_eval_tree_begin,
                                                            NEW_PREEXE(yyvsp[-1].node));
                        local_pop();
                        yyval.node = 0;
                    }
    break;
case 22:
#line 497 "parse.y"
{
                        if (in_def || in_single) {
                            rb_warn("END in method; use at_exit");
                        }

                        yyval.node = NEW_ITER(0, NEW_POSTEXE(), yyvsp[-1].node);
                    }
    break;
case 23:
#line 505 "parse.y"
{
                        yyval.node = node_assign(yyvsp[-2].node, yyvsp[0].node);
                    }
    break;
case 24:
#line 509 "parse.y"
{
                        value_expr(yyvsp[0].node);
                        yyvsp[-2].node->nd_value = (yyvsp[-2].node->nd_head) ? NEW_TO_ARY(yyvsp[0].node) : NEW_ARRAY(yyvsp[0].node);
                        yyval.node = yyvsp[-2].node;
                    }
    break;
case 25:
#line 515 "parse.y"
{
                        value_expr(yyvsp[0].node);
                        if (yyvsp[-2].node) {
                            ID vid = yyvsp[-2].node->nd_vid;
                            if (yyvsp[-1].id == tOROP) {
                                yyvsp[-2].node->nd_value = yyvsp[0].node;
                                yyval.node = NEW_OP_ASGN_OR(gettable(vid), yyvsp[-2].node);
                                if (is_asgn_or_id(vid)) {
                                    yyval.node->nd_aid = vid;
                                }
                            }
                            else if (yyvsp[-1].id == tANDOP) {
                                yyvsp[-2].node->nd_value = yyvsp[0].node;
                                yyval.node = NEW_OP_ASGN_AND(gettable(vid), yyvsp[-2].node);
                            }
                            else {
                                yyval.node = yyvsp[-2].node;
                                yyval.node->nd_value = call_op(gettable(vid),yyvsp[-1].id,1,yyvsp[0].node);
                            }
                        }
                        else {
                            yyval.node = 0;
                        }
                    }
    break;
case 26:
#line 540 "parse.y"
{
                        NODE *args;

                        value_expr(yyvsp[0].node);
                        args = NEW_LIST(yyvsp[0].node);
                        if (yyvsp[-3].node && nd_type(yyvsp[-3].node) != NODE_ARRAY)
                            yyvsp[-3].node = NEW_LIST(yyvsp[-3].node);
                        yyvsp[-3].node = list_append(yyvsp[-3].node, NEW_NIL());
                        list_concat(args, yyvsp[-3].node);
                        if (yyvsp[-1].id == tOROP) {
                            yyvsp[-1].id = 0;
                        }
                        else if (yyvsp[-1].id == tANDOP) {
                            yyvsp[-1].id = 1;
                        }
                        yyval.node = NEW_OP_ASGN1(yyvsp[-5].node, yyvsp[-1].id, args);
                        fixpos(yyval.node, yyvsp[-5].node);
                    }
    break;
case 27:
#line 559 "parse.y"
{
                        value_expr(yyvsp[0].node);
                        if (yyvsp[-1].id == tOROP) {
                            yyvsp[-1].id = 0;
                        }
                        else if (yyvsp[-1].id == tANDOP) {
                            yyvsp[-1].id = 1;
                        }
                        yyval.node = NEW_OP_ASGN2(yyvsp[-4].node, yyvsp[-2].id, yyvsp[-1].id, yyvsp[0].node);
                        fixpos(yyval.node, yyvsp[-4].node);
                    }
    break;
case 28:
#line 571 "parse.y"
{
                        value_expr(yyvsp[0].node);
                        if (yyvsp[-1].id == tOROP) {
                            yyvsp[-1].id = 0;
                        }
                        else if (yyvsp[-1].id == tANDOP) {
                            yyvsp[-1].id = 1;
                        }
                        yyval.node = NEW_OP_ASGN2(yyvsp[-4].node, yyvsp[-2].id, yyvsp[-1].id, yyvsp[0].node);
                        fixpos(yyval.node, yyvsp[-4].node);
                    }
    break;
case 29:
#line 583 "parse.y"
{
                        value_expr(yyvsp[0].node);
                        if (yyvsp[-1].id == tOROP) {
                            yyvsp[-1].id = 0;
                        }
                        else if (yyvsp[-1].id == tANDOP) {
                            yyvsp[-1].id = 1;
                        }
                        yyval.node = NEW_OP_ASGN2(yyvsp[-4].node, yyvsp[-2].id, yyvsp[-1].id, yyvsp[0].node);
                        fixpos(yyval.node, yyvsp[-4].node);
                    }
    break;
case 30:
#line 595 "parse.y"
{
                        rb_backref_error(yyvsp[-2].node);
                        yyval.node = 0;
                    }
    break;
case 31:
#line 600 "parse.y"
{
                        yyval.node = node_assign(yyvsp[-2].node, NEW_SVALUE(yyvsp[0].node));
                    }
    break;
case 32:
#line 604 "parse.y"
{
                        yyvsp[-2].node->nd_value = (yyvsp[-2].node->nd_head) ? NEW_TO_ARY(yyvsp[0].node) : NEW_ARRAY(yyvsp[0].node);
                        yyval.node = yyvsp[-2].node;
                    }
    break;
case 33:
#line 609 "parse.y"
{
                        yyvsp[-2].node->nd_value = yyvsp[0].node;
                        yyval.node = yyvsp[-2].node;
                    }
    break;
case 36:
#line 618 "parse.y"
{
                        yyval.node = logop(NODE_AND, yyvsp[-2].node, yyvsp[0].node);
                    }
    break;
case 37:
#line 622 "parse.y"
{
                        yyval.node = logop(NODE_OR, yyvsp[-2].node, yyvsp[0].node);
                    }
    break;
case 38:
#line 626 "parse.y"
{
                        yyval.node = NEW_NOT(cond(yyvsp[0].node));
                    }
    break;
case 39:
#line 630 "parse.y"
{
                        yyval.node = NEW_NOT(cond(yyvsp[0].node));
                    }
    break;
case 41:
#line 637 "parse.y"
{
                        value_expr(yyval.node);
                        yyval.node = yyvsp[0].node;
                    }
    break;
case 44:
#line 646 "parse.y"
{
                        yyval.node = NEW_RETURN(ret_args(yyvsp[0].node));
                    }
    break;
case 45:
#line 650 "parse.y"
{
                        yyval.node = NEW_BREAK(ret_args(yyvsp[0].node));
                    }
    break;
case 46:
#line 654 "parse.y"
{
                        yyval.node = NEW_NEXT(ret_args(yyvsp[0].node));
                    }
    break;
case 48:
#line 661 "parse.y"
{
                        yyval.node = new_call(yyvsp[-3].node, yyvsp[-1].id, yyvsp[0].node);
                    }
    break;
case 49:
#line 665 "parse.y"
{
                        yyval.node = new_call(yyvsp[-3].node, yyvsp[-1].id, yyvsp[0].node);
                    }
    break;
case 50:
#line 671 "parse.y"
{
                        yyval.vars = dyna_push();
                        yyvsp[0].num = ruby_sourceline;
                    }
    break;
case 51:
#line 675 "parse.y"
{yyval.vars = ruby_dyna_vars;}
    break;
case 52:
#line 678 "parse.y"
{
                        yyval.node = NEW_ITER(yyvsp[-3].node, 0, dyna_init(yyvsp[-1].node, yyvsp[-2].vars));
                        nd_set_line(yyval.node, yyvsp[-5].num);
                        dyna_pop(yyvsp[-4].vars);
                    }
    break;
case 53:
#line 686 "parse.y"
{
                        yyval.node = new_fcall(yyvsp[-1].id, yyvsp[0].node);
                        fixpos(yyval.node, yyvsp[0].node);
                   }
    break;
case 54:
#line 691 "parse.y"
{
                        yyval.node = new_fcall(yyvsp[-2].id, yyvsp[-1].node);
                        if (yyvsp[0].node) {
                            if (nd_type(yyval.node) == NODE_BLOCK_PASS) {
                                rb_compile_error("both block arg and actual block given");
                            }
                            yyvsp[0].node->nd_iter = yyval.node;
                            yyval.node = yyvsp[0].node;
                        }
                        fixpos(yyval.node, yyvsp[-1].node);
                   }
    break;
case 55:
#line 703 "parse.y"
{
                        yyval.node = new_call(yyvsp[-3].node, yyvsp[-1].id, yyvsp[0].node);
                        fixpos(yyval.node, yyvsp[-3].node);
                    }
    break;
case 56:
#line 708 "parse.y"
{
                        yyval.node = new_call(yyvsp[-4].node, yyvsp[-2].id, yyvsp[-1].node);
                        if (yyvsp[0].node) {
                            if (nd_type(yyval.node) == NODE_BLOCK_PASS) {
                                rb_compile_error("both block arg and actual block given");
                            }
                            yyvsp[0].node->nd_iter = yyval.node;
                            yyval.node = yyvsp[0].node;
                        }
                        fixpos(yyval.node, yyvsp[-4].node);
                   }
    break;
case 57:
#line 720 "parse.y"
{
                        yyval.node = new_call(yyvsp[-3].node, yyvsp[-1].id, yyvsp[0].node);
                        fixpos(yyval.node, yyvsp[-3].node);
                    }
    break;
case 58:
#line 725 "parse.y"
{
                        yyval.node = new_call(yyvsp[-4].node, yyvsp[-2].id, yyvsp[-1].node);
                        if (yyvsp[0].node) {
                            if (nd_type(yyval.node) == NODE_BLOCK_PASS) {
                                rb_compile_error("both block arg and actual block given");
                            }
                            yyvsp[0].node->nd_iter = yyval.node;
                            yyval.node = yyvsp[0].node;
                        }
                        fixpos(yyval.node, yyvsp[-4].node);
                   }
    break;
case 59:
#line 737 "parse.y"
{
                        yyval.node = new_super(yyvsp[0].node);
                        fixpos(yyval.node, yyvsp[0].node);
                    }
    break;
case 60:
#line 742 "parse.y"
{
                        yyval.node = new_yield(yyvsp[0].node);
                        fixpos(yyval.node, yyvsp[0].node);
                    }
    break;
case 62:
#line 750 "parse.y"
{
                        yyval.node = yyvsp[-1].node;
                    }
    break;
case 64:
#line 757 "parse.y"
{
                        yyval.node = NEW_MASGN(NEW_LIST(yyvsp[-1].node), 0);
                    }
    break;
case 65:
#line 763 "parse.y"
{
                        yyval.node = NEW_MASGN(yyvsp[0].node, 0);
                    }
    break;
case 66:
#line 767 "parse.y"
{
                        yyval.node = NEW_MASGN(list_append(yyvsp[-1].node,yyvsp[0].node), 0);
                    }
    break;
case 67:
#line 771 "parse.y"
{
                        yyval.node = NEW_MASGN(yyvsp[-2].node, yyvsp[0].node);
                    }
    break;
case 68:
#line 775 "parse.y"
{
                        yyval.node = NEW_MASGN(yyvsp[-1].node, -1);
                    }
    break;
case 69:
#line 779 "parse.y"
{
                        yyval.node = NEW_MASGN(0, yyvsp[0].node);
                    }
    break;
case 70:
#line 783 "parse.y"
{
                        yyval.node = NEW_MASGN(0, -1);
                    }
    break;
case 72:
#line 790 "parse.y"
{
                        yyval.node = yyvsp[-1].node;
                    }
    break;
case 73:
#line 796 "parse.y"
{
                        yyval.node = NEW_LIST(yyvsp[-1].node);
                    }
    break;
case 74:
#line 800 "parse.y"
{
                        yyval.node = list_append(yyvsp[-2].node, yyvsp[-1].node);
                    }
    break;
case 75:
#line 806 "parse.y"
{
                        yyval.node = assignable(yyvsp[0].id, 0);
                    }
    break;
case 76:
#line 810 "parse.y"
{
                        yyval.node = aryset(yyvsp[-3].node, yyvsp[-1].node);
                    }
    break;
case 77:
#line 814 "parse.y"
{
                        yyval.node = attrset(yyvsp[-2].node, yyvsp[0].id);
                    }
    break;
case 78:
#line 818 "parse.y"
{
                        yyval.node = attrset(yyvsp[-2].node, yyvsp[0].id);
                    }
    break;
case 79:
#line 822 "parse.y"
{
                        yyval.node = attrset(yyvsp[-2].node, yyvsp[0].id);
                    }
    break;
case 80:
#line 826 "parse.y"
{
                        if (in_def || in_single)
                            yyerror("dynamic constant assignment");
                        yyval.node = NEW_CDECL(0, 0, NEW_COLON2(yyvsp[-2].node, yyvsp[0].id));
                    }
    break;
case 81:
#line 832 "parse.y"
{
                        if (in_def || in_single)
                            yyerror("dynamic constant assignment");
                        yyval.node = NEW_CDECL(0, 0, NEW_COLON3(yyvsp[0].id));
                    }
    break;
case 82:
#line 838 "parse.y"
{
                        rb_backref_error(yyvsp[0].node);
                        yyval.node = 0;
                    }
    break;
case 83:
#line 845 "parse.y"
{
                        yyval.node = assignable(yyvsp[0].id, 0);
                    }
    break;
case 84:
#line 849 "parse.y"
{
                        yyval.node = aryset(yyvsp[-3].node, yyvsp[-1].node);
                    }
    break;
case 85:
#line 853 "parse.y"
{
                        yyval.node = attrset(yyvsp[-2].node, yyvsp[0].id);
                    }
    break;
case 86:
#line 857 "parse.y"
{
                        yyval.node = attrset(yyvsp[-2].node, yyvsp[0].id);
                    }
    break;
case 87:
#line 861 "parse.y"
{
                        yyval.node = attrset(yyvsp[-2].node, yyvsp[0].id);
                    }
    break;
case 88:
#line 865 "parse.y"
{
                        if (in_def || in_single)
                            yyerror("dynamic constant assignment");
                        yyval.node = NEW_CDECL(0, 0, NEW_COLON2(yyvsp[-2].node, yyvsp[0].id));
                    }
    break;
case 89:
#line 871 "parse.y"
{
                        if (in_def || in_single)
                            yyerror("dynamic constant assignment");
                        yyval.node = NEW_CDECL(0, 0, NEW_COLON3(yyvsp[0].id));
                    }
    break;
case 90:
#line 877 "parse.y"
{
                        rb_backref_error(yyvsp[0].node);
                        yyval.node = 0;
                    }
    break;
case 91:
#line 884 "parse.y"
{
                        yyerror("class/module name must be CONSTANT");
                    }
    break;
case 93:
#line 891 "parse.y"
{
                        yyval.node = NEW_COLON3(yyvsp[0].id);
                    }
    break;
case 94:
#line 895 "parse.y"
{
                        yyval.node = NEW_COLON2(0, yyval.node);
                    }
    break;
case 95:
#line 899 "parse.y"
{
                        yyval.node = NEW_COLON2(yyvsp[-2].node, yyvsp[0].id);
                    }
    break;
case 99:
#line 908 "parse.y"
{
                        lex_state = EXPR_END;
                        yyval.id = yyvsp[0].id;
                    }
    break;
case 100:
#line 913 "parse.y"
{
                        lex_state = EXPR_END;
                        yyval.id = yyvsp[0].id;
                    }
    break;
case 103:
#line 924 "parse.y"
{
                        yyval.node = NEW_UNDEF(yyvsp[0].id);
                    }
    break;
case 104:
#line 927 "parse.y"
{lex_state = EXPR_FNAME;}
    break;
case 105:
#line 928 "parse.y"
{
                        yyval.node = block_append(yyvsp[-3].node, NEW_UNDEF(yyvsp[0].id));
                    }
    break;
case 106:
#line 933 "parse.y"
{ yyval.id = '|'; }
    break;
case 107:
#line 934 "parse.y"
{ yyval.id = '^'; }
    break;
case 108:
#line 935 "parse.y"
{ yyval.id = '&'; }
    break;
case 109:
#line 936 "parse.y"
{ yyval.id = tCMP; }
    break;
case 110:
#line 937 "parse.y"
{ yyval.id = tEQ; }
    break;
case 111:
#line 938 "parse.y"
{ yyval.id = tEQQ; }
    break;
case 112:
#line 939 "parse.y"
{ yyval.id = tMATCH; }
    break;
case 113:
#line 940 "parse.y"
{ yyval.id = '>'; }
    break;
case 114:
#line 941 "parse.y"
{ yyval.id = tGEQ; }
    break;
case 115:
#line 942 "parse.y"
{ yyval.id = '<'; }
    break;
case 116:
#line 943 "parse.y"
{ yyval.id = tLEQ; }
    break;
case 117:
#line 944 "parse.y"
{ yyval.id = tLSHFT; }
    break;
case 118:
#line 945 "parse.y"
{ yyval.id = tRSHFT; }
    break;
case 119:
#line 946 "parse.y"
{ yyval.id = '+'; }
    break;
case 120:
#line 947 "parse.y"
{ yyval.id = '-'; }
    break;
case 121:
#line 948 "parse.y"
{ yyval.id = '*'; }
    break;
case 122:
#line 949 "parse.y"
{ yyval.id = '*'; }
    break;
case 123:
#line 950 "parse.y"
{ yyval.id = '/'; }
    break;
case 124:
#line 951 "parse.y"
{ yyval.id = '%'; }
    break;
case 125:
#line 952 "parse.y"
{ yyval.id = tPOW; }
    break;
case 126:
#line 953 "parse.y"
{ yyval.id = '~'; }
    break;
case 127:
#line 954 "parse.y"
{ yyval.id = tUPLUS; }
    break;
case 128:
#line 955 "parse.y"
{ yyval.id = tUMINUS; }
    break;
case 129:
#line 956 "parse.y"
{ yyval.id = tAREF; }
    break;
case 130:
#line 957 "parse.y"
{ yyval.id = tASET; }
    break;
case 131:
#line 958 "parse.y"
{ yyval.id = '`'; }
    break;
case 173:
#line 971 "parse.y"
{
                        yyval.node = node_assign(yyvsp[-2].node, yyvsp[0].node);
                    }
    break;
case 174:
#line 975 "parse.y"
{
                        yyval.node = node_assign(yyvsp[-4].node, NEW_RESCUE(yyvsp[-2].node, NEW_RESBODY(0,yyvsp[0].node,0), 0));
                    }
    break;
case 175:
#line 979 "parse.y"
{
                        value_expr(yyvsp[0].node);
                        if (yyvsp[-2].node) {
                            ID vid = yyvsp[-2].node->nd_vid;
                            if (yyvsp[-1].id == tOROP) {
                                yyvsp[-2].node->nd_value = yyvsp[0].node;
                                yyval.node = NEW_OP_ASGN_OR(gettable(vid), yyvsp[-2].node);
                                if (is_asgn_or_id(vid)) {
                                    yyval.node->nd_aid = vid;
                                }
                            }
                            else if (yyvsp[-1].id == tANDOP) {
                                yyvsp[-2].node->nd_value = yyvsp[0].node;
                                yyval.node = NEW_OP_ASGN_AND(gettable(vid), yyvsp[-2].node);
                            }
                            else {
                                yyval.node = yyvsp[-2].node;
                                yyval.node->nd_value = call_op(gettable(vid),yyvsp[-1].id,1,yyvsp[0].node);
                            }
                        }
                        else {
                            yyval.node = 0;
                        }
                    }
    break;
case 176:
#line 1004 "parse.y"
{
                        NODE *args;

                        value_expr(yyvsp[0].node);
                        args = NEW_LIST(yyvsp[0].node);
                        if (yyvsp[-3].node && nd_type(yyvsp[-3].node) != NODE_ARRAY)
                            yyvsp[-3].node = NEW_LIST(yyvsp[-3].node);
                        yyvsp[-3].node = list_append(yyvsp[-3].node, NEW_NIL());
                        list_concat(args, yyvsp[-3].node);
                        if (yyvsp[-1].id == tOROP) {
                            yyvsp[-1].id = 0;
                        }
                        else if (yyvsp[-1].id == tANDOP) {
                            yyvsp[-1].id = 1;
                        }
                        yyval.node = NEW_OP_ASGN1(yyvsp[-5].node, yyvsp[-1].id, args);
                        fixpos(yyval.node, yyvsp[-5].node);
                    }
    break;
case 177:
#line 1023 "parse.y"
{
                        value_expr(yyvsp[0].node);
                        if (yyvsp[-1].id == tOROP) {
                            yyvsp[-1].id = 0;
                        }
                        else if (yyvsp[-1].id == tANDOP) {
                            yyvsp[-1].id = 1;
                        }
                        yyval.node = NEW_OP_ASGN2(yyvsp[-4].node, yyvsp[-2].id, yyvsp[-1].id, yyvsp[0].node);
                        fixpos(yyval.node, yyvsp[-4].node);
                    }
    break;
case 178:
#line 1035 "parse.y"
{
                        value_expr(yyvsp[0].node);
                        if (yyvsp[-1].id == tOROP) {
                            yyvsp[-1].id = 0;
                        }
                        else if (yyvsp[-1].id == tANDOP) {
                            yyvsp[-1].id = 1;
                        }
                        yyval.node = NEW_OP_ASGN2(yyvsp[-4].node, yyvsp[-2].id, yyvsp[-1].id, yyvsp[0].node);
                        fixpos(yyval.node, yyvsp[-4].node);
                    }
    break;
case 179:
#line 1047 "parse.y"
{
                        value_expr(yyvsp[0].node);
                        if (yyvsp[-1].id == tOROP) {
                            yyvsp[-1].id = 0;
                        }
                        else if (yyvsp[-1].id == tANDOP) {
                            yyvsp[-1].id = 1;
                        }
                        yyval.node = NEW_OP_ASGN2(yyvsp[-4].node, yyvsp[-2].id, yyvsp[-1].id, yyvsp[0].node);
                        fixpos(yyval.node, yyvsp[-4].node);
                    }
    break;
case 180:
#line 1059 "parse.y"
{
                        yyerror("constant re-assignment");
                        yyval.node = 0;
                    }
    break;
case 181:
#line 1064 "parse.y"
{
                        yyerror("constant re-assignment");
                        yyval.node = 0;
                    }
    break;
case 182:
#line 1069 "parse.y"
{
                        rb_backref_error(yyvsp[-2].node);
                        yyval.node = 0;
                    }
    break;
case 183:
#line 1074 "parse.y"
{
                        value_expr(yyvsp[-2].node);
                        value_expr(yyvsp[0].node);
                        if (nd_type(yyvsp[-2].node) == NODE_LIT && FIXNUM_P(yyvsp[-2].node->nd_lit) &&
                            nd_type(yyvsp[0].node) == NODE_LIT && FIXNUM_P(yyvsp[0].node->nd_lit)) {
                            yyvsp[-2].node->nd_lit = rb_range_new(yyvsp[-2].node->nd_lit, yyvsp[0].node->nd_lit, Qfalse);
                            yyval.node = yyvsp[-2].node;
                        }
                        else {
                            yyval.node = NEW_DOT2(yyvsp[-2].node, yyvsp[0].node);
                        }
                    }
    break;
case 184:
#line 1087 "parse.y"
{
                        value_expr(yyvsp[-2].node);
                        value_expr(yyvsp[0].node);
                        if (nd_type(yyvsp[-2].node) == NODE_LIT && FIXNUM_P(yyvsp[-2].node->nd_lit) &&
                            nd_type(yyvsp[0].node) == NODE_LIT && FIXNUM_P(yyvsp[0].node->nd_lit)) {
                            yyvsp[-2].node->nd_lit = rb_range_new(yyvsp[-2].node->nd_lit, yyvsp[0].node->nd_lit, Qtrue);
                            yyval.node = yyvsp[-2].node;
                        }
                        else {
                            yyval.node = NEW_DOT3(yyvsp[-2].node, yyvsp[0].node);
                        }
                    }
    break;
case 185:
#line 1100 "parse.y"
{
                        yyval.node = call_op(yyvsp[-2].node, '+', 1, yyvsp[0].node);
                    }
    break;
case 186:
#line 1104 "parse.y"
{
                        yyval.node = call_op(yyvsp[-2].node, '-', 1, yyvsp[0].node);
                    }
    break;
case 187:
#line 1108 "parse.y"
{
                        yyval.node = call_op(yyvsp[-2].node, '*', 1, yyvsp[0].node);
                    }
    break;
case 188:
#line 1112 "parse.y"
{
                        yyval.node = call_op(yyvsp[-2].node, '/', 1, yyvsp[0].node);
                    }
    break;
case 189:
#line 1116 "parse.y"
{
                        yyval.node = call_op(yyvsp[-2].node, '%', 1, yyvsp[0].node);
                    }
    break;
case 190:
#line 1120 "parse.y"
{
                        yyval.node = call_op(yyvsp[-2].node, tPOW, 1, yyvsp[0].node);
                    }
    break;
case 191:
#line 1124 "parse.y"
{
                        yyval.node = call_op(call_op(yyvsp[-2].node, tPOW, 1, yyvsp[0].node), tUMINUS, 0, 0);
                    }
    break;
case 192:
#line 1128 "parse.y"
{
                        yyval.node = call_op(call_op(yyvsp[-2].node, tPOW, 1, yyvsp[0].node), tUMINUS, 0, 0);
                    }
    break;
case 193:
#line 1132 "parse.y"
{
                        if (yyvsp[0].node && nd_type(yyvsp[0].node) == NODE_LIT) {
                            yyval.node = yyvsp[0].node;
                        }
                        else {
                            yyval.node = call_op(yyvsp[0].node, tUPLUS, 0, 0);
                        }
                    }
    break;
case 194:
#line 1141 "parse.y"
{
                        yyval.node = call_op(yyvsp[0].node, tUMINUS, 0, 0);
                    }
    break;
case 195:
#line 1145 "parse.y"
{
                        yyval.node = call_op(yyvsp[-2].node, '|', 1, yyvsp[0].node);
                    }
    break;
case 196:
#line 1149 "parse.y"
{
                        yyval.node = call_op(yyvsp[-2].node, '^', 1, yyvsp[0].node);
                    }
    break;
case 197:
#line 1153 "parse.y"
{
                        yyval.node = call_op(yyvsp[-2].node, '&', 1, yyvsp[0].node);
                    }
    break;
case 198:
#line 1157 "parse.y"
{
                        yyval.node = call_op(yyvsp[-2].node, tCMP, 1, yyvsp[0].node);
                    }
    break;
case 199:
#line 1161 "parse.y"
{
                        yyval.node = call_op(yyvsp[-2].node, '>', 1, yyvsp[0].node);
                    }
    break;
case 200:
#line 1165 "parse.y"
{
                        yyval.node = call_op(yyvsp[-2].node, tGEQ, 1, yyvsp[0].node);
                    }
    break;
case 201:
#line 1169 "parse.y"
{
                        yyval.node = call_op(yyvsp[-2].node, '<', 1, yyvsp[0].node);
                    }
    break;
case 202:
#line 1173 "parse.y"
{
                        yyval.node = call_op(yyvsp[-2].node, tLEQ, 1, yyvsp[0].node);
                    }
    break;
case 203:
#line 1177 "parse.y"
{
                        yyval.node = call_op(yyvsp[-2].node, tEQ, 1, yyvsp[0].node);
                    }
    break;
case 204:
#line 1181 "parse.y"
{
                        yyval.node = call_op(yyvsp[-2].node, tEQQ, 1, yyvsp[0].node);
                    }
    break;
case 205:
#line 1185 "parse.y"
{
                        yyval.node = NEW_NOT(call_op(yyvsp[-2].node, tEQ, 1, yyvsp[0].node));
                    }
    break;
case 206:
#line 1189 "parse.y"
{
                        yyval.node = match_gen(yyvsp[-2].node, yyvsp[0].node);
                    }
    break;
case 207:
#line 1193 "parse.y"
{
                        yyval.node = NEW_NOT(match_gen(yyvsp[-2].node, yyvsp[0].node));
                    }
    break;
case 208:
#line 1197 "parse.y"
{
                        yyval.node = NEW_NOT(cond(yyvsp[0].node));
                    }
    break;
case 209:
#line 1201 "parse.y"
{
                        yyval.node = call_op(yyvsp[0].node, '~', 0, 0);
                    }
    break;
case 210:
#line 1205 "parse.y"
{
                        yyval.node = call_op(yyvsp[-2].node, tLSHFT, 1, yyvsp[0].node);
                    }
    break;
case 211:
#line 1209 "parse.y"
{
                        yyval.node = call_op(yyvsp[-2].node, tRSHFT, 1, yyvsp[0].node);
                    }
    break;
case 212:
#line 1213 "parse.y"
{
                        yyval.node = logop(NODE_AND, yyvsp[-2].node, yyvsp[0].node);
                    }
    break;
case 213:
#line 1217 "parse.y"
{
                        yyval.node = logop(NODE_OR, yyvsp[-2].node, yyvsp[0].node);
                    }
    break;
case 214:
#line 1220 "parse.y"
{in_defined = 1;}
    break;
case 215:
#line 1221 "parse.y"
{
                        in_defined = 0;
                        yyval.node = NEW_DEFINED(yyvsp[0].node);
                    }
    break;
case 216:
#line 1226 "parse.y"
{
                        yyval.node = NEW_IF(cond(yyvsp[-4].node), yyvsp[-2].node, yyvsp[0].node);
                        fixpos(yyval.node, yyvsp[-4].node);
                    }
    break;
case 217:
#line 1231 "parse.y"
{
                        yyval.node = yyvsp[0].node;
                    }
    break;
case 218:
#line 1237 "parse.y"
{
                        value_expr(yyvsp[0].node);
                        yyval.node = yyvsp[0].node;
                    }
    break;
case 220:
#line 1245 "parse.y"
{
                        rb_warn("parenthesize argument(s) for future version");
                        yyval.node = NEW_LIST(yyvsp[-1].node);
                    }
    break;
case 221:
#line 1250 "parse.y"
{
                        yyval.node = yyvsp[-1].node;
                    }
    break;
case 222:
#line 1254 "parse.y"
{
                        value_expr(yyvsp[-1].node);
                        yyval.node = arg_concat(yyvsp[-4].node, yyvsp[-1].node);
                    }
    break;
case 223:
#line 1259 "parse.y"
{
                        yyval.node = NEW_LIST(NEW_HASH(yyvsp[-1].node));
                    }
    break;
case 224:
#line 1263 "parse.y"
{
                        value_expr(yyvsp[-1].node);
                        yyval.node = NEW_NEWLINE(NEW_SPLAT(yyvsp[-1].node));
                    }
    break;
case 225:
#line 1270 "parse.y"
{
                        yyval.node = yyvsp[-1].node;
                    }
    break;
case 226:
#line 1274 "parse.y"
{
                        yyval.node = yyvsp[-2].node;
                    }
    break;
case 227:
#line 1278 "parse.y"
{
                        rb_warn("parenthesize argument for future version");
                        yyval.node = NEW_LIST(yyvsp[-2].node);
                    }
    break;
case 228:
#line 1283 "parse.y"
{
                        rb_warn("parenthesize argument for future version");
                        yyval.node = list_append(yyvsp[-4].node, yyvsp[-2].node);
                    }
    break;
case 231:
#line 1294 "parse.y"
{
                        rb_warn("parenthesize argument(s) for future version");
                        yyval.node = NEW_LIST(yyvsp[0].node);
                    }
    break;
case 232:
#line 1299 "parse.y"
{
                        yyval.node = arg_blk_pass(yyvsp[-1].node, yyvsp[0].node);
                    }
    break;
case 233:
#line 1303 "parse.y"
{
                        yyval.node = arg_concat(yyvsp[-4].node, yyvsp[-1].node);
                        yyval.node = arg_blk_pass(yyval.node, yyvsp[0].node);
                    }
    break;
case 234:
#line 1308 "parse.y"
{
                        yyval.node = NEW_LIST(NEW_HASH(yyvsp[-1].node));
                        yyval.node = arg_blk_pass(yyval.node, yyvsp[0].node);
                    }
    break;
case 235:
#line 1313 "parse.y"
{
                        yyval.node = arg_concat(NEW_LIST(NEW_HASH(yyvsp[-4].node)), yyvsp[-1].node);
                        yyval.node = arg_blk_pass(yyval.node, yyvsp[0].node);
                    }
    break;
case 236:
#line 1318 "parse.y"
{
                        yyval.node = list_append(yyvsp[-3].node, NEW_HASH(yyvsp[-1].node));
                        yyval.node = arg_blk_pass(yyval.node, yyvsp[0].node);
                    }
    break;
case 237:
#line 1323 "parse.y"
{
                        value_expr(yyvsp[-1].node);
                        yyval.node = arg_concat(list_append(yyvsp[-6].node, NEW_HASH(yyvsp[-4].node)), yyvsp[-1].node);
                        yyval.node = arg_blk_pass(yyval.node, yyvsp[0].node);
                    }
    break;
case 238:
#line 1329 "parse.y"
{
                        yyval.node = arg_blk_pass(NEW_SPLAT(yyvsp[-1].node), yyvsp[0].node);
                    }
    break;
case 240:
#line 1336 "parse.y"
{
                        yyval.node = arg_blk_pass(list_concat(NEW_LIST(yyvsp[-3].node),yyvsp[-1].node), yyvsp[0].node);
                    }
    break;
case 241:
#line 1340 "parse.y"
{
                        yyval.node = arg_blk_pass(yyvsp[-2].node, yyvsp[0].node);
                    }
    break;
case 242:
#line 1344 "parse.y"
{
                        yyval.node = arg_concat(NEW_LIST(yyvsp[-4].node), yyvsp[-1].node);
                        yyval.node = arg_blk_pass(yyval.node, yyvsp[0].node);
                    }
    break;
case 243:
#line 1349 "parse.y"
{
                       yyval.node = arg_concat(list_concat(NEW_LIST(yyvsp[-6].node),yyvsp[-4].node), yyvsp[-1].node);
                        yyval.node = arg_blk_pass(yyval.node, yyvsp[0].node);
                    }
    break;
case 244:
#line 1354 "parse.y"
{
                        yyval.node = NEW_LIST(NEW_HASH(yyvsp[-1].node));
                        yyval.node = arg_blk_pass(yyval.node, yyvsp[0].node);
                    }
    break;
case 245:
#line 1359 "parse.y"
{
                        yyval.node = arg_concat(NEW_LIST(NEW_HASH(yyvsp[-4].node)), yyvsp[-1].node);
                        yyval.node = arg_blk_pass(yyval.node, yyvsp[0].node);
                    }
    break;
case 246:
#line 1364 "parse.y"
{
                        yyval.node = list_append(NEW_LIST(yyvsp[-3].node), NEW_HASH(yyvsp[-1].node));
                        yyval.node = arg_blk_pass(yyval.node, yyvsp[0].node);
                    }
    break;
case 247:
#line 1369 "parse.y"
{
                        yyval.node = list_append(list_concat(NEW_LIST(yyvsp[-5].node),yyvsp[-3].node), NEW_HASH(yyvsp[-1].node));
                        yyval.node = arg_blk_pass(yyval.node, yyvsp[0].node);
                    }
    break;
case 248:
#line 1374 "parse.y"
{
                        yyval.node = arg_concat(list_append(NEW_LIST(yyvsp[-6].node), NEW_HASH(yyvsp[-4].node)), yyvsp[-1].node);
                        yyval.node = arg_blk_pass(yyval.node, yyvsp[0].node);
                    }
    break;
case 249:
#line 1379 "parse.y"
{
                        yyval.node = arg_concat(list_append(list_concat(NEW_LIST(yyvsp[-8].node), yyvsp[-6].node), NEW_HASH(yyvsp[-4].node)), yyvsp[-1].node);
                        yyval.node = arg_blk_pass(yyval.node, yyvsp[0].node);
                    }
    break;
case 250:
#line 1384 "parse.y"
{
                        yyval.node = arg_blk_pass(NEW_SPLAT(yyvsp[-1].node), yyvsp[0].node);
                    }
    break;
case 252:
#line 1390 "parse.y"
{
                        yyval.num = cmdarg_stack;
                        CMDARG_PUSH(1);
                    }
    break;
case 253:
#line 1395 "parse.y"
{
                        /* CMDARG_POP() */
                        cmdarg_stack = yyvsp[-1].num;
                        yyval.node = yyvsp[0].node;
                    }
    break;
case 255:
#line 1403 "parse.y"
{lex_state = EXPR_ENDARG;}
    break;
case 256:
#line 1404 "parse.y"
{
                        rb_warn("don't put space before argument parentheses");
                        yyval.node = 0;
                    }
    break;
case 257:
#line 1408 "parse.y"
{lex_state = EXPR_ENDARG;}
    break;
case 258:
#line 1409 "parse.y"
{
                        rb_warn("don't put space before argument parentheses");
                        yyval.node = yyvsp[-2].node;
                    }
    break;
case 259:
#line 1416 "parse.y"
{
                        yyval.node = NEW_BLOCK_PASS(yyvsp[0].node);
                    }
    break;
case 260:
#line 1422 "parse.y"
{
                        yyval.node = yyvsp[0].node;
                    }
    break;
case 262:
#line 1429 "parse.y"
{
                        yyval.node = NEW_LIST(yyvsp[0].node);
                    }
    break;
case 263:
#line 1433 "parse.y"
{
                        yyval.node = list_append(yyvsp[-2].node, yyvsp[0].node);
                    }
    break;
case 264:
#line 1439 "parse.y"
{
                        yyval.node = list_append(yyvsp[-2].node, yyvsp[0].node);
                    }
    break;
case 265:
#line 1443 "parse.y"
{
                        yyval.node = arg_concat(yyvsp[-3].node, yyvsp[0].node);
                    }
    break;
case 266:
#line 1447 "parse.y"
{
                        yyval.node = NEW_SPLAT(yyvsp[0].node);
                    }
    break;
case 275:
#line 1461 "parse.y"
{
                        yyval.node = NEW_FCALL(yyvsp[0].id, 0);
                    }
    break;
case 276:
#line 1465 "parse.y"
{
                        yyvsp[0].num = ruby_sourceline;
                    }
    break;
case 277:
#line 1470 "parse.y"
{
                        if (yyvsp[-1].node == NULL)
                            yyval.node = NEW_NIL();
                        else
                            yyval.node = NEW_BEGIN(yyvsp[-1].node);
                        nd_set_line(yyval.node, yyvsp[-3].num);
                    }
    break;
case 278:
#line 1477 "parse.y"
{lex_state = EXPR_ENDARG;}
    break;
case 279:
#line 1478 "parse.y"
{
                        rb_warning("(...) interpreted as grouped expression");
                        yyval.node = yyvsp[-3].node;
                    }
    break;
case 280:
#line 1483 "parse.y"
{
                        yyval.node = yyvsp[-1].node;
                    }
    break;
case 281:
#line 1487 "parse.y"
{
                        yyval.node = NEW_COLON2(yyvsp[-2].node, yyvsp[0].id);
                    }
    break;
case 282:
#line 1491 "parse.y"
{
                        yyval.node = NEW_COLON3(yyvsp[0].id);
                    }
    break;
case 283:
#line 1495 "parse.y"
{
                        if (yyvsp[-3].node && nd_type(yyvsp[-3].node) == NODE_SELF)
                            yyval.node = NEW_FCALL(tAREF, yyvsp[-1].node);
                        else
                            yyval.node = NEW_CALL(yyvsp[-3].node, tAREF, yyvsp[-1].node);
                        fixpos(yyval.node, yyvsp[-3].node);
                    }
    break;
case 284:
#line 1503 "parse.y"
{
                        if (yyvsp[-1].node == 0) {
                            yyval.node = NEW_ZARRAY(); /* zero length array*/
                        }
                        else {
                            yyval.node = yyvsp[-1].node;
                        }
                    }
    break;
case 285:
#line 1512 "parse.y"
{
                        yyval.node = NEW_HASH(yyvsp[-1].node);
                    }
    break;
case 286:
#line 1516 "parse.y"
{
                        yyval.node = NEW_RETURN(0);
                    }
    break;
case 287:
#line 1520 "parse.y"
{
                        yyval.node = new_yield(yyvsp[-1].node);
                    }
    break;
case 288:
#line 1524 "parse.y"
{
                        yyval.node = NEW_YIELD(0, Qfalse);
                    }
    break;
case 289:
#line 1528 "parse.y"
{
                        yyval.node = NEW_YIELD(0, Qfalse);
                    }
    break;
case 290:
#line 1531 "parse.y"
{in_defined = 1;}
    break;
case 291:
#line 1532 "parse.y"
{
                        in_defined = 0;
                        yyval.node = NEW_DEFINED(yyvsp[-1].node);
                    }
    break;
case 292:
#line 1537 "parse.y"
{
                        yyvsp[0].node->nd_iter = NEW_FCALL(yyvsp[-1].id, 0);
                        yyval.node = yyvsp[0].node;
                        fixpos(yyvsp[0].node->nd_iter, yyvsp[0].node);
                    }
    break;
case 294:
#line 1544 "parse.y"
{
                        if (yyvsp[-1].node && nd_type(yyvsp[-1].node) == NODE_BLOCK_PASS) {
                            rb_compile_error("both block arg and actual block given");
                        }
                        yyvsp[0].node->nd_iter = yyvsp[-1].node;
                        yyval.node = yyvsp[0].node;
                        fixpos(yyval.node, yyvsp[-1].node);
                    }
    break;
case 295:
#line 1556 "parse.y"
{
                        yyval.node = NEW_IF(cond(yyvsp[-4].node), yyvsp[-2].node, yyvsp[-1].node);
                        fixpos(yyval.node, yyvsp[-4].node);
                        if (cond_negative(&yyval.node->nd_cond)) {
                            NODE *tmp = yyval.node->nd_body;
                            yyval.node->nd_body = yyval.node->nd_else;
                            yyval.node->nd_else = tmp;
                        }
                    }
    break;
case 296:
#line 1569 "parse.y"
{
                        yyval.node = NEW_UNLESS(cond(yyvsp[-4].node), yyvsp[-2].node, yyvsp[-1].node);
                        fixpos(yyval.node, yyvsp[-4].node);
                        if (cond_negative(&yyval.node->nd_cond)) {
                            NODE *tmp = yyval.node->nd_body;
                            yyval.node->nd_body = yyval.node->nd_else;
                            yyval.node->nd_else = tmp;
                        }
                    }
    break;
case 297:
#line 1578 "parse.y"
{COND_PUSH(1);}
    break;
case 298:
#line 1578 "parse.y"
{COND_POP();}
    break;
case 299:
#line 1581 "parse.y"
{
                        yyval.node = NEW_WHILE(cond(yyvsp[-4].node), yyvsp[-1].node, 1);
                        fixpos(yyval.node, yyvsp[-4].node);
                        if (cond_negative(&yyval.node->nd_cond)) {
                            nd_set_type(yyval.node, NODE_UNTIL);
                        }
                    }
    break;
case 300:
#line 1588 "parse.y"
{COND_PUSH(1);}
    break;
case 301:
#line 1588 "parse.y"
{COND_POP();}
    break;
case 302:
#line 1591 "parse.y"
{
                        yyval.node = NEW_UNTIL(cond(yyvsp[-4].node), yyvsp[-1].node, 1);
                        fixpos(yyval.node, yyvsp[-4].node);
                        if (cond_negative(&yyval.node->nd_cond)) {
                            nd_set_type(yyval.node, NODE_WHILE);
                        }
                    }
    break;
case 303:
#line 1601 "parse.y"
{
                        yyval.node = NEW_CASE(yyvsp[-3].node, yyvsp[-1].node);
                        fixpos(yyval.node, yyvsp[-3].node);
                    }
    break;
case 304:
#line 1606 "parse.y"
{
                        yyval.node = yyvsp[-1].node;
                    }
    break;
case 305:
#line 1610 "parse.y"
{
                        yyval.node = yyvsp[-1].node;
                    }
    break;
case 306:
#line 1613 "parse.y"
{COND_PUSH(1);}
    break;
case 307:
#line 1613 "parse.y"
{COND_POP();}
    break;
case 308:
#line 1616 "parse.y"
{
                        yyval.node = NEW_FOR(yyvsp[-7].node, yyvsp[-4].node, yyvsp[-1].node);
                        fixpos(yyval.node, yyvsp[-7].node);
                    }
    break;
case 309:
#line 1621 "parse.y"
{
                        if (in_def || in_single)
                            yyerror("class definition in method body");
                        class_nest++;
                        local_push(0);
                        yyval.num = ruby_sourceline;
                    }
    break;
case 310:
#line 1630 "parse.y"
{
                        yyval.node = NEW_CLASS(yyvsp[-4].node, yyvsp[-1].node, yyvsp[-3].node);
                        nd_set_line(yyval.node, yyvsp[-2].num);
                        local_pop();
                        class_nest--;
                    }
    break;
case 311:
#line 1637 "parse.y"
{
                        yyval.num = in_def;
                        in_def = 0;
                    }
    break;
case 312:
#line 1642 "parse.y"
{
                        yyval.num = in_single;
                        in_single = 0;
                        class_nest++;
                        local_push(0);
                    }
    break;
case 313:
#line 1650 "parse.y"
{
                        yyval.node = NEW_SCLASS(yyvsp[-5].node, yyvsp[-1].node);
                        fixpos(yyval.node, yyvsp[-5].node);
                        local_pop();
                        class_nest--;
                        in_def = yyvsp[-4].num;
                        in_single = yyvsp[-2].num;
                    }
    break;
case 314:
#line 1659 "parse.y"
{
                        if (in_def || in_single)
                            yyerror("module definition in method body");
                        class_nest++;
                        local_push(0);
                        yyval.num = ruby_sourceline;
                    }
    break;
case 315:
#line 1668 "parse.y"
{
                        yyval.node = NEW_MODULE(yyvsp[-3].node, yyvsp[-1].node);
                        nd_set_line(yyval.node, yyvsp[-2].num);
                        local_pop();
                        class_nest--;
                    }
    break;
case 316:
#line 1675 "parse.y"
{
                        yyval.id = cur_mid;
                        cur_mid = yyvsp[0].id;
                        in_def++;
                        local_push(0);
                    }
    break;
case 317:
#line 1684 "parse.y"
{
                        if (!yyvsp[-1].node) yyvsp[-1].node = NEW_NIL();
                        yyval.node = NEW_DEFN(yyvsp[-4].id, yyvsp[-2].node, yyvsp[-1].node, NOEX_PRIVATE);
                        fixpos(yyval.node, yyvsp[-2].node);
                        local_pop();
                        in_def--;
                        cur_mid = yyvsp[-3].id;
                    }
    break;
case 318:
#line 1692 "parse.y"
{lex_state = EXPR_FNAME;}
    break;
case 319:
#line 1693 "parse.y"
{
                        in_single++;
                        local_push(0);
                        lex_state = EXPR_END; /* force for args */
                    }
    break;
case 320:
#line 1701 "parse.y"
{
                        yyval.node = NEW_DEFS(yyvsp[-7].node, yyvsp[-4].id, yyvsp[-2].node, yyvsp[-1].node);
                        fixpos(yyval.node, yyvsp[-7].node);
                        local_pop();
                        in_single--;
                    }
    break;
case 321:
#line 1708 "parse.y"
{
                        yyval.node = NEW_BREAK(0);
                    }
    break;
case 322:
#line 1712 "parse.y"
{
                        yyval.node = NEW_NEXT(0);
                    }
    break;
case 323:
#line 1716 "parse.y"
{
                        yyval.node = NEW_REDO();
                    }
    break;
case 324:
#line 1720 "parse.y"
{
                        yyval.node = NEW_RETRY();
                    }
    break;
case 325:
#line 1726 "parse.y"
{
                        value_expr(yyvsp[0].node);
                        yyval.node = yyvsp[0].node;
                    }
    break;
case 334:
#line 1747 "parse.y"
{
                        yyval.node = NEW_IF(cond(yyvsp[-3].node), yyvsp[-1].node, yyvsp[0].node);
                        fixpos(yyval.node, yyvsp[-3].node);
                    }
    break;
case 336:
#line 1755 "parse.y"
{
                        yyval.node = yyvsp[0].node;
                    }
    break;
case 340:
#line 1766 "parse.y"
{
                        yyval.node = (NODE*)1;
                    }
    break;
case 341:
#line 1770 "parse.y"
{
                        yyval.node = (NODE*)1;
                    }
    break;
case 342:
#line 1774 "parse.y"
{
                        yyval.node = yyvsp[-1].node;
                    }
    break;
case 343:
#line 1780 "parse.y"
{
                        yyval.vars = dyna_push();
                        yyvsp[0].num = ruby_sourceline;
                    }
    break;
case 344:
#line 1784 "parse.y"
{yyval.vars = ruby_dyna_vars;}
    break;
case 345:
#line 1787 "parse.y"
{
                        yyval.node = NEW_ITER(yyvsp[-3].node, 0, dyna_init(yyvsp[-1].node, yyvsp[-2].vars));
                        nd_set_line(yyval.node, yyvsp[-5].num);
                        dyna_pop(yyvsp[-4].vars);
                    }
    break;
case 346:
#line 1795 "parse.y"
{
                        if (yyvsp[-1].node && nd_type(yyvsp[-1].node) == NODE_BLOCK_PASS) {
                            rb_compile_error("both block arg and actual block given");
                        }
                        yyvsp[0].node->nd_iter = yyvsp[-1].node;
                        yyval.node = yyvsp[0].node;
                        fixpos(yyval.node, yyvsp[-1].node);
                    }
    break;
case 347:
#line 1804 "parse.y"
{
                        yyval.node = new_call(yyvsp[-3].node, yyvsp[-1].id, yyvsp[0].node);
                    }
    break;
case 348:
#line 1808 "parse.y"
{
                        yyval.node = new_call(yyvsp[-3].node, yyvsp[-1].id, yyvsp[0].node);
                    }
    break;
case 349:
#line 1814 "parse.y"
{
                        yyval.node = new_fcall(yyvsp[-1].id, yyvsp[0].node);
                        fixpos(yyval.node, yyvsp[0].node);
                    }
    break;
case 350:
#line 1819 "parse.y"
{
                        yyval.node = new_call(yyvsp[-3].node, yyvsp[-1].id, yyvsp[0].node);
                        fixpos(yyval.node, yyvsp[-3].node);
                    }
    break;
case 351:
#line 1824 "parse.y"
{
                        yyval.node = new_call(yyvsp[-3].node, yyvsp[-1].id, yyvsp[0].node);
                        fixpos(yyval.node, yyvsp[-3].node);
                    }
    break;
case 352:
#line 1829 "parse.y"
{
                        yyval.node = new_call(yyvsp[-2].node, yyvsp[0].id, 0);
                    }
    break;
case 353:
#line 1833 "parse.y"
{
                        yyval.node = new_super(yyvsp[0].node);
                    }
    break;
case 354:
#line 1837 "parse.y"
{
                        yyval.node = NEW_ZSUPER();
                    }
    break;
case 355:
#line 1843 "parse.y"
{
                        yyval.vars = dyna_push();
                        yyvsp[0].num = ruby_sourceline;
                    }
    break;
case 356:
#line 1847 "parse.y"
{yyval.vars = ruby_dyna_vars;}
    break;
case 357:
#line 1849 "parse.y"
{
                        yyval.node = NEW_ITER(yyvsp[-3].node, 0, dyna_init(yyvsp[-1].node, yyvsp[-2].vars));
                        nd_set_line(yyval.node, yyvsp[-5].num);
                        dyna_pop(yyvsp[-4].vars);
                    }
    break;
case 358:
#line 1855 "parse.y"
{
                        yyval.vars = dyna_push();
                        yyvsp[0].num = ruby_sourceline;
                    }
    break;
case 359:
#line 1859 "parse.y"
{yyval.vars = ruby_dyna_vars;}
    break;
case 360:
#line 1861 "parse.y"
{
                        yyval.node = NEW_ITER(yyvsp[-3].node, 0, dyna_init(yyvsp[-1].node, yyvsp[-2].vars));
                        nd_set_line(yyval.node, yyvsp[-5].num);
                        dyna_pop(yyvsp[-4].vars);
                    }
    break;
case 361:
#line 1871 "parse.y"
{
                        yyval.node = NEW_WHEN(yyvsp[-3].node, yyvsp[-1].node, yyvsp[0].node);
                    }
    break;
case 363:
#line 1877 "parse.y"
{
                        yyval.node = list_append(yyvsp[-3].node, NEW_WHEN(yyvsp[0].node, 0, 0));
                    }
    break;
case 364:
#line 1881 "parse.y"
{
                        yyval.node = NEW_LIST(NEW_WHEN(yyvsp[0].node, 0, 0));
                    }
    break;
case 367:
#line 1893 "parse.y"
{
                        if (yyvsp[-3].node) {
                            yyvsp[-3].node = node_assign(yyvsp[-3].node, NEW_GVAR(rb_intern("$!")));
                            yyvsp[-1].node = block_append(yyvsp[-3].node, yyvsp[-1].node);
                        }
                        yyval.node = NEW_RESBODY(yyvsp[-4].node, yyvsp[-1].node, yyvsp[0].node);
                        fixpos(yyval.node, yyvsp[-4].node?yyvsp[-4].node:yyvsp[-1].node);
                    }
    break;
case 369:
#line 1905 "parse.y"
{
                        yyval.node = NEW_LIST(yyvsp[0].node);
                    }
    break;
case 372:
#line 1913 "parse.y"
{
                        yyval.node = yyvsp[0].node;
                    }
    break;
case 374:
#line 1920 "parse.y"
{
                        if (yyvsp[0].node)
                            yyval.node = yyvsp[0].node;
                        else
                            /* place holder */
                            yyval.node = NEW_NIL();
                    }
    break;
case 377:
#line 1932 "parse.y"
{
                        yyval.node = NEW_LIT(ID2SYM(yyvsp[0].id));
                    }
    break;
case 379:
#line 1939 "parse.y"
{
                        NODE *node = yyvsp[0].node;
                        if (!node) {
                            node = NEW_STR(rb_str_new(0, 0));
                        }
                        else {
                            node = evstr2dstr(node);
                        }
                        yyval.node = node;
                    }
    break;
case 381:
#line 1953 "parse.y"
{
                        yyval.node = literal_concat(yyvsp[-1].node, yyvsp[0].node);
                    }
    break;
case 382:
#line 1959 "parse.y"
{
                        yyval.node = yyvsp[-1].node;
                    }
    break;
case 383:
#line 1965 "parse.y"
{
                        NODE *node = yyvsp[-1].node;
                        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;
                            }
                        }
                        yyval.node = node;
                    }
    break;
case 384:
#line 1988 "parse.y"
{
                        int options = yyvsp[0].num;
                        NODE *node = yyvsp[-1].node;
                        if (!node) {
                            node = NEW_LIT(rb_reg_new("", 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_new(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;
                        }
                        yyval.node = node;
                    }
    break;
case 385:
#line 2021 "parse.y"
{
                        yyval.node = NEW_ZARRAY();
                    }
    break;
case 386:
#line 2025 "parse.y"
{
                        yyval.node = yyvsp[-1].node;
                    }
    break;
case 387:
#line 2031 "parse.y"
{
                        yyval.node = 0;
                    }
    break;
case 388:
#line 2035 "parse.y"
{
                        yyval.node = list_append(yyvsp[-2].node, evstr2dstr(yyvsp[-1].node));
                    }
    break;
case 390:
#line 2042 "parse.y"
{
                        yyval.node = literal_concat(yyvsp[-1].node, yyvsp[0].node);
                    }
    break;
case 391:
#line 2048 "parse.y"
{
                        yyval.node = NEW_ZARRAY();
                    }
    break;
case 392:
#line 2052 "parse.y"
{
                        yyval.node = yyvsp[-1].node;
                    }
    break;
case 393:
#line 2058 "parse.y"
{
                        yyval.node = 0;
                    }
    break;
case 394:
#line 2062 "parse.y"
{
                        yyval.node = list_append(yyvsp[-2].node, yyvsp[-1].node);
                    }
    break;
case 395:
#line 2068 "parse.y"
{
                        yyval.node = 0;
                    }
    break;
case 396:
#line 2072 "parse.y"
{
                        yyval.node = literal_concat(yyvsp[-1].node, yyvsp[0].node);
                    }
    break;
case 397:
#line 2078 "parse.y"
{
                        yyval.node = 0;
                    }
    break;
case 398:
#line 2082 "parse.y"
{
                        yyval.node = literal_concat(yyvsp[-1].node, yyvsp[0].node);
                    }
    break;
case 400:
#line 2089 "parse.y"
{
                        yyval.node = lex_strterm;
                        lex_strterm = 0;
                        lex_state = EXPR_BEG;
                    }
    break;
case 401:
#line 2095 "parse.y"
{
                        lex_strterm = yyvsp[-1].node;
                        yyval.node = NEW_EVSTR(yyvsp[0].node);
                    }
    break;
case 402:
#line 2100 "parse.y"
{
                        yyval.node = lex_strterm;
                        lex_strterm = 0;
                        lex_state = EXPR_BEG;
                        COND_PUSH(0);
                        CMDARG_PUSH(0);
                    }
    break;
case 403:
#line 2108 "parse.y"
{
                        lex_strterm = yyvsp[-2].node;
                        COND_LEXPOP();
                        CMDARG_LEXPOP();
                        if ((yyval.node = yyvsp[-1].node) && nd_type(yyval.node) == NODE_NEWLINE) {
                            yyval.node = yyval.node->nd_next;
                            rb_gc_force_recycle((VALUE)yyvsp[-1].node);
                        }
                        yyval.node = new_evstr(yyval.node);
                    }
    break;
case 404:
#line 2120 "parse.y"
{yyval.node = NEW_GVAR(yyvsp[0].id);}
    break;
case 405:
#line 2121 "parse.y"
{yyval.node = NEW_IVAR(yyvsp[0].id);}
    break;
case 406:
#line 2122 "parse.y"
{yyval.node = NEW_CVAR(yyvsp[0].id);}
    break;
case 408:
#line 2127 "parse.y"
{
                        lex_state = EXPR_END;
                        yyval.id = yyvsp[0].id;
                    }
    break;
case 413:
#line 2140 "parse.y"
{
                        lex_state = EXPR_END;
                        if (!(yyval.node = yyvsp[-1].node)) {
                            yyerror("empty symbol literal");
                        }
                        else {
                            VALUE lit;

                            switch (nd_type(yyval.node)) {
                              case NODE_DSTR:
                                nd_set_type(yyval.node, NODE_DSYM);
                                break;
                              case NODE_STR:
                                lit = yyval.node->nd_lit;
                                if (RSTRING(lit)->len == 0) {
                                    yyerror("empty symbol literal");
                                    break;
                                }
                                if (strlen(RSTRING(lit)->ptr) == RSTRING(lit)->len) {
                                    yyval.node->nd_lit = ID2SYM(rb_intern(RSTRING(yyval.node->nd_lit)->ptr));
                                    nd_set_type(yyval.node, NODE_LIT);
                                    break;
                                }
                                /* fall through */
                              default:
                                yyval.node = NEW_NODE(NODE_DSYM, rb_str_new(0, 0), 1, NEW_LIST(yyval.node));
                                break;
                            }
                        }
                    }
    break;
case 416:
#line 2175 "parse.y"
{
                        yyval.node = negate_lit(yyvsp[0].node);
                    }
    break;
case 417:
#line 2179 "parse.y"
{
                        yyval.node = negate_lit(yyvsp[0].node);
                    }
    break;
case 423:
#line 2189 "parse.y"
{yyval.id = kNIL;}
    break;
case 424:
#line 2190 "parse.y"
{yyval.id = kSELF;}
    break;
case 425:
#line 2191 "parse.y"
{yyval.id = kTRUE;}
    break;
case 426:
#line 2192 "parse.y"
{yyval.id = kFALSE;}
    break;
case 427:
#line 2193 "parse.y"
{yyval.id = k__FILE__;}
    break;
case 428:
#line 2194 "parse.y"
{yyval.id = k__LINE__;}
    break;
case 429:
#line 2198 "parse.y"
{
                        yyval.node = gettable(yyvsp[0].id);
                    }
    break;
case 430:
#line 2204 "parse.y"
{
                        yyval.node = assignable(yyvsp[0].id, 0);
                    }
    break;
case 433:
#line 2214 "parse.y"
{
                        yyval.node = 0;
                    }
    break;
case 434:
#line 2218 "parse.y"
{
                        lex_state = EXPR_BEG;
                    }
    break;
case 435:
#line 2222 "parse.y"
{
                        yyval.node = yyvsp[-1].node;
                    }
    break;
case 436:
#line 2225 "parse.y"
{yyerrok; yyval.node = 0;}
    break;
case 437:
#line 2229 "parse.y"
{
                        yyval.node = yyvsp[-2].node;
                        lex_state = EXPR_BEG;
                    }
    break;
case 438:
#line 2234 "parse.y"
{
                        yyval.node = yyvsp[-1].node;
                    }
    break;
case 439:
#line 2240 "parse.y"
{
                        yyval.node = block_append(NEW_ARGS(yyvsp[-5].num, yyvsp[-3].node, yyvsp[-1].id), yyvsp[0].node);
                    }
    break;
case 440:
#line 2244 "parse.y"
{
                        yyval.node = block_append(NEW_ARGS(yyvsp[-3].num, yyvsp[-1].node, -1), yyvsp[0].node);
                    }
    break;
case 441:
#line 2248 "parse.y"
{
                        yyval.node = block_append(NEW_ARGS(yyvsp[-3].num, 0, yyvsp[-1].id), yyvsp[0].node);
                    }
    break;
case 442:
#line 2252 "parse.y"
{
                        yyval.node = block_append(NEW_ARGS(yyvsp[-1].num, 0, -1), yyvsp[0].node);
                    }
    break;
case 443:
#line 2256 "parse.y"
{
                        yyval.node = block_append(NEW_ARGS(0, yyvsp[-3].node, yyvsp[-1].id), yyvsp[0].node);
                    }
    break;
case 444:
#line 2260 "parse.y"
{
                        yyval.node = block_append(NEW_ARGS(0, yyvsp[-1].node, -1), yyvsp[0].node);
                    }
    break;
case 445:
#line 2264 "parse.y"
{
                        yyval.node = block_append(NEW_ARGS(0, 0, yyvsp[-1].id), yyvsp[0].node);
                    }
    break;
case 446:
#line 2268 "parse.y"
{
                        yyval.node = block_append(NEW_ARGS(0, 0, -1), yyvsp[0].node);
                    }
    break;
case 447:
#line 2272 "parse.y"
{
                        yyval.node = NEW_ARGS(0, 0, -1);
                    }
    break;
case 448:
#line 2278 "parse.y"
{
                        yyerror("formal argument cannot be a constant");
                    }
    break;
case 449:
#line 2282 "parse.y"
{
                        yyerror("formal argument cannot be an instance variable");
                    }
    break;
case 450:
#line 2286 "parse.y"
{
                        yyerror("formal argument cannot be a global variable");
                    }
    break;
case 451:
#line 2290 "parse.y"
{
                        yyerror("formal argument cannot be a class variable");
                    }
    break;
case 452:
#line 2294 "parse.y"
{
                        if (!is_local_id(yyvsp[0].id))
                            yyerror("formal argument must be local variable");
                        else if (local_id(yyvsp[0].id))
                            yyerror("duplicate argument name");
                        local_cnt(yyvsp[0].id);
                        yyval.num = 1;
                    }
    break;
case 454:
#line 2306 "parse.y"
{
                        yyval.num += 1;
                    }
    break;
case 455:
#line 2312 "parse.y"
{
                        if (!is_local_id(yyvsp[-2].id))
                            yyerror("formal argument must be local variable");
                        else if (local_id(yyvsp[-2].id))
                            yyerror("duplicate optional argument name");
                        yyval.node = assignable(yyvsp[-2].id, yyvsp[0].node);
                    }
    break;
case 456:
#line 2322 "parse.y"
{
                        yyval.node = NEW_BLOCK(yyvsp[0].node);
                        yyval.node->nd_end = yyval.node;
                    }
    break;
case 457:
#line 2327 "parse.y"
{
                        yyval.node = block_append(yyvsp[-2].node, yyvsp[0].node);
                    }
    break;
case 460:
#line 2337 "parse.y"
{
                        if (!is_local_id(yyvsp[0].id))
                            yyerror("rest argument must be local variable");
                        else if (local_id(yyvsp[0].id))
                            yyerror("duplicate rest argument name");
                        yyval.id = local_cnt(yyvsp[0].id);
                    }
    break;
case 461:
#line 2345 "parse.y"
{
                        yyval.id = -2;
                    }
    break;
case 464:
#line 2355 "parse.y"
{
                        if (!is_local_id(yyvsp[0].id))
                            yyerror("block argument must be local variable");
                        else if (local_id(yyvsp[0].id))
                            yyerror("duplicate block argument name");
                        yyval.node = NEW_BLOCK_ARG(yyvsp[0].id);
                    }
    break;
case 465:
#line 2365 "parse.y"
{
                        yyval.node = yyvsp[0].node;
                    }
    break;
case 467:
#line 2372 "parse.y"
{
                        if (nd_type(yyvsp[0].node) == NODE_SELF) {
                            yyval.node = NEW_SELF();
                        }
                        else {
                            yyval.node = yyvsp[0].node;
                            value_expr(yyval.node);
                        }
                    }
    break;
case 468:
#line 2381 "parse.y"
{lex_state = EXPR_BEG;}
    break;
case 469:
#line 2382 "parse.y"
{
                        if (yyvsp[-2].node == 0) {
                            yyerror("can't define singleton method for ().");
                        }
                        else {
                            switch (nd_type(yyvsp[-2].node)) {
                              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(yyvsp[-2].node);
                                break;
                            }
                        }
                        yyval.node = yyvsp[-2].node;
                    }
    break;
case 471:
#line 2408 "parse.y"
{
                        yyval.node = yyvsp[-1].node;
                    }
    break;
case 472:
#line 2412 "parse.y"
{
                        if (yyvsp[-1].node->nd_alen%2 != 0) {
                            yyerror("odd number list for Hash");
                        }
                        yyval.node = yyvsp[-1].node;
                    }
    break;
case 474:
#line 2422 "parse.y"
{
                        yyval.node = list_concat(yyvsp[-2].node, yyvsp[0].node);
                    }
    break;
case 475:
#line 2428 "parse.y"
{
                        yyval.node = list_append(NEW_LIST(yyvsp[-2].node), yyvsp[0].node);
                    }
    break;
case 495:
#line 2466 "parse.y"
{yyerrok;}
    break;
case 498:
#line 2471 "parse.y"
{yyerrok;}
    break;
case 499:
#line 2474 "parse.y"
{yyval.node = 0;}
    break;
}

#line 706 "/usr/share/bison/bison.simple"

  yyvsp -= yylen;
  yyssp -= yylen;
#if YYLSP_NEEDED
  yylsp -= yylen;
#endif

#if YYDEBUG
  if (yydebug)
    {
      short *yyssp1 = yyss - 1;
      YYFPRINTF (stderr, "state stack now");
      while (yyssp1 != yyssp)
        YYFPRINTF (stderr, " %d", *++yyssp1);
      YYFPRINTF (stderr, "\n");
    }
#endif

  *++yyvsp = yyval;
#if YYLSP_NEEDED
  *++yylsp = yyloc;
#endif

  /* 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 - YYNTBASE] + *yyssp;
  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    yystate = yytable[yystate];
  else
    yystate = yydefgoto[yyn - YYNTBASE];

  goto yynewstate;

/*------------------------------------.
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
  /* If not already recovering from an error, report this error.  */
  if (!yyerrstatus)
    {
      ++yynerrs;

#ifdef YYERROR_VERBOSE
      yyn = yypact[yystate];

      if (yyn > YYFLAG && yyn < YYLAST)
        {
          YYSIZE_T yysize = 0;
          char *yymsg;
          int yyx, yycount;

          yycount = 0;
          /* Start YYX at -YYN if negative to avoid negative indexes in
             YYCHECK.  */
          for (yyx = yyn < 0 ? -yyn : 0;
               yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
            if (yycheck[yyx + yyn] == yyx)
              yysize += yystrlen (yytname[yyx]) + 15, yycount++;
          yysize += yystrlen ("parse error, unexpected ") + 1;
          yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
          yymsg = (char *) YYSTACK_ALLOC (yysize);
          if (yymsg != 0)
            {
              char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
              yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);

              if (yycount < 5)
                {
                  yycount = 0;
                  for (yyx = yyn < 0 ? -yyn : 0;
                       yyx < (int) (sizeof (yytname) / sizeof (char *));
                       yyx++)
                    if (yycheck[yyx + yyn] == yyx)
                      {
                        const char *yyq = ! yycount ? ", expecting " : " or ";
                        yyp = yystpcpy (yyp, yyq);
                        yyp = yystpcpy (yyp, yytname[yyx]);
                        yycount++;
                      }
                }
              yyerror (yymsg);
              YYSTACK_FREE (yymsg);
            }
          else
            yyerror ("parse error; also virtual memory exhausted");
        }
      else
#endif /* defined (YYERROR_VERBOSE) */
        yyerror ("parse error");
    }
  goto yyerrlab1;

/*--------------------------------------------------.
| yyerrlab1 -- error raised explicitly by an action |
`--------------------------------------------------*/
yyerrlab1:
  if (yyerrstatus == 3)
    {
      /* If just tried and failed to reuse lookahead token after an
         error, discard it.  */

      /* return failure if at end of input */
      if (yychar == YYEOF)
        YYABORT;
      YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
                  yychar, yytname[yychar1]));
      yychar = YYEMPTY;
    }

  /* Else will try to reuse lookahead token after shifting the error
     token.  */

  yyerrstatus = 3;              /* Each real token shifted decrements this */

  goto yyerrhandle;

/*-------------------------------------------------------------------.
| yyerrdefault -- current state does not do anything special for the |
| error token.                                                       |
`-------------------------------------------------------------------*/
yyerrdefault:
#if 0
  /* This is wrong; only states that explicitly want error tokens
     should shift them.  */

  /* If its default is to accept any token, ok.  Otherwise pop it.  */
  yyn = yydefact[yystate];
  if (yyn)
    goto yydefault;
#endif

/*---------------------------------------------------------------.
| yyerrpop -- pop the current state because it cannot handle the |
| error token                                                    |
`---------------------------------------------------------------*/
yyerrpop:
  if (yyssp == yyss)
    YYABORT;
  yyvsp--;
  yystate = *--yyssp;
#if YYLSP_NEEDED
  yylsp--;
#endif

#if YYDEBUG
  if (yydebug)
    {
      short *yyssp1 = yyss - 1;
      YYFPRINTF (stderr, "Error: state stack now");
      while (yyssp1 != yyssp)
        YYFPRINTF (stderr, " %d", *++yyssp1);
      YYFPRINTF (stderr, "\n");
    }
#endif

/*--------------.
| yyerrhandle.  |
`--------------*/
yyerrhandle:
  yyn = yypact[yystate];
  if (yyn == YYFLAG)
    goto yyerrdefault;

  yyn += YYTERROR;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
    goto yyerrdefault;

  yyn = yytable[yyn];
  if (yyn < 0)
    {
      if (yyn == YYFLAG)
        goto yyerrpop;
      yyn = -yyn;
      goto yyreduce;
    }
  else if (yyn == 0)
    goto yyerrpop;

  if (yyn == YYFINAL)
    YYACCEPT;

  YYDPRINTF ((stderr, "Shifting error token, "));

  *++yyvsp = yylval;
#if YYLSP_NEEDED
  *++yylsp = yylloc;
#endif

  yystate = yyn;
  goto yynewstate;

/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here.  |
`-------------------------------------*/
yyacceptlab:
  yyresult = 0;
  goto yyreturn;

/*-----------------------------------.
| yyabortlab -- YYABORT comes here.  |
`-----------------------------------*/
yyabortlab:
  yyresult = 1;
  goto yyreturn;

/*---------------------------------------------.
| yyoverflowab -- parser overflow comes here.  |
`---------------------------------------------*/
yyoverflowlab:
  yyerror ("parser stack overflow");
  yyresult = 2;
  /* Fall through.  */

yyreturn:
#ifndef yyoverflow
  if (yyss != yyssa)
    YYSTACK_FREE (yyss);
#endif
  return yyresult;
}
#line 2476 "parse.y"

#ifdef yystacksize
#undef YYMALLOC
#endif

#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 char *tokenbuf = NULL;
static int   tokidx, toksiz = 0;

#define LEAVE_BS 1

static VALUE (*lex_gets)();     /* gets function */
static VALUE lex_input;         /* non-nil if File */
static VALUE lex_lastline;      /* gc protect */
static char *lex_pbeg;
static char *lex_p;
static char *lex_pend;

static int
yyerror(msg)
    const char *msg;
{
    char *p, *pe, *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) {
        buf = ALLOCA_N(char, len+2);
        MEMCPY(buf, p, char, len);
        buf[len] = '\0';
        rb_compile_error_append("%s", buf);

        i = lex_p - p;
        p = buf; pe = p + len;

        while (p < pe) {
            if (*p != '\t') *p = ' ';
            p++;
        }
        buf[i] = '^';
        buf[i+1] = '\0';
        rb_compile_error_append("%s", buf);
    }

    return 0;
}

static int heredoc_end;
static int command_start = Qtrue;

int ruby_in_compile = 0;
int ruby__end__seen;

static VALUE ruby_debug_lines;
#ifdef YYMALLOC
static NODE *parser_heap;
#endif

static NODE*
yycompile(f, line)
    char *f;
    int line;
{
    int n;
    NODE *node = 0;
    struct RVarmap *vp, *vars = ruby_dyna_vars;

    ruby_in_compile = 1;
    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);
            while (line > 1) {
                rb_ary_push(ruby_debug_lines, str);
                line--;
            }
        }
    }

    ruby__end__seen = 0;
    ruby_eval_tree = 0;
    heredoc_end = 0;
    lex_strterm = 0;
    ruby_current_node = 0;
    ruby_sourcefile = rb_source_filename(f);
    n = yyparse();
    ruby_debug_lines = 0;
    compile_for_eval = 0;
    ruby_in_compile = 0;
    cond_stack = 0;
    cmdarg_stack = 0;
    command_start = 1;
    class_nest = 0;
    in_single = 0;
    in_def = 0;
    cur_mid = 0;

    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 (n == 0) node = ruby_eval_tree;
    else ruby_eval_tree_begin = 0;
    return node;
}

static int lex_gets_ptr;

static VALUE
lex_get_str(s)
    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()
{
    VALUE line = (*lex_gets)(lex_input);
    if (ruby_debug_lines && !NIL_P(line)) {
        rb_ary_push(ruby_debug_lines, line);
    }
    return line;
}

NODE*
rb_compile_string(f, s, line)
    const char *f;
    VALUE s;
    int line;
{
    lex_gets = lex_get_str;
    lex_gets_ptr = 0;
    lex_input = s;
    lex_pbeg = lex_p = lex_pend = 0;
    ruby_sourceline = line - 1;
    compile_for_eval = ruby_in_eval;

    return yycompile(f, line);
}

NODE*
rb_compile_cstr(f, s, len, line)
    const char *f, *s;
    int len, line;
{
    return rb_compile_string(f, rb_str_new(s, len), line);
}

NODE*
rb_compile_file(f, file, start)
    const char *f;
    VALUE file;
    int start;
{
    lex_gets = rb_io_gets;
    lex_input = file;
    lex_pbeg = lex_p = lex_pend = 0;
    ruby_sourceline = start - 1;

    return yycompile(f, start);
}

static inline int
nextc()
{
    int c;

    if (lex_p == lex_pend) {
        if (lex_input) {
            VALUE v = lex_getline();

            if (NIL_P(v)) return -1;
            if (heredoc_end > 0) {
                ruby_sourceline = heredoc_end;
                heredoc_end = 0;
            }
            ruby_sourceline++;
            lex_pbeg = lex_p = RSTRING(v)->ptr;
            lex_pend = lex_p + RSTRING(v)->len;
            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
pushback(c)
    int c;
{
    if (c == -1) return;
    lex_p--;
}

#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*
newtok()
{
    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
tokadd(c)
    char c;
{
    tokenbuf[tokidx++] = c;
    if (tokidx >= toksiz) {
        toksiz *= 2;
        REALLOC_N(tokenbuf, char, toksiz);
    }
}

static int
read_escape()
{
    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
tokadd_escape(term)
    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
regx_options()
{
    char kcode = 0;
    int options = 0;
    int c;

    newtok();
    while (c = nextc(), ISALPHA(c)) {
        switch (c) {
          case 'i':
            options |= RE_OPTION_IGNORECASE;
            break;
          case 'x':
            options |= RE_OPTION_EXTENDED;
            break;
          case 'm':
            options |= RE_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();
        rb_compile_error("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(str)
    VALUE str;
{
    xfree(RSTRING(str)->ptr);
    rb_gc_force_recycle(str);
}

static int
tokadd_string(func, term, paren, nest)
    int func, term, paren, *nest;
{
    int c;

    while ((c = nextc()) != -1) {
        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(c)) {
            int i, len = mbclen(c)-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("symbol cannot contain '\\0'");
            continue;
        }
        tokadd(c);
    }
    return c;
}

#define NEW_STRTERM(func, term, paren) \
        rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0)

static int
parse_string(quote)
    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;
        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("unterminated string meets end of file");
        return tSTRING_END;
    }

    tokfix();
    yylval.node = NEW_STR(rb_str_new(tok(), toklen()));
    return tSTRING_CONTENT;
}

static int
heredoc_identifier()
{
    int c = nextc(), term, func = 0, len;

    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) {
            len = mbclen(c);
            do {tokadd(c);} while (--len > 0 && (c = nextc()) != -1);
        }
        if (c == -1) {
            rb_compile_error("unterminated here document identifier");
            return 0;
        }
        break;

      default:
        if (!is_identchar(c)) {
            pushback(c);
            if (func & STR_FUNC_INDENT) {
                pushback('-');
            }
            return 0;
        }
        newtok();
        term = '"';
        tokadd(func |= str_dquote);
        do {
            len = mbclen(c);
            do {tokadd(c);} while (--len > 0 && (c = nextc()) != -1);
        } while ((c = nextc()) != -1 && is_identchar(c));
        pushback(c);
        break;
    }

    tokfix();
    len = lex_p - lex_pbeg;
    lex_p = lex_pend;
    lex_strterm = rb_node_newnode(NODE_HEREDOC,
                                  rb_str_new(tok(), toklen()),  /* nd_lit */
                                  len,                          /* nd_nth */
                                  lex_lastline);                /* nd_orig */
    return term == '`' ? tXSTRING_BEG : tSTRING_BEG;
}

static void
heredoc_restore(here)
    NODE *here;
{
    VALUE 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);
}

static int
whole_match_p(eos, len, indent)
    char *eos;
    int len, indent;
{
    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
here_document(here)
    NODE *here;
{
    int c, func, indent = 0;
    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("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_p = lex_pend;
            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') {
                yylval.node = NEW_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);
    yylval.node = NEW_STR(str);
    return tSTRING_CONTENT;
}

#include "lex.c"

static void
arg_ambiguous()
{
    rb_warning("ambiguous first argument; put parentheses or even spaces");
}

#define IS_ARG() (lex_state == EXPR_ARG || lex_state == EXPR_CMDARG)

static int
yylex()
{
    register int c;
    int space_seen = 0;
    int cmd_state;
    enum lex_state last_state;

    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:
    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 */
        while ((c = nextc()) != '\n') {
            if (c == -1)
                return 0;
        }
        /* fall through */
      case '\n':
        switch (lex_state) {
          case EXPR_BEG:
          case EXPR_FNAME:
          case EXPR_DOT:
          case EXPR_CLASS:
            goto retry;
          default:
            break;
        }
        command_start = Qtrue;
        lex_state = EXPR_BEG;
        return '\n';

      case '*':
        if ((c = nextc()) == '*') {
            if ((c = nextc()) == '=') {
                yylval.id = tPOW;
                lex_state = EXPR_BEG;
                return tOP_ASGN;
            }
            pushback(c);
            c = tPOW;
        }
        else {
            if (c == '=') {
                yylval.id = '*';
                lex_state = EXPR_BEG;
                return tOP_ASGN;
            }
            pushback(c);
            if (IS_ARG() && space_seen && !ISSPACE(c)){
                rb_warning("`*' interpreted as argument prefix");
                c = tSTAR;
            }
            else if (lex_state == EXPR_BEG || lex_state == EXPR_MID) {
                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])) {
                for (;;) {
                    lex_p = lex_pend;
                    c = nextc();
                    if (c == -1) {
                        rb_compile_error("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_p = lex_pend;
                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_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()) == '=') {
                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()) == '=') {
                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_ENDARG) {
            lex_state = EXPR_BEG;
            return '?';
        }
        c = nextc();
        if (c == -1) {
            rb_compile_error("incomplete character syntax");
            return 0;
        }
        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_warn("invalid character syntax; use ?\\%c", c2);
                }
            }
          ternary:
            pushback(c);
            lex_state = EXPR_BEG;
            return '?';
        }
        else if (ismbchar(c)) {
            rb_warn("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;
        yylval.node = NEW_LIT(INT2FIX(c));
        return tINTEGER;

      case '&':
        if ((c = nextc()) == '&') {
            lex_state = EXPR_BEG;
            if ((c = nextc()) == '=') {
                yylval.id = tANDOP;
                lex_state = EXPR_BEG;
                return tOP_ASGN;
            }
            pushback(c);
            return tANDOP;
        }
        else if (c == '=') {
            yylval.id = '&';
            lex_state = EXPR_BEG;
            return tOP_ASGN;
        }
        pushback(c);
        if (IS_ARG() && space_seen && !ISSPACE(c)){
            rb_warning("`&' interpreted as argument prefix");
            c = tAMPER;
        }
        else if (lex_state == EXPR_BEG || lex_state == EXPR_MID) {
            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()) == '=') {
                yylval.id = tOROP;
                lex_state = EXPR_BEG;
                return tOP_ASGN;
            }
            pushback(c);
            return tOROP;
        }
        if (c == '=') {
            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 == '=') {
            yylval.id = '+';
            lex_state = EXPR_BEG;
            return tOP_ASGN;
        }
        if (lex_state == EXPR_BEG || lex_state == EXPR_MID ||
            (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 == '=') {
            yylval.id = '-';
            lex_state = EXPR_BEG;
            return tOP_ASGN;
        }
        if (lex_state == EXPR_BEG || lex_state == EXPR_MID ||
            (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;
                    yylval.node = NEW_LIT(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;
                    yylval.node = NEW_LIT(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;
                    yylval.node = NEW_LIT(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;
                        yylval.node = NEW_LIT(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);
                    yylval.node = NEW_LIT(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_warn("Float %s out of range", tok());
                    errno = 0;
                }
                yylval.node = NEW_LIT(rb_float_new(d));
                return tFLOAT;
            }
            yylval.node = NEW_LIT(rb_cstr_to_inum(tok(), 10, Qfalse));
            return tINTEGER;
        }

      case ']':
      case '}':
      case ')':
        COND_LEXPOP();
        CMDARG_LEXPOP();
        lex_state = EXPR_END;
        return c;

      case ':':
        c = nextc();
        if (c == ':') {
            if (lex_state == EXPR_BEG ||  lex_state == EXPR_MID ||
                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_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 (lex_state == EXPR_BEG || lex_state == EXPR_MID) {
            lex_strterm = NEW_STRTERM(str_regexp, '/', 0);
            return tREGEXP_BEG;
        }
        if ((c = nextc()) == '=') {
            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()) == '=') {
            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 ';':
        command_start = Qtrue;
      case ',':
        lex_state = EXPR_BEG;
        return c;

      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 '(':
        command_start = Qtrue;
        if (lex_state == EXPR_BEG || lex_state == EXPR_MID) {
            c = tLPAREN;
        }
        else if (space_seen) {
            if (lex_state == EXPR_CMDARG) {
                c = tLPAREN_ARG;
            }
            else if (lex_state == EXPR_ARG) {
                rb_warn("don't put space before argument parentheses");
                c = '(';
            }
        }
        COND_PUSH(0);
        CMDARG_PUSH(0);
        lex_state = EXPR_BEG;
        return c;

      case '[':
        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 (lex_state == EXPR_BEG || lex_state == EXPR_MID) {
            c = tLBRACK;
        }
        else if (IS_ARG() && space_seen) {
            c = tLBRACK;
        }
        lex_state = EXPR_BEG;
        COND_PUSH(0);
        CMDARG_PUSH(0);
        return c;

      case '{':
        if (IS_ARG() || lex_state == EXPR_END)
            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;
            goto retry; /* skip \\n */
        }
        pushback(c);
        return '\\';

      case '%':
        if (lex_state == EXPR_BEG || lex_state == EXPR_MID) {
            int term;
            int paren;

            c = nextc();
          quotation:
            if (!ISALNUM(c)) {
                term = c;
                c = 'Q';
            }
            else {
                term = nextc();
                if (ISALNUM(term) || ismbchar(term)) {
                    yyerror("unknown type of %string");
                    return 0;
                }
            }
            if (c == -1 || term == -1) {
                rb_compile_error("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()) == '=') {
            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();
            if (is_identchar(c)) {
                tokadd('$');
                tokadd('_');
                break;
            }
            pushback(c);
            c = '_';
            /* fall through */
          case '~':             /* $~: match-data */
            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();
            yylval.id = rb_intern(tok());
            return tGVAR;

          case '-':
            tokadd('$');
            tokadd(c);
            c = nextc();
            if (is_identchar(c)) {
                tokadd(c);
            }
            else {
                pushback(c);
            }
          gvar:
            tokfix();
            yylval.id = rb_intern(tok());
            /* xxx shouldn't check if valid option variable */
            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;
            }
            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();
            yylval.node = NEW_NTH_REF(atoi(tok()+1));
            return tNTH_REF;

          default:
            if (!is_identchar(c)) {
                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("`@%c' is not allowed as an instance variable name", c);
            }
            else {
                rb_compile_error("`@@%c' is not allowed as a class variable name", c);
            }
        }
        if (!is_identchar(c)) {
            pushback(c);
            return '@';
        }
        break;

      case '_':
        if (was_bol() && whole_match_p("__END__", 7, 0)) {
            ruby__end__seen = 1;
            lex_lastline = 0;
            return -1;
        }
        newtok();
        break;

      default:
        if (!is_identchar(c)) {
            rb_compile_error("Invalid char `\\%03o' in expression", c);
            goto retry;
        }

        newtok();
        break;
    }

    do {
        tokadd(c);
        if (ismbchar(c)) {
            int i, len = mbclen(c)-1;

            for (i = 0; i < len; i++) {
                c = nextc();
                tokadd(c);
            }
        }
        c = nextc();
    } while (is_identchar(c));
    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) {
                struct kwtable *kw;

                /* See if it is a reserved word.  */
                kw = rb_reserved_word(tok(), toklen());
                if (kw) {
                    enum lex_state state = lex_state;
                    lex_state = kw->state;
                    if (state == EXPR_FNAME) {
                        yylval.id = rb_intern(kw->name);
                    }
                    if (kw->id[0] == kDO) {
                        if (COND_P()) return kDO_COND;
                        if (CMDARG_P() && state != EXPR_CMDARG)
                            return kDO_BLOCK;
                        if (state == EXPR_ENDARG)
                            return kDO_BLOCK;
                        return kDO;
                    }
                    if (state == EXPR_BEG)
                        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 ||
                lex_state == EXPR_MID ||
                lex_state == EXPR_DOT ||
                lex_state == EXPR_ARG ||
                lex_state == EXPR_CMDARG) {
                if (cmd_state) {
                    lex_state = EXPR_CMDARG;
                }
                else {
                    lex_state = EXPR_ARG;
                }
            }
            else {
                lex_state = EXPR_END;
            }
        }
        yylval.id = rb_intern(tok());
        if (is_local_id(yylval.id) &&
            last_state != EXPR_DOT &&
            ((dyna_in_block() && rb_dvar_defined(yylval.id)) || local_id(yylval.id))) {
            lex_state = EXPR_END;
        }
        return result;
    }
}

NODE*
rb_node_newnode(type, a0, a1, a2)
    enum node_type type;
    VALUE a0, a1, 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)                  /* for debug */
    NODE *node;
{
    return (enum node_type)nd_type(node);
}

static int
nodeline(node)
    NODE *node;
{
    return nd_line(node);
}

static NODE*
newline_node(node)
    NODE *node;
{
    NODE *nl = 0;
    if (node) {
        if (nd_type(node) == NODE_NEWLINE) return node;
        nl = NEW_NEWLINE(node);
        fixpos(nl, node);
        nl->nd_nth = nd_line(node);
    }
    return nl;
}

static void
fixpos(node, orig)
    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, mesg)
    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, mesg)
    NODE *node;
    const char *mesg;
{
    int line = ruby_sourceline;
    ruby_sourceline = nd_line(node);
    rb_warn(mesg);
    ruby_sourceline = line;
}

static NODE*
block_append(head, tail)
    NODE *head, *tail;
{
    NODE *end, *h = head;

    if (tail == 0) return head;

  again:
    if (h == 0) return tail;
    switch (nd_type(h)) {
      case NODE_NEWLINE:
        h = h->nd_next;
        goto again;
      case NODE_LIT:
      case NODE_STR:
        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;
    }

    if (RTEST(ruby_verbose)) {
        NODE *nd = end->nd_head;
      newline:
        switch (nd_type(nd)) {
          case NODE_RETURN:
          case NODE_BREAK:
          case NODE_NEXT:
          case NODE_REDO:
          case NODE_RETRY:
            parser_warning(nd, "statement not reached");
            break;

        case NODE_NEWLINE:
            nd = nd->nd_next;
            goto newline;

          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(list, item)
    NODE *list, *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(head, tail)
    NODE *head, *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(head, tail)
    NODE *head, *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 *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;
{
    NODE *head = node;

  again:
    if (node) {
        switch (nd_type(node)) {
          case NODE_STR: case NODE_DSTR: case NODE_EVSTR:
            return node;
          case NODE_NEWLINE:
            node = node->nd_next;
            goto again;
        }
    }
    return NEW_EVSTR(head);
}

static NODE *
call_op(recv, id, narg, arg1)
    NODE *recv;
    ID id;
    int narg;
    NODE *arg1;
{
    value_expr(recv);
    if (narg == 1) {
        value_expr(arg1);
        arg1 = NEW_LIST(arg1);
    }
    else {
        arg1 = 0;
    }
    return NEW_CALL(recv, id, arg1);
}

static NODE*
match_gen(node1, node2)
    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(id)
    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 */
#if 0
        /* Rite will warn this */
        rb_warn("ambiguous identifier; %s() or self.%s is better for method call",
                rb_id2name(id), rb_id2name(id));
#endif
        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(id, val)
    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{
            rb_dvar_push(id, Qnil);
            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 NODE *
aryset(recv, idx)
    NODE *recv, *idx;
{
    if (recv && nd_type(recv) == NODE_SELF)
        recv = (NODE *)1;
    else
        value_expr(recv);
    return NEW_ATTRASGN(recv, tASET, idx);
}

ID
rb_id_attrset(id)
    ID id;
{
    id &= ~ID_SCOPE_MASK;
    id |= ID_ATTRSET;
    return id;
}

static NODE *
attrset(recv, id)
    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 *node;
{
    switch (nd_type(node)) {
      case NODE_NTH_REF:
        rb_compile_error("Can't set variable $%d", 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(node1, node2)
    NODE *node1;
    NODE *node2;
{
    if (!node2) return node1;
    return NEW_ARGSCAT(node1, node2);
}

static NODE *
arg_add(node1, node2)
    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(lhs, rhs)
    NODE *lhs, *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_expr0(node)
    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;

          case NODE_NEWLINE:
            node = node->nd_next;
            break;

          default:
            return Qtrue;
        }
    }

    return Qtrue;
}

static void
void_expr0(node)
    NODE *node;
{
    char *useless = 0;

    if (!RTEST(ruby_verbose)) return;

  again:
    if (!node) return;
    switch (nd_type(node)) {
      case NODE_NEWLINE:
        node = node->nd_next;
        goto again;

      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(node)
    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;
{
    NODE **n = &node;
    while (*n) {
        switch (nd_type(*n)) {
          case NODE_NEWLINE:
            n = &(*n)->nd_next;
            continue;
          case NODE_BEGIN:
            *n = (*n)->nd_body;
          default:
            return node;
        }
    }
    return node;
}

static int
assign_in_cond(node)
    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;

      case NODE_NEWLINE:
      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;
    }
#if 0
    if (assign_in_cond(node->nd_value) == 0) {
        parser_warning(node->nd_value, "assignment in condition");
    }
#endif
    return 1;
}

static int
e_option_supplied()
{
    if (strcmp(ruby_sourcefile, "-e") == 0)
        return Qtrue;
    return Qfalse;
}

static void
warn_unless_e_option(node, str)
    NODE *node;
    const char *str;
{
    if (!e_option_supplied()) parser_warn(node, str);
}

static void
warning_unless_e_option(node, str)
    NODE *node;
    const char *str;
{
    if (!e_option_supplied()) parser_warning(node, str);
}

static NODE *cond0();

static NODE*
range_op(node)
    NODE *node;
{
    enum node_type type;

    if (!e_option_supplied()) return node;
    if (node == 0) return 0;

    value_expr(node);
    node = cond0(node);
    type = nd_type(node);
    if (type == NODE_NEWLINE) {
        node = node->nd_next;
        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 *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(node)
    NODE *node;
{
    if (node == 0) return 0;
    assign_in_cond(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(node->nd_1st);
        node->nd_2nd = cond0(node->nd_2nd);
        break;

      case NODE_DOT2:
      case NODE_DOT3:
        node->nd_beg = range_op(node->nd_beg);
        node->nd_end = range_op(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(node)
    NODE *node;
{
    if (node == 0) return 0;
    value_expr(node);
    if (nd_type(node) == NODE_NEWLINE){
        node->nd_next = cond0(node->nd_next);
        return node;
    }
    return cond0(node);
}

static NODE*
logop(type, left, right)
    enum node_type type;
    NODE *left, *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(nodep)
    NODE **nodep;
{
    NODE *c = *nodep;

    if (!c) return 0;
    switch (nd_type(c)) {
      case NODE_NOT:
        *nodep = c->nd_body;
        return 1;
      case NODE_NEWLINE:
        if (c->nd_next && nd_type(c->nd_next) == NODE_NOT) {
            c->nd_next = c->nd_next->nd_body;
            return 1;
        }
    }
    return 0;
}

static void
no_blockarg(node)
    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 *node;
{
    if (node) {
        no_blockarg(node);
        if (nd_type(node) == NODE_ARRAY && node->nd_next == 0) {
            node = node->nd_head;
        }
        if (node && nd_type(node) == NODE_SPLAT) {
            node = NEW_SVALUE(node);
        }
    }
    return node;
}

static NODE *
new_yield(node)
    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;
        }
        if (node && nd_type(node) == NODE_SPLAT) {
            state = Qtrue;
        }
    }
    else {
        state = Qfalse;
    }
    return NEW_YIELD(node, state);
}

static NODE*
negate_lit(node)
    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(node1, node2)
    NODE *node1;
    NODE *node2;
{
    if (node2) {
        node2->nd_head = node1;
        return node2;
    }
    return node1;
}

static NODE*
arg_prepend(node1, node2)
    NODE *node1, *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 NODE*
new_call(r,m,a)
    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(m,a)
    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(a)
    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 struct local_vars {
    ID *tbl;
    int nofree;
    int cnt;
    int dlev;
    struct RVarmap* dyna_vars;
    struct local_vars *prev;
} *lvtbl;

static void
local_push(top)
    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->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()
{
    struct local_vars *local = lvtbl->prev;

    if (lvtbl->tbl) {
        if (!lvtbl->nofree) xfree(lvtbl->tbl);
        else lvtbl->tbl[0] = lvtbl->cnt;
    }
    ruby_dyna_vars = lvtbl->dyna_vars;
    xfree(lvtbl);
    lvtbl = local;
}

static ID*
local_tbl()
{
    lvtbl->nofree = 1;
    return lvtbl->tbl;
}

static int
local_append(id)
    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(id)
    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(id)
    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()
{
    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()
{
    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 struct RVarmap*
dyna_push()
{
    struct RVarmap* vars = ruby_dyna_vars;

    rb_dvar_push(0, 0);
    lvtbl->dlev++;
    return vars;
}

static void
dyna_pop(vars)
    struct RVarmap* vars;
{
    lvtbl->dlev--;
    ruby_dyna_vars = vars;
}

static int
dyna_in_block()
{
    return (lvtbl->dlev > 0);
}

static NODE *
dyna_init(node, pre)
    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);
}

int
ruby_parser_stack_on_heap()
{
#if defined(YYMALLOC)
    return Qfalse;
#else
    return Qtrue;
#endif
}

void
rb_gc_mark_parser()
{
#if defined YYMALLOC
    rb_gc_mark((VALUE)parser_heap);
#elif defined yystacksize
    if (yyvsp) rb_gc_mark_locations((VALUE *)yyvs, (VALUE *)yyvsp);
#endif

    if (!ruby_in_compile) return;

    rb_gc_mark_maybe((VALUE)yylval.node);
    rb_gc_mark(ruby_debug_lines);
    rb_gc_mark(lex_lastline);
    rb_gc_mark(lex_input);
    rb_gc_mark((VALUE)lex_strterm);
}

void
rb_parser_append_print()
{
    ruby_eval_tree =
        block_append(ruby_eval_tree,
                     NEW_FCALL(rb_intern("print"),
                               NEW_ARRAY(NEW_GVAR(rb_intern("$_")))));
}

void
rb_parser_while_loop(chop, split)
    int chop, split;
{
    if (split) {
        ruby_eval_tree =
            block_append(NEW_GASGN(rb_intern("$F"),
                                   NEW_CALL(NEW_GVAR(rb_intern("$_")),
                                            rb_intern("split"), 0)),
                                   ruby_eval_tree);
    }
    if (chop) {
        ruby_eval_tree =
            block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")),
                                  rb_intern("chop!"), 0), ruby_eval_tree);
    }
    ruby_eval_tree = NEW_OPT_N(ruby_eval_tree);
}

static 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 st_table *sym_tbl;
static st_table *sym_rev_tbl;

void
Init_sym()
{
    sym_tbl = st_init_strtable_with_size(200);
    sym_rev_tbl = st_init_numtable_with_size(200);
}

static ID last_id = tLAST_TOKEN;

static ID
internal_id()
{
    return ID_INTERNAL | (++last_id << ID_SCOPE_SHIFT);
}

static int
is_special_global_name(m)
    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(name)
    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(name)
    const char *name;
{
    const char *m = name;
    ID id;
    int last;

    if (st_lookup(sym_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 |= ++last_id << ID_SCOPE_SHIFT;
  id_regist:
    name = strdup(name);
    st_add_direct(sym_tbl, (st_data_t)name, id);
    st_add_direct(sym_rev_tbl, id, (st_data_t)name);
    return id;
}

char *
rb_id2name(id)
    ID id;
{
    char *name;

    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(sym_rev_tbl, id, (st_data_t *)&name))
        return name;

    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(key, value, ary)
    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()
{
    VALUE ary = rb_ary_new2(sym_tbl->num_entries);

    st_foreach(sym_tbl, symbols_i, ary);
    return ary;
}

int
rb_is_const_id(id)
    ID id;
{
    if (is_const_id(id)) return Qtrue;
    return Qfalse;
}

int
rb_is_class_id(id)
    ID id;
{
    if (is_class_id(id)) return Qtrue;
    return Qfalse;
}

int
rb_is_instance_id(id)
    ID id;
{
    if (is_instance_id(id)) return Qtrue;
    return Qfalse;
}

int
rb_is_local_id(id)
    ID id;
{
    if (is_local_id(id)) return Qtrue;
    return Qfalse;
}

int
rb_is_junk_id(id)
    ID id;
{
    if (is_junk_id(id)) return Qtrue;
    return Qfalse;
}

static void
special_local_set(c, val)
    char c;
    VALUE val;
{
    int cnt;

    top_local_init();
    cnt = local_cnt(c);
    top_local_setup();
    ruby_scope->local_vars[cnt] = val;
}

VALUE
rb_backref_get()
{
    VALUE *var = rb_svar(1);
    if (var) {
        return *var;
    }
    return Qnil;
}

void
rb_backref_set(val)
    VALUE val;
{
    VALUE *var = rb_svar(1);
    if (var) {
        *var = val;
    }
    else {
        special_local_set('~', val);
    }
}

VALUE
rb_lastline_get()
{
    VALUE *var = rb_svar(0);
    if (var) {
        return *var;
    }
    return Qnil;
}

void
rb_lastline_set(val)
    VALUE val;
{
    VALUE *var = rb_svar(0);
    if (var) {
        *var = val;
    }
    else {
        special_local_set('_', val);
    }
}

#ifdef YYMALLOC
#define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE))
#define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser_heap, 0)
#define ADD2HEAP(n, c, p) ((parser_heap = (n))->u1.node = (p), \
                           (n)->u3.cnt = (c), (p))

static void *
rb_parser_malloc(size)
    size_t size;
{
    size_t cnt = HEAPCNT(1, size);
    NODE *n = NEWHEAP();
    void *ptr = xmalloc(size);

    return ADD2HEAP(n, cnt, ptr);
}

static void *
rb_parser_calloc(nelem, size)
    size_t nelem, size;
{
    size_t cnt = HEAPCNT(nelem, size);
    NODE *n = NEWHEAP();
    void *ptr = xcalloc(nelem, size);

    return ADD2HEAP(n, cnt, ptr);
}

static void *
rb_parser_realloc(ptr, size)
    void *ptr;
    size_t size;
{
    NODE *n;
    size_t cnt = HEAPCNT(1, size);

    if (ptr && (n = parser_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);
}

static void
rb_parser_free(ptr)
    void *ptr;
{
    NODE **prev = &parser_heap, *n;

    while (n = *prev) {
        if (n->u1.node == ptr) {
            *prev = n->u2.node;
            rb_gc_force_recycle((VALUE)n);
            break;
        }
        prev = &n->u2.node;
    }
    xfree(ptr);
}
#endif
/* [<][>][^] [v] [top][bottom][index] [help] */


DEFINITIONS

[..]
  1. func
  2. main
[..]


FILES

  1. test.c


g:\ko1\tmp\ruby-1.8.4\HTML\test

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

MAINS

main                6 test.c         main(){

DEFINITIONS

FILES

  1. test.c


test.c

root/test.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. func
  2. main

int func(){

}

main(){
  return func();
}
/* [<][>][^] [v] [top][bottom][index] [help] */