Subversion Repositories SvarDOS

Rev

Rev 1283 | Rev 1286 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1283 Rev 1284
Line 55... Line 55...
55
  struct line *cursor;
55
  struct line *cursor;
56
  unsigned short xoffset;
56
  unsigned short xoffset;
57
};
57
};
58
 
58
 
59
 
59
 
-
 
60
 
60
void line_add(struct linedb *db, const char *line) {
61
void line_add(struct linedb *db, const char *line) {
61
  unsigned short slen = strlen(line);
62
  unsigned short slen = strlen(line);
62
  struct line *l;
63
  struct line *l;
63
 
64
 
64
  /* trim out CR/LF line endings */
65
  /* trim out CR/LF line endings */
Line 74... Line 75...
74
    l->next = db->cursor->next;
75
    l->next = db->cursor->next;
75
    db->cursor->next = l;
76
    db->cursor->next = l;
76
    l->next->prev = l;
77
    l->next->prev = l;
77
  }
78
  }
78
  db->cursor = l;
79
  db->cursor = l;
79
  memcpy(l->payload, line, slen);
80
  memmove(l->payload, line, slen);
80
  l->len = slen;
81
  l->len = slen;
81
}
82
}
82
 
83
 
83
 
84
 
84
void db_rewind(struct linedb *db) {
85
void db_rewind(struct linedb *db) {