l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
September 2: Social gathering
Next Installfest:
TBD
Latest News:
Aug. 18: Discounts to "Velocity" in NY; come to tonight's "Photography" talk
Page last updated:
2003 Jan 12 11:24

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
[vox-tech] Wierd, bizarre file problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vox-tech] Wierd, bizarre file problem



I'm writing a program using QT3 out of debian unstable, and am finding
an excessively wierd problem:

I have the following function that I call from the initialization of the
main form of my program, and I do not write to stdout anywhere else in
the whole program.

QValueList<location> parseconfigfile()
{
    QValueList<location> retval;
    QString filename(std::getenv("HOME")); filename+="/.zmanrc";
    QTextIStream infile(&filename);
    QString line;
    while((line=infile.readLine())!=NULL)
    {
        std::cout << line << endl;
        line.simplifyWhiteSpace();
        if(line.length()>0 && !line.startsWith("#"))
        {
            QStringList linetokenized=QStringList::split(" ",line);
            location result;
            result.name=linetokenized[0];
            result.latitude=linetokenized[1].toDouble();
            result.longitude=linetokenized[2].toDouble();
            result.offset=linetokenized[3].toDouble();
            result.observesdst=(linetokenized.size()==5)&&
                                linetokenized[4]=="dst";
            retval.insert(retval.end(),result);
        }
    }
    
    return retval;
}

When I run the program, I get the following output.

[bloom@kabloom ~/qtzmanim]$ ./qtzmanim 2>-          
/home/bloom/.zmanrc

I can be dead certain that that pathname isn't anywhere in the file I'm
reading from:
[bloom@kabloom ~/qtzmanim]$ cat /home/bloom/.zmanrc
davis                   38.6    -121.7  -8      dst
sunnyvale               37.4    -122.0  -8      dst
san_jose                37.3    -121.9  -8      dst
vallejo                 38.1    -122.2  -8      dst
sacramento              38.6    -121.5  -8      dst
san_francisco   37.8    -122.4  -8      dst


What's going on here?

(using libqt3 and libqt3-dev 3.1.1+cvs.20021220-1)



_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
O'Reilly and Associates
For numerous book donations.