diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-05-16 16:33:21 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-05-16 16:33:21 +0200 |
commit | 6d36bb20f860c069631bc50dce7e332c80a54730 (patch) | |
tree | 3c93f2c8fe52626c61083812c728435252e59608 /doc/libHX_Documentation.lyx | |
parent | 246015cb71b7f0a599d1870185d73f2326adb911 (diff) | |
parent | a1bdcfa3ca8af4ddb69ee57d716aa943cf3fe94a (diff) |
Update upstream source from tag 'upstream/3.25'
Update to upstream version '3.25'
with Debian dir ee1976ad65a32f96556b498dbf1b74cdefdfeda5
Diffstat (limited to 'doc/libHX_Documentation.lyx')
-rw-r--r-- | doc/libHX_Documentation.lyx | 164 |
1 files changed, 35 insertions, 129 deletions
diff --git a/doc/libHX_Documentation.lyx b/doc/libHX_Documentation.lyx index a28f1c6..9e2e9f5 100644 --- a/doc/libHX_Documentation.lyx +++ b/doc/libHX_Documentation.lyx @@ -91,7 +91,7 @@ \begin_body \begin_layout Title -libHX 3.24 +libHX 3.25 \begin_inset Newline newline \end_inset @@ -2620,26 +2620,6 @@ Locators \end_layout \begin_layout LyX-Code - -\series bold -long -\series default - offsetof(type, member); -\begin_inset Index idx -status open - -\begin_layout Plain Layout - -\family typewriter -offsetof -\end_layout - -\end_inset - - -\begin_inset Newline newline -\end_inset - output_type \series bold * @@ -2668,14 +2648,14 @@ containerof \series bold size_t \series default - FIELD_SIZEOF(struct_type, member); + HXsizeof_member(struct_type, member); \begin_inset Index idx status open \begin_layout Plain Layout \family typewriter -FIELD_SIZEOF +HXsizeof_member \end_layout \end_inset @@ -2700,55 +2680,6 @@ HXtypeof_member \end_layout \begin_layout Standard -In case -\family typewriter -offsetof -\family default - and -\family typewriter -containerof -\family default - have not already defined by inclusion of another header file, libHX's defs.h - will define these accessors. - -\family typewriter -offsetof -\family default - is defined in -\family typewriter -stddef.h -\family default - (for C) or -\family typewriter -cstddef -\family default - (C++), but inclusion of these is not necessary if you have included -\family typewriter -defs.h -\family default -. - -\family typewriter -defs.h -\family default - will use GCC's -\family typewriter -__builtin_\SpecialChar softhyphen -offsetof -\family default - if available, which does some extra sanity checks in C++ mode. -\end_layout - -\begin_layout Standard - -\family typewriter -offsetof -\family default - calculates the offset of the specified member in the type, which needs - to be a struct or union. -\end_layout - -\begin_layout Standard \family typewriter containerof @@ -2831,30 +2762,14 @@ struct \begin_layout Standard \family typewriter -FIELD_SIZEOF -\family default - (formerly -\family typewriter HXsizeof_member \family default - -\begin_inset Index idx -status open - -\begin_layout Plain Layout - -\family typewriter -HXsizeof_member -\end_layout - -\end_inset - -) and + and \family typewriter HXtypeof_member \family default - are convenient shortcuts to get the size or type of a named member in a - given struct: + are shortcuts (mainly for the C language) to get the size or type of a + named member in a given struct: \end_layout \begin_layout LyX-Code @@ -2869,6 +2784,18 @@ struct foo, baz)]; \end_layout +\begin_layout Standard +In C++, one can simply use +\family typewriter +sizeof(foo::baz) +\family default + and +\family typewriter +decltype(foo::baz) +\family default +. +\end_layout + \begin_layout Subsection Array size \end_layout @@ -12252,7 +12179,7 @@ HX_split \series bold char ** \series default -HX_split4( +HX_split_inplace( \series bold char * \series default @@ -12277,7 +12204,7 @@ status open \family typewriter \size normal \color none -HX_split4 +HX_split_inplace \end_layout \end_inset @@ -12290,7 +12217,7 @@ HX_split4 \series bold int \series default - HX_split5( + HX_split_fixed( \series bold char * \series default @@ -12306,7 +12233,7 @@ int \series bold char ** \series default -stack); +arr); \begin_inset Index idx status open @@ -12315,7 +12242,7 @@ status open \family typewriter \size normal \color none -HX_split5 +HX_split_fixed \end_layout \end_inset @@ -12456,7 +12383,7 @@ s \begin_layout Description \family typewriter -HX_split4 +HX_split_inplace \family default Split the string \family typewriter @@ -12499,7 +12426,7 @@ HX_split \begin_layout Description \family typewriter -HX_split5 +HX_split_fixed \family default Split the string \family typewriter @@ -12521,7 +12448,7 @@ delimiters The array for the substring pointers must be provided by the user through the \family typewriter -stack +arr \family default argument. @@ -13195,10 +13122,10 @@ Examples \end_layout \begin_layout Subsubsection -Using HX_split5 +Using HX_split_fixed \begin_inset CommandInset label LatexCommand label -name "subsec:string-ex-HX_split5" +name "subsec:string-ex-HX_split_fixed" \end_inset @@ -13208,31 +13135,10 @@ name "subsec:string-ex-HX_split5" \begin_layout Standard \family typewriter -HX_split5 -\family default -, where the -\begin_inset Quotes eld -\end_inset - -5 -\begin_inset Quotes erd -\end_inset - - should be interpreted (with a bit of imagination and the knowledge of leetspeak -) as an -\begin_inset Quotes eld -\end_inset - -S -\begin_inset Quotes erd -\end_inset - - for stack, as -\family typewriter -HX_split5 +HX_split_fixed \family default - is often used only with on-stack variables and where the field count of - interest is fixed, as the example for parsing + is often used just with scoped automatic-storage variables and where the + field count of interest is fixed, as the example for parsing \family typewriter /etc/passwd \family default @@ -13292,7 +13198,7 @@ while \series bold if \series default - (HX_split5(line, ":", ARRAY_SIZE(field), field) < 7) { + (HX_split_fixed(line, ":", ARRAY_SIZE(field), field) < 7) { \begin_inset Newline newline \end_inset @@ -13324,14 +13230,14 @@ n", field[0]); \end_layout \begin_layout Subsubsection -Using HX_split4 +Using HX_split_inplace \end_layout \begin_layout Standard Where the number of fields is not previously known and/or estimatable, but the string can be modified in place, one uses \family typewriter -HX_split4 +HX_split_inplace \family default as follows: \end_layout @@ -13377,7 +13283,7 @@ while \series bold char ** \series default -field = HX_split4(line, ":", NULL, 0); +field = HX_split_inplace(line, ":", NULL, 0); \begin_inset Newline newline \end_inset |