~ubuntu-branches/ubuntu/wily/xterm/wily

« back to all changes in this revision

Viewing changes to ptyx.h

  • Committer: Bazaar Package Importer
  • Author(s): Robert Hooker
  • Date: 2010-06-10 22:13:44 UTC
  • mfrom: (1.1.18 upstream) (11.1.19 sid)
  • Revision ID: james.westby@ubuntu.com-20100610221344-s4wbmxbevlklu7fv
Tags: 259-1ubuntu1
* Merge from debian unstable. Remaining Ubuntu changes:
  - Revert the libutempter change because it's in universe. (LP: #539473)
  - Enabled URL highlighting
  - Add 100_uxterm_utf8_title.patch: Set utf8Titles to true by default
    when using uxterm, so that it displays utf8 directories in titles
    properly.  May cause issues with apps that use control sequences for
    updating the xterm titlebar - users should use xterm or set utf8Title
    to false in this case. (LP: #320388, #408496)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $XTermId: ptyx.h,v 1.656 2010/01/04 09:09:29 tom Exp $ */
 
1
/* $XTermId: ptyx.h,v 1.668 2010/06/04 09:41:40 tom Exp $ */
2
2
 
3
3
/*
4
4
 * Copyright 1999-2009,2010 by Thomas E. Dickey
77
77
#define MyStackAlloc(size, stack_cache_array)     \
78
78
    ((size) <= sizeof(stack_cache_array)          \
79
79
    ?  (XtPointer)(stack_cache_array)             \
80
 
    :  (XtPointer)malloc((unsigned)(size)))
 
80
    :  (XtPointer)malloc((size_t)(size)))
81
81
 
82
82
#define MyStackFree(pointer, stack_cache_array) \
83
83
    if ((pointer) != ((char *)(stack_cache_array))) free(pointer)
84
84
 
85
85
/* adapted from vile (vi-like-emacs) */
86
 
#define TypeCallocN(type,n)     (type *)calloc((n), sizeof(type))
87
 
#define TypeCalloc(type)        TypeCallocN(type,1)
 
86
#define TypeCallocN(type,n)     (type *)calloc((size_t) (n), sizeof(type))
 
87
#define TypeCalloc(type)        TypeCallocN(type, 1)
88
88
 
89
 
#define TypeMallocN(type,n)     (type *)malloc(sizeof(type) * (n))
90
 
#define TypeMalloc(type)        TypeMallocN(type,1)
 
89
#define TypeMallocN(type,n)     (type *)malloc(sizeof(type) * (size_t) (n))
 
90
#define TypeMalloc(type)        TypeMallocN(type, 1)
91
91
 
92
92
#define TypeRealloc(type,n,p)   (type *)realloc(p, (n) * sizeof(type))
93
93
 
94
94
/* use these to allocate partly-structured data */
95
 
#define CastMallocN(type,n)     (type *)malloc(sizeof(type) + (n))
 
95
#define CastMallocN(type,n)     (type *)malloc(sizeof(type) + (size_t) (n))
96
96
#define CastMalloc(type)        CastMallocN(type,0)
97
97
 
98
98
#define BumpBuffer(type, buffer, size, want) \
327
327
 */
328
328
#define ANSI_BEL        0x07
329
329
#define ANSI_FF         0x0C            /* C0, C1 control names         */
 
330
#define ANSI_XON        0x11            /* DC1 */
 
331
#define ANSI_XOFF       0x13            /* DC3 */
330
332
#define ANSI_NAK        0x15
331
333
#define ANSI_CAN        0x18
332
334
#define ANSI_ESC        0x1B
631
633
#define OPT_SUN_FUNC_KEYS 1 /* true if xterm supports Sun-style function keys */
632
634
#endif
633
635
 
 
636
#ifndef OPT_SCROLL_LOCK
 
637
#define OPT_SCROLL_LOCK 1 /* true if xterm interprets fontsize-shifting */
 
638
#endif
 
639
 
634
640
#ifndef OPT_SELECT_REGEX
635
641
#define OPT_SELECT_REGEX 0 /* true if xterm supports regular-expression selects */
636
642
#endif
907
913
    , ewLAST
908
914
} WindowOps;
909
915
 
910
 
#define COLOR_DEFINED(s,w)      ((s)->which & (1<<(w)))
 
916
#define COLOR_DEFINED(s,w)      ((s)->which & (unsigned) (1<<(w)))
911
917
#define COLOR_VALUE(s,w)        ((s)->colors[w])
912
 
#define SET_COLOR_VALUE(s,w,v)  (((s)->colors[w] = (v)), ((s)->which |= (1<<(w))))
 
918
#define SET_COLOR_VALUE(s,w,v)  (((s)->colors[w] = (v)), UIntSet((s)->which, (1<<(w))))
913
919
 
