#include "fig2vect-version.h"
#include "dkfig.h"

Defines | |
| #define | SYSCONFDIR "/etc" |
| System configuration directory (definition). | |
| #define | PACKAGENAME "fig2vect" |
| Package name (definition). | |
Functions | |
| static void | silence_check (int argc, char **argv, int *rs, int *rf) |
| Check whether or not to run silently or as a filter. | |
| static void | print_version (void) |
| Print version number and license terms. | |
| static void | print_help (dk_app_t *a) |
| Print help, either from help text file or the built-in help text. | |
| int | run_the_program (dk_app_t *app) |
| Run the program either normally or for the application options. | |
| int | main (int argc, char *argv[]) |
| The main function. | |
Variables | |
| static char | sysconfdir [] = { "/etc" } |
| System configuration directory (string constant). | |
| static char | packagename [] = { "fig2vect" } |
| Package name (string constant). | |
| static char * | version_text [] |
| Text to show for version number and license conditions. | |
| static char * | help_text [] |
| Text to show as help text if the fig2vect.txt file is not found. | |
| static char | help_file_name [] = { "fig2vect.txt" } |
| Name of help text file. | |
| static char | sccs_id [] = { "@(#)fig2vect.ctr 1.132 11/23/09" } |
| SCCS ID. | |
This program converts Fig file produced by XFig, jFig or WinFig to vector graphics formats.
The program is intended for LaTeX users but may be useful to other users too.
| #define PACKAGENAME "fig2vect" |
Package name (definition).
| #define SYSCONFDIR "/etc" |
System configuration directory (definition).
| int main | ( | int | argc, | |
| char * | argv[] | |||
| ) |
The main function.
The function checks, whether or not to run silently. After creating an application structure it calls run_the_program().
| argc | Number of command line arguments. | |
| argv | Command line arguments array. |
| static void print_help | ( | dk_app_t * | a | ) | [static] |
Print help, either from help text file or the built-in help text.
| a | Application structure. |
| int run_the_program | ( | dk_app_t * | app | ) |
Run the program either normally or for the application options.
The function creates a new conversion job structure using dkfig_co_new(), applies the command line arguments using dkfig_co_apply_args() and calls either dkfig_co_run() or one of the functions to handle application options.
| app | Application structure. |
| static void silence_check | ( | int | argc, | |
| char ** | argv, | |||
| int * | rs, | |||
| int * | rf | |||
| ) | [static] |
Check whether or not to run silently or as a filter.
If the option --silent is used the application runs silently. If no output file name (second command line argument) is specified the application runs as filter and can not print log messages to standard output.
| argc | Number of command line arguments. | |
| argv | Command line arguments array. | |
| rs | Pointer to run-silently flag variable. | |
| rf | Pointer to run-as-filter flag variable. |
char* help_text[] [static] |
Initial value:
{
"fig2vect - XFig to vector graphics converter",
"",
"fig2vect [-l <language>] [-o <option>...] [-m] <directory>",
"fig2vect [-l <language>] [-o <option>...] [ <inputfile> [<outputfile>] ]",
"",
"-l language",
" chooses the output language, must be defined in fig2vect.cfg",
"",
"-o option",
" passes the option to the output driver",
"",
"-m",
" enables make style when running on a directory",
"",
"-A",
"-A-",
" suppress or allow messages about alpha channels transferred to PDF.",
"",
NULL
}
char* version_text[] [static] |
Initial value:
{
"",
"fig2vect, version " "1.1.20" ,
"Copyright (C) 2004-2008 Dipl.-Ing. D. Krause",
"http://fig2vect.sourceforge.net/",
"",
"Redistribution and use in source and binary forms, with or without",
"modification, are permitted provided that the following conditions are met:",
"* Redistributions of source code must retain the above copyright notice, this",
" list of conditions and the following disclaimer.",
"* Redistributions in binary form must reproduce the above copyright notice,",
" this list of conditions and the following disclaimer in the documentation",
" and/or other materials provided with the distribution.",
"* Neither the name of the Dirk Krause nor the names of other contributors may",
" be used to endorse or promote products derived from this software without",
" specific prior written permission.",
"THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"",
"AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE",
"IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE",
"ARE DISCLAIMED.",
"IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY",
"DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES",
"(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;",
"LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND",
"ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT",
"(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS",
"SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
NULL
}
1.5.8