Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
icaltestparser.c File Reference
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include "ical.h"
#include <stdlib.h>

Go to the source code of this file.

Functions

char * read_stream (char *s, size_t size, void *d)
int main (int argc, char *argv[])

Variables

char str []
int yydebug

Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 91 of file icaltestparser.c.

{

    char* line; 
    FILE* stream;
    icalcomponent *c; 
    icalparser *parser = icalparser_new();

    stream = fopen(argv[1],"r");

    assert(stream != 0);

    icalparser_set_gen_data(parser,stream);

    do{
    
       line = icalparser_get_line(parser,read_stream);

       c = icalparser_add_line(parser,line);


       if (c != 0){
           /*icalcomponent_convert_errors(c);*/
           printf("%s",icalcomponent_as_ical_string(c));
           printf("\n---------------\n");
           icalcomponent_free(c);
       }

    } while ( line != 0);

    return 0;
 }

Here is the call graph for this function:

char* read_stream ( char *  s,
size_t  size,
void d 
)

Definition at line 81 of file icaltestparser.c.

{
  char *c = fgets(s,size, (FILE*)d);

  return c;

}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 36 of file icaltestparser.c.

Definition at line 436 of file nsVCard.cpp.