Added gpotp.
[utils.git] / perror.c
... / ...
CommitLineData
1#include <string.h>
2#include <stdio.h>
3#include <stdlib.h>
4#include <locale.h>
5
6int main(int argc, char **argv)
7{
8 int i;
9
10 setlocale(LC_ALL, "");
11
12 if(argc < 2)
13 {
14 fprintf(stderr, "usage: perror errno...\n");
15 exit(1);
16 }
17
18 for(i = 1; i < argc; i++)
19 {
20 if(argc > 2)
21 printf("%i: ", atoi(argv[i]));
22 printf("%s\n", strerror(atoi(argv[i])));
23 }
24
25 return(0);
26}