Ticket #3065: slang-2.2.4-italic.patch

File slang-2.2.4-italic.patch, 3.3 KB (added by egmont, 11 years ago)

patch for slang

  • src/slang.h

    diff -ur slang-2.2.4.orig/src/slang.h slang-2.2.4/src/slang.h
    old new  
    15951595#define SLTT_ULINE_MASK 0x04000000UL 
    15961596#define SLTT_REV_MASK   0x08000000UL 
    15971597#define SLTT_ALTC_MASK  0x10000000UL 
     1598#define SLTT_ITALIC_MASK 0x20000000UL 
    15981599 
    15991600SL_EXTERN int SLtt_Screen_Rows; 
    16001601SL_EXTERN int SLtt_Screen_Cols; 
  • src/slcurses.c

    diff -ur slang-2.2.4.orig/src/slcurses.c slang-2.2.4/src/slcurses.c
    old new  
    372372   SLtt_set_mono (SLCURSES_EXTRACT_COLOR(A_UNDERLINE), NULL, SLTT_ULINE_MASK); 
    373373   SLtt_set_mono (SLCURSES_EXTRACT_COLOR(A_REVERSE), NULL, SLTT_REV_MASK); 
    374374   /* SLtt_set_mono (SLCURSES_EXTRACT_COLOR(A_BLINK), NULL, SLTT_BLINK_MASK); */ 
     375   /* SLtt_set_mono (SLCURSES_EXTRACT_COLOR(A_ITALIC), NULL, SLTT_ITALIC_MASK); */ 
    375376   SLtt_set_mono ((SLCURSES_EXTRACT_COLOR(A_BOLD|A_UNDERLINE)), NULL, SLTT_ULINE_MASK|SLTT_BOLD_MASK); 
    376377   SLtt_set_mono ((SLCURSES_EXTRACT_COLOR(A_REVERSE|A_UNDERLINE)), NULL, SLTT_ULINE_MASK|SLTT_REV_MASK); 
    377378 
  • src/slcurses.h

    diff -ur slang-2.2.4.orig/src/slcurses.h slang-2.2.4/src/slcurses.h
    old new  
    286286#define A_UNDERLINE     0x40000000UL    /* was 0x4000 */ 
    287287#define A_ALTCHARSET    0x80000000UL    /* was 0x8000 */ 
    288288#define A_BLINK         0x00000000UL 
     289#define A_ITALIC        0x00000000UL 
    289290#define A_DIM           0x00000000UL 
    290291#define A_PROTECT       0x00000000UL 
    291292#define A_INVIS         0x00000000UL 
  • src/sldisply.c

    diff -ur slang-2.2.4.orig/src/sldisply.c slang-2.2.4/src/sldisply.c
    old new  
    9494#define CHAR_MASK       0x000000FF 
    9595#define FG_MASK         0x0000FF00 
    9696#define BG_MASK         0x00FF0000 
    97 #define ATTR_MASK       0x1F000000 
     97#define ATTR_MASK       0x3F000000 
    9898#define BGALL_MASK      0x0FFF0000 
    9999 
    100100/* The 0x10000000 bit represents the alternate character set.  BGALL_MASK does 
     
    192192 
    193193static SLCONST char *UnderLine_Vid_Str; 
    194194static SLCONST char *Blink_Vid_Str; 
     195static SLCONST char *Italic_Vid_Str; 
    195196static SLCONST char *Bold_Vid_Str; 
    196197static SLCONST char *Ins_Mode_Str; /* = "\033[4h"; */   /* ins mode (im) */ 
    197198static SLCONST char *Eins_Mode_Str; /* = "\033[4l"; */  /* end ins mode (ei) */ 
     
    14811482        if (fgbg & SLTT_ULINE_MASK) tt_write_string (UnderLine_Vid_Str); 
    14821483        if (fgbg & SLTT_BOLD_MASK) SLtt_bold_video (); 
    14831484        if (fgbg & SLTT_REV_MASK) tt_write_string (Rev_Vid_Str); 
     1485        if (fgbg & SLTT_ITALIC_MASK) tt_write_string (Italic_Vid_Str); 
    14841486        if (fgbg & SLTT_BLINK_MASK) 
    14851487          { 
    14861488             /* Someday Linux will have a blink mode that set high intensity 
     
    26662668 
    26672669   UnderLine_Vid_Str = tt_tgetstr("us"); 
    26682670 
     2671   Italic_Vid_Str = "\033[3m"; 
     2672 
    26692673   Start_Alt_Chars_Str = tt_tgetstr ("as");   /* smacs */ 
    26702674   End_Alt_Chars_Str = tt_tgetstr ("ae");   /* rmacs */ 
    26712675   Enable_Alt_Char_Set = tt_tgetstr ("eA");   /* enacs */ 
     
    28622866   Bold_Vid_Str = "\033[1m"; 
    28632867   Blink_Vid_Str = "\033[5m"; 
    28642868   UnderLine_Vid_Str = "\033[4m"; 
     2869   Italic_Vid_Str = "\033[3m"; 
    28652870   Del_Eol_Str = "\033[K"; 
    28662871   Del_Bol_Str = "\033[1K"; 
    28672872   Rev_Scroll_Str = "\033M";