change: decode replacements

laumann
Oct 31, 2022, 1:44 PM
55SITR556Q3VRFOZNNQWJQZYYSTOZU6HQ5XFGR5KXMA6PGQ56PTAC

Dependencies

  • [2] ZKAOPMCH change: Implement decoding of edits, atoms, positions, among others
  • [3] NETL2N53 Makefile: add check target
  • [4] JAGXXSR7 change: initial work on decoding hunks
  • [5] FMYCPGKD change: extract hash list decoding into reused function
  • [6] B3XLVPNC Add ani.c and initial Makefile
  • [7] 2U7P5SFQ Change struct names "struct foo -> typedef struct Foo"
  • [*] Q7TKZCJP Add initial support for reading the offsets from a (fixed) change

Change contents

  • replacement in hunk.h at line 37
    [4.237][4.1056:1095](),[4.1056][4.1056:1095]()
    uint64_t atom;
    uint64_t replacement;
    [4.237]
    [4.238]
    Atom change;
    Atom replacement;
  • edit in hunk.h at line 40
    [4.252]
    [4.252]
    str encoding;
  • replacement in change.c at line 388
    [2.5386][2.5386:5485]()
    printf("%d. Edit in %s:%d\n", i + 1,
    bhunk->edit.local.path, bhunk->edit.local.line);
    [2.5386]
    [4.4304]
    printf("%d. Edit in %s:%d (%s)\n", i + 1,
    bhunk->edit.local.path, bhunk->edit.local.line,
    bhunk->edit.encoding == NULL ?
    "(nil)" :
    bhunk->edit.encoding);
  • replacement in change.c at line 396
    [4.4335][4.4335:4436]()
    printf("Replacement. change: Atom, replacement: Atom, local: Local, encoding: Option<Encoding>\n"
    [4.4335]
    [4.4436]
    change_decode_atom(binstat, &bhunk->replacement.change);
    change_decode_atom(
    binstat, &bhunk->replacement.replacement
    );
    change_decode_local(binstat, &bhunk->replacement.local);
    change_decode_encoding(
    binstat, &bhunk->replacement.encoding
  • edit in change.c at line 404
    [4.4442]
    [4.583]
    printf("%d. Replacement in %s:%d (%s)\n", i + 1,
    bhunk->replacement.local.path,
    bhunk->replacement.local.line,
    bhunk->replacement.encoding == NULL ?
    "(nil)" :
    bhunk->replacement.encoding);
  • replacement in Makefile at line 48
    [3.13][3.13:81]()
    ./ani change AGBLQOQIB6DSD2APO6L2PLFXF7CRWKAD6VAWIAD6F2DTH4EIRYRQC
    [3.13]
    [3.81]
    ./ani change NETL2N53SORFVLRHT2GK6EYIGK64U6E4QTCES6NGQPBYUPIOVEIAC