]> granicus.if.org Git - gc/commitdiff
Remove non-STDC code and comments.
authorIvan Maidanski <ivmai@mail.ru>
Tue, 13 Sep 2011 07:50:42 +0000 (11:50 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 13 Sep 2011 07:50:42 +0000 (11:50 +0400)
* cord/cordbscs.c (CORD_substr): Remove code for non-STDC compilers.
* include/private/gc_priv.h (clock): Likewise.
* cord/de.c (beep): Replace the K&R-style function definition with
the ANSI C one.
* include/new_gc_alloc.h: Remove comment about expecting STDC
compiler.

cord/cordbscs.c
cord/de.c
include/new_gc_alloc.h
include/private/gc_priv.h

index 84a9c6d5a50e461a63df094875e5390aa6151b7e..eace2e9cdf58007f441ee4e6270e8817cbde8e92 100644 (file)
@@ -449,11 +449,6 @@ CORD CORD_substr(CORD x, size_t i, size_t n)
         /* n < 0 is impossible in a correct C implementation, but       */
         /* quite possible  under SunOS 4.X.                             */
     if (i + n > len) n = len - i;
-#   ifndef __STDC__
-      if (i < 0) ABORT("CORD_substr: second arg. negative");
-        /* Possible only if both client and C implementation are buggy. */
-        /* But empirically this happens frequently.                     */
-#   endif
     return(CORD_substr_checked(x, i, n));
 }
 
index 0905dcceeb3a432c02c49fdbdc621bc07132c258..fd34488981a4543e33eda02f92150e48f32d1652 100644 (file)
--- a/cord/de.c
+++ b/cord/de.c
@@ -348,22 +348,18 @@ void fix_pos()
 #if defined(WIN32)
 #  define beep() Beep(1000 /* Hz */, 300 /* msecs */)
 #elif defined(MACINTOSH)
-#       define beep() SysBeep(1)
+#  define beep() SysBeep(1)
 #else
 /*
  * beep() is part of some curses packages and not others.
  * We try to match the type of the builtin one, if any.
  */
-#ifdef __STDC__
-    int beep(void)
-#else
-    int beep()
-#endif
-{
+  int beep(void)
+  {
     putc('\007', stderr);
     return(0);
-}
-#endif
+  }
+#endif /* !WIN32 && !MACINTOSH */
 
 #   define NO_PREFIX -1
 #   define BARE_PREFIX -2
index 4612aeb6ab0e72e564826747989e70b45cedfa40..bf09780ebd686135a3896a7d335fa84fc34bf6b2 100644 (file)
@@ -43,9 +43,6 @@
 // problems.  The argument for changing it is that the usual default
 // allocator is usually a very bad choice for a garbage collected environment.)
 //
-// This code assumes that the collector itself has been compiled with a
-// compiler that defines __STDC__ .
-//
 
 #ifndef GC_ALLOC_H
 
index 4b69a9f1243db2f378b84f2ddffeb96181c848e5..fc855c76d541a9502579e096c00409f9a26cee4a 100644 (file)
@@ -332,9 +332,6 @@ typedef char * ptr_t;   /* A generic pointer to which we can add        */
 # define MS_TIME_DIFF(a,b) ((long)((a)-(b)))
 #else /* !MSWIN32, !MSWINCE, !BSD_TIME */
 # include <time.h>
-# if !defined(__STDC__) && defined(SPARC) && defined(SUNOS4)
-    clock_t clock(void);        /* Not in time.h, where it belongs      */
-# endif
 # if defined(FREEBSD) && !defined(CLOCKS_PER_SEC)
 #   include <machine/limits.h>
 #   define CLOCKS_PER_SEC CLK_TCK