FreeBSD/usr.sbin/config/mkoptions.c
/*
 * Find the filename to store the option spec into.
 */
Find the filename to store the option spec into.
Find the filename to store the option spec into .
static char *
tooption(char *name)
{
	static char hbuf[MAXPATHLEN];
	char nbuf[MAXPATHLEN];
	struct opt_list *po;
	(void)strlcpy(nbuf, "options.h", sizeof(nbuf));
	SLIST_FOREACH(po, &otab, o_next) {
		if (eq(po->o_name, name)) {
			strlcpy(nbuf, po->o_file, sizeof(nbuf));
			break;
		}
	}
	(void)strlcpy(hbuf, path(nbuf), sizeof(hbuf));
	return (hbuf);
}
static char * tooption ( char * name ) { static char hbuf [ MAXPATHLEN ] ; char nbuf [ MAXPATHLEN ] ; struct opt_list * po ; ( void ) strlcpy ( nbuf , " " , sizeof ( nbuf ) ) ; SLIST_FOREACH ( po , & otab , o_next ) { if ( eq ( po -> o_name , name ) ) { strlcpy ( nbuf , po -> o_file , sizeof ( nbuf ) ) ; break ; } } ( void ) strlcpy ( hbuf , path ( nbuf ) , sizeof ( hbuf ) ) ; return ( hbuf ) ; }
Find the filename to store the option spec into.
Find the filename to store the option spec into .
/* "cannot happen"?  the otab list should be complete.. */