about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--urt/Makefile2
-rw-r--r--urt/rle.h6
-rw-r--r--urt/rle_addhist.c5
-rw-r--r--urt/rle_config.h25
-rw-r--r--urt/rle_error.c1
-rw-r--r--urt/rle_getskip.c2
-rw-r--r--urt/rle_hdr.c1
-rw-r--r--urt/rle_put.h1
-rw-r--r--urt/rle_row_alc.c2
-rw-r--r--urt/scanargs.c33
10 files changed, 11 insertions, 67 deletions
diff --git a/urt/Makefile b/urt/Makefile
index 57543b0c..b94da1b2 100644
--- a/urt/Makefile
+++ b/urt/Makefile
@@ -24,7 +24,7 @@ librle.a: $(LIBOBJECTS)
 
 # Rule for objects.
 $(LIBOBJECTS): %.o: %.c importinc
-	$(CC) -c -I importinc -o $@ \
+	$(CC) -c $(INCLUDES) -o $@ \
 	  $< $(CPPFLAGS) $(CFLAGS) $(CFLAGS_PERSONAL) $(CADD)
 
 BINARIES =
diff --git a/urt/rle.h b/urt/rle.h
index 71f15d28..0766d22a 100644
--- a/urt/rle.h
+++ b/urt/rle.h
@@ -30,14 +30,8 @@
 #ifndef RLE_H
 #define RLE_H
 
-#include "rle_config.h"     /* Configuration parameters. */
-
 #include <stdio.h>      /* Declare FILE. */
 
