- Timestamp:
- Jul 11, 2009, 1:14:36 PM (15 years ago)
- Branches:
- master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 0190c4d
- Parents:
- 2fc8397
- git-author:
- Nelson Elhage <nelhage@mit.edu> (07/06/09 20:42:13)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (07/11/09 13:14:36)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
editwin.c
r2fc8397 r19a023f 56 56 static int owl_editwin_is_char_in(owl_editwin *e, char *set); 57 57 static gunichar owl_editwin_get_char_at_point(owl_editwin *e); 58 static int owl_editwin_replace_internal(owl_editwin *e, int replace, char *s); 58 59 static char *oe_copy_buf(owl_editwin *e, char *buf, int len); 59 60 static int oe_copy_region(owl_editwin *e); … … 564 565 } 565 566 566 /* replace countcharacters at the point with s, returning the change in size */567 /* replace 'replace' characters at the point with s, returning the change in size */ 567 568 int owl_editwin_replace(owl_editwin *e, int replace, char *s) 568 569 { 569 int start, end, i , free, need, size, change;570 int start, end, i; 570 571 char *p; 571 oe_excursion *x;572 572 573 573 if (!g_utf8_validate(s, -1, NULL)) { … … 583 583 else 584 584 end = e->bufflen; 585 586 return owl_editwin_replace_internal(e, end - start, s); 587 } 588 589 static int owl_editwin_replace_internal(owl_editwin *e, int replace, char *s) 590 { 591 int start, end, free, need, size, change; 592 oe_excursion *x; 593 char *p; 594 595 start = e->index; 596 end = start + replace; 585 597 586 598 free = e->allocated - e->bufflen + end - start;
Note: See TracChangeset
for help on using the changeset viewer.