diff options
| author | Kim F. Storm | 2006-05-28 22:20:49 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2006-05-28 22:20:49 +0000 |
| commit | b35444d58bc3e75d79bf34bef9145a6dd4c5d84d (patch) | |
| tree | ca46e632c349828d3187f42956632313b6aa7d9c | |
| parent | 6c6e0bb44e484071e69ec6d3e703f20f328b20ad (diff) | |
| download | emacs-b35444d58bc3e75d79bf34bef9145a6dd4c5d84d.tar.gz emacs-b35444d58bc3e75d79bf34bef9145a6dd4c5d84d.zip | |
(Bindat Functions): Rename `pos' and `raw-data' to
`bindat-idx' and `bindat-raw' for clarity.
| -rw-r--r-- | lispref/processes.texi | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lispref/processes.texi b/lispref/processes.texi index ba6ab18a39c..0f0b617e36c 100644 --- a/lispref/processes.texi +++ b/lispref/processes.texi | |||
| @@ -2185,11 +2185,11 @@ field name is specified, the value is bound to that field name. | |||
| 2185 | @var{form} can access and update these dynamically bound variables: | 2185 | @var{form} can access and update these dynamically bound variables: |
| 2186 | 2186 | ||
| 2187 | @table @code | 2187 | @table @code |
| 2188 | @item raw-data | 2188 | @item bindat-raw |
| 2189 | The data as a byte array. | 2189 | The data as a byte array. |
| 2190 | 2190 | ||
| 2191 | @item pos | 2191 | @item bindat-idx |
| 2192 | Current position of the unpacking or packing operation. | 2192 | Current index into bindat-raw of the unpacking or packing operation. |
| 2193 | 2193 | ||
| 2194 | @item struct | 2194 | @item struct |
| 2195 | Alist. | 2195 | Alist. |
| @@ -2243,14 +2243,14 @@ include a name. | |||
| 2243 | @subsection Functions to Unpack and Pack Bytes | 2243 | @subsection Functions to Unpack and Pack Bytes |
| 2244 | 2244 | ||
| 2245 | In the following documentation, @var{spec} refers to a data layout | 2245 | In the following documentation, @var{spec} refers to a data layout |
| 2246 | specification, @code{raw-data} to a byte array, and @var{struct} to an | 2246 | specification, @code{bindat-raw} to a byte array, and @var{struct} to an |
| 2247 | alist representing unpacked field data. | 2247 | alist representing unpacked field data. |
| 2248 | 2248 | ||
| 2249 | @defun bindat-unpack spec raw-data &optional pos | 2249 | @defun bindat-unpack spec bindat-raw &optional bindat-idx |
| 2250 | This function unpacks data from the unibyte string or byte | 2250 | This function unpacks data from the unibyte string or byte |
| 2251 | array @code{raw-data} | 2251 | array @code{bindat-raw} |
| 2252 | according to @var{spec}. Normally this starts unpacking at the | 2252 | according to @var{spec}. Normally this starts unpacking at the |
| 2253 | beginning of the byte array, but if @var{pos} is non-@code{nil}, it | 2253 | beginning of the byte array, but if @var{bindat-idx} is non-@code{nil}, it |
| 2254 | specifies a zero-based starting position to use instead. | 2254 | specifies a zero-based starting position to use instead. |
| 2255 | 2255 | ||
| 2256 | The value is an alist or nested alist in which each element describes | 2256 | The value is an alist or nested alist in which each element describes |
| @@ -2283,15 +2283,15 @@ This function returns the total length of the data in @var{struct}, | |||
| 2283 | according to @var{spec}. | 2283 | according to @var{spec}. |
| 2284 | @end defun | 2284 | @end defun |
| 2285 | 2285 | ||
| 2286 | @defun bindat-pack spec struct &optional raw-data pos | 2286 | @defun bindat-pack spec struct &optional bindat-raw bindat-idx |
| 2287 | This function returns a byte array packed according to @var{spec} from | 2287 | This function returns a byte array packed according to @var{spec} from |
| 2288 | the data in the alist @var{struct}. Normally it creates and fills a | 2288 | the data in the alist @var{struct}. Normally it creates and fills a |
| 2289 | new byte array starting at the beginning. However, if @var{raw-data} | 2289 | new byte array starting at the beginning. However, if @var{bindat-raw} |
| 2290 | is non-@code{nil}, it specifies a pre-allocated unibyte string or vector to | 2290 | is non-@code{nil}, it specifies a pre-allocated unibyte string or vector to |
| 2291 | pack into. If @var{pos} is non-@code{nil}, it specifies the starting | 2291 | pack into. If @var{bindat-idx} is non-@code{nil}, it specifies the starting |
| 2292 | offset for packing into @code{raw-data}. | 2292 | offset for packing into @code{bindat-raw}. |
| 2293 | 2293 | ||
| 2294 | When pre-allocating, you should make sure @code{(length @var{raw-data})} | 2294 | When pre-allocating, you should make sure @code{(length @var{bindat-raw})} |
| 2295 | meets or exceeds the total length to avoid an out-of-range error. | 2295 | meets or exceeds the total length to avoid an out-of-range error. |
| 2296 | @end defun | 2296 | @end defun |
| 2297 | 2297 | ||