int main(void) { int T; char line[MAX_LEN + 2], trash[MAX_LEN + 2]; scanf("%d", &T); fgets(trash, MAX_LEN + 2, stdin); while(T) { while(1) { if(fgets(line, MAX_LEN + 2, stdin) == NULL) break; if(line[0] == '\n') break; decodeStr(line); printf("%s", line); } if(T != 1) printf("\n"); T--; } return 0; }
strlist char2strlist(char *buf) { char *data = NULL; char *curr = buf; char *next = NULL; strlist result = STRLIST_INITIALIZER; while (curr && *curr) { while (isspace(*curr)) ++curr; data = decodeStr(curr, &next); if (!strlist_push_back(&result, data)) { strlist_clear(&result); break; } curr = next; } return result; }
void AnalyzeTask::parseTrackInfo(QXmlStreamReader &xmlStream, const MI_trackType_t trackType, AudioFileModel &audioFile) { QString coverMimeType; while (xmlStream.readNextStartElement()) { const MI_propertyId_t idx = m_mediaInfoIdx.value(qMakePair(trackType, xmlStream.name().toString().simplified().toLower()), MI_propertyId_t(-1)); if (idx != MI_propertyId_t(-1)) { const QString encoding = findAttribute(QLatin1String("dt"), xmlStream.attributes()); const QString value = xmlStream.readElementText(QXmlStreamReader::SkipChildElements).simplified(); if (!value.isEmpty()) { parseProperty(encoding.isEmpty() ? value : decodeStr(value, encoding), idx, audioFile, coverMimeType); } } else { xmlStream.skipCurrentElement(); } } }
QString HTML::decode(const char* src) { QString str(src); decodeStr(&str); return str; }
QString HTML::decode(const QString* src) { QString str(*src); decodeStr(&str); return str; }