AmendHub

jcs

/

amend

/

amendments

Amendments on October 19, 2026

README: Add 4.0 changes

jcs made amendment 204 3 days ago

util: Disable MALLOC_DEBUG

jcs made amendment 203 3 days ago

patch: Account for newline

jcs made amendment 202 3 days ago

util: Fix off-by-one in FSReadLine

jcs made amendment 201 3 days ago

Amendments on October 4, 2026

settings: Just use strlcpy

jcs made amendment 200 18 days ago

repo: Plug memory leak in alloc failure

jcs made amendment 199 18 days ago

util: Put resource fork size in a different field in 'struct stat'

Anything that cares about the size of the resource fork is going to
need to be modified to do something with it, so adding them together
as st_size was not helpful.
 
This was the root cause of the optimization in repo that tried to
skip unchanged files not working, since the resource forks of .c
files in THINK C are modified frequently even when the content
doesn't change.
 
Also fix a bug in TEGetWidth using the wrong fields, and a memory
leak in UpdateScrollbarForTE.
jcs made amendment 197 18 days ago

diffreg: Plug leak when canceling a diff

jcs made amendment 196 18 days ago

repo: If bile_open fails due to bad map, try to recover

jcs made amendment 195 18 days ago

repo: Use a bile transaction in repo_amend

jcs made amendment 193 18 days ago

bile: Add bile_begin and bile_commit to do things in transactions

Rather than writing the new map on every change, one can enter a
transaction and defer writing the new map until bile_commit. This
way if a crash happens during changes, the map won't be left
pointing at partial progress.
jcs made amendment 192 18 days ago

util: Fix xrealloc when size shrinks

jcs made amendment 191 18 days ago

rsrc: Fix parens

jcs made amendment 190 18 days ago

repo: Fix error paths, handle not-deleted but zero-length files

bile can't store zero-length files so just delete the TEXT object
and treat it as deleted, but any future diff will just recreate the
file as zero-length. Probably not ideal but this seems like a rare
case (or someone adding a file that only has a resource fork which
we can't handle anyway).
jcs made amendment 189 18 days ago

committer: Add missing HLock, check teLength instead of nLines

Apparently an empty TE can still have nLines of 1
jcs made amendment 188 18 days ago

Amendments on October 3, 2026

repo: Fix typo in repo_diff_file

jcs made amendment 187 18 days ago

bile: Set new map_ptr to new map obj, not the one about to be freed

Also set bile->last_error consistently.
jcs made amendment 186 18 days ago

Amendments on October 2, 2026

*: Adapt to new xmalloc/xmalloczero

Also fix a memory leak in the latest repo migration
jcs made amendment 185 19 days ago