ruby_doc_updates-20110613_update-curses_vbatts.patch

Vincent Batts, 06/14/2011 05:42 AM

Download (34 KB)

View differences:

ext/curses/curses.c
1255 1255
 *
1256 1256
 * This will read and pop the mouse event data off the queue
1257 1257
 *
1258
 * TODO: all the BUTTON* constants are needed here, to examine the mask of the event
1258
 * See the BUTTON*, ALL_MOUSE_EVENTS and REPORT_MOUSE_POSITION constants, to examine the mask of the event
1259 1259
 */
1260 1260
static VALUE
1261 1261
curses_getmouse(VALUE obj)
......
2476 2476
 *     :include: rain.rb
2477 2477
 *
2478 2478
 *
2479
 * == TODO
2480
 *
2481
 * * document all the A_* constants
2482
 * * document all the BUTTON*_* constants
2483
 * * document all the ALL_MOUSE_EVENTS and REPORT_MOUSE_POSITION constants
2484 2479
 */
2485 2480
void
2486 2481
Init_curses(void)
......
2685 2680
#define rb_curses_define_const(c) rb_define_const(mCurses,#c,UINT2NUM(c))
2686 2681

  
2687 2682
#ifdef USE_COLOR
2683
    /* Document-const: A_ATTRIBUTES
2684
     *
2685
     * Character attribute mask:
2686
     * Bit-mask to extract attributes
2687
     *
2688
     * See Curses.inch or Curses::Window.inch
2689
     */
2688 2690
    rb_curses_define_const(A_ATTRIBUTES);
2689 2691
#ifdef A_NORMAL
2692
    /* Document-const: A_NORMAL
2693
     *
2694
     * Attribute mask:
2695
     * Normal display (no highlight)
2696
     *
2697
     * See Curses.attrset
2698
     */
2690 2699
    rb_curses_define_const(A_NORMAL);
2691 2700
#endif
2701
    /* Document-const: A_STANDOUT
2702
     *
2703
     * Attribute mask:
2704
     * Best highlighting mode of the terminal.
2705
     *
2706
     * See Curses.attrset
2707
     */
2692 2708
    rb_curses_define_const(A_STANDOUT);
2709
    /* Document-const: A_UNDERLINE
2710
     *
2711
     * Attribute mask:
2712
     * Underlining
2713
     *
2714
     * See Curses.attrset
2715
     */
2693 2716
    rb_curses_define_const(A_UNDERLINE);
2717
    /* Document-const: A_REVERSE
2718
     *
2719
     * Attribute mask:
2720
     * Reverse video
2721
     *
2722
     * See Curses.attrset
2723
     */
2694 2724
    rb_curses_define_const(A_REVERSE);
2725
    /* Document-const: A_BLINK
2726
     *
2727
     * Attribute mask:
2728
     * Blinking
2729
     *
2730
     * See Curses.attrset
2731
     */
2695 2732
    rb_curses_define_const(A_BLINK);
2733
    /* Document-const: A_DIM
2734
     *
2735
     * Attribute mask:
2736
     * Half bright
2737
     *
2738
     * See Curses.attrset
2739
     */
2696 2740
    rb_curses_define_const(A_DIM);
2741
    /* Document-const: A_BOLD
2742
     *
2743
     * Attribute mask:
2744
     * Extra bright or bold
2745
     *
2746
     * See Curses.attrset
2747
     */
2697 2748
    rb_curses_define_const(A_BOLD);
2749
    /* Document-const: A_PROTECT
2750
     *
2751
     * Attribute mask:
2752
     * Protected mode
2753
     *
2754
     * See Curses.attrset
2755
     */
2698 2756
    rb_curses_define_const(A_PROTECT);
2699 2757
#ifdef A_INVIS /* for NetBSD */
2758
    /* Document-const: A_INVIS
2759
     *
2760
     * Attribute mask:
2761
     * Invisible or blank mode
2762
     *
2763
     * See Curses.attrset
2764
     */
2700 2765
    rb_curses_define_const(A_INVIS);
2701 2766
#endif
2767
    /* Document-const: A_ALTCHARSET
2768
     *
2769
     * Attribute mask:
2770
     * Alternate character set
2771
     *
2772
     * See Curses.attrset
2773
     */
2702 2774
    rb_curses_define_const(A_ALTCHARSET);
2775
    /* Document-const: A_CHARTEXT
2776
     *
2777
     * Attribute mask:
2778
     * Bit-mask to extract a character
2779
     *
2780
     * See Curses.attrset
2781
     */
2703 2782
    rb_curses_define_const(A_CHARTEXT);
2704 2783
#ifdef A_HORIZONTAL
2784
    /* Document-const: A_HORIZONTAL
2785
     *
2786
     * Attribute mask:
2787
     * horizontal highlight
2788
     *
2789
     * Check system curs_attr(3x) for support
2790
     */
2705 2791
    rb_curses_define_const(A_HORIZONTAL);
2706 2792
#endif
2707 2793
#ifdef A_LEFT
2794
    /* Document-const: A_LEFT
2795
     *
2796
     * Attribute mask:
2797
     * left highlight
2798
     *
2799
     * Check system curs_attr(3x) for support
2800
     */
2708 2801
    rb_curses_define_const(A_LEFT);
2709 2802
#endif
2710 2803
#ifdef A_LOW
2804
    /* Document-const: A_LOW
2805
     *
2806
     * Attribute mask:
2807
     * low highlight
2808
     *
2809
     * Check system curs_attr(3x) for support
2810
     */
2711 2811
    rb_curses_define_const(A_LOW);
2712 2812
#endif
2713 2813
#ifdef A_RIGHT
2814
    /* Document-const: A_RIGHT
2815
     *
2816
     * Attribute mask:
2817
     * right highlight
2818
     *
2819
     * Check system curs_attr(3x) for support
2820
     */
2714 2821
    rb_curses_define_const(A_RIGHT);
2715 2822
#endif
2716 2823
#ifdef A_TOP
2824
    /* Document-const: A_TOP
2825
     *
2826
     * Attribute mask:
2827
     * top highlight
2828
     *
2829
     * Check system curs_attr(3x) for support
2830
     */
2717 2831
    rb_curses_define_const(A_TOP);
2718 2832
#endif
2719 2833
#ifdef A_VERTICAL
2834
    /* Document-const: A_VERTICAL
2835
     *
2836
     * Attribute mask:
2837
     * vertical highlight
2838
     *
2839
     * Check system curs_attr(3x) for support
2840
     */
2720 2841
    rb_curses_define_const(A_VERTICAL);
2721 2842
#endif
2843
    /* Document-const: A_COLOR
2844
     *
2845
     * Character attribute mask:
2846
     * Bit-mask to extract color-pair field information
2847
     *
2848
     * See Curses.inch or Curses::Window.inch
2849
     */
2722 2850
    rb_curses_define_const(A_COLOR);
2723 2851

  
2724 2852
#ifdef COLORS
......
2780 2908
#endif /* USE_COLOR */
2781 2909
#ifdef USE_MOUSE
2782 2910
#ifdef BUTTON1_PRESSED
2911
    /* Document-const: BUTTON1_PRESSED
2912
     *
2913
     * Mouse event mask:
2914
     * mouse button 1 down
2915
     *
2916
     * See Curses.getmouse
2917
     */
2783 2918
    rb_curses_define_const(BUTTON1_PRESSED);
