| .. | .. |
|---|
| 45 | 45 | /* Convert each ASCII byte in the input string */ |
|---|
| 46 | 46 | |
|---|
| 47 | 47 | while (*string) { |
|---|
| 48 | | - |
|---|
| 49 | | - /* Character must be ASCII 0-7, otherwise terminate with no error */ |
|---|
| 50 | | - |
|---|
| 48 | + /* |
|---|
| 49 | + * Character must be ASCII 0-7, otherwise: |
|---|
| 50 | + * 1) Runtime: terminate with no error, per the ACPI spec |
|---|
| 51 | + * 2) Compiler: return an error |
|---|
| 52 | + */ |
|---|
| 51 | 53 | if (!(ACPI_IS_OCTAL_DIGIT(*string))) { |
|---|
| 54 | +#ifdef ACPI_ASL_COMPILER |
|---|
| 55 | + status = AE_BAD_OCTAL_CONSTANT; |
|---|
| 56 | +#endif |
|---|
| 52 | 57 | break; |
|---|
| 53 | 58 | } |
|---|
| 54 | 59 | |
|---|
| .. | .. |
|---|
| 94 | 99 | /* Convert each ASCII byte in the input string */ |
|---|
| 95 | 100 | |
|---|
| 96 | 101 | while (*string) { |
|---|
| 97 | | - |
|---|
| 98 | | - /* Character must be ASCII 0-9, otherwise terminate with no error */ |
|---|
| 99 | | - |
|---|
| 102 | + /* |
|---|
| 103 | + * Character must be ASCII 0-9, otherwise: |
|---|
| 104 | + * 1) Runtime: terminate with no error, per the ACPI spec |
|---|
| 105 | + * 2) Compiler: return an error |
|---|
| 106 | + */ |
|---|
| 100 | 107 | if (!isdigit(*string)) { |
|---|
| 108 | +#ifdef ACPI_ASL_COMPILER |
|---|
| 109 | + status = AE_BAD_DECIMAL_CONSTANT; |
|---|
| 110 | +#endif |
|---|
| 101 | 111 | break; |
|---|
| 102 | 112 | } |
|---|
| 103 | 113 | |
|---|
| .. | .. |
|---|
| 143 | 153 | /* Convert each ASCII byte in the input string */ |
|---|
| 144 | 154 | |
|---|
| 145 | 155 | while (*string) { |
|---|
| 146 | | - |
|---|
| 147 | | - /* Must be ASCII A-F, a-f, or 0-9, otherwise terminate with no error */ |
|---|
| 148 | | - |
|---|
| 156 | + /* |
|---|
| 157 | + * Character must be ASCII A-F, a-f, or 0-9, otherwise: |
|---|
| 158 | + * 1) Runtime: terminate with no error, per the ACPI spec |
|---|
| 159 | + * 2) Compiler: return an error |
|---|
| 160 | + */ |
|---|
| 149 | 161 | if (!isxdigit(*string)) { |
|---|
| 162 | +#ifdef ACPI_ASL_COMPILER |
|---|
| 163 | + status = AE_BAD_HEX_CONSTANT; |
|---|
| 164 | +#endif |
|---|
| 150 | 165 | break; |
|---|
| 151 | 166 | } |
|---|
| 152 | 167 | |
|---|