~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to strings/dtoa.c

Merged in Jay's tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
                      (including the terminating '\0').
80
80
   @param error       if not NULL, points to a location where the status of
81
81
                      conversion is stored upon return.
82
 
                      FALSE  successful conversion
83
 
                      TRUE   the input number is [-,+]infinity or nan.
 
82
                      false  successful conversion
 
83
                      true   the input number is [-,+]infinity or nan.
84
84
                             The output string in this case is always '0'.
85
85
   @return            number of written characters (excluding terminating '\0')
86
86
*/
100
100
    *to++= '0';
101
101
    *to= '\0';
102
102
    if (error != NULL)
103
 
      *error= TRUE;
 
103
      *error= true;
104
104
    return 1;
105
105
  }
106
106
 
138
138
  
139
139
  *dst= '\0';
140
140
  if (error != NULL)
141
 
    *error= FALSE;
 
141
    *error= false;
142
142
 
143
143
  dtoa_free(res, buf, sizeof(buf));
144
144
 
181
181
                      'width + 1' bytes.
182
182
   @param error       if not NULL, points to a location where the status of
183
183
                      conversion is stored upon return.
184
 
                      FALSE  successful conversion
185
 
                      TRUE   the input number is [-,+]infinity or nan.
 
184
                      false  successful conversion
 
185
                      true   the input number is [-,+]infinity or nan.
186
186
                             The output string in this case is always '0'.
187
187
   @return            number of written characters (excluding terminating '\0')
188
188
 
229
229
    *to++= '0';
230
230
    *to= '\0';
231
231
    if (error != NULL)
232
 
      *error= TRUE;
 
232
      *error= true;
233
233
    return 1;
234
234
  }
235
235
 
236
236
  if (error != NULL)
237
 
    *error= FALSE;
 
237
    *error= false;
238
238
 
239
239
  src= res;
240
240
  len= end - res;
317
317
      if (width < decpt)
318
318
      {
319
319
        if (error != NULL)
320
 
          *error= TRUE;
 
320
          *error= true;
321
321
        width= decpt;
322
322
      }
323
323
      
384
384
    {
385
385
      /* Overflow */
386
386
      if (error != NULL)
387
 
        *error= TRUE;
 
387
        *error= true;
388
388
      width= 0;
389
389
    }
390
390