/*
 * 5799-WZQ (C) COPYRIGHT = NONE
 * LICENSED MATERIALS - PROPERTY OF IBM
 */
/* $Header:ARGV.c 12.0$ */
/* $ACIS:ARGV.c 12.0$ */
/* $Source: /ibm/acis/usr/src/usr.lib/libpc/RCS/ARGV.c,v $ */

#ifndef lint
static char *rcsid = "$Header:ARGV.c 12.0$";
#endif

/* Copyright (c) 1979 Regents of the University of California */

static char sccsid[] = "@(#)ARGV.c 1.4 4/12/82";

#include "h00vars.h"

ARGV(subscript, var, siz)

	long		subscript;	/* subscript into argv */
	register char	*var;		/* pointer to pascal char array */
	long		siz;		/* sizeof(var) */
{
	register char	*cp;
	register int	size = siz;

	if ((unsigned)subscript >= _argc) {
		ERROR("Argument to argv of %D is out of range\n", subscript);
		return;
	}
	cp = _argv[subscript];
	do	{
		*var++ = *cp++;
	} while (--size && *cp);
	while (size--)
		*var++ = ' ';
}
