You should have received a copy of the GNU Library General Public
License along with libiberty; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+not, write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
/* Create and destroy argument vectors. An argument vector is simply an
array of string pointers, terminated by a NULL pointer. */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include "ansidecl.h"
#include "libiberty.h"
/* Routines imported from standard C runtime libraries. */
-#ifdef ANSI_PROTOTYPES
-
#include <stddef.h>
#include <string.h>
#include <stdlib.h>
-#else /* !__STDC__ */
-
-#if !defined _WIN32 || defined __GNUC__
-extern char *memcpy (); /* Copy memory region */
-extern int strlen (); /* Count length of string */
-extern char *malloc (); /* Standard memory allocater */
-extern char *realloc (); /* Standard memory reallocator */
-extern void free (); /* Free malloc'd memory */
-extern char *strdup (); /* Duplicate a string */
-#endif
-
-#endif /* __STDC__ */
-
-
#ifndef NULL
#define NULL 0
#endif
*/
char **
-dupargv (argv)
- char **argv;
+dupargv (char **argv)
{
int argc;
char **copy;
for (argc = 0; argv[argc] != NULL; argc++)
{
int len = strlen (argv[argc]);
- copy[argc] = malloc (sizeof (char *) * (len + 1));
+ copy[argc] = (char *) malloc (len + 1);
if (copy[argc] == NULL)
{
freeargv (copy);
*/
-void freeargv (vector)
-char **vector;
+void freeargv (char **vector)
{
register char **scan;
*/
-char **buildargv (input)
- const char *input;
+char **buildargv (const char *input)
{
char *arg;
char *copybuf;
NULL
};
-int main ()
+int
+main (void)
{
char **argv;
const char *const *test;