aboutsummaryrefslogtreecommitdiff
path: root/lib/error_string.c
blob: d7fd21058c1272ab1225f3a3389f1c98b4bd14ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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;
}