diff options
Diffstat (limited to 'source/blender/editors/curve/editfont.c')
-rw-r--r-- | source/blender/editors/curve/editfont.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index 83f6b1d1824..d0c5774a200 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -215,16 +215,16 @@ static void update_string(Curve *cu) EditFont *ef = cu->editfont; int len; - // Free the old curve string + /* Free the old curve string */ MEM_freeN(cu->str); - // Calculate the actual string length in UTF-8 variable characters + /* Calculate the actual string length in UTF-8 variable characters */ len = BLI_wstrlen_utf8(ef->textbuf); - // Alloc memory for UTF-8 variable char length string + /* Alloc memory for UTF-8 variable char length string */ cu->str = MEM_callocN(len + sizeof(wchar_t), "str"); - // Copy the wchar to UTF-8 + /* Copy the wchar to UTF-8 */ BLI_strncpy_wchar_as_utf8(cu->str, ef->textbuf, len + 1); } @@ -362,8 +362,8 @@ static int paste_file(bContext *C, ReportList *reports, const char *filename) strp = MEM_callocN(filelen + 4, "tempstr"); - // fread() instead of read(), because windows read() converts text - // to DOS \r\n linebreaks, causing double linebreaks in the 3d text + /* fread() instead of read(), because windows read() converts text + * to DOS \r\n linebreaks, causing double linebreaks in the 3d text */ filelen = fread(strp, 1, filelen, fp); fclose(fp); strp[filelen] = 0; @@ -1452,12 +1452,12 @@ void make_editText(Object *obedit) ef->oldstrinfo = MEM_callocN((MAXTEXT + 4) * sizeof(CharInfo), "oldstrbuf"); } - // Convert the original text to wchar_t + /* Convert the original text to wchar_t */ BLI_strncpy_wchar_from_utf8(ef->textbuf, cu->str, MAXTEXT + 4); /* length is bogus */ wcscpy(ef->oldstr, ef->textbuf); - + cu->len = wcslen(ef->textbuf); - + memcpy(ef->textbufinfo, cu->strinfo, (cu->len) * sizeof(CharInfo)); memcpy(ef->oldstrinfo, cu->strinfo, (cu->len) * sizeof(CharInfo)); @@ -1467,8 +1467,8 @@ void make_editText(Object *obedit) cu->curinfo = ef->textbufinfo[cu->pos - 1]; else cu->curinfo = ef->textbufinfo[0]; - - // Convert to UTF-8 + + /* Convert to UTF-8 */ update_string(cu); } |