diff options
author | George Hazan <george.hazan@gmail.com> | 2015-05-23 18:55:59 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-05-23 18:55:59 +0000 |
commit | 2a815f8820ca402626bd283dd5b75744ddeb9812 (patch) | |
tree | b230e7ac7d0330f5a1a0c8891d0a7dda9c5b47c6 /protocols/Tlen/src/tlen_xml.cpp | |
parent | 9a177a4e355c52775b580ad5687db2120f9282d5 (diff) |
mir_tstrncpy <> _tcsncpy
git-svn-id: http://svn.miranda-ng.org/main/trunk@13791 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tlen/src/tlen_xml.cpp')
-rw-r--r-- | protocols/Tlen/src/tlen_xml.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/protocols/Tlen/src/tlen_xml.cpp b/protocols/Tlen/src/tlen_xml.cpp index 5939c65d58..408df2ab3a 100644 --- a/protocols/Tlen/src/tlen_xml.cpp +++ b/protocols/Tlen/src/tlen_xml.cpp @@ -126,18 +126,18 @@ int TlenXmlParse(XmlState *xmlState, char *buffer, int datalen) } else { if (*(p+1) == '/') { // closing tag - mir_strncpy(tag, p+2, r-(p+2)); + strncpy(tag, p+2, r-(p+2)); tag[r-(p+2)] = '\0'; elemType = ELEM_CLOSE; } else { if (*(r-1) == '/') { // single open/close tag - mir_strncpy(tag, p+1, r-(p+1)-1); + strncpy(tag, p+1, r-(p+1)-1); tag[r-(p+1)-1] = '\0'; elemType = ELEM_OPENCLOSE; } else { - mir_strncpy(tag, p+1, r-(p+1)); + strncpy(tag, p+1, r-(p+1)); tag[r-(p+1)] = '\0'; elemType = ELEM_OPEN; } @@ -147,7 +147,7 @@ int TlenXmlParse(XmlState *xmlState, char *buffer, int datalen) // TlenLog("ATTR_MAX_LEN too small, ignore current tag"); } else { - mir_strncpy(attr, r, q-r); + strncpy(attr, r, q-r); if ((q-r)>0 && attr[q-r-1] == '/') { attr[q-r-1] = '\0'; elemType = ELEM_OPENCLOSE; @@ -171,7 +171,7 @@ int TlenXmlParse(XmlState *xmlState, char *buffer, int datalen) for (q=p+1; q<eob && *q != '<'; q++); if (q < eob) { // found starting bracket of the next element str = (char *) mir_alloc(q-p+1); - mir_strncpy(str, p, q-p); + strncpy(str, p, q-p); str[q-p] = '\0'; TlenXmlProcessElem(xmlState, ELEM_TEXT, str, NULL); mir_free(str); @@ -220,7 +220,7 @@ static void TlenXmlParseAttr(XmlNode *node, char *text) if (*p == '\0') { a->name = (char *) mir_alloc(klen+1); - mir_strncpy(a->name, kstart, klen); + strncpy(a->name, kstart, klen); a->name[klen] = '\0'; a->value = mir_strdup(""); break; @@ -228,7 +228,7 @@ static void TlenXmlParseAttr(XmlNode *node, char *text) if (*p != '=') { a->name = (char *) mir_alloc(klen+1); - mir_strncpy(a->name, kstart, klen); + strncpy(a->name, kstart, klen); a->name[klen] = '\0'; a->value = mir_strdup(""); continue; @@ -242,7 +242,7 @@ static void TlenXmlParseAttr(XmlNode *node, char *text) if (*p == '\0') { a->name = (char *) mir_alloc(klen+1); - mir_strncpy(a->name, kstart, klen); + strncpy(a->name, kstart, klen); a->name[klen] = '\0'; a->value = mir_strdup(""); break; @@ -263,10 +263,10 @@ static void TlenXmlParseAttr(XmlNode *node, char *text) } a->name = (char *) mir_alloc(klen+1); - mir_strncpy(a->name, kstart, klen); + strncpy(a->name, kstart, klen); a->name[klen] = '\0'; a->value = (char *) mir_alloc(vlen+1); - mir_strncpy(a->value, vstart, vlen); + strncpy(a->value, vstart, vlen); a->value[vlen] = '\0'; } } |