diff CbC-examples/stack1.c @ 150:26042f4007d5 current

fix examples
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 23 May 2020 07:51:47 +0900
parents 420680fc7707
children
line wrap: on
line diff
--- a/CbC-examples/stack1.c	Sat Mar 21 09:14:44 2020 +0900
+++ b/CbC-examples/stack1.c	Sat May 23 07:51:47 2020 +0900
@@ -3,7 +3,9 @@
  */
 
 #include <stdio.h>
-#define NULL 0
+#include <stdlib.h>
+
+// #define NULL 0
 extern int printf(const char*, ...);
 
 extern void *malloc(size_t);
@@ -30,7 +32,7 @@
     goto (* ((struct cont_save *)sp)->ret)(i+4,sp);
 }
 
-__code __attribute__ ((fastcall)) f_g1(int j,void *sp) {  /* Continuation  */
+__code f_g1(int j,void *sp) {  /* Continuation  */
     int k;
     struct f_g0_save *c;
 
@@ -98,6 +100,8 @@
 	goto print(i,j,exit2,exit2env);
 }
 
+int main0( int ac, char *av[]);
+
 int main(int ac, char*av[]){
 	main0(ac,av);
 }