| 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 "xfa/fxfa/fm2js/xfa_lexer.h" | 7 #include "xfa/fxfa/fm2js/xfa_lexer.h" |
| 8 | 8 |
| 9 #include "core/fxcrt/include/fx_ext.h" | 9 #include "core/fxcrt/include/fx_ext.h" |
| 10 | 10 |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 if (uHash == keyword.m_uHash) | 525 if (uHash == keyword.m_uHash) |
| 526 return keyword.m_type; | 526 return keyword.m_type; |
| 527 if (uHash < keyword.m_uHash) | 527 if (uHash < keyword.m_uHash) |
| 528 iEnd = iMid - 1; | 528 iEnd = iMid - 1; |
| 529 else | 529 else |
| 530 iStart = iMid + 1; | 530 iStart = iMid + 1; |
| 531 } while (iStart <= iEnd); | 531 } while (iStart <= iEnd); |
| 532 return TOKidentifier; | 532 return TOKidentifier; |
| 533 } | 533 } |
| 534 | 534 |
| 535 void CXFA_FMLexer::Error(XFA_FM_ERRMSG msg, ...) { | 535 void CXFA_FMLexer::Error(const FX_WCHAR* msg, ...) { |
| 536 m_pErrorInfo->linenum = m_uCurrentLine; | 536 m_pErrorInfo->linenum = m_uCurrentLine; |
| 537 const FX_WCHAR* lpMessageInfo = XFA_FM_ErrorMsg(msg); | |
| 538 va_list ap; | 537 va_list ap; |
| 539 va_start(ap, msg); | 538 va_start(ap, msg); |
| 540 m_pErrorInfo->message.FormatV(lpMessageInfo, ap); | 539 m_pErrorInfo->message.FormatV(msg, ap); |
| 541 va_end(ap); | 540 va_end(ap); |
| 542 } | 541 } |
| 543 | 542 |
| 544 FX_BOOL CXFA_FMLexer::HasError() const { | 543 FX_BOOL CXFA_FMLexer::HasError() const { |
| 545 if (m_pErrorInfo->message.IsEmpty()) { | 544 if (m_pErrorInfo->message.IsEmpty()) { |
| 546 return FALSE; | 545 return FALSE; |
| 547 } | 546 } |
| 548 return TRUE; | 547 return TRUE; |
| 549 } | 548 } |
| OLD | NEW |