1N/A/*********************************************************************** 1N/A* This software is part of the ast package * 1N/A* Copyright (c) 1985-2011 AT&T Intellectual Property * 1N/A* and is licensed under the * 1N/A* Common Public License, Version 1.0 * 1N/A* by AT&T Intellectual Property * 1N/A* A copy of the License is available at * 1N/A* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) * 1N/A* Information and Software Systems Research * 1N/A* Glenn Fowler <gsf@research.att.com> * 1N/A* David Korn <dgk@research.att.com> * 1N/A* Phong Vo <kpv@research.att.com> * 1N/A***********************************************************************/ 1N/A * multi-pass commmand line option parse assist 1N/A * int fun(char** argv, int last) 1N/A * each fun() argument parses as much of argv as 1N/A * possible starting at (opt_info.index,opt_info.offset) using 1N/A * if last!=0 then fun is the last pass to view 1N/A * the current arg, otherwise fun sets opt_info.again=1 1N/A * and another pass will get a crack at it 1N/A * 0 fun() return causes immediate optjoin() 0 return 1N/A * optjoin() returns non-zero if more args remain 1N/A * to be parsed at opt_info.index