mirror of
https://github.com/GnoConsortium/gno.git
synced 2024-12-21 07:30:05 +00:00
- don't use the _gno_ prefix for sys_nerr or sys_errlist any more
- changed some formatting in the source file
This commit is contained in:
parent
62becc2887
commit
8c5cc88bbb
@ -1,32 +1,28 @@
|
||||
/*
|
||||
* Test by Devin Reade
|
||||
*
|
||||
* $Id: perror.c,v 1.1 1997/02/28 05:12:57 gdr Exp $
|
||||
* $Id: perror.c,v 1.2 1997/07/28 00:20:37 gdr Exp $
|
||||
*/
|
||||
|
||||
#pragma debug 25
|
||||
|
||||
/* for now ... */
|
||||
#define sys_nerr _gno_sys_nerr
|
||||
#define sys_errlist _gno_sys_errlist
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
int main (int argc, char **argv) {
|
||||
int i;
|
||||
|
||||
int i;
|
||||
|
||||
fprintf(stderr, "ELAST is %d\n", ELAST);
|
||||
if (argc > 1) {
|
||||
for (i=0; i<sys_nerr; i++) {
|
||||
fprintf(stderr, "loop %d\t\"%s\"\n", i, sys_errlist[i]);
|
||||
}
|
||||
for (i=0; i<sys_nerr; i++) {
|
||||
fprintf(stderr, "loop %d\t\"%s\"\n", i, sys_errlist[i]);
|
||||
}
|
||||
} else {
|
||||
for (i=0; i<sys_nerr; i++) {
|
||||
fprintf(stderr, "loop %d\t", i);
|
||||
errno = i;
|
||||
perror("testing perror");
|
||||
}
|
||||
for (i=0; i<sys_nerr; i++) {
|
||||
fprintf(stderr, "loop %d\t", i);
|
||||
errno = i;
|
||||
perror("testing perror");
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user