41 lines
1.3 KiB
Diff
41 lines
1.3 KiB
Diff
Index: starplot-0.95.5/src/convert/convert.cc
|
|
===================================================================
|
|
--- src/convert/convert.cc
|
|
+++ src/convert/convert.cc
|
|
@@ -49,7 +49,7 @@ void parse_star_file(istream & infile, o
|
|
bool using_stdout, bool add_sun)
|
|
{
|
|
int lineno = 0;
|
|
- bool sun_found = false, moredata = true;
|
|
+ bool sun_found = false;
|
|
char record[1000];
|
|
Star * tempstar = 0, * currentstar = 0, * previousstar = 0;
|
|
|
|
@@ -64,7 +64,7 @@ available on the StarPlot web page, you
|
|
in that package for more information.") << endl << endl;
|
|
|
|
do {
|
|
- moredata = infile.getline(record, 999, '\n');
|
|
+ infile.getline(record, 999, '\n');
|
|
record[999] = 0;
|
|
|
|
// $ ; and , have special meanings to StarPlot, so purge them:
|
|
@@ -73,7 +73,7 @@ in that package for more information.")
|
|
record[i] = ' ';
|
|
|
|
tempstar = parse_star_record(record, format);
|
|
- if (tempstar || !moredata) {
|
|
+ if (tempstar || infile.eof()) {
|
|
delete previousstar;
|
|
previousstar = currentstar;
|
|
currentstar = tempstar;
|
|
@@ -111,7 +111,7 @@ in that package for more information.")
|
|
if (!using_stdout && !(lineno % 1000))
|
|
cout << starstrings::ssprintf(_("%d records converted."), lineno) << endl;
|
|
|
|
- } while (moredata) ;
|
|
+ } while (!infile.eof()) ;
|
|
|
|
delete previousstar;
|
|
|