914
920
#define COLOR_NAME(s,w)         ((s)->names[w])
915
 
#define SET_COLOR_NAME(s,w,v)   (((s)->names[w] = (v)), ((s)->which |= (1<<(w))))
 
921
#define SET_COLOR_NAME(s,w,v)   (((s)->names[w] = (v)), ((s)->which |= (unsigned) (1<<(w))))
916
922
 
917
923
#define UNDEFINE_COLOR(s,w)     ((s)->which &= (~((w)<<1)))
918
924
 
973
979
# define XK_COLORS 0x0003
974
980
#endif
975
981
 
976
 
# define XK_TCAPNAME 0x0004
977
 
 
978
982
#else   /* !OPT_ISO_COLORS */
979
983
 
980
984
#define TERM_COLOR_FLAGS(xw) 0
985
989
 
986
990
#endif  /* OPT_ISO_COLORS */
987
991
 
 
992
# define XK_TCAPNAME 0x0004
 
993
 
988
994
#if OPT_AIX_COLORS
989
995
#define if_OPT_AIX_COLORS(screen, code) if(screen->colorMode) code
990
996
#else
1803
1809
        unsigned        restore_height;
1804
1810
#endif
1805
1811
 
 
1812
#if OPT_SCROLL_LOCK
 
1813
        Boolean         allowScrollLock;/* ScrollLock mode              */
 
1814
        Boolean         allowScrollLock0;/* initial ScrollLock mode     */
 
1815
        Boolean         scroll_lock;    /* true to keep buffer in view  */
 
1816
        Boolean         scroll_dirty;   /* scrolling makes screen dirty */
 
1817
#endif
 
1818
 
1806
1819
#if OPT_VT52_MODE
1807
1820
        int             vt52_save_level; /* save-area for DECANM        */
1808
1821
        Char            vt52_save_curgl;
1980
1993
#if OPT_READLINE
1981
1994
#define SCREEN_FLAG(screenp,f)          (1&(screenp)->f)
1982
1995
#define SCREEN_FLAG_set(screenp,f)      ((screenp)->f |= 1)
1983
 
#define SCREEN_FLAG_unset(screenp,f)    ((screenp)->f &= ~1L)
 
1996
#define SCREEN_FLAG_unset(screenp,f)    ((screenp)->f &= (unsigned) ~1L)
1984
1997
#define SCREEN_FLAG_save(screenp,f)     \
1985
1998
        ((screenp)->f = (((screenp)->f)<<1) | SCREEN_FLAG(screenp,f))
1986
1999
#define SCREEN_FLAG_restore(screenp,f)  ((screenp)->f = (((screenp)->f)>>1))
2056
2069
#define KEYBOARD_TYPES NAME_TCAP_KT NAME_HP_KT NAME_SCO_KT NAME_SUN_KT NAME_VT220_KT
2057
2070
 
2058
2071
#if OPT_TRACE
 
2072
#define TRACE_RC(code,func) code = func
 
2073
#else
 
2074
#define TRACE_RC(code,func) func
 
2075
#endif
 
2076
 
 
2077
#if OPT_TRACE
2059
2078
extern  const char * visibleKeyboardType(xtermKeyboardType);
2060
2079
#endif
2061
2080
 
2167
2186
#if OPT_NUM_LOCK
2168
2187
    Boolean real_NumLock;       /* true if we treat NumLock key specially */
2169
2188
    Boolean alwaysUseMods;      /* true if we always want f-key modifiers */
2170
 
    unsigned long num_lock;     /* modifier for Num_Lock */
2171
 
    unsigned long alt_mods;     /* modifier for Alt_L or Alt_R */
2172
 
    unsigned long meta_mods;    /* modifier for Meta_L or Meta_R */
2173
 
    unsigned long other_mods;   /* conflicting modifiers, e.g., Mode_Switch */
 
2189
    unsigned num_lock;          /* modifier for Num_Lock */
 
2190
    unsigned alt_mods;          /* modifier for Alt_L or Alt_R */
 
2191
    unsigned meta_mods;         /* modifier for Meta_L or Meta_R */
 
2192
    unsigned other_mods;        /* conflicting modifiers, e.g., Mode_Switch */
2174
2193
#endif
2175
2194
#if OPT_RENDERFONT
2176
2195
    char *face_name;
2515
2534
#define TRACE(p) /*nothing*/
2516
2535
#endif
2517
2536
 
 
2537
#ifndef TRACE_CLOSE
 
2538
#define TRACE_CLOSE() /*nothing*/
 
2539
#endif
 
2540
 
2518
2541
#ifndef TRACE_ARGV
2519
2542
#define TRACE_ARGV(tag,argv) /*nothing*/
2520
2543
#endif