Spmi_traverse.c

Example A-7 shows the source code for the spmi_traverse.c program.

Example A-7. spmi_traverse.c source code
#include <sys/types.h> #include <sys/errno.h> #include <stdio.h> #include <sys/Spmidef.h> extern errno; extern charSpmiErrmsg[]; extern intSpmiErrno; SPMIerror(char *s) { /* We do not want the \n that the SpmiErrmsg have at the * end since we will use our own error reporting format. */ SpmiErrmsg[strlen(SpmiErrmsg)-1] = 0x0; fprintf(stderr,"%s: %s (%d)\n",s,SpmiErrmsg,SpmiErrno); } /* * This subroutine is called when a user interrupts it or * when the main program exits. If called by a signal handler * it will have a value in parameter s. If s is not set, then * it is called when the main program exits. To not have this ...

Get AIX 5L Practical Performance Tools and Tuning Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.