1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #ifndef ASSIST_SOURCE
- #define ASSIST_SOURCE
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include "../tools/symbol.h"
- #include "../tools/error.h"
- void assist (char const * name, char const * type, struct _code_ const list [], size_t size)
- {
- extern char const * program_name;
- fprintf (stderr, "%s: ", program_name);
- fprintf (stderr, "%s: ", strerror (ENOTSUP));
- if (name)
- {
- #if 0
- fprintf (stderr, "Have %s '%s' but need %s ", type, name, type);
- #else
- fprintf (stderr, "Have '%s' but need ", name);
- #endif
- }
- else
- {
- fprintf (stderr, "Need %s ", type);
- }
- codelist (list, size, ",", "''", stderr);
- fprintf (stderr, ".\n");
- exit (1);
- }
- #endif
|