diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-01-06 04:29:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-01-06 04:29:13 +0300 |
commit | 5f64450726e1efbfad97525bb36bfea2c51afa09 (patch) | |
tree | ef6ab06292f905ec3be75bc5068393b17a28f0ad /source/blender/editors/space_text | |
parent | 7196fb370e96f987254477e67e414c8072217f50 (diff) |
remove assignments which are unused.
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r-- | source/blender/editors/space_text/text_draw.c | 5 | ||||
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 19 |
2 files changed, 13 insertions, 11 deletions
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 371b2f7e594..f682da5f179 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -1050,7 +1050,7 @@ static TextLine *first_visible_line(SpaceText *st, ARegion *ar, int *wrap_top) } } } else { - for(i=st->top, pline= text->lines.first; pline->next && i>0; i--) + for(i=st->top; pline->next && i>0; i--) pline= pline->next; } @@ -1284,7 +1284,7 @@ static void draw_documentation(SpaceText *st, ARegion *ar) { TextLine *tmp; char *docs, buf[DOC_WIDTH+1], *p; - int len, i, br, lines; + int i, br, lines; int boxw, boxh, l, x, y, top; if(!st || !st->text) return; @@ -1309,7 +1309,6 @@ static void draw_documentation(SpaceText *st, ARegion *ar) } top= y= ar->winy - st->lheight*l - 2; - len= strlen(docs); boxw= DOC_WIDTH*st->cwidth + 20; boxh= (DOC_HEIGHT+1)*st->lheight; diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index e3ac59861bf..03d806f446c 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -1344,16 +1344,17 @@ static EnumPropertyItem move_type_items[]= { /* get cursor position in line by relative wrapped line and column positions */ static int text_get_cursor_rel(SpaceText* st, ARegion *ar, TextLine *linein, int rell, int relc) { - int i, j, start, end, chars, max, chop, curs, loop, endj, found, selc; + int i, j, start, end, max, chop, curs, loop, endj, found, selc; char ch; max= wrap_width(st, ar); - selc= start= chars= endj= curs= found= 0; + selc= start= endj= curs= found= 0; end= max; chop= loop= 1; for(i=0, j=0; loop; j++) { + int chars; /* Mimic replacement of tabs */ ch= linein->line[j]; if(ch=='\t') { @@ -1509,7 +1510,7 @@ static void wrap_move_bol(SpaceText *st, ARegion *ar, short sel) Text *text= st->text; TextLine **linep; int *charp; - int oldl, oldc, i, j, max, start, end, chars, endj, chop, loop; + int oldl, oldc, i, j, max, start, end, endj, chop, loop; char ch; text_update_character_width(st); @@ -1522,12 +1523,13 @@ static void wrap_move_bol(SpaceText *st, ARegion *ar, short sel) max= wrap_width(st, ar); - start= chars= endj= 0; + start= endj= 0; end= max; chop= loop= 1; *charp= 0; for(i=0, j=0; loop; j++) { + int chars; /* Mimic replacement of tabs */ ch= (*linep)->line[j]; if(ch=='\t') { @@ -1576,7 +1578,7 @@ static void wrap_move_eol(SpaceText *st, ARegion *ar, short sel) Text *text= st->text; TextLine **linep; int *charp; - int oldl, oldc, i, j, max, start, end, chars, endj, chop, loop; + int oldl, oldc, i, j, max, start, end, endj, chop, loop; char ch; text_update_character_width(st); @@ -1589,12 +1591,13 @@ static void wrap_move_eol(SpaceText *st, ARegion *ar, short sel) max= wrap_width(st, ar); - start= chars= endj= 0; + start= endj= 0; end= max; chop= loop= 1; *charp= 0; for(i=0, j=0; loop; j++) { + int chars; /* Mimic replacement of tabs */ ch= (*linep)->line[j]; if(ch=='\t') { @@ -2241,7 +2244,7 @@ static void set_cursor_to_pos(SpaceText *st, ARegion *ar, int x, int y, int sel) x = (x/st->cwidth) + st->left; if(st->wordwrap) { - int i, j, endj, curs, max, chop, start, end, chars, loop, found; + int i, j, endj, curs, max, chop, start, end, loop, found; char ch; /* Point to first visible line */ @@ -2267,10 +2270,10 @@ static void set_cursor_to_pos(SpaceText *st, ARegion *ar, int x, int y, int sel) start= 0; end= max; chop= 1; - chars= 0; curs= 0; endj= 0; for(i=0, j=0; loop; j++) { + int chars; /* Mimic replacement of tabs */ ch= (*linep)->line[j]; |