URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 207 |
Rev 520 |
/* Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
|
/* Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
|
*
|
*
|
* Permission to use, copy, modify, and distribute this software
|
* Permission to use, copy, modify, and distribute this software
|
* is freely granted, provided that this notice is preserved.
|
* is freely granted, provided that this notice is preserved.
|
*/
|
*/
|
|
|
#ifndef _NO_WORDEXP
|
#ifndef _NO_WORDEXP
|
|
|
#include <sys/param.h>
|
#include <sys/param.h>
|
#include <sys/stat.h>
|
#include <sys/stat.h>
|
|
|
#include <ctype.h>
|
#include <ctype.h>
|
#include <dirent.h>
|
#include <dirent.h>
|
#include <errno.h>
|
#include <errno.h>
|
#include <glob.h>
|
#include <glob.h>
|
#include <pwd.h>
|
#include <pwd.h>
|
#include <stdio.h>
|
#include <stdio.h>
|
#include <stdlib.h>
|
#include <stdlib.h>
|
#include <string.h>
|
#include <string.h>
|
#include <unistd.h>
|
#include <unistd.h>
|
|
|
#include <wordexp.h>
|
#include <wordexp.h>
|
|
|
void
|
void
|
wordfree(wordexp_t *pwordexp)
|
wordfree(wordexp_t *pwordexp)
|
{
|
{
|
int i;
|
int i;
|
|
|
if (pwordexp == NULL)
|
if (pwordexp == NULL)
|
return;
|
return;
|
|
|
if (pwordexp->we_wordv == NULL)
|
if (pwordexp->we_wordv == NULL)
|
return;
|
return;
|
|
|
for(i = 0; i < pwordexp->we_wordc; i++)
|
for(i = 0; i < pwordexp->we_wordc; i++)
|
free(pwordexp->we_wordv[i]);
|
free(pwordexp->we_wordv[i]);
|
|
|
free(pwordexp->we_wordv);
|
free(pwordexp->we_wordv);
|
pwordexp->we_wordv = NULL;
|
pwordexp->we_wordv = NULL;
|
}
|
}
|
|
|
#endif /* !_NO_WORDEXP */
|
#endif /* !_NO_WORDEXP */
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.