[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] patch:XaAES:comp_fix



This patch should enable compilation of freemint-HEAD and the so-called
"helmut-enhancements"-branch of XaAES.

  name="comp_fix.patch"
  Content-Transfer-Encoding: 7bit
  Content-Disposition: inline;
  filename="comp_fix.patch"

diff -u orig/info.c ./info.c
--- orig/info.c	2010-01-08 17:06:52.859375000 +0100
+++ ./info.c	2009-11-03 19:01:39.703125000 +0100
@@ -0,0 +1,79 @@
+/*
+ * Init certain things in the info_tab used by appl_getinfo()
+ *
+ * In non-release-version build status-string
+ *
+ * file is updated on every build
+ *
+ */
+
+#include "xa_global.h"
+#include "info.h"
+#include "version.h"
+#include "xversion.h"
+
+extern short info_tab[][4];	/* xa_appl.c */
+
+#if !XAAES_RELEASE
+static char *mcs(char *d, char *s)
+{
+	while ((*d++ = *s++))
+		;
+
+	return d - 1;
+}
+#endif
+
+void
+init_apgi_infotab(void)
+{
+#if !XAAES_RELEASE
+	char *s = info_string;
+	
+
+	/*
+	 * Build status string
+	 */
+
+#if 0
+	s = mcs(s, version);
+	*s++ = 0x7c;
+	
+
+	if (DEV_STATUS & AES_FDEVSTATUS_STABLE)
+		s = mcs(s, "Stable ");
+	else
+		s = mcs(s, "");
+		
+	s = mcs(s, ASCII_DEV_STATUS);
+	*s++ = 0x7c;
+	s = mcs(s, ASCII_ARCH_TARGET);
+	*s++ = 0x7c;
+#endif
+
+	s = mcs(s, BDATETIME);
+	/*
+	s = mcs(s, BDATE);*s++ = 0x20;
+	s = mcs(s, BTIME);
+	*/
+	*s++ = 0x7c;
+	s = mcs(s, BCOMPILER);
+#if 0
+	s = mcs(s, BC_MAJ);
+	s = mcs(s, ".");
+	s = mcs(s, BC_MIN);
+#endif
+	*s++ = 0;
+
+	DIAGS(("Build status-string '%s'", info_string));
+#endif
+	info_tab[0][0] = screen.standard_font_height;
+ 	info_tab[0][1] = screen.standard_font_id;
+	info_tab[1][0] = screen.small_font_height;
+	info_tab[1][1] = screen.small_font_id;
+	
+	info_tab[2][0] = xbios_getrez();
+	info_tab[2][1] = 256;
+	info_tab[2][2] = 1;
+	info_tab[2][3] = 1; // + 2;
+}
diff -u orig/info.h ./info.h
--- orig/info.h	2010-01-08 17:06:52.859375000 +0100
+++ ./info.h	2009-08-06 11:23:28.453125000 +0200
@@ -0,0 +1,2 @@
+void init_apgi_infotab(void);
+
diff -u orig/init.c ./init.c
--- orig/init.c	2010-01-04 23:31:11.000000000 +0100
+++ ./init.c	2010-01-08 17:02:56.953125000 +0100
@@ -548,10 +548,10 @@
 	strcpy(C.Aes->proc_name,"AESSYS  ");
 
 	/* Where were we started? */
-#if MiNT_ENH
-	strcpy(C.Aes->home_path, self->path);
-#else
+#if OZK_ENH /* or was it MINT_ENH? */
 	strcpy(C.Aes->home_path, self->fpath);
+#else
+	strcpy(C.Aes->home_path, self->path);
 #endif
 // 	strcat(C.Aes->home_path, "/");
 #if 0