Changeset 08e103d4 in mainline for uspace/dist/src
- Timestamp:
- 2019-02-05T18:26:05Z (7 years ago)
- Children:
- 1d2f85e
- Parents:
- d066259
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-05 16:16:55)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-05 18:26:05)
- Location:
- uspace/dist/src/c/demos
- Files:
-
- 5 edited
-
edit/edit.c (modified) (6 diffs)
-
edit/search.c (modified) (1 diff)
-
edit/sheet.c (modified) (1 diff)
-
tetris/screen.c (modified) (1 diff)
-
tetris/tetris.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/dist/src/c/demos/edit/edit.c
rd066259 r08e103d4 637 637 asprintf(&str, "%s: %s", prompt, init_value); 638 638 status_display(str); 639 console_set_pos(con, 1 + str_ length(str), scr_rows - 1);639 console_set_pos(con, 1 + str_code_points(str), scr_rows - 1); 640 640 free(str); 641 641 642 642 console_set_style(con, STYLE_INVERTED); 643 643 644 max_len = min(INFNAME_MAX_LEN, scr_columns - 4 - str_ length(prompt));644 max_len = min(INFNAME_MAX_LEN, scr_columns - 4 - str_code_points(prompt)); 645 645 str_to_wstr(buffer, max_len + 1, init_value); 646 nc = wstr_ length(buffer);646 nc = wstr_code_points(buffer); 647 647 done = false; 648 648 … … 747 747 do { 748 748 sheet_copy_out(doc.sh, &sp, epos, buf, BUF_SIZE, &bep); 749 bytes = str_ size(buf);749 bytes = str_bytes(buf); 750 750 751 751 n_written = fwrite(buf, 1, bytes, f); … … 783 783 sheet_copy_out(doc.sh, &sp, epos, &buf[bpos], buf_size - bpos, 784 784 &bep); 785 bytes = str_ size(&buf[bpos]);785 bytes = str_bytes(&buf[bpos]); 786 786 bpos += bytes; 787 787 sp = bep; … … 893 893 894 894 console_set_pos(con, 0, i); 895 size = str_ size(row_buf);895 size = str_bytes(row_buf); 896 896 pos = 0; 897 897 s_column = pane.sh_column; … … 1012 1012 /* Compute position where we overwrite with '..\0' */ 1013 1013 if (fnw >= nextra + 2) { 1014 p = fname + str_l size(fname, fnw - nextra - 2);1014 p = fname + str_lbytes(fname, fnw - nextra - 2); 1015 1015 } else { 1016 1016 p = fname; … … 1609 1609 { 1610 1610 size_t offset = 0; 1611 return str_decode(str, &offset, str_ size(str));1611 return str_decode(str, &offset, str_bytes(str)); 1612 1612 } 1613 1613 -
uspace/dist/src/c/demos/edit/search.c
rd066259 r08e103d4 55 55 } 56 56 57 search->pattern_length = wstr_ length(p);57 search->pattern_length = wstr_code_points(p); 58 58 59 59 if (reverse) { -
uspace/dist/src/c/demos/edit/sheet.c
rd066259 r08e103d4 107 107 char *newp; 108 108 109 sz = str_ size(str);109 sz = str_bytes(str); 110 110 if (sh->text_size + sz > sh->dbuf_size) { 111 111 /* Enlarge data buffer. */ -
uspace/dist/src/c/demos/tetris/screen.c
rd066259 r08e103d4 321 321 void scr_msg(char *s, bool set) 322 322 { 323 int l = str_ size(s);323 int l = str_bytes(s); 324 324 325 325 moveto(Rows - 2, ((Cols - l) >> 1) - 1); -
uspace/dist/src/c/demos/tetris/tetris.c
rd066259 r08e103d4 270 270 break; 271 271 case 'k': 272 if (str_ size(keys = optarg) != 6)272 if (str_bytes(keys = optarg) != 6) 273 273 usage(); 274 274 break;
Note:
See TracChangeset
for help on using the changeset viewer.
