if (used >= MAX_PROCTITLE) used = MAX_PROCTITLE - 1;
setproctitle(const char *fmt, ...)#elsesetproctitle(fmt, va_alist)	const char *fmt;	va_dcl#endif{	static struct ps_strings *ps;	va_list ap;		static char buf[MAX_PROCTITLE], *bufp = buf;	int used;#ifdef __STDC__	va_start(ap, fmt);#else	va_start(ap);#endif	if (fmt != NULL) {		used = snprintf(buf, MAX_PROCTITLE, "%s: ", __progname);		(void)vsnprintf(buf + used, MAX_PROCTITLE - used, fmt, ap);	} else		(void)snprintf(buf, MAX_PROCTITLE, "%s", __progname);	va_end(ap);	if (ps == NULL) {		struct _ps_strings _ps;		int mib[2];		size_t len;		mib[0] = CTL_VM;		mib[1] = VM_PSSTRINGS;		len = sizeof(_ps);		sysctl(mib, 2, &_ps, &len, NULL, 0);		ps = (struct ps_strings *)_ps.val;	}	ps->ps_nargvstr = 1;	ps->ps_argvstr = &bufp;}