Skip to content

Commit

Permalink
Include inline.h only when HAVE_CTAGS_INLINE_H is defined
Browse files Browse the repository at this point in the history
With this extension, the build script of ctags can insert the
macro definition of READTAGS_INLINE. ctags provides inline.h.

Signed-off-by: Masatake YAMATO <[email protected]>
  • Loading branch information
masatake committed Sep 25, 2024
1 parent 1cce44d commit c83bc89
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions readtags.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
/*
* INCLUDE FILES
*/
#ifdef HAVE_CTAGS_INLINE_H
/* the build script of ctags can insert thee macro
definition for READTAGS_INLINE. */
#include "inline.h"
#else
/* Makefile generated by configure defines inline. */
#define READTAGS_INLINE static inline
#endif

#include <stdlib.h>
#include <string.h>
#include <ctype.h>
Expand Down Expand Up @@ -151,8 +160,8 @@ static int xdigitValue (unsigned char digit)
* Reads the first character from the string, possibly un-escaping it, and
* advances *s to the start of the next character.
*/
inline
static int readTagCharacter (const char **const s)
READTAGS_INLINE
int readTagCharacter (const char **const s)
{
const unsigned char *p = (const unsigned char *) *s;
int c = *p;
Expand Down

0 comments on commit c83bc89

Please sign in to comment.