2784 2919
#endif
2785 2920
#ifdef BUTTON1_RELEASED
2921
    /* Document-const: BUTTON1_RELEASED
2922
     *
2923
     * Mouse event mask:
2924
     * mouse button 1 up
2925
     *
2926
     * See Curses.getmouse
2927
     */
2786 2928
    rb_curses_define_const(BUTTON1_RELEASED);
2787 2929
#endif
2788 2930
#ifdef BUTTON1_CLICKED
2931
    /* Document-const: BUTTON1_CLICKED
2932
     *
2933
     * Mouse event mask:
2934
     * mouse button 1 clicked
2935
     *
2936
     * See Curses.getmouse
2937
     */
2789 2938
    rb_curses_define_const(BUTTON1_CLICKED);
2790 2939
#endif
2791 2940
#ifdef BUTTON1_DOUBLE_CLICKED
2941
    /* Document-const: BUTTON1_DOUBLE_CLICKED
2942
     *
2943
     * Mouse event mask:
2944
     * mouse button 1 double clicked
2945
     *
2946
     * See Curses.getmouse
2947
     */
2792 2948
    rb_curses_define_const(BUTTON1_DOUBLE_CLICKED);
2793 2949
#endif
2794 2950
#ifdef BUTTON1_TRIPLE_CLICKED
2951
    /* Document-const: BUTTON1_TRIPLE_CLICKED
2952
     *
2953
     * Mouse event mask:
2954
     * mouse button 1 triple clicked
2955
     *
2956
     * See Curses.getmouse
2957
     */
2795 2958
    rb_curses_define_const(BUTTON1_TRIPLE_CLICKED);
2796 2959
#endif
2797 2960
#ifdef BUTTON2_PRESSED
2961
    /* Document-const: BUTTON2_PRESSED
2962
     *
2963
     * Mouse event mask:
2964
     * mouse button 2 down
2965
     *
2966
     * See Curses.getmouse
2967
     */
2798 2968
    rb_curses_define_const(BUTTON2_PRESSED);
2799 2969
#endif
2800 2970
#ifdef BUTTON2_RELEASED
2971
    /* Document-const: BUTTON2_RELEASED
2972
     *
2973
     * Mouse event mask:
2974
     * mouse button 2 up
2975
     *
2976
     * See Curses.getmouse
2977
     */
2801 2978
    rb_curses_define_const(BUTTON2_RELEASED);
2802 2979
#endif
2803 2980
#ifdef BUTTON2_CLICKED
2981
    /* Document-const: BUTTON2_CLICKED
2982
     *
2983
     * Mouse event mask:
2984
     * mouse button 2 clicked
2985
     *
2986
     * See Curses.getmouse
2987
     */
2804 2988
    rb_curses_define_const(BUTTON2_CLICKED);
2805 2989
#endif
2806 2990
#ifdef BUTTON2_DOUBLE_CLICKED
2991
    /* Document-const: BUTTON2_DOUBLE_CLICKED
2992
     *
2993
     * Mouse event mask:
2994
     * mouse button 2 double clicked
2995
     *
2996
     * See Curses.getmouse
2997
     */
2807 2998
    rb_curses_define_const(BUTTON2_DOUBLE_CLICKED);
2808 2999
#endif
2809 3000
#ifdef BUTTON2_TRIPLE_CLICKED
3001
    /* Document-const: BUTTON2_TRIPLE_CLICKED
3002
     *
3003
     * Mouse event mask:
3004
     * mouse button 2 triple clicked
3005
     *
3006
     * See Curses.getmouse
3007
     */
2810 3008
    rb_curses_define_const(BUTTON2_TRIPLE_CLICKED);
2811 3009
#endif
2812 3010
#ifdef BUTTON3_PRESSED
3011
    /* Document-const: BUTTON3_PRESSED
3012
     *
3013
     * Mouse event mask:
3014
     * mouse button 3 down
3015
     *
3016
     * See Curses.getmouse
3017
     */
2813 3018
    rb_curses_define_const(BUTTON3_PRESSED);
2814 3019
#endif
2815 3020
#ifdef BUTTON3_RELEASED
3021
    /* Document-const: BUTTON3_RELEASED
3022
     *
3023
     * Mouse event mask:
3024
     * mouse button 3 up
3025
     *
3026
     * See Curses.getmouse
3027
     */
2816 3028
    rb_curses_define_const(BUTTON3_RELEASED);
2817 3029
#endif
2818 3030
#ifdef BUTTON3_CLICKED
3031
    /* Document-const: BUTTON3_CLICKED
3032
     *
3033
     * Mouse event mask:
3034
     * mouse button 3 clicked
3035
     *
3036
     * See Curses.getmouse
3037
     */
2819 3038
    rb_curses_define_const(BUTTON3_CLICKED);
2820 3039
#endif
2821 3040
#ifdef BUTTON3_DOUBLE_CLICKED
3041
    /* Document-const: BUTTON3_DOUBLE_CLICKED
3042
     *
3043
     * Mouse event mask:
3044
     * mouse button 3 double clicked
3045
     *
3046
     * See Curses.getmouse
3047
     */
2822 3048
    rb_curses_define_const(BUTTON3_DOUBLE_CLICKED);
2823 3049
#endif
2824 3050
#ifdef BUTTON3_TRIPLE_CLICKED
3051
    /* Document-const: BUTTON3_TRIPLE_CLICKED
3052
     *
3053
     * Mouse event mask:
3054
     * mouse button 3 triple clicked
3055
     *
3056
     * See Curses.getmouse
3057
     */
2825 3058
    rb_curses_define_const(BUTTON3_TRIPLE_CLICKED);
2826 3059
#endif
2827 3060
#ifdef BUTTON4_PRESSED
3061
    /* Document-const: BUTTON4_PRESSED
3062
     *
3063
     * Mouse event mask:
3064
     * mouse button 4 down
3065
     *
3066
     * See Curses.getmouse
3067
     */
2828 3068
    rb_curses_define_const(BUTTON4_PRESSED);
2829 3069
#endif
2830 3070
#ifdef BUTTON4_RELEASED
3071
    /* Document-const: BUTTON4_RELEASED
3072
     *
3073
     * Mouse event mask:
3074
     * mouse button 4 up
3075
     *
3076
     * See Curses.getmouse
3077
     */
2831 3078
    rb_curses_define_const(BUTTON4_RELEASED);
2832 3079
#endif
2833 3080
#ifdef BUTTON4_CLICKED
3081
    /* Document-const: BUTTON4_CLICKED
3082
     *
3083
     * Mouse event mask:
3084
     * mouse button 4 clicked
3085
     *
3086
     * See Curses.getmouse
3087
     */
2834 3088
    rb_curses_define_const(BUTTON4_CLICKED);
2835 3089
#endif
2836 3090
#ifdef BUTTON4_DOUBLE_CLICKED
3091
    /* Document-const: BUTTON4_DOUBLE_CLICKED
3092
     *
3093
     * Mouse event mask:
3094
     * mouse button 4 double clicked
3095
     *
3096
     * See Curses.getmouse
3097
     */
2837 3098
    rb_curses_define_const(BUTTON4_DOUBLE_CLICKED);
2838 3099
#endif
2839 3100
#ifdef BUTTON4_TRIPLE_CLICKED
3101
    /* Document-const: BUTTON4_TRIPLE_CLICKED
3102
     *
3103
     * Mouse event mask:
3104
     * mouse button 4 triple clicked
3105
     *
3106
     * See Curses.getmouse
3107
     */
