summaryrefslogtreecommitdiff
path: root/src/mark.c
diff options
context:
space:
mode:
authorAmadeusz Sławiński <amade@asmblr.net>2013-03-15 19:28:18 +0100
committerAmadeusz Sławiński <amade@asmblr.net>2015-06-25 17:05:31 +0200
commit488f8b0cc785b17ad15b92be6c45994e111e1515 (patch)
treee7d0b777f6721bdfe15e87eacb853ee47a2ef272 /src/mark.c
parente86a277e7774ca1df0bc7ed0c5277ec842f7a0c4 (diff)
downloadscreen-488f8b0cc785b17ad15b92be6c45994e111e1515.tar.gz
Remove *Rewrite, they mostly return EXPENSIVE anyway
Diffstat (limited to 'src/mark.c')
-rw-r--r--src/mark.c66
1 files changed, 0 insertions, 66 deletions
diff --git a/src/mark.c b/src/mark.c
index af2ece9..e371530 100644
--- a/src/mark.c
+++ b/src/mark.c
@@ -55,7 +55,6 @@ static int MarkScrollUpDisplay(int);
static void MarkProcess(char **, int *);
static void MarkAbort(void);
static void MarkRedisplayLine(int, int, int, int);
-static int MarkRewrite(int, int, int, struct mchar *, int);
int pastefont = 1;
@@ -64,7 +63,6 @@ struct LayFuncs MarkLf = {
MarkAbort,
MarkRedisplayLine,
DefClearLine,
- MarkRewrite,
DefResize,
DefRestore,
0
@@ -1210,70 +1208,6 @@ static void MarkRedisplayLine(int y, int xs, int xe, int isblank)
}
/*
- * This ugly routine is to speed up GotoPos()
- */
-static int MarkRewrite(int ry, int xs, int xe, struct mchar *rend, int doit)
-{
- int dx, x, y, st, en, t, rm;
- uint32_t *i;
- struct mline *ml;
- struct mchar mchar_marked;
-
- mchar_marked = mchar_so;
-
- markdata = (struct markdata *)flayer->l_data;
- fore = markdata->md_window;
- y = D2W(ry);
- ml = WIN(y);
- if (fore->w_encoding && fore->w_encoding != UTF8 && D_encoding == UTF8
- && ContainsSpecialDeffont(ml, xs, xe, fore->w_encoding))
- return EXPENSIVE;
- dx = xe - xs + 1;
- if (doit) {
- i = ml->image + xs;
- while (dx--)
- PUTCHAR(*i++);
- return 0;
- }
-
- if (markdata->second == 0)
- st = en = -1;
- else {
- st = markdata->y1 * fore->w_width + markdata->x1;
- en = markdata->cy * fore->w_width + markdata->cx;
- if (st > en) {
- t = st;
- st = en;
- en = t;
- }
- }
- t = y * fore->w_width + xs;
- for (rm = fore->w_width, i = ml->image + fore->w_width; rm >= 0; rm--)
- if (*i-- != ' ')
- break;
- if (rm > markdata->right_mar)
- rm = markdata->right_mar;
- x = xs;
- while (dx--) {
- if (t >= st && t <= en && x >= markdata->left_mar && x <= rm) {
- if (pastefont) {
- mchar_marked.font = ml->font[x];
- mchar_marked.fontx = ml->fontx[x];
- }
- rend->image = mchar_marked.image;
- if (!cmp_mchar(rend, &mchar_marked))
- return EXPENSIVE;
- } else {
- rend->image = ml->image[x];
- if (!cmp_mchar_mline(rend, ml, x))
- return EXPENSIVE;
- }
- x++;
- }
- return xe - xs + 1;
-}
-
-/*
* scroll the screen contents up/down.
*/
static int MarkScrollUpDisplay(int n)