diff options
author | gotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2> | 2007-06-10 17:27:42 +0000 |
---|---|---|
committer | gotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2> | 2007-06-10 17:27:42 +0000 |
commit | 8c0d0ee9ed9f4b7814df1b8168be4b8c6e3d5ccb (patch) | |
tree | 9aa115d3950842ea65ca4e38f70bdfe99a948758 /dzen.h | |
parent | f56eb1958726097b75ea13370188a9d8d2031591 (diff) | |
download | dzen-8c0d0ee9ed9f4b7814df1b8168be4b8c6e3d5ccb.tar.gz dzen-8c0d0ee9ed9f4b7814df1b8168be4b8c6e3d5ccb.zip |
improved buffer handling:
malloc buffer
buffer size is multiplier of dzen.slave_win.max_lines
git-svn-id: http://dzen.googlecode.com/svn/trunk@77 f2baff5b-bf2c-0410-a398-912abdc3d8b2
Diffstat (limited to 'dzen.h')
-rw-r--r-- | dzen.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -17,7 +17,8 @@ #define ALIGNLEFT 1 #define ALIGNRIGHT 2 -#define BUF_SIZE 4096 +#define MIN_BUF_SIZE 512 +#define MAX_LINE_LEN 512 /* gui data structures */ enum { ColFG, ColBG, ColLast }; @@ -53,8 +54,12 @@ struct SW { Window *line; Drawable *drawable; - char *tbuf[BUF_SIZE]; + //char *tbuf[BUF_SIZE]; + /* input buffer */ + char **tbuf; + int tsize; int tcnt; + int max_lines; int first_line_vis; int last_line_vis; |