2840 3108
    rb_curses_define_const(BUTTON4_TRIPLE_CLICKED);
2841 3109
#endif
2842 3110
#ifdef BUTTON_SHIFT
3111
    /* Document-const: BUTTON_SHIFT
3112
     *
3113
     * Mouse event mask:
3114
     * shift was down during button state change
3115
     *
3116
     * See Curses.getmouse
3117
     */
2843 3118
    rb_curses_define_const(BUTTON_SHIFT);
2844 3119
#endif
2845 3120
#ifdef BUTTON_CTRL
3121
    /* Document-const: BUTTON_CTRL
3122
     *
3123
     * Mouse event mask:
3124
     * control was down during button state change
3125
     *
3126
     * See Curses.getmouse
3127
     */
2846 3128
    rb_curses_define_const(BUTTON_CTRL);
2847 3129
#endif
2848 3130
#ifdef BUTTON_ALT
3131
    /* Document-const: BUTTON_ALT
3132
     *
3133
     * Mouse event mask:
3134
     * alt was down during button state change
3135
     *
3136
     * See Curses.getmouse
3137
     */
2849 3138
    rb_curses_define_const(BUTTON_ALT);
2850 3139
#endif
2851 3140
#ifdef ALL_MOUSE_EVENTS
3141
    /* Document-const: ALL_MOUSE_EVENTS
3142
     *
3143
     * Mouse event mask:
3144
     * report all button state changes
3145
     *
3146
     * See Curses.getmouse
3147
     */
2852 3148
    rb_curses_define_const(ALL_MOUSE_EVENTS);
2853 3149
#endif
2854 3150
#ifdef REPORT_MOUSE_POSITION
3151
    /* Document-const: REPORT_MOUSE_POSITION
3152
     *
3153
     * Mouse event mask:
3154
     * report mouse movement
3155
     *
3156
     * See Curses.getmouse
3157
     */
2855 3158
    rb_curses_define_const(REPORT_MOUSE_POSITION);
2856 3159
#endif
2857 3160
#endif /* USE_MOUSE */
2858 3161

  
2859 3162
#if defined(KEY_MOUSE) && defined(USE_MOUSE)
3163
    /* Document-const: KEY_MOUSE
3164
     * Mouse event read
3165
     */
2860 3166
    /* Document-const: MOUSE
2861
     *
2862 3167
     * Mouse event read
2863 3168
     */
2864 3169
    rb_curses_define_const(KEY_MOUSE);
2865 3170
    rb_define_const(mKey, "MOUSE", INT2NUM(KEY_MOUSE));
2866 3171
#endif
2867 3172
#ifdef KEY_MIN
3173
    /* Document-const: KEY_MIN
3174
     * The minimum allowed curses key value.
3175
     */
2868 3176
    /* Document-const: MIN
2869
     *
2870 3177
     * The minimum allowed curses key value.
2871 3178
     */
2872 3179
    rb_curses_define_const(KEY_MIN);
2873 3180
    rb_define_const(mKey, "MIN", INT2NUM(KEY_MIN));
2874 3181
#endif
2875 3182
#ifdef KEY_BREAK
3183
    /* Document-const: KEY_BREAK
3184
     * Break key
3185
     */
2876 3186
    /* Document-const: BREAK
2877
     *
2878 3187
     * Break key
2879 3188
     */
2880 3189
    rb_curses_define_const(KEY_BREAK);
2881 3190
    rb_define_const(mKey, "BREAK", INT2NUM(KEY_BREAK));
2882 3191
#endif
2883 3192
#ifdef KEY_DOWN
3193
    /* Document-const: KEY_DOWN
3194
     * the down arrow key
3195
     */
2884 3196
    /* Document-const: DOWN
2885
     *
2886 3197
     * the down arrow key
2887 3198
     */
2888 3199
    rb_curses_define_const(KEY_DOWN);
2889 3200
    rb_define_const(mKey, "DOWN", INT2NUM(KEY_DOWN));
2890 3201
#endif
2891 3202
#ifdef KEY_UP
3203
    /* Document-const: KEY_UP
3204
     * the up arrow key
3205
     */
2892 3206
    /* Document-const: UP
2893
     *
2894 3207
     * the up arrow key
2895 3208
     */
2896 3209
    rb_curses_define_const(KEY_UP);
2897 3210
    rb_define_const(mKey, "UP", INT2NUM(KEY_UP));
2898 3211
#endif
2899 3212
#ifdef KEY_LEFT
3213
    /* Document-const: KEY_LEFT
3214
     * the left arrow key
3215
     */
2900 3216
    /* Document-const: LEFT
2901
     *
2902 3217
     * the left arrow key
2903 3218
     */
2904 3219
    rb_curses_define_const(KEY_LEFT);
2905 3220
    rb_define_const(mKey, "LEFT", INT2NUM(KEY_LEFT));
2906 3221
#endif
2907 3222
#ifdef KEY_RIGHT
3223
    /* Document-const: KEY_RIGHT
3224
     * the right arrow key
3225
     */
2908 3226
    /* Document-const: RIGHT
2909
     *
2910 3227
     * the right arrow key
2911 3228
     */
2912 3229
    rb_curses_define_const(KEY_RIGHT);
2913 3230
    rb_define_const(mKey, "RIGHT", INT2NUM(KEY_RIGHT));
2914 3231
#endif
2915 3232
#ifdef KEY_HOME
3233
    /* Document-const: KEY_HOME
3234
     * Home key (upward+left arrow)
3235
     */
2916 3236
    /* Document-const: HOME
2917
     *
2918 3237
     * Home key (upward+left arrow)
2919 3238
     */
2920 3239
    rb_curses_define_const(KEY_HOME);
2921 3240
    rb_define_const(mKey, "HOME", INT2NUM(KEY_HOME));
2922 3241
#endif
2923 3242
#ifdef KEY_BACKSPACE
3243
    /* Document-const: KEY_BACKSPACE
3244
     * Backspace
3245
     */
2924 3246
    /* Document-const: BACKSPACE
2925
     *
2926 3247
     * Backspace
2927 3248
     */
2928 3249
    rb_curses_define_const(KEY_BACKSPACE);
......
2942 3263
    }
2943 3264
#endif
2944 3265
#ifdef KEY_DL
3266
    /* Document-const: KEY_DL
3267
     * Delete line
3268
     */
2945 3269
    /* Document-const: DL
2946
     *
2947 3270
     * Delete line
2948 3271
     */
2949 3272
    rb_curses_define_const(KEY_DL);
2950 3273
    rb_define_const(mKey, "DL", INT2NUM(KEY_DL));
2951 3274
#endif
2952 3275
#ifdef KEY_IL
3276
    /* Document-const: KEY_IL
3277
     * Insert line
3278
     */
2953 3279
    /* Document-const: IL
2954
     *
2955 3280
     * Insert line
2956 3281
     */
2957 3282
    rb_curses_define_const(KEY_IL);
2958 3283
    rb_define_const(mKey, "IL", INT2NUM(KEY_IL));
2959 3284
#endif
2960 3285
#ifdef KEY_DC
3286
    /* Document-const: KEY_DC
3287
     * Delete character
3288
     */
2961 3289
    /* Document-const: DC
2962
     *
2963 3290
     * Delete character
2964 3291
     */
2965 3292
    rb_curses_define_const(KEY_DC);