-#ifdef c_plusplus
-#define USE_PROTOTYPES
-#endif
-
 enum rle_dispatch {
     NO_DISPATCH = -1,
     RUN_DISPATCH = 0
diff --git a/urt/rle_addhist.c b/urt/rle_addhist.c
index 0df9642d..3ddcbf8c 100644
--- a/urt/rle_addhist.c
+++ b/urt/rle_addhist.c
@@ -30,12 +30,7 @@
 #include <string.h>
 #include <stdio.h>
 
-#ifdef  USE_TIME_H
 #include <time.h>
-#else
-#include <sys/types.h>
-#include <sys/time.h>
-#endif
 
 #include "netpbm/mallocvar.h"
 
diff --git a/urt/rle_config.h b/urt/rle_config.h
index f3fa5bbc..7b44bfdd 100644
--- a/urt/rle_config.h
+++ b/urt/rle_config.h
@@ -1,9 +1,4 @@
-/* rle_config.h
- * 
- * Automatically generated by make-config-h script.
- * DO NOT EDIT THIS FILE.
- * Edit include/makefile.src and the configuration file instead.
- */
+#include "pm_config.h"
 #if defined(WIN32) && !defined(__CYGWIN__)
 #define NO_OPEN_PIPES
 #endif
@@ -26,7 +21,6 @@
 #define NO_MAKE_MAKEFILE NO_MAKE_MAKEFILE
 #define NO_TOOLS NO_TOOLS
 #define USE_TIME_H USE_TIME_H
-#define USE_PROTOTYPES USE_PROTOTYPES
 #define USE_RANDOM USE_RANDOM
 #define USE_STDARG USE_STDARG
 #define USE_STDLIB_H USE_STDLIB_H
@@ -58,37 +52,20 @@ typedef	void *void_star;
 typedef char *void_star;
 #endif
 
-#ifdef USE_STDLIB_H
-#include <stdlib.h>
-#else
-
 /* Some programs include files from other packages that also declare
  * malloc.  Avoid double declaration by #define NO_DECLARE_MALLOC
  * before including this file.
  */
 #ifndef NO_DECLARE_MALLOC
-#ifdef USE_PROTOTYPES
 #   include <sys/types.h>	/* For size_t. */
     extern void_star malloc( size_t );
     extern void_star calloc( size_t, size_t );
     extern void_star realloc( void_star, size_t );
     extern void free( void_star );
-#else
-    extern void_star malloc();
-    extern void_star realloc();
-    extern void_star calloc();
-    extern void free();
-    extern void cfree();
-#endif /* USE_PROTOTYPES */
 #endif /* NO_DECLARE_MALLOC */
 
-#ifdef USE_PROTOTYPES
 extern char *getenv( CONST_DECL char *name );
-#else
-extern char *getenv();
-#endif
 
-#endif /* USE_STDLIB_H */
 
 #ifdef NEED_BSTRING
     /* From bstring.c. */
diff --git a/urt/rle_error.c b/urt/rle_error.c
index acaca1a6..a1d63451 100644
--- a/urt/rle_error.c
+++ b/urt/rle_error.c
@@ -28,6 +28,7 @@
 #include <string.h>
 
 #include "rle.h"
+#include "rle_config.h"
 
 /*****************************************************************
  * TAG( rle_alloc_error )
diff --git a/urt/rle_getskip.c b/urt/rle_getskip.c
index f1c333e7..1366e162 100644
--- a/urt/rle_getskip.c
+++ b/urt/rle_getskip.c
@@ -25,6 +25,8 @@
  * Copyright (c) 1990, University of Michigan
  */
 
+#include <stdlib.h>
+
 #include "rle.h"
 #include "rle_code.h"
 
diff --git a/urt/rle_hdr.c b/urt/rle_hdr.c
index 3cc0401d..3cd13545 100644
--- a/urt/rle_hdr.c
+++ b/urt/rle_hdr.c
@@ -26,6 +26,7 @@
  */
 
 #include "rle.h"
+#include "rle_config.h"
 
 #include <string.h>
 
diff --git a/urt/rle_put.h b/urt/rle_put.h
index d611b438..1f8cc85b 100644
--- a/urt/rle_put.h
+++ b/urt/rle_put.h
@@ -28,6 +28,7 @@
  */
 
 #include "rle.h"
+#include "rle_config.h"
 
 /* ****************************************************************
  * Dispatch table for different output types.
diff --git a/urt/rle_row_alc.c b/urt/rle_row_alc.c
index 0f29523e..982e1c5e 100644
--- a/urt/rle_row_alc.c
+++ b/urt/rle_row_alc.c
@@ -28,7 +28,9 @@
  * Copyright (c) 1986, Spencer W. Thomas
  */
 
+#include <stdlib.h>
 #include <stdio.h>
+
 #include "rle.h"
 
 /*****************************************************************
diff --git a/urt/scanargs.c b/urt/scanargs.c
index e1f15047..7fa495de 100644
--- a/urt/scanargs.c
+++ b/urt/scanargs.c
@@ -41,13 +41,11 @@
  */
 
 #include "rle.h"
+#include "rle_config.h"
+
 #include <stdio.h>
 #include <ctype.h>
-#ifndef USE_STDARG
-#include <varargs.h>
-#else
 #include <stdarg.h>
-#endif
 
 #include "netpbm/pm_c_util.h"
 #include "netpbm/nstring.h"
@@ -68,48 +66,21 @@ typedef int *ptr;
 #define NEW( type, cnt )	(type *) malloc( (cnt) * sizeof( type ) )
 #define RENEW( type, ptr, cnt )	(type *) realloc( ptr, (cnt) * sizeof( type ) )
 
-#if defined(c_plusplus) && !defined(USE_PROTOTYPES)
-#define USE_PROTOTYPES
-#endif
-
-#ifndef USE_PROTOTYPES
-static char * prformat();
-static int isnum();
-static int	_do_scanargs();
-void		scan_usage();
-#else
 static CONST_DECL char * prformat( CONST_DECL char *, int );
 static int isnum( CONST_DECL char *, int, int );
 static int	_do_scanargs( int argc, char **argv, CONST_DECL char *format,
 			      va_list argl );
 void		scan_usage( char **, CONST_DECL char * );
-#endif
 
 /* 
  * Argument list is (argc, argv, format, ... )
  */
 int
-#ifndef USE_STDARG
-scanargs ( va_alist )
-va_dcl
-#else
 scanargs ( int argc, char **argv, CONST_DECL char *format, ... )
-#endif /* !USE_STDARG */
 {
     va_list argl;
     int retval;
-#ifndef USE_STDARG
-    int argc;
-    char ** argv;
-    CONST_DECL char *format;
-
-    va_start( argl );
-    argc = va_arg( argl, int );
-    argv = va_arg( argl, char ** );
-    format = va_arg( argl, CONST_DECL char * );
-#else
     va_start( argl, format );
-#endif
     retval = _do_scanargs( argc, argv, format, argl );
     va_end( argl );
     return retval;