X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=gnu%2Fmbuiter.h;h=acdec297a102619beea64b9c094b9398eb4dbadd;hb=d30babc23b4f25be970ada2e63a50220a3672281;hp=a81e6ade03c5744a8fca73d5e51c01b0f436f520;hpb=22f1eb8bc17e5be72dd23d42d6aaa60196ac22e6;p=debian%2Ftar diff --git a/gnu/mbuiter.h b/gnu/mbuiter.h index a81e6ade..acdec297 100644 --- a/gnu/mbuiter.h +++ b/gnu/mbuiter.h @@ -1,7 +1,5 @@ -/* -*- buffer-read-only: t -*- vi: set ro: */ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Iterating through multibyte strings: macros for multi-byte encodings. - Copyright (C) 2001, 2005, 2007, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2001, 2005, 2007, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -57,9 +55,9 @@ initializes the iterator, starting at startptr. mbui_avail (iter) - returns true if there are more multibyte chracters available before + returns true if there are more multibyte characters available before the end of string is reached. In this case, mbui_cur (iter) is - initialized to the next multibyte chracter. + initialized to the next multibyte character. mbui_advance (iter) advances the iterator by one multibyte character. @@ -108,6 +106,14 @@ #include "mbchar.h" #include "strnlen1.h" +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif +_GL_INLINE_HEADER_BEGIN +#ifndef MBUITER_INLINE +# define MBUITER_INLINE _GL_INLINE +#endif + struct mbuiter_multi { bool in_shift; /* true if next byte may not be interpreted as ASCII */ @@ -122,7 +128,7 @@ struct mbuiter_multi */ }; -static inline void +MBUITER_INLINE void mbuiter_multi_next (struct mbuiter_multi *iter) { if (iter->next_done) @@ -183,13 +189,13 @@ mbuiter_multi_next (struct mbuiter_multi *iter) iter->next_done = true; } -static inline void +MBUITER_INLINE void mbuiter_multi_reloc (struct mbuiter_multi *iter, ptrdiff_t ptrdiff) { iter->cur.ptr += ptrdiff; } -static inline void +MBUITER_INLINE void mbuiter_multi_copy (struct mbuiter_multi *new_iter, const struct mbuiter_multi *old_iter) { if ((new_iter->in_shift = old_iter->in_shift)) @@ -221,4 +227,6 @@ typedef struct mbuiter_multi mbui_iterator_t; /* Copying an iterator. */ #define mbui_copy mbuiter_multi_copy +_GL_INLINE_HEADER_END + #endif /* _MBUITER_H */