2966 3293
    rb_define_const(mKey, "DC", INT2NUM(KEY_DC));
2967 3294
#endif
2968 3295
#ifdef KEY_IC
3296
    /* Document-const: KEY_IC
3297
     * Insert char or enter insert mode
3298
     */
2969 3299
    /* Document-const: IC
2970
     *
2971 3300
     * Insert char or enter insert mode
2972 3301
     */
2973 3302
    rb_curses_define_const(KEY_IC);
2974 3303
    rb_define_const(mKey, "IC", INT2NUM(KEY_IC));
2975 3304
#endif
2976 3305
#ifdef KEY_EIC
3306
    /* Document-const: KEY_EIC
3307
     * Enter insert char mode
3308
     */
2977 3309
    /* Document-const: EIC
2978
     *
2979 3310
     * Enter insert char mode
2980 3311
     */
2981 3312
    rb_curses_define_const(KEY_EIC);
2982 3313
    rb_define_const(mKey, "EIC", INT2NUM(KEY_EIC));
2983 3314
#endif
2984 3315
#ifdef KEY_CLEAR
3316
    /* Document-const: KEY_CLEAR
3317
     * Clear Screen
3318
     */
2985 3319
    /* Document-const: CLEAR
2986
     *
2987 3320
     * Clear Screen
2988 3321
     */
2989 3322
    rb_curses_define_const(KEY_CLEAR);
2990 3323
    rb_define_const(mKey, "CLEAR", INT2NUM(KEY_CLEAR));
2991 3324
#endif
2992 3325
#ifdef KEY_EOS
3326
    /* Document-const: KEY_EOS
3327
     * Clear to end of screen
3328
     */
2993 3329
    /* Document-const: EOS
2994
     *
2995 3330
     * Clear to end of screen
2996 3331
     */
2997 3332
    rb_curses_define_const(KEY_EOS);
2998 3333
    rb_define_const(mKey, "EOS", INT2NUM(KEY_EOS));
2999 3334
#endif
3000 3335
#ifdef KEY_EOL
3336
    /* Document-const: KEY_EOL
3337
     * Clear to end of line
3338
     */
3001 3339
    /* Document-const: EOL
3002
     *
3003 3340
     * Clear to end of line
3004 3341
     */
3005 3342
    rb_curses_define_const(KEY_EOL);
3006 3343
    rb_define_const(mKey, "EOL", INT2NUM(KEY_EOL));
3007 3344
#endif
3008 3345
#ifdef KEY_SF
3346
    /* Document-const: KEY_SF
3347
     * Scroll 1 line forward
3348
     */
3009 3349
    /* Document-const: SF
3010
     *
3011 3350
     * Scroll 1 line forward
3012 3351
     */
3013 3352
    rb_curses_define_const(KEY_SF);
3014 3353
    rb_define_const(mKey, "SF", INT2NUM(KEY_SF));
3015 3354
#endif
3016 3355
#ifdef KEY_SR
3356
    /* Document-const: KEY_SR
3357
     * Scroll 1 line backware (reverse)
3358
     */
3017 3359
    /* Document-const: SR
3018
     *
3019 3360
     * Scroll 1 line backware (reverse)
3020 3361
     */
3021 3362
    rb_curses_define_const(KEY_SR);
3022 3363
    rb_define_const(mKey, "SR", INT2NUM(KEY_SR));
3023 3364
#endif
3024 3365
#ifdef KEY_NPAGE
3366
    /* Document-const: KEY_NPAGE
3367
     * Next page
3368
     */
3025 3369
    /* Document-const: NPAGE
3026
     *
3027 3370
     * Next page
3028 3371
     */
3029 3372
    rb_curses_define_const(KEY_NPAGE);
3030 3373
    rb_define_const(mKey, "NPAGE", INT2NUM(KEY_NPAGE));
3031 3374
#endif
3032 3375
#ifdef KEY_PPAGE
3376
    /* Document-const: KEY_PPAGE
3377
     * Previous page
3378
     */
3033 3379
    /* Document-const: PPAGE
3034
     *
3035 3380
     * Previous page
3036 3381
     */
3037 3382
    rb_curses_define_const(KEY_PPAGE);
3038 3383
    rb_define_const(mKey, "PPAGE", INT2NUM(KEY_PPAGE));
3039 3384
#endif
3040 3385
#ifdef KEY_STAB
3386
    /* Document-const: KEY_STAB
3387
     * Set tab
3388
     */
3041 3389
    /* Document-const: STAB
3042
     *
3043 3390
     * Set tab
3044 3391
     */
3045 3392
    rb_curses_define_const(KEY_STAB);
3046 3393
    rb_define_const(mKey, "STAB", INT2NUM(KEY_STAB));
3047 3394
#endif
3048 3395
#ifdef KEY_CTAB
3396
    /* Document-const: KEY_CTAB
3397
     * Clear tab
3398
     */
3049 3399
    /* Document-const: CTAB
3050
     *
3051 3400
     * Clear tab
3052 3401
     */
3053 3402
    rb_curses_define_const(KEY_CTAB);
3054 3403
    rb_define_const(mKey, "CTAB", INT2NUM(KEY_CTAB));
3055 3404
#endif
3056 3405
#ifdef KEY_CATAB
3406
    /* Document-const: KEY_CATAB
3407
     * Clear all tabs
3408
     */
3057 3409
    /* Document-const: CATAB
3058
     *
3059 3410
     * Clear all tabs
3060 3411
     */
3061 3412
    rb_curses_define_const(KEY_CATAB);
3062 3413
    rb_define_const(mKey, "CATAB", INT2NUM(KEY_CATAB));
3063 3414
#endif
3064 3415
#ifdef KEY_ENTER
3416
    /* Document-const: KEY_ENTER
3417
     * Enter or send
3418
     */
3065 3419
    /* Document-const: ENTER
3066
     *
3067 3420
     * Enter or send
3068 3421
     */
3069 3422
    rb_curses_define_const(KEY_ENTER);
3070 3423
    rb_define_const(mKey, "ENTER", INT2NUM(KEY_ENTER));
3071 3424
#endif
3072 3425
#ifdef KEY_SRESET
3426
    /* Document-const: KEY_SRESET
3427
     * Soft (partial) reset
3428
     */
3073 3429
    /* Document-const: SRESET
3074
     *
3075 3430
     * Soft (partial) reset
3076 3431
     */
3077 3432
    rb_curses_define_const(KEY_SRESET);
3078 3433
    rb_define_const(mKey, "SRESET", INT2NUM(KEY_SRESET));
3079 3434
#endif
3080 3435
#ifdef KEY_RESET
3436
    /* Document-const: KEY_RESET
3437
     * Reset or hard reset
3438
     */
3081 3439
    /* Document-const: RESET
3082
     *
3083 3440
     * Reset or hard reset
3084 3441
     */
3085 3442
    rb_curses_define_const(KEY_RESET);
3086 3443
    rb_define_const(mKey, "RESET", INT2NUM(KEY_RESET));
3087 3444
#endif
3088 3445
#ifdef KEY_PRINT
3446
    /* Document-const: KEY_PRINT
3447
     * Print or copy
3448
     */
3089 3449
    /* Document-const: PRINT
3090
     *
3091 3450
     * Print or copy
3092 3451
     */
3093 3452
    rb_curses_define_const(KEY_PRINT);
3094 3453
    rb_define_const(mKey, "PRINT", INT2NUM(KEY_PRINT));
