Skip to content

Commit ee322cd

Browse files
committed
Updated DIFF.LUA README.md documentation
1 parent a6bfb3e commit ee322cd

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

test/DIFF/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The script performs the following steps:
4343
- The function `diff_u` performs the actual comparison:
4444
- It reads two files line by line.
4545
- It tracks which lines are added, removed,
46-
or unchanged between the two files using the Myers diff algorithm
46+
or unchanged between the two files using a full matrix diff algorithm
4747
- It groups changes in "hunks,"
4848
which are logical sections of differences,
4949
and formats these differences in the unified diff style.
@@ -67,12 +67,12 @@ The script performs the following steps:
6767

6868
## Functions
6969

70-
| Function | Parameters | Description |
71-
|----------|-------------------------------------------------|-----------------------------------------------------------------------------|
72-
| `diff_u` | **f**ile**n**ame**1**<br/>**f**ile**n**ame**2** | Prints differences between the two files in to stdout. |
73-
| `fp` | | **F**lushes **p**re-context lines into the buffer when changes are detected |
74-
| `fh` | | **F**lushes a complete **h**unk of changes into the buffer |
75-
| `fb` | | **F**lush (print) and clear the **b**uffer |
76-
| `di` | | **D**iagonally **i**terate (lines that match in both files) |
77-
| `ri` | | **Ri**ght iterate (for a line only present in the old file) |
78-
| `dn` | | **D**ow**n** Iterate (for a line only present in the new file) |
70+
| Function | Parameters | Description |
71+
|----------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------|
72+
| `diff_u` | **f**ile**n**ame**1**<br/>**f**ile**n**ame**2** | Prints differences between the two files in to stdout. |
73+
| `cmp` | x</br>y | **C**o**mp**ares line `x` in the old file with line `y` in the new file |
74+
| `get` | filename<br>packedIdx<br>idx | Open seek and read line `idx` of `filename` |
75+
| `pfl` | marker<br>line | **F**ormats a single diff **l**ine by **p**refixing `marker` and stripping newlines |
76+
| `init` | | Begins a new hunk: collects up to `DIFF_CONTEXT` lines of unchanged context before the first change in a hunk. |
77+
| `flush` | | Emits the current hunk buffer to stdout once either enough changes have accumulated or the hunk is closed. Prepends the unified-diff hunk header. |
78+
| `nlc` | | After finishing a file, checks if the last line lacked a newline and, if so, inserts a `\ No newline at end of file` marker into the current hunk. |

0 commit comments

Comments
 (0)