diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | libversit/ChangeLog | 10 | ||||
-rw-r--r-- | libversit/Makefile.am | 2 | ||||
-rw-r--r-- | libversit/vcc.h | 3 | ||||
-rw-r--r-- | libversit/vcc.y | 68 |
6 files changed, 13 insertions, 79 deletions
@@ -1,3 +1,10 @@ +2000-01-21 Federico Mena Quintero <federico@helixcode.com> + + * libversit/vcc.y: Removed the VFS crap; my mistake, it should not + go here. + + * configure.in: Added yacc requirements for libversit. + 2000-01-21 Matt Loper <matt@helixcode.com> * camel/camel-formatter.c (camel_formatter_make_html): added a diff --git a/configure.in b/configure.in index 4e43679eb2..1ecda63d3a 100644 --- a/configure.in +++ b/configure.in @@ -28,6 +28,8 @@ GNOME_COMPILE_WARNINGS AC_ISC_POSIX AC_PROG_CC AC_PROG_CPP +AM_PROG_LEX +AC_PROG_YACC AC_STDC_HEADERS AC_ARG_PROGRAM AC_PROG_INSTALL diff --git a/libversit/ChangeLog b/libversit/ChangeLog deleted file mode 100644 index cf4d305ada..0000000000 --- a/libversit/ChangeLog +++ /dev/null @@ -1,10 +0,0 @@ -2000-01-20 Federico Mena Quintero <federico@helixcode.com> - - * vcc.y (LexBuf): Added a "handle" field for the GnomeVFSHandle. - (initLex): Initialize the lexBuf.handle. - (Parse_MIME_FromGnomeVFSURI): New function to parse a vCalendar - object from a GnomeVFS URI. - (Parse_MIME_FromGnomeVFSHandle): New function to parse a vCalendar - object from a GnomeVFS handle. - (lexGetc_): Now it can read characters from the VFS as well. - diff --git a/libversit/Makefile.am b/libversit/Makefile.am index 6e9daee0e3..95918fb4a0 100644 --- a/libversit/Makefile.am +++ b/libversit/Makefile.am @@ -10,4 +10,4 @@ libversit_la_SOURCES = \ vcaltmp.c \ vcaltmp.h -EXTRA_DIST = README.TXT vcaltest.c vctest.c ChangeLog +EXTRA_DIST = README.TXT vcaltest.c vctest.c diff --git a/libversit/vcc.h b/libversit/vcc.h index 5aed2ece91..0e52034710 100644 --- a/libversit/vcc.h +++ b/libversit/vcc.h @@ -39,7 +39,6 @@ DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable. #ifndef __VCC_H__ #define __VCC_H__ 1 -#include <libgnomevfs/gnome-vfs.h> #include "vobject.h" @@ -54,8 +53,6 @@ extern DLLEXPORT(void) registerMimeErrorHandler(MimeErrorHandler); extern DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len); extern DLLEXPORT(VObject*) Parse_MIME_FromFileName(char* fname); -VObject *Parse_MIME_FromURI (GnomeVFSURI *uri); - /* NOTE regarding Parse_MIME_FromFile The function above, Parse_MIME_FromFile, comes in two flavors, diff --git a/libversit/vcc.y b/libversit/vcc.y index 1bdd9d22a8..fa314efeb5 100644 --- a/libversit/vcc.y +++ b/libversit/vcc.y @@ -459,10 +459,8 @@ struct LexBuf { /* input */ #ifdef INCLUDEMFC CFile *inputFile; - void *handle; #else FILE *inputFile; - GnomeVFSHandle *handle; #endif char *inputString; unsigned long curPos; @@ -516,7 +514,7 @@ static char lexGetc_() return EOF; else if (lexBuf.inputString) return *(lexBuf.inputString + lexBuf.curPos++); - else if (lexBuf.inputFile { + else { #ifdef INCLUDEMFC char result; return lexBuf.inputFile->Read(&result, 1) == 1 ? result : EOF; @@ -524,16 +522,6 @@ static char lexGetc_() return fgetc(lexBuf.inputFile); #endif } - else if (lexBuf.handle) { - char buf; - GnomeVFSResult result; - GnomeVFSFileSize n; - - if (gnome_vfs_read (lexBuf.handle, &buf, 1, &n) == GNOME_VFS_OK) - return buf; - else - return EOF; - } } static int lexGeta() @@ -797,9 +785,9 @@ static int match_begin_name(int end) { #ifdef INCLUDEMFC -void initLex(const char *inputstring, unsigned long inputlen, CFile *inputfile, void *handle) +void initLex(const char *inputstring, unsigned long inputlen, CFile *inputfile) #else -void initLex(const char *inputstring, unsigned long inputlen, FILE *inputfile, GnomeVFSHandle *handle) +void initLex(const char *inputstring, unsigned long inputlen, FILE *inputfile) #endif { /* initialize lex mode stack */ @@ -810,7 +798,6 @@ void initLex(const char *inputstring, unsigned long inputlen, FILE *inputfile, G lexBuf.inputLen = inputlen; lexBuf.curPos = 0; lexBuf.inputFile = inputfile; - lexBuf.handle = handle; lexBuf.len = 0; lexBuf.getPtr = 0; @@ -1199,55 +1186,6 @@ DLLEXPORT(VObject*) Parse_MIME_FromFileName(char *fname) #endif -VObject * -Parse_MIME_FromGnomeVFSHandle (GnomeVFSHandle *handle) -{ - VObject *result; - GnomeVFSFileSize start_pos; - - g_return_val_if_fail (handle != NULL, NULL); - - if (gnome_vfs_tell (handle, &start_pos) != GNOME_VFS_OK) { - g_message ("Parse_MIME_FromGnomeVFSHandle(): could not tell() the file"); - return NULL; - } - - initLex (NULL, -1, NULL, handle); - - result = Parse_MIMEHelper (); - if (!result) - if (gnome_vfs_seek (handle, GNOME_VFS_SEEK_START, start_pos) != GNOME_VFS_OK) - g_message ("Parse_MIME_FromGnomeVFSHandle(): " - "could not reset the file position"); - - return result; -} - -VObject * -Parse_MIME_FromGnomeVFSURI (GnomeVFSURI *uri) -{ - GnomeVFSHandle *handle; - VObject *o; - - g_return_val_if_fail (uri != NULL, NULL); - - if (gnome_vfs_open_uri (&handle, uri, GNOME_VFS_OPEN_READ) != GNOME_VFS_OK) { - char *msg; - char *str_uri; - - str_uri = gnome_vfs_uri_to_string (uri, GNOME_VFS_URI_HIDE_NONE); - msg = g_strdup_printf ("Could not open `%s'\n", str_uri); - mime_error (msg); - g_free (str_uri); - g_free (msg); - return NULL; - } - - o = Parse_MIME_FromGnomeVFSHandle (handle); - gnome_vfs_close (handle); - return o; -} - /*/////////////////////////////////////////////////////////////////////////*/ static void YYDebug(const char *s) { |