diff options
author | Gerald Combs <gerald@zing.org> | 2014-11-02 13:20:08 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2014-11-09 05:12:09 +0000 |
commit | 04aad36c0e9179ceb36b9459d52aad0059b7d1f2 (patch) | |
tree | 6678632b4620b8f107c306c7d6541641bef01854 /epan/wslua | |
parent | 502085662fd22deadd7d405a5bf13edbaff2516c (diff) |
Convert the Lua reference to AsciiDoc.
Move it to the Developer's Guide while we're here.
Nudge the markup in epan/wslua where needed. Note that we should
probably convert it to AsciiDoc (if we're going to keep it in the DG) or
Doxygen.
Change-Id: Ie175111043f98b7a37eeeb8d185a833d8e866f8b
Reviewed-on: https://code.wireshark.org/review/5203
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'epan/wslua')
-rw-r--r-- | epan/wslua/wslua_int64.c | 2 | ||||
-rw-r--r-- | epan/wslua/wslua_struct.c | 50 | ||||
-rw-r--r-- | epan/wslua/wslua_tree.c | 4 | ||||
-rw-r--r-- | epan/wslua/wslua_tvb.c | 2 |
4 files changed, 29 insertions, 29 deletions
diff --git a/epan/wslua/wslua_int64.c b/epan/wslua/wslua_int64.c index 8cb79b755d..6c08373184 100644 --- a/epan/wslua/wslua_int64.c +++ b/epan/wslua/wslua_int64.c @@ -607,7 +607,7 @@ LUALIB_API int Int64_register(lua_State* L) { WSLUA_CLASS_DEFINE_BASE(UInt64,NOP,NOP,0); /* `UInt64` represents a 64 bit unsigned integer, similar to `Int64`. - For details, see: http://wiki.wireshark.org/LuaAPI/`Int64`. + For details, see: [[http://wiki.wireshark.org/LuaAPI/Int64]]. */ /* A checkUInt64 but that also auto-converts numbers, strings, and `Int64` to a guint64. */ diff --git a/epan/wslua/wslua_struct.c b/epan/wslua/wslua_struct.c index e6b5471eb9..a05d69760d 100644 --- a/epan/wslua/wslua_struct.c +++ b/epan/wslua/wslua_struct.c @@ -118,36 +118,36 @@ The supported elements in the format string are as follows: - * "` `" (empty space) ignored. - * "`!`n" flag to set the current alignment requirement to 'n' (necessarily a power of 2); + * `$$ $$' (empty space) ignored. + * `++!++__n__' flag to set the current alignment requirement to 'n' (necessarily a power of 2); an absent 'n' means the machine's native alignment. - * "`>`" flag to set mode to big endian (i.e., network-order). - * "`<`" flag to set mode to little endian. - * "`x`" a padding zero byte with no corresponding Lua value. - * "`b`" a signed char. - * "`B`" an unsigned char. - * "`h`" a signed short (native size). - * "`H`" an unsigned short (native size). - * "`l`" a signed long (native size). - * "`L`" an unsigned long (native size). - * "`T`" a size_t (native size). - * "`i`n" a signed integer with 'n' bytes. An absent 'n' means the native size of an int. - * "`I`n" like "`i`n" but unsigned. - * "`e`" signed 8-byte Integer (64-bits, long long), to/from a `Int64` object. - * "`E`" unsigned 8-byte Integer (64-bits, long long), to/from a `UInt64` object. - * "`f`" a float (native size). - * "`d`" a double (native size). - * "`s`" a zero-terminated string. - * "`c`n" a sequence of exactly 'n' chars corresponding to a single Lua string. An absent 'n' + * `++>++' flag to set mode to big endian (i.e., network-order). + * `++<++' flag to set mode to little endian. + * `++x++' a padding zero byte with no corresponding Lua value. + * `++b++' a signed char. + * `++B++' an unsigned char. + * `++h++' a signed short (native size). + * `++H++' an unsigned short (native size). + * `++l++' a signed long (native size). + * `++L++' an unsigned long (native size). + * `++T++' a size_t (native size). + * `++i++__n__' a signed integer with 'n' bytes. An absent 'n' means the native size of an int. + * `++I++__n__' like `++i++__n__' but unsigned. + * `++e++' signed 8-byte Integer (64-bits, long long), to/from a +Int64+ object. + * `++E++' unsigned 8-byte Integer (64-bits, long long), to/from a +UInt64+ object. + * `++f++' a float (native size). + * `++d++' a double (native size). + * `++s++' a zero-terminated string. + * `++c++__n__' a sequence of exactly 'n' chars corresponding to a single Lua string. An absent 'n' means 1. When packing, the given string must have at least 'n' characters (extra characters are discarded). - * "`c0`" this is like "`c`n", except that the 'n' is given by other means: When packing, 'n' is + * `++c0++' this is like `++c++__n__', except that the 'n' is given by other means: When packing, 'n' is the length of the given string; when unpacking, 'n' is the value of the previous unpacked value (which must be a number). In that case, this previous value is not returned. - * "`x`n" pad to 'n' number of bytes, default 1. - * "`X`n" pad to 'n' alignment, default MAXALIGN. - * "`(`" to stop assigning items, and "`)`" start assigning (padding when packing). - * "`=`" to return the current position / offset. + * `++x++__n__' pad to 'n' number of bytes, default 1. + * `++X++__n__' pad to 'n' alignment, default MAXALIGN. + * `++(++' to stop assigning items, and `++)++' start assigning (padding when packing). + * `++=++' to return the current position / offset. @note Using `i`, `I`, `h`, `H`, `l`, `L`, `f`, and `T` is strongly discouraged, as those sizes are system-dependent. Use the explicitly sized variants instead, such as `i4` or `E`. diff --git a/epan/wslua/wslua_tree.c b/epan/wslua/wslua_tree.c index 8e6c334fa3..141229611a 100644 --- a/epan/wslua/wslua_tree.c +++ b/epan/wslua/wslua_tree.c @@ -49,8 +49,8 @@ TreeItem* push_TreeItem(lua_State*L, TreeItem t) { CLEAR_OUTSTANDING(TreeItem, expired, TRUE) WSLUA_CLASS_DEFINE(TreeItem,FAIL_ON_NULL_OR_EXPIRED("TreeItem"),NOP); -/* `TreeItem`s represent information in the packet-details pane. - A root `TreeItem` is passed to dissectors as the third argument. */ +/* ++TreeItem++s represent information in the packet-details pane. + A root +TreeItem+ is passed to dissectors as the third argument. */ /* the following is used by TreeItem_add_packet_field() - this can THROW errors */ static proto_item * diff --git a/epan/wslua/wslua_tvb.c b/epan/wslua/wslua_tvb.c index 2e129ade98..7c02a8cfd2 100644 --- a/epan/wslua/wslua_tvb.c +++ b/epan/wslua/wslua_tvb.c @@ -382,7 +382,7 @@ WSLUA_CLASS_DEFINE(Tvb,FAIL_ON_NULL_OR_EXPIRED("Tvb"),NOP); To create a `TvbRange` the `Tvb` must be called with offset and length as optional arguments; the offset defaults to 0 and the length to `tvb:len()`. - @warning `Tvb`s are usable only by the current listener or dissector call and are destroyed + @warning Tvbs are usable only by the current listener or dissector call and are destroyed as soon as the listener/dissector returns, so references to them are unusable once the function has returned. */ |