Plan 9 from Bell Labs’s /usr/web/sources/patch/maybe/spin-625/readme

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


Update Gerard Holzmann's Spin from version 6.1.0 (4 May 2011) to 6.2.5 (4 May 2013).

The manual was not updated between these two versions.

For information, here are the differences between the original version
from Gerard Holzmann and this Plan 9 version of Spin.

--- /sys/src/cmd/spin/main.c
+++ /sys/src/cmd/spin/main.c
@@ -554,7 +554,7 @@
 
 void
 non_fatal(char *s1, char *s2)
-{	extern int yychar; extern char yytext[];
+{	extern char yytext[];
 
 	printf("spin: %s:%d, Error: ",
 		Fname?Fname->name:(oFname?oFname->name:"nofilename"), lineno);
@@ -566,11 +566,6 @@
 	else
 		printf(s1);
 #endif
-	if (yychar > 0)
-	{	printf("	saw '");
-		explain(yychar);
-		printf("'");
-	}
 	if (strlen(yytext)>1)
 		printf(" near '%s'", yytext);
 	printf("\n");
--- /sys/src/cmd/spin/pangen1.c
+++ /sys/src/cmd/spin/pangen1.c
@@ -16,11 +16,6 @@
 #include "pangen3.h"
 #include "pangen6.h"
 #include <assert.h>
-#ifdef SOLARIS
-#include <sys/int_limits.h>
-#else
-#include <stdint.h>
-#endif
 
 extern FILE	*tc, *th, *tt;
 extern Label	*labtab;
@@ -155,9 +150,9 @@
 			i);
 		fprintf(th, "	unsigned _n   : %d; /* active-claim index */\n",
 			blog(nclaims));
-		if (i <= UINT8_MAX)	/* in stdint.h = UCHAR_MAX from limits.h */
+		if (i <= 255)	/* in stdint.h = UCHAR_MAX from limits.h */
 		{	fprintf(th, "	uchar c_cur[NCLAIMS]; /* claim-states */\n");
-		} else if (i <= UINT16_MAX)	/* really USHRT_MAX from limits.h */
+		} else if (i <= 65535)	/* really USHRT_MAX from limits.h */
 		{	fprintf(th, "	ushort c_cur[NCLAIMS]; /* claim-states */\n");
 		} else	/* the most unlikely case */
 		{	fprintf(th, "	uint c_cur[NCLAIMS]; /* claim-states */\n");
--- /sys/src/cmd/spin/spin.h
+++ /sys/src/cmd/spin/spin.h
@@ -15,9 +15,6 @@
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>
-#ifndef PC
-#include <memory.h>
-#endif
 
 enum	    { INIV, PUTV, LOGV };	/* for pangen[14].c */
 enum btypes { NONE, N_CLAIM, I_PROC, A_PROC, P_PROC, E_TRACE, N_TRACE };

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.