summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Ehmsen <ehmsen@gentoo.org>2006-05-19 10:00:41 +0000
committerMartin Ehmsen <ehmsen@gentoo.org>2006-05-19 10:00:41 +0000
commit03575f1ef0d1972501989f546500a9706f22a33a (patch)
treeee843b8aac16ef2097f1aa5a3b277267c5d3cc63 /app-text/pstotext/files
parentUpdated knowledgetree to version 3.0.2. Some new useflags added. (diff)
downloadhistorical-03575f1ef0d1972501989f546500a9706f22a33a.tar.gz
historical-03575f1ef0d1972501989f546500a9706f22a33a.tar.bz2
historical-03575f1ef0d1972501989f546500a9706f22a33a.zip
Fixed pstotext-1.9-quote-chars-fix.patch so input from stdin works.
Package-Manager: portage-2.1_rc1-r3
Diffstat (limited to 'app-text/pstotext/files')
-rw-r--r--app-text/pstotext/files/digest-pstotext-1.8g2
-rw-r--r--app-text/pstotext/files/digest-pstotext-1.8g-r12
-rw-r--r--app-text/pstotext/files/digest-pstotext-1.9-r23
-rw-r--r--app-text/pstotext/files/pstotext-1.9-quote-chars-fix.patch85
4 files changed, 59 insertions, 33 deletions
diff --git a/app-text/pstotext/files/digest-pstotext-1.8g b/app-text/pstotext/files/digest-pstotext-1.8g
index 606fe5da9487..1b1db2f13401 100644
--- a/app-text/pstotext/files/digest-pstotext-1.8g
+++ b/app-text/pstotext/files/digest-pstotext-1.8g
@@ -1 +1,3 @@
MD5 1be0be028ccc85be1bf55d7e90976b18 pstotext.tar.Z 58743
+RMD160 b8a49c5a0478b9ac8f7948ed75690327e8b98f48 pstotext.tar.Z 58743
+SHA256 139ff4819bd067cb185c5d65d97b2ce62fb8109487a44e4b5450916179363652 pstotext.tar.Z 58743
diff --git a/app-text/pstotext/files/digest-pstotext-1.8g-r1 b/app-text/pstotext/files/digest-pstotext-1.8g-r1
index 606fe5da9487..1b1db2f13401 100644
--- a/app-text/pstotext/files/digest-pstotext-1.8g-r1
+++ b/app-text/pstotext/files/digest-pstotext-1.8g-r1
@@ -1 +1,3 @@
MD5 1be0be028ccc85be1bf55d7e90976b18 pstotext.tar.Z 58743
+RMD160 b8a49c5a0478b9ac8f7948ed75690327e8b98f48 pstotext.tar.Z 58743
+SHA256 139ff4819bd067cb185c5d65d97b2ce62fb8109487a44e4b5450916179363652 pstotext.tar.Z 58743
diff --git a/app-text/pstotext/files/digest-pstotext-1.9-r2 b/app-text/pstotext/files/digest-pstotext-1.9-r2
new file mode 100644
index 000000000000..f0cae0854c98
--- /dev/null
+++ b/app-text/pstotext/files/digest-pstotext-1.9-r2
@@ -0,0 +1,3 @@
+MD5 64576e8a10ff5514e285d98b3898ae78 pstotext-1.9.tar.gz 37461
+RMD160 16dc199d19df64280184d11ccbced7a32770ddad pstotext-1.9.tar.gz 37461
+SHA256 cfe0a251d0d43982a7d3bdf1d1670c854432739d00cb593c9beaca4b2cc36c27 pstotext-1.9.tar.gz 37461
diff --git a/app-text/pstotext/files/pstotext-1.9-quote-chars-fix.patch b/app-text/pstotext/files/pstotext-1.9-quote-chars-fix.patch
index d01c0e901bc4..177d3726e659 100644
--- a/app-text/pstotext/files/pstotext-1.9-quote-chars-fix.patch
+++ b/app-text/pstotext/files/pstotext-1.9-quote-chars-fix.patch
@@ -1,6 +1,6 @@
-diff -ru ../../pstotext-1.9/main.c ./main.c
---- ../../pstotext-1.9/main.c 2005-07-24 18:56:11.000000000 +0200
-+++ ./main.c 2006-03-21 21:55:55.000000000 +0100
+diff -urN pstotext-1.9.orig/main.c pstotext-1.9/main.c
+--- pstotext-1.9.orig/main.c 2004-01-09 11:17:38.000000000 +0100
++++ pstotext-1.9/main.c 2006-05-19 11:43:52.000000000 +0200
@@ -126,12 +126,14 @@
static int cleanup(void) {
int gsstatus, status = 0;
@@ -18,11 +18,12 @@ diff -ru ../../pstotext-1.9/main.c ./main.c
if (WIFEXITED(gsstatus)) {
if (WEXITSTATUS(gsstatus)!=0) status = 3;
else if (WIFSIGNALED(gsstatus)) status = 4;
-@@ -166,7 +168,13 @@
+@@ -166,8 +168,13 @@
static int do_it(char *path) {
/* If "path" is NULL, then "stdin" should be processed. */
- char *gs_cmdline;
+- char *input;
+ char *gs_argv[32];
+ int gs_argc=0;
+#ifdef DEBUG
@@ -30,17 +31,54 @@ diff -ru ../../pstotext-1.9/main.c ./main.c
+#endif
+ int fd[2];
+ pid_t p;
- char *input;
int status;
char norotate[] = "";
-@@ -216,32 +224,29 @@
- cleanup();
- exit(1);
- }
-- strcpy(input, "-- '"); strcat(input, path); strcat(input, "'");
-+ strcpy(input, path);
+ FILE *fileout;
+@@ -201,47 +208,31 @@
+ exit(1);
}
+- if (path==NULL) {
+- input = (char*)malloc(2);
+- if (input == NULL) {
+- fprintf(stderr,"No memory available\n");
+- cleanup();
+- exit(1);
+- }
+- strcpy(input, "-");
+- } else {
+- input = (char*)malloc(strlen(path) + 6);
+- if (input == NULL) {
+- fprintf(stderr,"No memory available\n");
+- cleanup();
+- exit(1);
+- }
+- strcpy(input, "-- '"); strcat(input, path); strcat(input, "'");
++ gs_argv[gs_argc++] = "gs";
++ gs_argv[gs_argc++] = "-r72";
++ gs_argv[gs_argc++] = "-dNODISPLAY";
++ gs_argv[gs_argc++] = "-dFIXEDMEDIA";
++ gs_argv[gs_argc++] = "-dDELAYBIND";
++ gs_argv[gs_argc++] = "-dWRITESYSTEMDICT";
++ if (!debug) {
++ gs_argv[gs_argc++] = "-q";
++ }
++ gs_argv[gs_argc++] = "-dNOPAUSE";
++ gs_argv[gs_argc++] = "-dSAFER";
++ if (rotate_path && strcmp(rotate_path, "")) {
++ gs_argv[gs_argc++] = rotate_path;
++ }
++ if (ocr_path && strcmp(ocr_path, "")) {
++ gs_argv[gs_argc++] = ocr_path;
++ }
++ if (path == NULL ) {
++ gs_argv[gs_argc++] = "-";
++ }
++ else {
++ gs_argv[gs_argc++] = "--";
++ gs_argv[gs_argc++] = path;
+ }
+-
- gs_cmdline = (char*)malloc(strlen(gs_cmd)+strlen(rotate_path)+
- strlen(ocr_path) + strlen(input) + 128);
-
@@ -53,9 +91,9 @@ diff -ru ../../pstotext-1.9/main.c ./main.c
- sprintf(
- gs_cmdline,
-#ifdef VMS
-- "%s -r72 \"-dNODISPLAY\" \"-dFIXEDMEDIA\" \"-dDELAYBIND\" \"-dWRITESYSTEMDICT\" %s \"-dNOPAUSE\" \"-dSAFER\" %s %s %s",
+- "%s -r72 \"-dNODISPLAY\" \"-dFIXEDMEDIA\" \"-dDELAYBIND\" \"-dWRITESYSTEMDICT\" %s \"-dNOPAUSE\" %s %s %s",
-#else
-- "%s -r72 -dNODISPLAY -dFIXEDMEDIA -dDELAYBIND -dWRITESYSTEMDICT %s -dNOPAUSE -dSAFER %s %s %s",
+- "%s -r72 -dNODISPLAY -dFIXEDMEDIA -dDELAYBIND -dWRITESYSTEMDICT %s -dNOPAUSE %s %s %s",
-#endif
- gs_cmd,
- (debug ? "" : "-q"),
@@ -64,30 +102,11 @@ diff -ru ../../pstotext-1.9/main.c ./main.c
- input
- );
- if (debug) fprintf(stderr, "%s\n", gs_cmdline);
-+ gs_argv[gs_argc++] = "gs";
-+ gs_argv[gs_argc++] = "-r72";
-+ gs_argv[gs_argc++] = "-dNODISPLAY";
-+ gs_argv[gs_argc++] = "-dFIXEDMEDIA";
-+ gs_argv[gs_argc++] = "-dDELAYBIND";
-+ gs_argv[gs_argc++] = "-dWRITESYSTEMDICT";
-+ if (!debug) {
-+ gs_argv[gs_argc++] = "-q";
-+ }
-+ gs_argv[gs_argc++] = "-dNOPAUSE";
-+ gs_argv[gs_argc++] = "-dSAFER";
-+ if (rotate_path && strcmp(rotate_path, "")) {
-+ gs_argv[gs_argc++] = rotate_path;
-+ }
-+ if (ocr_path && strcmp(ocr_path, "")) {
-+ gs_argv[gs_argc++] = ocr_path;
-+ }
-+ gs_argv[gs_argc++] = "--";
-+ gs_argv[gs_argc++] = input;
+ gs_argv[gs_argc++] = NULL;
#ifdef VMS
cmdfile = tempnam("SYS$SCRATCH:","PS2TGS");
gsoutfile = tempnam("SYS$SCRATCH:","GSRES");
-@@ -259,8 +264,25 @@
+@@ -259,8 +250,25 @@
exit(1);
}
#else