nanogui: patch for libc5 compilation and default encoding.


Previous by date: 8 Mar 2001 19:19:19 -0000 Embedded Linux Phone device project..., Mark Oberg
Next by date: 8 Mar 2001 19:19:19 -0000 Re: NanoX/uWin on eCos, wangwei
Previous in thread:
Next in thread:

Subject: patch for libc5 compilation and default encoding.
From: Tomasz Motylewski ####@####.####
Date: 8 Mar 2001 19:19:19 -0000
Message-Id: <Pine.LNX.3.96.1010308201937.8945H-200000@linserv.intern.bfad.de>

I would like to submit two patches which we are using  to compile
nanox under libc5 Linux and to set the default enconding to Latin1 for T1
fonts. 

The patch is against microwindows-0.89pre6b, but applies cleanly to
0.89pre7.

Best regards,
--
Tomasz Motylewski
http://www.bfad.de/     ####@####.####

diff -Nur microwin/src/demos/nxscribble/li_recognizer.c microwindows-0.89pre6b-libc5/src/demos/nxscribble/li_recognizer.c
--- microwin/src/demos/nxscribble/li_recognizer.c	Wed Nov  8 18:33:15 2000
+++ microwindows-0.89pre6b-libc5/src/demos/nxscribble/li_recognizer.c	Mon Mar  5 17:06:09 2001
@@ -2489,7 +2489,7 @@
 
     for (i = LP_FILTER_WIDTH; i >= 0; i--) {
 	float x = 0.04 * (i * i);
-#ifdef ARM_LINUX
+#if defined(ARM_LINUX) || !defined(__GLIBC__)
 	double tmp = 100.0 * exp((double)x);
 #else
 	float tmp = 100.0 * expf(x);
diff -Nur microwin/src/drivers/scr_fb.c microwindows-0.89pre6b-libc5/src/drivers/scr_fb.c
--- microwin/src/drivers/scr_fb.c	Mon Nov 27 16:43:46 2000
+++ microwindows-0.89pre6b-libc5/src/drivers/scr_fb.c	Tue Mar  6 15:16:41 2001
@@ -18,8 +18,11 @@
 #include <stdio.h>
 #include <stdlib.h>
 #ifndef ARCH_LINUX_POWERPPC
+#ifdef __GLIBC__
 #include <sys/io.h>
-/*#include <asm/io.h>*/
+#else
+#include <asm/io.h>
+#endif
 #endif
 #include <sys/ioctl.h>
 #include <sys/mman.h>
diff -Nur microwin/src/drivers/vgaplan4.h microwindows-0.89pre6b-libc5/src/drivers/vgaplan4.h
--- microwin/src/drivers/vgaplan4.h	Tue Aug 22 06:30:47 2000
+++ microwindows-0.89pre6b-libc5/src/drivers/vgaplan4.h	Wed Mar  7 08:55:05 2001
@@ -19,8 +19,12 @@
 #endif
 
 #if LINUX
+#ifdef __GLIBC__
 #include <sys/io.h>		/* for outb def's, requires -O */
-/*#include <asm/io.h>*/		/* for outb def's on 2.3.x*/
+#else
+#include <asm/io.h>		/* for outb def's on 2.3.x*/
+#endif
+#include <unistd.h>
 #define HAVEFARPTR	1
 #define FAR
 #define HAVEIOPERM	1	/* has ioperm() system call*/
diff -Nur microwin/src/engine/devfont.c microwindows-0.89pre6b-libc5/src/engine/devfont.c
--- microwin/src/engine/devfont.c	Sat Dec  2 00:35:24 2000
+++ microwindows-0.89pre6b-libc5/src/engine/devfont.c	Mon Mar  5 17:11:00 2001
@@ -727,6 +727,7 @@
 t1lib_init(PSD psd)
 {
 	static int inited = 0;
+	char **encoding;/* m.r.*/
 
 	if (inited)
 		return 1;
@@ -734,6 +735,13 @@
 	T1_SetBitmapPad(8);
 	if (!T1_InitLib(0))
 		return 0;
+
+	/* m.r. */
+	encoding = T1_LoadEncoding ("IsoLatin1.enc");
+	T1_SetDefaultEncoding (encoding);
+	/* end m.r. */
+
+
 #ifdef T1LIB_USE_AA_HIGH	 
 	T1_AASetLevel(T1_AA_HIGH);
 #else
diff -Nur microwin/src/nanox/client.c microwindows-0.89pre6b-libc5/src/nanox/client.c
--- microwin/src/nanox/client.c	Sat Dec  2 00:35:24 2000
+++ microwindows-0.89pre6b-libc5/src/nanox/client.c	Mon Mar  5 17:00:46 2001
@@ -34,7 +34,7 @@
 #if hpux
 #include <sys/time.h>
 #else
-#include <sys/select.h>
+//#include <sys/select.h>
 #endif
 #endif
 #include <signal.h> 

Previous by date: 8 Mar 2001 19:19:19 -0000 Embedded Linux Phone device project..., Mark Oberg
Next by date: 8 Mar 2001 19:19:19 -0000 Re: NanoX/uWin on eCos, wangwei
Previous in thread:
Next in thread:


Powered by ezmlm-browse 0.20.