Changes in uspace/app/edit/sheet.c [8f6bffdd:7feb86e6] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/edit/sheet.c
r8f6bffdd r7feb86e6 57 57 58 58 #include "sheet.h" 59 #include "sheet_impl.h" 59 60 60 61 enum { … … 66 67 67 68 /** Initialize an empty sheet. */ 68 int sheet_init(sheet_t *sh) 69 { 69 int sheet_create(sheet_t **rsh) 70 { 71 sheet_t *sh; 72 73 sh = calloc(1, sizeof(sheet_t)); 74 if (sh == NULL) 75 return ENOMEM; 76 70 77 sh->dbuf_size = INITIAL_SIZE; 71 78 sh->text_size = 0; … … 77 84 list_initialize(&sh->tags); 78 85 86 *rsh = sh; 79 87 return EOK; 80 88 } … … 315 323 } 316 324 325 /** Get a character at spt and return next spt */ 326 wchar_t spt_next_char(spt_t spt, spt_t *next) 327 { 328 wchar_t ch = str_decode(spt.sh->data, &spt.b_off, spt.sh->text_size); 329 if (next) 330 *next = spt; 331 return ch; 332 } 333 334 wchar_t spt_prev_char(spt_t spt, spt_t *prev) 335 { 336 wchar_t ch = str_decode_reverse(spt.sh->data, &spt.b_off, spt.sh->text_size); 337 if (prev) 338 *prev = spt; 339 return ch; 340 } 341 317 342 /** Place a tag on the specified s-point. */ 318 343 void sheet_place_tag(sheet_t *sh, spt_t const *pt, tag_t *tag)
Note:
See TracChangeset
for help on using the changeset viewer.