File: test-strerror.c

package info (click to toggle)
libunwind 1.1-3.2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 7,540 kB
  • ctags: 5,665
  • sloc: ansic: 31,521; sh: 18,062; asm: 1,851; makefile: 866; cpp: 118
file content (18 lines) | stat: -rw-r--r-- 293 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "compiler.h"
#include <libunwind.h>
#include <stdio.h>

int
main (int argc, char **argv UNUSED)
{
  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;
}