I would love to be able to edit my own bad stuff.

The diff was in the wrong direction. Here is the corrected diff:

<verbatim>

--- Wed Jan 22 20:53:52 2020
+++ Mon May 11 07:31:09 2020
@@ -70,7 +70,7 @@

 		append ret

-		if {($idx % 20) == 0 && $idx != 0} {
+		if {(($idx+1) % 20) == 0} {
 			append ret
 		}
 	}
@@ -82,6 +82,24 @@
 	return $ret
 }

+# Convert data to a character array
+proc character_array {data} {
+	set ret
+	for {set idx 0} {$idx < [string length $data]} {incr idx} {
+		binary scan [string index $data $idx] H* char
+		append ret "0x${char}, "
+
+		if {(($idx+1) % 16) == 0 } {
+			append ret
+		}
+	}
+	set ret [string trimright $ret "\n, \t"]
+
+	append ret
+
+	return $ret
+}
+
 # Encrypt the data
 proc random_byte {} {
 	set value [expr {int(256 * rand())}]
@@ -307,16 +325,9 @@
 #  endif /* !LOADED_CVFS_COMMON */}
 puts ""

-puts "static struct cvfs_data = {"
-puts "\t{"
-puts Index 0 cannot be used because we use the value 0 to represent failure */"
-puts = NULL,"
-puts = 0,"
-puts = 0,"
-puts = 0,"
-puts = NULL,"
-puts = 0,"
-puts "\t},"
+# C struct data output buffer (must be delayed after definition of file data)
+set struct_data ""
+
 for {set idx 1} {$idx < [llength $files]} {incr idx} {
 	set file [lindex $files $idx]
 	set shortfile [shorten_file $startdir $file]
@@ -330,15 +341,28 @@

 			set fd [open $file]
 			fconfigure $fd -translation binary
-			set data [read $fd]
+			set data_in [read $fd]
 			close $fd

 			if {$obsfucate} {
 				set type "CVFS_FILETYPE_ENCRYPTED_FILE"
-				set data "(unsigned char *) [stringify [encrypt $data $obsfucation_key]]"
+				set data_in [encrypt $data_in $obsfucation_key]
 			} else {
 				set type "CVFS_FILETYPE_FILE"
-				set data "(unsigned char *) [stringify $data]"
+			}
+			# Microsoft VC9 compiler has a string limit of 65535 bytes
+			# so put all larger files into an array which has a higher
+			# string limit
+			# For instance, the extra variable is used for all files.
+			# this may be deactivated by removing "0 &" below
+			if { 0 & $size <= 65535} {
+				set data "(unsigned char *) [stringify $data_in]"
+			} else {
+				puts "/* Data of $shortfile */"
+				set variable_name cvfs_data_$idx
+				set data $variable_name
+				puts "static unsigned char =\
+						[character_array $data_in];"
 			}
 		}
 		"directory" {
@@ -348,15 +372,27 @@
 		}
 	}

-	puts "\t{"
-	puts =
-	puts = $idx,"
-	puts = $type,"
-	puts = $size,"
-	puts = $data,"
-	puts = 0,"
-	puts "\t},"
+	append struct_data
+			name  */
+			index */
+			size  */
+			type  */
+			data  */
+			free  */
+
 }
+puts ""
+puts "static struct cvfs_data = {"
+puts "\t{"
+puts Index 0 cannot be used because we use the value 0 to represent failure */"
+puts name  */ NULL,"
+puts index */ 0,"
+puts type  */ 0,"
+puts size  */ 0,"
+puts data  */ NULL,"
+puts free  */ 0,"
+puts "\t},"
+puts -nonewline $struct_data
 puts "};"
 puts ""

</verbatim>