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

[gdiscuss] Patches



Here are the patches for the Solaris port and bugfix

--- Makefile.orig	Wed Apr 11 21:45:18 2001
+++ Makefile	Wed Apr 18 11:05:26 2001
@@ -1,11 +1,12 @@
 # gdis Makefile
 
-CC = gcc
-CFLAGS = -g -O6 -Wall -mpentiumpro   # edit to suit your machine
-LIBS = `gtk-config --libs`           # edit (if you're unlucky)
+CC = cc
+CFLAGS = -DG_HAVE_INLINE -Dinline= -fast   # edit to suit your machine
+LDFLAGS= -fast -L$(HOME)/lib.solaris -lscandir
+LIBS = `gtk-config --libs`   -L$(HOME)/lib.solaris -lscandir        # edit (if you're unlucky)
 #LIBS = `gtk-config --libs` -lefence
 INCS = `gtk-config --cflags`         # and again 
-INSTALL = /home/sean/bin
+INSTALL = /home/users/keith/bin.solaris
 
 SRC = main.c model.c coords.c matrix.c parse.c draw.c interface.c help.c \
 	render.c mdi.c animate.c create.c minimize.c edit.c file.c \
--- file.c.orig	Thu Apr 12 08:21:09 2001
+++ file.c	Wed Apr 18 11:07:11 2001
@@ -30,7 +30,12 @@
 #include <unistd.h>
 #include <sys/stat.h>
 #include <sys/types.h>
+#ifdef __sun
+#include <sys/dirent.h>
+#include <strings.h>
+#else
 #include <sys/dir.h>
+#endif
 #include <sys/param.h>
 
 #include "gdis.h"
@@ -1900,7 +1905,11 @@
 {
 int i,n,type;
 gchar *name[1], full[FILELEN];
+#ifdef __sun
+struct dirent **files;
+#else
 struct direct **files;
+#endif
 struct stat buff;
 char *ext;
 
@@ -1939,6 +1948,8 @@
     if (g_strncasecmp(ext, ".cor", 4) == 0)
       type = BIOSYM;
     if (g_strncasecmp(ext, ".gin", 4) == 0)
+      type = GULP;
+    if (g_strncasecmp(ext, ".res", 4) == 0)
       type = GULP;
     if (g_strncasecmp(ext, ".gmf", 4) == 0)
       type = MORPH;
--- parse.c.orig	Sun Apr  8 14:29:36 2001
+++ parse.c	Wed Apr 18 11:08:47 2001
@@ -27,11 +27,13 @@
 #include <ctype.h>
 #include <time.h>
 #include <unistd.h>
-#include <sys/dir.h>
 #include <sys/param.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <sys/wait.h>
+#ifdef __sun
+#include <strings.h>
+#endif
 
 #include "gdis.h"
 
@@ -106,7 +108,7 @@
 key = g_strdup(tmp+1);
 
 /* do the file extension matching */
-if (g_strncasecmp(key,"gin",3) == 0)
+if (g_strncasecmp(key,"gin",3) == 0 ||g_strncasecmp(key,"res",3) == 0)
   id = GULP;
 else if (g_strncasecmp("mvn-r",key,4) == 0)
   id = MARVIN;
--- space.c.orig	Thu Apr 12 08:21:16 2001
+++ space.c	Wed Apr 18 11:05:26 2001
@@ -932,7 +932,7 @@
 {
 int i, j, k, l, m, rows, cols, need_sign, id;
 float *mat, value;
-gchar info[ITEMLEN], item[3];
+gchar info[ITEMLEN], item[4];
 GtkWidget *vbox, *hbox, *vbox1, *vbox2, *table, *frame, *button, *label;
 GtkAdjustment *adj;
 struct dialog_pak *sgid;

-- 
Dr Keith Refson,        "Paradigm is a word too often used by those who would
Dept of Earth Sciences      like to have a new idea but cannot think of one." 
Parks Road,                  -- Mervyn King, Deputy Governor, Bank of England
Oxford OX1 3PR, UK        
Keith.Refson@                       Tel: 01865 272026
             earth.ox.ac.uk         Fax: 01865 272072