From 59ab740192bc26abfc33b37bb2d4719c49dfaec9 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 3 Sep 2015 03:54:34 +0200 Subject: info: strend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- doc/info/mds.texinfo | 7 +++++++ src/libmdsserver/macros.h | 3 +-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/doc/info/mds.texinfo b/doc/info/mds.texinfo index 40c2dee..1af0556 100644 --- a/doc/info/mds.texinfo +++ b/doc/info/mds.texinfo @@ -6486,6 +6486,13 @@ failure will be printed to standard error. @cpindex Terminating If @code{condition} is satisfied, @code{instructions} is invoked and @code{1} is @code{return}:ed. + +@item @code{STREND} [(@code{const char* str}) @arrow{} @code{char*}] +@fnindex @code{STREND} +@cpindex Optimisations +Expands to @code{(strchr(str, '\0'))}. It is here to +remain us that @code{str = strchr(str, '\0')} is faster +than @code{str += strlen(str)}. @end table @cpindex Signals diff --git a/src/libmdsserver/macros.h b/src/libmdsserver/macros.h index f177c1e..9e6bd43 100644 --- a/src/libmdsserver/macros.h +++ b/src/libmdsserver/macros.h @@ -79,7 +79,7 @@ # define AF_FILE AF_LOCAL #endif -/* Ensure that all aliases for PF_UNIX are defined */ +x/* Ensure that all aliases for PF_UNIX are defined */ #if !defined(PF_LOCAL) && !defined(PF_UNIX) && defined(PF_FILE) # define PF_LOCAL PF_FILE # define PF_UNIX PF_FILE @@ -735,7 +735,6 @@ */ #define STREND(str) \ (strchr(str, '\0')) -/* TODO Document STREND in the texinfo manual. */ /** -- cgit v1.2.3-70-g09d2