3095 3454
#endif
3096 3455
#ifdef KEY_LL
3456
    /* Document-const: KEY_LL
3457
     * Home down or bottom (lower left)
3458
     */
3097 3459
    /* Document-const: LL
3098
     *
3099 3460
     * Home down or bottom (lower left)
3100 3461
     */
3101 3462
    rb_curses_define_const(KEY_LL);
3102 3463
    rb_define_const(mKey, "LL", INT2NUM(KEY_LL));
3103 3464
#endif
3104 3465
#ifdef KEY_A1
3466
    /* Document-const: KEY_A1
3467
     * Upper left of keypad
3468
     */
3105 3469
    /* Document-const: A1
3106
     *
3107 3470
     * Upper left of keypad
3108 3471
     */
3109 3472
    rb_curses_define_const(KEY_A1);
3110 3473
    rb_define_const(mKey, "A1", INT2NUM(KEY_A1));
3111 3474
#endif
3112 3475
#ifdef KEY_A3
3476
    /* Document-const: KEY_A3
3477
     * Upper right of keypad
3478
     */
3113 3479
    /* Document-const: A3
3114
     *
3115 3480
     * Upper right of keypad
3116 3481
     */
3117 3482
    rb_curses_define_const(KEY_A3);
3118 3483
    rb_define_const(mKey, "A3", INT2NUM(KEY_A3));
3119 3484
#endif
3120 3485
#ifdef KEY_B2
3486
    /* Document-const: KEY_B2
3487
     * Center of keypad
3488
     */
3121 3489
    /* Document-const: B2
3122
     *
3123 3490
     * Center of keypad
3124 3491
     */
3125 3492
    rb_curses_define_const(KEY_B2);
3126 3493
    rb_define_const(mKey, "B2", INT2NUM(KEY_B2));
3127 3494
#endif
3128 3495
#ifdef KEY_C1
3496
    /* Document-const: KEY_C1
3497
     * Lower left of keypad
3498
     */
3129 3499
    /* Document-const: C1
3130
     *
3131 3500
     * Lower left of keypad
3132 3501
     */
3133 3502
    rb_curses_define_const(KEY_C1);
3134 3503
    rb_define_const(mKey, "C1", INT2NUM(KEY_C1));
3135 3504
#endif
3136 3505
#ifdef KEY_C3
3506
    /* Document-const: KEY_C3
3507
     * Lower right of keypad
3508
     */
3137 3509
    /* Document-const: C3
3138
     *
3139 3510
     * Lower right of keypad
3140 3511
     */
3141 3512
    rb_curses_define_const(KEY_C3);
......
3143 3514
#endif
3144 3515
#ifdef KEY_BTAB
3145 3516
    /* Document-const: BTAB
3146
     *
3517
     * Back tab key
3518
     */
3519
    /* Document-const: KEY_BTAB
3147 3520
     * Back tab key
3148 3521
     */
3149 3522
    rb_curses_define_const(KEY_BTAB);
3150 3523
    rb_define_const(mKey, "BTAB", INT2NUM(KEY_BTAB));
3151 3524
#endif
3152 3525
#ifdef KEY_BEG
3526
    /* Document-const: KEY_BEG
3527
     * Beginning key
3528
     */
3153 3529
    /* Document-const: BEG
3154
     *
3155 3530
     * Beginning key
3156 3531
     */
3157 3532
    rb_curses_define_const(KEY_BEG);
3158 3533
    rb_define_const(mKey, "BEG", INT2NUM(KEY_BEG));
3159 3534
#endif
3160 3535
#ifdef KEY_CANCEL
3536
    /* Document-const: KEY_CANCEL
3537
     * Cancel key
3538
     */
3161 3539
    /* Document-const: CANCEL
3162
     *
3163 3540
     * Cancel key
3164 3541
     */
3165 3542
    rb_curses_define_const(KEY_CANCEL);
3166 3543
    rb_define_const(mKey, "CANCEL", INT2NUM(KEY_CANCEL));
3167 3544
#endif
3168 3545
#ifdef KEY_CLOSE
3546
    /* Document-const: KEY_CLOSE
3547
     * Close key
3548
     */
3169 3549
    /* Document-const: CLOSE
3170
     *
3171 3550
     * Close key
3172 3551
     */
3173 3552
    rb_curses_define_const(KEY_CLOSE);
3174 3553
    rb_define_const(mKey, "CLOSE", INT2NUM(KEY_CLOSE));
3175 3554
#endif
3176 3555
#ifdef KEY_COMMAND
3556
    /* Document-const: KEY_COMMAND
3557
     * Cmd (command) key
3558
     */
3177 3559
    /* Document-const: COMMAND
3178
     *
3179 3560
     * Cmd (command) key
3180 3561
     */
3181 3562
    rb_curses_define_const(KEY_COMMAND);
3182 3563
    rb_define_const(mKey, "COMMAND", INT2NUM(KEY_COMMAND));
3183 3564
#endif
3184 3565
#ifdef KEY_COPY
3566
    /* Document-const: KEY_COPY
3567
     * Copy key
3568
     */
3185 3569
    /* Document-const: COPY
3186
     *
3187 3570
     * Copy key
3188 3571
     */
3189 3572
    rb_curses_define_const(KEY_COPY);
3190 3573
    rb_define_const(mKey, "COPY", INT2NUM(KEY_COPY));
3191 3574
#endif
3192 3575
#ifdef KEY_CREATE
3576
    /* Document-const: KEY_CREATE
3577
     * Create key
3578
     */
3193 3579
    /* Document-const: CREATE
3194
     *
3195 3580
     * Create key
3196 3581
     */
3197 3582
    rb_curses_define_const(KEY_CREATE);
3198 3583
    rb_define_const(mKey, "CREATE", INT2NUM(KEY_CREATE));
3199 3584
#endif
3200 3585
#ifdef KEY_END
3586
    /* Document-const: KEY_END
3587
     * End key
3588
     */
3201 3589
    /* Document-const: END
3202
     *
3203 3590
     * End key
3204 3591
     */
3205 3592
    rb_curses_define_const(KEY_END);
3206 3593
    rb_define_const(mKey, "END", INT2NUM(KEY_END));
3207 3594
#endif
3208 3595
#ifdef KEY_EXIT
3596
    /* Document-const: KEY_EXIT
3597
     * Exit key
3598
     */
3209 3599
    /* Document-const: EXIT
3210
     *
3211 3600
     * Exit key
3212 3601
     */
3213 3602
    rb_curses_define_const(KEY_EXIT);
3214 3603
    rb_define_const(mKey, "EXIT", INT2NUM(KEY_EXIT));
3215 3604
#endif
3216 3605
#ifdef KEY_FIND
3606
    /* Document-const: KEY_FIND
3607
     * Find key
3608
     */
3217 3609
    /* Document-const: FIND
3218
     *
3219 3610
     * Find key
3220 3611
     */
3221 3612
    rb_curses_define_const(KEY_FIND);
3222 3613
    rb_define_const(mKey, "FIND", INT2NUM(KEY_FIND));
3223 3614
#endif
3224 3615
#ifdef KEY_HELP
3616
    /* Document-const: KEY_HELP
3617
     * Help key
3618
     */
3225 3619
    /* Document-const: HELP
3226
     *
3227 3620
     * Help key
3228 3621
     */
3229 3622
    rb_curses_define_const(KEY_HELP);
