~vcs-imports/pmake/main

« back to all changes in this revision

Viewing changes to metachar.h

  • Committer: rillig
  • Date: 2021-06-21 18:54:41 UTC
  • Revision ID: rillig-20210621185441-k6ch7xx1m785aco0
make: replace macro is_shell_metachar with inline function

No functional change.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*      $NetBSD: metachar.h,v 1.16 2021/04/03 11:08:40 rillig Exp $     */
 
1
/*      $NetBSD: metachar.h,v 1.17 2021/06/21 18:54:41 rillig Exp $     */
2
2
 
3
3
/*
4
4
 * Copyright (c) 2015 The NetBSD Foundation, Inc.
33
33
 
34
34
#include "make.h"
35
35
 
36
 
extern unsigned char _metachar[];
 
36
extern const unsigned char _metachar[];
37
37
 
38
 
#define is_shell_metachar(c)    (_metachar[(c) & 0x7f] != 0)
 
38
MAKE_INLINE bool
 
39
is_shell_metachar(char c)
 
40
{
 
41
        return _metachar[c & 0x7f] != 0;
 
42
}
39
43
 
40
44
MAKE_INLINE bool
41
45
needshell(const char *cmd)