/* * Copyright (C) 2006 Christian Stigen Larsen, http://csl.sublevel3.org * Distributed under the GNU General Public License (GPL) v2. * * Project homepage on http://jp2a.sf.net * * $Id: jp2a.c 454 2006-09-25 10:12:03Z csl $ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef HAVE_UNISTD_H #include #endif #include #ifdef HAVE_STRING_H #include #endif #include "jp2a.h" #include "options.h" #ifdef WIN32 #ifdef FEAT_CURL #include #define close _close #endif #include #endif int main(int argc, char** argv) { int store_width, store_height, store_autow, store_autoh; FILE *fout = stdout; #ifdef FEAT_CURL FILE *fr; int fd; #endif FILE *fp; int n; parse_options(argc, argv); store_width = width; store_height = height; store_autow = auto_width; store_autoh = auto_height; if ( strcmp(fileout, "-") ) { if ( (fout = fopen(fileout, "wb")) == NULL ) { fprintf(stderr, "Could not open '%s' for writing.\n", fileout); return 1; } } for ( n=1; n