3230 3623
    rb_define_const(mKey, "HELP", INT2NUM(KEY_HELP));
3231 3624
#endif
3232 3625
#ifdef KEY_MARK
3626
    /* Document-const: KEY_MARK
3627
     * Mark key
3628
     */
3233 3629
    /* Document-const: MARK
3234
     *
3235 3630
     * Mark key
3236 3631
     */
3237 3632
    rb_curses_define_const(KEY_MARK);
3238 3633
    rb_define_const(mKey, "MARK", INT2NUM(KEY_MARK));
3239 3634
#endif
3240 3635
#ifdef KEY_MESSAGE
3636
    /* Document-const: KEY_MESSAGE
3637
     * Message key
3638
     */
3241 3639
    /* Document-const: MESSAGE
3242
     *
3243 3640
     * Message key
3244 3641
     */
3245 3642
    rb_curses_define_const(KEY_MESSAGE);
3246 3643
    rb_define_const(mKey, "MESSAGE", INT2NUM(KEY_MESSAGE));
3247 3644
#endif
3248 3645
#ifdef KEY_MOVE
3646
    /* Document-const: KEY_MOVE
3647
     * Move key
3648
     */
3249 3649
    /* Document-const: MOVE
3250
     *
3251 3650
     * Move key
3252 3651
     */
3253 3652
    rb_curses_define_const(KEY_MOVE);
3254 3653
    rb_define_const(mKey, "MOVE", INT2NUM(KEY_MOVE));
3255 3654
#endif
3256 3655
#ifdef KEY_NEXT
3656
    /* Document-const: KEY_NEXT
3657
     * Next object key
3658
     */
3257 3659
    /* Document-const: NEXT
3258
     *
3259 3660
     * Next object key
3260 3661
     */
3261 3662
    rb_curses_define_const(KEY_NEXT);
3262 3663
    rb_define_const(mKey, "NEXT", INT2NUM(KEY_NEXT));
3263 3664
#endif
3264 3665
#ifdef KEY_OPEN
3666
    /* Document-const: KEY_OPEN
3667
     * Open key
3668
     */
3265 3669
    /* Document-const: OPEN
3266
     *
3267 3670
     * Open key
3268 3671
     */
3269 3672
    rb_curses_define_const(KEY_OPEN);
3270 3673
    rb_define_const(mKey, "OPEN", INT2NUM(KEY_OPEN));
3271 3674
#endif
3272 3675
#ifdef KEY_OPTIONS
3676
    /* Document-const: KEY_OPTIONS
3677
     * Options key
3678
     */
3273 3679
    /* Document-const: OPTIONS
3274
     *
3275 3680
     * Options key
3276 3681
     */
3277 3682
    rb_curses_define_const(KEY_OPTIONS);
3278 3683
    rb_define_const(mKey, "OPTIONS", INT2NUM(KEY_OPTIONS));
3279 3684
#endif
3280 3685
#ifdef KEY_PREVIOUS
3686
    /* Document-const: KEY_PREVIOUS
3687
     * Previous object key
3688
     */
3281 3689
    /* Document-const: PREVIOUS
3282
     *
3283 3690
     * Previous object key
3284 3691
     */
3285 3692
    rb_curses_define_const(KEY_PREVIOUS);
3286 3693
    rb_define_const(mKey, "PREVIOUS", INT2NUM(KEY_PREVIOUS));
3287 3694
#endif
3288 3695
#ifdef KEY_REDO
3696
    /* Document-const: KEY_REDO
3697
     * Redo key
3698
     */
3289 3699
    /* Document-const: REDO
3290
     *
3291 3700
     * Redo key
3292 3701
     */
3293 3702
    rb_curses_define_const(KEY_REDO);
3294 3703
    rb_define_const(mKey, "REDO", INT2NUM(KEY_REDO));
3295 3704
#endif
3296 3705
#ifdef KEY_REFERENCE
3706
    /* Document-const: KEY_REFERENCE
3707
     * Reference key
3708
     */
3297 3709
    /* Document-const: REFERENCE
3298
     *
3299 3710
     * Reference key
3300 3711
     */
3301 3712
    rb_curses_define_const(KEY_REFERENCE);
3302 3713
    rb_define_const(mKey, "REFERENCE", INT2NUM(KEY_REFERENCE));
3303 3714
#endif
3304 3715
#ifdef KEY_REFRESH
3716
    /* Document-const: KEY_REFRESH
3717
     * Refresh key
3718
     */
3305 3719
    /* Document-const: REFRESH
3306
     *
3307 3720
     * Refresh key
3308 3721
     */
3309 3722
    rb_curses_define_const(KEY_REFRESH);
3310 3723
    rb_define_const(mKey, "REFRESH", INT2NUM(KEY_REFRESH));
3311 3724
#endif
3312 3725
#ifdef KEY_REPLACE
3726
    /* Document-const: KEY_REPLACE
3727
     * Replace key
3728
     */
3313 3729
    /* Document-const: REPLACE
3314
     *
3315 3730
     * Replace key
3316 3731
     */
3317 3732
    rb_curses_define_const(KEY_REPLACE);
3318 3733
    rb_define_const(mKey, "REPLACE", INT2NUM(KEY_REPLACE));
3319 3734
#endif
3320 3735
#ifdef KEY_RESTART
3736
    /* Document-const: KEY_RESTART
3737
     * Restart key
3738
     */
3321 3739
    /* Document-const: RESTART
3322
     *
3323 3740
     * Restart key
3324 3741
     */
3325 3742
    rb_curses_define_const(KEY_RESTART);
3326 3743
    rb_define_const(mKey, "RESTART", INT2NUM(KEY_RESTART));
3327 3744
#endif
3328 3745
#ifdef KEY_RESUME
3746
    /* Document-const: KEY_RESUME
3747
     * Resume key
3748
     */
3329 3749
    /* Document-const: RESUME
3330
     *
3331 3750
     * Resume key
3332 3751
     */
3333 3752
    rb_curses_define_const(KEY_RESUME);
3334 3753
    rb_define_const(mKey, "RESUME", INT2NUM(KEY_RESUME));
3335 3754
#endif
3336 3755
#ifdef KEY_SAVE
3756
    /* Document-const: KEY_SAVE
3757
     * Save key
3758
     */
3337 3759
    /* Document-const: SAVE
3338
     *
3339 3760
     * Save key
3340 3761
     */
3341 3762
    rb_curses_define_const(KEY_SAVE);
3342 3763
    rb_define_const(mKey, "SAVE", INT2NUM(KEY_SAVE));
3343 3764
#endif
3344 3765
#ifdef KEY_SBEG
3766
    /* Document-const: KEY_SBEG
3767
     * Shifted beginning key
3768
     */
3345 3769
    /* Document-const: SBEG
3346
     *
3347 3770
     * Shifted beginning key
3348 3771
     */
3349 3772
    rb_curses_define_const(KEY_SBEG);
3350 3773
    rb_define_const(mKey, "SBEG", INT2NUM(KEY_SBEG));
3351 3774
#endif
3352 3775
#ifdef KEY_SCANCEL
3776
    /* Document-const: KEY_SCANCEL
3777
     * Shifted cancel key
3778
     */
3353 3779
    /* Document-const: SCANCEL
3354
     *
3355 3780
     * Shifted cancel key
3356 3781
     */
3357 3782
    rb_curses_define_const(KEY_SCANCEL);
