Back to index

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

Go to the source code of this file.

Functions

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

Variables

static PRFileDesct1

Function Documentation

int main ( int  argc,
char **  argv 
)

The Xalan testcases app.

Definition at line 84 of file op_filok.c.

{

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

       t1 = PR_Open(EXISTING_FILENAME, PR_RDONLY, 0666);

       if (t1 == NULL) {
              printf ("error code is %d \n", PR_GetError());
              printf ("File %s should be found\n",
                            EXISTING_FILENAME);
              return 1;
       } else {
              if (PR_Close(t1) == PR_SUCCESS) {
                     printf ("Test passed \n");
                     return 0;
              } else {
                     printf ("cannot close file\n");
                     printf ("error code is %d\n", PR_GetError());
                     return 1;
              }
       }
}                    

Variable Documentation

PRFileDesc* t1 [static]

Definition at line 82 of file op_filok.c.