/[jscoverage]/trunk/js/jsdtoa.cpp
ViewVC logotype

Diff of /trunk/js/jsdtoa.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 506 by siliconforks, Tue Dec 9 03:37:47 2008 UTC revision 507 by siliconforks, Sun Jan 10 07:23:34 2010 UTC
# Line 1  Line 1 
1  /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-  /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2   *   *
3   * ***** BEGIN LICENSE BLOCK *****   * ***** BEGIN LICENSE BLOCK *****
4   * Version: MPL 1.1/GPL 2.0/LGPL 2.1   * Version: MPL 1.1/GPL 2.0/LGPL 2.1
# Line 40  Line 40 
40  /*  /*
41   * Portable double to alphanumeric string and back converters.   * Portable double to alphanumeric string and back converters.
42   */   */
 #include "jsstddef.h"  
 #include "jslibmath.h"  
43  #include "jstypes.h"  #include "jstypes.h"
44    #include "jsstdint.h"
45  #include "jsdtoa.h"  #include "jsdtoa.h"
46  #include "jsprf.h"  #include "jsprf.h"
47  #include "jsutil.h" /* Added by JSIFY */  #include "jsutil.h" /* Added by JSIFY */
48  #include "jspubtd.h"  #include "jsprvtd.h"
49  #include "jsnum.h"  #include "jsnum.h"
50  #include "jsbit.h"  #include "jsbit.h"
51    #include "jslibmath.h"
52    
53  #ifdef JS_THREADSAFE  #ifdef JS_THREADSAFE
54  #include "jslock.h"  #include "jslock.h"
# Line 368  Line 368 
368      JS_ASSERT(base >= 2 && base <= 36);      JS_ASSERT(base >= 2 && base <= 36);
369    
370      dval(d) = dinput;      dval(d) = dinput;
371      buffer = (char*) malloc(DTOBASESTR_BUFFER_SIZE);      buffer = (char*) js_malloc(DTOBASESTR_BUFFER_SIZE);
372      if (buffer) {      if (buffer) {
373          p = buffer;          p = buffer;
374          if (dval(d) < 0.0          if (dval(d) < 0.0
# Line 412  Line 412 
412                nomem1:                nomem1:
413                  Bfree(b);                  Bfree(b);
414                  UNLOCK_DTOA();                  UNLOCK_DTOA();
415                  free(buffer);                  js_free(buffer);
416                  return NULL;                  return NULL;
417              }              }
418              do {              do {
# Line 449  Line 449 
449                      Bfree(mlo);                      Bfree(mlo);
450                  Bfree(mhi);                  Bfree(mhi);
451                  UNLOCK_DTOA();                  UNLOCK_DTOA();
452                  free(buffer);                  js_free(buffer);
453                  return NULL;                  return NULL;
454              }              }
455              JS_ASSERT(e < 0);              JS_ASSERT(e < 0);

Legend:
Removed from v.506  
changed lines
  Added in v.507

  ViewVC Help
Powered by ViewVC 1.1.24