
665: while (1) 666: { 667: if (relative_position < LEFT_TOTAL_LENGTH (tree)) 668: { 669: tree = tree->left; 670: } 671: else if (! NULL_RIGHT_CHILD (tree) 672: && relative_position >= (TOTAL_LENGTH (tree) 673: - RIGHT_TOTAL_LENGTH (tree))) 674: { 675: relative_position -= (TOTAL_LENGTH (tree) 676: - RIGHT_TOTAL_LENGTH (tree)); 677: tree = tree->right; 678: } 679: else 680: { 681: tree->position 682: = (position - relative_position /* left edge of *tree. */ 683: + LEFT_TOTAL_LENGTH (tree)); /* left edge of this interval. */ 684: 685: return tree; 686: } 687: }
This does binary search to find an interval which contains POSITION.
652: #if 0 /* This causes bugs in (for instance) telnet to certain sites. */ 653: s.main.c_iflag &= ~ICRNL; /* Disable map of CR to NL on input */ 654: #ifdef INLCR /* Just being cautious, since I can't check how 655: widespread INLCR is--rms. */ 656: s.main.c_iflag &= ~INLCR; /* Disable map of NL to CR on input */ 657: #endif 658: #endif
この部分が原因で、process-connection-type が t (pty) の時、サブプロセスに CR が正しく伝わらないことがある。
253: /* Macros to allow global variables to be reached through function calls when 254: required (if a shared library version requvres it, for example. 255: The way it's done allows definitions like this: 256: 257: // in foobar.c 258: OPENSSL_IMPLEMENT_GLOBAL(int,foobar) = 0; 259: // in foobar.h 260: OPENSSL_DECLARE_GLOBAL(int,foobar); 261: #define foobar OPENSSL_GLOBAL_REF(foobar) 262: */ 263: #ifdef OPENSSL_EXPORT_VAR_AS_FUNCTION 264: # define OPENSSL_IMPLEMENT_GLOBAL(type,name) \ 265: extern type _hide_##name; \ 266: type *_shadow_##name(void) { return &_hide_##name; } \ 267: static type _hide_##name
グローバル変数を extern で宣言して (265)、static で定義している (267)。 mingw32 の gcc でこけます。 やりたいことは分かるんだけど。。
35: #define GTY(x) /* nothing - marker for gengtype */
すみません、login のはバグっぽいです。直したつもり…。