~ubuntu-branches/ubuntu/precise/gle-graphics/precise

« back to all changes in this revision

Viewing changes to src/gle/polish.cpp

  • Committer: Package Import Robot
  • Author(s): Christian T. Steigies
  • Date: 2011-10-20 22:15:27 UTC
  • mfrom: (5.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20111020221527-sv27lrowdd221npi
Tags: 4.2.3b-1
* new upstream version
* switch from cdbs to debhelper 8
* update copyright file
* do no rely on proc on non-linux systems (closes: #644588)
* do not ship glebtool, which is a helper used only during build
* add libqt4-opengl-dev to build-depends

Show diffs side-by-side

added added

removed removed

Lines of Context:
237
237
                                break;
238
238
                        }
239
239
                        /* Is it a string */
240
 
                        if (first_char == '"') {
 
240
                        if (first_char == '"' || first_char == '\'') {
241
241
                                dbg gprint("Found string \n");
242
242
                                last_typ = 2;
243
243
                                string str_no_quote = token;
382
382
        ::eval((int*)&pcode[0], &cp, x, NULL, &otyp);
383
383
}
384
384
 
 
385
void GLEPolish::internalEvalString(const char* exp, string* str) throw(ParserError) {
 
386
   double oval;
 
387
        const char* ostr;
 
388
        int rtype = 2, otyp = 0, cp = 0;
 
389
        GLEPcodeList pc_list;
 
390
        GLEPcode pcode(&pc_list);
 
391
        polish(exp, pcode, &rtype);
 
392
        ::eval((int*)&pcode[0], &cp, &oval, &ostr, &otyp);
 
393
        if (otyp == 1) {
 
394
                stringstream str_cnv;
 
395
                str_cnv << oval;
 
396
                *str = str_cnv.str();
 
397
        } else {
 
398
                *str = ostr;
 
399
        }
 
400
}
 
401
 
385
402
void GLEPolish::eval_string(const char *exp, string *str, bool allownum) throw(ParserError) {
386
403
        const char* ostr;
387
404
        double oval = 0.0;