d2asc currently doesn't work. It shouldn't be built by default, and certainly shouldn't be installed (I haven't verified whether it is or not...).<div><br></div><div>I might try to resurrect it, so we don't need to remove it from svn quite yet though.<br>
<br><div class="gmail_quote">On Fri, Jan 14, 2011 at 9:56 AM, Peter Kümmel <span dir="ltr"><<a href="mailto:syntheticpp@gmx.net">syntheticpp@gmx.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
SVN commit 1214402 by kuemmel:<br>
<br>
remove msvc warnings by not using plain C functions<br>
<br>
M +7 -6 d2asc.cpp<br>
<br>
<br>
--- branches/work/kst/portto4/kst/src/d2asc/d2asc.cpp #1214401:1214402<br>
@@ -45,7 +45,8 @@<br>
<br>
Kst::DataSourcePluginManager::init();<br>
<br>
- char field_list[40][120], filename[180];<br>
+ QString filename;<br>
+ QString field_list[40];<br>
bool do_hex[40];<br>
int n_field=0;<br>
int start_frame=0, n_frames=2000000;<br>
@@ -61,7 +62,7 @@<br>
for (i = 0; i < 40; i++)<br>
do_hex[i] = false;<br>
<br>
- strcpy(filename, argv[1]);<br>
+ filename = QString::fromLocal8Bit(argv[1]);<br>
for (i = 2; i < argc; i++) {<br>
if (argv[i][0] == '-') {<br>
if (argv[i][1] == 'f') {<br>
@@ -78,14 +79,14 @@<br>
do_ave = true;<br>
} else if (argv[i][1] == 'x') {<br>
i++;<br>
- strcpy(field_list[n_field], argv[i]);<br>
+ field_list[n_field] = QString::fromLocal8Bit(argv[i]);<br>
do_hex[n_field] = true;<br>
n_field++;<br>
} else {<br>
Usage();<br>
}<br>
} else {<br>
- strcpy(field_list[n_field], argv[i]);<br>
+ field_list[n_field] = QString::fromLocal8Bit(argv[i]);<br>
n_field++;<br>
}<br>
}<br>
@@ -94,7 +95,7 @@<br>
<br>
file = Kst::DataSourcePluginManager::loadSource(_document.objectStore(), filename);<br>
if (!file || !file->isValid() || file->isEmpty()) {<br>
- fprintf(stderr, "d2asc error: file %s has no data\n", filename);<br>
+ fprintf(stderr, "d2asc error: file %s has no data\n", qPrintable(filename));<br>
return -2;<br>
}<br>
/** make vectors and fill the list **/<br>
@@ -103,7 +104,7 @@<br>
for (i=0; i<n_field; i++) {<br>
if (!file->vector().isValid(field_list[i])) {<br>
fprintf(stderr, "d2asc error: field %s in file %s is not valid\n",<br>
- field_list[i], filename);<br>
+ qPrintable(field_list[i]), qPrintable(filename));<br>
return -3;<br>
}<br>
Kst::DataVectorPtr v = _document.objectStore()->createObject<Kst::DataVector>();<br>
_______________________________________________<br>
Kst mailing list<br>
<a href="mailto:Kst@kde.org">Kst@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kst" target="_blank">https://mail.kde.org/mailman/listinfo/kst</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse;color:rgb(136, 136, 136)">C. Barth Netterfield<br>University of Toronto<br>416-845-0946</span><div>
<span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse;color:rgb(136, 136, 136)"><br></span></div><br>
</div>