Back to index

lightning-sunbird  0.9+nobinonly
Defines | Functions | Variables
op_nofil.c File Reference
#include "prinit.h"
#include "prmem.h"
#include "prio.h"
#include "prerror.h"
#include <stdio.h>
#include "plgetopt.h"

Go to the source code of this file.


#define NO_SUCH_FILE   "/no/such/file.tmp"


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


static PRFileDesct1

Define Documentation

#define NO_SUCH_FILE   "/no/such/file.tmp"

Definition at line 68 of file op_nofil.c.

Function Documentation

int main ( int  argc,
char **  argv 

The Xalan testcases app.

Definition at line 72 of file op_nofil.c.


#ifdef XP_MAC
       t1 = PR_Open(NO_SUCH_FILE,  PR_RDONLY, 0666);
       if (t1 == NULL) {
              if (PR_GetError() == PR_FILE_NOT_FOUND_ERROR) {
                     printf ("error code is PR_FILE_NOT_FOUND_ERROR, as expected\n");
                     printf ("PASS\n");
                     return 0;
              } else {
                     printf ("error code is %d \n", PR_GetError());
                     printf ("FAIL\n");
                     return 1;
       printf ("File %s exists on this machine!?\n", NO_SUCH_FILE);
       if (PR_Close(t1) == PR_FAILURE) {
              printf ("cannot close file\n");
              printf ("error code is %d \n", PR_GetError());
       printf ("FAIL\n");
       return 1;

Variable Documentation

PRFileDesc* t1 [static]

Definition at line 70 of file op_nofil.c.