|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T h
Length: 991 (0x3df) Types: TextFile Names: »help.c«
└─⟦9ae75bfbd⟧ Bits:30007242 EUUGD3: Starter Kit └─⟦3658e588a⟧ »EurOpenD3/mail/mh/mh-6.7.tar.Z« └─⟦c75e36ecb⟧ └─⟦this⟧ »mh-6.7/sbr/help.c«
/* help.c - print the usage line */ #include "../h/mh.h" #include <stdio.h> extern char *options[]; void help (str, swp) register char *str; register struct swit *swp; { int nameoutput, len, linepos, outputlinelen; register char *cp, **ap; printf ("syntax: %s\n", str); printf (" switches are:\n"); printsw (ALL, swp, "-"); printf ("\nversion: %s\n", version); nameoutput = linepos = 0; outputlinelen = OUTPUTLINELEN; for (ap = options; *ap; ap++) { if (!nameoutput) { fprintf (stdout, "%s: ", cp = "options"); linepos += (nameoutput = strlen (cp) + 2); } len = strlen (cp = *ap); if (linepos != nameoutput) if (len + linepos + 3 > outputlinelen) fprintf (stdout, "\n%*s", linepos = nameoutput, ""); else { fputs (" ", stdout); linepos++; } fprintf (stdout, "[%s]", cp); linepos += len + 2; } if (linepos) (void) fputc ('\n', stdout); }