Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
op_filnf.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.

Functions

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

Variables

static PRFileDesct1
PRIntn error_code

Function Documentation

int main ( int  argc,
char **  argv 
)

The Xalan testcases app.

Definition at line 69 of file op_filnf.c.

{


#ifdef XP_MAC
       SetupMacPrintfLog("pr_open_re.log");
#endif
       

    PR_STDIO_INIT();
       t1 = PR_Open("/usr/tmp/ttools/err03.tmp", PR_TRUNCATE | PR_RDWR, 0666);
       if (t1 == NULL) {
              if (PR_GetError() == PR_FILE_NOT_FOUND_ERROR) {
                            printf ("error code is %d \n", PR_GetError());
                            printf ("PASS\n");
                            return 0;
              }
              else {
                            printf ("error code is %d \n", PR_GetError());
                            printf ("FAIL\n");
                     return 1;
              }
       }
       PR_Close(t1);
       printf ("opened a file that should not exist\n");
       printf ("FAIL\n");
       return 1;
}                    

Variable Documentation

PRIntn error_code

Definition at line 67 of file op_filnf.c.

PRFileDesc* t1 [static]

Definition at line 66 of file op_filnf.c.