Replace use of _inline and __inline with inline

AC_C_INLINE in configure.in defines inline as a macro where necessary.
This commit is contained in:
Kevin Easton
2017-11-27 22:54:00 +11:00
parent a60937a8fd
commit 256b33747c
5 changed files with 39 additions and 40 deletions

View File

@@ -13,7 +13,7 @@
*/
#ifdef _cs_alist_hash_
static __inline u_32int_t cs_alist_hash (const char *s, u_32int_t *mask)
static inline u_32int_t cs_alist_hash (const char *s, u_32int_t *mask)
{
u_32int_t x;
@@ -43,7 +43,7 @@ static __inline u_32int_t cs_alist_hash (const char *s, u_32int_t *mask)
#endif
#ifdef _ci_alist_hash_
static __inline u_32int_t ci_alist_hash (const char *s, u_32int_t *mask)
static inline u_32int_t ci_alist_hash (const char *s, u_32int_t *mask)
{
u_32int_t x;

View File

@@ -96,10 +96,8 @@
* First try to figure out if we can use GNU CC special features...
*/
#ifndef __GNUC__
# define __inline /* delete gcc keyword */
# define _printf_(x)
# define _noreturn_
# define __inline__
#else
# if (__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7))
# define _printf_(x) __attribute__ ((format (printf, x, x + 1)))
@@ -107,7 +105,6 @@
# else
# define _printf_(x)
# define _noreturn_
# define __inline
# endif
#endif

View File

@@ -62,8 +62,8 @@ void avio_refresh_screen(void);
#ifdef TRANSLATE
#include "translat.h"
__inline__
static int putchar_x (int c) {
static inline int putchar_x (int c)
{
#ifdef GUI
#if 1
return gui_putc((int) (translation ? transToClient[c] : c));
@@ -79,8 +79,8 @@ static int putchar_x (int c) {
#endif
}
#else
__inline__
static int putchar_x (int c) {
static inline int putchar_x (int c)
{
#ifdef GUI
return gui_putc((int) c);
#else
@@ -89,8 +89,10 @@ static int putchar_x (int c) {
}
#endif
__inline__
static void term_flush (void) { fflush(current_ftarget); }
static inline void term_flush (void)
{
fflush(current_ftarget);
}
#define TERM_SGR_BOLD_ON 1
#define TERM_SGR_BOLD_OFF 2