Changeset b5ef65c for editwin.c


Ignore:
Timestamp:
Jul 11, 2009, 1:14:33 PM (12 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
77d4402
Parents:
cedc95c
git-author:
Karl Ramm <kcr@1ts.org> (06/09/09 09:01:51)
git-committer:
Nelson Elhage <nelhage@mit.edu> (07/11/09 13:14:33)
Message:
owl_editwin_get_numchars_on_line is dead code
File:
1 edited

Legend:

Unmodified
Added
Removed
  • editwin.c

    rcedc95c rb5ef65c  
    11341134}
    11351135
    1136 int owl_editwin_get_numchars_on_line(owl_editwin *e, int line)
    1137 {
    1138   int i;
    1139   char *ptr1, *ptr2;
    1140 
    1141   if (e->bufflen==0) return(0);
    1142 
    1143   /* first go to the yth line */
    1144   ptr1=e->buff;
    1145   for (i=0; i<line; i++) {
    1146     ptr2=strchr(ptr1, '\n');
    1147     if (!ptr2) {
    1148       /* we're already on the last line */
    1149       return(0);
    1150     }
    1151     ptr1=ptr2+1;
    1152   }
    1153 
    1154   /* now count characters */
    1155   i = 0;
    1156   ptr2 = ptr1;
    1157   while (ptr2 - e->buff < e->bufflen
    1158          && *ptr2 != '\n') {
    1159     ++i;
    1160     ptr2 = g_utf8_next_char(ptr2);
    1161   }
    1162   return i;
    1163 }
    1164 
    11651136int owl_editwin_get_numlines(owl_editwin *e)
    11661137{
Note: See TracChangeset for help on using the changeset viewer.