File: test-strerror.c

package info (click to toggle)
libunwind 0.98.5-8
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 3,704 kB
  • ctags: 2,701
  • sloc: ansic: 16,594; sh: 11,043; asm: 1,216; makefile: 482; cpp: 70
file content (17 lines) | stat: -rw-r--r-- 264 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <libunwind.h>
#include <stdio.h>

int
main (int argc, char **argv)
{
  int i, verbose = argc > 1;
  const char *msg;

  for (i = 0; i < 16; ++i)
    {
      msg = unw_strerror (-i);
      if (verbose)
	printf ("%6d -> %s\n", -i, msg);
    }
  return 0;
}