Notes on acme.dump format

-as of Sun Mar 15 15:52:46 EDT 2015-

The format of the files generated by Dump and read by Load in acme(1) is not formally documented, but this does a reasonable job of describing it.

HEADER

Dump files all start with three lines describing the global state of the Acme instance:

        0          30          85
describes a three-column window with columns starting at the left edge, 30% in, and 85% in.

GLOBAL DESCRIPTION

Two types of lines are newer additions. They are optional in current dump files, and not found in older ones. If these lines exist, they must come before row/window descriptors, described below.

ROW DESCRIPTORS

Subsequent lines define window ("rows" in acme's terminology). They come in sets of two or more lines each, depending on the type. The first two lines are common to all window types, with one exception.

The first 5 fields from the window's ctl file (see acme(4) and wind.c:/^winctlprint), followed by a space, then the tag for that window. These first five fields are: Window ID; tag size in runes; body size in runes; 1 if the window is a directory, 0 otherwise, 1 if modified (dirty), 0 otherwise.

ROW TYPES

Internal file or directory window.

Regular file, dirty. Subsequent lines are the contents of the window, which must match the buffer length specified in the first line.

Zerox windows. Treated like f windows, with dumpid set.

Window for an external command. Fields for dot are always 0 on creation, and the second line ("ctl line") is ignored. "e" window definitions must be followed by two additional lines. The third line is working directory. If this is blank, it will be set to $home, or "./" if $home is not set. The fourth line is the command to run, via exec.c:/^run\(.*\).