1*11a8fa6cSceastha /* 2*11a8fa6cSceastha * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 3*11a8fa6cSceastha * Use is subject to license terms. 4*11a8fa6cSceastha */ 5*11a8fa6cSceastha 67c478bd9Sstevel@tonic-gate /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 77c478bd9Sstevel@tonic-gate /* All Rights Reserved */ 87c478bd9Sstevel@tonic-gate 97c478bd9Sstevel@tonic-gate /* 107c478bd9Sstevel@tonic-gate * Copyright (c) 1980 Regents of the University of California. 117c478bd9Sstevel@tonic-gate * All rights reserved. The Berkeley software License Agreement 127c478bd9Sstevel@tonic-gate * specifies the terms and conditions for redistribution. 137c478bd9Sstevel@tonic-gate */ 147c478bd9Sstevel@tonic-gate 15*11a8fa6cSceastha int getargs(char * s,char * arps[])16*11a8fa6cSceasthagetargs(char *s, char *arps[]) 177c478bd9Sstevel@tonic-gate { 187c478bd9Sstevel@tonic-gate int i = 0; 197c478bd9Sstevel@tonic-gate 20*11a8fa6cSceastha while (1) { 217c478bd9Sstevel@tonic-gate arps[i++] = s; 22*11a8fa6cSceastha while (*s != 0 && *s != ' ' && *s != '\t') 237c478bd9Sstevel@tonic-gate s++; 247c478bd9Sstevel@tonic-gate if (*s == 0) 257c478bd9Sstevel@tonic-gate break; 267c478bd9Sstevel@tonic-gate *s++ = 0; 27*11a8fa6cSceastha while (*s == ' ' || *s == '\t') 287c478bd9Sstevel@tonic-gate s++; 29*11a8fa6cSceastha if (*s == 0) 307c478bd9Sstevel@tonic-gate break; 317c478bd9Sstevel@tonic-gate } 32*11a8fa6cSceastha return (i); 337c478bd9Sstevel@tonic-gate } 34