3358 3783
    rb_define_const(mKey, "SCANCEL", INT2NUM(KEY_SCANCEL));
3359 3784
#endif
3360 3785
#ifdef KEY_SCOMMAND
3786
    /* Document-const: KEY_SCOMMAND
3787
     * Shifted command key
3788
     */
3361 3789
    /* Document-const: SCOMMAND
3362
     *
3363 3790
     * Shifted command key
3364 3791
     */
3365 3792
    rb_curses_define_const(KEY_SCOMMAND);
3366 3793
    rb_define_const(mKey, "SCOMMAND", INT2NUM(KEY_SCOMMAND));
3367 3794
#endif
3368 3795
#ifdef KEY_SCOPY
3796
    /* Document-const: KEY_SCOPY
3797
     * Shifted copy key
3798
     */
3369 3799
    /* Document-const: SCOPY
3370
     *
3371 3800
     * Shifted copy key
3372 3801
     */
3373 3802
    rb_curses_define_const(KEY_SCOPY);
3374 3803
    rb_define_const(mKey, "SCOPY", INT2NUM(KEY_SCOPY));
3375 3804
#endif
3376 3805
#ifdef KEY_SCREATE
3806
    /* Document-const: KEY_SCREATE
3807
     * Shifted create key
3808
     */
3377 3809
    /* Document-const: SCREATE
3378
     *
3379 3810
     * Shifted create key
3380 3811
     */
3381 3812
    rb_curses_define_const(KEY_SCREATE);
3382 3813
    rb_define_const(mKey, "SCREATE", INT2NUM(KEY_SCREATE));
3383 3814
#endif
3384 3815
#ifdef KEY_SDC
3816
    /* Document-const: KEY_SDC
3817
     * Shifted delete char key
3818
     */
3385 3819
    /* Document-const: SDC
3386
     *
3387 3820
     * Shifted delete char key
3388 3821
     */
3389 3822
    rb_curses_define_const(KEY_SDC);
3390 3823
    rb_define_const(mKey, "SDC", INT2NUM(KEY_SDC));
3391 3824
#endif
3392 3825
#ifdef KEY_SDL
3826
    /* Document-const: KEY_SDL
3827
     * Shifted delete line key
3828
     */
3393 3829
    /* Document-const: SDL
3394
     *
3395 3830
     * Shifted delete line key
3396 3831
     */
3397 3832
    rb_curses_define_const(KEY_SDL);
3398 3833
    rb_define_const(mKey, "SDL", INT2NUM(KEY_SDL));
3399 3834
#endif
3400 3835
#ifdef KEY_SELECT
3836
    /* Document-const: KEY_SELECT
3837
     * Select key
3838
     */
3401 3839
    /* Document-const: SELECT
3402
     *
3403 3840
     * Select key
3404 3841
     */
3405 3842
    rb_curses_define_const(KEY_SELECT);
3406 3843
    rb_define_const(mKey, "SELECT", INT2NUM(KEY_SELECT));
3407 3844
#endif
3408 3845
#ifdef KEY_SEND
3846
    /* Document-const: KEY_SEND
3847
     * Shifted end key
3848
     */
3409 3849
    /* Document-const: SEND
3410
     *
3411 3850
     * Shifted end key
3412 3851
     */
3413 3852
    rb_curses_define_const(KEY_SEND);
3414 3853
    rb_define_const(mKey, "SEND", INT2NUM(KEY_SEND));
3415 3854
#endif
3416 3855
#ifdef KEY_SEOL
3856
    /* Document-const: KEY_SEOL
3857
     * Shifted clear line key
3858
     */
3417 3859
    /* Document-const: SEOL
3418
     *
3419 3860
     * Shifted clear line key
3420 3861
     */
3421 3862
    rb_curses_define_const(KEY_SEOL);
3422 3863
    rb_define_const(mKey, "SEOL", INT2NUM(KEY_SEOL));
3423 3864
#endif
3424 3865
#ifdef KEY_SEXIT
3866
    /* Document-const: KEY_SEXIT
3867
     * Shifted exit key
3868
     */
3425 3869
    /* Document-const: SEXIT
3426
     *
3427 3870
     * Shifted exit key
3428 3871
     */
3429 3872
    rb_curses_define_const(KEY_SEXIT);
3430 3873
    rb_define_const(mKey, "SEXIT", INT2NUM(KEY_SEXIT));
3431 3874
#endif
3432 3875
#ifdef KEY_SFIND
3876
    /* Document-const: KEY_SFIND
3877
     * Shifted find key
3878
     */
3433 3879
    /* Document-const: SFIND
3434
     *
3435 3880
     * Shifted find key
3436 3881
     */
3437 3882
    rb_curses_define_const(KEY_SFIND);
3438 3883
    rb_define_const(mKey, "SFIND", INT2NUM(KEY_SFIND));
3439 3884
#endif
3440 3885
#ifdef KEY_SHELP
3886
    /* Document-const: KEY_SHELP
3887
     * Shifted help key
3888
     */
3441 3889
    /* Document-const: SHELP
3442
     *
3443 3890
     * Shifted help key
3444 3891
     */
3445 3892
    rb_curses_define_const(KEY_SHELP);
3446 3893
    rb_define_const(mKey, "SHELP", INT2NUM(KEY_SHELP));
3447 3894
#endif
3448 3895
#ifdef KEY_SHOME
3896
    /* Document-const: KEY_SHOME
3897
     * Shifted home key
3898
     */
3449 3899
    /* Document-const: SHOME
3450
     *
3451 3900
     * Shifted home key
3452 3901
     */
3453 3902
    rb_curses_define_const(KEY_SHOME);
3454 3903
    rb_define_const(mKey, "SHOME", INT2NUM(KEY_SHOME));
3455 3904
#endif
3456 3905
#ifdef KEY_SIC
3906
    /* Document-const: KEY_SIC
3907
     * Shifted input key
3908
     */
3457 3909
    /* Document-const: SIC
3458
     *
3459 3910
     * Shifted input key
3460 3911
     */
3461 3912
    rb_curses_define_const(KEY_SIC);
3462 3913
    rb_define_const(mKey, "SIC", INT2NUM(KEY_SIC));
3463 3914
#endif
3464 3915
#ifdef KEY_SLEFT
3916
    /* Document-const: KEY_SLEFT
3917
     * Shifted left arrow key
3918
     */
3465 3919
    /* Document-const: SLEFT
3466
     *
3467 3920
     * Shifted left arrow key
3468 3921
     */
3469 3922
    rb_curses_define_const(KEY_SLEFT);
3470 3923
    rb_define_const(mKey, "SLEFT", INT2NUM(KEY_SLEFT));
3471 3924
#endif
3472 3925
#ifdef KEY_SMESSAGE
3926
    /* Document-const: KEY_SMESSAGE
3927
     * Shifted message key
3928
     */
3473 3929
    /* Document-const: SMESSAGE
3474
     *
3475 3930
     * Shifted message key
3476 3931
     */
3477 3932
    rb_curses_define_const(KEY_SMESSAGE);
3478 3933
    rb_define_const(mKey, "SMESSAGE", INT2NUM(KEY_SMESSAGE));
3479 3934
#endif
3480 3935
#ifdef KEY_SMOVE
3936
    /* Document-const: KEY_SMOVE
3937
     * Shifted move key
3938
     */
3481 3939
    /* Document-const: SMOVE
3482
     *
3483 3940
     * Shifted move key
3484 3941
     */
