summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2006-04-08 04:41:48 +0000
committerKen Raeburn <raeburn@mit.edu>2006-04-08 04:41:48 +0000
commitea9539073b7b1fd23f7b8c8a1317b45bcb4f4599 (patch)
treec5f0f14a5992a5847960634a8a6d72a2d507db5e /src/lib
parentc7e5fcf92cfefd75e4733b9d1f95f6199f526972 (diff)
downloadkrb5-ea9539073b7b1fd23f7b8c8a1317b45bcb4f4599.tar.gz
krb5-ea9539073b7b1fd23f7b8c8a1317b45bcb4f4599.tar.xz
krb5-ea9539073b7b1fd23f7b8c8a1317b45bcb4f4599.zip
* fakeenv.c: Unused file deleted
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17867 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/krb4/ChangeLog4
-rw-r--r--src/lib/krb4/fakeenv.c88
2 files changed, 4 insertions, 88 deletions
diff --git a/src/lib/krb4/ChangeLog b/src/lib/krb4/ChangeLog
index dce72f6559..9c64fa0cb3 100644
--- a/src/lib/krb4/ChangeLog
+++ b/src/lib/krb4/ChangeLog
@@ -1,3 +1,7 @@
+2006-04-08 Ken Raeburn <raeburn@mit.edu>
+
+ * fakeenv.c: Unused file deleted.
+
2006-04-03 Ken Raeburn <raeburn@mit.edu>
* Makefile.in (DEFS): Make empty.
diff --git a/src/lib/krb4/fakeenv.c b/src/lib/krb4/fakeenv.c
deleted file mode 100644
index d4f4d7638f..0000000000
--- a/src/lib/krb4/fakeenv.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * fakeenv.c
- *
- * Originally written by Mark Eichin, Cygnus Support, 1992.
- * Public Domain.
- *
- * setenv --
- * Set the value of the environmental variable "name" to be
- * "value". If rewrite is set, replace any current value.
- */
-
-#include <stdlib.h>
-#include <string.h>
-
-setenv(name, value, rewrite)
- register char *name, *value;
- int rewrite;
-{
- char *combo = malloc(strlen(name)+strlen(value)+2);
- strcpy(combo,name);
- strcat(combo,"=");
- strcat(combo,value);
- putenv(combo);
-}
-
-/*
- * Copyright (c) 1987 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-/*
- * _findenv --
- * Returns pointer to value associated with name, if any, else NULL.
- * Sets offset to be the offset of the name/value combination in the
- * environmental array, for use by setenv(3) and unsetenv(3).
- * Explicitly removes '=' in argument name.
- *
- * This routine *should* be a static; don't use it.
- */
-static char *
-_findenv(name, offset)
- register char *name;
- int *offset;
-{
- extern char **environ;
- register int len;
- register char **P, *C;
-
- for (C = name, len = 0; *C && *C != '='; ++C, ++len);
- for (P = environ; *P; ++P)
- if (!strncmp(*P, name, len))
- if (*(C = *P + len) == '=') {
- *offset = P - environ;
- return(++C);
- }
- return(NULL);
-}
-
-/*
- * unsetenv(name) --
- * Delete environmental variable "name".
- */
-void
-unsetenv(name)
- char *name;
-{
- extern char **environ;
- register char **P;
- int offset;
- char *_findenv();
-
- while (_findenv(name, &offset)) /* if set multiple times */
- for (P = &environ[offset];; ++P)
- if (!(*P = *(P + 1)))
- break;
-}