#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)getenv.c 5.8 (Berkeley) 2/23/91";*/
-static char *rcsid = "$Id: getenv.c,v 1.1.1.1 1995/10/18 08:42:17 deraadt Exp $";
+static char *rcsid = "$Id: getenv.c,v 1.2 1996/03/25 22:16:38 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdlib.h>
#include <string.h>
-/*
- * getenv --
- * Returns ptr to value associated with name, if any, else NULL.
- */
-char *
-getenv(name)
- const char *name;
-{
- int offset;
- char *__findenv();
-
- return(__findenv(name, &offset));
-}
-
/*
* __findenv --
* Returns pointer to value associated with name, if any, else NULL.
*/
char *
__findenv(name, offset)
- register char *name;
+ register const char *name;
int *offset;
{
extern char **environ;
register int len;
register char **P, *C;
+ register const char *cp;
- for (C = name, len = 0; *C && *C != '='; ++C, ++len);
+ for (cp = name, len = 0; *cp != '\0' && *cp != '='; ++cp, ++len);
for (P = environ; *P; ++P)
if (!strncmp(*P, name, len))
if (*(C = *P + len) == '=') {
}
return(NULL);
}
+
+/*
+ * getenv --
+ * Returns ptr to value associated with name, if any, else NULL.
+ */
+char *
+getenv(name)
+ const char *name;
+{
+ int offset;
+ char *__findenv();
+
+ return(__findenv(name, &offset));
+}
#define NULL 0
-static void morecore();
-static int findbucket();
-
/*
* The overhead on a block is at least 4 bytes. When free, this space
* contains a pointer to the next free block, and the bottom two bits must
#define ov_size ovu.ovu_size
};
+static void morecore __P((int));
+static int findbucket __P((union overhead *, int));
+
#define MAGIC 0xef /* magic # on accounting info */
#define RMAGIC 0x5555 /* magic # on range info */
#if defined(LIBC_SCCS) && !defined(lint)
/*static char sccsid[] = "from: @(#)qsort.c 8.1 (Berkeley) 6/4/93";*/
-static char *rcsid = "$Id: qsort.c,v 1.1.1.1 1995/10/18 08:42:18 deraadt Exp $";
+static char *rcsid = "$Id: qsort.c,v 1.2 1996/03/25 22:16:40 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#include <stdlib.h>
-static inline char *med3 __P((char *, char *, char *, int (*)()));
-static inline void swapfunc __P((char *, char *, int, int));
+static __inline char *med3 __P((char *, char *, char *, int (*)()));
+static __inline void swapfunc __P((char *, char *, int, int));
#define min(a, b) (a) < (b) ? a : b
#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \
es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1;
-static inline void
+static __inline void
swapfunc(a, b, n, swaptype)
char *a, *b;
int n, swaptype;
#define vecswap(a, b, n) if ((n) > 0) swapfunc(a, b, n, swaptype)
-static inline char *
+static __inline char *
med3(a, b, c, cmp)
char *a, *b, *c;
int (*cmp)();
#if defined(LIBC_SCCS) && !defined(lint)
/*static char sccsid[] = "from: @(#)radixsort.c 8.1 (Berkeley) 6/4/93";*/
-static char *rcsid = "$Id: radixsort.c,v 1.1.1.1 1995/10/18 08:42:19 deraadt Exp $";
+static char *rcsid = "$Id: radixsort.c,v 1.2 1996/03/25 22:16:39 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
int sn, si;
} stack;
-static inline void simplesort
+static __inline void simplesort
__P((const u_char **, int, int, const u_char *, u_int));
static void r_sort_a __P((const u_char **, int, int, const u_char *, u_int));
static void r_sort_b __P((const u_char **,
}
}
-static inline void
+static __inline void
simplesort(a, n, b, tr, endch) /* insertion sort */
register const u_char **a;
int n, b;