File: meminit_pairs.c

package info (click to toggle)
emscripten 3.1.69%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 121,872 kB
  • sloc: ansic: 636,110; cpp: 425,974; javascript: 78,401; python: 58,404; sh: 49,154; pascal: 5,237; makefile: 3,365; asm: 2,415; lisp: 1,869
file content (25 lines) | stat: -rw-r--r-- 876 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 * Copyright 2015 The Emscripten Authors.  All rights reserved.
 * Emscripten is available under two separate licenses, the MIT license and the
 * University of Illinois/NCSA Open Source License.  Both these licenses can be
 * found in the LICENSE file.
 */

unsigned char problematic[] = { 0x20, 0x7c, 0x02, 0x07, 0x5f, 0xa0, 0xdf };
int main() {
  unsigned char a, b;
  int result = 0, i, j;
  for (i = 0; i < sizeof(problematic); ++i) {
    a = problematic[i] ^ 32;
    for (j = 0; j < sizeof(problematic); ++j) {
      b = problematic[j] ^ 32;
      if (((const unsigned char)data[a][2*b]) != a ||
          ((const unsigned char)data[a][2*b + 1]) != b) {
        result = 1;
        printf("data[0x%02x][0x%03x]=%x02x\n", a, 2*b, data[a][2*b]);
        printf("data[0x%02x][0x%03x]=%x02x\n", a, 2*b + 1, data[a][2*b + 1]);
      }
    }
  }
  REPORT_RESULT(result);
}