diff options
| author | Alexander Gavrilov | 2012-06-16 13:33:49 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-06-16 13:33:49 +0400 |
| commit | dc5bef2cb84cceb30179df750d986eecdef8b474 (patch) | |
| tree | 7ac9ae270af3ab182c8ad518ef5e198e884af577 /Lua API.html | |
| parent | 94dfdb486d0a2bbc832f60fd58847732ac670390 (diff) | |
| download | dfhack-dc5bef2cb84cceb30179df750d986eecdef8b474.tar.gz dfhack-dc5bef2cb84cceb30179df750d986eecdef8b474.tar.bz2 dfhack-dc5bef2cb84cceb30179df750d986eecdef8b474.tar.xz | |
Add lua internal api functions needed for scanning memory.
Diffstat (limited to 'Lua API.html')
| -rw-r--r-- | Lua API.html | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Lua API.html b/Lua API.html index 04745798..90e61211 100644 --- a/Lua API.html +++ b/Lua API.html @@ -1332,6 +1332,22 @@ global environment, persistent between calls to the script.</p> <li><p class="first"><tt class="docutils literal">dfhack.internal.getMemRanges()</tt></p> <p>Returns a sequence of tables describing virtual memory ranges of the process.</p> </li> +<li><p class="first"><tt class="docutils literal">dfhack.internal.memmove(dest,src,count)</tt></p> +<p>Wraps the standard memmove function. Accepts both numbers and refs as pointers.</p> +</li> +<li><p class="first"><tt class="docutils literal">dfhack.internal.memcmp(ptr1,ptr2,count)</tt></p> +<p>Wraps the standard memcmp function.</p> +</li> +<li><p class="first"><tt class="docutils literal">dfhack.internal.memscan(haystack,count,step,needle,nsize)</tt></p> +<p>Searches for <tt class="docutils literal">needle</tt> of <tt class="docutils literal">nsize</tt> bytes in <tt class="docutils literal">haystack</tt>, +using <tt class="docutils literal">count</tt> steps of <tt class="docutils literal">step</tt> bytes. +Returns: <em>step_idx, sum_idx, found_ptr</em>, or <em>nil</em> if not found.</p> +</li> +<li><p class="first"><tt class="docutils literal">dfhack.internal.diffscan(old_data, new_data, start_idx, end_idx, eltsize[, oldval, newval, delta])</tt></p> +<p>Searches for differences between buffers at ptr1 and ptr2, as integers of size eltsize. +The oldval, newval or delta arguments may be used to specify additional constraints. +Returns: <em>found_index</em>, or <em>nil</em> if end reached.</p> +</li> </ul> </div> </div> |
