projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean up prototypes.
[mmh]
/
sbr
/
putenv.c
diff --git
a/sbr/putenv.c
b/sbr/putenv.c
index
5b53298
..
5c7279b
100644
(file)
--- a/
sbr/putenv.c
+++ b/
sbr/putenv.c
@@
-14,28
+14,28
@@
extern char **environ;
/*
** prototypes
*/
/*
** prototypes
*/
-int m_putenv (char *, char *);
-int unputenv (char *);
-static int nvmatch (char *, char *);
+int m_putenv(char *, char *);
+int unputenv(char *);
+static int nvmatch(char *, char *);
int
int
-m_putenv (char *name, char *value)
+m_putenv(char *name, char *value)
{
register int i;
register char **ep, **nep, *cp;
{
register int i;
register char **ep, **nep, *cp;
- cp = mh_xmalloc ((size_t) (strlen (name) + strlen (value) + 2));
+ cp = mh_xmalloc((size_t) (strlen(name) + strlen(value) + 2));
- sprintf (cp, "%s=%s", name, value);
+ sprintf(cp, "%s=%s", name, value);
for (ep = environ, i = 0; *ep; ep++, i++)
for (ep = environ, i = 0; *ep; ep++, i++)
- if (nvmatch (name, *ep)) {
+ if (nvmatch(name, *ep)) {
*ep = cp;
return 0;
}
*ep = cp;
return 0;
}
- nep = (char **) mh_xmalloc ((size_t) ((i + 2) * sizeof(*nep)));
+ nep = (char **) mh_xmalloc((size_t) ((i + 2) * sizeof(*nep)));
for (ep = environ, i = 0; *ep; nep[i++] = *ep++)
continue;
for (ep = environ, i = 0; *ep; nep[i++] = *ep++)
continue;
@@
-47,12
+47,12
@@
m_putenv (char *name, char *value)
int
int
-unputenv (char *name)
+unputenv(char *name)
{
char **ep, **nep;
for (ep = environ; *ep; ep++)
{
char **ep, **nep;
for (ep = environ; *ep; ep++)
- if (nvmatch (name, *ep))
+ if (nvmatch(name, *ep))
break;
if (*ep == NULL)
return 1;
break;
if (*ep == NULL)
return 1;
@@
-66,7
+66,7
@@
unputenv (char *name)
static int
static int
-nvmatch (char *s1, char *s2)
+nvmatch(char *s1, char *s2)
{
while (*s1 == *s2++)
if (*s1++ == '=')
{
while (*s1 == *s2++)
if (*s1++ == '=')