--- rasmol-2.7.5.orig/doc/rasmol.1
+++ rasmol-2.7.5/doc/rasmol.1
@@ -1,4 +1,3 @@
-.PU
 .TH RASMOL 1 "July 2009"
 .SH NAME
 rasmol \- Molecular Graphics Visualisation Tool v2.7.5
@@ -4115,9 +4114,10 @@
 
 .TP
 .B Booleans
-A boolean parameter is a truth value. Valid boolean values are 'true' and
-'false', and their synonyms 'on' and 'off'. Boolean parameters are commonly
-used by RasMol to either enable or disable a representation or option.
+A boolean parameter is a truth value. Valid boolean values are 'true'
+and 'false', and their synonyms 'on' and 'off'. Boolean parameters are
+commonly used by RasMol to either enable or disable a representation or
+option.
 
 .SH FILE FORMATS
 
--- rasmol-2.7.5.orig/src/command.c
+++ rasmol-2.7.5/src/command.c
@@ -669,11 +669,11 @@
         
         if( done == 0x9d )
         {   /* Should #include <signal.h> and trap "" SIGPIPE */
-            sprintf(buffer,"trap \"\" 13; uncompress -c %s 2> /dev/null\n",
+            sprintf(buffer,"trap \"\" 13; uncompress -c '%s' 2> /dev/null\n",
                     DataFileName);
         } else if( done == 0x8b )
         {   /* Should #include <signal.h> and trap "" SIGPIPE */
-            sprintf(buffer,"trap \"\" 13; gzip -cdq %s 2> /dev/null\n",
+            sprintf(buffer,"trap \"\" 13; gzip -cdq '%s' 2> /dev/null\n",
                     DataFileName);
         } else /* bad magic number! */
         {   InvalidateCmndLine();
--- rasmol-2.7.5.orig/src/Imakefile
+++ rasmol-2.7.5/src/Imakefile
@@ -1,8 +1,8 @@
-#define NEARTREE_LOCAL
-#define CQRLIB_LOCAL
-#define CVECTOR_LOCAL
-#define XFORMSLIB_LOCAL
-#define CBFLIB_LOCAL
+# #define NEARTREE_LOCAL
+# #define CQRLIB_LOCAL
+# #define CVECTOR_LOCAL
+# #define XFORMSLIB_LOCAL
+# #define CBFLIB_LOCAL
 ###########################################################################
 #                               RasMol 2.7.5                              #
 #                                                                         #
@@ -124,7 +124,7 @@
   LOCALEDEF =
 #endif
 
-PKGDIR = $(HOME)
+PKGDIR = /usr
 
 #ifndef GTKWIN
 #define X11WIN
@@ -197,7 +197,7 @@
 ifeq ($(strip $(CBFLIB_DIR)),)
 CBFLIB_DIR = $(PKGDIR)
 endif
-CBFLIB_INCLUDE_DIR = $(CBFLIB_DIR)/include/cbflib
+CBFLIB_INCLUDE_DIR = $(CBFLIB_DIR)/include/cbf
 CBFLIB_LDLIB = -L$(CBFLIB_DIR)/lib -lcbf
 CBFLIB_OBJDEP =
 #define NO_CBFLIB_BUILD
@@ -276,7 +276,7 @@
 
 # RasMol's on-line help direcory
 #   e.g. /usr/local/lib/rasmol/rasmol.hlp
-RASMOLDIR = $(USRLIBDIR)/rasmol/
+RASMOLDIR = /usr/share/rasmol/
 
 
 #ifndef USE_XFORMSLIB
@@ -332,23 +332,23 @@
 #
 
 #ifdef HPArchitecture
-CCOPTIONS = -Ae
-CDEBUGFLAGS = +O2 +Onolimit
+#CCOPTIONS = -Ae
+#CDEBUGFLAGS = -O2 # -Onolimit
 
 #ifdef HPUX_PARISC_32
-CCOPTIONS = -Ae +DA2.0 +DS2.0
+#CCOPTIONS = -Ae -DA2.0 -DS2.0
 #endif
 
 #ifdef HPUX_PARISC_64
-CCOPTIONS = -Ae +DA2.0W +DS2.0 -D_LONGLONG
+#CCOPTIONS = -Ae -DA2.0W -DS2.0 -D_LONGLONG
 #endif
 
 #ifdef HPUX_IA64_32
-CCOPTIONS = -Ae +DD32 +DSmckinley
+#CCOPTIONS = -Ae -DD32 -DSmckinley
 #endif
 
 #ifdef HPUX_IA64_64
-CCOPTIONS = -Ae +DD64 +DSmckinley -D_LONGLONG
+#CCOPTIONS = -Ae -DD64 -DSmckinley -D_LONGLONG
 #endif
 #endif
 
--- rasmol-2.7.5.orig/src/rasmol.h
+++ rasmol-2.7.5/src/rasmol.h
@@ -78,6 +78,7 @@
 /* rasmol.h
  */
 
+#include <stdint.h>
 
 /*===========================*/
 /*  User Definable Options!  */
@@ -202,7 +203,7 @@
 
 typedef double Real;
 #ifndef APPLEMAC
-typedef unsigned char Byte;
+typedef uint8_t Byte;
 #endif
 
 #ifdef __STDC__
@@ -211,21 +212,18 @@
 typedef char Char;
 #endif
 
-#ifdef _LONGLONG
-typedef unsigned int Card;
-typedef int Long;
-#else
-typedef unsigned long Card;
+typedef uint32_t Card;
+/* Long has to be defined as long, instead of int32_t because of
+   multiple printf and scanf calls using %ld in the format. */
 typedef long Long;
-#endif
 
 #ifdef EIGHTBIT
-typedef unsigned char Pixel;
+typedef uint8_t Pixel;
 #else
 #ifdef THIRTYTWOBIT
-typedef Long Pixel;
+typedef int32_t Pixel;
 #else
-typedef short Pixel;
+typedef int16_t Pixel;
 #endif
 #endif
 
@@ -249,7 +247,6 @@
 #define ToUpper(x)   (islower((x))?toupper((x)):(x))
 #endif
 
-
 #if !defined(IBMPC) || defined(_WIN32)
 #ifdef APPLEMAC
 #define _fmalloc   NewPtrSys
