fixed build for clang

This commit is contained in:
2024-10-04 15:26:19 +03:00
parent 9f15a980af
commit 1140957dce
11 changed files with 10558 additions and 10691 deletions

View File

@@ -65,9 +65,16 @@
#define DOUBLEMARK 316
#define POINTSAT 317
extern char* xmalloc(int size);
extern void Message(char *s, int l);
extern void set_up_momentum(int value,int token);
extern void automata_driver(int value);
extern char* copys(char *);
#line 5 "annotate.y"
#include "macro.h"
#include <stdlib.h>
#include "compatible.h"
#ifdef SYS5
@@ -146,8 +153,8 @@ typedef union {
char AnnExTensionNumber[255]; /* to symbole right for the annotation */
static int Recog_My_Token();
static int look_up_specialfunction();
static unMYGETC();
static MYGETC();
static char unMYGETC(char c);
static char MYGETC();
static int map_assgn_op();
#ifndef YYLTYPE
@@ -623,6 +630,7 @@ while (0)
#define YYERRCODE 256
#ifndef YYPURE
int yylex_annotate();
#define YYLEX yylex_annotate()
#endif
@@ -677,7 +685,7 @@ static int yydebug; /* nonzero means print parse trace */
#ifdef __GNUC__
int yyparse_annotate(void);
#endif
#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
#define __yy_bcopy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT)
#else /* not GNU C or C++ */
@@ -2258,7 +2266,7 @@ char *p;
register char *p2, *p1;
//extern char *malloc();
newbuf = (char*)malloc((unsigned)(newlength+1));
newbuf = (char*)malloc(newlength+1);
#ifdef __SPF
addToCollection(__LINE__, __FILE__,newbuf, 0);
#endif
@@ -2996,8 +3004,7 @@ look_up_annotate(st)
return (PTR_HASH) pt;
}
static
MYGETC()
static char MYGETC()
{
if (LENSTRINGTOPARSE <= PTTOSTRINGTOPARSE)
@@ -3013,9 +3020,7 @@ MYGETC()
return STRINGTOPARSE[ PTTOSTRINGTOPARSE-1];
}
static
unMYGETC(c)
char c;
static char unMYGETC(char c)
{
if (LENSTRINGTOPARSE <= PTTOSTRINGTOPARSE)
return EOF;
@@ -3086,10 +3091,10 @@ look_up_specialfunction(str)
return TRUE;
}
if (strcmp(specialfunction[i],"Dummy") == 0)
return NULL;
return 0;
}
return NULL;
return 0;
}