added sources

This commit is contained in:
Jiri Popelka 2011-08-29 15:46:50 +02:00
parent 29ebb74b45
commit 9583db4a01
8 changed files with 2 additions and 270 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
pstoedit-3.45.tar.gz
/pstoedit-3.60.tar.gz

View File

@ -1,13 +0,0 @@
--- pstoedit-3.45/configure.orig 2007-08-10 22:26:10.000000000 +0200
+++ pstoedit-3.45/configure 2008-08-29 14:06:02.000000000 +0200
@@ -22282,9 +22282,8 @@
else
{ echo "$as_me:$LINENO: result: GNU" >&5
echo "${ECHO_T}GNU" >&6; }
- SPECIAL_CXXFLAGS="-DBUGGYGPP -pedantic -Wall -Wwrite-strings -Wcast-qual -Wpointer-arith "
+ SPECIAL_CXXFLAGS="-DBUGGYGPP -Wall -Wwrite-strings -Wcast-qual -Wpointer-arith "
fi
- CXXFLAGS="-g"
elif test `echo "$CXX" | egrep -c 'xlC$'` -eq 1; then
{ echo "$as_me:$LINENO: result: AIX xlC" >&5
echo "${ECHO_T}AIX xlC" >&6; }

View File

@ -1,149 +0,0 @@
diff -ru pstoedit-3.45/src/drvasy.cpp pstoedit-3.45J/src/drvasy.cpp
--- pstoedit-3.45/src/drvasy.cpp 2007-07-22 05:27:30.000000000 -0600
+++ pstoedit-3.45J/src/drvasy.cpp 2007-12-08 16:22:58.000000000 -0700
@@ -58,7 +58,8 @@
clipmode(false),
evenoddmode(false),
firstpage(true),
- imgcount(0)
+ imgcount(0),
+ level(0)
{
// Output copyright information
outf << "// Converted from PostScript(TM) to Asymptote by pstoedit\n"
@@ -76,6 +77,29 @@
options=0;
}
+void drvASY::save()
+{
+ while(gsavestack.size() && gsavestack.front()) {
+ gsavestack.pop_front();
+ outf << "gsave();" << endl;
+ ++level;
+ clipstack.push_back(false);
+ }
+}
+
+void drvASY::restore() {
+ while(gsavestack.size() && !gsavestack.front()) {
+ gsavestack.pop_front();
+ while(clipstack.size() > 0) {
+ if(clipstack.back())
+ outf << "endclip();" << endl;
+ clipstack.pop_back();
+ }
+ outf << "grestore();" << endl;
+ if(level > 0) --level;
+ }
+}
+
// Output a path
void drvASY::print_coords()
{
@@ -84,11 +108,7 @@
bool havecycle=false;
bool firstpoint=false;
- while(gsavestack.size() && gsavestack.front()) {
- gsavestack.pop_front();
- outf << "gsave();" << endl;
- clipstack.push_back(false);
- }
+ save();
if (fillmode || clipmode) {
for (unsigned int n = 0; n < numberOfElementsInPath(); n++) {
@@ -247,16 +267,7 @@
outf << ");" << endl;
}
}
-
- while(gsavestack.size() && !gsavestack.front()) {
- gsavestack.pop_front();
- if(clipstack.size() > 0) {
- if(clipstack.back())
- outf << "endclip();" << endl;
- clipstack.pop_back();
- }
- outf << "grestore();" << endl;
- }
+ restore();
}
// Each page will produce a different figure
@@ -272,6 +283,8 @@
void drvASY::show_image(const PSImage & imageinfo)
{
+ restore();
+
if (outBaseName == "" ) {
errf << "images cannot be handled via standard output. Use an output file" << endl;
return;
@@ -285,9 +298,13 @@
ostringstream buf;
buf << outBaseName << "." << imgcount << ".eps";
- outf << "label(graphic(\"" << buf.str() << "\"),("
+ outf << "label(graphic(\"" << buf.str() << "\",\"bb="
+ << ll.x_ << " " << ll.y_ << " " << ur.x_ << " " << ur.y_ << "\"),("
<< ll.x_ << "," << ll.y_ << "),align);" << endl;
- outf << "layer();" << endl;
+
+ // Try to draw image in a separate layer.
+ if(level == 0)
+ outf << "layer();" << endl;
ofstream outi(buf.str().c_str());
if (!outi) {
@@ -304,6 +321,8 @@
// Output a text string
void drvASY::show_text(const TextInfo & textinfo)
{
+ restore();
+
// Change fonts
string thisFontName(textinfo.currentFontName.value());
string thisFontWeight(textinfo.currentFontWeight.value());
@@ -361,7 +380,8 @@
if(prevFontAngle != 0.0) outf << "rotate(" << prevFontAngle << ")*(";
bool texify=false;
bool quote=false;
- for (const char *c = textinfo.thetext.value(); *c; c++) {
+ const char *c=textinfo.thetext.value();
+ if(*c) for (; *c; c++) {
if (*c >= ' ' && *c != '\\' && *c <= '~') {
if(!texify) {
if(quote) outf << "\"+";
@@ -383,7 +403,7 @@
}
outf << "\\char" << (int) *c;
}
- }
+ } else outf << "\"\"";
if(quote) outf << "\"";
if(texify) outf << ")";
if(prevFontAngle != 0.0) outf << ")";
diff -ru pstoedit-3.45/src/drvasy.h pstoedit-3.45J/src/drvasy.h
--- pstoedit-3.45/src/drvasy.h 2007-07-22 05:27:40.000000000 -0600
+++ pstoedit-3.45J/src/drvasy.h 2007-12-08 16:22:51.000000000 -0700
@@ -58,6 +58,8 @@
private:
void print_coords();
+ void save();
+ void restore();
// Previous values of graphics state variables
string prevFontName;
string prevFontWeight;
@@ -80,6 +82,9 @@
int imgcount;
+ unsigned int level;
+ // gsave nesting level
+
std::list<bool> clipstack;
std::list<bool> gsavestack;
};

View File

@ -1,35 +0,0 @@
--- pstoedit-3.45/src/Makefile.in.orig 2007-09-09 18:07:30.000000000 +0200
+++ pstoedit-3.45/src/Makefile.in 2009-07-09 10:14:02.366021602 +0200
@@ -329,19 +355,24 @@
libp2edrvstd_la_LIBADD = -L. libpstoedit.la
libp2edrvstd_la_LDFLAGS = -no-undefined -module
+libp2edrvstd_la_DEPENDENCIES = libpstoedit.la
libp2edrvlplot_la_SOURCES = drvlplot.cpp drvlplot.h initlibrary.cpp
libp2edrvlplot_la_LIBADD = $(LIBPLOTTER_LDFLAGS) -L. libpstoedit.la
libp2edrvlplot_la_LDFLAGS = -no-undefined -module
+libp2edrvlplot_la_DEPENDENCIES = libpstoedit.la
libp2edrvswf_la_SOURCES = drvswf.cpp drvswf.h initlibrary.cpp
libp2edrvswf_la_LIBADD = $(LIBMING_LDFLAGS) -L. libpstoedit.la
libp2edrvswf_la_LDFLAGS = -no-undefined -module
+libp2edrvswf_la_DEPENDENCIES = libpstoedit.la
libp2edrvmagick___la_SOURCES = drvmagick++.cpp drvmagick++.h initlibrary.cpp
libp2edrvmagick___la_LIBADD = -L. libpstoedit.la
libp2edrvmagick___la_LDFLAGS = -no-undefined ${LIBMAGICK_LDFLAGS} -module
+libp2edrvmagick___la_DEPENDENCIES = libpstoedit.la
@USE_EMFBYSOURCE_FALSE@libp2edrvwmf_la_SOURCES = drvwmf.cpp drvwmf.h initlibrary.cpp
@USE_EMFBYSOURCE_TRUE@libp2edrvwmf_la_SOURCES = emflib.cpp drvwmf.cpp drvwmf.h initlibrary.cpp
@USE_EMFBYSOURCE_FALSE@libp2edrvwmf_la_LDFLAGS = -no-undefined $(LIBEMF_LDFLAGS) -L. libpstoedit.la -module
@USE_EMFBYSOURCE_TRUE@libp2edrvwmf_la_LDFLAGS = -no-undefined -L. libpstoedit.la -module
+libp2edrvwmf_la_DEPENDENCIES = libpstoedit.la
libpstoedit_la_SOURCES = \
dynload.cpp dynload.h \
callgs.cpp \
@@ -362,6 +393,7 @@
libpstoedit_la_LDFLAGS = -no-undefined
pstoedit_SOURCES = cmdmain.cpp
pstoedit_LDFLAGS = -no-undefined -L. libpstoedit.la ${LIBLD_LDFLAGS}
+pstoedit_DEPENDENCIES = libpstoedit.la
pkginclude_HEADERS = \
pstoedit.h \
pstoedll.h \

View File

@ -1,11 +0,0 @@
--- pstoedit-3.45/src/dynload.cpp~ 2007-07-22 13:27:36.000000000 +0200
+++ pstoedit-3.45/src/dynload.cpp 2009-02-10 07:54:14.000000000 +0100
@@ -138,7 +138,7 @@
dlclose(handle);
#elif defined(_WIN32)
(void) WINFREELIB((HINSTANCE) handle);
-#elif
+#else
#error "system unsupported so far"
#endif
handle = 0;

View File

@ -1,12 +0,0 @@
--- pstoedit-3.45/src/cppcomp.h~ 2007-07-22 13:27:40.000000000 +0200
+++ pstoedit-3.45/src/cppcomp.h 2008-02-17 11:53:46.000000000 +0100
@@ -37,6 +37,9 @@
#define _unix
#endif
+#include <cstring>
+#include <cstdlib>
+
#if defined (_MSC_VER) && (_MSC_VER >= 1100)
// MSVC 5 and 6 have ANSI C++ header files, but the compilation
// is much slower and object files get bigger.

View File

@ -1,49 +0,0 @@
--- pstoedit-3.45/src/pstoedit.cpp.orig 2007-07-22 13:27:38.000000000 +0200
+++ pstoedit-3.45/src/pstoedit.cpp 2007-09-20 11:08:32.000000000 +0200
@@ -352,14 +352,16 @@
#endif
#endif
+ const unsigned int remaining = options.parseoptions(errstream,argc,argv);
+
+ if (!options.quiet) {
errstream << "pstoedit: version " << version << " / DLL interface " <<
drvbaseVersion << " (build " << __DATE__ << " - " << buildtype << " - " << compversion << ")"
" : Copyright (C) 1993 - 2007 Wolfgang Glunz\n";
+ }
// int arg = 1;
drvbase::SetVerbose( false ); // init
-
- const unsigned int remaining = options.parseoptions(errstream,argc,argv);
// handling of derived parameters
drvbase::SetVerbose(options.verbose);
closerObject.fromgui = (bool) options.fromgui;
--- pstoedit-3.45/src/pstoeditoptions.h.orig 2007-09-20 11:07:14.000000000 +0200
+++ pstoedit-3.45/src/pstoeditoptions.h 2007-09-20 11:06:49.000000000 +0200
@@ -156,6 +156,7 @@
Option < bool, BoolTrueExtractor > splitpages ;//= false;
Option < bool, BoolTrueExtractor > verbose ;//= false;
+ Option < bool, BoolTrueExtractor > quiet ;//= false;
Option < bool, BoolTrueExtractor > useBBfrominput; //= false;
Option < bool, BoolTrueExtractor > simulateSubPaths ;//= false;
Option < RSString, RSStringValueExtractor> unmappablecharstring ;//= 0;
@@ -333,6 +334,9 @@
"Switch on verbose mode. Some additional information is shown "
"during processing. ",
false),
+ quiet (true, "-quiet",noArgument,b_t,"turns on quiet mode",
+ "Switch on quiet mode. Version information is not shown. ",
+ false),
useBBfrominput (true, "-usebbfrominput",noArgument,g_t,"extract BoundingBox from input file rather than determining it during processing",
"If specified, pstoedit uses the BoundingBox as is (hopefully) found in the input file instead of one that is calculated by its own. ",
false),
@@ -573,6 +577,7 @@
ADD(splitpages);
ADD(verbose );
+ ADD(quiet);
ADD(useBBfrominput);
ADD(simulateSubPaths);
ADD(unmappablecharstring);

View File

@ -1 +1 @@
071efc64d9edf5d942b407348ac7451d pstoedit-3.45.tar.gz
1bd14f33c1cf57bf6880e2f8f3f93080 pstoedit-3.60.tar.gz