File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2306,6 +2306,7 @@ int cogen_rt_funnel(struct instr_def *instr)
23062306 coutf("#endif // FUNNEL");
23072307 coutf("");
23082308 printf("\n-----------------------------------------------------------\n");
2309+ return(warnings);
23092310} /* cogen_rt_funnel */
23102311
23112312/*******************************************************************************
@@ -2494,7 +2495,7 @@ cogen_header(struct instr_def *instr, char *output_name)
24942495 cliter2 = list_iterate(ctypes);
24952496 char *cvar;
24962497 char *ctpe;
2497- while(cvar = list_next(cliter)) {
2498+ while(( cvar = list_next(cliter) )) {
24982499 ctpe = list_next(cliter2);
24992500 char *Numberedvar = malloc(256*sizeof(char));
25002501 /* We need to attach comp index to cvar */
@@ -3115,7 +3116,7 @@ void detect_skipable_transforms(struct instr_def *instr) {
31153116 // Its target can not be skipped either
31163117 struct jump_struct *this_jump;
31173118 List_handle literJ = list_iterate(comp->jump);
3118- while (this_jump = list_next(literJ)) {
3119+ while (( this_jump = list_next(literJ) )) {
31193120
31203121 // Find target (not initialized yet)
31213122 List_handle liter3 = list_iterate(instr->complist);
Original file line number Diff line number Diff line change 2626#include < math.h>
2727#include < string.h>
2828#include < stdio.h>
29+ int yylex (void *yylval);
2930
3031#include " mccode.h"
3132
6768/* typedef struct List_header * List; */
6869/* typedef struct Symbol_table * Symtab; */
6970/* typedef struct instr_def * instr_ptr_t; */
70- int yylex ();
71+ int yylex (void *yylval );
7172int yyerror (const char *s);
7273List list_cat (List, List);
7374Symtab symtab_cat (Symtab, Symtab);
Original file line number Diff line number Diff line change @@ -43,8 +43,9 @@ struct List_position
4343 int index ; /* Next element to return. */
4444 };
4545
46- typedef struct List_header * List ;
47- typedef struct List_position * List_handle ;
46+ /* Typedefs suppressed, already defined from mccode.h */
47+ /* typedef struct List_header *List;
48+ typedef struct List_position *List_handle; */
4849
4950/*******************************************************************************
5051* Create a new list.
@@ -233,4 +234,5 @@ List list_copy(List from, void * (*copier)(void *)){
233234 list_iterate_end (liter );
234235 }
235236 return to ;
236- }
237+ }
238+
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ int strcasecmp(char *s1, char *s2)
3939#ifndef HAVE_FDOPEN
4040FILE * fdopen (int descr , const char * mode )
4141{
42- fatal_error ( "The '-' argument for standard input and output is not supported"
42+ fprintf ( stderr , "The '-' argument for standard input and output is not supported"
4343 " on this system." );
4444 return (NULL );
4545}
Original file line number Diff line number Diff line change 2020*
2121*******************************************************************************/
2222
23- /* Macintosh specific compiler defines. */
23+ /* !!OLD!! Macintosh specific compiler defines. */
2424#ifdef __dest_os
2525#if (__dest_os == __mac_os )
2626#define MAC
2727#endif
2828#endif
2929
30+ /* Modern macOS defines */
31+ #ifdef __MACH__
32+ #ifndef HAVE_STRCASECMP
33+ #define HAVE_STRCASECMP HAVE_STRCASECMP
34+ #endif
35+ #ifndef HAVE_STRCASESTR
36+ #define HAVE_STRCASESTR HAVE_STRCASESTR
37+ #endif
38+ #endif
39+
3040/* File system details. */
3141#ifndef MC_PATHSEP_C
3242#ifdef WIN32
Original file line number Diff line number Diff line change @@ -402,7 +402,7 @@ int cogen_decls(struct instr_def *instr)
402402 while ((one_component_metadata = symtab_next(component_metadata_handle))) {
403403 coutf(" '%s': {", one_component_metadata->name);
404404 liter = list_iterate(one_component_metadata->val);
405- while (metadataStruct = list_next(liter)) {
405+ while (( metadataStruct = list_next(liter) )) {
406406 coutf(" '%s': ('%s', ", metadataStruct->name, metadataStruct->type);
407407 triple_escaped_lines_out(metadataStruct->lines);
408408 coutf(" ), ");
@@ -924,7 +924,7 @@ void detect_skipable_transforms(struct instr_def *instr) {
924924 // Its target can not be skipped either
925925 struct jump_struct *this_jump;
926926 List_handle literJ = list_iterate(comp->jump);
927- while (this_jump = list_next(literJ)) {
927+ while (( this_jump = list_next(literJ) )) {
928928
929929 // Find target (not initialized yet)
930930 List_handle liter3 = list_iterate(instr->complist);
You can’t perform that action at this time.
0 commit comments