#include #include #include "vcc.h" FILE *cfp; void myMimeErrorHandler(char *s) { printf("%s\n", s); } void main(int argc, char **argv) { int testmem = 0; char * foo[2] = {"foo","alden.vcf"}; argc = 2; argv = foo; #ifdef _CONSOLE cfp = stdout; registerMimeErrorHandler(myMimeErrorHandler); #else cfp = fopen("vctest.out", "w"); if (!cfp) return; #endif ++argv; while (--argc) { FILE *fp; if (strcmp(*argv,"-testmem") == 0) { testmem = 1; argv++; continue; } fprintf(cfp,"processing %s\n",*argv); fp = fopen(*argv,"r"); if (!fp) { fprintf(cfp,"error opening file\n"); } else { VObject *v, *t; FILE *ofp; char buf[256]; char *p; strcpy(buf,*argv); p = strchr(buf,'.'); if (p) *p = 0; strcat(buf,".out"); fprintf(cfp,"reading text input from '%s'...\n", *argv); /*v = Parse_MIME_FromFile(fp); */ v = Parse_MIME_FromFileName(*argv); writeVObjectToFile(buf,v); cleanVObject(v); /* fprintf(cfp,"pretty print internal format of '%s'...\n", *argv); ofp = fopen(buf,"w"); while (v) { printVObject(cfp,v); if (testmem) { char *s, *p; fprintf(cfp,"test writing to mem...\n"); p = s = writeMemVObject(0,0,v); if (s) { while (*s) { fputc(*s,ofp); s++; } free(p); } } else { writeVObject(ofp,v); } t = v; v = nextVObjectInList(v); cleanVObject(t); } fclose(ofp); fclose(fp); */ } cleanStrTbl(); argv++; } if (cfp != stdout) fclose(cfp); } on> FreeBSD GNOME current development ports (https://github.com/freebsd/freebsd-ports-gnome)
aboutsummaryrefslogtreecommitdiffstats
Commit message (Expand)AuthorAgeFilesLines
* - Update to version 0.2.8.3krion2004-05-243-29/+5
* SIZEify.trevor2004-01-291-0/+1
* Disable code that was creating /usr/local/lib/gtk-2.0 and not puttingadamw2004-01-131-0/+25
* - Update to version 0.2.8.2krion2003-12-113-280/+281
* de-pkg-commentknu2003-02-212-1/+1
* Update to 0.2.8arved2003-01-173-4/+6
* Update to 0.2.7.nork2002-11-233-4/+14
* o Rollback PORTCOMMENT modifications while this feature's implementationlioux2002-11-112-2/+1
* Fix PORTCOMMENTs that were killing INDEX builds.adamw2002-11-071-2/+2
* Use PORTCOMMENT in the Makefile, and whack the pkg-comment.adamw2002-11-072-1/+2
* Update to version 0.2.6.demon2002-07-163-10/+14
* - Fix pkg-plistpat2002-05-214-26/+33
* Update to 0.2.5pat2002-05-184-27/+14
* Chase location of libxml2 headerskris2002-03-311-0/+13
* Bump PORTREVISION after the freetype2 shlib major update.knu2002-03-131-0/+1
* Chase increase of freetype2 shlib version.sobomax2002-03-121-1/+1
* Obey the WITHOUT_X11 knob. One utility -- wmf2x is not installed in thismi2002-02-222-4/+11
* Update version number of freetype2 shared library.sobomax2002-01-211-1/+1
* portlint:dirk2001-12-261-1/+1
* Update to 0.2.2petef2001-11-204-7/+46
* Update to 0.2.1.knu2001-09-1311-429/+302
* Bump png majorache2001-09-111-1/+1
* make it buildableijliao2001-07-071-0/+11
* - Update to version 0.1.21.sobomax2000-12-195-33/+17
* Upgrade to 0.1.20.sumikawa2000-11-138-57/+104
* (1) Add new variable, XFREE86_VERSION, to specify which version ofasami2000-08-031-3/+3
* Fix ${PREFIX}/include files that have bad nested includes.steve2000-07-083-0/+23
* Bump png shared library version.sobomax2000-07-041-1/+1
* Remove maintainership of most of my ports. I don't really havecpiazza2000-06-211-1/+1
* Rename INSTALLS_SHLIBS to INSTALLS_SHLIB. (There was a typo in theasami2000-06-171-1/+1
* Fourth round of INSTALLS_SHLIBS conversion.sobomax2000-06-162-5/+1
* - Remove dependency on gd - it uses it's own heavily customized versioncpiazza2000-05-317-107/+124
* Use shared librariescpiazza2000-05-292-0/+89
* Use shared librariescpiazza2000-05-294-13/+164
* Update to 1.1.17cpiazza2000-05-237-9/+105
* Convert to PORTNAME/PORTVERSION. lfview had an invalid versionasami2000-04-141-2/+2
* PLIST related fixes.reg2000-02-271-0/+1
* Bump freetype's lib numberjseger1999-11-251-1/+1
* Sort PLIST.steve1999-11-011-8/+8
* Update to version 0.1.16cpiazza1999-09-112-3/+3
* Change Id->FreeBSD.obrien1999-08-251-1/+1
* Upgrade to 0.1.14billf1999-08-253-3/+5
* Update my email address.cpiazza1999-06-201-3/+3
* Upgrade to 0.1.11, which is a super-minor bugfix release.billf1999-06-162-3/+3