Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions | Variables
errcodes.c File Reference
#include "prerror.h"
#include "plgetopt.h"
#include <stdio.h>

Go to the source code of this file.

Classes

struct  errinfo

Functions

int main (int argc, char **argv)
 The Xalan testcases app.

Variables

static int _debug_on = 0

Class Documentation

struct errinfo

Definition at line 52 of file errcodes.c.

Class Members
PRErrorCode errcode
char * errname

Function Documentation

int main ( int  argc,
char **  argv 
)

The Xalan testcases app.

Definition at line 134 of file errcodes.c.

{

       int count, errnum;

    /*
     * -d           debug mode
     */

    PLOptStatus os;
    PLOptState *opt = PL_CreateOptState(argc, argv, "d");
    while (PL_OPT_EOL != (os = PL_GetNextOpt(opt)))
    {
        if (PL_OPT_BAD == os) continue;
        switch (opt->option)
        {
        case 'd':  /* debug mode */
            _debug_on = 1;
            break;
        default:
            break;
        }
    }
    PL_DestroyOptState(opt);

       count = sizeof(errcodes)/sizeof(errcodes[0]);
       printf("\nNumber of error codes = %d\n\n",count);
       for (errnum = 0; errnum < count; errnum++) {
              printf("%-40s = %d\n",errcodes[errnum].errname,
                                          errcodes[errnum].errcode);
       }

       return 0;
}

Variable Documentation

int _debug_on = 0 [static]

Definition at line 50 of file errcodes.c.