OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "../../include/javascript/JavaScript.h" | 7 #include "../../include/javascript/JavaScript.h" |
8 #include "../../include/javascript/IJavaScript.h" | 8 #include "../../include/javascript/IJavaScript.h" |
9 #include "../../include/javascript/JS_Define.h" | 9 #include "../../include/javascript/JS_Define.h" |
10 #include "../../include/javascript/JS_Object.h" | 10 #include "../../include/javascript/JS_Object.h" |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 vRet = date; | 596 vRet = date; |
597 } | 597 } |
598 else | 598 else |
599 { | 599 { |
600 vRet.SetNull(); | 600 vRet.SetNull(); |
601 } | 601 } |
602 | 602 |
603 return TRUE; | 603 return TRUE; |
604 } | 604 } |
605 | 605 |
606 FX_INT64 FX_atoi64(const char *nptr) | 606 int64_t FX_atoi64(const char *nptr) |
607 { | 607 { |
608 int c; /* current char */ | 608 int c; /* current char */ |
609 FX_INT64 total; /* current total */ | 609 int64_t total; /* current total */ |
610 int sign; /* if '-', then negative, otherwise positive */ | 610 int sign; /* if '-', then negative, otherwise positive */ |
611 | 611 |
612 /* skip whitespace */ | 612 /* skip whitespace */ |
613 while ( isspace((int)(unsigned char)*nptr) ) | 613 while ( isspace((int)(unsigned char)*nptr) ) |
614 ++nptr; | 614 ++nptr; |
615 | 615 |
616 c = (int)(unsigned char)*nptr++; | 616 c = (int)(unsigned char)*nptr++; |
617 sign = c; /* save sign indication */ | 617 sign = c; /* save sign indication */ |
618 if (c == '-' || c == '+') | 618 if (c == '-' || c == '+') |
619 c = (int)(unsigned char)*nptr++; /* skip sign */ | 619 c = (int)(unsigned char)*nptr++; /* skip sign */ |
(...skipping 16 matching lines...) Expand all Loading... |
636 int iSize = params.size(); | 636 int iSize = params.size(); |
637 if (iSize == 0) | 637 if (iSize == 0) |
638 return FALSE; | 638 return FALSE; |
639 int nByte = params[0].ToInt(); | 639 int nByte = params[0].ToInt(); |
640 unsigned char cByte = (unsigned char)nByte; | 640 unsigned char cByte = (unsigned char)nByte; |
641 CFX_WideString csValue; | 641 CFX_WideString csValue; |
642 csValue.Format(L"%c", cByte); | 642 csValue.Format(L"%c", cByte); |
643 vRet = csValue.c_str(); | 643 vRet = csValue.c_str(); |
644 return TRUE; | 644 return TRUE; |
645 } | 645 } |
OLD | NEW |