~ubuntu-branches/ubuntu/raring/mesa/raring-proposed

« back to all changes in this revision

Viewing changes to src/glsl/s_expression.cpp

  • Committer: Package Import Robot
  • Author(s): Timo Aaltonen, Timo Aaltonen, Maarten Lankhorst
  • Date: 2013-04-16 15:35:32 UTC
  • mfrom: (1.7.15)
  • Revision ID: package-import@ubuntu.com-20130416153532-1u9s6vb32cqryh4x
Tags: 9.1.1-0ubuntu1
[ Timo Aaltonen ]
* Merge from unreleased debian git
  - new upstream release (LP: #1112147, #1164093)
* Revert a commit to fix slow blur on intel.
* vbo-fix-crash.diff: Patch from the stable tree that fixes a crasher
  with shared display lists.

[ Maarten Lankhorst ]
* Add some more patches to fix image copy regressions on nouveau.

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
      return NULL; // no atom
67
67
 
68
68
   // Check for the special symbol '+INF', which means +Infinity.  Note: C99
69
 
   // requires strtod to parse '+INF' as +Infinity, but we still support some
 
69
   // requires strtof to parse '+INF' as +Infinity, but we still support some
70
70
   // non-C99-compliant compilers (e.g. MSVC).
71
71
   if (n == 4 && strncmp(src, "+INF", 4) == 0) {
72
72
      expr = new(ctx) s_float(std::numeric_limits<float>::infinity());
73
73
   } else {
74
74
      // Check if the atom is a number.
75
75
      char *float_end = NULL;
76
 
      double f = glsl_strtod(src, &float_end);
 
76
      float f = glsl_strtof(src, &float_end);
77
77
      if (float_end != src) {
78
78
         char *int_end = NULL;
79
79
         int i = strtol(src, &int_end, 10);
80
 
         // If strtod matched more characters, it must have a decimal part
 
80
         // If strtof matched more characters, it must have a decimal part
81
81
         if (float_end > int_end)
82
82
            expr = new(ctx) s_float(f);
83
83
         else