Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-02-27 02:56:16 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-02-27 02:56:16 +0300
commit5be3bf73be1c80baa4a2327151a42992a8c5a7a3 (patch)
tree4f3d5873ad8aac5a3e585985816bff45d3011e9b /source/blender/blenlib/intern/BLI_dynstr.c
parent71f7e50451090a2a17bae3c1b47057c87d78a84a (diff)
bugfix [#20694] Copy Paste to buffer missing in Console editor
- console selection working - copy selection to clipboard - paste selection from clipboard works with multiline paste word-wrap is still not working with selection drawing.
Diffstat (limited to 'source/blender/blenlib/intern/BLI_dynstr.c')
-rw-r--r--source/blender/blenlib/intern/BLI_dynstr.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/BLI_dynstr.c b/source/blender/blenlib/intern/BLI_dynstr.c
index 02c7ff2e9e5..09d28ddbc3a 100644
--- a/source/blender/blenlib/intern/BLI_dynstr.c
+++ b/source/blender/blenlib/intern/BLI_dynstr.c
@@ -83,6 +83,23 @@ void BLI_dynstr_append(DynStr *ds, const char *cstr) {
ds->curlen+= cstrlen;
}
+void BLI_dynstr_nappend(DynStr *ds, const char *cstr, int len) {
+ DynStrElem *dse= malloc(sizeof(*dse));
+ int cstrlen= strnlen(cstr, len);
+
+ dse->str= malloc(cstrlen+1);
+ memcpy(dse->str, cstr, cstrlen);
+ dse->str[cstrlen] = '\0';
+ dse->next= NULL;
+
+ if (!ds->last)
+ ds->last= ds->elems= dse;
+ else
+ ds->last= ds->last->next= dse;
+
+ ds->curlen+= cstrlen;
+}
+
void BLI_dynstr_vappendf(DynStr *ds, const char *format, va_list args)
{
char *message, fixedmessage[256];