aslsupport.l (2e578044134b742546a8cf7d49597f34528bdbec) | aslsupport.l (37d7a5bcc0d1b717c16ee4eb4c6068501bf813fb) |
---|---|
1/****************************************************************************** 2 * 3 * Module Name: aslsupport.l - Flex/lex scanner C support routines. 4 * NOTE: Included into aslcompile.l, not compiled by itself. 5 * 6 *****************************************************************************/ 7 8/****************************************************************************** --- 206 unchanged lines hidden (view full) --- 215 AslGbl_HasIncludeFiles = TRUE; 216 217 /* Eat the entire line that contains the #line directive */ 218 219 AslGbl_LineBufPtr = AslGbl_CurrentLineBuffer; 220 221 while ((c = input()) != '\n' && c != EOF) 222 { | 1/****************************************************************************** 2 * 3 * Module Name: aslsupport.l - Flex/lex scanner C support routines. 4 * NOTE: Included into aslcompile.l, not compiled by itself. 5 * 6 *****************************************************************************/ 7 8/****************************************************************************** --- 206 unchanged lines hidden (view full) --- 215 AslGbl_HasIncludeFiles = TRUE; 216 217 /* Eat the entire line that contains the #line directive */ 218 219 AslGbl_LineBufPtr = AslGbl_CurrentLineBuffer; 220 221 while ((c = input()) != '\n' && c != EOF) 222 { |
223 *AslGbl_LineBufPtr = c; | 223 *AslGbl_LineBufPtr = (char) c; |
224 AslGbl_LineBufPtr++; 225 } 226 *AslGbl_LineBufPtr = 0; 227 228 /* First argument is the actual line number */ 229 230 Token = strtok (AslGbl_CurrentLineBuffer, " "); 231 if (!Token) --- 261 unchanged lines hidden (view full) --- 493 { 494 /* End of line */ 495 496 AslResetCurrentLineBuffer (); 497 } 498 499 if (AcpiGbl_CaptureComments) 500 { | 224 AslGbl_LineBufPtr++; 225 } 226 *AslGbl_LineBufPtr = 0; 227 228 /* First argument is the actual line number */ 229 230 Token = strtok (AslGbl_CurrentLineBuffer, " "); 231 if (!Token) --- 261 unchanged lines hidden (view full) --- 493 { 494 /* End of line */ 495 496 AslResetCurrentLineBuffer (); 497 } 498 499 if (AcpiGbl_CaptureComments) 500 { |
501 CvProcessCommentState (SourceChar); | 501 CvProcessCommentState ((char) SourceChar); |
502 } 503 } 504} 505 506 507/******************************************************************************* 508 * 509 * FUNCTION: count --- 86 unchanged lines hidden (view full) --- 596 597 /* Eat chars until end-of-comment */ 598 599 while (((c = input ()) != '*') && (c != EOF)) 600 { 601 AslInsertLineBuffer (c); 602 if (AcpiGbl_CaptureComments && CurrentState.CaptureComments) 603 { | 502 } 503 } 504} 505 506 507/******************************************************************************* 508 * 509 * FUNCTION: count --- 86 unchanged lines hidden (view full) --- 596 597 /* Eat chars until end-of-comment */ 598 599 while (((c = input ()) != '*') && (c != EOF)) 600 { 601 AslInsertLineBuffer (c); 602 if (AcpiGbl_CaptureComments && CurrentState.CaptureComments) 603 { |
604 *StringBuffer = c; | 604 *StringBuffer = (char) c; |
605 ++StringBuffer; 606 } 607 c1 = c; 608 } 609 610 if (c == EOF) 611 { 612 goto EarlyEOF; --- 11 unchanged lines hidden (view full) --- 624 AslGbl_Files[ASL_FILE_INPUT].Filename, NULL); 625 } 626 627 /* Comment is closed only if the NEXT character is a slash */ 628 629 AslInsertLineBuffer (c); 630 if (AcpiGbl_CaptureComments && CurrentState.CaptureComments) 631 { | 605 ++StringBuffer; 606 } 607 c1 = c; 608 } 609 610 if (c == EOF) 611 { 612 goto EarlyEOF; --- 11 unchanged lines hidden (view full) --- 624 AslGbl_Files[ASL_FILE_INPUT].Filename, NULL); 625 } 626 627 /* Comment is closed only if the NEXT character is a slash */ 628 629 AslInsertLineBuffer (c); 630 if (AcpiGbl_CaptureComments && CurrentState.CaptureComments) 631 { |
632 *StringBuffer = c; | 632 *StringBuffer = (char) c; |
633 ++StringBuffer; 634 } 635 636 if (((c1 = input ()) != '/') && (c1 != EOF)) 637 { 638 unput (c1); 639 goto loop; 640 } --- 74 unchanged lines hidden (view full) --- 715 AslInsertLineBuffer ('/'); 716 } 717 718 while (((c = input ()) != '\n') && (c != EOF)) 719 { 720 AslInsertLineBuffer (c); 721 if (AcpiGbl_CaptureComments && CurrentState.CaptureComments) 722 { | 633 ++StringBuffer; 634 } 635 636 if (((c1 = input ()) != '/') && (c1 != EOF)) 637 { 638 unput (c1); 639 goto loop; 640 } --- 74 unchanged lines hidden (view full) --- 715 AslInsertLineBuffer ('/'); 716 } 717 718 while (((c = input ()) != '\n') && (c != EOF)) 719 { 720 AslInsertLineBuffer (c); 721 if (AcpiGbl_CaptureComments && CurrentState.CaptureComments) 722 { |
723 *StringBuffer = c; | 723 *StringBuffer = (char) c; |
724 ++StringBuffer; 725 } 726 } 727 728 if (c == EOF) 729 { 730 /* End of file is OK, change to newline. Let parser detect EOF later */ 731 --- 141 unchanged lines hidden (view full) --- 873 874 default: 875 876 /* Check for an octal digit (0-7) */ 877 878 if (ACPI_IS_OCTAL_DIGIT (StringChar)) 879 { 880 State = ASL_OCTAL_CONSTANT; | 724 ++StringBuffer; 725 } 726 } 727 728 if (c == EOF) 729 { 730 /* End of file is OK, change to newline. Let parser detect EOF later */ 731 --- 141 unchanged lines hidden (view full) --- 873 874 default: 875 876 /* Check for an octal digit (0-7) */ 877 878 if (ACPI_IS_OCTAL_DIGIT (StringChar)) 879 { 880 State = ASL_OCTAL_CONSTANT; |
881 ConvertBuffer[0] = StringChar; | 881 ConvertBuffer[0] = (char) StringChar; |
882 i = 1; 883 continue; 884 } 885 886 /* Unknown escape sequence issue warning, but use the character */ 887 888 AslCommonError (ASL_WARNING, ASL_MSG_INVALID_ESCAPE, 889 AslGbl_CurrentLineNumber, AslGbl_LogicalLineNumber, --- 39 unchanged lines hidden (view full) --- 929 930 State = ASL_NORMAL_CHAR; 931 goto DoCharacter; 932 break; 933 } 934 935 /* Append another digit of the constant */ 936 | 882 i = 1; 883 continue; 884 } 885 886 /* Unknown escape sequence issue warning, but use the character */ 887 888 AslCommonError (ASL_WARNING, ASL_MSG_INVALID_ESCAPE, 889 AslGbl_CurrentLineNumber, AslGbl_LogicalLineNumber, --- 39 unchanged lines hidden (view full) --- 929 930 State = ASL_NORMAL_CHAR; 931 goto DoCharacter; 932 break; 933 } 934 935 /* Append another digit of the constant */ 936 |
937 ConvertBuffer[i] = StringChar; | 937 ConvertBuffer[i] = (char) StringChar; |
938 i++; 939 continue; 940 941 case ASL_HEX_CONSTANT: 942 943 /* Up to two hex digits allowed */ 944 945 if (!isxdigit (StringChar) || --- 27 unchanged lines hidden (view full) --- 973 974 State = ASL_NORMAL_CHAR; 975 goto DoCharacter; 976 break; 977 } 978 979 /* Append another digit of the constant */ 980 | 938 i++; 939 continue; 940 941 case ASL_HEX_CONSTANT: 942 943 /* Up to two hex digits allowed */ 944 945 if (!isxdigit (StringChar) || --- 27 unchanged lines hidden (view full) --- 973 974 State = ASL_NORMAL_CHAR; 975 goto DoCharacter; 976 break; 977 } 978 979 /* Append another digit of the constant */ 980 |
981 ConvertBuffer[i] = StringChar; | 981 ConvertBuffer[i] = (char) StringChar; |
982 i++; 983 continue; 984 985 default: 986 987 break; 988 } 989 990 /* Save the finished character */ 991 | 982 i++; 983 continue; 984 985 default: 986 987 break; 988 } 989 990 /* Save the finished character */ 991 |
992 *StringBuffer = StringChar; | 992 *StringBuffer = (char) StringChar; |
993 StringBuffer++; 994 if (StringBuffer >= EndBuffer) 995 { 996 goto BufferOverflow; 997 } 998 } 999 1000 /* --- 31 unchanged lines hidden --- | 993 StringBuffer++; 994 if (StringBuffer >= EndBuffer) 995 { 996 goto BufferOverflow; 997 } 998 } 999 1000 /* --- 31 unchanged lines hidden --- |