回精華區
作者itoc (League), 信區: plan
標題[修正] 把 ANSILINELEN 加大
時間2003/12/04 Thu 23:38:24 Updated: 2004/02/19
  如果想增加一行含控制碼的最大長度,那麼
  請改 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;

--
□ 本文章由 itocitoc.Dorm11.NCTU.edu.tw 發表
精華選讀←離開[主題上]主題下(k)上篇(j)下篇S/a搜尋 G串列 TAB精華 ↑↓捲 Pg/Space翻