[PVFS2-CVS] commit by slang in pvfs2/src/common/statecomp: codegen.c

CVS commit program cvs at parl.clemson.edu
Fri Nov 4 02:14:15 EST 2005


Update of /projects/cvsroot/pvfs2/src/common/statecomp
In directory parlweb:/tmp/cvs-serv6522/src/common/statecomp

Modified Files:
      Tag: slang-sio-branch
	codegen.c 
Log Message:
small I/O changes in sio branch for now


Index: codegen.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/statecomp/codegen.c,v
diff -p -u -r1.18 -r1.18.2.1
--- codegen.c	29 Sep 2005 22:59:26 -0000	1.18
+++ codegen.c	4 Nov 2005 07:14:15 -0000	1.18.2.1
@@ -17,6 +17,7 @@
 
 extern FILE *out_file;
 extern int terminate_path_flag;
+static char * current_machine;
 
 void gen_init(void);
 void gen_state_decl(char *state_name);
@@ -40,6 +41,7 @@ void gen_state_decl(char *state_name)
 void gen_machine(char *machine_name,
 		 char *first_state_name)
 {
+    current_machine = machine_name;
     fprintf(out_file, "\nstruct PINT_state_machine_s %s =\n{\n\t", machine_name);
     fprintf(out_file, "ST_%s,\n\t\"%s\"\n", first_state_name, machine_name);
     fprintf(out_file, "};\n");
@@ -47,7 +49,11 @@ void gen_machine(char *machine_name,
 
 void gen_state_start(char *state_name)
 {
-    fprintf(out_file,"static union PINT_state_array_values ST_%s[] = {\n", state_name);
+    fprintf(out_file,
+            "static union PINT_state_array_values ST_%s[] = {\n"
+            "(union PINT_state_array_values) \"%s\",\n"
+            "(union PINT_state_array_values) &%s,\n", 
+            state_name, state_name, current_machine);
 }
 
 /** generates first two lines in the state machine (I think),



More information about the PVFS2-CVS mailing list