#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); } -1.2.3'>dependabot/npm_and_yarn/devel/electron4/files/bl-1.2.3 FreeBSD GNOME current development ports (https://github.com/freebsd/freebsd-ports-gnome)
aboutsummaryrefslogtreecommitdiffstats
Commit message (Expand)AuthorAgeFilesLines
* Remove Author from pkg-descr and white space fixesbapt2015-03-031-1/+0
* 1: Stagify.vanilla2014-07-021-7/+9
* Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-211-5/+2
* Update to 0.0.11. Fixes some nasty bugs.adamw2012-07-113-16/+3
* The vast majority of pkg-descr files had the following format when theydougb2011-10-241-1/+1
* - Get Rid MD5 supportmiwi2011-03-191-1/+0
* - Update to 0.9miwi2009-11-044-7/+21
* - Update to 0.0.8miwi2009-09-302-4/+4
* - Update to 0.0.6bmiwi2009-08-192-9/+9
* - Update to 0.0.5amdmi32009-08-112-4/+4
* - Update to 0.0.4cmiwi2009-08-082-4/+4