如果想增加一行含控制碼的最大長度,那麼
請改 ANSILINELEN 及 struct screenline
不過要注意 ANSILINELEN 不能超過 1023
因為 strcpy 長度只支援到 1023
: struct.h
- #define ANSILINELEN 250 /* Maximum Screen width in chars */
+ #define ANSILINELEN 500 /* Maximum Screen width in chars */
...
...
typedef struct screenline
{
- uschar oldlen; /* previous line length */
- uschar len; /* current length of line */
- uschar width; /* padding length of ANSI codes */
- uschar smod; /* start of modified data */
- uschar emod; /* end of modified data */
- uschar sso; /* start of standout data */
- uschar eso; /* end of standout data */
+ int oldlen; /* previous line length */
+ int len; /* current length of line */
+ int width; /* padding length of ANSI codes */
+ int smod; /* start of modified data */
+ int emod; /* end of modified data */
+ int sso; /* start of standout data */
+ int eso; /* end of standout data */
uschar mode; /* status of line, as far as update */
uschar data[ANSILINELEN];
} screenline;
--
□ 本文章由 itoc 從 itoc.Dorm11.NCTU.edu.tw 發表