OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [newlib/] [newlib/] [libc/] [stdlib/] [setenv.c] - Blame information for rev 56

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 39 lampret
/* This file may have been modified by DJ Delorie (Jan 1991).  If so,
2
** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave,
3
** Rochester NH, 03867-2954, USA.
4
*/
5
 
6
/*
7
 * Copyright (c) 1987 Regents of the University of California.
8
 * All rights reserved.
9
 *
10
 * Redistribution and use in source and binary forms are permitted
11
 * provided that: (1) source distributions retain this entire copyright
12
 * notice and comment, and (2) distributions including binaries display
13
 * the following acknowledgement:  ``This product includes software
14
 * developed by the University of California, Berkeley and its contributors''
15
 * in the documentation or other materials provided with the distribution
16
 * and in all advertising materials mentioning features or use of this
17
 * software. Neither the name of the University nor the names of its
18
 * contributors may be used to endorse or promote products derived
19
 * from this software without specific prior written permission.
20
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
21
 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
22
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
23
 */
24
 
25
#include <stddef.h>
26
#include <stdlib.h>
27
#include <string.h>
28
 
29 56 joel
extern void unsetenv_r _PARAMS ((struct _reent *, const char *));
30 39 lampret
 
31
/*
32
 * setenv --
33
 *      Set the value of the environmental variable "name" to be
34
 *      "value".  If rewrite is set, replace any current value.
35
 */
36
 
37
int
38
_DEFUN (setenv, (name, value, rewrite),
39
        _CONST char *name _AND
40
        _CONST char *value _AND
41
        int rewrite)
42
{
43 56 joel
  return _setenv_r (_REENT, name, value, rewrite);
44 39 lampret
}
45
 
46
/*
47
 * unsetenv(name) --
48
 *      Delete environmental variable "name".
49
 */
50
void
51
_DEFUN (unsetenv, (name),
52
        _CONST char *name)
53
{
54 56 joel
  unsetenv_r (_REENT, name);
55 39 lampret
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.