3485 3942
    rb_curses_define_const(KEY_SMOVE);
3486 3943
    rb_define_const(mKey, "SMOVE", INT2NUM(KEY_SMOVE));
3487 3944
#endif
3488 3945
#ifdef KEY_SNEXT
3946
    /* Document-const: KEY_SNEXT
3947
     * Shifted next key
3948
     */
3489 3949
    /* Document-const: SNEXT
3490
     *
3491 3950
     * Shifted next key
3492 3951
     */
3493 3952
    rb_curses_define_const(KEY_SNEXT);
3494 3953
    rb_define_const(mKey, "SNEXT", INT2NUM(KEY_SNEXT));
3495 3954
#endif
3496 3955
#ifdef KEY_SOPTIONS
3956
    /* Document-const: KEY_SOPTIONS
3957
     * Shifted options key
3958
     */
3497 3959
    /* Document-const: SOPTIONS
3498
     *
3499 3960
     * Shifted options key
3500 3961
     */
3501 3962
    rb_curses_define_const(KEY_SOPTIONS);
3502 3963
    rb_define_const(mKey, "SOPTIONS", INT2NUM(KEY_SOPTIONS));
3503 3964
#endif
3504 3965
#ifdef KEY_SPREVIOUS
3966
    /* Document-const: KEY_SPREVIOUS
3967
     * Shifted previous key
3968
     */
3505 3969
    /* Document-const: SPREVIOUS
3506
     *
3507 3970
     * Shifted previous key
3508 3971
     */
3509 3972
    rb_curses_define_const(KEY_SPREVIOUS);
3510 3973
    rb_define_const(mKey, "SPREVIOUS", INT2NUM(KEY_SPREVIOUS));
3511 3974
#endif
3512 3975
#ifdef KEY_SPRINT
3976
    /* Document-const: KEY_SPRINT
3977
     * Shifted print key
3978
     */
3513 3979
    /* Document-const: SPRINT
3514
     *
3515 3980
     * Shifted print key
3516 3981
     */
3517 3982
    rb_curses_define_const(KEY_SPRINT);
3518 3983
    rb_define_const(mKey, "SPRINT", INT2NUM(KEY_SPRINT));
3519 3984
#endif
3520 3985
#ifdef KEY_SREDO
3986
    /* Document-const: KEY_SREDO
3987
     * Shifted redo key
3988
     */
3521 3989
    /* Document-const: SREDO
3522
     *
3523 3990
     * Shifted redo key
3524 3991
     */
3525 3992
    rb_curses_define_const(KEY_SREDO);
3526 3993
    rb_define_const(mKey, "SREDO", INT2NUM(KEY_SREDO));
3527 3994
#endif
3528 3995
#ifdef KEY_SREPLACE
3996
    /* Document-const: KEY_SREPLACE
3997
     * Shifted replace key
3998
     */
3529 3999
    /* Document-const: SREPLACE
3530
     *
3531 4000
     * Shifted replace key
3532 4001
     */
3533 4002
    rb_curses_define_const(KEY_SREPLACE);
3534 4003
    rb_define_const(mKey, "SREPLACE", INT2NUM(KEY_SREPLACE));
3535 4004
#endif
3536 4005
#ifdef KEY_SRIGHT
4006
    /* Document-const: KEY_SRIGHT
4007
     * Shifted right arrow key
4008
     */
3537 4009
    /* Document-const: SRIGHT
3538
     *
3539 4010
     * Shifted right arrow key
3540 4011
     */
3541 4012
    rb_curses_define_const(KEY_SRIGHT);
3542 4013
    rb_define_const(mKey, "SRIGHT", INT2NUM(KEY_SRIGHT));
3543 4014
#endif
3544 4015
#ifdef KEY_SRSUME
4016
    /* Document-const: KEY_SRSUME
4017
     * Shifted resume key
4018
     */
3545 4019
    /* Document-const: SRSUME
3546
     *
3547 4020
     * Shifted resume key
3548 4021
     */
3549 4022
    rb_curses_define_const(KEY_SRSUME);
3550 4023
    rb_define_const(mKey, "SRSUME", INT2NUM(KEY_SRSUME));
3551 4024
#endif
3552 4025
#ifdef KEY_SSAVE
4026
    /* Document-const: KEY_SSAVE
4027
     * Shifted save key
4028
     */
3553 4029
    /* Document-const: SSAVE
3554
     *
3555 4030
     * Shifted save key
3556 4031
     */
3557 4032
    rb_curses_define_const(KEY_SSAVE);
3558 4033
    rb_define_const(mKey, "SSAVE", INT2NUM(KEY_SSAVE));
3559 4034
#endif
3560 4035
#ifdef KEY_SSUSPEND
4036
    /* Document-const: KEY_SSUSPEND
4037
     * Shifted suspend key
4038
     */
3561 4039
    /* Document-const: SSUSPEND
3562
     *
3563 4040
     * Shifted suspend key
3564 4041
     */
3565 4042
    rb_curses_define_const(KEY_SSUSPEND);
3566 4043
    rb_define_const(mKey, "SSUSPEND", INT2NUM(KEY_SSUSPEND));
3567 4044
#endif
3568 4045
#ifdef KEY_SUNDO
4046
    /* Document-const: KEY_SUNDO
4047
     * Shifted undo key
4048
     */
3569 4049
    /* Document-const: SUNDO
3570
     *
3571 4050
     * Shifted undo key
3572 4051
     */
3573 4052
    rb_curses_define_const(KEY_SUNDO);
3574 4053
    rb_define_const(mKey, "SUNDO", INT2NUM(KEY_SUNDO));
3575 4054
#endif
3576 4055
#ifdef KEY_SUSPEND
4056
    /* Document-const: KEY_SUSPEND
4057
     * Suspend key
4058
     */
3577 4059
    /* Document-const: SUSPEND
3578
     *
3579 4060
     * Suspend key
3580 4061
     */
3581 4062
    rb_curses_define_const(KEY_SUSPEND);
3582 4063
    rb_define_const(mKey, "SUSPEND", INT2NUM(KEY_SUSPEND));
3583 4064
#endif
3584 4065
#ifdef KEY_UNDO
4066
    /* Document-const: KEY_UNDO
4067
     * Undo key
4068
     */
3585 4069
    /* Document-const: UNDO
3586
     *
3587 4070
     * Undo key
3588 4071
     */
3589 4072
    rb_curses_define_const(KEY_UNDO);
3590 4073
    rb_define_const(mKey, "UNDO", INT2NUM(KEY_UNDO));
3591 4074
#endif
3592 4075
#ifdef KEY_RESIZE
4076
    /* Document-const: KEY_RESIZE
4077
     * Screen Resized
4078
     */
3593 4079
    /* Document-const: RESIZE
3594
     *
3595 4080
     * Screen Resized
3596 4081
     */
3597 4082
    rb_curses_define_const(KEY_RESIZE);
3598 4083
    rb_define_const(mKey, "RESIZE", INT2NUM(KEY_RESIZE));
3599 4084
#endif
3600 4085
#ifdef KEY_MAX
4086
    /* Document-const: KEY_MAX
4087
     * The maximum allowed curses key value.
4088
     */
3601 4089
    /* Document-const: MAX
3602
     *
3603 4090
     * The maximum allowed curses key value.
3604 4091
     */
3605 4092
    rb_curses_define_const(KEY_MAX);