home *** CD-ROM | disk | FTP | other *** search
-
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <proto/dos.h>
- #include <proto/exec.h>
-
- #include "defines.h"
- #include "cus.h"
- #include "rev.h"
-
- extern char ver1, ver2, usage;
-
- void giveversioninfo(char *progname)
- {
- char *buffer = NULL;
- char *ptr;
-
- if ((buffer = (char *)malloc(RANGE_12BIT)) == NULL)
- CU2();
- ptr = buffer;
- strupr(progname);
- ptr += sprintf(ptr, &ver1, ProgVersion, ProgRevision, ProgDate);
- strlwr(progname);
- ptr += sprintf(ptr, &ver2);
- Write(Output(), buffer, (int)(ptr-buffer));
- CUS:
- if (buffer)
- free(buffer);
- return;
- }
-
- void giveusage(char *progname)
- {
- char *buffer = NULL;
- char *ptr;
- char padstr[RANGE_5BIT];
- int i;
- char *cp;
-
- if ((buffer = (char *)malloc(RANGE_12BIT)) == NULL)
- CU2();
- ptr = buffer;
- strlwr(progname);
- for (i = strlen(progname), cp = padstr; i > 0; i--)
- *cp++ = SP;
- *cp = NUL;
- ptr += sprintf(ptr, &usage, progname, padstr, padstr, padstr);
- Write(Output(), buffer, (int)(ptr-buffer));
- CUS:
- if (buffer)
- free(buffer);
- return;
- }
-
-