wrap.c

foundationI_fluffos_v1/lib/secure/SimulEfun/wrap.c · 453 B

From the archive foundation1_fluffos_v1.zip

Download the archive   « Back to the archive contents

//      /adm/simul_efun/wrap.c
//      Part of the TMI distribution mudlib and now Nightmare's
//      Inserts "\n"'s into text so lines arn't wider than screens
//      Author unknown, but thanks to the MudOS driver team for sprintf
//      Moved to Nightmare by Pallando 93-05-28

#define SZ 75

varargs string wrap(string str, int width) {
	if (!width) return sprintf("%-="+SZ+"s", str + "\n");
	else return sprintf("%-="+width+"s", str + "\n");
}

Site Stats

Snippets: 1791
Codebases: 571