XTVLIC243WZF52NVTNRA3SV3WLE2ZZ5GTFQOK45IOLMXYQMTLOSAC ZKAOPMCHBGP7J7NQB233AQJQDX6TBD7REPLF3KN3EIKZK6TZZMBQC YDQLW2ZOAH7PZ7HHVTSFUO5IWE6O7FDNXVNIN7GG4TJ3P2B2BM4AC JAGXXSR7DR5FG77VKBF62BW7Q3JMVHCLHF4VB2PSLIZF4RLE553QC 2U7P5SFQG3AVALKMPJF4WMZE6PXIXXZYOMZ3RZKILBUJ4UMFXVIAC YG4DZB3AW3Z3LB5CFBZZ4ORJOLZFN3G4CA2YTAMSUOQX3USVNVEAC Q7TKZCJP2Z75EICZYKCEZDHKGERSOKZGMTSU3UXETBHTF663T66AC RIWSVVASWLJQQTSVRHIIUPENOZWOMHQLZMTQVGJUS2ZUGDPSWWIQC QYRJIOYPM7SAB3OHMALL67K44U5HPBRQ2AFNWUKATPXM6BUYRKBQC }}voidprint_change(Hashed *hashed, uint8_t *contents){int i;printf("message = %s\n", hashed->header.message);if (hashed->header.description)printf("description = '%s'\n", hashed->header.description);printf("timestamp = '%s'\n\n", hashed->header.timestamp);printf("[[authors]]\n");for (i = 0; i < hashed->header.authors.len; i++) {int j;for (j = 0; j < hashed->header.authors.map[i].len; j++) {printf("%s = '%s'\n",hashed->header.authors.map[i].entries[j].key,hashed->header.authors.map[i].entries[j].value);}}printf("\n");printf("# Dependencies\n");for (i = 0; i < hashed->dependencies.len; i++) {printf(" ");hashprintln(&hashed->dependencies.entries[i]);}for (i = 0; i < hashed->extraknown.len; i++) {printf("+");hashprintln(&hashed->extraknown.entries[i]);}printf("\n#Hunks\n\n");/* FIXME: Put all the hashes of dependencies in a big list, and number them from 2 */for (i = 0; i < hashed->hunks.len; i++) {Basehunk *hunk = &hashed->hunks.entries[i];printf("%d. %s", i + 1, hunk_basehunk_type_str(hunk->hunktype));switch (hunk->hunktype) {case EDIT:Edit *e = &hunk->edit;Atom *c = &e->change;printf(" in %s:%u (%s)", e->local.path, e->local.line,e->encoding);printf("\n");print_atom(c, contents);break;case REPLACEMENT:Replacement *r = &hunk->replacement;printf(" in %s:%u (%s)", r->local.path, r->local.line,r->encoding);print_atom(c, contents);printf("\n");break;default:printf(" [not yet implemented]\n");break;}
printf("message = %s\n", hashed.header.message);if (hashed.header.description)printf("description = '%s'\n", hashed.header.description);printf("timestamp = '%s'\n\n", hashed.header.timestamp);
print_change(&hashed, contents);
printf("[[authors]]\n");for (i = 0; i < hashed.header.authors.len; i++) {int j;for (j = 0; j < hashed.header.authors.map[i].len; j++) {printf("%s = '%s'\n",hashed.header.authors.map[i].entries[j].key,hashed.header.authors.map[i].entries[j].value);}}printf("\n");printf("# Dependencies\n");for (i = 0; i < hashed.dependencies.len; i++) {printf(" ");hashprintln(&hashed.dependencies.entries[i]);}for (i = 0; i < hashed.extraknown.len; i++) {printf("+");hashprintln(&hashed.extraknown.entries[i]);}printf("\n#Hunks\n\n");/* FIXME: Put all the hashes of dependencies in a big list, and number them from 2 */for (i = 0; i < hashed.hunks.len; i++) {Basehunk *hunk = &hashed.hunks.entries[i];printf("%d. %s", i + 1, hunk_basehunk_type_str(hunk->hunktype));switch (hunk->hunktype) {case EDIT:Edit *e = &hunk->edit;Atom *c = &e->change;printf(" in %s:%u (%s)", e->local.path, e->local.line,e->encoding);printf("\n");print_atom(c, contents);break;case REPLACEMENT:Replacement *r = &hunk->replacement;printf(" in %s:%u (%s)", r->local.path, r->local.line,r->encoding);printf("\n");break;default:printf(" [not yet implemented]\n");break;}}