diff options
Diffstat (limited to 'lib/error_string.c')
| -rw-r--r-- | lib/error_string.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/error_string.c b/lib/error_string.c new file mode 100644 index 0000000..d7fd210 --- /dev/null +++ b/lib/error_string.c @@ -0,0 +1,16 @@ +#include "../ninitfeatures.h" +#if 0 +struct error_table { int n; char *s; }; /*EXTRACT_UNMOD*/ +#endif + +char *error_string(struct error_table *table, int n) /*EXTRACT_INCL*/ { + static char y[28]; + char *x=y; + for (; table->s; table++) + if (table->n == n) return table->s; + + x += str_copy(x,"error="); + x += fmt_ulong(x,n); + *x = 0; + return y; +} |
