mirror of
https://git.savannah.gnu.org/git/gperf.git
synced 2025-12-02 13:09:22 +00:00
Assume the available C compiler supports ANSI C. Remove K&R C cruft.
This commit is contained in:
@@ -54,12 +54,7 @@ with
|
||||
%%
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#define CONST const
|
||||
#else
|
||||
#define CONST
|
||||
#endif
|
||||
static CONST char* testdata[] = {
|
||||
static const char* testdata[] = {
|
||||
"bogus",
|
||||
"abstract",
|
||||
"boolean",
|
||||
@@ -121,9 +116,9 @@ int main ()
|
||||
for (i = 0; i < sizeof(testdata)/sizeof(testdata[0]); i++)
|
||||
{
|
||||
#ifdef CPLUSPLUS_TEST
|
||||
CONST char * resword = Perfect_Hash::in_word_set(testdata[i],strlen(testdata[i]));
|
||||
const char * resword = Perfect_Hash::in_word_set(testdata[i],strlen(testdata[i]));
|
||||
#else
|
||||
CONST char * resword = in_word_set(testdata[i],strlen(testdata[i]));
|
||||
const char * resword = in_word_set(testdata[i],strlen(testdata[i]));
|
||||
#endif
|
||||
if (i > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user