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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [newlib-1.17.0/] [newlib/] [libc/] [posix/] [wordfree.c] - Blame information for rev 868

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

Line No. Rev Author Line
1 148 jeremybenn
/* Copyright (C) 2002 by  Red Hat, Incorporated. All rights reserved.
2
 *
3
 * Permission to use, copy, modify, and distribute this software
4
 * is freely granted, provided that this notice is preserved.
5
 */
6
 
7
#ifndef _NO_WORDEXP
8
 
9
#include <sys/param.h>
10
#include <sys/stat.h>
11
 
12
#include <ctype.h>
13
#include <dirent.h>
14
#include <errno.h>
15
#include <glob.h>
16
#include <pwd.h>
17
#include <stdio.h>
18
#include <stdlib.h>
19
#include <string.h>
20
#include <unistd.h>
21
 
22
#include <wordexp.h>
23
 
24
void
25
wordfree(wordexp_t *pwordexp)
26
{
27
  int i;
28
 
29
  if (pwordexp == NULL)
30
    return;
31
 
32
  if (pwordexp->we_wordv == NULL)
33
    return;
34
 
35
  for(i = 0; i < pwordexp->we_wordc; i++)
36
    free(pwordexp->we_wordv[i]);
37
 
38
  free(pwordexp->we_wordv);
39
  pwordexp->we_wordv = NULL;
40
}
41
 
42
#endif /* !_NO_WORDEXP  */

powered by: WebSVN 2.1.0

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